2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 08.10.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: -= operator for longs on the stack
|
2001-11-17 11:25:12 +00:00
|
|
|
;
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
.export lsubeq0sp, lsubeqysp
|
2001-11-17 11:25:12 +00:00
|
|
|
.importzp sp, sreg
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
lsubeq0sp:
|
|
|
|
ldy #0
|
|
|
|
lsubeqysp:
|
|
|
|
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
|
|
|
|
iny
|
|
|
|
lda (sp),y
|
|
|
|
sbc sreg
|
|
|
|
sta (sp),y
|
|
|
|
sta sreg
|
|
|
|
iny
|
|
|
|
lda (sp),y
|
|
|
|
sbc sreg+1
|
|
|
|
sta (sp),y
|
|
|
|
sta sreg+1
|
|
|
|
pla
|
|
|
|
rts
|
|
|
|
|