]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - init.asm
* New macros sbiw and INTERRUPT:
[avrcpm.git] / init.asm
index 374bdd24bc785d9ff0014ca8c8bee838d4a8e670..f38883e824683db1d6a4f07315ec1d8e3b1bedf3 100644 (file)
--- a/init.asm
+++ b/init.asm
@@ -1,5 +1,4 @@
 ;    Various functions: init, (RAM) disk, mmc, timer
-;    This file needs to get split up.
 ;
 ;    Copyright (C) 2010 Sprite_tm
 ;    Copyright (C) 2010 Leo C.
@@ -124,7 +123,7 @@ clr_l:
 
 .if BOOTWAIT
        ldi temp,10
-       rcall delay_ms
+       call delay_ms
 
 .endif
 
@@ -141,15 +140,14 @@ clr_l:
 ramtestw:
        mov temp,xh
        eor temp,xl
-       mem_write
-       adiw xl,1
+       rcall   dram_write_pp
        brcc ramtestw
        printstring "wait..."
 
        ldi     temp2,8
 ramtestwl:
        ldi     temp,255
-       rcall   delay_ms
+       call    delay_ms
        dec     temp2
        brne    ramtestwl
 
@@ -194,8 +192,7 @@ ramtestrok:
        ldiw    x,0
 ramfillw:
        ldi temp,MEMFILL_VAL
-       mem_write
-       adiw xl,1
+       rcall   dram_write_pp
        brcc ramfillw
 .endif
 
@@ -226,9 +223,9 @@ boot_ipl2:
        printnewline
        printstring "Partinit done."
 
-       rcall   dsk_cboot               ;init (de)blocking buffer\r
+       rcall   dsk_cboot               ;init (de)blocking buffer
 
-; Read first sector of first CP/M partition
+; Read first sector of first CP/M partition (ipl)
 
        lds     xl,hostparttbl+1
        lds     xh,hostparttbl+2
@@ -236,7 +233,7 @@ boot_ipl2:
        lds     yh,hostparttbl+4
        rcall   mmcReadSect
 
-       rcall   dsk_cboot               ;init (de)blocking buffer
+;      rcall   dsk_cboot               ;init (de)blocking buffer
 
 ;First sector of disk or first CP/M partition is in hostbuf.
 
@@ -245,8 +242,7 @@ boot_ipl2:
        ldiw x,IPLADDR
 iplwriteloop:
        ld temp,z+
-       mem_write
-       adiw xl,1
+       rcall   dram_write_pp
        cpi zl,low(hostbuf+128)
        brne iplwriteloop
        cpi zh,high(hostbuf+128)