]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avrcpm/avr/init.asm
* ipl.mac added
[avrcpm.git] / avrcpm / avr / init.asm
index f38883e824683db1d6a4f07315ec1d8e3b1bedf3..4ffff96751146fe23503e3211ed2cf09f066c5e9 100644 (file)
@@ -123,7 +123,7 @@ clr_l:
 
 .if BOOTWAIT
        ldi temp,10
-       call delay_ms
+       rcall delay_ms
 
 .endif
 
@@ -147,7 +147,7 @@ ramtestw:
        ldi     temp2,8
 ramtestwl:
        ldi     temp,255
-       call    delay_ms
+       rcall   delay_ms
        dec     temp2
        brne    ramtestwl
 
@@ -203,7 +203,7 @@ boot_again:
        printnewline
        printstring "Initing mmc...",0
        printnewline
-       call    mgr_init_partitions
+       lcall   mgr_init_partitions
 
        cbr     temp,0x80
        brne    boot_ipl2
@@ -219,7 +219,7 @@ boot_iplwl:
        
 
 boot_ipl2:
-       call    mgr_prnt_parttbl
+       lcall   mgr_prnt_parttbl
        printnewline
        printstring "Partinit done."
 
@@ -227,11 +227,21 @@ boot_ipl2:
 
 ; Read first sector of first CP/M partition (ipl)
 
-       lds     xl,hostparttbl+1
-       lds     xh,hostparttbl+2
-       lds     yl,hostparttbl+3
-       lds     yh,hostparttbl+4
-       rcall   mmcReadSect
+;      lds     xl,hostparttbl+1
+;      lds     xh,hostparttbl+2
+;      lds     yl,hostparttbl+3
+;      lds     yh,hostparttbl+4
+;      rcall   mmcReadSect
+
+;      Disk 0
+       sts     seekdsk,_0
+;      Track 0
+       sts     seektrk,_0
+       sts     seektrk+1,_0
+;      Sector 0
+       sts     seeksec,_0
+
+       rcall   dsk_read
 
 ;      rcall   dsk_cboot               ;init (de)blocking buffer
 
@@ -247,6 +257,6 @@ iplwriteloop:
        brne iplwriteloop
        cpi zh,high(hostbuf+128)
        brne iplwriteloop
-       jmp z80_init
+       ljmp z80_init