zri.s 387 B

1234567891011121314151617181920212223
  1. .define Zrl, Zro
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! The subroutine Zrl makes a local zero which offset is to big.
  8. ! The offset of the local is in registerpair AX.
  9. ! The subroutine Zro is used if the address is already in zeropage.
  10. Zrl:
  11. jsr Locaddr ! get address of local
  12. Zro:
  13. lda #0
  14. tay
  15. sta (ADDR),y ! lowbyte = 0
  16. iny
  17. sta (ADDR),y ! highbyte = 0
  18. rts