Browse Source

MartinR-UK Fixed formatting issue with SLABEL where Slice # < 10

pull/593/head
Mark Pruden 7 months ago
parent
commit
b4fe4dc7e9
  1. 1
      Doc/ChangeLog.txt
  2. 31
      Source/Apps/slabel/slabel.asm
  3. 23
      Source/HBIOS/invntslc.asm

1
Doc/ChangeLog.txt

@ -16,6 +16,7 @@ Version 3.6
- MAP: New Slice Inventory Rom App "S" display bootable slices, during boot - MAP: New Slice Inventory Rom App "S" display bootable slices, during boot
- MAP: Device Inventory moved from HBIOS to Rom App, saving >1k space in HBIOS - MAP: Device Inventory moved from HBIOS to Rom App, saving >1k space in HBIOS
- MAP: Added disk image for all Infocom text adventure Games - MAP: Added disk image for all Infocom text adventure Games
- M?R: Fixed formatting issue with SLABEL where Slice # < 10
Version 3.5.1 Version 3.5.1
------------- -------------

31
Source/Apps/slabel/slabel.asm

@ -35,6 +35,7 @@
; table once (per device), and work out all the LBA's from this single read. ; table once (per device), and work out all the LBA's from this single read.
; Note this doesnt omit the fact that the 3 rd sector of each slice wold need to be read regarless. ; Note this doesnt omit the fact that the 3 rd sector of each slice wold need to be read regarless.
; To slightly reduce some IO only slices < 64 are considered. ; To slightly reduce some IO only slices < 64 are considered.
; - Output formatting misaligned with storage units enumerated as greater than 9 (ie 2 digits)
; ;
; This code will only execute on a Z80 CPU (or derivitive) ; This code will only execute on a Z80 CPU (or derivitive)
; This code requirs the use of HBIOS ; This code requirs the use of HBIOS
@ -45,6 +46,7 @@
; 2024-12-11 [MAP] Started - Reboot v1.0 used as the basis for this code ; 2024-12-11 [MAP] Started - Reboot v1.0 used as the basis for this code
; 2024-12-14 [MAP] Initial 0.9 alpha with basic working functionality ; 2024-12-14 [MAP] Initial 0.9 alpha with basic working functionality
; 2025-04-21 [MAP] Initial v1.0 release for distribution, fixing all issues ; 2025-04-21 [MAP] Initial v1.0 release for distribution, fixing all issues
; 2025-07-12 [MR] Minor tweak to partially tidy up output formatting
;______________________________________________________________________________ ;______________________________________________________________________________
; ;
; Include Files ; Include Files
@ -94,7 +96,7 @@ exit:
jp restart ; return to CP/M via restart jp restart ; return to CP/M via restart
; ;
;=============================================================================== ;===============================================================================
; Initialization
; Initialisation
; ;
init: init:
; check for UNA (UBIOS) ; check for UNA (UBIOS)
@ -211,10 +213,10 @@ prtslc2a:
ld a,c ; slice number ld a,c ; slice number
ld (currslice),a ; save slice number ld (currslice),a ; save slice number
; ;
push bc ; save loop
push bc ; save loop counter
call prtslc3 ; print detals of the slice call prtslc3 ; print detals of the slice
pop bc ; restore loop
ret nz ; if error dont continie
pop bc ; restore loop counter
ret nz ; if error don't continue
; ;
inc c ; next slice number inc c ; next slice number
djnz prtslc2a ; loop if more slices djnz prtslc2a ; loop if more slices
@ -248,15 +250,25 @@ prtslc3:
cp c ; compare cp c ; compare
jr nz,prtslc5 ; ignore missing signature and loop jr nz,prtslc5 ; ignore missing signature and loop
; ;
; Print volume label string at HL, '$' terminated, 16 chars max
; Print slice label string at HL, '$' terminated, 16 chars max
ld a,(currunit) ld a,(currunit)
call prtdecb ; print unit number as decimal call prtdecb ; print unit number as decimal
call pdot ; print a DOT call pdot ; print a DOT
ld a,(currslice)
ld a, (currslice) ; fetch the current slice numeric
call prtdecb call prtdecb
;
;-------------------------------------------------------------------------------
; Added by MartinR, July 2025, to help neaten the output formatting.
; Note - this is not a complete fix and will still result in misaligned output
; where the unit number exceeds 9 (ie - uses 2 digits).
cp 10 ; is it less than 10?
ld a,' ' ld a,' '
jr nc,jr01 ; If not, then we don't need an extra space printed
call cout ; print the extra space necessary
jr01: call cout ; print a space
call cout ; print a space call cout ; print a space
call cout ; print a space
;-------------------------------------------------------------------------------
;
ld hl,bb_label ; point to label ld hl,bb_label ; point to label
call pvol ; print it call pvol ; print it
call crlf call crlf
@ -438,6 +450,7 @@ pdot:
; ;
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
; Print character in A without destroying any registers ; Print character in A without destroying any registers
; Use CP/M BDOS function $02 - Console Output
; ;
prtchr: prtchr:
cout: cout:
@ -687,7 +700,7 @@ diskwrite:
;=============================================================================== ;===============================================================================
; ;
str_banner .db "\r\n" str_banner .db "\r\n"
.db "Slice Label, v1.0, April 2025 - M.Pruden",0
.db "Slice Label, v1.1, July 2025 - M.Pruden",0
; ;
str_err_una .db " ERROR: UNA not supported by application",0 str_err_una .db " ERROR: UNA not supported by application",0
str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0 str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0
@ -706,7 +719,7 @@ str_usage .db "\r\n\r\n"
.db " Options are case insensitive.\r\n",0 .db " Options are case insensitive.\r\n",0
; ;
PRTSLC_HDR .TEXT "\r\n\r\n" PRTSLC_HDR .TEXT "\r\n\r\n"
.TEXT "Un.Sl Drive \r\n"
.TEXT "Un.Sl Label \r\n"
.TEXT "----- ----------------\r\n" .TEXT "----- ----------------\r\n"
.DB 0 .DB 0
; ;

23
Source/HBIOS/invntslc.asm

@ -15,6 +15,7 @@
; ;
; Change Log: ; Change Log:
; 2025-06-30 [MAP] Initial v1.0 release for distribution ; 2025-06-30 [MAP] Initial v1.0 release for distribution
; 2025-07-12 [MR] Minor tweak to partially tidy up output formatting
;______________________________________________________________________________ ;______________________________________________________________________________
; ;
; Include Files ; Include Files
@ -97,10 +98,10 @@ prtslc2a:
ld a,c ; slice number ld a,c ; slice number
ld (currslice),a ; save slice number ld (currslice),a ; save slice number
; ;
push bc ; save loop
push bc ; save loop counter
call prtslc3 ; print detals of the slice call prtslc3 ; print detals of the slice
pop bc ; restore loop
ret nz ; if error dont continie
pop bc ; restore loop counter
ret nz ; if error don't continue
; ;
inc c ; next slice number inc c ; next slice number
djnz prtslc2a ; loop if more slices djnz prtslc2a ; loop if more slices
@ -134,15 +135,25 @@ prtslc3:
cp c ; compare cp c ; compare
jr nz,prtslc5 ; ignore missing signature and loop jr nz,prtslc5 ; ignore missing signature and loop
; ;
; Print volume label string at HL, '$' terminated, 16 chars max
; Print slice label string at HL, '$' terminated, 16 chars max
ld a,(currunit) ld a,(currunit)
call prtdecb ; print unit number as decimal call prtdecb ; print unit number as decimal
call pdot ; print a DOT call pdot ; print a DOT
ld a,(currslice) ld a,(currslice)
call prtdecb call prtdecb
;
;-------------------------------------------------------------------------------
; Added by MartinR, July 2025, to help neaten the output formatting.
; Note - this is not a complete fix and will still result in misaligned output
; where the unit number exceeds 9 (ie - uses 2 digits).
cp 10 ; is it less than 10?
ld a,' ' ld a,' '
jr nc,jr01 ; If not, then we don't need an extra space printed
call cout ; print the extra space necessary
jr01: call cout ; print a space
call cout ; print a space call cout ; print a space
call cout ; print a space
;-------------------------------------------------------------------------------
;
ld hl,bb_label ; point to label ld hl,bb_label ; point to label
call pvol ; print it call pvol ; print it
call crlf call crlf
@ -324,7 +335,7 @@ prtdec3:
;=============================================================================== ;===============================================================================
; ;
PRTSLC_HDR .TEXT "\r\n\r\n" PRTSLC_HDR .TEXT "\r\n\r\n"
.TEXT "Un.Sl Drive \r\n"
.TEXT "Un.Sl Label \r\n"
.TEXT "----- ----------------\r\n" .TEXT "----- ----------------\r\n"
.DB 0 .DB 0
; ;

Loading…
Cancel
Save