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