You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tsutil 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. .PAGE 'TSUTIL'
  2. ;*
  3. ;*
  4. ;*********************************
  5. ;*
  6. ;* SCRUB
  7. ;*
  8. ;* WRITE OUT BUFFER IF DIRTY
  9. ;*
  10. ;*********************************
  11. ;*
  12. ;*
  13. SCRUB
  14. JSR GAFLGS
  15. BVC SCR1 ;NOT DIRTY
  16. ;
  17. JSR WRTOUT
  18. JSR WATJOB
  19. SCR1 RTS
  20. ;*
  21. ;*
  22. ;*********************************
  23. ;*
  24. ;* SETLNK
  25. ;*
  26. ;* PUT TRACK,SECTOR INTO BUFFER
  27. ;*
  28. ;*********************************
  29. ;*
  30. ;*
  31. SETLNK JSR SET00
  32. ;
  33. LDA TRACK
  34. STA (DIRBUF),Y
  35. INY
  36. LDA SECTOR
  37. STA (DIRBUF),Y
  38. JMP SDIRTY
  39. ;
  40. ;*
  41. ;*
  42. ;********************************
  43. ;*
  44. ;* GETLNK
  45. ;*
  46. ;* GET LINK FROM BUFFER INTO
  47. ;* TRACK AND SECTOR
  48. ;*
  49. ;********************************
  50. ;*
  51. ;*
  52. GETLNK JSR SET00
  53. ;
  54. LDA (DIRBUF),Y
  55. STA TRACK
  56. INY
  57. LDA (DIRBUF),Y
  58. STA SECTOR
  59. RTS
  60. ;*
  61. ;*
  62. ;********************************
  63. ;*
  64. ;* NULLNK
  65. ;*
  66. ;* SET TRACK LINK=0 & SECTOR
  67. ;* LINK=LAST NON-ZERO CHAR.
  68. ;*
  69. ;*********************************
  70. ;*
  71. ;*
  72. NULLNK
  73. JSR SET00
  74. LDA #0
  75. STA (DIRBUF)Y
  76. INY
  77. LDX LINDX
  78. LDA NR,X
  79. TAX
  80. DEX
  81. TXA
  82. STA (DIRBUF)Y
  83. RTS
  84. ;
  85. ;*
  86. ;*
  87. ;*******************************
  88. ;*
  89. ;* SET00
  90. ;*
  91. ;* SETUP UP POINTER TO BUFFER
  92. ;*
  93. ;*******************************
  94. ;*
  95. ;*
  96. SET00 JSR GETACT
  97. ASL A
  98. TAX
  99. LDA BUFTAB+1,X
  100. STA DIRBUF+1
  101. LDA #0
  102. STA DIRBUF
  103. LDY #0
  104. RTS
  105. ;
  106. ;*
  107. ;*
  108. ;*******************************
  109. ;*
  110. ;* GETHDR
  111. ;*
  112. ;* READ TRACK,SETOR FROM HEADER
  113. ;*
  114. ;*******************************
  115. ;*
  116. ;*
  117. CURBLK JSR FNDRCH
  118. GETHDR JSR GETACT
  119. STA JOBNUM
  120. ASL A
  121. TAY
  122. LDA HDRS,Y ;4/12**************
  123. STA TRACK
  124. LDA HDRS+1,Y ;4/12**************
  125. STA SECTOR
  126. RTS
  127. ;
  128. ;*
  129. ;*
  130. ;******************************
  131. ;*
  132. ;* WRTAB,RDAB WRTOUT,RDIN
  133. ;* WRTSS,RDSS
  134. ;*
  135. ;******************************
  136. ;*
  137. ;*
  138. WRTAB LDA #WRITE
  139. STA CMD
  140. BNE SJ10
  141. ;
  142. RDAB LDA #READ
  143. STA CMD
  144. BNE SJ10
  145. ;
  146. WRTOUT LDA #WRITE
  147. STA CMD
  148. BNE SJ20
  149. ;
  150. RDIN LDA #READ
  151. STA CMD
  152. BNE SJ20
  153. ;
  154. WRTSS LDA #WRITE
  155. STA CMD
  156. BNE RDS5
  157. ;
  158. RDSS LDA #READ
  159. RDS5 STA CMD
  160. LDX LINDX
  161. LDA SS,X
  162. TAX
  163. BPL SJ30 ;WAS...BNE SJ30
  164. ;
  165. SJ10 JSR SETHDR
  166. JSR GETACT
  167. TAX
  168. LDA DRVNUM
  169. STA LSTJOB,X
  170. SJ20 JSR CDIRTY
  171. JSR GETACT
  172. TAX
  173. SJ30 JMP SETLJB
  174. ;*
  175. ;*
  176. ;*
  177. ;***************************
  178. ;*
  179. ;* RDLNK
  180. ;*
  181. ;***************************
  182. ;*
  183. ;*
  184. RDLNK LDA #0
  185. JSR SETPNT
  186. JSR GETBYT
  187. STA TRACK
  188. JSR GETBYT
  189. STA SECTOR
  190. RTS
  191. ;
  192. .END