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.

ramvar 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. .PAG 'RAMVAR'
  2. ; COMMON AREA DEFINES
  3. .SKIP
  4. *=$1003
  5. JOBS *=*+15 ; JOB QUE
  6. ;************TRKS *=*+15 ; JOB TRACK TABLE
  7. *=$1021 ; HEADERS AT $1021
  8. HDRS *=*+120 ; JOB HEADER
  9. *=$1099 ;SECTORS/TRACK TABLE
  10. NUMSEC
  11. *=$109F
  12. VERNUM *=*+1 ;VERSION NUMBER
  13. ACTJOB *=*+1 ;CONTROLLER'S ACTIVE JOB
  14. PHASE *=*+2 ;STEPPER BASE PHASE
  15. STPTRK *=*+1 ;NUMBER OF TRACKS/STEP
  16. NZONES *=*+1 ;NUMBER OF DENSITY ZONES
  17. SYNDLY *=*+1 ;SYNC DELAY FOR PLL
  18. WPSW *=*+2 ;WRITE PROTECT CHANGE FLAG
  19. LWPT *=*+2 ;LAST STATE OF WP SWITCH
  20. PBI *=*+1 ;BLOCK IDENTIFIER
  21. CFLG2 *=*+1 ;COMMON FLAG2
  22. NSIDES *=*+1 ;# OF SIDES ON DISKETTE
  23. ;******* EXPAND COMMON VARIABLES HERE *****
  24. ;
  25. *=$10B0 ;START OF TRACK BOUNDARIES
  26. MAXTRK ;MAX TRACK # +1
  27. TRKNUM *=*+8 ;# OF 1ST TRACK IN EACH...
  28. OFFSET *=*+8 ;RECOVERY TRACK OFFSET SEQ.
  29. ;...ZONE, BUT 1ST ZONE. (REVERSE)
  30. ;PERMANENT ADDRESS VARIABLES
  31. ;
  32. *=$10F0
  33. VNMI *=*+2 ;INDIRECT FOR NMI
  34. NMIFLG *=*+1
  35. AUTOFG *=*+1
  36. SECINC *=*+1 ;SECTOR INC FOR SEQ
  37. REVCNT *=*+1 ; ERROR RECOVERY COUNT
  38. .SKIP
  39. BUFS = $1100 ; START OF DATA BUFS
  40. FBUFS = $1D00 ;FORMAT DOWNLOAD IMAGE
  41. .SKI 2
  42. ;*
  43. ;*********************************
  44. ;*
  45. ;* ZERO PAGE VARIABLES
  46. ;*
  47. ;*********************************
  48. ;*
  49. *= $0
  50. USRJMP *=*+2 ; USER JMP TABLE PTR
  51. BMPNT *=*+2 ; BIT MAP POINTER
  52. TEMP *=*+6 ; TEMP WORK SPACE
  53. IP *=*+2 ; INDIRECT PTR VARIABLE
  54. LSNADR *=*+1 ; LISTEN ADDRESS
  55. TLKADR *=*+1 ;TALKER ADDRESS
  56. LSNACT *=*+1 ; ACTIVE LISTENER FLAG
  57. TLKACT *=*+1 ; ACTIVE TALKER FLAG
  58. ADRSED *=*+1 ; ADDRESSED FLAG
  59. PRGTRK *=*+1 ;LAST PROG ACCESSED
  60. DRVNUM *=*+1 ;CURRENT DRIVE #
  61. TRACK *=*+1 ;CURRENT TRACK
  62. SECTOR *=*+1 ;CURRENT SECTOR
  63. LINDX *=*+1 ;LOGICAL INDEX
  64. SA *=*+1 ;SECONDARY ADDRESS
  65. ORGSA *=*+1 ;ORIGINAL SA
  66. DATA *=*+1 ; TEMP DATA BYTE
  67. ;*
  68. ;*
  69. T0 =TEMP
  70. T1 =TEMP+1
  71. T2 =TEMP+2
  72. T3 =TEMP+3
  73. T4 =TEMP+4
  74. R0 *=*+1
  75. R1 *=*+1
  76. R2 *=*+1
  77. R3 *=*+1
  78. R4 *=*+1
  79. RESULT *=*+4
  80. ACCUM *=*+5
  81. DIRBUF *=*+2
  82. ;*
  83. ;*********************
  84. ;*
  85. ;* ZERO PAGE ARRAY
  86. ;*
  87. ;***********************
  88. ;*
  89. BUFTAB *=*+CBPTR+4 ; BUFFER BYTE POINTERS
  90. CB=BUFTAB+CBPTR
  91. BUF0 *=*+MXCHNS
  92. BUF1 *=*+MXCHNS
  93. NBKL
  94. RECL *=*+MXCHNS
  95. NBKH
  96. RECH *=*+MXCHNS
  97. NR *=*+MXCHNS
  98. RS *=*+MXCHNS
  99. SS *=*+MXCHNS
  100. F1PTR *=*+1 ; FILE STREAM 1 POINTER
  101. ;
  102. ;***********************
  103. ; $4300 VARS MOVED TO ZP
  104. ;
  105. RECPTR *=*+1
  106. SSNUM *=*+1
  107. SSIND *=*+1
  108. RELPTR *=*+1
  109. ENTSEC *=*+MXFILS ; SECTOR OF DIRECTORY ENTRY
  110. ENTIND *=*+MXFILS ; INDEX OF DIRECTORY ENTRY
  111. FILDRV *=*+MXFILS ; DEFAULT FLAG, DRIVE #
  112. PATTYP *=*+MXFILS ; PATTERN,REPLACE,CLOSED-FLAGS,TYPE
  113. FILTYP *=*+MXCHNS ; CHANNEL FILE TYPE
  114. CHNRDY *=*+MXCHNS ; CHANNEL STATUS
  115. EOIFLG *=*+1 ; TEMP EOI
  116. JOBNUM *=*+1 ; CURRENT JOB #
  117. LINTAB *=*+MAXSA+1 ; SA:LINDX TABLE
  118. CHNDAT *=*+MXCHNS ; CHANNEL DATA BYTE
  119. LSTCHR *=*+MXCHNS ; CHANNEL LAST CHAR PTR
  120. TYPE *=*+1 ; ACTIVE FILE TYPE
  121. ;
  122. ;*
  123. ;*******************
  124. ;*
  125. ;* RAM VARIABLES IN $4300
  126. ;*
  127. ;*******************
  128. ;*
  129. *=$4300
  130. CMDBUF *=*+CMDLEN+1
  131. CMDNUM *=*+1 ; COMMAND #
  132. STRSIZ *=*+1
  133. ;ZP: RECPTR *=*+1
  134. ;ZP: SSNUM *=*+1
  135. ;ZP: SSIND *=*+1
  136. ;ZP: RELPTR *=*+1
  137. .SKIP
  138. TEMPSA *=*+1 ; TEMPORARY SA
  139. ;ZP: EOIFLG *=*+1 ; TEMP EOI
  140. CMD *=*+1 ; TEMP JOB COMMAND
  141. .SKIP
  142. LSTSEC *=*+1 ;
  143. BUFUSE *=*+2 ; BUFFER ALLOCATION
  144. ;ZP: JOBNUM *=*+1 ; CURRENT JOB #
  145. DSKID *=*+4 ; CURRENT DISK ID'S
  146. MDIRTY *=*+2 ;BAM 0 & 1 DIRTY FLAGS
  147. ENTFND *=*+1 ;DIR-ENTRY FOUND FLAG
  148. DIRLST *=*+1 ;DIR LISTING FLAG
  149. CMDWAT *=*+1 ;COMMAND WAITING FLAG
  150. LINUSE *=*+1 ;LINDX USE WORD
  151. LBUSED *=*+1 ;LAST BUFFER USED
  152. REC *=*+1
  153. TRKSS *=*+1
  154. SECSS *=*+1
  155. .PAGE
  156. ;*
  157. ;********************************
  158. ;*
  159. ;* RAM ARRAY AREA
  160. ;*
  161. ;********************************
  162. ;*
  163. LSTJOB *=*+BFCNT+3 ; LAST JOB
  164. ;ZP: LINTAB *=*+MAXSA+1 ; SA:LINDX TABLE
  165. ;ZP: CHNDAT *=*+MXCHNS ; CHANNEL DATA BYTE
  166. DSEC *=*+MXCHNS ; SECTOR OF DIRECTORY ENTRY
  167. DIND *=*+MXCHNS ; INDEX OF DIRECTORY ENTRY
  168. ERWORD *=*+1 ; ERROR WORD FOR RECOVERY
  169. PRGDRV *=*+1 ; LAST PROGRAM DRIVE
  170. PRGSEC *=*+1 ; LAST PROGRAM SECTOR
  171. WLINDX *=*+1 ; WRITE LINDX
  172. RLINDX *=*+1 ; READ LINDX
  173. NBTEMP *=*+2 ; # BLOCKS TEMP
  174. .SKIP 3
  175. CMDSIZ *=*+1 ; COMMAND STRING SIZE
  176. CHAR *=*+1 ; CHAR UNDER PARSER
  177. LIMIT *=*+1 ; PTR LIMIT IN COMPAR
  178. F1CNT *=*+1 ; FILE STREAM 1 COUNT
  179. F2CNT *=*+1 ; FILE STREAM 2 COUNT
  180. F2PTR *=*+1 ; FILE STREAM 2 POINTER
  181. ; PARSER TABLES
  182. FILTBL *=*+MXFILS+1 ; FILENAME POINTER
  183. ;ZP: FILENT *=*+MXFILS ; DIRECTORY ENTRY
  184. ;ZP: FILDAT *=*+MXFILS ; DRIVE #, PATTERN
  185. FILTRK *=*+MXFILS ; 1ST LINK/TRACK
  186. FILSEC *=*+MXFILS ; /SECTOR
  187. .SKIP
  188. ; CHANNEL TABLES
  189. ;ZP: FILTYP *=*+MXCHNS ; CHANNEL FILE TYPE
  190. ;ZP: CHNRDY *=*+MXCHNS ; CHANNEL STATUS
  191. ;ZP: LSTCHR *=*+MXCHNS ; CHANNEL LAST CHAR PTR
  192. .SKIP
  193. PATFLG *=*+1 ; PATTERN PRESENCE FLAG
  194. IMAGE *=*+1 ; FILE STREAM IMAGE
  195. DRVCNT *=*+1 ; NUMBER OF DRV SEARCHES
  196. DRVFLG *=*+1 ; DRIVE SEARCH FLAG
  197. LSTDRV *=*+1 ; LAST DRIVE W/O ERROR
  198. FOUND *=*+1 ; FOUND FLAG IN DIR SEARCHES
  199. DIRSEC *=*+1 ; DIRECTORY SECTOR
  200. DELSEC *=*+1 ; SECTOR OF 1ST AVAIL ENTRY
  201. DELIND *=*+1 ; INDEX "
  202. LSTBUF *=*+1 ; =0 IF LAST BLOCK
  203. INDEX *=*+1 ; CURRENT INDEX IN BUFFER
  204. FILCNT *=*+1 ; COUNTER, FILE ENTRIES
  205. TYPFLG *=*+1 ; MATCH BY TYPE FLAG
  206. MODE *=*+1 ; ACTIVE FILE MODE (R,W)
  207. ;ZP: TYPE *=*+1 ; ACTIVE FILE TYPE
  208. JOBRTN *=*+1 ;JOB RETURN FLAG
  209. EPTR *=*+1 ;PTR FOR RECOVERY
  210. TOFF *=*+1 ;TOTAL TRACK OFFSET
  211. .SKI
  212. ;*
  213. ;*****************************************
  214. ;*
  215. ;* OUTPUT BUFFERS
  216. ;*
  217. ;********************************************
  218. ;*
  219. *=$4400-36-36
  220. NAMBUF *=*+36 ; DIRECTORY BUFFER
  221. ERRBUF =* ; ERROR MSG BUFFER
  222. .SKIP 2
  223. .END