20io.mac 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ; 20IO: simple 20 Support routines
  2. TITLE 20IO
  3. SEARCH MONSYM
  4. RADIX ^D10
  5. ENTRY GETC20,PUTC20,INIT20,QUIT20,TIMC20,ERR20,PUTI20
  6. ST=15
  7. INIT20: HRROI 1,[Asciz/
  8. Call on Init
  9. /]
  10. PSOUT
  11. JFCL
  12. POPJ ST,0
  13. GETC20: PBIN
  14. JFCL
  15. POPJ ST,0
  16. PUTC20: PBOUT
  17. JFCL
  18. CAIE 1,10 ; Is it EOL
  19. POPJ ST,0 ; No
  20. MOVEI 1,13
  21. PBOUT
  22. JFCL
  23. MOVEI 1,10
  24. POPJ ST,0
  25. PUTI20: MOVEM 1,JUNK
  26. MOVE 2,1
  27. MOVEI 1,^O101
  28. MOVEI 3,^D10
  29. NOUT
  30. JFCL
  31. MOVE 1,JUNK
  32. POPJ ST,0
  33. ERR20: MOVEM 1,Junk
  34. HRROI 1,[ASCIZ/
  35. *** ERR20: /]
  36. PSOUT
  37. MOVE 1,Junk
  38. PUSHJ ST,PUTI20
  39. MOVEI 1,10
  40. PBOUT
  41. HALTF
  42. HALTF
  43. POPJ ST,0
  44. Junk: Block 1
  45. QUIT20: Hrroi 1,[ASCIZ/
  46. Quitting
  47. /]
  48. PSOUT
  49. HALTF
  50. TIMC20: MOVEI 1,-5
  51. RUNTM
  52. JFCL
  53. MOVEM 1,NTIME
  54. ; Hrroi 1,[ASCIZ/
  55. ;Ctime: /]
  56. ; PSOUT
  57. ; MOVE 1,NTIME
  58. ; PUSHJ ST,PutI20
  59. ; Hrroi 1,[ASCIZ/ ms, /]
  60. ; PSOUT
  61. MOVE 1,NTIME
  62. ; SUB 1,OTIME
  63. ; PUSHJ ST,PutI20
  64. ; Hrroi 1,[ASCIZ/ ms
  65. ; /]
  66. ; PSOUT
  67. MOVE 1,NTIME
  68. MOVEM 1,OTIME
  69. POPJ ST,0
  70. Otime: 0
  71. Ntime: 0
  72. END