]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avr/dsk_mgr.asm
* Some bug fixes
[avrcpm.git] / avr / dsk_mgr.asm
index 9cb1aefa959a9c01ef70e30ae52f17261e702bc7..40a2cd443c6de3d25ff3d4603cce6c7e2298f388 100644 (file)
@@ -75,7 +75,7 @@ mgr_picl:
 
 ; Start mmc Card interaction
        lcall   mmcInit
-       andi    temp,MMCST_NOINIT & MMCST_NODISK
+       andi    temp,MMCST_NOINIT | MMCST_NODISK
        brne    mgr_pierr
        
 ;Load first sector from MMC (boot sector)
@@ -205,6 +205,8 @@ mgr_pend2:
 ; ====================================================================
 
 mgr_prnt_parttbl:
+       push    r15
+       push    r14
        ldiw    z,hostparttbl
        lds     yl,ndisks
        ldi     xh,'A'
@@ -214,11 +216,13 @@ pprl:
 
        ldd     temp ,z+1               ;Get partition start
        ldd     temp2,z+2
-       or      temp,temp2
-       ldd     temp2,z+3
-       or      temp,temp2
-       ldd     temp2,z+4
-       or      temp,temp2              ;If zero ...
+       ldd     r14,z+3
+       ldd     r15,z+4
+
+       cp      temp,_0                 ;If zero ...
+       cpc     temp2,_0
+       cpc     r14,_0
+       cpc     r15,_0
        breq    mgr_prnop               ;... no partition table at 0
 
 ; Partitiontype examining
@@ -264,15 +268,11 @@ mgr_prnt_size:
 
        ldd     temp ,z+5               ;Get partition size
        ldd     temp2,z+6
-       push    r15
-       push    r14
        clr     r14
        clr     r15
        lsr     temp2
        ror     temp
        lcall   print_ultoa
-       pop     r14
-       pop     r15
        printstring "KB."
 
 mgr_goto_next_part:    
@@ -282,6 +282,8 @@ mgr_goto_next_part:
        brne    pprl
 
 mgr_pppre:
+       pop     r14
+       pop     r15
        ret