mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 03:30:05 +00:00
26 lines
343 B
ArmAsm
26 lines
343 B
ArmAsm
|
;
|
||
|
; Ullrich von Bassewitz, 26.10.2000
|
||
|
;
|
||
|
; CC65 runtime: Push value in a onto the stack
|
||
|
;
|
||
|
|
||
|
.export pushaysp, pusha
|
||
|
.importzp sp
|
||
|
|
||
|
; Beware: The optimizer knows about this function!
|
||
|
|
||
|
pushaysp:
|
||
|
lda (sp),y
|
||
|
pusha: ldy sp
|
||
|
beq @L1
|
||
|
dec sp
|
||
|
ldy #0
|
||
|
sta (sp),y
|
||
|
rts
|
||
|
|
||
|
@L1: dec sp+1
|
||
|
dec sp
|
||
|
sta (sp),y
|
||
|
rts
|
||
|
|