2 ; Ullrich von Bassewitz, 07.04.2000
4 ; CC65 runtime: -= operator
6 ; On entry, the low byte of the address of the variable to decrement is
7 ; in ptr1, the high byte is in Y, and the decrement is in eax.
10 .export lsubeq1, lsubeqa, lsubeq
22 lsubeq: sty ptr1+1 ; Store high byte of address
23 ldy #$00 ; Address low byte
27 adc (ptr1),y ; Subtract byte 0
29 pha ; Save byte 0 of result for later
34 adc (ptr1),y ; Subtract byte 1
50 pla ; Retrieve byte 0 of result