X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/b741422ef658ff493a77618efc302ee1cad07ab3..630ec2d3d01c9e013f14612a7c9f464b4e33663c:/avrcpm/avr/dsk_mgr.asm diff --git a/avrcpm/avr/dsk_mgr.asm b/avrcpm/avr/dsk_mgr.asm index 16977f5..38901cd 100644 --- a/avrcpm/avr/dsk_mgr.asm +++ b/avrcpm/avr/dsk_mgr.asm @@ -65,7 +65,7 @@ mgr_picl: brne mgr_picl ; Start mmc Card interaction - rcall mmcInit + lcall mmcInit andi temp,MMCST_NOINIT & MMCST_NODISK brne mgr_pierr @@ -194,6 +194,7 @@ mgr_pcpl: #if FAT16_SUPPORT rcall fat_scan_partition + rcall fat_reset_cache #endif lds temp,ndisks sbr temp,0x80 @@ -217,19 +218,29 @@ mgr_pcpe: mgr_prnt_parttbl: ldiw z,hostparttbl -pprl: -; Partitiontype examining + lds yl,ndisks + ldi xh,'A' - ldd xl,z+0 -; Empty slot? - cpi xl,dskType_None - breq mgr_goto_next_part +pprl: + ldd temp ,z+1 ;Get partition start + ldd temp2,z+2 + ldd temp3,z+3 + ldd temp4,z+4 printnewline + cp temp,_0 ;If zero ... + cpc temp2,_0 + cpc temp3,_0 + cpc temp4,_0 + breq mgr_prnop ;... no partition table at 0 + +; Partitiontype examining + ldd xl,z+0 ; CP/M ? cpi xl,dskType_CPM brne mgr_prtb_nocpm + rcall mgr_prnt_diskname rcall mgr_prnt_table_cpm rjmp mgr_prnt_size @@ -237,12 +248,14 @@ pprl: mgr_prtb_nocpm: cpi xl,dskType_FAT brne mgr_prtb_nofat + rcall mgr_prnt_diskname rcall mgr_prnt_table_fat rjmp mgr_prnt_size ; RAMDISK ? mgr_prtb_nofat: cpi xl,dskType_RAM brne mgr_prnt_err + rcall mgr_prnt_diskname rcall mgr_prnt_table_ram rjmp mgr_prnt_size ; Entry Error @@ -251,14 +264,11 @@ mgr_prnt_err: rjmp mgr_prnt_size mgr_prnop: + rcall mgr_prnt_diskname rcall mgr_prnt_image mgr_prnt_size: - ldd temp ,z+1 ;Get partition start - ldd temp2,z+2 - ldd temp3,z+3 - ldd temp4,z+4 - lcall print_ultoa + call print_ultoa printstring ", size: " ldd temp ,z+5 ;Get partition size @@ -270,15 +280,15 @@ mgr_prnt_size: ror temp3 ror temp2 ror temp - lcall print_ultoa + call print_ultoa printstring "KB." mgr_goto_next_part: adiw z,PARTENTRY_SIZE - ldi temp,high(hostparttbltop) - cpi zl, low (hostparttbltop) - cpc zh,temp - brlo pprl + inc xh + dec yl + tst yl + brne pprl mgr_pppre: ret @@ -298,6 +308,15 @@ mgr_prnt_fatsize: rjmp mgr_goto_next_part +mgr_prnt_diskname: + push temp + mov temp,xh + call uartputc + ldi temp,':' + call uartputc + pop temp + ret + mgr_prnt_table_cpm: printstring "CP/M partition at: " ret