Browse Source

Fix CBIOS Bug

- Corrects the dynamic disk buffer allocation routine in CBIOS and ASSIGN.COM.  They had the DPB assignments inverted causing slightly wrong buffer allocations for RAM and ROM disks.

Credit to Andrew Lynch for discovering this issue.
pull/283/head
Wayne Warthen 4 years ago
parent
commit
ca67ee41c5
  1. 24
      Source/Apps/assign.asm
  2. 10
      Source/CBIOS/cbios.asm
  3. 2
      Source/ver.inc
  4. 2
      Source/ver.lib

24
Source/Apps/assign.asm

@ -27,6 +27,7 @@
; 2020-05-06 [WBW] Add patch level to version compare
; 2020-05-10 [WBW] Set media change flag in XDPH for CP/M 3
; 2020-05-12 [WBW] Back out media change flag
; 2021-12-06 [WBW] Fix inverted ROM/RAM DPB mapping in buffer alloc
;_______________________________________________________________________________
;
; ToDo:
@ -639,7 +640,7 @@ makdphwbw: ; determine appropriate dpb (WBW mode, unit number in A)
jr nz,makdph00 ; if not, skip ahead to other types
ld a,e ; physical unit number to A
ld e,1 ; assume rom
cp $00 ; rom?
cp $01 ; rom?
jr z,makdph0 ; yes, jump ahead
ld e,2 ; otherwise ram
jr makdph0 ; jump ahead
@ -1567,6 +1568,23 @@ prtdec2:
call prtchr
ret
;
; Print a byte buffer in hex pointed to by DE
; Register A has size of buffer
;
prthexbuf:
or a
ret z ; empty buffer
;
ld b,a
prthexbuf1:
ld a,' '
call prtchr
ld a,(de)
call prthex
inc de
djnz prthexbuf1
ret
;
; Start a new line
;
crlf2:
@ -1893,10 +1911,10 @@ stack .equ $ ; stack top
; Messages
;
indent .db " ",0
msgban1 .db "ASSIGN v1.4 for RomWBW CP/M, 12-May-2020",0
msgban1 .db "ASSIGN v1.4a for RomWBW CP/M, 6-Dec-2021",0
msghb .db " (HBIOS Mode)",0
msgub .db " (UBIOS Mode)",0
msgban2 .db "Copyright 2020, Wayne Warthen, GNU GPL v3",0
msgban2 .db "Copyright 2021, Wayne Warthen, GNU GPL v3",0
msguse .db "Usage: ASSIGN D:[=[{D:|<device>[<unitnum>]:[<slicenum>]}]][,...]",13,10
.db " ex. ASSIGN (display all active assignments)",13,10
.db " ASSIGN /? (display version and usage)",13,10

10
Source/CBIOS/cbios.asm

@ -3059,12 +3059,12 @@ MAKDPH0:
; RAM/ROM DISK DPB DERIVATION
; TYPE OF MEMORY DISK (RAM/ROM) DETERMINED BY PHYSICAL UNIT NUMBER
LD A,E ; LOAD PHYSICAL UNIT NUMBER
LD DE,DPB_ROM ; PRELOAD ROM DISK DPB
OR A ; UNIT=0 (ROM)?
JR Z,MAKDPH1 ; IF UNIT=0, IT IS ROM, PROCEED TO DPH CREATION
LD DE,DPB_RAM ; PRELOAD RAM DISK DPB
CP $01 ; UNIT=1 (RAM)?
JR Z,MAKDPH1 ; IF UNIT=0, IT IS ROM, PROCEED TO DPH CREATION
OR A ; UNIT=0 (RAM)?
JR Z,MAKDPH1 ; IF SO, CREATE RAM DISK DPH
LD DE,DPB_ROM ; PRELOAD ROM DISK DPB
CP $01 ; UNIT=1 (ROM)?
JR Z,MAKDPH1 ; IF SO, CREATE ROM DISK DPH
CALL PANIC ; OTHERWISE UNKNOWN, NOT POSSIBLE, JUST PANIC
;
#ENDIF

2
Source/ver.inc

@ -2,4 +2,4 @@
#DEFINE RMN 1
#DEFINE RUP 1
#DEFINE RTP 0
#DEFINE BIOSVER "3.1.1-pre.141"
#DEFINE BIOSVER "3.1.1-pre.142"

2
Source/ver.lib

@ -3,5 +3,5 @@ rmn equ 1
rup equ 1
rtp equ 0
biosver macro
db "3.1.1-pre.141"
db "3.1.1-pre.142"
endm

Loading…
Cancel
Save