1 ;-------------------------------------------------------------------------
3 ; by Freddy Offenga, Christian Groessler, and Christian Krueger
6 ; - Atari 400/800 OS rev.B source code, Atari 1979
7 ; - Atari OS manual - XL addendum
8 ; - Atari XL/XE rev.2 source code, Atari 1984
9 ; - Mapping the Atari - revised edition, Ian Chadwick 1985
11 ; ##old## old OS rev.B label - moved or deleted
12 ; ##1200xl## new label introduced in 1200XL OS (rev.10/11)
13 ; ##rev2## new label introduced in XL/XE OS rev.2
14 ;-------------------------------------------------------------------------
16 ;-------------------------------------------------------------------------
17 ; Configuration Equates
18 ;-------------------------------------------------------------------------
20 MAXDEV = 33 ;offset to last possible entry of HATABS
21 IOCBSZ = 16 ;length of IOCB
23 SEIOCB = 0*IOCBSZ ;##rev2## screen editor IOCB index
24 MAXIOC = 8*IOCBSZ ;first invalid IOCB index
26 DSCTSZ = 128 ;##rev2## disk sector size
29 REDGE = 39 ;right edge
31 INIML = $0700 ;##rev2## initial MEMLO
33 ICSORG = $CC00 ;##rev2## international character set origin
34 DCSORG = $E000 ;##rev2## domestic character set origin
36 ; IOCB Command Code Equates
39 GETREC = $05 ;get record
40 GETCHR = $07 ;get character(s)
41 PUTREC = $09 ;put record
42 PUTCHR = $0B ;put character(s)
47 ; DOS IOCB command codes
49 RENAME = $20 ;rename disk file
50 DELETE = $21 ;delete disk file
51 LOCKFL = $23 ;lock file (set to read-only)
52 UNLOCK = $24 ;unlock file
53 POINT = $25 ;point sector
54 NOTE = $26 ;note sector
55 GETFL = $27 ;get file length
56 CHDIR_MYDOS = $29 ;change directory (MyDOS)
57 MKDIR = $2A ;make directory (MyDOS/SpartaDOS)
58 RMDIR = $2B ;remove directory (SpartaDOS)
59 CHDIR_SPDOS = $2C ;change directory (SpartaDOS)
62 GETCWD = $30 ;get current directory (MyDOS/SpartaDOS)
64 ; Special Entry Command Equates
66 ; Command line table, Index values for (DOSVEC),Y -- COMTAB
67 ; Compatible with OS/A+, DOS XL and SpartaDOS
69 COMTAB = 0 ;DOS entry jump vector
70 ZCRNAME = 3 ;file name crunch routine jump vector
71 BUFOFF = 10 ;next parameter buffer offset
72 COMFNAM = 33 ;destination buffer for crunch routine
73 LBUF = 63 ;command line input buffer
75 ; Screen IOCB Commands
77 DRAWLN = $11 ;draw line
78 FILLIN = $12 ;draw line with right fill
80 ; ICAX1 Auxiliary Byte 1 Equates
82 APPEND = $01 ;open write append (D:)
83 DIRECT = $02 ;open for directory access (D:)
84 OPNIN = $04 ;open for input (all devices)
85 OPNOT = $08 ;open for output (all devices)
86 MXDMOD = $10 ;open for mixed mode (E:, S:)
87 INSCLR = $20 ;open for input without clearing screen
91 CASSET = 'C' ;cassette
93 SCREDT = 'E' ;screen editor
96 DISPLY = 'S' ;screen display
98 ; SIO Command Code Equates
100 SIO_FORMAT = $21 ;format disk (default density)
101 SIO_FORMATS = $22 ;1050: format medium density
102 SIO_CONFIG = $44 ;configure drive
103 SIO_CONFIGSF = $4B ;slow/fast configure drive??
104 SIO_WRITE = $50 ;write sector
105 SIO_READ = $52 ;read sector
106 SIO_STAT = $53 ;get status information
107 SIO_VERIFY = $56 ;verify sector
108 SIO_WRITEV = $57 ;write sector with verify
110 ; Character and Key Code Equates
112 CLS = $7D ;##rev2## clear screen
113 EOL = $9B ;end of line (RETURN)
115 HELP = $11 ;##1200xl## key code for HELP
116 CNTLF1 = $83 ;##1200xl## key code for CTRL-F1
117 CNTLF2 = $84 ;##1200xl## key code for CTRL-F2
118 CNTLF3 = $93 ;##1200xl## key code for CTRL-F3
119 CNTLF4 = $94 ;##1200xl## key code for CTRL-F4
120 CNTL1 = $9F ;##1200xl## key code for CTRL-1
122 ; Status Code Equates
124 SUCCES = 1 ;($01) succesful operation
126 BRKABT = 128 ;($80) BREAK key abort
127 PRVOPN = 129 ;($81) IOCB already open error
128 NONDEV = 130 ;($82) nonexistent device error
129 WRONLY = 131 ;($83) IOCB opened for write only error
130 NVALID = 132 ;($84) invalid command error
131 NOTOPN = 133 ;($85) device/file not open error
132 BADIOC = 134 ;($86) invalid IOCB index error
133 RDONLY = 135 ;($87) IOCB opened for read only error
134 EOFERR = 136 ;($88) end of file error
135 TRNRCD = 137 ;($89) truncated record error
136 TIMOUT = 138 ;($8A) peripheral device timeout error
137 DNACK = 139 ;($8B) device does not acknowledge command
138 FRMERR = 140 ;($8C) serial bus framing error
139 CRSROR = 141 ;($8D) cursor overrange error
140 OVRRUN = 142 ;($8E) serial bus data overrun error
141 CHKERR = 143 ;($8F) serial bus checksum error
142 DERROR = 144 ;($90) device done (operation incomplete)
143 BADMOD = 145 ;($91) bad screen mode number error
144 FNCNOT = 146 ;($92) function not implemented in handler
145 SCRMEM = 147 ;($93) insufficient memory for screen mode
147 DSKFMT = 148 ;($94) SpartaDOS: unrecognized disk format
148 INCVER = 149 ;($95) SpartaDOS: disk was made with incompat. version
149 DIRNFD = 150 ;($96) SpartaDOS: directory not found
150 FEXIST = 151 ;($97) SpartaDOS: file exists
151 NOTBIN = 152 ;($98) SpartaDOS: file not binary
152 LSYMND = 154 ;($9A) SDX: loader symbol not defined
153 BADPRM = 156 ;($9C) SDX: bad parameter
154 OUTOFM = 158 ;($9E) SDX: out of memory
155 INVDEV = 160 ;($A0) invalid device number
156 TMOF = 161 ;($A1) too many open files
157 DSKFLL = 162 ;($A2) disk full
158 FATLIO = 163 ;($A3) fatal I/O error
159 FNMSMT = 164 ;($A4) internal file number mismatch
160 INVFNM = 165 ;($A5) invalid file name
161 PDLERR = 166 ;($A6) point data length error
162 EPERM = 167 ;($A7) permission denied
163 DINVCM = 168 ;($A8) command invalid for disk
164 DIRFLL = 169 ;($A9) directory full
165 FNTFND = 170 ;($AA) file not found
166 PNTINV = 171 ;($AB) point invalid
167 BADDSK = 173 ;($AD) bad disk
168 INCFMT = 176 ;($B0) DOS 3: incompatible file system
170 ; DCB Device Bus Equates
172 DISKID = $31 ;##rev2## disk bus ID
173 PDEVN = $40 ;##rev2## printer bus ID
174 CASET = $60 ;##rev2## cassette bus ID
176 ; Bus Command Equates
178 FOMAT = '!' ;##rev2## format command
179 PUTSEC = 'P' ;##rev2## put sector command
180 READ = 'R' ;##rev2## read command
181 STATC = 'S' ;##rev2## status command
182 WRITE = 'W' ;##rev2## write command
184 ; Command Auxiliary Byte Equates
186 DOUBLE = 'D' ;##rev2## print 20 characters double width
187 NORMAL = 'N' ;##rev2## print 40 characters normally
188 PLOT = 'P' ;##rev2## plot
189 SIDWAY = 'S' ;##rev2## print 16 characters sideways
191 ; Bus Response Equates
193 ACK = 'A' ;##rev2## device acknowledged
194 COMPLT = 'C' ;##rev2## device succesfully completed operation
195 ERROR = 'E' ;##rev2## device incurred error
196 NACK = 'N' ;##rev2## device did not understand
198 ; Floating Point Miscellaneous Equates
202 FMPREC = FPREC-1 ;##rev2## length of mantissa
204 ; Cassette Record Type Equates
206 HDR = $FB ;##rev2## header
207 DTA = $FC ;##rev2## data record
208 DT1 = $FA ;##rev2## last data record
209 EOT = $FE ;##rev2## end of tape (file)
211 TONE1 = 2 ;##rev2## record
212 TONE2 = 1 ;##rev2## playback
214 ; Cassette Timing Equates
216 WLEADN = 1152 ;##rev2## NTSC 19.2 second WRITE file leader
217 RLEADN = 576 ;##rev2## NTSC 9.6 second READ file leader
218 WIRGLN = 180 ;##rev2## NTSC 3.0 second WRITE IRG
219 RIRGLN = 120 ;##rev2## NTSC 2.0 second READ IRG
220 WSIRGN = 15 ;##rev2## NTSC 0.25 second WRITE short IRG
221 RSIRGN = 10 ;##rev2## NTSC 0.16 second READ short IRG
222 BEEPNN = 30 ;##rev2## NTSC 0.5 second beep duration
223 BEEPFN = 10 ;##rev2## NTSC 0.16 seconrd beep duration
225 WLEADP = 960 ;##rev2## PAL 19.2 second WRITE file leader
226 RLEADP = 480 ;##rev2## PAL 9.6 second READ file leader
227 WIRGLP = 150 ;##rev2## PAL 3.0 second WRITE IRG
228 RIRGLP = 100 ;##rev2## PAL 2.0 second READ IRG
229 WSIRGP = 13 ;##rev2## PAL 0.25 second WRITE short IRG
230 RSIRGP = 8 ;##rev2## PAL 0.16 second READ short IRG
231 BEEPNP = 25 ;##rev2## PAL 0.5 second beep duration
232 BEEPFP = 8 ;##rev2## PAL 0.16 seconrd beep duration
234 WIRGHI = 0 ;##rev2## high WRITE IRG
235 RIRGHI = 0 ;##rev2## high READ IRG
237 ; Power-up Validation Byte Value Equates
239 PUPVL1 = $5C ;##rev2## power-up validation value 1
240 PUPVL2 = $93 ;##rev2## power-up validation value 2
241 PUPVL3 = $25 ;##rev2## power-up validation value 3
243 ; Relocating Loader Miscellaneous Equates
245 DATAER = 156 ;##rev2## end of record appears before END
246 MEMERR = 157 ;##rev2## memory insufficient for load error
248 ; Miscellaneous Equates
250 IOCFRE = $FF ;IOCB free indication
252 B19200 = $0028 ;##rev2## 19200 baud POKEY counter value
253 B00600 = $05CC ;##rev2## 600 baud POKEY counter value
255 HITONE = $05 ;##rev2## FSK high freq. POKEY counter value
256 LOTONE = $07 ;##rev2## FSK low freq. POKEY counter value
258 NCOMLO = $34 ;##rev2## PIA lower NOT COMMAND line command
259 NCOMHI = $3C ;##rev2## PIA raise NOT COMMAND line command
261 MOTRGO = $34 ;##rev2## PIA cassette motor ON command
262 MOTRST = $3C ;##rev2## PIA cassette motor OFF command
264 NODAT = $00 ;##rev2## SIO immediate operation
265 GETDAT = $40 ;##rev2## SIO read data frame
266 PUTDAT = $80 ;##rev2## SIO write data frame
268 CRETRI = 13 ;##rev2## number of command frame retries
269 DRETRI = 1 ;##rev2## number of device retries
270 CTIM = 2 ;##rev2## command frame ACK timeout
272 NBUFSZ = 40 ;##rev2## print normal buffer size
273 DBUFSZ = 20 ;##rev2## print double buffer size
274 SBUFSZ = 29 ;##rev2## print sideways buffer size
276 ;-------------------------------------------------------------------------
277 ; Page Zero Address Equates
278 ;-------------------------------------------------------------------------
280 LINZBS = $00 ;LINBUG RAM (WILL BE REPLACED BY MONITOR RAM)
281 LNFLG = $00 ;##1200xl## 1-byte LNBUG flag (0 = not LNBUG)
282 NGFLAG = $01 ;##1200xl## 1-byte memory status (0 = failure)
286 CASINI = $02 ;CASSETTE INIT LOCATION
287 RAMLO = $04 ;RAM POINTER FOR MEMORY TEST
288 TRAMSZ = $06 ;TEMPORARY REGISTER FOR RAM SIZE
289 ;TSTDAT = $07 ;##old## RAM TEST DATA REGISTER
290 CMCMD = $07 ;##rev2## 1-byte command communications
292 ; Cleared upon Coldstart only
294 WARMST = $08 ;WARM START FLAG
295 BOOTQ = $09 ;SUCCESSFUL BOOT FLAG
296 DOSVEC = $0A ;DISK SOFTWARE START VECTOR
297 DOSINI = $0C ;DISK SOFTWARE INIT ADDRESS
298 APPMHI = $0E ;APPLICATIONS MEMORY HI LIMIT
300 ; Cleared upon Coldstart or Warmstart
302 INTZBS = $10 ;INTERRUPT HANDLER
304 POKMSK = $10 ;SYSTEM MASK FOR POKEY IRG ENABLE
305 BRKKEY = $11 ;BREAK KEY FLAG
306 RTCLOK = $12 ;REAL TIME CLOCK (IN 16 MSEC UNITS>
307 BUFADR = $15 ;INDIRECT BUFFER ADDRESS REGISTER
308 ICCOMT = $17 ;COMMAND FOR VECTOR
309 DSKFMS = $18 ;DISK FILE MANAGER POINTER
310 DSKUTL = $1A ;DISK UTILITIES POINTER
311 ABUFPT = $1C ;##1200xl## 4-byte ACMI buffer pointer area
313 ;PTIMOT = $1C ;##old## PRINTER TIME OUT REGISTER
314 ;PBPNT = $1D ;##old## PRINT BUFFER POINTER
315 ;PBUFSZ = $1E ;##old## PRINT BUFFER SIZE
316 ;PTEMP = $1F ;##old## TEMPORARY REGISTER
318 ZIOCB = $20 ;ZERO PAGE I/O CONTROL BLOCK
319 IOCBAS = $20 ;16-byte page zero IOCB
320 ICHIDZ = $20 ;HANDLER INDEX NUMBER (FF = IOCB FREE)
321 ICDNOZ = $21 ;DEVICE NUMBER (DRIVE NUMBER)
322 ICCOMZ = $22 ;COMMAND CODE
323 ICSTAZ = $23 ;STATUS OF LAST IOCB ACTION
324 ICBALZ = $24 ;BUFFER ADDRESS LOW BYTE
325 ICBAHZ = $25 ;1-byte high buffer address
326 ICPTLZ = $26 ;PUT BYTE ROUTINE ADDRESS -1
327 ICPTHZ = $27 ;1-byte high PUT-BYTE routine address
328 ICBLLZ = $28 ;BUFFER LENGTH LOW BYTE
329 ICBLHZ = $29 ;1-byte high buffer length
330 ICAX1Z = $2A ;AUXILIARY INFORMATION FIRST BYTE
331 ICAX2Z = $2B ;1-byte second auxiliary information
332 ICSPRZ = $2C ;4-byte spares
334 ENTVEC = $2C ;##rev2## 2-byte (not used)
335 ICIDNO = $2E ;IOCB NUMBER X 16
336 CIOCHR = $2F ;CHARACTER BYTE FOR CURRENT OPERATION
338 STATUS = $30 ;INTERNAL STATUS STORAGE
339 CHKSUM = $31 ;CHECKSUM (SINGLE BYTE SUM WITH CARRY)
340 BUFRLO = $32 ;POINTER TO DATA BUFFER (LO BYTE)
341 BUFRHI = $33 ;POINTER TO DATA BUFFER (HI BYTE)
342 BFENLO = $34 ;NEXT BYTE PAST END OF THE DATA BUFFER LO
343 BFENHI = $35 ;NEXT BYTE PAST END OF THE DATA BUFFER HI
344 ;CRETRY = $36 ;##old## NUMBER OF COMMAND FRAME RETRIES
345 ;DRETRY = $37 ;##old## NUMBER OF DEVICE RETRIES
346 LTEMP = $36 ;##1200xl## 2-byte loader temporary
347 BUFRFL = $38 ;DATA BUFFER FULL FLAG
348 RECVDN = $39 ;RECEIVE DONE FLAG
349 XMTDON = $3A ;TRANSMISSION DONE FLAG
350 CHKSNT = $3B ;CHECKSUM SENT FLAG
351 NOCKSM = $3C ;NO CHECKSUM FOLLOWS DATA FLAG
352 BPTR = $3D ;1-byte cassette buffer pointer
353 FTYPE = $3E ;1-byte cassette IRG type
354 FEOF = $3F ;1-byte cassette EOF flag (0 = quiet)
355 FREQ = $40 ;1-byte cassette beep counter
356 SOUNDR = $41 ;NOISY I/0 FLAG. (ZERO IS QUIET)
358 CRITIC = $42 ;DEFINES CRITICAL SECTION (CRITICAL IF NON-Z)
360 FMSZPG = $43 ;DISK FILE MANAGER SYSTEM ZERO PAGE
362 ;CKEY = $4A ;##old## FLAG SET WHEN GAME START PRESSED
363 ZCHAIN = $4A ;##1200xl## 2-byte handler linkage chain pointer
364 ;CASSBT = $4B ;##old## CASSETTE BOOT FLAG
365 DSTAT = $4C ;DISPLAY STATUS
366 ATRACT = $4D ;ATRACT FLAG
367 DRKMSK = $4E ;DARK ATRACT MASK
368 COLRSH = $4F ;ATRACT COLOR SHIFTER (EOR'ED WITH PLAYFIELD
371 TMPCHR = $50 ;1-byte temporary character
372 HOLD1 = $51 ;1-byte temporary
373 LMARGN = $52 ;left margin (normally 2, cc65 C startup code sets it to 0)
374 RMARGN = $53 ;right margin (normally 39 if no XEP80 is used)
375 ROWCRS = $54 ;1-byte cursor row
376 COLCRS = $55 ;2-byte cursor column
377 DINDEX = $57 ;1-byte display mode
378 SAVMSC = $58 ;2-byte saved memory scan counter
379 OLDROW = $5A ;1-byte prior row
380 OLDCOL = $5B ;2-byte prior column
381 OLDCHR = $5D ;DATA UNDER CURSOR
382 OLDADR = $5E ;2-byte saved cursor memory address
383 FKDEF = $60 ;##1200xl## 2-byte function key definition table
384 ;NEWROW = $60 ;##old## POINT DRAW GOES TO
385 ;NEWCOL = $61 ;##old##
386 PALNTS = $62 ;##1200xl## 1-byte PAL/NTSC indicator (0 = NTSC)
387 LOGCOL = $63 ;POINTS AT COLUMN IN LOGICAL LINE
388 ADRESS = $64 ;2-byte temporary address
390 MLTTMP = $66 ;1-byte temporary
391 OPNTMP = $66 ;FIRST BYTE IS USED IN OPEN AS TEMP
392 TOADR = $66 ;##rev2## 2-byte destination address
394 SAVADR = $68 ;2-byte saved address
395 FRMADR = $68 ;##rev2## 2-byte source address
397 RAMTOP = $6A ;RAM SIZE DEFINED BY POWER ON LOGIC
398 BUFCNT = $6B ;BUFFER COUNT
399 BUFSTR = $6C ;EDITOR GETCH POINTER
400 BITMSK = $6E ;BIT MASK
401 SHFAMT = $6F ;1-byte shift amount for pixel justifucation
402 ROWAC = $70 ;2-byte draw working row
403 COLAC = $72 ;2-byte draw working column
404 ENDPT = $74 ;2-byte end point
405 DELTAR = $76 ;1-byte row difference
406 DELTAC = $77 ;2-byte column difference
407 KEYDEF = $79 ;##1200xl## 2-byte key definition table address
408 ;ROWINC = $79 ;##old##
409 ;COLINC = $7A ;##old##
410 SWPFLG = $7B ;NON-0 1F TXT AND REGULAR RAM IS SWAPPED
411 HOLDCH = $7C ;CH IS MOVED HERE IN KGETCH BEFORE CNTL & SH
412 INSDAT = $7D ;1-byte temporary
413 COUNTR = $7E ;2-byte draw iteration count
415 ; Floating Point Package Page Zero Address Equates
417 FR0 = $D4 ;6-byte register 0
418 FR0M = $D5 ;##rev2## 5-byte register 0 mantissa
419 QTEMP = $D9 ;##rev2## 1-byte temporary
421 FRE = $DA ;6-byte (internal) register E
424 FR1M = $E1 ;##rev2## 5-byte register 1 mantissa
426 FR2 = $E6 ;6-byte (internal) register 2
428 FRX = $EC ;1-byte temporary
430 EEXP = $ED ;VALUE OF E
432 FRSIGN = $EE ;##rev2## 1-byte floating point sign
433 NSIGN = $EE ;SIGN OF #
435 PLYCNT = $EF ;##rev2## 1-byte polynomial degree
436 ESIGN = $EF ;SIGN OF EXPONENT
438 SGNFLG = $F0 ;##rev2## 1-byte sign flag
439 FCHRFLG = $F0 ;1ST CHAR FLAG
441 XFMFLG = $F1 ;##rev2## 1-byte transform flag
442 DIGRT = $F1 ;# OF DIGITS RIGHT OF DECIMAL
444 CIX = $F2 ;CURRENT INPUT INDEX
445 INBUFF = $F3 ;POINTS TO USER'S LINE INPUT BUFFER
447 ZTEMP1 = $F5 ;2-byte temporary
448 ZTEMP4 = $F7 ;2-byte temporary
449 ZTEMP3 = $F9 ;2-byte temporary
451 ;DEGFLG = $FB ;##old## same as RADFLG
452 ;RADFLG = $FB ;##old## 0=RADIANS, 6=DEGREES
454 FLPTR = $FC ;2-byte floating point number pointer
455 FPTR2 = $FE ;2-byte floating point number pointer
457 ;-------------------------------------------------------------------------
458 ; Page Two Address Equates
459 ;-------------------------------------------------------------------------
461 INTABS = $0200 ;INTERRUPT RAM
463 VDSLST = $0200 ;DISPLAY LIST NMI VECTOR
464 VPRCED = $0202 ;PROCEED LINE IRQ VECTOR
465 VINTER = $0204 ;INTERRUPT LINE IRQ VECTOR
466 VBREAK = $0206 ;SOFTWARE BREAK (00) INSTRUCTION IRQ VECTOR
467 VKEYBD = $0208 ;POKEY KEYBOARD IRQ VECTOR
468 VSERIN = $020A ;POKEY SERIAL INPUT READY IRQ
469 VSEROR = $020C ;POKEY SERIAL OUTPUT READY IRQ
470 VSEROC = $020E ;POKEY SERIAL OUTPUT COMPLETE IRQ
471 VTIMR1 = $0210 ;POKEY TIMER 1 IRG
472 VTIMR2 = $0212 ;POKEY TIMER 2 IRG
473 VTIMR4 = $0214 ;POKEY TIMER 4 IRG
474 VIMIRQ = $0216 ;IMMEDIATE IRG VECTOR
475 CDTMV1 = $0218 ;COUNT DOWN TIMER 1
476 CDTMV2 = $021A ;COUNT DOWN TIMER 2
477 CDTMV3 = $021C ;COUNT DOWN TIMER 3
478 CDTMV4 = $021E ;COUNT DOWN TIMER 4
479 CDTMV5 = $0220 ;COUNT DOWN TIMER 5
480 VVBLKI = $0222 ;IMMEDIATE VERTICAL BLANK NMI VECTOR
481 VVBLKD = $0224 ;DEFERRED VERTICAL BLANK NMI VECTOR
482 CDTMA1 = $0226 ;COUNT DOWN TIMER 1 JSR ADDRESS
483 CDTMA2 = $0228 ;COUNT DOWN TIMER 2 JSR ADDRESS
484 CDTMF3 = $022A ;COUNT DOWN TIMER 3 FLAG
485 SRTIMR = $022B ;SOFTWARE REPEAT TIMER
486 CDTMF4 = $022C ;COUNT DOWN TIMER 4 FLAG
487 INTEMP = $022D ;IAN'S TEMP
488 CDTMF5 = $022E ;COUNT DOWN TIMER FLAG 5
489 SDMCTL = $022F ;SAVE DMACTL REGISTER
490 SDLSTL = $0230 ;SAVE DISPLAY LIST LOW BYTE
491 SDLSTH = $0231 ;SAVE DISPLAY LIST HI BYTE
492 SSKCTL = $0232 ;SKCTL REGISTER RAM
493 LCOUNT = $0233 ;##1200xl## 1-byte relocating loader record
494 LPENH = $0234 ;LIGHT PEN HORIZONTAL VALUE
495 LPENV = $0235 ;LIGHT PEN VERTICAL VALUE
496 BRKKY = $0236 ;BREAK KEY VECTOR
497 ;RELADR = $0238 ;##1200xl## 2-byte relocatable loader address
498 VPIRQ = $0238 ;##rev2## 2-byte parallel device IRQ vector
499 CDEVIC = $023A ;COMMAND FRAME BUFFER - DEVICE
500 CCOMND = $023B ;COMMAND
501 CAUX1 = $023C ;COMMAND AUX BYTE 1
502 CAUX2 = $023D ;COMMAND AUX BYTE 2
504 TEMP = $023E ;TEMPORARY RAM CELL
506 ERRFLG = $023F ;ERROR FLAG - ANY DEVICE ERROR EXCEPT TIME OUT
508 DFLAGS = $0240 ;DISK FLAGS FROM SECTOR ONE
509 DBSECT = $0241 ;NUMBER OF DISK BOOT SECTORS
510 BOOTAD = $0242 ;ADDRESS WHERE DISK BOOT LOADER WILL BE PUT
511 COLDST = $0244 ;COLDSTART FLAG (1=IN MIDDLE OF COLDSTART>
512 RECLEN = $0245 ;##1200xl## 1-byte relocating loader record length
513 DSKTIM = $0246 ;DISK TIME OUT REGISTER
514 ;LINBUF = $0247 ;##old## CHAR LINE BUFFER
515 PDVMSK = $0247 ;##rev2## 1-byte parallel device selection mask
516 SHPDVS = $0248 ;##rev2## 1-byte PDVS (parallel device select)
517 PDIMSK = $0249 ;##rev2## 1-byte parallel device IRQ selection
518 RELADR = $024A ;##rev2## 2-byte relocating loader relative adr.
519 PPTMPA = $024C ;##rev2## 1-byte parallel device handler temporary
520 PPTMPX = $024D ;##rev2## 1-byte parallel device handler temporary
522 CHSALT = $026B ;##1200xl## 1-byte character set alternate
523 VSFLAG = $026C ;##1200xl## 1-byte fine vertical scroll count
524 KEYDIS = $026D ;##1200xl## 1-byte keyboard disable
525 FINE = $026E ;##1200xl## 1-byte fine scrolling mode
526 GPRIOR = $026F ;GLOBAL PRIORITY CELL
528 PADDL0 = $0270 ;1-byte potentiometer 0
529 PADDL1 = $0271 ;1-byte potentiometer 1
530 PADDL2 = $0272 ;1-byte potentiometer 2
531 PADDL3 = $0273 ;1-byte potentiometer 3
532 PADDL4 = $0274 ;1-byte potentiometer 4
533 PADDL5 = $0275 ;1-byte potentiometer 5
534 PADDL6 = $0276 ;1-byte potentiometer 6
535 PADDL7 = $0277 ;1-byte potentiometer 7
537 STICK0 = $0278 ;1-byte joystick 0
538 STICK1 = $0279 ;1-byte joystick 1
539 STICK2 = $027A ;1-byte joystick 2
540 STICK3 = $027B ;1-byte joystick 3
542 PTRIG0 = $027C ;1-byte paddle trigger 0
543 PTRIG1 = $027D ;1-byte paddle trigger 1
544 PTRIG2 = $027E ;1-byte paddle trigger 2
545 PTRIG3 = $027F ;1-byte paddle trigger 3
546 PTRIG4 = $0280 ;1-byte paddle trigger 4
547 PTRIG5 = $0281 ;1-byte paddle trigger 5
548 PTRIG6 = $0281 ;1-byte paddle trigger 6
549 PTRIG7 = $0283 ;1-byte paddle trigger 7
551 STRIG0 = $0284 ;1-byte joystick trigger 0
552 STRIG1 = $0285 ;1-byte joystick trigger 1
553 STRIG2 = $0286 ;1-byte joystick trigger 2
554 STRIG3 = $0287 ;1-byte joystick trigger 3
556 ;CSTAT = $0288 ;##old## cassette status register
557 HIBYTE = $0288 ;##1200xl## 1-byte relocating loader high byte
558 WMODE = $0289 ;1-byte cassette WRITE mode
559 BLIM = $028A ;1-byte cassette buffer limit
560 IMASK = $028B ;##rev2## (not used)
561 JVECK = $028C ;2-byte jump vector or temporary
562 NEWADR = $028E ;##1200xl## 2-byte relocating address
563 TXTROW = $0290 ;TEXT ROWCRS
564 TXTCOL = $0291 ;TEXT COLCRS
565 TINDEX = $0293 ;TEXT INDEX
566 TXTMSC = $0294 ;FOOLS CONVRT INTO NEW MSC
567 TXTOLD = $0296 ;OLDROW & OLDCOL FOR TEXT (AND THEN SOME)
568 ;TMPX1 = $029C ;##old## 1-byte temporary register
569 CRETRY = $029C ;##1200xl## 1-byte number of command frame retries
570 HOLD3 = $029D ;1-byte temporary
571 SUBTMP = $029E ;1-byte temporary
572 HOLD2 = $029F ;1-byte (not used)
573 DMASK = $02A0 ;1-byte display (pixel location) mask
574 TMPLBT = $02A1 ;1-byte (not used)
575 ESCFLG = $02A2 ;ESCAPE FLAG
576 TABMAP = $02A3 ;15-byte (120 bit) tab stop bit map
577 LOGMAP = $02B2 ;LOGICAL LINE START BIT MAP
578 INVFLG = $02B6 ;INVERSE VIDEO FLAG (TOGGLED BY ATARI KEY)
579 FILFLG = $02B7 ;RIGHT FILL FLAG FOR DRAW
580 TMPROW = $02B8 ;1-byte temporary row
581 TMPCOL = $02B9 ;2-byte temporary column
582 SCRFLG = $02BB ;SET IF SCROLL OCCURS
583 HOLD4 = $02BC ;TEMP CELL USED IN DRAW ONLY
584 ;HOLD5 = $02BD ;##old## DITTO
585 DRETRY = $02BD ;##1200xl## 1-byte number of device retries
586 SHFLOK = $02BE ;1-byte shift/control lock flags
587 BOTSCR = $02BF ;BOTTOM OF SCREEN 24 NORM 4 SPLIT
589 PCOLR0 = $02C0 ;1-byte player-missile 0 color/luminance
590 PCOLR1 = $02C1 ;1-byte player-missile 1 color/luminance
591 PCOLR2 = $02C2 ;1-byte player-missile 2 color/luminance
592 PCOLR3 = $02C3 ;1-byte player-missile 3 color/luminance
594 COLOR0 = $02C4 ;1-byte playfield 0 color/luminance
595 COLOR1 = $02C5 ;1-byte playfield 1 color/luminance
596 COLOR2 = $02C6 ;1-byte playfield 2 color/luminance
597 COLOR3 = $02C7 ;1-byte playfield 3 color/luminance
599 COLOR4 = $02C8 ;1-byte background color/luminance
601 PARMBL = $02C9 ;##rev2## 6-byte relocating loader parameter
602 RUNADR = $02C9 ;##1200xl## 2-byte run address
603 HIUSED = $02CB ;##1200xl## 2-byte highest non-zero page address
604 ZHIUSE = $02CD ;##1200xl## 2-byte highest zero page address
606 OLDPAR = $02CF ;##rev2## 6-byte relocating loader parameter
607 GBYTEA = $02CF ;##1200xl## 2-byte GET-BYTE routine address
608 LOADAD = $02D1 ;##1200xl## 2-byte non-zero page load address
609 ZLOADA = $02D3 ;##1200xl## 2-byte zero page load address
611 DSCTLN = $02D5 ;##1200xl## 2-byte disk sector length
612 ACMISR = $02D7 ;##1200xl## 2-byte ACMI interrupt service routine
613 KRPDEL = $02D9 ;##1200xl## 1-byte auto-repeat delay
614 KEYREP = $02DA ;##1200xl## 1-byte auto-repeat rate
615 NOCLIK = $02DB ;##1200xl## 1-byte key click disable
616 HELPFG = $02DC ;##1200xl## 1-byte HELP key flag (0 = no HELP)
617 DMASAV = $02DD ;##1200xl## 1-byte SDMCTL save/restore
618 PBPNT = $02DE ;##1200xl## 1-byte printer buffer pointer
619 PBUFSZ = $02DF ;##1200xl## 1-byte printer buffer size
621 GLBABS = $02E0 ;4-byte global variables for non-DOS users
622 RUNAD = $02E0 ;##map## 2-byte binary file run address
623 INITAD = $02E2 ;##map## 2-byte binary file initialization address
625 RAMSIZ = $02E4 ;RAM SIZE (HI BYTE ONLY)
626 MEMTOP = $02E5 ;TOP OF AVAILABLE USER MEMORY
627 MEMLO = $02E7 ;BOTTOM OF AVAILABLE USER MEMORY
628 HNDLOD = $02E9 ;##1200xl## 1-byte user load flag
629 DVSTAT = $02EA ;STATUS BUFFER
630 CBAUDL = $02EE ;1-byte low cassette baud rate
631 CBAUDH = $02EF ;1-byte high cassette baud rate
632 CRSINH = $02F0 ;CURSOR INHIBIT (00 = CURSOR ON)
633 KEYDEL = $02F1 ;KEY DELAY
634 CH1 = $02F2 ;1-byte prior keyboard character
635 CHACT = $02F3 ;CHACTL REGISTER RAM
636 CHBAS = $02F4 ;CHBAS REGISTER RAM
638 NEWROW = $02F5 ;##1200xl## 1-byte draw destination row
639 NEWCOL = $02F6 ;##1200xl## 2-byte draw destination column
640 ROWINC = $02F8 ;##1200xl## 1-byte draw row increment
641 COLINC = $02F9 ;##1200xl## 1-byte draw column increment
643 CHAR = $02FA ;1-byte internal character
644 ATACHR = $02FB ;ATASCII CHARACTER
645 CH = $02FC ;GLOBAL VARIABLE FOR KEYBOARD
646 FILDAT = $02FD ;RIGHT FILL DATA <DRAW>
647 DSPFLG = $02FE ;DISPLAY FLAG DISPLAY CNTLS IF NON-ZERO
648 SSFLAG = $02FF ;START/STOP FLAG FOR PAGING (CNTL 1). CLEARE
650 ;-------------------------------------------------------------------------
651 ; Page Three Address Equates
652 ;-------------------------------------------------------------------------
654 DCB = $0300 ;DEVICE CONTROL BLOCK
655 DDEVIC = $0300 ;PERIPHERAL UNIT 1 BUS I.D. NUMBER
656 DUNIT = $0301 ;UNIT NUMBER
657 DCOMND = $0302 ;BUS COMMAND
658 DSTATS = $0303 ;COMMAND TYPE/STATUS RETURN
659 DBUFLO = $0304 ;1-byte low data buffer address
660 DBUFHI = $0305 ;1-byte high data buffer address
661 DTIMLO = $0306 ;DEVICE TIME OUT IN 1 SECOND UNITS
662 DUNUSE = $0307 ;UNUSED BYTE
663 DBYTLO = $0308 ;1-byte low number of bytes to transfer
664 DBYTHI = $0309 ;1-byte high number of bytes to transfer
665 DAUX1 = $030A ;1-byte first command auxiliary
666 DAUX2 = $030B ;1-byte second command auxiliary
668 TIMER1 = $030C ;INITIAL TIMER VALUE
669 ;ADDCOR = $030E ;##old## ADDITION CORRECTION
670 JMPERS = $030E ;##1200xl## 1-byte jumper options
671 CASFLG = $030F ;CASSETTE MODE WHEN SET
672 TIMER2 = $0310 ;2-byte final baud rate timer value
673 TEMP1 = $0312 ;TEMPORARY STORAGE REGISTER
674 ;TEMP2 = $0314 ;##old## TEMPORARY STORAGE REGISTER
675 TEMP2 = $0313 ;##1200xl## 1-byte temporary
676 PTIMOT = $0314 ;##1200xl## 1-byte printer timeout
677 TEMP3 = $0315 ;TEMPORARY STORAGE REGISTER
678 SAVIO = $0316 ;SAVE SERIAL IN DATA PORT
679 TIMFLG = $0317 ;TIME OUT FLAG FOR BAUD RATE CORRECTION
680 STACKP = $0318 ;SIO STACK POINTER SAVE CELL
681 TSTAT = $0319 ;TEMPORARY STATUS HOLDER
683 HATABS = $031A ;35-byte handler address table (was 38 bytes)
684 PUPBT1 = $033D ;##1200xl## 1-byte power-up validation byte 1
685 PUPBT2 = $033E ;##1200xl## 1-byte power-up validation byte 2
686 PUPBT3 = $033F ;##1200xl## 1-byte power-up validation byte 3
688 IOCB = $0340 ;I/O CONTROL BLOCKS
689 ICHID = $0340 ;HANDLER INDEX NUMBER (FF=IOCB FREE)
690 ICDNO = $0341 ;DEVICE NUMBER (DRIVE NUMBER)
691 ICCOM = $0342 ;COMMAND CODE
692 ICSTA = $0343 ;STATUS OF LAST IOCB ACTION
693 ICBAL = $0344 ;1-byte low buffer address
694 ICBAH = $0345 ;1-byte high buffer address
695 ICPTL = $0346 ;1-byte low PUT-BYTE routine address - 1
696 ICPTH = $0347 ;1-byte high PUT-BYTE routine address - 1
697 ICBLL = $0348 ;1-byte low buffer length
698 ICBLH = $0349 ;1-byte high buffer length
699 ICAX1 = $034A ;1-byte first auxiliary information
700 ICAX2 = $034B ;1-byte second auxiliary information
701 ICAX3 = $034C ;1-byte third auxiliary information
702 ICAX4 = $034D ;1-byte fourth auxiliary information
703 ICAX5 = $034E ;1-byte fifth auxiliary information
704 ICSPR = $034F ;SPARE BYTE
706 PRNBUF = $03C0 ;PRINTER BUFFER
707 SUPERF = $03E8 ;##1200xl## 1-byte editor super function flag
708 CKEY = $03E9 ;##1200xl## 1-byte cassette boot request flag
709 CASSBT = $03EA ;##1200xl## 1-byte cassette boot flag
710 CARTCK = $03EB ;##1200xl## 1-byte cartridge equivalence check
711 DERRF = $03EC ;##rev2## 1-byte screen OPEN error flag
713 ; Remainder of Page Three Not Cleared upon Reset
715 ACMVAR = $03ED ;##1200xl## 11 bytes reserved for ACMI
716 BASICF = $03F8 ;##rev2## 1-byte BASIC switch flag
717 MINTLK = $03F9 ;##1200xl## 1-byte ACMI module interlock
718 GINTLK = $03FA ;##1200xl## 1-byte cartridge interlock
719 CHLINK = $03FB ;##1200xl## 2-byte loaded handler chain link
720 CASBUF = $03FD ;CASSETTE BUFFER
722 ;-------------------------------------------------------------------------
723 ; Page Four/Five Address Equates
724 ;-------------------------------------------------------------------------
726 ; USER AREA STARTS HERE AND GOES TO END OF PAGE FIVE
727 USAREA = $0480 ;128 bytes reserved for application
729 LBPR1 = $057E ;LBUFF PREFIX 1
730 LBPR2 = $057F ;LBUFF PREFIX 2
731 LBUFF = $0580 ;128-byte line buffer
733 PLYARG = $05E0 ;6-byte floating point polynomial argument
734 FPSCR = $05E6 ;6-byte floating point temporary
735 FPSCR1 = $05EC ;6-byte floating point temporary
737 ;LBFEND = $05FF ;##old## END OF LBUFF
742 ;-------------------------------------------------------------------------
743 ; Cartridge Address Equates
744 ;-------------------------------------------------------------------------
746 CARTCS = $BFFA ;##rev2## 2-byte cartridge coldstart address
747 CART = $BFFC ;##rev2## 1-byte cartridge present indicator
748 CARTFG = $BFFD ;##rev2## 1-byte cartridge flags
749 CARTAD = $BFFE ;##rev2## 2-byte cartridge start vector
751 ;-------------------------------------------------------------------------
752 ; CTIA/GTIA Address Equates
753 ;-------------------------------------------------------------------------
755 GTIA = $D000 ;CTIA/GTIA area
757 ; Read/Write Addresses
759 CONSOL = $D01F ;console switches and speaker control
763 M0PF = $D000 ;missile 0 and playfield collision
764 M1PF = $D001 ;missile 1 and playfield collision
765 M2PF = $D002 ;missile 2 and playfield collision
766 M3PF = $D003 ;missile 3 and playfield collision
768 P0PF = $D004 ;player 0 and playfield collision
769 P1PF = $D005 ;player 1 and playfield collision
770 P2PF = $D006 ;player 2 and playfield collision
771 P3PF = $D007 ;player 3 and playfield collision
773 M0PL = $D008 ;missile 0 and player collision
774 M1PL = $D009 ;missile 1 and player collision
775 M2PL = $D00A ;missile 2 and player collision
776 M3PL = $D00B ;missile 3 and player collision
778 P0PL = $D00C ;player 0 and player collision
779 P1PL = $D00D ;player 1 and player collision
780 P2PL = $D00E ;player 2 and player collision
781 P3PL = $D00F ;player 3 and player collision
783 TRIG0 = $D010 ;joystick trigger 0
784 TRIG1 = $D011 ;joystick trigger 1
786 TRIG2 = $D012 ;cartridge interlock
787 TRIG3 = $D013 ;ACMI module interlock
789 PAL = $D014 ;##rev2## PAL/NTSC indicator
793 HPOSP0 = $D000 ;player 0 horizontal position
794 HPOSP1 = $D001 ;player 1 horizontal position
795 HPOSP2 = $D002 ;player 2 horizontal position
796 HPOSP3 = $D003 ;player 3 horizontal position
798 HPOSM0 = $D004 ;missile 0 horizontal position
799 HPOSM1 = $D005 ;missile 1 horizontal position
800 HPOSM2 = $D006 ;missile 2 horizontal position
801 HPOSM3 = $D007 ;missile 3 horizontal position
803 SIZEP0 = $D008 ;player 0 size
804 SIZEP1 = $D009 ;player 1 size
805 SIZEP2 = $D00A ;player 2 size
806 SIZEP3 = $D00B ;player 3 size
808 SIZEM = $D00C ;missile sizes
810 GRAFP0 = $D00D ;player 0 graphics
811 GRAFP1 = $D00E ;player 1 graphics
812 GRAFP2 = $D00F ;player 2 graphics
813 GRAFP3 = $D010 ;player 3 graphics
815 GRAFM = $D011 ;missile graphics
817 COLPM0 = $D012 ;player-missile 0 color/luminance
818 COLPM1 = $D013 ;player-missile 1 color/luminance
819 COLPM2 = $D014 ;player-missile 2 color/luminance
820 COLPM3 = $D015 ;player-missile 3 color/luminance
822 COLPF0 = $D016 ;playfield 0 color/luminance
823 COLPF1 = $D017 ;playfield 1 color/luminance
824 COLPF2 = $D018 ;playfield 2 color/luminance
825 COLPF3 = $D019 ;playfield 3 color/luminance
827 COLBK = $D01A ;background color/luminance
829 PRIOR = $D01B ;priority select
830 VDELAY = $D01C ;vertical delay
831 GRACTL = $D01D ;graphic control
832 HITCLR = $D01E ;collision clear
834 ;-------------------------------------------------------------------------
835 ; PBI Address Equates
836 ;-------------------------------------------------------------------------
838 PBI = $D100 ;##rev2## parallel bus interface area
842 PDVI = $D1FF ;##rev2## parallel device IRQ status
846 PDVS = $D1FF ;##rev2## parallel device select
848 ; PBI RAM Address Equates
850 PBIRAM = $D600 ;##rev2## parallel bus interface RAM area
852 ; Parallel Device Address Equates
854 PDID1 = $D803 ;##rev2## parallel device ID 1
855 PDIDV = $D805 ;##rev2## parallel device I/O vector
856 PDIRQV = $D808 ;##rev2## parallel device IRQ vector
857 PDID2 = $D80B ;##rev2## parallel device ID 2
858 PDVV = $D80D ;##rev2## parallel device vector table
860 ;-------------------------------------------------------------------------
861 ; POKEY Address Equates
862 ;-------------------------------------------------------------------------
864 POKEY = $D200 ;POKEY area
868 POT0 = $D200 ;potentiometer 0
869 POT1 = $D201 ;potentiometer 1
870 POT2 = $D202 ;potentiometer 2
871 POT3 = $D203 ;potentiometer 3
872 POT4 = $D204 ;potentiometer 4
873 POT5 = $D205 ;potentiometer 5
874 POT6 = $D206 ;potentiometer 6
875 POT7 = $D207 ;potentiometer 7
877 ALLPOT = $D208 ;potentiometer port status
878 KBCODE = $D209 ;keyboard code
879 RANDOM = $D20A ;random number generator
880 SERIN = $D20D ;serial port input
881 IRQST = $D20E ;IRQ interrupt status
882 SKSTAT = $D20F ;serial port and keyboard status
886 AUDF1 = $D200 ;channel 1 audio frequency
887 AUDC1 = $D201 ;channel 1 audio control
889 AUDF2 = $D202 ;channel 2 audio frequency
890 AUDC2 = $D203 ;channel 2 audio control
892 AUDF3 = $D204 ;channel 3 audio frequency
893 AUDC3 = $D205 ;channel 3 audio control
895 AUDF4 = $D206 ;channel 4 audio frequency
896 AUDC4 = $D207 ;channel 4 audio control
898 AUDCTL = $D208 ;audio control
899 STIMER = $D209 ;start timers
900 SKRES = $D20A ;reset SKSTAT status
901 POTGO = $D20B ;start potentiometer scan sequence
902 SEROUT = $D20D ;serial port output
903 IRQEN = $D20E ;IRQ interrupt enable
904 SKCTL = $D20F ;serial port and keyboard control
906 ;-------------------------------------------------------------------------
907 ; PIA Address Equates
908 ;-------------------------------------------------------------------------
910 PIA = $D300 ;PIA area
912 PORTA = $D300 ;port A direction register or jacks one/two
913 PORTB = $D301 ;port B direction register or memory management
915 PACTL = $D302 ;port A control
916 PBCTL = $D303 ;port B control
918 ;-------------------------------------------------------------------------
919 ; ANTIC Address Equates
920 ;-------------------------------------------------------------------------
922 ANTIC = $D400 ;ANTIC area
926 VCOUNT = $D40B ;vertical line counter
927 PENH = $D40C ;light pen horizontal position
928 PENV = $D40D ;light pen vertical position
929 NMIST = $D40F ;NMI interrupt status
933 DMACTL = $D400 ;DMA control
934 CHACTL = $D401 ;character control
935 DLISTL = $D402 ;low display list address
936 DLISTH = $D403 ;high display list address
937 HSCROL = $D404 ;horizontal scroll
938 VSCROL = $D405 ;vertical scroll
939 PMBASE = $D407 ;player-missile base address
940 CHBASE = $D409 ;character base address
941 WSYNC = $D40A ;wait for HBLANK synchronization
942 NMIEN = $D40E ;NMI enable
943 NMIRES = $D40F ;NMI interrupt reset
945 ;-------------------------------------------------------------------------
946 ; Floating Point Package Address Equates
947 ;-------------------------------------------------------------------------
949 AFP = $D800 ;convert ASCII to floating point
950 FASC = $D8E6 ;convert floating point to ASCII
951 IFP = $D9AA ;convert integer to floating point
952 FPI = $D9D2 ;convert floating point to integer
953 ZFR0 = $DA44 ;zero FR0
954 ZF1 = $DA46 ;zero floating point number
955 FSUB = $DA60 ;subtract floating point numbers
956 FADD = $DA66 ;add floating point numbers
957 FMUL = $DADB ;multiply floating point numbers
958 FDIV = $DB28 ;divide floating point numbers
959 PLYEVL = $DD40 ;evaluate floating point polynomial
960 FLD0R = $DD89 ;load floating point number
961 FLD0P = $DD8D ;load floating point number
962 FLD1R = $DD98 ;load floating point number
963 PLD1P = $DD9C ;load floating point number
964 FST0R = $DDA7 ;store floating point number
965 FST0P = $DDAB ;store floating point number
966 FMOVE = $DDB6 ;move floating point number
967 LOG = $DECD ;calculate floating point logarithm
968 LOG10 = $DED1 ;calculate floating point base 10 logarithm
969 EXP = $DDC0 ;calculate floating point exponential
970 EXP10 = $DDCC ;calculate floating point base 10 exponential
972 ;-------------------------------------------------------------------------
973 ; Device Handler Vector Table Address Equates
974 ;-------------------------------------------------------------------------
976 EDITRV = $E400 ;editor handler vector table
977 SCRENV = $E410 ;screen handler vector table
978 KEYBDV = $E420 ;keyboard handler vector table
979 PRINTV = $E430 ;printer handler vector table
980 CASETV = $E440 ;cassette handler vector table
982 ;-------------------------------------------------------------------------
983 ; Jump Vector Address Equates
984 ;-------------------------------------------------------------------------
986 DISKIV = $E450 ;vector to initialize DIO
987 DSKINV = $E453 ;vector to DIO
988 CIOV = $E456 ;vector to CIO
989 SIOV = $E459 ;vector to SIO
990 SETVBV = $E45C ;vector to set VBLANK parameters
991 SYSVBV = $E45F ;vector to process immediate VBLANK
992 XITVBV = $E462 ;vector to process deferred VBLANK
993 SIOINV = $E465 ;vector to initialize SIO
994 SENDEV = $E468 ;vector to enable SEND
995 INTINV = $E46B ;vector to initialize interrupt handler
996 CIOINV = $E46E ;vector to initialize CIO
997 BLKBDV = $E471 ;vector to power-up display
998 WARMSV = $E474 ;vector to warmstart
999 COLDSV = $E477 ;vector to coldstart
1000 RBLOKV = $E47A ;vector to read cassette block
1001 CSOPIV = $E47D ;vector to open cassette for input
1002 VCTABL = $E480 ;RAM vector initial value table
1003 PUPDIV = $E480 ;##rev2## vector to power-up display
1004 SLFTSV = $E483 ;##rev2## vector to self-test
1005 PHENTV = $E486 ;##rev2## vector to enter peripheral handler
1006 PHUNLV = $E489 ;##rev2## vector to unlink peripheral handler
1007 PHINIV = $E48C ;##rev2## vector to initialize peripheral handler
1008 GPDVV = $E48F ;##rev2## generic parallel device handler vector
1010 ; NOTE: OS rom self-test labels are not included in this file
1012 ;-------------------------------------------------------------------------
1013 ; Some misc. stuff from the 400/800 rev.B source
1014 ;-------------------------------------------------------------------------
1016 ; THE FOLLOWING ARE IN BASIC CARTRIDGE:
1017 SIN = $BD81 ;FR0 <- SIN (FR0) DEGFLG (0=RAD,6=DEG) CARRY
1018 COS = $BD73 ;FR0 <- COS (FR0) CARRY
1019 ATAN = $BE43 ;FR0 <- ATAN(FR0) CARRY
1020 SQR = $BEB1 ;FR0 <- ROOT(FR0) CARRY
1022 RADON = 0 ;INDICATES RADIANS
1023 DEGON = 6 ;INDICATES DEGREES
1025 ASCZER = '0' ;ASCII ZERO
1026 COLON = $3A ;ASCII COLON
1027 CR = $9B ;SYSTEM EOL (CARRIAGE RETURN)
1029 ;-------------------------------------------------------------------------
1031 ;-------------------------------------------------------------------------
1037 ;-------------------------------------------------------------------------
1039 ;-------------------------------------------------------------------------
1041 LOMEM = $80 ;2-byte low memory pointer
1042 VNTP = $82 ;2-byte variable name table address
1043 VNTD = $84 ;2-byte variable name table end + 1
1044 VVTP = $86 ;2-byte variable value table
1045 STMTAB = $88 ;2-byte statement table address
1046 STMCUR = $8A ;2-byte current statement pointer
1047 STARP = $8C ;2-byte string and array table pointer
1048 RUNSTK = $8E ;2-byte runtime stack address
1049 BMEMTOP = $90 ;2-byte top of memory pointer
1050 STOPLN = $BA ;2-byte stopped line number
1051 ERRSAVE = $C3 ;1-byte error code
1052 PTABW = $C9 ;1-byte tab width
1054 ;-------------------------------------------------------------------------
1055 ; ATASCII CHARACTER DEFS
1056 ;-------------------------------------------------------------------------
1058 ATCLR = $7D ;CLEAR SCREEN CHARACTER
1059 ATRUB = $7E ;BACK SPACE (RUBOUT)
1061 ATEOL = $9B ;END-OF-LINE
1062 ATDELL = $9C ;delete line
1063 ATINSL = $9D ;insert line
1064 ATCTAB = $9E ;clear TAB
1065 ATSTAB = $9F ;set TAB
1066 ATBEL = $FD ;CONSOLE BELL
1067 ATDEL = $FE ;delete char.
1068 ATINS = $FF ;insert char.
1069 ATURW = $1C ;UP-ARROW
1070 ATDRW = $1D ;DOWN-ARROW
1071 ATLRW = $1E ;LEFT-ARROW
1072 ATRRW = $1F ;RIGHT-ARROW
1075 ;-------------------------------------------------------------------------
1076 ; OFFSETS INTO SECTSIZETAB (DIO functions)
1077 ;-------------------------------------------------------------------------
1079 sst_flag = 0 ; length 1
1080 sst_sectsize = 1 ; 2
1081 sst_driveno = 3 ; 1 (drive #)
1082 sst_size = 4 ; size of one entry
1083 ; if changed, adapt diopncls.s
1085 ;-------------------------------------------------------------------------
1086 ; OFFSETS INTO dio_phys_pos
1087 ;-------------------------------------------------------------------------
1089 diopp_head = 0 ; head
1090 diopp_track = 1 ; track / cylinder
1091 diopp_sector = 3 ; sector
1092 diopp_size = 5 ; size of structure
1094 ;-------------------------------------------------------------------------
1095 ; VALUES for dos_type
1096 ;-------------------------------------------------------------------------
1105 ;-------------------------------------------------------------------------
1107 ;-------------------------------------------------------------------------
1114 ; .byte DL_CHR40x8x1 + DL_LMS + DL_DLI
1115 ; .word ScreenAlignment
1116 ; .byte DL_BLK1 + DL_DLI
1117 ; .byte DL_MAP320x1x1 + DL_LMS
1121 ; .byte DL_MAP320x1x1
1123 ; .byte DL_MAP320x1x1 + DL_LMS
1124 ; .word Screen + 40 * 100 ; 100 lines a 40 byte, 'Screen' has to be aligned correctly!
1126 ; .byte DL_MAP320x1x1
1131 ; absolute instructions (non mode lines)
1145 ; absolute instructions (mode lines)
1147 DL_CHR40x8x1 = 2 ; monochrome, 40 character & 8 scanlines per mode line (GR. 0)
1148 DL_CHR40x10x1 = 3 ; monochrome, 40 character & 10 scanlines per mode line
1149 DL_CHR40x8x4 = 4 ; colour, 40 character & 8 scanlines per mode line (GR. 12)
1150 DL_CHR40x16x4 = 5 ; colour, 40 character & 16 scanlines per mode line (GR. 13)
1151 DL_CHR20x8x2 = 6 ; colour (duochrome per character), 20 character & 8 scanlines per mode line (GR. 1)
1152 DL_CHR20x16x2 = 7 ; colour (duochrome per character), 20 character & 16 scanlines per mode line (GR. 2)
1154 DL_MAP40x8x4 = 8 ; colour, 40 pixel & 8 scanlines per mode line (GR. 3)
1155 DL_MAP80x4x2 = 9 ; 'duochrome', 80 pixel & 4 scanlines per mode line (GR.4)
1156 DL_MAP80x4x4 = 10 ; colour, 80 pixel & 4 scanlines per mode line (GR.5)
1157 DL_MAP160x2x2 = 11 ; 'duochrome', 160 pixel & 2 scanlines per mode line (GR.6)
1158 DL_MAP160x1x2 = 12 ; 'duochrome', 160 pixel & 1 scanline per mode line (GR.14)
1159 DL_MAP160x2x4 = 13 ; 4 colours, 160 pixel & 2 scanlines per mode line (GR.7)
1160 DL_MAP160x1x4 = 14 ; 4 colours, 160 pixel & 1 scanline per mode line (GR.15)
1161 DL_MAP320x1x1 = 15 ; monochrome, 320 pixel & 1 scanline per mode line (GR.8)
1163 ; modifiers on mode lines...
1169 ; general modifier...
1173 ;-------------------------------------------------------------------------
1175 ;-------------------------------------------------------------------------