Here's a short example of the setup, with a couple of nested repeats and a final bin save.
Code: Select all
.snes lorom
.list
.symbol
.verbose off
.repeat 3,@y
.repeat 10,@x
nop
.echox "current address:",@pc
.echox @x+@y*10
.endrepeat
.endrepeat
.snes savebin
Code: Select all
36 00008042 .cpu spc700
.target cpu SPC700
37 00000000 .base $0000
38 00000000 39 and (x),(y) ;$39,1,0,
39 00000001 28 34 and a,#$1234 ;$28,2,4,
*** error #2 line 39 value out of range >255
40 00000003 26 and a,(x) ;$26,1,0,
41 00000004 37 34 and a,[$1234]+y ;$37,2,1,
*** error #3 line 41 address out of range >255
42 00000006 27 35 and a,[$1234+1+x] ;$27,2,1,
*** error #4 line 42 address out of range >255
43 00000008 24 12 and a,$12 ;$24,2,1,
44 0000000A 34 12 and a,$12+x ;$34,2,1,
45 0000000C 25 34 12 and a,$1234 ;$25,3,2,
46 0000000F 35 35 12 and a,$1234+1+x ;$35,3,2,
47 00000012 36 35 12 and a,$1234+1+y ;$36,3,2,
48 00000015 38 34 34 and $1234,#$1234 ;$38,3,33,
*** error #5 line 48 value out of range >255
49 00000018 29 34 34 and $1234,$1234 ;$29,3,32,
*** error #6 line 49 address out of range >255
50 0000001B 6A 34 32 and1 c,/$1234.1 ;$6a,3,42,
51 0000001E 4A 34 52 and1 c,$1234.2 ;$4a,3,42,
52 00000021 88 21 adc a,#$4321
*** error #7 line 52 value out of range >255
53 00000023 97 70 adc a,[main&$ff]+y
54 00000025 0A 34 72 or1 c,$1234.3
55 00000028 3B 12 rol $12+x
56 0000002A 75 59 01 cmp a,345+x
57 0000002D 6F ret
58 00008042 [00002E] .endb
59 00008070
60 00008070 .cpu 65816
.target cpu 65816
61 00008070 main:
62 00008070 4C 70 80 - jmp -