; hello.as34.g -- hello.asm ported to Andrew Morton's as34 syntax. ; ; Differences from harness/hello-world/hello.asm (TI GSPA syntax): ; * hex constants use >DEAD, not 0DEADh ; * no L/W immediate-width suffix; as34's movi is always the 32-bit form, ; which is what the GSPA source asked for with ", L" ; * @absolute operands use the same @ syntax ; Everything else (labels, mnemonics, bit addresses, dsjs loops) is unchanged. ; ; Addresses in operands are BIT addresses, like every TMS34010 pointer. .text .globl _start _start: dint ; stay deterministic: no firmware ISR setf 16, 0, 0 ; field 0 = 16 bits, zero-extended setf 32, 0, 1 ; field 1 = 32 bits, zero-extended ; ---- channel 1: RAM markers ----------------------------------- movi >DEAD, a0 move a0, @>1810000, 0 ; MAGIC1 (bytes AD DE in a dump) movi >BEEF, a0 move a0, @>1810010, 0 ; MAGIC2 (bytes EF BE) ; ---- channel 2: solid block in video RAM ---------------------- movi >4019040, a2 ; 04000000h + 100*1024 + 64 movi 64, a3 ; 64 rows movi 16, a4 ; 16 words = 256 pixels per row sub a1, a1 ; counter = 0 movi >FFFF, a0 row_loop: move a4, a5 word_loop: move a0, *a2+, 0 ; store word, postincrement by 16 bits addiw 1, a1 ; count this store dsjs a5, word_loop addiw >300, a2 ; skip 768 bits to the next row dsjs a3, row_loop ; The counter is 0400h only if all 64*16 stores executed. move a1, @>1810020, 0 ; COUNT spin: nop jruc spin .end