]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/cashdr.s
Changed multi-line C comments into another style.
[cc65] / libsrc / atari / cashdr.s
index 8d3d0868a9722226913edb7216732363fe822f9d..99aefe68f9458eb3554ad97f38937160ecfdfc6a 100644 (file)
@@ -1,40 +1,37 @@
 ;
 ; Cassette boot file header
 ;
-; Christian Groessler, chris@groessler.org, 2013
+; Christian Groessler, chris@groessler.org, 2014
 ;
 
-.ifndef __ATARIXL__
+;DEBUG   = 1
 
-       .include "atari.inc"
+.ifndef __ATARIXL__
 
-       .import __BSS_RUN__, __STARTADDRESS__, start
-       .export _cas_init
+        .include "atari.inc"
 
-.segment        "CASHDR"
+        .import __BSS_RUN__, __STARTADDRESS__, _cas_init
+        .export _cas_hdr
 
-       .byte   0       ; ignored
-       .byte   <((__BSS_RUN__ - __STARTADDRESS__ + 127 + 6) / 128)
-       .word   __STARTADDRESS__
-       .word   _cas_init
+.assert ((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) < $101, error, "File to big to load from cassette"
 
-.segment       "CASINIT"
 
-       lda     #33
-       ldy     #80
-       sta     (SAVMSC),y
-       clc
-       rts
+; for a description of the cassette header, see De Re Atari, appendix C
 
-_cas_init:
-       lda     #34
-       ldy     #81
-       sta     (SAVMSC),y
-
-       lda     #<start
-       sta     DOSVEC
-       lda     #>start
-       sta     DOSVEC+1
-       rts
+.segment        "CASHDR"
 
-.endif ; .ifdef __ATARIXL__
+_cas_hdr:
+        .byte   0                       ; ignored
+        .byte   <((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128)         ; # of 128-byte records to read
+        .word   __STARTADDRESS__        ; load address
+        .word   _cas_init               ; init address
+
+.ifdef  DEBUG
+        lda     #33
+        ldy     #80
+        sta     (SAVMSC),y
+.endif
+        clc
+        rts
+
+.endif  ; .ifdef __ATARIXL__