Add stack manipulation subroutines
This commit is contained in:
parent
95c29fc2e0
commit
7a4c6295f3
|
@ -78,6 +78,26 @@ stEmit:
|
||||||
store ffff, r1
|
store ffff, r1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
; ------------------------------------------------------------------
|
||||||
|
; Stack manipulation
|
||||||
|
; ------------------------------------------------------------------
|
||||||
|
|
||||||
|
; a - a a
|
||||||
|
stDup:
|
||||||
|
cleq r0, r0, peekWord
|
||||||
|
breq r0, r0, pushWord
|
||||||
|
|
||||||
|
; a b -- a b a
|
||||||
|
stOver:
|
||||||
|
cleq r0, r0, popWord
|
||||||
|
cleq r0, r0, tmpStoreWord01
|
||||||
|
cleq r0, r0, peekWord
|
||||||
|
cleq r0, r0, tmp2StoreWord01
|
||||||
|
cleq r0, r0, tmpLoadWord01
|
||||||
|
cleq r0, r0, pushWord
|
||||||
|
cleq r0, r0, tmp2LoadWord01
|
||||||
|
breq r0, r0, pushWord
|
||||||
|
|
||||||
; ==================================================================
|
; ==================================================================
|
||||||
; Low-level functions
|
; Low-level functions
|
||||||
; ==================================================================
|
; ==================================================================
|
||||||
|
|
Loading…
Reference in New Issue