]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avr/dsk_mgr.asm
* cpm/ipl.mac
[avrcpm.git] / avr / dsk_mgr.asm
index eefee45ed509575fdc74923ebe8b63546f2eb585..f0a570292ad8c445e306d61430d541956b05170a 100644 (file)
@@ -116,8 +116,10 @@ mgr_check_bootsektor:
        std     y+4,_0
        std     y+5,_0                  ;max CP/M 2.2 disk size
        std     y+6,temp                ;
-;      std     y+7,_0
-;      std     y+8,_0
+
+       ldi     temp3,0
+       rcall   dpb_imgdata_get
+
        rjmp    mgr_pend
 
 ; Search for valid Partitions and ImageFiles 
@@ -134,8 +136,7 @@ mgr_ploop:
        cpi     temp,PARTID_CPM
        brne    mgr_nextp
        
-       rcall    cpm_add_partition
-
+       rcall   cpm_add_partition
        inc     temp3
        sts     ndisks,temp3
        adiw    y,PARTENTRY_SIZE
@@ -143,7 +144,7 @@ mgr_ploop:
        breq    mgr_pend
        
 mgr_nextp:
-       adiw    zl,16
+       adiw    z,16
        dec     temp4
        brne    mgr_ploop
 
@@ -178,7 +179,18 @@ mgr_nextp2:
 #endif
 
 mgr_pend:
-       lds     temp,ndisks             ;return # of "disks"
+       lds     temp4,ndisks
+       clr     temp3
+mgr_imgd_lp:
+       tst     temp4
+       breq    mgr_pend2
+       rcall   dpb_imgdata_get
+       inc     temp3
+       dec     temp4
+       rjmp    mgr_imgd_lp
+
+mgr_pend2:
+       lds     temp,ndisks     ;return # of "disks"
        tst     temp
        ret