2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 08.10.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: -= operator for ints on the stack
|
|
|
|
;
|
|
|
|
|
|
|
|
.export subeq0sp, subeqysp
|
2001-11-17 11:25:12 +00:00
|
|
|
.importzp sp
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
subeq0sp:
|
|
|
|
ldy #0
|
|
|
|
subeqysp:
|
|
|
|
sec
|
2001-11-17 11:25:12 +00:00
|
|
|
eor #$FF
|
|
|
|
adc (sp),y
|
2000-05-28 13:40:48 +00:00
|
|
|
sta (sp),y
|
2001-11-17 11:25:12 +00:00
|
|
|
pha ; Save low byte
|
2000-05-28 13:40:48 +00:00
|
|
|
iny
|
2001-11-17 11:25:12 +00:00
|
|
|
txa
|
|
|
|
eor #$FF
|
|
|
|
adc (sp),y
|
2000-05-28 13:40:48 +00:00
|
|
|
sta (sp),y
|
|
|
|
tax
|
2001-11-17 11:25:12 +00:00
|
|
|
pla ; Restore low byte
|
2000-05-28 13:40:48 +00:00
|
|
|
rts
|
|
|
|
|