\r
#if FAT16_SUPPORT\r
rcall fat_scan_partition\r
+ rcall fat_reset_cache
#endif\r
lds temp,ndisks\r
sbr temp,0x80\r
\r
mgr_prnt_parttbl:\r
ldiw z,hostparttbl\r
-pprl:\r
-; Partitiontype examining\r
+ lds yl,ndisks\r
+ ldi xh,'A'\r
\r
- ldd xl,z+0\r
-; Empty slot?\r
- cpi xl,dskType_None\r
- breq mgr_goto_next_part\r
+pprl:
+ ldd temp ,z+1 ;Get partition start
+ ldd temp2,z+2
+ ldd temp3,z+3
+ ldd temp4,z+4
\r
printnewline\r
\r
+ cp temp,_0 ;If zero ...
+ cpc temp2,_0
+ cpc temp3,_0
+ cpc temp4,_0
+ breq mgr_prnop ;... no partition table at 0
+\r
+; Partitiontype examining\r
+ ldd xl,z+0\r
; CP/M ?\r
cpi xl,dskType_CPM\r
brne mgr_prtb_nocpm\r
+ rcall mgr_prnt_diskname\r
rcall mgr_prnt_table_cpm\r
rjmp mgr_prnt_size\r
\r
mgr_prtb_nocpm:\r
cpi xl,dskType_FAT\r
brne mgr_prtb_nofat\r
+ rcall mgr_prnt_diskname\r
rcall mgr_prnt_table_fat\r
rjmp mgr_prnt_size\r
; RAMDISK ?\r
mgr_prtb_nofat:\r
cpi xl,dskType_RAM\r
brne mgr_prnt_err\r
+ rcall mgr_prnt_diskname\r
rcall mgr_prnt_table_ram\r
rjmp mgr_prnt_size\r
; Entry Error\r
rjmp mgr_prnt_size\r
\r
mgr_prnop:\r
+ rcall mgr_prnt_diskname\r
rcall mgr_prnt_image\r
\r
mgr_prnt_size:\r
- ldd temp ,z+1 ;Get partition start\r
- ldd temp2,z+2\r
- ldd temp3,z+3\r
- ldd temp4,z+4\r
- lcall print_ultoa\r
+ call print_ultoa
printstring ", size: "\r
\r
ldd temp ,z+5 ;Get partition size\r
ror temp3\r
ror temp2\r
ror temp\r
- lcall print_ultoa\r
+ call print_ultoa
printstring "KB."\r
\r
mgr_goto_next_part: \r
adiw z,PARTENTRY_SIZE\r
- ldi temp,high(hostparttbltop)\r
- cpi zl, low (hostparttbltop)\r
- cpc zh,temp\r
- brlo pprl\r
+ inc xh
+ dec yl\r
+ tst yl\r
+ brne pprl
\r
mgr_pppre:\r
ret\r
\r
rjmp mgr_goto_next_part\r
\r
+mgr_prnt_diskname:\r
+ push temp\r
+ mov temp,xh
+ call uartputc\r
+ ldi temp,':'
+ call uartputc\r
+ pop temp\r
+ ret\r
+\r
mgr_prnt_table_cpm:\r
printstring "CP/M partition at: "\r
ret\r