lar.s 594 B

123456789101112131415161718192021222324252627282930
  1. .define Lar
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine performs the LAR instruction.
  8. ! For details see rapport IR-81.
  9. Lar:
  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. jsr Loi1 ! get object
  17. jmp Push ! push on the stack
  18. 1: cpy #2
  19. bne 1f ! object size is a word
  20. jsr Loi ! get word
  21. jmp Push ! push on the stack
  22. 1: cpy #4
  23. bne 2f ! object size is four bytes
  24. jmp Ldi ! get object
  25. 2: jmp Loil ! get object