1
0
mirror of https://github.com/cc65/cc65.git synced 2026-03-15 05:17:28 +00:00
Files
cc65/libsrc/runtime/subeqsp.s
2025-06-04 06:37:59 +00:00

27 lines
507 B
ArmAsm

;
; Ullrich von Bassewitz, 08.10.1998
;
; CC65 runtime: -= operator for ints on the stack
;
.export subeq0sp, subeqysp
.importzp c_sp
subeq0sp:
ldy #0
subeqysp:
sec
eor #$FF
adc (c_sp),y
sta (c_sp),y
pha ; Save low byte
iny
txa
eor #$FF
adc (c_sp),y
sta (c_sp),y
tax
pla ; Restore low byte
rts