call.s 332 B

12345678910111213141516171819202122232425262728
  1. .define call
  2. .define callc
  3. .define calle
  4. .define cerror
  5. .extern call
  6. .extern callc
  7. .extern calle
  8. .extern cerror
  9. .extern _errno
  10. .sect .text
  11. .sect .rom
  12. .sect .data
  13. .sect .bss
  14. .sect .text
  15. call: trap #0
  16. bcs cerror
  17. rts
  18. callc:
  19. trap #0
  20. bcs cerror
  21. clr.l d0
  22. rts
  23. calle:
  24. trap #0
  25. cerror:
  26. move.l d0,_errno
  27. move.l #-1,d0
  28. rts