diff --git a/Doc/ChangeLog.txt b/Doc/ChangeLog.txt index f3e7efe3..ce47499a 100644 --- a/Doc/ChangeLog.txt +++ b/Doc/ChangeLog.txt @@ -1,3 +1,7 @@ +Version 2.6.2 +------------- +- WBW: ASSIGN.COM substantially improved to map all drive types + Version 2.6.1 ------------- - WBW: Both CP/M and ZSystem are imbedded in the ROM diff --git a/ReadMe.txt b/ReadMe.txt index 35c728ba..81ea5609 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -8,8 +8,8 @@ Builders: Wayne Warthen (wwarthen@gmail.com) Douglas Goodall (douglas_goodall@mac.com) David Giles (vk5dg@internode.on.net) -Updated: 2014-08-30 -Version: 2.6.1 +Updated: 2014-09-19 +Version: 2.6.2 This is an adaptation of CP/M-80 2.2 and ZSDOS/ZCPR targeting ROMs for all N8VEM Z80 hardware variations diff --git a/RomList.txt b/RomList.txt index 3025cdd3..e0e2f422 100644 --- a/RomList.txt +++ b/RomList.txt @@ -4,12 +4,12 @@ Refer to the descriptions below to select one that matches your hardware configuration, burn it, and use it. -Note there are two set of rom builds -below, one for generic DRI CP/M (BDOS & CCP) -and one for ZSystem (ZSDOS & ZCPR). The -ZSystem builds are suffixed by"_z", for example -the standard N8VEM build is available as both -N8VEM_std.rom and N8VEM_std_z.rom. +Note that there are no longer separate +ROM images for CP/M and ZSystem. Both +OS variants are now imbedded in the ROM +image and you are given the ability to +choose the one you want to boot at +startup. Note that all builds are now set for 512KB ROMs. The builds will work fine in 1MB ROMs. If you @@ -213,3 +213,9 @@ custom build. for the Propeller found in the Support directory! - NOTE: Console defaults to VGA & PS/2 Keyboard. Short JP2 (one bit input port) to use the serial port as the console. + + UNA_std.rom for all UNA support platforms (SBC V1/2, Zeta, N8, Mark IV) + - 512KB ROM + - Initial baud rate is 9600, but can be configured + - Resources are managed dynamically by UNA BIOS + - Refer to UNA project for more details diff --git a/Source/Apps/Assign - Copy.asm b/Source/Apps/Assign - Copy.asm index 4fc1aedd..e6bc094c 100644 --- a/Source/Apps/Assign - Copy.asm +++ b/Source/Apps/Assign - Copy.asm @@ -7,7 +7,7 @@ ;_______________________________________________________________________________ ; ; Usage: -; ASSIGN [D:={D:|[:]}] +; ASSIGN [D:={D:|[]:[]}] ; ex: ASSIGN (display all active drive assignments) ; ASSIGN /? (display version and usage) ; ASSIGN /L (display all possible devices) @@ -248,37 +248,45 @@ devlist: or a ; set flags jr nz,devlstu ; do UNA mode dev list ; - call crlf - ld c,0 + ld b,$1a ; hbios func: diodevcnt + rst 08 ; call hbios, device count to B + ld c,0 ; use C for device index devlist1: ld de,indent ; indent call prtstr ; ... to look nice - ld a,c - call prtdev - ld a,':' - call prtchr - call crlf - inc c - ld a,c - cp devcnt - jr nz,devlist1 - ret + push bc ; preserve loop control + ld b,$1b ; hbios func: diodevinf + rst 08 ; call hbios, return device/unit in C + ld a,c ; device/unit to A + push af ; save it + call prtdev ; print device mnemonic + pop af ; get device/unit back + and $0f ; isolate unit num + call prtdecb ; append unit num + ld a,':' ; colon for device/unit format + call prtchr ; print it + call crlf ; formatting + pop bc ; restore loop control + inc c ; next device index + djnz devlist1 ; loop as needed + ret ; done ; devlstu: ; UNA mode device list ld b,0 ; use unit 0 to get count ld c,$48 ; una func: get disk type ld l,0 ; preset unit count to zero - call $fffd ; call una, b is assumed to be untouched!!! +; call $fffd ; call una, b is assumed to be untouched!!! + rst 08 ; call una, b is assumed to be untouched!!! ld a,l ; unit count to a or a ; set flags ret z ; no units, return ld b,l ; unit count to b ld c,0 ; init unit index devlstu1: - push bc ; save loop control vars ld de,indent ; indent call prtstr ; ... to look nice + push bc ; save loop control vars ld a,c ; put unit num in A push af ; save it call prtdevu ; print the device name @@ -399,11 +407,17 @@ drvswap: ; ; Assign drive to specified device/unit/slice ; -drvmap: ; determine device code by scanning for string +drvmap: + ; check for UNA mode + ld a,(unamod) ; get UNA mode flag + or a ; set flags + jr nz,drvmapu ; do UNA mode drvmap +; + ; determine device code by scanning for string ld b,16 ; device table always has 16 entries ld c,0 ; c is used to track table entry num ld de,tmpstr ; de points to specified device name - ld hl,devtbl ; hl points to first entry of dvtbl + ld hl,devtbl ; hl points to first entry of devtbl ; drvmap1: ; loop through device table looking for a match push hl ; save device table entry pointer @@ -429,7 +443,7 @@ drvmap2: ; verify the unit is eligible for assignment (hard disk unit only!) call chktyp ; check it jp nz,errtyp ; abort with bad unit error ; - ; construct the requested dph table entry + ; construct the requested dph table entry ld a,c ; C has device num rlca ; move it to upper nibble rlca ; ... @@ -441,6 +455,86 @@ drvmap2: ; verify the unit is eligible for assignment (hard disk unit only!) ld c,a ; and save in C ld a,(slice) ; get the slice ld b,a ; and save in B +; + ; check for valid device/unit (supported by BIOS) + push bc ; save device/unit/slice + ld a,c ; device/unit to A + call chkdev ; device/unit OK? + pop bc ; restore device/unit/slice + jp nz,errdev ; invalid device specified +; + ; resolve the CBIOS DPH table entry + ld a,(dstdrv) ; dest drv num to A + call chkdrv ; valid drive? + ret nz ; abort if invalid + ld hl,(maploc) ; start of DPH table to HL + rlca ; multiply by + rlca ; ... entry size of 4 + call addhl ; adjust HL to point to entry + ld (dstptr),hl ; save it +; + ; shove updated device/unit/slice into the entry + ld (hl),c ; save device/unit byte + inc hl ; bump to next byte + ld (hl),b ; save slice +; + ; finish up + ld a,(dstdrv) ; get the destination drive + call showone ; show it's new value + jp drvrst ; exit via drive reset +; +; UNA mode drive mapping +; +drvmapu: +; + ; verify the device nmeumonic + ld a,(unit) ; get unit specified + ld b,a ; put in b + ld d,0 ; preset type to 0 + ld c,$48 ; una func: get disk type +; call $fffd ; call una, b is assumed to be untouched!!! + rst 08 ; call una, b is assumed to be untouched!!! + ld a,d ; resultant device type to a + cp $40 ; RAM/ROM + jr z,drvmapu0 ; special case for RAM/ROM + ld de,udevide ; assume IDE + cp $41 ; IDE? + jr z,drvmapu1 ; do compare + ld de,udevppide ; assume PPIDE + cp $42 ; PPIDE? + jr z,drvmapu1 ; do compare + ld de,udevsd ; assume SD + cp $43 ; SD? + jr z,drvmapu1 ; do compare + ld de,udevdsd ; assume DSD + cp $44 ; DSD? + jr z,drvmapu1 ; do compare + jp errdev ; error, invalid device name +; +drvmapu0: + ; handle RAM/ROM + ld a,(unit) ; get unit specified + ld b,a ; unit num to B + ld c,$45 ; UNA func: get disk info + ld de,$9000 ; 512 byte buffer *** FIX!!! *** +; call $fffd ; call UNA + rst 08 ; call UNA + bit 7,b ; test RAM drive bit + ld de,udevrom ; assume ROM + jr z,drvmapu1 ; do compare + ld de,udevram ; assume RAM + jr drvmapu1 ; do compare + jp errdev ; error, invalid device name +; +drvmapu1: + ld hl,tmpstr ; point HL to specified device name + call strcmp ; compare + jp nz,errdev ; no match, invalid device name +; + ; check for valid unit (supported by BIOS) + ld a,(unit) ; get specified unit + call chkdevu ; check validity + jp nz,errdev ; invalid device specified ; ; resolve the CBIOS DPH table entry ld a,(dstdrv) ; dest drv num to A @@ -454,18 +548,17 @@ drvmap2: ; verify the unit is eligible for assignment (hard disk unit only!) ; ; verify the drive letter being assigned is a hard disk ld a,(hl) ; get the device/unit byte - rrca ; move device nibble to low nibble - rrca ; ... - rrca ; ... - rrca ; ... - and $0F ; and isolate device bits - call chktyp ; check it + push hl ; save pointer + call chktypu ; check it + pop hl ; recover pointer jp nz,errtyp ; abort with bad device type error ; ; shove updated device/unit/slice into the entry - ld (hl),c ; save device/unit byte - inc hl ; bump to next byte - ld (hl),b ; save slice + ld a,(unit) ; get specified unit + ld (hl),a ; save it + inc hl ; next byte is slice + ld a,(slice) ; get specified slice + ld (hl),a ; save it ; ; finish up ld a,(dstdrv) ; get the destination drive @@ -521,7 +614,7 @@ showone: ld a,(hl) ; load device/unit call prtdev ; print device mnemonic ld a,(hl) ; load device/unit again - and $0F ; isolate unit num + and $0f ; isolate unit num call prtdecb ; print it inc hl ; point to slice num ld a,':' ; colon to separate slice @@ -536,7 +629,7 @@ showone: ; Force BDOS to reset (logout) all drives ; drvrst: - ld c,$0D ; BDOS Reset Disk function + ld c,$0d ; BDOS Reset Disk function call bdos ; do it ; xor a ; signal success @@ -554,7 +647,7 @@ prtdev: rrca ; ... rrca ; ... rrca ; ... into low nibble - and $0F ; mask out undesired bits + and $0f ; mask out undesired bits push hl ; save HL add a,a ; multiple A by two for word table ld hl,devtbl ; point to start of device name table @@ -575,7 +668,8 @@ prtdevu: ; UNA mode version of print device ld b,a ; B := unit num ld c,$48 ; UNA func: get disk type - call $FFFD ; call UNA +; call $fffd ; call UNA + rst 08 ; call UNA ld a,d ; disk type to A pop hl pop de @@ -586,9 +680,15 @@ prtdevu: cp $41 ; IDE? ld de,udevide ; load string jp z,prtstr ; if IDE, print and return + cp $42 ; PPIDE? + ld de,udevppide ; load string + jp z,prtstr ; if PPIDE, print and return cp $43 ; SD? ld de,udevsd ; load string jp z,prtstr ; if SD, print and return + cp $44 ; DSD? + ld de,udevdsd ; load string + jp z,prtstr ; if DSD, print and return ld de,udevunk ; load string for unknown jr prtstr ; and print it ; @@ -599,7 +699,8 @@ prtdevu1: ld b,e ; unit num to B ld c,$45 ; UNA func: get disk info ld de,$9000 ; 512 byte buffer *** FIX!!! *** - call $FFFD ; call UNA +; call $fffd ; call UNA + rst 08 ; call UNA bit 7,b ; test RAM drive bit pop hl pop bc @@ -620,11 +721,51 @@ chkdrv: cp a ; set Z to signal good ret ; and return ; +; Check that the device/unit value in A is valid +; according to active BIOS support. +; +; +chkdev: ; HBIOS variant + push af ; save incoming device/unit + ld b,$1a ; hbios func: diodevcnt + rst 08 ; call hbios, device count to B + ld c,0 ; use C for device index + pop af ; restore incoming device/unit +chkdev1: + push bc ; preserve loop control + push af ; save incoming device/unit + ld b,$1b ; hbios func: diodevinf + rst 08 ; call hbios, return device/unit in C + pop af ; restore incoming device/unit + cp c ; match to device/unit from BIOS list? + pop bc ; restore loop control + ret z ; yes, match, return with Z set + inc c ; next device list entry + djnz chkdev1 ; loop as needed + or $ff ; no match, signal error + ret ; done +; +chkdevu: ; UNA variant + ld b,a ; put in b + ld d,0 ; preset type to 0 + ld c,$48 ; una func: get disk type +; call $fffd ; call una + rst 08 ; call una + ld a,d ; resultant device type to a + or a ; set flags + jr z,chkdevu1 ; invalid if 0 + xor a + ret +; +chkdevu1: ; handle invalid unit + or $ff ; signal error + ret ; done +; ; Check that specified device is valid for a mapping operation ; Only hard disk devices are dynamically mappable because ; the DPH vector allocation sizes may not change. ; -chktyp: +chktyp: ; HBIOS variant cp 3 ; first mappable device is 3 (IDE) jr c,chkunit1 ; if below 3, return error cp 9 + 1 ; last mappable device is 9 (HDSK) @@ -632,6 +773,22 @@ chktyp: xor a ; signal valid ret ; and return ; +chktypu: ; UNA variant + ld b,a ; put unit in b + ld c,$48 ; una func: get disk type + ld d,0 ; preset disk type to zero +; call $fffd ; call UNA + rst 08 ; call UNA + ld a,d ; disk type to A + cp $41 ; IDE? + ret z ; OK + cp $42 ; PPIDE? + ret z ; OK + cp $43 ; SD? + ret z ; OK + cp $44 ; DSD? + ret z ; OK +; chkunit1: ; return error or $ff ; signal error ret ; and return @@ -708,7 +865,7 @@ hexascii: ; Convert low nibble of A to ascii hex ; hexconv: - and $0F ; low nibble only + and $0f ; low nibble only add a,$90 daa adc a,$40 @@ -895,7 +1052,7 @@ strcmp: ; The CBIOS function offset must be stored in the byte ; following the call instruction. ex: ; call cbios -; .db $0C ; offset of CONOUT CBIOS function +; .db $0c ; offset of CONOUT CBIOS function ; cbios: ex (sp),hl @@ -938,7 +1095,7 @@ errver: ; CBIOS version is not as expected ld de,msgver jr err ; -errdrv: ; CBIOS version is not as expected +errdrv: ; Invalid drive letter specified push af ld de,msgdrv1 call prtstr @@ -985,7 +1142,7 @@ err1: ; without the leading crlf ; err2: ; without the string call crlf ; print newline - or $FF ; signal error + or $ff ; signal error ret ; done ; ;=============================================================================== @@ -1001,7 +1158,7 @@ device .db 0 ; source device unit .db 0 ; source unit slice .db 0 ; source slice ; -unamod .db 0 ; $FF indicates UNA UBIOS active +unamod .db 0 ; $ff indicates UNA UBIOS active ; srcptr .dw 0 ; source pointer for copy dstptr .dw 0 ; destination pointer for copy @@ -1034,11 +1191,13 @@ dev15 .equ devunk ; devcnt .equ 10 ; 10 devices defined ; -udevram .db "RAM",0 -udevrom .db "ROM",0 -udevide .db "IDE",0 -udevsd .db "SD",0 -udevunk .db "UNK",0 +udevram .db "RAM",0 +udevrom .db "ROM",0 +udevide .db "IDE",0 +udevppide .db "PPIDE",0 +udevsd .db "SD",0 +udevdsd .db "DSD",0 +udevunk .db "UNK",0 ; stksav .dw 0 ; stack pointer saved at start .fill stksiz,0 ; stack @@ -1047,11 +1206,11 @@ stack .equ $ ; stack top ; Messages ; indent .db " ",0 -msgban1 .db "ASSIGN v0.9c for RomWBW CP/M 2.2, 20-Aug-2014",0 +msgban1 .db "ASSIGN v0.9e for RomWBW CP/M 2.2, 02-Sep-2014",0 msgban2 .db 13,10,"Copyright 2014, Wayne Warthen, GNU GPL v3",13,10,0 msghb .db " (HBIOS Mode)",0 msgub .db " (UBIOS Mode)",0 -msguse .db "Usage: ASSIGN [D:[={D:|[:]}]]",13,10 +msguse .db "Usage: ASSIGN [D:[={D:|[]:[]}]]",13,10 .db " ex. ASSIGN (display all active assignments)",13,10 .db " ASSIGN /? (display version and usage)",13,10 .db " ASSIGN /L (display all possible devices)",13,10 @@ -1064,7 +1223,7 @@ msgver .db "Unexpected CBIOS version",0 msgdrv1 .db "Invalid drive letter (",0 msgdrv2 .db ":)",0 msgswp .db "Invalid drive swap request",0 -msgdev .db "Invalid device name",0 +msgdev .db "Invalid device name (ASSIGN /L for device list)",0 msgnum .db "Unit or slice number invalid",0 msgtyp .db "Only hard drive devices can be reassigned",0 msgint .db "WARNING: Multiple drive letters reference one filesystem!",0 diff --git a/Source/Apps/Assign.asm b/Source/Apps/Assign.asm index e6bc094c..43bedbf5 100644 --- a/Source/Apps/Assign.asm +++ b/Source/Apps/Assign.asm @@ -7,21 +7,22 @@ ;_______________________________________________________________________________ ; ; Usage: -; ASSIGN [D:={D:|[]:[]}] +; ASSIGN D:[=[{D:|[]:[]}]][,...] ; ex: ASSIGN (display all active drive assignments) ; ASSIGN /? (display version and usage) ; ASSIGN /L (display all possible devices) ; ASSIGN C:=D: (swaps C: and D:) ; ASSIGN C:=FD0: (assign C: to floppy unit 0) ; ASSIGN C:=IDE0:1 (assign C: to IDE unit0, slice 1) +; ASSIGN C:= (unassign C:) ;_______________________________________________________________________________ ; ; Change Log: ;_______________________________________________________________________________ ; ; ToDo: -; 1) Do something to prevent assigning to non-existent devices -; 2) Do something to prevent assigning slices when device does not support them +; 1) Do something to prevent assigning slices when device does not support them +; 2) ASSIGN C: causes drive map to be reinstalled unnecessarily ;_______________________________________________________________________________ ; ;=============================================================================== @@ -54,12 +55,19 @@ rmn .equ 6 ; CBIOS version - minor ; ; do the real work call process ; parse and process command line + jr nz,exit ; done if error or no action ; ; perform table integrity check call valid + jr nz,exit ; -exit: ; clean up and return to command processor + ; install the new drive map if changes were made + ld a,(modcnt) ; get the mod count + or a ; set flags + call nz,install ; install new drive map ; +exit: ; clean up and return to command processor + call crlf ; formatting ld sp,(stksav) ; restore stack jp restart ; return to CP/M via restart ret ; return to CP/M w/o restart @@ -96,14 +104,34 @@ init: ld h,(hl) ; ... ROMWBW config data block ld l,a ; ... in CBIOS ; - ; get location of drive map + ; skip device map address inc hl ; bump two bytes - inc hl ; ... to drive map address - ld a,(hl) ; dereference HL - inc hl ; ... to point to - ld h,(hl) ; ... drivemap data - ld l,a ; ... in CBIOS - ld (maploc),hl ; and save it + inc hl ; ... past device map address entry +; + ; get location of drive map + ld e,(hl) ; dereference HL + inc hl ; ... into DE to get + ld d,(hl) ; ... drive map pointer + inc hl ; skip past drive map pointer + ld (maploc),de ; and save it +; + ; get location of dpbmap + ld e,(hl) ; dereference HL + inc hl ; ... into DE to get + ld d,(hl) ; ... DPB map pointer + ld (dpbloc),de ; and save it +; + ; make a local working copy of the drive map + ld hl,(maploc) ; copy from CBIOS drive map + ld de,mapwrk ; copy to working drive map + dec hl ; point to entry count + ld a,(hl) ; get entry count + inc hl ; restore hl pointer to drive map start + add a,a ; multiple a by + add a,a ; ... size of entries (4 bytes each) + ld c,a ; set BC := 0A + ld b,0 ; ... so BC is length to copy + ldir ; do the copy ; ; check for UNA (UBIOS) ld a,($fffd) ; fixed location of UNA API vector @@ -113,7 +141,7 @@ init: ld a,(hl) ; get byte at target address cp $fd ; first byte of UNA push ix instruction jr nz,initx ; if not, not UNA - inc hl ; next byte + inc hl ; point to next byte ld a,(hl) ; get next byte cp $e5 ; second byte of UNA push ix instruction jr nz,initx ; if not, not UNA @@ -136,7 +164,7 @@ process: ; ; check for special option, introduced by a "/" cp '/' ; start of usage request? - jr z,option ; yes, handle option + jp z,option ; yes, handle option ; process0: ; @@ -150,16 +178,19 @@ process0: call nonblank ; skip possible blanks cp '=' ; proper delimiter? jr z,process1 ; yes, continue - or a ; set flags - jp nz,errprm ; handle unexpected delimiter - ld a,(dstdrv) ; dest drive back to A - jp showone ; no more parms, dump specific drive assignment + + ld de,drvshow ; show the drive + ld a,(dstdrv) ; load the drive + jr process4 ; do it ; process1: ; handle other side of '=' ; inc hl ; skip '=' call nonblank ; skip blanks as needed - jp z,errprm ; nothing after '=', parm error + ld de,drvdel ; assume a drive delete + jp z,process4 ; continue to processing + cp ',' ; comma? + jp z,process4 ; continue to processing call getalpha ; gobble all alpha characters dec b ; decrement num chars parsed jr nz,process2 ; more than 1 char, handle as device name @@ -205,13 +236,14 @@ process5: ; do the processing push de ; save command string pointer call jphl ; do the work pop hl ; recover command string pointer + ret nz ; abort on error ld a,(hl) ; get the current cmd string char or a ; set flags ret z ; if null, we are done inc hl ; otherwise, skip comma call nonblank ; and possible blanks after comma ret z ; get out if nothing more - jr process0 ; we have more work, loop + jp process0 ; we have more work, loop ; ; Handle special options ; @@ -227,6 +259,7 @@ option: ; usage: ; + call crlf ; formatting ld de,msgban1 ; point to version message part 1 call prtstr ; print it ld a,(unamod) ; get UNA flag @@ -235,11 +268,13 @@ usage: call z,prtstr ; if not UNA, say so ld de,msgub ; point to UBIOS mode message call nz,prtstr ; if UNA, say so + call crlf ; formatting ld de,msgban2 ; point to version message part 2 call prtstr ; print it - call crlf ; blank line + call crlf2 ; blank line ld de,msguse ; point to usage message call prtstr ; print it + or $ff ; signal no action performed ret ; and return ; devlist: @@ -252,6 +287,7 @@ devlist: rst 08 ; call hbios, device count to B ld c,0 ; use C for device index devlist1: + call crlf ; formatting ld de,indent ; indent call prtstr ; ... to look nice push bc ; preserve loop control @@ -265,10 +301,10 @@ devlist1: call prtdecb ; append unit num ld a,':' ; colon for device/unit format call prtchr ; print it - call crlf ; formatting pop bc ; restore loop control inc c ; next device index djnz devlist1 ; loop as needed + or $ff ; signal no action taken ret ; done ; devlstu: @@ -276,7 +312,6 @@ devlstu: ld b,0 ; use unit 0 to get count ld c,$48 ; una func: get disk type ld l,0 ; preset unit count to zero -; call $fffd ; call una, b is assumed to be untouched!!! rst 08 ; call una, b is assumed to be untouched!!! ld a,l ; unit count to a or a ; set flags @@ -284,6 +319,7 @@ devlstu: ld b,l ; unit count to b ld c,0 ; init unit index devlstu1: + call crlf ; formatting ld de,indent ; indent call prtstr ; ... to look nice push bc ; save loop control vars @@ -294,24 +330,300 @@ devlstu1: call prtdecb ; print unit num ld a,':' ; colon delimiter call prtchr ; print it - call crlf ; formatting pop bc ; restore loop control inc c ; next drive djnz devlstu1 ; loop as needed ret ; return ; +; Install the new drive map into CBIOS +; +install: + ; capture CBIOS snapshot and stack frame for error recovery + ld hl,$e600 ; start of CBIOS + ld de,$8000 ; save it here + ld bc,$fc00 - $e600 ; size of CBIOS + ldir ; save it + ld (xstksav),sp ; save stack frame + ; clear CBIOS buffer area + ld hl,(maploc) ; start fill at drive map + ld a,$FC ; stop when msb is $FC +install1: + ld e,0 ; fill with null + ld (hl),e ; fill next byte + inc hl ; point to next byte + cp h ; is H == $FC? + jr nz,install1 ; if not, loop +; + ; determine the drive map entry count + ld hl,mapwrk + ld c,0 + ld b,16 +install2: + ld a,$FF + cp (hl) + jr z,install3 + ld e,c ; remember high water mark +install3: + inc hl + inc hl + inc hl + inc hl + inc c + djnz install2 + inc e ; convert from max value to count +; + ; record entry count in CBIOS + ld hl,(maploc) ; start of map + dec hl ; backup to entry count + ld (hl),e ; record count +; + ; copy map + ld a,e ; A := entry count + add a,a ; multiply by size + add a,a ; ... of entry (4 bytes) + ld c,a ; put in C for count + ld b,0 ; msb of count is always zero + ld hl,mapwrk ; source of copy is work map + ld de,(maploc) ; target is CBIOS map loc + ldir ; do it +; + ; set start of allocation memory + ld (buftop),de ; DE has next byte available +; + ; allocate directory buffer + ld bc,128 ; size of directory buffer + call alloc ; allocate the space + jp nz,instovf ; handle overflow error + push bc ; move mem pointer + pop hl ; ... to hl + ld (dirbuf),hl ; ... and save in dirbuf +; +dph_init: +; +; iterate through drive map to build dph entries dynamically +; + ; setup for dph build loop + ld hl,(maploc) ; point to drive map + dec hl ; backup to entry count + ld b,(hl) ; loop drvcnt times + ld c,0 ; drive index + inc hl ; bump to start of drive map +; +dph_init1: + ; no DPH if drive not assigned + ld a,(hl) + cp $ff + jr nz,dph_init2 + ld de,0 ; not assigned, use DPH pointer of zero + jr dph_init3 +; +dph_init2: + push bc ; save loop control + push hl ; save drive map pointer + ld bc,16 ; size of a DPH structure + call alloc ; allocate space for dph + jp nz,instovf ; handle overflow error + push bc ; save DPH location + push bc ; move DPH location + pop de ; ... to DE + ld a,(hl) ; device/unit to A + call makdph ; make the DPH + pop de ; restore DPH pointer to DE + pop hl ; restore drive map pointer to HL + pop bc ; restore loop control +; +dph_init3: + inc hl ; bump to slice loc + inc hl ; bump to DPH pointer lsb + ld (hl),e ; save lsb + inc hl ; bump to DPH pointer msb + ld (hl),d ; save msb + inc hl ; bump to start of next drive map entry + inc c ; next drive index + djnz dph_init1 ; loop as needed +; + ; display free memory + call crlf2 + ld de,indent + call prtstr + ld hl,$fc00 - $40 ; subtract high water + ld de,(buftop) ; ... from top of cbios + or a ; ... with cf clear + sbc hl,de ; ... so hl gets bytes free + call prtdecw ; print it + ld de,msgmem ; add description + call prtstr ; and print it +; + call drvrst ; perform BDOS drive reset +; + xor a ; signal success + ret ; done +; +makdph: +; +; make a dph at address in de for dev/unit in a +; + push de ; save incoming dph address +; + ld c,a ; save incoming dev/unit + ld a,(unamod) ; get UNA mode flag + or a ; set flags + ld a,c ; restore incoming dev/unit + jr nz,makdphuna ; do UNA mode + jr makdphwbw ; do WBW mode +; +makdphuna: ; determine appropriate dpb (WBW mode) + ld b,a ; unit num to b + ld c,$48 ; una func: get disk type + rst 08 ; call una + ld a,d ; move disk type to a +; + ; derive dpb address based on disk type + cp $40 ; ram/rom drive? + jr z,makdphuna1 ; handle ram/rom drive if so +; cp $?? ; floppy drive? +; jr z,xxxxx ; handle floppy + ld e,4 ; assume hard disk + jr makdph0 ; continue +; +makdphuna1: ; handle ram/rom + ld c,$45 ; una func: get disk info + ld de,$9000 ; 512 byte buffer *** fix!!! *** + rst 08 ; call una + bit 7,b ; test ram drive bit + ld e,1 ; assume rom + jr z,makdph0 ; not set, rom drive, continue + ld e,2 ; otherwise, must be ram drive + jr makdph0 ; continue +; +makdphwbw: ; determine appropriate dpb (WBW mode) +; + ld e,1 ; assume rom + cp $00+0 ; rom? + jr z,makdph0 ; yes, jump ahead + ld e,2 ; assume ram + cp $00+1 ; ram? + jr z,makdph0 ; yes, jump ahead + and $f0 ; ignore unit nibble now + ld e,6 ; assume floppy + cp $10 ; floppy? + jr z,makdph0 ; yes, jump ahead + ld e,3 ; assume ram floppy + cp $20 ; ram floppy? + jr z,makdph0 ; yes, jump ahead + ld e,4 ; everything else is assumed to be hard disk + jr makdph0 ; yes, jump ahead +; +makdph0: + ld hl,(dpbloc) ; point to start of dpb table in CBIOS + ld a,e ; get index of target DPB to A + add a,a ; each entry is two bytes + call addhl ; add offset for desired DPB address + ld e,(hl) ; dereference HL + inc hl ; into DE, so DE + ld d,(hl) ; has address of target DPB +; +makdph1: +; + ; build the dph + pop hl ; hl := start of dph + ld a,8 ; size of dph reserved area + call addhl ; leave it alone (zero filled) +; + ld bc,(dirbuf) ; address of dirbuf + ld (hl),c ; plug dirbuf + inc hl ; ... into dph + ld (hl),b ; ... and bump + inc hl ; ... to next dph entry +; + ld (hl),e ; plug dpb address + inc hl ; ... into dph + ld (hl),d ; ... and bump + inc hl ; ... to next entry + dec de ; point + dec de ; ... to start + dec de ; ... of + dec de ; ... dpb + dec de ; ... prefix data (cks & als buf sizes) + call makdph2 ; handle cks buf, then fall thru for als buf + ret nz ; bail out on error +makdph2: + ex de,hl ; point hl to cks/als size adr + ld c,(hl) ; bc := cks/als size + inc hl ; ... and bump + ld b,(hl) ; ... past + inc hl ; ... cks/als size + ex de,hl ; bc and hl roles restored + ld a,b ; check to see + or c ; ... if bc is zero + jr z,makdph3 ; if zero, bypass alloc, use zero for address + call alloc ; alloc bc bytes, address returned in bc + jp nz,instovf ; handle overflow error +makdph3: + ld (hl),c ; save cks/als buf + inc hl ; ... address in + ld (hl),b ; ... dph and bump + inc hl ; ... to next dph entry + xor a ; signal success + ret +; +; Handle overflow error in installation +; +instovf: + ; restore stack frame and CBIOS image + ld sp,(xstksav) ; restore stack frame + ld hl,$8000 ; start of CBIOS image buffer + ld de,$e600 ; start of CBIOS + ld bc,$fc00 - $e600 ; size of CBIOS + ldir ; restore it + jp errovf +; +alloc: +; +; allocate bc bytes from buf pool, return starting +; address in bc. leave all other regs alone except a +; z for success, nz for failure +; + push de ; save original de + push hl ; save original hl + ld hl,(buftop) ; hl := current buffer top + push hl ; save as start of new buffer + push bc ; get byte count + pop de ; ... into de + add hl,de ; add it to buffer top + ld a,$ff ; assume overflow failure + jr c,alloc1 ; if overflow, bypass with a == $ff + push hl ; save it + ld de,$10000 - $FC00 + $40 ; setup de for overflow test + add hl,de ; check for overflow + pop hl ; recover hl + ld a,$ff ; assume failure + jr c,alloc1 ; if overflow, continue with a == $ff + ld (buftop),hl ; save new top + inc a ; signal success +; +alloc1: + pop bc ; buf start address to bc + pop hl ; restore original hl + pop de ; restore original de + or a ; signal success + ret +; ; Scan drive map table for integrity ; Currently just checks for multiple drive ; letters referencing a single file system ; valid: - ld hl,(maploc) ; get the map table location - dec hl ; point to table entry count - ld b,(hl) ; B := table entries - dec b ; loop one less times than num entries - inc hl ; point back to table start + ld hl,mapwrk ; point to working drive map table + ld b,16 - 1 ; loop one less times than num entries +; + ; check that drive A: is assigned + ld a,$ff ; value that indicates unassigned + cp (hl) ; compare to A: value + jp z,errnoa ; handle failure ; valid1: ; outer loop +; call crlf push hl ; save pointer push bc ; save loop control call valid2 ; do the inner loop @@ -321,6 +633,7 @@ valid1: ; outer loop ld a,4 ; 4 bytes per entry call addhl ; bump to next entry djnz valid1 ; loop until done + xor a ; signal OK ret ; done ; valid2: ; setup for inner loop @@ -330,25 +643,72 @@ valid2: ; setup for inner loop pop de ; de points to comparison entry ; valid3: ; inner loop - ld c,(hl) ; first byte to C - ld a,(de) ; second byte to A - cp c ; compare - inc hl ; bump HL to next byte + ; bypass unassigned drives (only need to test 1) + ld a,(hl) ; get first drive device/unit in A + cp $ff ; unassigned? + jr z,valid4 ; yes, skip +; + ; compare device/unit/slice values + ld a,(de) ; first byte to A + cp (hl) ; compare jr nz,valid4 ; if not equal, continue loop inc de ; bump DE to next byte - ld c,(hl) ; first byte to C - ld a,(de) ; second byte to A - cp c ; compare - ret z ; both bytes equal, return signaling problem + inc hl ; bump HL to next byte + ld a,(de) ; first byte to A + cp (hl) ; compare + ret z ; both bytes equal, return signalling problem dec de ; point DE back to first byte of comparison entry + dec hl ; point HL back ; valid4: ; no match, loop + inc hl inc hl ; bump HL inc hl ; ... to inc hl ; ... next entry + or $FF ; no match djnz valid3 ; loop as appropriate ret ; +; Show a specific drive assignment +; +drvshow: + ld a,(dstdrv) ; get the drive num + call chkdrv ; valid drive letter? + ret nz ; abort if not + call showone ; show it + xor a ; signal success + ret ; done +; +; Delete (unassign) drive +; +drvdel: + ld a,(dstdrv) ; get the dest drive (to be unassigned) + call chkdrv ; valid drive letter? + ret nz ; abort if not + ; point to correct entry in drive map + ld hl,mapwrk ; point to working drive map + ld a,(dstdrv) ; get drive letter to remove + rlca ; calc table offset + rlca ; ... as drive num * 4 + call addhl ; get final table offset + ; wipe out the drive letter + ld a,$ff ; dev/unit := $FF (unassigned) + ld (hl),a ; do it + xor a ; zero accum + inc hl ; slice := 0 + ld (hl),a ; do it + inc hl ; DPH pointer lsb := 0 + ld (hl),a ; do it + inc hl ; DPH pointer msb := 0 + ld (hl),a ; do it + ; done + ld a,(dstdrv) ; get the destination + call showone ; show it + ld hl,modcnt ; point to mod count + inc (hl) ; increment it + xor a ; signal success + ret +; ; Swap the source and destination drive letters ; drvswap: @@ -364,7 +724,7 @@ drvswap: jp z,errswp ; Invalid swap request, src == dest ; ; Get pointer to source drive table entry - ld hl,(maploc) + ld hl,mapwrk ld a,(srcdrv) rlca rlca @@ -372,7 +732,7 @@ drvswap: ld (srcptr),hl ; ; Get pointer to destination drive table entry - ld hl,(maploc) + ld hl,mapwrk ld a,(dstdrv) rlca rlca @@ -403,7 +763,10 @@ drvswap: ld a,(srcdrv) ; get the source drive call showone ; show it ; - jp drvrst ; exit via a full drive reset + ld hl,modcnt ; point to mod count + inc (hl) ; increment it + xor a ; signal success + ret ; exit ; ; Assign drive to specified device/unit/slice ; @@ -440,8 +803,8 @@ drvmap1: ; loop through device table looking for a match ; drvmap2: ; verify the unit is eligible for assignment (hard disk unit only!) ld a,c ; get the specified device number - call chktyp ; check it - jp nz,errtyp ; abort with bad unit error +; call chktyp ; check it +; jp nz,errtyp ; abort with bad unit error ; ; construct the requested dph table entry ld a,c ; C has device num @@ -461,13 +824,14 @@ drvmap2: ; verify the unit is eligible for assignment (hard disk unit only!) ld a,c ; device/unit to A call chkdev ; device/unit OK? pop bc ; restore device/unit/slice - jp nz,errdev ; invalid device specified +; jp nz,errdev ; invalid device specified + ret nz ; ; resolve the CBIOS DPH table entry ld a,(dstdrv) ; dest drv num to A call chkdrv ; valid drive? ret nz ; abort if invalid - ld hl,(maploc) ; start of DPH table to HL + ld hl,mapwrk ; point to start of drive map rlca ; multiply by rlca ; ... entry size of 4 call addhl ; adjust HL to point to entry @@ -481,7 +845,10 @@ drvmap2: ; verify the unit is eligible for assignment (hard disk unit only!) ; finish up ld a,(dstdrv) ; get the destination drive call showone ; show it's new value - jp drvrst ; exit via drive reset + ld hl,modcnt ; point to mod count + inc (hl) ; increment it + xor a ; signal success + ret ; exit ; ; UNA mode drive mapping ; @@ -492,7 +859,6 @@ drvmapu: ld b,a ; put in b ld d,0 ; preset type to 0 ld c,$48 ; una func: get disk type -; call $fffd ; call una, b is assumed to be untouched!!! rst 08 ; call una, b is assumed to be untouched!!! ld a,d ; resultant device type to a cp $40 ; RAM/ROM @@ -517,7 +883,6 @@ drvmapu0: ld b,a ; unit num to B ld c,$45 ; UNA func: get disk info ld de,$9000 ; 512 byte buffer *** FIX!!! *** -; call $fffd ; call UNA rst 08 ; call UNA bit 7,b ; test RAM drive bit ld de,udevrom ; assume ROM @@ -540,18 +905,18 @@ drvmapu1: ld a,(dstdrv) ; dest drv num to A call chkdrv ; valid drive? ret nz ; abort if invalid - ld hl,(maploc) ; start of DPH table to HL + ld hl,mapwrk ; point to start of drive map rlca ; multiply by rlca ; ... entry size of 4 call addhl ; adjust HL to point to entry ld (dstptr),hl ; save it ; - ; verify the drive letter being assigned is a hard disk - ld a,(hl) ; get the device/unit byte - push hl ; save pointer - call chktypu ; check it - pop hl ; recover pointer - jp nz,errtyp ; abort with bad device type error +; ; verify the drive letter being assigned is a hard disk +; ld a,(hl) ; get the device/unit byte +; push hl ; save pointer +; call chktypu ; check it +; pop hl ; recover pointer +; jp nz,errtyp ; abort with bad device type error ; ; shove updated device/unit/slice into the entry ld a,(unit) ; get specified unit @@ -563,32 +928,53 @@ drvmapu1: ; finish up ld a,(dstdrv) ; get the destination drive call showone ; show it's new value - jp drvrst ; exit via drive reset + ld hl,modcnt ; point to mod count + inc (hl) ; increment it + xor a ; signal success + ret ; ; Display all active drive letter assignments ; showall: - ld hl,(maploc) ; HL = address of drive map - dec hl ; point to prior byte with map entry count - ld b,(hl) ; put it in b for loop counter + ld b,16 ; 16 drives possible ld c,0 ; map index (drive letter) ; ld a,b ; load count - or a ; set flags + or $ff ; signal no action ret z ; bail out if zero ; showall1: ; loop ld a,c ; - call showone + call showass inc c djnz showall1 + or $ff ret ; +; Display drive letter assignment IF it is assigned +; Drive num in A +; +showass: +; + ; setup HL to point to desired entry in table + ld c,a ; save incoming drive in C + ld hl,mapwrk ; HL = address of drive map + rlca + rlca + call addhl ; HL = address of drive map table entry + ld a,(hl) ; get device/unit value + cp $ff ; compare to unassigned value + ld a,c ; recover original drive num + ret z ; bail out if unassigned drive + ; fall thru to display drive +; ; Display drive letter assignment for the drive num in A ; showone: ; push af ; save the incoming drive num +; + call crlf ; formatting ; ld de,indent ; indent call prtstr ; ... to look nice @@ -596,7 +982,7 @@ showone: ; setup HL to point to desired entry in table pop af push af - ld hl,(maploc) ; HL = address of drive map + ld hl,mapwrk ; HL = address of drive map rlca rlca call addhl ; HL = address of drive map table entry @@ -612,6 +998,8 @@ showone: ; ; render the map entry ld a,(hl) ; load device/unit + cp $FF ; empty? + ret z ; yes, bypass call prtdev ; print device mnemonic ld a,(hl) ; load device/unit again and $0f ; isolate unit num @@ -621,8 +1009,6 @@ showone: call prtchr ; print it ld a,(hl) ; load slice num call prtdecb ; print it -; - call crlf ; ret ; @@ -631,6 +1017,10 @@ showone: drvrst: ld c,$0d ; BDOS Reset Disk function call bdos ; do it +; + ld c,$25 ; BDOS Reset Multiple Drives + ld de,$ffff ; all drives + call bdos ; do it ; xor a ; signal success ret @@ -668,7 +1058,6 @@ prtdevu: ; UNA mode version of print device ld b,a ; B := unit num ld c,$48 ; UNA func: get disk type -; call $fffd ; call UNA rst 08 ; call UNA ld a,d ; disk type to A pop hl @@ -690,7 +1079,7 @@ prtdevu: ld de,udevdsd ; load string jp z,prtstr ; if DSD, print and return ld de,udevunk ; load string for unknown - jr prtstr ; and print it + jp prtstr ; and print it ; prtdevu1: ; handle RAM/ROM @@ -699,7 +1088,6 @@ prtdevu1: ld b,e ; unit num to B ld c,$45 ; UNA func: get disk info ld de,$9000 ; 512 byte buffer *** FIX!!! *** -; call $fffd ; call UNA rst 08 ; call UNA bit 7,b ; test RAM drive bit pop hl @@ -712,11 +1100,7 @@ prtdevu1: ; Check that specified drive num is valid ; chkdrv: - push hl ; preserve incoming hl - ld hl,(maploc) ; point to drive map - dec hl ; back up to point to table entry count - cp (hl) ; compare to incoming - pop hl ; restore hl now + cp 16 ; max of 16 drive letters jp nc,errdrv ; handle bad drive cp a ; set Z to signal good ret ; and return @@ -739,58 +1123,46 @@ chkdev1: pop af ; restore incoming device/unit cp c ; match to device/unit from BIOS list? pop bc ; restore loop control - ret z ; yes, match, return with Z set + jr z,chkdev2 ; yes, match inc c ; next device list entry djnz chkdev1 ; loop as needed - or $ff ; no match, signal error - ret ; done + jp errdev ; no match, handle error +; +chkdev2: ; check slice support + cp $30 ; A has device/unit, in hard disk range? + jr c,chkdev3 ; if not hard disk, check slice val + xor a ; otherwise, signal OK + ret +; +chkdev3: ; not a hard disk, make sure slice == 0 + ld a,(slice) ; get specified slice + or a ; set flags + jp nz,errslc ; invalid slice error + xor a ; signal OK + ret ; chkdevu: ; UNA variant ld b,a ; put in b ld d,0 ; preset type to 0 ld c,$48 ; una func: get disk type -; call $fffd ; call una rst 08 ; call una ld a,d ; resultant device type to a or a ; set flags - jr z,chkdevu1 ; invalid if 0 - xor a - ret -; -chkdevu1: ; handle invalid unit - or $ff ; signal error - ret ; done -; -; Check that specified device is valid for a mapping operation -; Only hard disk devices are dynamically mappable because -; the DPH vector allocation sizes may not change. -; -chktyp: ; HBIOS variant - cp 3 ; first mappable device is 3 (IDE) - jr c,chkunit1 ; if below 3, return error - cp 9 + 1 ; last mappable device is 9 (HDSK) - jr nc,chkunit1 ; if above 8, return error - xor a ; signal valid + jp z,errdev ; invalid if 0 +; + ; check for slice support, if required + cp $40 ; ram/rom? + jr z,chkdevu1 ; yes, check for slice +; cp $?? ; floppy? +; jr z,chkdevu1 ; yes, check for slice + xor a ; otherwise signal success ret ; and return ; -chktypu: ; UNA variant - ld b,a ; put unit in b - ld c,$48 ; una func: get disk type - ld d,0 ; preset disk type to zero -; call $fffd ; call UNA - rst 08 ; call UNA - ld a,d ; disk type to A - cp $41 ; IDE? - ret z ; OK - cp $42 ; PPIDE? - ret z ; OK - cp $43 ; SD? - ret z ; OK - cp $44 ; DSD? - ret z ; OK -; -chkunit1: ; return error - or $ff ; signal error +chkdevu1: + ld a,(slice) ; get specified slice + or a ; set flags + jp nz,errslc ; invalid slice error + xor a ; otherwise, signal OK ret ; and return ; ; Print character in A without destroying any registers @@ -847,6 +1219,17 @@ prthex: pop af ; restore AF ret ; done ; +; print the hex word value in bc +; +prthexword: + push af + ld a,b + call prthex + ld a,c + call prthex + pop af + ret +; ; Convert binary value in A to ascii hex characters in DE ; hexascii: @@ -922,11 +1305,16 @@ prtdec2: ; ; Start a new line ; +crlf2: + call crlf ; two of them crlf: + push af ; preserve AF ld a,13 ; call prtchr ; print it ld a,10 ; - jp prtchr ; print it + call prtchr ; print it + pop af ; restore AF + ret ; ; Get the next non-blank character from (HL). ; @@ -1097,6 +1485,7 @@ errver: ; CBIOS version is not as expected ; errdrv: ; Invalid drive letter specified push af + call crlf ld de,msgdrv1 call prtstr pop af @@ -1113,6 +1502,10 @@ errdev: ; invalid device name ld de,msgdev jr err ; +errslc: ; invalid slice + ld de,msgslc + jr err +; errtyp: ; invalid device assignment request (not a hard disk device type) ld de,msgtyp jr err @@ -1125,6 +1518,14 @@ errint: ; DPH table integrity error (multiple drives ref one filesystem) ld de,msgint jr err ; +errnoa: ; No A: drive assignment + ld de,msgnoa + jr err +; +errovf: ; CBIOS disk buffer overflow + ld de,msgovf + jr err +; errdos: ; handle BDOS errors push af ; save return code call crlf ; newline @@ -1135,13 +1536,13 @@ errdos: ; handle BDOS errors jr err2 ; err: ; print error string and return error signal - call crlf ; print newline + call crlf2 ; print double newline ; err1: ; without the leading crlf call prtstr ; print error string ; err2: ; without the string - call crlf ; print newline +; call crlf ; print newline or $ff ; signal error ret ; done ; @@ -1150,7 +1551,8 @@ err2: ; without the string ;=============================================================================== ; cbftbl .dw 0 ; address of CBIOS function table -maploc .dw 0 ; location of drive map +maploc .dw 0 ; location of CBIOS drive map table +dpbloc .dw 0 ; location of CBIOS DPB map table drives: dstdrv .db 0 ; destination drive srcdrv .db 0 ; source drive @@ -1159,12 +1561,18 @@ unit .db 0 ; source unit slice .db 0 ; source slice ; unamod .db 0 ; $ff indicates UNA UBIOS active +modcnt .db 0 ; count of drive map modifications ; srcptr .dw 0 ; source pointer for copy dstptr .dw 0 ; destination pointer for copy tmpent .fill 4,0 ; space to save a table entry tmpstr .fill 9,0 ; temporary string of up to 8 chars, zero term ; +buftop .dw 0 ; memory allocation buffer top +dirbuf .dw 0 ; directory buffer location +; +mapwrk .fill (4 * 16),$FF ; working copy of drive map +; devtbl: ; device table .dw dev00, dev01, dev02, dev03 .dw dev04, dev05, dev06, dev07 @@ -1200,23 +1608,25 @@ udevdsd .db "DSD",0 udevunk .db "UNK",0 ; stksav .dw 0 ; stack pointer saved at start +xstksav .dw 0 ; temp stack save for error recovery .fill stksiz,0 ; stack stack .equ $ ; stack top ; ; Messages ; indent .db " ",0 -msgban1 .db "ASSIGN v0.9e for RomWBW CP/M 2.2, 02-Sep-2014",0 -msgban2 .db 13,10,"Copyright 2014, Wayne Warthen, GNU GPL v3",13,10,0 +msgban1 .db "ASSIGN v1.0 for RomWBW CP/M 2.2, 19-Sep-2014",0 msghb .db " (HBIOS Mode)",0 msgub .db " (UBIOS Mode)",0 -msguse .db "Usage: ASSIGN [D:[={D:|[]:[]}]]",13,10 +msgban2 .db "Copyright 2014, Wayne Warthen, GNU GPL v3",0 +msguse .db "Usage: ASSIGN D:[=[{D:|[]:[]}]][,...]",13,10 .db " ex. ASSIGN (display all active assignments)",13,10 .db " ASSIGN /? (display version and usage)",13,10 .db " ASSIGN /L (display all possible devices)",13,10 .db " ASSIGN C:=D: (swaps C: and D:)",13,10 .db " ASSIGN C:=FD0: (assign C: to floppy unit 0)",13,10 - .db " ASSIGN C:=IDE0:1 (assign C: to IDE unit0, slice 1)",13,10,0 + .db " ASSIGN C:=IDE0:1 (assign C: to IDE unit0, slice 1)",13,10 + .db " ASSIGN C:= (unassign C:)",0 msgprm .db "Parameter error (ASSIGN /? for usage)",0 msginv .db "Unexpected CBIOS (signature missing)",0 msgver .db "Unexpected CBIOS version",0 @@ -1224,9 +1634,13 @@ msgdrv1 .db "Invalid drive letter (",0 msgdrv2 .db ":)",0 msgswp .db "Invalid drive swap request",0 msgdev .db "Invalid device name (ASSIGN /L for device list)",0 +msgslc .db "Specified device does not support slices",0 msgnum .db "Unit or slice number invalid",0 +msgovf .db "Disk buffer exceeded in CBIOS, aborted",0 msgtyp .db "Only hard drive devices can be reassigned",0 -msgint .db "WARNING: Multiple drive letters reference one filesystem!",0 +msgint .db "Multiple drive letters reference one filesystem, aborting!",0 +msgnoa .db "Drive A: is unassigned, aborting!",0 msgdos .db "DOS error, return code=0x",0 +msgmem .db " Disk Buffer Bytes Free",0 ; .end \ No newline at end of file diff --git a/Source/BIOS/ver.inc b/Source/BIOS/ver.inc index 4a2edb0f..25e497e0 100644 --- a/Source/BIOS/ver.inc +++ b/Source/BIOS/ver.inc @@ -1,7 +1,7 @@ #DEFINE RMJ 2 #DEFINE RMN 6 -#DEFINE RUP 1 -#DEFINE RTP 12 -#DEFINE BIOSVER "2.6.1" -#DEFINE BIOSBLD "Build 13" +#DEFINE RUP 2 +#DEFINE RTP 14 +#DEFINE BIOSVER "2.6.2" +#DEFINE BIOSBLD "Build 14" #DEFINE REVISION 500 diff --git a/Source/ZSDOS/Build.cmd b/Source/ZSDOS/Build.cmd index f0442d11..ad45fee5 100644 --- a/Source/ZSDOS/Build.cmd +++ b/Source/ZSDOS/Build.cmd @@ -12,5 +12,4 @@ set ZXLIBDIR=%TOOLS%/cpm/lib/ set ZXINCDIR=%TOOLS%/cpm/include/ zx ZMAC -ZSDOS -/P -zx LINK -ZSDOS[LD800] -ren zsdos.com zsdos.bin +zx LINK -ZSDOS.BIN=ZSDOS[LD800]