]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/shadow_ram_prepare.s
Merge pull request #48 from efornara/time_fix
[cc65] / libsrc / atari / shadow_ram_prepare.s
index 4dd0338b96a3703d7000138616eeb8fa55935806..a08aa8cfeb8c33ff7550fac100020c94db367ef1 100644 (file)
@@ -9,9 +9,9 @@
 ; Christian Groessler, chris@groessler.org, 2013
 ;
 
-DEBUG   =       1
+;DEBUG   =       1
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 
         .export         sramprep
         .import         __SRPREP_LOAD__, __SRPREPCHNK_LAST__
@@ -90,7 +90,7 @@ sramprep:
         lda     lodadr+1
         sta     RAMTOP
 
-       ; set APPMHI to MEMLO (+ 1 for sanity)
+        ; set APPMHI to MEMLO (+ 1 for sanity)
         lda     MEMLO
         clc
         adc     #1
@@ -104,7 +104,7 @@ sramprep:
 
 
         jsr     findfreeiocb
-.ifdef DEBUG           ; only check in debug version, this shouldn't really happen(tm)
+.ifdef DEBUG            ; only check in debug version, this shouldn't really happen(tm)
         beq     iocbok
         print_string "Internal error, no free IOCB!"
         jsr     delay
@@ -349,34 +349,33 @@ restore:lda     RAMTOP_save
         sta     APPMHI+1
         rts
 
-
-.ifdef DEBUG
-
-.byte "HERE ****************** HERE ***************>>>>>>"
-
-sramsize:
-        .word   __SHADOW_RAM_SIZE__
-
 ; short delay
 .proc   delay
 
         lda     #10
-l:      jsr     delay1
+@loop:  jsr     delay1
         clc
         sbc     #0
-        bne     l
+        bne     @loop
         rts
 
 delay1: ldx     #0
         ldy     #0
-loop:   dey
-        bne     loop
+@loop:   dey
+        bne     @loop
         dex
-        bne     loop
+        bne     @loop
         rts
 
 .endproc
 
+.ifdef DEBUG
+
+.byte "HERE ****************** HERE ***************>>>>>>"
+
+sramsize:
+        .word   __SHADOW_RAM_SIZE__
+
 .endif          ; .ifdef DEBUG
 
 screen_device:  .byte "S:",0
@@ -403,4 +402,4 @@ screen_device_length = * - screen_device
         .word   INITAD+1
         .word   sramprep
 
-.endif  ; .if .defined(__ATARIXL__)
+.endif  ; .ifdef __ATARIXL__