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
11 .importzp sreg, ptr1, tmp1
22 lsubeq: sty ptr1+1 ; Store high byte of address
23 ldy #$00 ; Address low byte
27 lda (ptr1),y ; Load byte 0
30 pha ; Save byte 0 of result for later
34 lda (ptr1),y ; Load byte 1
51 pla ; Retrieve byte 0 of result