sar.s 558 B

12345678910111213141516171819202122232425262728
  1. .define Sar
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine performs the SAR instruction.
  8. ! For details see rapport IR-81.
  9. Sar:
  10. jsr Aar ! get object address
  11. ldy NBYTES+1 ! the size of the object (highbyte)
  12. bne 2f
  13. ldy NBYTES ! the size of the object (lowbyte)
  14. cpy #1
  15. bne 1f ! object size is one byte
  16. jmp Sti1 ! put it in array
  17. 1: cpy #2
  18. bne 1f ! object size is two bytes
  19. jmp Sti ! put it in array
  20. 1: cpy #4
  21. bne 2f ! object size is fourbytes
  22. jmp Sdi ! put it in array
  23. 2: jmp Stil ! put it in array