]> git.sur5r.net Git - cc65/blobdiff - asminc/atari.inc
Support for self explanatory KBCODE values
[cc65] / asminc / atari.inc
index 34465aee9eb74e0f173e0a66347ff6a949fb6421..98c721296c4473a537e0a79bd3b2f79eeca80fe0 100644 (file)
@@ -7,6 +7,7 @@
 ; - Atari OS manual - XL addendum
 ; - Atari XL/XE rev.2 source code, Atari 1984
 ; - Mapping the Atari - revised edition, Ian Chadwick 1985
+; - SpartaDOS-X User Guide  (Aug-8-2016)
 ;
 ; ##old##       old OS rev.B label - moved or deleted
 ; ##1200xl##    new label introduced in 1200XL OS (rev.10/11)
@@ -106,7 +107,7 @@ 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_VERIFY   = $56      ;verify sector
 SIO_WRITEV   = $57      ;write sector with verify
 SIO_WRITETRK = $60      ;write track (Speedy)
 SIO_READTRK  = $62      ;read track (Speedy)
@@ -183,6 +184,7 @@ FNTFND  = 170           ;($AA) file not found
 PNTINV  = 171           ;($AB) point invalid
 BADDSK  = 173           ;($AD) bad disk
 INCFMT  = 176           ;($B0) DOS 3: incompatible file system
+XNTBIN  = 180           ;($B4) XDOS: file not binary
 
 ; DCB Device Bus Equates
 
@@ -689,7 +691,7 @@ CASFLG  = $030F         ;CASSETTE MODE WHEN SET
 TIMER2  = $0310         ;2-byte final baud rate timer value
 TEMP1   = $0312         ;TEMPORARY STORAGE REGISTER
 ;TEMP2  = $0314         ;##old## TEMPORARY STORAGE REGISTER
-TEMP2   = $0313         ;##1200xl## 1-byte temporary 
+TEMP2   = $0313         ;##1200xl## 1-byte temporary
 PTIMOT  = $0314         ;##1200xl## 1-byte printer timeout
 TEMP3   = $0315         ;TEMPORARY STORAGE REGISTER
 SAVIO   = $0316         ;SAVE SERIAL IN DATA PORT
@@ -756,6 +758,34 @@ FPSCR1  = $05EC         ;6-byte floating point temporary
 
 DOS     = $0700
 
+;-------------------------------------------------------------------------
+; SpartaDOS-X Definitions
+;-------------------------------------------------------------------------
+
+SDX_FLAG     = DOS              ; 'S' for SpartaDOS
+SDX_VERSION  = $0701            ; SD version (e.g. $32 = 3.2, $40 = 4.0)
+                                ; address $0702 contains sub-version, e.g.
+                                ; 8 in case of SDX 4.48
+SDX_KERNEL   = $0703            ; SDX kernel entry point
+SDX_BLOCK_IO = $0706            ; block I/O entry point
+SDX_MISC     = $0709            ; "misc" entry point
+SDX_DEVICE   = $0761
+SDX_DATE     = $077B            ; day, month, year (3 bytes)
+SDX_TIME     = $077E            ; hour, min, sec (3 bytes)
+SDX_DATESET  = $0781
+SDX_PATH     = $07A0            ; 64 bytes
+SDX_IFSYMBOL = $07EB            ; only valid on SDX 4.40 or newer
+SDX_S_LOOKUP = SDX_IFSYMBOL     ; alternative name for SDX_IFSYMBOL
+
+; values for SDX_DEVICE
+
+SDX_CLK_DEV  = $10              ; clock device
+
+; clock device functions
+
+SDX_KD_GETTD = 100              ; get time and date
+SDX_KD_SETTD = 101              ; set time and date
+
 ;-------------------------------------------------------------------------
 ; Cartridge Address Equates
 ;-------------------------------------------------------------------------
@@ -765,7 +795,7 @@ CART    = $BFFC         ;##rev2## 1-byte cartridge present indicator
                         ;0=Cart Exists
 CARTFG  = $BFFD         ;##rev2## 1-byte cartridge flags
                         ;D7  0=Not a Diagnostic Cart
-                        ;    1=Is a Diagnostic cart and control is 
+                        ;    1=Is a Diagnostic cart and control is
                         ;      given to cart before any OS is init.
                         ;D2  0=Init but Do not Start Cart
                         ;    1=Init and Start Cart
@@ -778,7 +808,7 @@ CARTAD  = $BFFE         ;##rev2## 2-byte cartridge start vector
 ;-------------------------------------------------------------------------
 
 GTIA    = $D000         ;CTIA/GTIA area
-.include "_gtia.inc"
+.include "atari_gtia.inc"
 
 ;-------------------------------------------------------------------------
 ; PBI Address Equates
@@ -799,14 +829,14 @@ PDVS    = $D1FF         ;##rev2## parallel device select
 ;-------------------------------------------------------------------------
 
 POKEY     = $D200         ;POKEY area
-.include  "_pokey.inc"
+.include  "atari_pokey.inc"
 
 ;-------------------------------------------------------------------------
 ; ANTIC Address Equates
 ;-------------------------------------------------------------------------
 
 ANTIC     = $D400         ;ANTIC area
-.include  "_antic.inc"
+.include  "atari_antic.inc"
 
 ; PBI RAM Address Equates
 
@@ -889,6 +919,10 @@ SETVBV_org  = $E45C     ;vector to set VBLANK parameters
 CIOV    = $E456         ;vector to CIO
 SIOV    = $E459         ;vector to SIO
 SETVBV  = $E45C         ;vector to set VBLANK parameters
+; aliases in order not to have to sprinkle common code with .ifdefs
+CIOV_org    = CIOV
+SIOV_org    = SIOV
+SETVBV_org  = SETVBV
 .endif
 SYSVBV  = $E45F         ;vector to process immediate VBLANK
 XITVBV  = $E462         ;vector to process deferred VBLANK
@@ -925,7 +959,7 @@ RADON   = 0             ;INDICATES RADIANS
 DEGON   = 6             ;INDICATES DEGREES
 
 ASCZER  = '0'           ;ASCII ZERO
-COLON   = $3A           ;ASCII COLON 
+COLON   = $3A           ;ASCII COLON
 CR      = $9B           ;SYSTEM EOL (CARRIAGE RETURN)
 
 ;-------------------------------------------------------------------------
@@ -997,12 +1031,40 @@ diopp_size   = 5        ; size of structure
 ; VALUES for dos_type
 ;-------------------------------------------------------------------------
 
-ATARIDOS     = 0
-SPARTADOS    = 1
-OSADOS       = 2        ; OS/A+
-MYDOS        = 3
+SPARTADOS    = 0
+REALDOS      = 1
+BWDOS        = 2
+OSADOS       = 3        ; OS/A+
 XDOS         = 4
+ATARIDOS     = 5
+MYDOS        = 6
 NODOS        = 255
+; The DOSes with dos_type below or equal MAX_DOS_WITH_CMDLINE do support
+; command line arguments.
+MAX_DOS_WITH_CMDLINE = XDOS
+
+;-------------------------------------------------------------------------
+; XDOS defines (version 2.4, taken from xdos24.pdf)
+;-------------------------------------------------------------------------
+
+XOPT         = $070B    ; XDOS options
+XCAR         = $070C    ; XDOS cartridge address (+ $70D)
+XPAT         = $086F    ; XDOS bugfix and patch number
+XVER         = $0870    ; XDOS version number
+XFILE        = $087D    ; XDOS filename buffer
+XLINE        = $0880    ; XDOS DUP input line
+XGLIN        = $0871    ; get line
+XSKIP        = $0874    ; skip parameter
+.ifdef __ATARIXL__
+.ifndef SHRAM_HANDLERS
+.import XMOVE_handler
+.endif
+.define XMOVE XMOVE_handler
+XMOVE_org    = $0877    ; move filename
+.else
+XMOVE        = $0877    ; move filename
+.endif
+XGNUM        = $087A    ; get number
 
 ;-------------------------------------------------------------------------
 ; End of atari.inc