R14 Исправлен баг "File not found" в команде DIR на пустом разделе

This commit is contained in:
Anatoliy Belyanskiy committed 2023-09-22 03:11:40 +10:00
1 parent 851c215879
commit 91b1e90517
11 files changed
+257 -221

No files matched your search

+54 -42
View File
@@ -26,42 +26,21 @@ cmd_dir: push de
;ld de,T9186 ; ¡ãä¥à
ld hl,work_buffer1 ; ¨¬ï ä ©« 
ld de,work_buffer1 ; 80 ¡ãä¥à
ld a,37h ;  âਡãâ (¢á¥, ªà®¬¥ ¬¥âª¨ ⮬ )
ld a,#37 ;  âਡãâ (¢á¥, ªà®¬¥ ¬¥âª¨ ⮬ )
ld bc,0*256 + Dss.F_First ; f_first (ä®à¬ â 11)
RST ToDSS
jp c,print_err_message ; ¢ë¢®¤ á®®¡é¥­¨ï
; %1
;ld a,(system_path) ; ¡ãä¥à ¯®«­®£® á¨áâ. ¯ãâ¨
;ld (T90F6),a
;ld a,":"
;ld (T90F7),a
;xor a
;ld (T90F8),a
ld a,(screen_path) ; ¤¨áª
ld hl,PRM1
ld (hl),a
inc hl
ld (hl),":"
inc hl
ld (hl),0
; %2
ld hl,serial_string ; áâப  á¥à¨©­®£® ­®¬¥à  ¤¨áª 
ld de,PRM2 ; ªã¤ 
call ncopy_string ; ᪮¯¨à. áâபã (á ­ã«¥¬)
;call print_sys_path ; ¢ë¢®¤ á¨áâ. ¯ã⨠­  íªà ­
; %3
ld hl,screen_path ; íªà ­. ¯ãâì
ld de,PRM3 ; 16 ¡ãä¥à
;ld a,(hl)
;ldi ; ᪮¯¨à. áâபã
;or a
;jr nz,$-4
call copy_string ; ᪮¯¨à. áâபã (á ­ã«¥¬)
;R14
;jp c,print_err_message ; ¢ë¢®¤ á®®¡é¥­¨ï DSS_Error.sys.FILE_NOT_FOUND
JR NC,.not_empty
CP DSS_Error.sys.FILE_NOT_FOUND
JP NZ,print_err_message
SCF
JP .Print_Header
.not_empty:
CALL .Print_Header
;
ld de,0 ; ¨­¤¥ªá "Volume in drive %1 has no label..."
call MESSAGE ; ¢ë¢¥á⨠áâபã
; 横« ¢ë¢®¤  ᯨ᪠ ä ©«®¢/¯ ¯®ª
A882C: ;ld hl,T9186 ; à ¡. ¡ãä¥à
.loop: ;ld hl,T9186 ; à ¡. ¡ãä¥à
ld hl,work_buffer1 ; 80
ld de,33
add hl,de
@@ -70,7 +49,7 @@ A882C: ;ld hl,T9186 ; ࠡ.
ld ix,work_buffer1 ; 80
ld a,(ix+32) ;  âਡãâ ⥪. § ¯¨á¨
and 10h ; ¯ ¯ª  ?
jr nz,A8866 ; ¤ 
jr nz,.next ; ¤ 
; ¯à¨¡ ¢¨âì à §¬¥à ⥪. ä ©« 
ld hl,(D88DC)
inc hl
@@ -89,16 +68,14 @@ A882C: ;ld hl,T9186 ; ࠡ.
ld (D88DE),hl
exx
ld (D88E0),hl
A8866: ;ld de,T9186 ; à ¡. ¡ãä¥à
.next: ;ld de,T9186 ; à ¡. ¡ãä¥à
ld de,work_buffer1 ; 80 ¡ãä¥à
ld c,Dss.F_Next ; ¯®¨áª á«¥¤.
RST ToDSS
jr nc,A882C ; ­ § ¤ ¢ 横«
jr A8872 ; ª®­¥æ ᯨ᪠, ­  ¤¥áïâ. ¢ë¢®¤
jr nc,.loop ; ­ § ¤ ¢ 横«, ¥á«¨ ­¥ ª®­¥æ ᯨ᪠
; „¥áïâ¨ç­ë© ¢ë¢®¤
A8872: ld hl,(D88DC)
; „¥áïâ¨ç­ë© ¢ë¢®¤
.print: ld hl,(D88DC)
ld ix,PRM1 ; ¡ãä¥à
call A8964
ld hl,(D88DE) ; ¬«. à §àï¤
@@ -109,10 +86,11 @@ A8872: ld hl,(D88DC)
ld hl,T8B37 ; "0"
ld a,(hl)
cp " "
jr nz,A8892
jr nz,.not_zero
ld a,"0"
ld (hl),a
A8892: ld de,T8B46 ; "0 000 000 000"
.not_zero:
ld de,T8B46 ; "0 000 000 000"
ld hl,T8B2E ; "0000000000"
ld a,(hl)
ldi
@@ -148,8 +126,42 @@ A8892: ld de,T8B46 ; "0 000 000 000"
ld de,9 ; ¨­¤¥ªá " %1 file(s) %2 bytes"
jp MESSAGE ; ¢ë¢¥á⨠áâபã
;R14
.Print_Header:
PUSH AF
;
; %1
ld a,(screen_path) ; ¤¨áª
ld hl,PRM1
ld (hl),a
inc hl
ld (hl),":"
inc hl
ld (hl),0
; %2
ld hl,serial_string ; áâப  á¥à¨©­®£® ­®¬¥à  ¤¨áª 
ld de,PRM2 ; ªã¤ 
call ncopy_string ; ᪮¯¨à. áâபã (á ­ã«¥¬)
;
;R14
POP AF
ld hl,screen_path
JR NC,.not_empty_2
;
ld a,(screen_path)
LD (.str),A
ld hl,.str ; íªà ­. ¯ãâì
; %3
.not_empty_2:
;
ld de,PRM3 ; 16 ¡ãä¥à
CALL copy_string ; ᪮¯¨à. áâபã (á ­ã«¥¬)
;
ld de,0 ; ¨­¤¥ªá "Volume in drive %1 has no label..." ;!HARDCODE ­®¬¥à áâப¨ MSG0
JP MESSAGE ; ¢ë¢¥á⨠áâபã
.str: DZ 'X:\ is empty' ;R14
;
; �®¤£®â®¢¨âì áâபã ᯨ᪠ ä ©«®¢/¯ ¯®ª
A88E2: ld bc,8
+12 -12
View File
@@ -6,7 +6,7 @@ print_err_message:
ld e,a
ld d,0
inc de
ld hl,ERR0 ; ¬ áᨢ áâப
ld hl,ERR0 ; ¬ áᨢ áâப
ld bc,ERR0.Size ; à §¬¥à ¬ áᨢ 
call LCPIR ; ­ ©â¨ áâபã
call PRINTZ ; ä®à¬ â. ¢ë¢®¤ áâப¨
@@ -133,24 +133,24 @@ HELPMSG EQU 11
MSG0: db 0
; 0
db "Volume in drive %1 "
db "Volume on drive %1 "
.volume_string: ;!FIXIT ᤥ« âì ç¥à¥§ PRM
db "has no label ",0Dh,0Ah ;0
db "Volume Serial Number is %2",0Dh,0Ah
db 0Dh,0Ah,"Directory of %3",0Dh,0Ah,0Ah,0
db "has no label ",CR,LF ;0
db "The volume serial number is %2",CR,LF
db CR,LF,"Directory of %3",CR,LF,LF,0
; 1
db "Estex DSS version %1. Shell version %2.",CR,LF,0 ;R13
; 2
db "Current date: %1",0Dh,0Ah,0 ;2
db "Current time: %1",0Dh,0Ah,0 ;3
db "Press any key to continue . . .",0Dh,0Ah,0Ah,0 ;4
db "Invalid parametr",0Dh,0Ah,0 ;5
db "Echo is %1",0Dh,0Ah,0 ;6
db "Current date: %1",CR,LF,0 ;2
db "Current time: %1",CR,LF,0 ;3
db "Press any key to continue . . .",CR,LF,LF,0 ;4
db "Invalid parametr",CR,LF,0 ;5
db "Echo is %1",CR,LF,0 ;6
db "on",0 ;7
db "off",0 ;8
db " %1 file(s) %2 bytes",0Dh,0Ah,0Ah,0 ;9
db " %1 file(s) %2 bytes",CR,LF,LF,0 ;9
; 10 FILENAME EXT SIZE DATE TIME
db "%1 %2 %3 %4 %5",0Dh,0Ah,0 ;10
db "%1 %2 %3 %4 %5",CR,LF,0 ;10
; 11
DB "COMMANDS:",CR,LF,CR,LF
DB "DIR REN | RENAME PATH HELP ",CR,LF
+23
View File
@@ -12,6 +12,29 @@
;
;
; SYSTEM.EXE /S /P
;
; /P Primary command processor
; /S Secondary command processor
; /C Execute batch file
;=====================================================================[]
;Rev. Date Name Description
;---------------------------------------------------------------------[]
;R14 22-09-2023 BAO ˆá¯à ¢«¥­ ¡ £ "File not found" ¢ ª®¬ ­¤¥ DIR ­  ¯ãá⮬ à §¤¥«¥
;R13 03-08-2023 BAO „®¡ ¢«¥­ ¢ë¢®¤ ­®¬¥à  ¢¥àᨨ Š®­á®«¨ ¤«ï ª®¬ ­¤ë VERSION
;R12 23-07-2023 BAO „®¡ ¢«¥­  ª®¬ ­¤  REBOOT - ¯¥à¥§ £à㧪  á ¯®«­®© ®ç¨á⪮© ¯ ¬ïâ¨
;R11 20-07-2023 BAO �®¯à ¢«¥­  äã­ªæ¨ï LCPIR ¤«ï ª®à४⭮£® ¢ë¡®à  á®®¡é¥­¨ï ®¡ ®è¨¡ª¥ ¯à¨ ­®¬¥à¥ ®è¨¡ª¨ > § £®â®¢«¥­­ëå á®®¡é¥­¨©
;R10 16-05-2023 BAO TE•T MODE AND TEXT ARE RESTORED AFTER RETURNING FROM THE APP
;R08 21-02-2003 DNS FIX BUG IN BAT-PARSER, IT SPLIT STRINGS WHEN LINE BEGAN AT #xx00 OFFSET
;R07 14-12-2002 DNS PARSING BATCH LINE
;R06 12-12-2002 DNS ADD %0, %1, %2 ...
;R05 11-12-2002 DNS IMPLEMENTED %VAR%
;R04 11-12-2002 DNS ADD 'EVALSTRING' ROUTINE
;R03 11-12-2002 DNS NEW VERSION
;R02 19-11-2002 DNS CORRECT SOME ERROR MESSAGES
;R01 19-11-2002 DNS ADD ENVIRONMENT %VARIABLE% IN ECHO
;=====================================================================[]
includelua 'Shared_includes/lua/Functions.lua'
include 'shared_includes/constants/bios_equ.inc'
+1 -1
View File
@@ -1 +1 @@
67
77