mirror of
https://github.com/piotr-wiszowaty/foco65.git
synced 2025-04-09 10:40:01 +00:00
Add words: 2dup 2swap 2drop
This commit is contained in:
parent
c892085cd6
commit
60f879b810
44
foco65
44
foco65
@ -1469,6 +1469,50 @@ d_equ_f
|
||||
jmp next
|
||||
[end-code] ;
|
||||
|
||||
: 2drop
|
||||
[label] two_drop
|
||||
[code]
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jmp next
|
||||
[end-code] ;
|
||||
|
||||
: 2dup
|
||||
[label] two_dup
|
||||
[code]
|
||||
lda pstack+3,x
|
||||
dex
|
||||
sta pstack,x
|
||||
lda pstack+3,x
|
||||
dex
|
||||
sta pstack,x
|
||||
lda pstack+3,x
|
||||
dex
|
||||
sta pstack,x
|
||||
lda pstack+3,x
|
||||
dex
|
||||
sta pstack,x
|
||||
jmp next
|
||||
[end-code] ;
|
||||
|
||||
: 2swap
|
||||
[label] two_stap
|
||||
[code]
|
||||
ldy pstack+3,x
|
||||
lda pstack+1,x
|
||||
sta pstack+3,x
|
||||
tya
|
||||
sta pstack+1,x
|
||||
ldy pstack+2,x
|
||||
lda pstack+0,x
|
||||
sta pstack+2,x
|
||||
tya
|
||||
sta pstack+0,x
|
||||
jmp next
|
||||
[end-code] ;
|
||||
|
||||
: sp
|
||||
[code]
|
||||
txa
|
||||
|
Loading…
x
Reference in New Issue
Block a user