1 ; Filesystem functions for the Interaction with BIOS and Disks
3 ; Copyright (C) 2010 Frank Zoll
5 ; This file is part of avrcpm.
7 ; avrcpm is free software: you can redistribute it and/or modify it
8 ; under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation, either version 3 of the License, or
10 ; (at your option) any later version.
12 ; avrcpm is distributed in the hope that it will be useful,
13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ; GNU General Public License for more details.
17 ; You should have received a copy of the GNU General Public License
18 ; along with avrcpm. If not, see <http://www.gnu.org/licenses/>.
25 ; ---------------- Defines for the Filesystem Interface -------
27 ;*****************************************************
28 ;* Disk-Manager constants *
29 ;*****************************************************
31 ; Fields in the parttabl
33 .equ MAXDISKS = 8 ;Max number of Disks (partitions)
34 .equ PARTENTRY_SIZE = 9 ;Size of a Partitiontableentry
42 .equ dskType_None = 0 << 4
43 .equ dskType_CPM = 1 << 4
44 .equ dskType_FAT = 2 << 4
45 ; .equ dskType_RAM = 3 << 4
46 .equ dskType_MASK = 0xf << 4
48 ;*****************************************************
49 ;* CP/M to host disk constants *
50 ;*****************************************************
51 ; .equ blksize = 1024 ;CP/M allocation size
54 .equ HOSTSIZE = 512 ;host disk sector size
55 .equ HOSTBLK = HOSTSIZE/128 ;CP/M sects/host buff
56 .equ SECMSK = HOSTBLK-1 ;sector mask
57 .equ SECSHF = log2(HOSTBLK) ;sector shift
59 ;*****************************************************
60 ;* BDOS constants on entry to write *
61 ;*****************************************************
62 .equ WRALL = 0 ;write to allocated
63 .equ WRDIR = 1 ;write to directory
64 .equ WRUAL = 2 ;write to unallocated
65 .equ WRTMSK= 3 ;write type mask
72 ;----------------------------------------------- Start of Data Segment
76 ; The following 3 variables are copied from DRAM.
83 ndisks: .byte 1 ;Number of CP/M disks
85 ; The following 5 variables are accessed from 8080/z80 via the
86 ; virtual port interface. Don't change order.
89 bcbadr: .byte 2 ;adr of BiosControlBlock
90 seekdsk: .byte 1 ;seek disk number
91 seektrk: .byte 2 ;seek track number
92 seeksec: .byte 2 ;seek sector number
93 dmaadr: .byte 2 ;last dma address
95 hdrsize: .byte 1 ;Image header size (offset)
96 cpmspt: .byte 1 ;CP/M sectors per track
97 secpblk: .byte 1 ;sectors per block (alloc size)
98 unacnt: .byte 1 ;unalloc rec cnt
99 unadsk: .byte 1 ;last unalloc disk
100 unatrk: .byte 2 ;last unalloc track
101 unasec: .byte 2 ;last unalloc sector
103 erflag: .byte 1 ;error reporting
104 wrtype: .byte 1 ;write operation type
106 hostdsk: .byte 1 ;host disk number
107 hostlba: .byte 2 ;host sector number (relative to partition start)
108 hostparttbl: .byte PARTENTRY_SIZE*MAXDISKS ;host partition table (type, start sector, sector count)
110 hostbuf: .byte HOSTSIZE ;host buffer (from/to SD-card)
113 ; ------------------------------- Start of Code Segment
116 ;---------------------------------------------------------------------
127 printstring "drvtbl ("
154 lds temp2,biosdrvtbl+1
158 lds temp2,biosdirbuf+1
162 lds temp2,biosenddat+1
168 ; ====================================================================
169 ; ====================================================================
170 ; Function: Get a Pointer to a Partitiontable entry
171 ; ====================================================================
173 ; --------------------------------------------------------------------
174 ; Registers : [w] z Pointer to the Partitionentry
175 ; [r] zl Number of Diskentry to Read
178 ; --------------------------------------------------------------------
180 ; ====================================================================
183 ldi zh,PARTENTRY_SIZE
190 ; ====================================================================
191 ; ====================================================================
192 ; Function: Virtual Port Interface
193 ; ====================================================================
195 ; --------------------------------------------------------------------
199 ; --------------------------------------------------------------------
201 ; ====================================================================
210 rcall dsk_param_getadr
212 cpi temp3,bcbadr+1-biospar_base
217 cpi temp3,seekdsk-biospar_base
219 rcall dsk_param_getadr
234 ; rcall dbg_print_biosd
235 rcall dpb_drvtblclear
240 ; ====================================================================
241 ; Function: Check if disk exists
242 ; ====================================================================
244 ; --------------------------------------------------------------------
247 ; return 0, if selected disk not exist.
248 ; return !0, if disk exist
249 ; --------------------------------------------------------------------
251 ; ====================================================================
257 printstring "DiskCheck: "
261 brsh dsk_dchrd ;maybe ramdisk
266 ; No disks yet, need to init
268 rcall dpb_drvtblclear
274 rcall mgr_init_partitions ;disk chanched?
283 lcall mgr_prnt_parttbl
293 ; Check if selected disk # is less then # of disks.
301 printstring "Select: "
304 rcall dpb_drvtbl_entry_get
305 or temp,temp2 ;if !0, drive is allready initialized
309 rcall dpb_biosdph_get
315 rcall dpb_drvtbl_entry_get
325 ldi temp,0 ;error return
332 cpi temp,RAMDISKNR+RAMDISKCNT
335 ldi temp,0xff ;return ok
339 ldi temp,0 ;error return
343 ; ====================================================================
344 ; Function: Return status of last disk i/o function
345 ; ====================================================================
347 ; --------------------------------------------------------------------
350 ; --------------------------------------------------------------------
352 ; ====================================================================
358 ; ====================================================================
359 ; ====================================================================
368 .db 10,"<CPM_Disk>",0
370 ; DPBs for varios fixed formats
371 ; dpb data starts at 2. byte
373 dpbdat_avrcpm: ;(dpb243)
374 .db 0x00,0x1A ;sector offset, low(spt)
375 .db 0x00,0x03 ;high (spt), block shift
376 .db 0x07,0x00 ;bock mask, extent mask
377 .db 0xF2,0x00 ;disk size - 1,
378 .db 0x3F,0x00 ;dir max
379 .db 0xC0,0x00 ;alloc0, alloc1
380 .db 0x10,0x00 ;chk size
381 .db 0x02,0x00 ;offset
384 .db 0x02,0x80 ;sector offset, low(spt)
385 .db 0x00,0x05 ;high (spt), block shift
386 .db 0x1F,0x01 ;bock mask, extent mask
387 .db 0xFF,0x07 ;disk size - 1,
388 .db 0xFF,0x03 ;dir max
389 .db 0xFF,0x00 ;alloc0, alloc1
390 .db 0x00,0x01 ;chk size
391 .db 0x00,0x00 ;offset
394 .db 0x00,0x20 ;sector offset, low(spt)
395 .db 0x00,0x05 ;high (spt), block shift
396 .db 0x1F,0x01 ;bock mask, extent mask
397 .db 0xF9,0x07 ;disk size - 1,
398 .db 0xFF,0x03 ;dir max
399 .db 0xFF,0x00 ;alloc0, alloc1
400 .db 0x00,0x01 ;chk size
401 .db 0x06,0x00 ;offset
406 .db 0x04,0x0F ;block shift, bock mask
407 .db 0x00,0xFB ;extent mask, low(disk size -1),
408 .db 0x01,0xBF ;high(disk size -1), low(dir max)
409 .db 0x00,0xE0 ;high(dir max), alloc0
410 .db 0x00,0x30 ;alloc1, low(chk size)
411 .db 0x00,0x02 ;high(chk size), low(offset)
412 .db 0x00,0x00 ;high(offset), fill
415 .db 0x05,0x1F ;block shift, bock mask
416 .db 0x01,0xFD ;extent mask, low(disk size -1),
417 .db 0x07,0xFF ;high(disk size -1), low(dir max)
418 .db 0x01,0xF0 ;high(dir max), alloc0
419 .db 0x00,0x80 ;alloc1, low(chk size)
420 .db 0x00,0x02 ;high(chk size), low(offset)
421 .db 0x00,0x00 ;high(offset), fill
425 ; Copy the dpb data from flash memory, pointed to by Z, to temp ram.
441 ; Copy the dpb data, pointed to by Z to temp ram.
454 ; String compare (z, y), one z-string in flash.
470 ; String compare (x, y, temp2). Max temp2 bytes are compared.
486 ; ====================================================================
487 ; Function: get drive table entry pointer for drive # in temp
488 ; ====================================================================
490 ; --------------------------------------------------------------------
494 ; --------------------------------------------------------------------
496 ; ====================================================================
507 ; ====================================================================
508 ; Function: get drive table entry for drive # in temp
509 ; ====================================================================
511 ; --------------------------------------------------------------------
515 ; --------------------------------------------------------------------
517 ; ====================================================================
519 dpb_drvtbl_entry_get:
521 rcall dpb_drvtbl_entry_p
525 ; ====================================================================
526 ; Function: Clear drive table (entries 0 to 7)
527 ; ====================================================================
529 ; --------------------------------------------------------------------
533 ; --------------------------------------------------------------------
535 ; ====================================================================
554 lds temp2,biosenddat+1
564 ; ====================================================================
565 ; Function: Test disk format: avrcpmhd
566 ; ====================================================================
568 ; --------------------------------------------------------------------
569 ; Registers : temp drive #
571 ; --------------------------------------------------------------------
572 ; Description: Not implemented yet.
573 ; ====================================================================
576 clr temp ; Test, return 'not found' for now.
580 ; ====================================================================
581 ; Function: Test disk format: YAZE
582 ; ====================================================================
584 ; --------------------------------------------------------------------
585 ; Registers : temp drive #
587 ; --------------------------------------------------------------------
588 ; Description: From the YAZE Doc:
590 ; The new disk header occupies the first 128 BYTES of the file and has the
594 ; 10 - 15 a null-terminated ascii comment (may be empty)
595 ; new 16 version (0 = yaze-1.06/1.10, 1 = yaze-ag-2.xx)
596 ; 17 - 31 a null-terminated ascii comment (may be empty)
597 ; 32 - 33 sectors per track
598 ; 34 block shift factor
601 ; 37 - 38 disk size max
602 ; 39 - 40 directory max
605 ; 43 - 44 check size (always zero)
606 ; 45 - 46 track offset
607 ; new 47 psh (used if version=1 and CP/M 3.1 is running)
608 ; new 48 phm ( " " " " " " " " " )
609 ; 49 - 127 unused (zeros)
610 ; ====================================================================
616 ldiw z,str_CPM_Disk*2
617 lpm temp2,z+ ; get length
623 ldi temp,1 ;1 sector header size
630 clr temp ;Not a YAZE disk image.
633 ; ====================================================================
634 ; Function: Test disk format: MyZ80
635 ; ====================================================================
637 ; --------------------------------------------------------------------
638 ; Registers : temp drive #
640 ; --------------------------------------------------------------------
641 ; Description: Test, if first 2 Sectors are filled with 0xE5,
642 ; and Size = 8192KB + 256Bytes.
643 ; ====================================================================
647 rcall dsk_getpartentry ;get partition entry
649 ldd temp2,z+PTAB_SIZE+1 ;check, if size is 16385 phys. sectors
653 brne dsk_tmyz80_not ;wrong size
669 clr temp ;Not a MyZ80 hard disk image.
672 ; ====================================================================
673 ; Function: Test disk format: simhd, simh altair 8800 hard disk format
674 ; ====================================================================
676 ; --------------------------------------------------------------------
677 ; Registers : temp drive #
679 ; --------------------------------------------------------------------
680 ; Description: Test, if Size = 8192 KB and
681 ; first 6 tracks are filled with 0xE5.
682 ; Actually, only the first phys. sector is tested, since
683 ; the other 47 sectors are not in memory at this time.
684 ; ====================================================================
688 rcall dsk_getpartentry ;get partition entry
690 ldd temp2,z+PTAB_SIZE+1 ;check, if size is 16384 phys. sectors
694 brne dsk_tsimhd_not ;wrong size
696 ldiw y,hostbuf+128-10
697 ldiw z,str_CPM_Disk*2
698 lpm temp2,z+ ; get length
700 breq dsk_tsimhd_found
719 clr temp ;Not a simhd hard disk image.
722 ; ====================================================================
724 ; ====================================================================
726 ; --------------------------------------------------------------------
727 ; Registers : temp3 drive #
729 ; --------------------------------------------------------------------
731 ; ====================================================================
735 ; Get first sector (512 byte) of current drive into hostbuf.
740 rcall dsk_readhost_lba
742 ; Test for variable format avrcpmhd.
744 rcall dsk_tst_avrcpmhd
747 ; Test for YAZE formats.
752 ; Test for simhd format.
755 ldiw z,dpbdat_simhd*2
758 ; Test for MyZ80 format.
761 ldiw z,dpbdat_myz80*2
764 ; No special image found. Use avrcpm.
766 ldiw z,dpbdat_avrcpm*2
775 ; ====================================================================
776 ; Function: Add CP/M image format data to partition table data
777 ; ====================================================================
779 ; --------------------------------------------------------------------
780 ; Registers : temp3 drive #
782 ; --------------------------------------------------------------------
784 ; ====================================================================
788 ; Test for known CP/M formats
791 breq dpb_imgd_err ;no known format detected
795 rcall dsk_getpartentry ;get partition entry
798 ; std y+12,_0 ;Test: set check size to 0
802 andi temp,~dskType_MASK
803 ldd temp2,z+PTAB_TYPE
804 andi temp2,dskType_MASK
810 tst temp ;more then 256 sectors per track?
811 brne dsk_imgprp_err ;todo: support 16 bit sector numbers
825 printstring ": Format not supported: Too much sectors per track! "
832 ; ====================================================================
834 ; ====================================================================
836 ; --------------------------------------------------------------------
837 ; Registers : temp drive #
841 ; --------------------------------------------------------------------
842 ; Description: Init CP/M data structures
844 ; -----------------------------------------------------------------
845 ; DPH: | XLT | | | |DIRBUF | DPB | CSV | ALV |
846 ; -----------------------------------------------------------------
847 ;offset: 0 2 4 6 8 10 12 14
849 ; -------------------------------------------------------------
850 ; DPB: | SPT |BSH|BLM|EXM| DSM | DRM |AL0|AL1| CKS | OFF |
851 ; -------------------------------------------------------------
853 ; ====================================================================
856 mov temp3,temp ;save disk #
868 rcall heap_get ;returns ptr to dph mem
873 movw y,temp ;save dph pointer
876 rcall dram_writew_pp ;XLT
879 lds temp2,biosdirbuf+1
880 rcall dram_writew_pp ;DIRBUF
890 ldiw z,tmpdpb+1 ;skip sector offset byte
894 cpi zl,low(tmpdpb + 16)
900 rcall dram_writew_pp ;DPB
902 ; get mem for dir check vector
904 lds temp,tmpdpb+12 ;cks
905 lds temp2,tmpdpb+12+1
912 rcall dram_writew_pp ;CSV
914 ; get mem for alloc vector
916 lds temp,tmpdpb+6 ;dsm
925 ror temp ;(dsm+1+7)/8
928 rcall dram_writew_pp ;ALV
930 ; success, insert DPH into drvtbl
933 rcall dpb_drvtbl_entry_p
937 ori temp,0xff ;return ok
946 eor temp,temp ;return 0 (+ Z-flag)
949 ; ====================================================================
951 ; ====================================================================
953 ; --------------------------------------------------------------------
956 ; --------------------------------------------------------------------
958 ; ====================================================================
960 ldd temp2,z+PTAB_TYPE
961 andi temp2,~dskType_MASK ;Lower nibble is image header size
978 ; ====================================================================
979 ; Function: Does a Disk interaction
980 ; ====================================================================
982 ; --------------------------------------------------------------------
984 ; Variables : [r] seeksec Sector to read
985 ; [r] seektrk Track to read
986 ; --------------------------------------------------------------------
988 ; ====================================================================
1000 printstring "Disk read: "
1004 printstring "Disk write: "
1009 printstring ": track "
1013 printstring ", sector "
1016 printstring ", dma-addr "
1022 sbrs temp,WRITE_FUNC
1024 printstring " wrtype "
1030 ;See what has to be done.
1033 sbrc temp,WRITE_FUNC
1040 printstring "DISK I/O: Invalid Function code: "
1045 sts ndisks,_0 ;no active partitions
1047 cbi flags,hostact ;host buffer inactive
1048 sts unacnt,_0 ;clear unalloc count
1052 sbis flags,hostwrt ;check for pending write
1053 cbi flags,hostact ;clear host active flag
1058 ; ====================================================================
1059 ; Function: Does a Disk read operation
1060 ; ====================================================================
1062 ; --------------------------------------------------------------------
1063 ; Registers : in: temp
1064 ; Variables : [r] seekdsk Number of Disk to Read
1065 ; [r] seeksec Sector to read
1066 ; [r] seektrk Track to read
1067 ; --------------------------------------------------------------------
1069 ; ====================================================================
1072 sbi flags,readop ; Set read operation flag
1081 rcall dsk_getpartentry ; Get Paritiontableentry
1082 ld temp,z ; Get Partitiontype
1083 andi temp,dskType_MASK
1086 cpi temp,dskType_None
1090 ; It must be a FAT16-Imagefile or CP/M Partition.
1092 rcall dsk_setdrvparam ;todo: do this only if needed (disk change)
1095 sbi flags,rsflag ;must read data
1096 ldi temp,WRUAL ;write type
1097 sts wrtype,temp ;treat as unalloc
1099 rjmp dsk_rwoper ;to perform the read
1104 ; ====================================================================
1105 ; Function: Does a Disk write operation
1106 ; ====================================================================
1108 ; --------------------------------------------------------------------
1109 ; Registers : in: temp Write type
1110 ; Variables : [r] seekdsk Number of Disk to Read
1111 ; [r] seeksec Sector to read
1112 ; [r] seektrk Track to read
1113 ; --------------------------------------------------------------------
1115 ; ====================================================================
1117 ;write the selected sector
1119 cbi flags,readop ; not a read operation
1127 rcall dsk_getpartentry ; Get Paritiontableentry
1128 ld temp2,z ; Get Partitiontype
1129 andi temp2,dskType_MASK
1132 cpi temp2,dskType_None
1137 ; It must be a FAT16-Imagefile or CP/M Partition.
1139 rcall dsk_setdrvparam ;todo: do this only if needed (disk change)
1142 sts wrtype,temp ;save write type
1144 cpi temp,WRUAL ;write unallocated?
1145 brne dsk_chkuna ;check for unalloc
1147 ; write to unallocated, set parameters
1148 lds temp,secpblk ;next unalloc recs (blocksize/128)
1150 lds temp,seekdsk ;disk to seek
1151 sts unadsk,temp ;unadsk = sekdsk
1153 sts unatrk,temp ;unatrk = sectrk
1155 sts unatrk+1,temp ;unatrk = sectrk
1157 sts unasec,temp ;unasec = seksec
1160 ;check for write to unallocated sector
1161 lds temp,unacnt ;any unalloc remain?
1163 breq dsk_alloc ;skip if not
1165 ; more unallocated records remain
1166 dec temp ;unacnt = unacnt-1
1168 lds temp,seekdsk ;same disk?
1170 cp temp,temp2 ;seekdsk = unadsk?
1171 brne dsk_alloc ;skip if not
1173 ; disks are the same
1178 cp temp,temp3 ;seektrk = unatrk?
1180 brne dsk_alloc ;skip if not
1182 ; tracks are the same
1183 lds temp,seeksec ;same sector?
1185 cp temp,temp2 ;seeksec = unasec?
1186 brne dsk_alloc ;skip if not
1188 ; match, move to next sector for future ref
1189 inc temp2 ;unasec = unasec+1
1192 cp temp2,_tmp0 ;end of track? (count CP/M sectors)
1193 brlo dsk_noovf ;skip if no overflow
1195 ; overflow to next track
1196 sts unasec,_0 ;unasec = 0
1199 subi temp, low(-1) ;unatrk = unatrk+1
1205 cbi flags,rsflag ;rsflag = 0
1206 rjmp dsk_rwoper ;to perform the write
1209 ;not an unallocated record, requires pre-read
1210 sts unacnt,_0 ;unacnt = 0
1211 sbi flags,rsflag ;rsflag = 1
1217 ; ====================================================================
1218 ; Function: Does a Disk read/write operation
1219 ; ====================================================================
1221 ; --------------------------------------------------------------------
1223 ; Variables : [r] seekdsk Number of Disk to Read
1224 ; [r] seeksec Sector to read
1225 ; [r] seektrk Track to read
1226 ; --------------------------------------------------------------------
1228 ; ====================================================================
1230 ;enter here to perform the read/write
1232 printstring ", flags: "
1236 ;Convert track/sector to an LBA address (in 128byte blocks)
1241 lds temp,hdrsize ;add image header size
1245 lds temp4,seektrk+1 ;
1251 add xh,r0 ;yl:xh:xl := sec + trk * SectorsPerTrack
1255 andi temp,SECMSK ;mask buffer number
1256 push temp ;save for later
1258 ;Convert from CP/M LBA blocks to host LBA blocks
1266 ;todo: yl should be 0 here.
1267 ;xh:xl = host block to seek
1270 rcall dsk_rw_hostbuf
1272 ;copy data to or from buffer
1275 pop temp2 ;get buffer number (which part of hostbuf)
1277 add zl,r0 ;offset in hostbuf
1282 printstring "; host buf adr: "
1288 ldi temp3,128 ;length of move
1289 sbic flags,readop ;which way?
1290 rjmp dsk_rmove ;skip if read
1292 ; mark write operation
1293 sbi flags,hostwrt ;hostwrt = 1
1309 ; data has been moved to/from host buffer
1310 lds temp,wrtype ;write type
1311 cpi temp,WRDIR ;to directory?
1313 ret ;no further processing
1315 ; clear host buffer for directory write
1321 rcall dsk_writehost ;clear host buff
1322 cbi flags,hostwrt ;buffer written
1325 ; ====================================================================
1327 ; ====================================================================
1329 ; --------------------------------------------------------------------
1330 ; Registers : temp2:temp block to read (lba)
1333 ; --------------------------------------------------------------------
1335 ; ====================================================================
1339 printstring "readhst lba"
1341 sbi flags,rsflag ;must read data
1342 rcall dsk_rw_hostbuf
1343 lds temp,erflag ;returns 0, if ok
1347 ; ====================================================================
1348 ; Function: Get physical disk sector in hostbuf.
1349 ; ====================================================================
1351 ; --------------------------------------------------------------------
1352 ; Registers : temp2:temp host block to read/write (lba)
1355 ; --------------------------------------------------------------------
1357 ; ====================================================================
1359 ;xh:xl = host block to seek
1360 sts erflag,_0 ;no errors (yet)
1362 ; active host sector?
1363 in _tmp0,flags ;host active flag
1364 sbi flags,hostact ;always becomes 1
1365 sbrs _tmp0,hostact ;was it already?
1366 rjmp dsk_filhst ;fill host if not
1368 ; host buffer active, same as seek buffer?
1369 lds _tmp0,hostdsk ;same disk?
1370 cp temp3,_tmp0 ;seekdsk = hostdsk?
1373 ; same disk, same block?
1381 ;proper disk, but not correct sector
1382 sbis flags,hostwrt ;host written?
1387 rcall dsk_writehost ;clear host buff
1393 ;may have to fill the host buffer
1398 sbic flags,rsflag ;need to read?
1399 rcall dsk_readhost ;yes, if 1
1400 cbi flags,hostwrt ;no pending write
1405 ; ====================================================================
1406 ; Function: Does a Disk write operation
1407 ; ====================================================================
1409 ; --------------------------------------------------------------------
1411 ; Variables : [r] seekdsk Number of Disk to Read
1412 ; [r] seeksec Sector to read
1413 ; [r] seektrk Track to read
1414 ; --------------------------------------------------------------------
1416 ; ====================================================================
1419 rcall dsk_getpartentry
1421 andi temp,dskType_MASK
1424 ; Is it a FAT16 Diskimage ?
1425 cpi temp,dskType_FAT
1430 ; Is it a CP/M Partition ?
1431 cpi temp,dskType_CPM
1434 ; Disktype not supported -> Return
1437 ; ====================================================================
1438 ; Function: Does a Disk read operation
1439 ; ====================================================================
1441 ; --------------------------------------------------------------------
1443 ; Variables : [r] seekdsk Number of Disk to Read
1444 ; [r] seeksec Sector to read
1445 ; [r] seektrk Track to read
1446 ; --------------------------------------------------------------------
1448 ; ====================================================================
1453 printstring "readhost"
1455 rcall dbg_hexdump_line
1457 rcall dbg_hexdump_line
1461 rcall dsk_getpartentry
1463 andi temp,dskType_MASK
1466 ; Is it a FAT16 Diskimage ?
1467 cpi temp,dskType_FAT
1472 ; Is it a CP/M Partition ?
1473 cpi temp,dskType_CPM
1476 ; Disktype not supported -> Return
1480 ; vim:set ts=8 noet nowrap