mirror of
https://github.com/cc65/cc65.git
synced 2024-10-30 12:28:25 +00:00
c4a5744651
git-svn-id: svn://svn.cc65.org/cc65/trunk@992 b7a2c559-68d2-44c3-8de9-860c34a00d81
32 lines
404 B
ArmAsm
32 lines
404 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 26.10.2000
|
|
;
|
|
; CC65 runtime: Push value in a onto the stack
|
|
;
|
|
|
|
.export pusha0sp, pushaysp, pusha
|
|
.importzp sp
|
|
|
|
; Beware: The optimizer knows about this function!
|
|
|
|
pusha0sp:
|
|
ldy #$00
|
|
pushaysp:
|
|
lda (sp),y
|
|
pusha: ldy sp
|
|
beq @L1
|
|
dec sp
|
|
.ifpc02
|
|
sta (sp)
|
|
.else
|
|
ldy #0
|
|
sta (sp),y
|
|
.endif
|
|
rts
|
|
|
|
@L1: dec sp+1
|
|
dec sp
|
|
sta (sp),y
|
|
rts
|
|
|