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