STATIS = $0D ;status
SPECIL = $0E ;special
+; DOS IOCB command codes
+
+RENAME = $20 ;rename disk file
+DELETE = $21 ;delete disk file
+LOCKFL = $23 ;lock file (set to read-only)
+UNLOCK = $24 ;unlock file
+POINT = $25 ;point sector
+NOTE = $26 ;note sector
+GETFL = $27 ;get file length
+CHDIR_MYDOS = $29 ;change directory (MyDOS)
+MKDIR = $2A ;make directory (MyDOS/SpartaDOS)
+RMDIR = $2B ;remove directory (SpartaDOS)
+CHDIR_SPDOS = $2C ;change directory (SpartaDOS)
+FORMAT = $FE ;format
+
+GETCWD = $30 ;get current directory (MyDOS/SpartaDOS)
+
; Special Entry Command Equates
+; DOS Commands
+; Command line table, Index values for (DOSVEC),Y -- COMTAB
+; Compatible with OS/A+, DOS XL and SpartaDOS
+
+COMTAB = 0 ;DOS entry jump vector
+ZCRNAME = 3 ;file name crunch routine jump vector
+BUFOFF = 10 ;next parameter buffer offset
+COMFNAM = 33 ;destination buffer for crunch routine
+LBUF = 63 ;command line input buffer
-; Screen Commands
+; Screen IOCB Commands
DRAWLN = $11 ;draw line
FILLIN = $12 ;draw line with right fill
SIO_FORMATS = $22 ;1050: format medium density
SIO_CONFIG = $44 ;configure drive
SIO_CONFIGSF = $4B ;slow/fast configure drive??
+SIO_RDPERCOM = $4E ;read PERCOM block (XF551)
+SIO_WRPERCOM = $4F ;write PERCOM block (XF551)
SIO_WRITE = $50 ;write sector
SIO_READ = $52 ;read sector
SIO_STAT = $53 ;get status information
SIO_VERIFY = $56 ;verify sector
SIO_WRITEV = $57 ;write sector with verify
+SIO_WRITETRK = $60 ;write track (Speedy)
+SIO_READTRK = $62 ;read track (Speedy)
+
+; SIO Status Code (DSTATS)
+; Input: data direction
+; Bit #7 - W (write operation)
+; #6 - R (read operation)
+; Output: status code
+; $01 (001) -- OPERATION COMPLETE (NO ERRORS)
+; $8A (138) -- DEVICE TIMEOUT (DOESN'T RESPOND)
+; $8B (139) -- DEVICE NAK
+; $8C (140) -- SERIAL BUS INPUT FRAMING ERROR
+; $8E (142) -- SERIAL BUS DATA FRAME OVERRUN ERROR
+; $8F (143) -- SERIAL BUS DATA FRAME CHECKSUM ERROR
+; $90 (144) -- DEVICE DONE ERROR
; Character and Key Code Equates
INTZBS = $10 ;INTERRUPT HANDLER
-POKMSK = $10 ;SYSTEM MASK FOR POKEY IRG ENABLE
+POKMSK = $10 ;SYSTEM MASK FOR POKEY IRQ ENABLE (shadow of IRQEN)
BRKKEY = $11 ;BREAK KEY FLAG
RTCLOK = $12 ;REAL TIME CLOCK (IN 16 MSEC UNITS>
BUFADR = $15 ;INDIRECT BUFFER ADDRESS REGISTER
VSERIN = $020A ;POKEY SERIAL INPUT READY IRQ
VSEROR = $020C ;POKEY SERIAL OUTPUT READY IRQ
VSEROC = $020E ;POKEY SERIAL OUTPUT COMPLETE IRQ
-VTIMR1 = $0210 ;POKEY TIMER 1 IRG
-VTIMR2 = $0212 ;POKEY TIMER 2 IRG
-VTIMR4 = $0214 ;POKEY TIMER 4 IRG
-VIMIRQ = $0216 ;IMMEDIATE IRG VECTOR
+VTIMR1 = $0210 ;POKEY TIMER 1 IRQ
+VTIMR2 = $0212 ;POKEY TIMER 2 IRQ
+VTIMR4 = $0214 ;POKEY TIMER 4 IRQ
+VIMIRQ = $0216 ;IMMEDIATE IRQ VECTOR
CDTMV1 = $0218 ;COUNT DOWN TIMER 1
CDTMV2 = $021A ;COUNT DOWN TIMER 2
CDTMV3 = $021C ;COUNT DOWN TIMER 3
;LBFEND = $05FF ;##old## END OF LBUFF
+
+DOS = $0700
+
;-------------------------------------------------------------------------
; Cartridge Address Equates
;-------------------------------------------------------------------------
DISKIV = $E450 ;vector to initialize DIO
DSKINV = $E453 ;vector to DIO
+.ifdef __ATARIXL__
+.ifndef SHRAM_HANDLERS
+.import CIO_handler, SIO_handler, SETVBV_handler
+.endif
+.define CIOV CIO_handler
+.define SIOV SIO_handler
+.define SETVBV SETVBV_handler
+CIOV_org = $E456 ;vector to CIO
+SIOV_org = $E459 ;vector to SIO
+SETVBV_org = $E45C ;vector to set VBLANK parameters
+.else
CIOV = $E456 ;vector to CIO
SIOV = $E459 ;vector to SIO
SETVBV = $E45C ;vector to set VBLANK parameters
+.endif
SYSVBV = $E45F ;vector to process immediate VBLANK
XITVBV = $E462 ;vector to process deferred VBLANK
SIOINV = $E465 ;vector to initialize SIO
ERRSAVE = $C3 ;1-byte error code
PTABW = $C9 ;1-byte tab width
-;-------------------------------------------------------------------------
-; DOS
-;-------------------------------------------------------------------------
-
-DOS = $0700
-
-RENAME = $20 ;RENAME DISK FILE
-DELETE = $21 ;DELETE DISK FILE
-LOCKFL = $23 ;LOCK FILE TO READ ONLY
-UNLOCK = $24 ;UNLOCK LOCKED FILE
-POINT = $25 ;POINT SECTOR
-NOTE = $26 ;NOTE SECTOR
-FORMAT = $FE ;FORMAT
-
-; Command line table, Index values for (DOSVEC),Y -- COMTAB
-; Compatible with OS/A+, DOS XL and SpartaDOS
-
-COMTAB = 0 ;DOS entry jump vector
-ZCRNAME = 3 ;file name crunch routine jump vector
-BUFOFF = 10 ;next parameter buffer offset
-COMFNAM = 33 ;destination buffer for crunch routine
-LBUF = 63 ;command line input buffer
-
;-------------------------------------------------------------------------
; ATASCII CHARACTER DEFS
;-------------------------------------------------------------------------