sbi4.s 351 B

12345678910111213141516171819202122
  1. .define Sbi4
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine subtracts two fourbyte signed integers.
  8. Sbi4:
  9. jsr Addsub ! initiate addresses
  10. sec
  11. 1: lda (ADDR+2),y ! get lowbyte+y first operand
  12. sbc (ADDR),y ! subtract lowbyte+y second operand
  13. sta (ADDR+2),y ! put on stack lowbyte+y result
  14. iny
  15. inx
  16. bne 1b
  17. rts