Estex-DSS/SHELL/Commands/INFO.ASM
Anatoliy Belyanskiy 4cebd03a1a SHELL: new command "INFO"& Show FS in DIR.
CORE: Some fixes with F_First
2024-06-25 04:59:02 +10:00

76 lines
1.7 KiB
NASM
Raw Blame History

;[ ] 24/06/2024
cmd_info: LD DE,MAIN_MSG.INFO_1 ; 身丰花 "Drive Label Serial number Size"
CALL ECHO_MESSAGE
;
LD HL,.Collect_Msg
LD C,Dss.PChars
RST ToDSS
;
LD A,":"
LD (Buffers.bat_params.PRM9+1),A
XOR A
LD (Buffers.bat_params.PRM9+2),A ; Drive "X:",0
LD (read_disk_info.full),A
;
LD C,Dss.CurDisk
RST ToDSS
LD B,C
LD C,-1
;
.loop: INC C
PUSH BC
LD A,C
ADD "A"
LD (Buffers.bat_params.PRM9),A
LD A,C
CALL read_disk_info
JR C,.next_drv
; %7 - Volume label
; serial_string - Volume serial number string
; full_space_high \
; full_space_medium - Partition size
; full_space_low /
;
LD HL,.Collect_Msg
LD C,Dss.PChars
RST ToDSS
;
LD HL,serial_string
LD DE,Buffers.bat_params.PRM4 ; Volume serial number string
CALL ncopy_string
; full capacity
ld a,(full_space_high)
ld hl,(full_space_medium) ; 摵. <20>抉鴾
exx
ld hl,(full_space_low) ; 洮. <20>抉鴾
CALL PRN_DISK_SIZE
; %5..6 - Full size
;
; 銈酮罱兒恥<E58592>言 PRM5
LD HL,Buffers.bat_params.PRM5 - 1
LD DE,Buffers.bat_params.PRM5
.clear_spaces: INC HL
LD A,(HL)
CP " "
JR Z,.clear_spaces
AND A
CALL NZ,copy_string
;
.print_info_2: LD DE,MAIN_MSG.INFO_2 ; 身丰花 "Drive Label Serial number Size"
CALL ECHO_MESSAGE
;
.next_drv: POP BC
DJNZ .loop
RET
;
.Collect_Msg: DZ "Please wait, information is being collected...\r"
/*
0 1 2 3 4 5 6 7
01234567890123456789012345678901234567890123456789012345678901234567890123456789;
Drive File System Label Serial number Size in bytes
C: FAT32 NO NAME xxxx-xxxx 147,102,629,888.
D: FAT16 SP_SYS xxxx-xxxx 147,102,629,888.
;
*/