1
0
mirror of https://github.com/cc65/cc65.git synced 2026-03-11 08:41:58 +00:00
Files
cc65/libsrc/runtime/ldaxsp.s
2025-06-22 21:34:41 +00:00

21 lines
468 B
ArmAsm

;
; Ullrich von Bassewitz, 31.08.1998
;
; CC65 runtime: Load ax from offset in stack
;
.export ldax0sp, ldaxysp
.importzp c_sp
; Beware: The optimizer knows about the value in Y after return!
ldax0sp:
ldy #1
ldaxysp:
lda (c_sp),y ; get high byte
tax ; and save it
dey ; point to lo byte
lda (c_sp),y ; load low byte
rts