-
Notifications
You must be signed in to change notification settings - Fork 82
/
declare
274 lines (274 loc) · 7.29 KB
/
declare
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
.PAG 'DECLARE'
;VIRTUAL REGS FOR MACHINE LANGUAGE MONITOR
*=$0000
PCH *=*+1
PCL *=*+1
FLGS *=*+1
ACC *=*+1
XR *=*+1
YR *=*+1
SP *=*+1
INVH *=*+1 ;USER MODIFIABLE IRQ
INVL *=*+1
* =$90
STATUS *=*+1 ;I/O OPERATION STATUS BYTE
; CRFAC *=*+2 ;CORRECTION FACTOR (UNUSED)
STKEY *=*+1 ;STOP KEY FLAG
SVXT *=*+1 ;TEMPORARY
VERCK *=*+1 ;LOAD OR VERIFY FLAG
C3P0 *=*+1 ;IEEE BUFFERED CHAR FLAG
BSOUR *=*+1 ;CHAR BUFFER FOR IEEE
SYNO *=*+1 ;CASSETTE SYNC #
XSAV *=*+1 ;TEMP FOR BASIN
LDTND *=*+1 ;INDEX TO LOGICAL FILE
DFLTN *=*+1 ;DEFAULT INPUT DEVICE #
DFLTO *=*+1 ;DEFAULT OUTPUT DEVICE #
PRTY *=*+1 ;CASSETTE PARITY
DPSW *=*+1 ;CASSETTE DIPOLE SWITCH
MSGFLG *=*+1 ;OS MESSAGE FLAG
PTR1 ;CASSETTE ERROR PASS1
T1 *=*+1 ;TEMPORARY 1
TMPC
PTR2 ;CASSETTE ERROR PASS2
T2 *=*+1 ;TEMPORARY 2
TIME *=*+3 ;24 HOUR CLOCK IN 1/60TH SECONDS
R2D2 ;SERIAL BUS USAGE
PCNTR *=*+1 ;CASSETTE STUFF
; PTCH *=*+1 (UNUSED)
BSOUR1 ;TEMP USED BY SERIAL ROUTINE
FIRT *=*+1
COUNT ;TEMP USED BY SERIAL ROUTINE
CNTDN *=*+1 ;CASSETTE SYNC COUNTDOWN
BUFPT *=*+1 ;CASSETTE BUFFER POINTER
INBIT ;RS-232 RCVR INPUT BIT STORAGE
SHCNL *=*+1 ;CASSETTE SHORT COUNT
BITCI ;RS-232 RCVR BIT COUNT IN
RER *=*+1 ;CASSETTE READ ERROR
RINONE ;RS-232 RCVR FLAG FOR START BIT CHECK
REZ *=*+1 ;CASSETE READING ZEROES
RIDATA ;RS-232 RCVR BYTE BUFFER
RDFLG *=*+1 ;CASSETTE READ MODE
RIPRTY ;RS-232 RCVR PARITY STORAGE
SHCNH *=*+1 ;CASSETTE SHORT CNT
SAL *=*+1
SAH *=*+1
EAL *=*+1
EAH *=*+1
CMP0 *=*+1
TEMP *=*+1
TAPE1 *=*+2 ;ADDRESS OF TAPE BUFFER #1Y.
BITTS ;RS-232 TRNS BIT COUNT
SNSW1 *=*+1
NXTBIT ;RS-232 TRNS NEXT BIT TO BE SENT
DIFF *=*+1
RODATA ;RS-232 TRNS BYTE BUFFER
PRP *=*+1
FNLEN *=*+1 ;LENGTH CURRENT FILE N STR
LA *=*+1 ;CURRENT FILE LOGICAL ADDR
SA *=*+1 ;CURRENT FILE 2ND ADDR
FA *=*+1 ;CURRENT FILE PRIMARY ADDR
FNADR *=*+2 ;ADDR CURRENT FILE NAME STR
ROPRTY ;RS-232 TRNS PARITY BUFFER
OCHAR *=*+1
FSBLK *=*+1 ;CASSETTE READ BLOCK COUNT
MYCH *=*+1
CAS1 *=*+1 ;CASSETTE MANUAL/CONTROLLED SWITCH
TMP0
STAL *=*+1
STAH *=*+1
MEMUSS ;CASSETTE LOAD TEMPS (2 BYTES)
TMP2 *=*+2
;
;VARIABLES FOR SCREEN EDITOR
;
LSTX *=*+1 ;KEY SCAN INDEX
; SFST *=*+1 ;KEYBOARD SHIFT FLAG (UNUSED)
NDX *=*+1 ;INDEX TO KEYBOARD Q
RVS *=*+1 ;RVS FIELD ON FLAG
INDX *=*+1
LSXP *=*+1 ;X POS AT START
LSTP *=*+1
SFDX *=*+1 ;SHIFT MODE ON PRINT
BLNSW *=*+1 ;CURSOR BLINK ENAB
BLNCT *=*+1 ;COUNT TO TOGGLE CUR
GDBLN *=*+1 ;CHAR BEFORE CURSOR
BLNON *=*+1 ;ON/OFF BLINK FLAG
CRSW *=*+1 ;INPUT VS GET FLAG
PNT *=*+2 ;POINTER TO ROW
; POINT *=*+1 (UNUSED)
PNTR *=*+1 ;POINTER TO COLUMN
QTSW *=*+1 ;QUOTE SWITCH
LNMX *=*+1 ;40/80 MAX POSITON
TBLX *=*+1
DATA *=*+1
INSRT *=*+1 ;INSERT MODE FLAG
LDTB1 *=*+25 ;40/80 LINE FLAGS
LINTMP *=*+1 ;TEMPORARY FOR LINE INDEX
USER *=*+2 ;SCREEN EDITOR COLOR IP
KEYTAB *=*+2 ;KEYSCAN TABLE INDIRECT
;RS-232 Z-PAGE
RIBUF *=*+2 ;RS-232 INPUT BUFFER POINTER
ROBUF *=*+2 ;RS-232 OUTPUT BUFFER POINTER
FREKZP *=*+4 ;FREE KERNAL ZERO PAGE 9/24/80
BASZPT *=*+1 ;LOCATION ($00FF) USED BY BASIC
.SKI 3
*=$100
BAD *=*+1
*=$200
BUF *=*+89 ;BASIC/MONITOR BUFFER
; TABLES FOR OPEN FILES
;
LAT *=*+10 ;LOGICAL FILE NUMBERS
FAT *=*+10 ;PRIMARY DEVICE NUMBERS
SAT *=*+10 ;SECONDARY ADDRESSES
.SKI 2
; SYSTEM STORAGE
;
KEYD *=*+10 ;IRQ KEYBOARD BUFFER
MEMSTR *=*+2 ;START OF MEMORY
MEMSIZ *=*+2 ;TOP OF MEMORY
TIMOUT *=*+1 ;IEEE TIMEOUT FLAG
.SKI 2
; SCREEN EDITOR STORAGE
;
COLOR *=*+1 ;ACTIV COLOR NYBBLE
GDCOL *=*+1 ;ORIGINAL COLOR BEFORE CURSOR
HIBASE *=*+1 ;BASE LOCATION OF SCREEN (TOP)
XMAX *=*+1
RPTFLG *=*+1 ;KEY REPEAT FLAG
KOUNT *=*+1
DELAY *=*+1
SHFLAG *=*+1 ;SHIFT FLAG BYTE
LSTSHF *=*+1 ;LAST SHIFT PATTERN
KEYLOG *=*+2 ;INDIRECT FOR KEYBOARD TABLE SETUP
MODE *=*+1 ;0-PET MODE, 1-CATTACANNA
AUTODN *=*+1 ;AUTO SCROLL DOWN FLAG(=0 ON,<>0 OFF)
.SKI 3
; RS-232 STORAGE
;
M51CTR *=*+1 ;6551 CONTROL REGISTER
M51CDR *=*+1 ;6551 COMMAND REGISTER
M51AJB *=*+2 ;NON STANDARD (BITTIME/2-100)
RSSTAT *=*+1 ; RS-232 STATUS REGISTER
BITNUM *=*+1 ;NUMBER OF BITS TO SEND (FAST RESPONSE)
BAUDOF *=*+2 ;BAUD RATE FULL BIT TIME (CREATED BY OPEN)
;
; RECIEVER STORAGE
;
; INBIT *=*+1 ;INPUT BIT STORAGE
; BITCI *=*+1 ;BIT COUNT IN
; RINONE *=*+1 ;FLAG FOR START BIT CHECK
; RIDATA *=*+1 ;BYTE IN BUFFER
; RIPRTY *=*+1 ;BYTE IN PARITY STORAGE
RIDBE *=*+1 ;INPUT BUFFER INDEX TO END
RIDBS *=*+1 ;INPUT BUFFER POINTER TO START
;
; TRANSMITTER STORAGE
;
; BITTS *=*+1 ;# OF BITS TO BE SENT
; NXTBIT *=*+1 ;NEXT BIT TO BE SENT
; ROPRTY *=*+1 ;PARITY OF BYTE SENT
; RODATA *=*+1 ;BYTE BUFFER OUT
RODBS *=*+1 ;OUTPUT BUFFER INDEX TO START
RODBE *=*+1 ;OUTPUT BUFFER INDEX TO END
;
IRQTMP *=*+2 ;HOLDS IRQ DURING TAPE OPS
;
.SKI 3
*=$0300 ;REM PROGRAM INDIRECTS(10)
*=$0300+20 ;REM KERNAL/OS INDIRECTS(20)
CINV *=*+2 ;IRQ RAM VECTOR
CBINV *=*+2 ;BRK INSTR RAM VECTOR
NMINV *=*+2 ;NMI RAM VECTOR
IOPEN *=*+2 ;INDIRECTS FOR CODE
ICLOSE *=*+2 ; CONFORMS TO KERNAL SPEC 8/19/80
ICHKIN *=*+2
ICKOUT *=*+2
ICLRCH *=*+2
IBASIN *=*+2
IBSOUT *=*+2
ISTOP *=*+2
IGETIN *=*+2
ICLALL *=*+2
USRCMD *=*+2
ILOAD *=*+2
ISAVE *=*+2 ;SAVESP
.SKI 3
*=$0300+60
TBUFFR *=*+192 ;CASSETTE DATA BUFFER
.SKI 3
* =$400 ;RAMLOC
.SKI 3
*=$1000
VICSCN *=*+512 ;VIC SCREEN
.SKI 3
*=$9000
VICREG *=*+16 ;VIC REGISTERS
.PAG 'DECLARE'
; I/O DEVICES
;
*=$9110 ; DEVICE1 6522 (PAGE2 NMI)
D1ORB *=*+1
D1ORAH *=*+1
D1DDRB *=*+1
D1DDRA *=*+1
D1T1L *=*+1
D1T1H *=*+1
D1T1LL *=*+1
D1T1LH *=*+1
D1T2L *=*+1
D1T2H *=*+1
D1SR *=*+1
D1ACR *=*+1
D1PCR *=*+1
D1IFR *=*+1
D1IER *=*+1
D1ORA *=*+1
.SKI 3
*=$9120 ; DEVICE2 6522 (PAGE3 IRQ)
COLM ;KEYBOARD MATRIX
D2ORB *=*+1
ROWS ;KEYBOARD MATRIX
D2ORAH *=*+1
D2DDRB *=*+1
D2DDRA *=*+1
D2T1L *=*+1
D2T1H *=*+1
D2T1LL *=*+1
D2T1LH *=*+1
D2T2L *=*+1
D2T2H *=*+1
D2SR *=*+1
D2ACR *=*+1
D2PCR *=*+1
D2IFR *=*+1
D2IER *=*+1
D2ORA *=*+1
.SKI 3
*=$9400
VICCOL *=*+512 ;VIC COLOR NYBBLES
.PAG 'DECLARE'
;TAPE BLOCK TYPES
;
EOT =5 ;END OF TAPE
BLF =1 ;BASIC LOAD FILE
BDF =2 ;BASIC DATA FILE
PLF =3 ;FIXED PROGRAM TYPE
BDFH =4 ;BASIC DATA FILE HEADER
BUFSZ =192 ;BUFFER SIZE
;
;SCREEN EDITOR CONSTANTS
;
LLEN =22 ;SINGLE LINE 22 COLUMNS
LLEN2 =44 ;DOUBLE LINE = 44 COLUMNS
NLINES =23 ;23 ROWS ON SCREEN
WHITE =$01 ;WHITE SCREEN COLOR
BLUE =$06 ;BLUE CHAR COLOR
CR =$D ;CARRIAGE RETURN
.END
;RSR 8/3/80 ADD & CHANGE Z-PAGE
;RSR 8/11/80 ADD MEMUSS & PLF TYPE
;RSR 8/22/80 ADD RS-232 ROUTINES
;RSR 8/24/80 ADD OPEN VARIABLES
;RSR 8/29/80 ADD BAUD SPACE MOVE RS232 TO Z-PAGE
;RSR 9/2/80 ADD SCREEN EDITOR VARS&CON