mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
54a8a778eb
zero, which can be used by the optimizer. git-svn-id: svn://svn.cc65.org/cc65/trunk@4384 b7a2c559-68d2-44c3-8de9-860c34a00d81
30 lines
603 B
ArmAsm
30 lines
603 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 26.10.2000
|
|
;
|
|
; CC65 runtime: Push value in a onto the stack
|
|
;
|
|
|
|
.export pusha0sp, pushaysp, pusha
|
|
.importzp sp
|
|
|
|
.macpack cpu
|
|
|
|
; Beware: The optimizer knows about this function!
|
|
|
|
pusha0sp:
|
|
ldy #$00
|
|
pushaysp:
|
|
lda (sp),y
|
|
pusha: ldy sp ; (3)
|
|
beq @L1 ; (6)
|
|
dec sp ; (11)
|
|
ldy #0 ; (13)
|
|
sta (sp),y ; (19)
|
|
rts ; (25)
|
|
|
|
@L1: dec sp+1 ; (11)
|
|
dec sp ; (16)
|
|
sta (sp),y ; (22)
|
|
rts ; (28)
|
|
|