mul zh,zl
ldiw z,hostparttbl
add zl,_tmp0
- add zh,_tmp1
+ adc zh,_tmp1
ret
; ====================================================================
.cseg
+str_CPM_Disk:
+ .db 10,"<CPM_Disk>",0
+
; DPBs for varios fixed formats
; dpb data starts at 2. byte
; ====================================================================
-pstrn_YAZE:
- .db 10,"<CPM_Disk>",0
-
-
dsk_tst_yaze:
ldiw y,hostbuf
- ldiw z,pstrn_YAZE*2
+ ldiw z,str_CPM_Disk*2
lpm temp2,z+ ; get length
rcall strncmp_p
brne dsk_tyze_not
; Registers : temp drive #
;
; --------------------------------------------------------------------
-; Description: Test, if first 6 tracks are filled with 0xE5,
-; and Size = 8192 KB.
+; Description: Test, if Size = 8192 KB and
+; first 6 tracks are filled with 0xE5.
; Actually, only the first phys. sector is tested, since
; the other 47 sectors are not in memory at this time.
; ====================================================================
cpc temp2,temp
brne dsk_tsimhd_not ;wrong size
+ ldiw y,hostbuf+128-10
+ ldiw z,str_CPM_Disk*2
+ lpm temp2,z+ ; get length
+ rcall strncmp_p
+ breq dsk_tsimhd_found
+
ldiw z,hostbuf
ldi temp2,high(512)
clr _tmp0 ;low(512)
-
dsk_tsimhd_loop:
ld temp,z+
cpi temp,0xE5
dec temp2
brne dsk_tsimhd_loop
+dsk_tsimhd_found:
ori temp,0xff
ret