mirror of
https://github.com/cc65/cc65.git
synced 2026-03-11 08:41:58 +00:00
30 lines
502 B
ArmAsm
30 lines
502 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 25.10.2000
|
|
;
|
|
; CC65 runtime: Pop a from stack
|
|
;
|
|
|
|
.export popa
|
|
.importzp c_sp
|
|
|
|
.macpack cpu
|
|
|
|
.proc popa
|
|
|
|
.if (.cpu .bitand ::CPU_ISET_65SC02)
|
|
lda (c_sp)
|
|
.else
|
|
ldy #0 ; (2)
|
|
lda (c_sp),y ; (7) Read byte
|
|
.endif
|
|
inc c_sp ; (12)
|
|
beq @L1 ; (14)
|
|
rts ; (20)
|
|
|
|
@L1: inc c_sp+1
|
|
rts
|
|
|
|
.endproc
|
|
|
|
|