README 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ! Two system calls (gtty and stty) in the m68000 tail_mon library
  2. ! were not really system calls but they used _ioctl. The m68020 machine
  3. ! the table was tested on used real system calls, and we'll use
  4. ! them here.
  5. ! There were also three calls (ftime, lock and dup2) that were in the
  6. ! m68000 library, but were not included in the list of system calls
  7. ! for the m68020 that was given to me. We'll include them anyway.
  8. ! The original gtty and stty files are included here.
  9. ! Note however that the 68000 machine (the Mantra) needs the parameters
  10. ! to system calls in registers, while the m68020 machine this table was
  11. ! tested on wanted the parameters on the stack
  12. !
  13. ! Also read the comments in the signal.s file!
  14. ! ------------------- dup2.s
  15. ! .define _dup2
  16. ! .extern _dup2
  17. ! .sect .text
  18. ! .sect .rom
  19. ! .sect .data
  20. ! .sect .bss
  21. ! .sect .text
  22. ! _dup2: move.w #0x29,d0
  23. ! move.l (4,sp),a0
  24. ! move.l (8,sp),d1
  25. ! add.l #0x40,a0
  26. ! jmp (call)
  27. !
  28. !
  29. ! ! ------------------- gtty.s
  30. ! .define _gtty
  31. ! .extern _gtty
  32. ! .sect .text
  33. ! .sect .rom
  34. ! .sect .data
  35. ! .sect .bss
  36. ! .sect .text
  37. ! _gtty:
  38. ! tst.b (-40,sp)
  39. ! link a6,#-0
  40. ! move.l (12,a6),-(sp)
  41. ! move.l #29704,-(sp)
  42. ! move.l (8,a6),-(sp)
  43. ! jsr (_ioctl)
  44. ! add.l #12,sp
  45. ! unlk a6
  46. ! rts
  47. !
  48. !
  49. ! ! ------------------- stty.s
  50. ! .define _stty
  51. ! .extern _stty
  52. ! .sect .text
  53. ! .sect .rom
  54. ! .sect .data
  55. ! .sect .bss
  56. ! .sect .text
  57. ! _stty:
  58. ! tst.b (-40,sp)
  59. ! link a6,#-0
  60. ! move.l (12,a6),-(sp)
  61. ! move.l #29705,-(sp)
  62. ! move.l (8,a6),-(sp)
  63. ! jsr (_ioctl)
  64. ! add.l #12,sp
  65. ! unlk a6
  66. ! rts