Code: Select all
cfetch:
lda dl,x
sta dh-1,x
lda (dh-1,x)
sta dl,x
sty dh,x ; y assumed to be zero
jmp nextCode: Select all
cfetch:
lda dl,x
sta dh-1,x
lda (dh-1,x)
sta dl,x
sty dh,x ; y assumed to be zero
jmp nextCode: Select all
cfetch:
lda dl,x
sta dh-1,x
lda (dh-1,x)
sta dl,x
sty dh,x ; y assumed to be zero
jmp nextCode: Select all
ONEPL: ; 1+
INC DL,X
BNE +
INC DH,X
+ JMP NEXT Code: Select all
SWAP:
LDA DL,X
LDY DL+1,X
STA DL+1,X
STY DL,X
LDA DH,X
LDY DH+1,X
STA DH+1,X
TYA
STA DH,X
JMP NEXT
Code: Select all
: ROT ( x1 x2 x3 -- x2 x3 x1 ) SWAP FLIP ;
: -ROT ( x1 x2 x3 -- x3 x1 x2 ) FLIP SWAP ;
Code: Select all
: ROT ( x1 x2 x3 -- x2 x3 x1 ) SWAP FLIP ;
: -ROT ( x1 x2 x3 -- x3 x1 x2 ) FLIP SWAP ;
Code: Select all
...
` 279 `---------------------------------------------------------------- -ROT
` 280 _dashrot: ` ( x1 x2 x3 -- x3 x1 x2 ) per stack diagram
00000073:da054001` 281 exa 1,s ` ( x3 x2 x1 )
` 282 ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SWAP
` 283 _swap: ` ( x1 x2 -- x2 x1 ) per stack diagram
00000074:da054000` 284 exa ,s
00000075:ae018000` 285 lde ,y+ ` aka jmp (,y+) aka NEXT
...
` 435 `----------------------------------------------------------------- ROT
` 436 _rot: ` ( x1 x2 x3 -- x2 x3 x1 ) per stack diagram
000000b9:da054000` 437 exa ,s ` ( x1 x3 x2 )
000000ba:da054001` 438 exa 1,s ` ( x2 x3 x1 )
000000bb:ae018000` 439 lde ,y+ ` aka jmp (,y+) aka NEXT