los.s 601 B

1234567891011121314151617181920212223242526272829303132333435
  1. .define Los
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine perfoms the LOS instruction.
  8. ! For detail see rapport IR-81.
  9. Los:
  10. cmp #0
  11. bne 3f
  12. cpx #1
  13. bne 1f ! the size is one
  14. jsr Pop ! get address
  15. jsr Loi1 ! push it on the stack
  16. jmp Push
  17. 1: cpx #2
  18. bne 2f ! the size is two
  19. jsr Pop ! get address
  20. jsr Loi ! push it on the stack
  21. jmp Push
  22. 2: cpx #4
  23. bne 3f ! the size is four
  24. jsr Pop ! get address
  25. jmp Ldi ! push it on the stack
  26. 3: sta ARTH+1 ! the size is greater than four
  27. txa
  28. tay
  29. jsr Pop ! get address
  30. jmp Loil ! push it on the stack