-
Notifications
You must be signed in to change notification settings - Fork 85
/
ramvar
215 lines (215 loc) · 6.38 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
.PAG 'RAMVAR'
;
; COMMON AREA DEFINES
;
*=$1003
JOBS *=*+15 ; JOB QUE
*=$1021
HDRS *=*+120 ; JOB HEADERS
*=$1099
NUMSEC *=*+4 ; # SECTORS/TRACK TABLE
GAP1 *=*+1 ; GAP1 LENGTH - 1
GAP2 *=*+1 ; GAP2 LENGTH + 2
VERNUM *=*+1 ; VERSION NUMBER
ACTJOB *=*+1 ; CONTROLLER'S ACTIVE JOB
PHASE *=*+2 ; STEPPER BASE PHASE
STPTRK *=*+1 ; NUMBER OF STEPS/TRACK
NZONES *=*+1 ; NUMBER OF DENSITY ZONES
SYNDLY *=*+1 ; DELAY AFTER SYNC
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
TLGAP *=*+1 ; MAX TAIL GAP
;
;******* EXPAND COMMON VARIABLES HERE *****
;
*=$10B0 ; START OF TRACK BOUNDARIES
TRKNUM *=*+8 ; 1ST TRACK IN EACH ZONE
*=$10C0
BAMTRK *=*+5 ; BAM TRACK TABLE
BAMSEC *=*+5 ; BAM SECTOR TABLE
DIRTRK *=*+1 ; DIRECTORY TRACK
BAMSIZ *=*+1 ; BAM SIZE
MAPOFF *=*+1 ; MAP OFFSET
LOTRK *=*+1 ; LOW TRACK OF BAM
DSKNAM *=*+1 ; DISK NAME OFFSET
;
; VARIABLES FOR BIG RELATIVE FILES
;
*=$10CF
GRPNUM *=*+1 ; GROUP NUMBER
SSSGRP *=*+MXCHNS ; RESIDENT GROUP
SSSSEC *=*+MXCHNS ; SUPER SIDE SECTOR ADDRESS
SSSTRK *=*+MXCHNS ; SUPER SIDE SECTOR TRACK ADDR
;
; ADDED VARIABLES FOR NEW CONTROLLER
;
*=$10E9
MAXTRK *=*+1 ; MAX TRACK+1 ON DISK
DOS *=*+1 ; 4040 = 0, 8050/8250 = 1
STEPS *=*+2 ; # OF STEPS TO SEEKED TRACK
MTRACK *=*+1 ; MAX TRACK PER SIDE
HDSETL *=*+1 ; HEAD SETTLING TIME
SYNCS *=*+1 ; # OF FALSE SYNCS ALLOWED
;
; PERMANENT ADDRESS VARIABLES
;
*=$10F0
VNMI *=*+2 ; INDIRECT FOR NMI
NMIFLG *=*+1
AUTOFG *=*+1
SECINC *=*+1 ; SECTOR ALLOCATION
REVCNT *=*+1 ; ERROR RECOVERY COUNT
VECIDL *=*+2 ; VECTOR TO IDLE LOOP
BUFS = $1100 ; START OF DATA BUFFER
FMTTRK = $2070 ; FORMAT STARTING TRACK
FMTDAT = $2073 ; FORMATTING DATA
MAXGAP = $2075 ; MAX TAIL GAP
.PAGE
;
; ZERO PAGE VARIABLES
;
*=$0000
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 SECONDARY ADDRESS
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
RECPTR *=*+1 ; RECORD POINTER
SSNUM *=*+1 ; SIDE SECTOR NUMBER
SSIND *=*+1 ; INDEX INTO SIDE SECTOR
RELPTR *=*+1 ; POINTER INTO RECORD
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
.PAGE
;
; RAM VARIABLES IN $4300
;
*=$4300
CMDBUF *=*+CMDLEN+1
CMDNUM *=*+1 ; COMMAND #
STRSIZ *=*+1
TEMPSA *=*+1 ; TEMPORARY SA
CMD *=*+1 ; TEMP JOB COMMAND
LSTSEC *=*+1
BUFUSE *=*+2 ; BUFFER ALLOCATION
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 ; RECORD LENGTH
TRKSS *=*+1 ; SIDE SECTOR TRACK
SECSS *=*+1 ; SIDE SECTOR SECTOR
.PAGE
;
; RAM ARRAY AREA
;
LSTJOB *=*+BFCNT+3 ; LAST JOB
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
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
FILTRK *=*+MXFILS ; 1ST LINK/TRACK
FILSEC *=*+MXFILS ; /SECTOR
;
; CHANNEL TABLES
;
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)
JOBRTN *=*+1 ; JOB RETURN FLAG
EPTR *=*+1 ; POINTER FOR RECOVERY
TOFF *=*+1 ; TOTAL TRACK OFFSET
NDBL *=*+2
NDBH *=*+2
NODRV *=*+2
R5 *=*+1 ; CURRENT GROUP FOR BIG REL
SWITCH *=*+1 ; BIG REL SWITCH
.PAGE
;
; OUTPUT BUFFERS
;
*=$4400-36-36
NAMBUF *=*+36 ; DIRECTORY BUFFER
ERRBUF =* ; ERROR MESSAGE BUFFER
.END