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