-bug in GETWORD: fixed "cd x:" incorrect behavior

This commit is contained in:
Anatoliy Belyanskiy committed 2024-03-20 22:08:52 +10:00
1 parent 54b1e804ba
commit f13fdf4eab
13 files changed
+174 -244

No files matched your search

+13 -13
View File
@@ -310,7 +310,7 @@ SET_PRM: PUSH BC
LD A,B
LD C,BIOS.DRV_GET_PAR
RST ToBIOS_18
LD A,(BOOT.S_P_T)
LD A,(BOOT.SectorsPerTrack)
LD L,A
POP AF
PUSH AF
@@ -358,16 +358,16 @@ NX2: LD HL,(BOOT+510)
LD D,(IY+_sBOOT_SECTOR_PARAMS.RESERVED_SECTORS+1)
ADD HL,DE
LD (FAT_FRM),HL ;first sector FAT
LD E,(IY+_sBOOT_SECTOR_PARAMS.S_P_F) ;sectors in FAT
LD D,(IY+_sBOOT_SECTOR_PARAMS.S_P_F+1)
LD A,(BOOT.FAT_NUM) ;amount FATs
LD E,(IY+_sBOOT_SECTOR_PARAMS.SectorsPerFAT16) ;sectors in FAT
LD D,(IY+_sBOOT_SECTOR_PARAMS.SectorsPerFAT16+1)
LD A,(BOOT.Number_of_FATs) ;amount FATs
C_DATA1: ADD HL,DE
DEC A
JR NZ,C_DATA1
LD (DIR_FRM),HL ;first sector DIR
EX DE,HL
LD L,(IY+_sBOOT_SECTOR_PARAMS.F_P_DIR) ;Number file handel
LD H,(IY+_sBOOT_SECTOR_PARAMS.F_P_DIR+1)
LD L,(IY+_sBOOT_SECTOR_PARAMS.FilesInRootDIR) ;Number file handel
LD H,(IY+_sBOOT_SECTOR_PARAMS.FilesInRootDIR+1)
ADD HL,HL
ADD HL,HL
ADD HL,HL
@@ -381,10 +381,10 @@ C_DATA1: ADD HL,DE
ADD HL,DE
LD (DAT_FRM),HL ;First sector data
LD C,(IY+_sBOOT_SECTOR_PARAMS.B_P_S) ;Size sector
LD B,(IY+_sBOOT_SECTOR_PARAMS.B_P_S+1)
LD C,(IY+_sBOOT_SECTOR_PARAMS.BytesPerSector) ;Size sector
LD B,(IY+_sBOOT_SECTOR_PARAMS.BytesPerSector+1)
LD HL,0
LD A,(BOOT.S_P_C)
LD A,(BOOT.SectorsPerCluster)
NEXTAD3:
ADD HL,BC ;calc. cluster size
DEC A
@@ -518,7 +518,7 @@ FLOAD: LD (READMEM),DE
LD_FILE: PUSH HL
CALL NSECTOR
LD DE,(READMEM)
LD A,(BOOT.S_P_C)
LD A,(BOOT.SectorsPerCluster)
CP #20
JR C,SMALL_CLUSTER
LD BC,#20*256 + BIOS.DRV_READ_LONG
@@ -554,7 +554,7 @@ SMALL_CLUSTER:
; DEC HL
; DEC HL
; EX DE,HL
; LD A,(BOOT.S_P_C)
; LD A,(BOOT.SectorsPerCluster)
; LD B,A
; LD HL,0
; LD IX,0
@@ -578,7 +578,7 @@ NSECTOR:
LD DE,0
DEC HL
DEC HL
LD A,(BOOT.S_P_C)
LD A,(BOOT.SectorsPerCluster)
XOR 1
JR Z,.skip
;
@@ -643,7 +643,7 @@ R_F_F12 LD D,H
RR L
PUSH AF
EX DE,HL
LD HL,(BOOT.B_P_S)
LD HL,(BOOT.BytesPerSector)
LD B,H
LD C,L
ADD HL,HL