mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 14:11:48 -06:00
Merge branch 'master' of github.com:wwarthen/RomWBW
This commit is contained in:
7
Binary/Apps/Makefile
Normal file
7
Binary/Apps/Makefile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
TOOLS = ../../Tools
|
||||||
|
SUBDIRS = Tunes
|
||||||
|
|
||||||
|
include $(TOOLS)/Makefile.inc
|
||||||
|
|
||||||
|
clean::
|
||||||
|
rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.COM *.BIN
|
||||||
6
Binary/Apps/Tunes/Makefile
Normal file
6
Binary/Apps/Tunes/Makefile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
TOOLS = ../../../Tools
|
||||||
|
|
||||||
|
include $(TOOLS)/Makefile.inc
|
||||||
|
|
||||||
|
clean::
|
||||||
|
rm -f *.pt? *.mym
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
clean:
|
TOOLS = ../Tools
|
||||||
|
SUBDIRS = Apps
|
||||||
|
|
||||||
clobber:
|
include $(TOOLS)/Makefile.inc
|
||||||
|
|
||||||
|
clobber::
|
||||||
rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom
|
rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom
|
||||||
|
|
||||||
all:
|
|
||||||
|
|||||||
@@ -40,6 +40,13 @@ Version 2.9.2
|
|||||||
- PMS: Added font compression option
|
- PMS: Added font compression option
|
||||||
- PMS: Added a "safe mode" startup w/ minimal device support
|
- PMS: Added a "safe mode" startup w/ minimal device support
|
||||||
- WBW: Switch RC/SC Z180 platforms to 115,200 default baud rate
|
- WBW: Switch RC/SC Z180 platforms to 115,200 default baud rate
|
||||||
|
- PMS: Enhanced PPIDE driver to handle multiple PPI interfaces
|
||||||
|
- PMS: Added a ROM based game
|
||||||
|
- WBW: Only assign drive letters to hard disk devices with media
|
||||||
|
- WBW: Enhanced IDE driver to handle multiple IDE interfaces
|
||||||
|
- D?R: Contributed SC126 How-To: Preparing a MicroSD Card to Transfer Files to/from a Linux System
|
||||||
|
- PMS: Updated romldr to handle more than 9 drives
|
||||||
|
- PMS: Added "user" rom module template
|
||||||
|
|
||||||
Version 2.9.1
|
Version 2.9.1
|
||||||
-------------
|
-------------
|
||||||
|
|||||||
BIN
Doc/Contrib/SC126_How-To_No_1_Serial_Comms_Using_Minicom.pdf
Normal file
BIN
Doc/Contrib/SC126_How-To_No_1_Serial_Comms_Using_Minicom.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
Doc/NZCOM Manual.pdf
Normal file
BIN
Doc/NZCOM Manual.pdf
Normal file
Binary file not shown.
4
Makefile
4
Makefile
@@ -1,7 +1,7 @@
|
|||||||
all:
|
all:
|
||||||
cd Tools/unix ; make install
|
cd Tools/unix ; make install
|
||||||
cd Source ; make all
|
cd Source ; make install
|
||||||
cd Source/Images ; make al
|
cd Source/Images ; make all
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd Tools/unix ; make clean
|
cd Tools/unix ; make clean
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
***********************************************************************
|
***********************************************************************
|
||||||
|
|
||||||
Wayne Warthen (wwarthen@gmail.com)
|
Wayne Warthen (wwarthen@gmail.com)
|
||||||
Version 2.9.2-pre.27, 2020-01-26
|
Version 2.9.2-pre.29, 2020-02-08
|
||||||
https://www.retrobrewcomputers.org/
|
https://www.retrobrewcomputers.org/
|
||||||
|
|
||||||
RomWBW is a ROM-based implementation of CP/M-80 2.2 and Z-System for
|
RomWBW is a ROM-based implementation of CP/M-80 2.2 and Z-System for
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ SUBDIRS = XM FDU FAT
|
|||||||
# Tune - left out for now
|
# Tune - left out for now
|
||||||
DEST = ../../Binary/Apps
|
DEST = ../../Binary/Apps
|
||||||
TOOLS =../../Tools
|
TOOLS =../../Tools
|
||||||
RELPATH = Source/Apps
|
|
||||||
|
|
||||||
include $(TOOLS)/Makefile.inc
|
include $(TOOLS)/Makefile.inc
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
;
|
;
|
||||||
;[2019/08/11] v1.4 Support SCZ180 platform.
|
;[2019/08/11] v1.4 Support SCZ180 platform.
|
||||||
;
|
;
|
||||||
|
;[2020/02/02] v1.5 PMS Basic command line support
|
||||||
;
|
;
|
||||||
; Constants
|
; Constants
|
||||||
;
|
;
|
||||||
@@ -40,6 +41,7 @@ PORT_SCZ180 .EQU $0C ; RTC port for SBCZ180
|
|||||||
PORT_EZZ80 .EQU $C0 ; RTC port for EZZ80 (actually does not have one!!!)
|
PORT_EZZ80 .EQU $C0 ; RTC port for EZZ80 (actually does not have one!!!)
|
||||||
|
|
||||||
BDOS .EQU 5 ; BDOS invocation vector
|
BDOS .EQU 5 ; BDOS invocation vector
|
||||||
|
FCB .EQU 05CH ; Start of command line
|
||||||
|
|
||||||
BID_BOOT .EQU $00
|
BID_BOOT .EQU $00
|
||||||
HB_BNKCALL .EQU $FFF9
|
HB_BNKCALL .EQU $FFF9
|
||||||
@@ -1220,18 +1222,22 @@ IDBIO2:
|
|||||||
; Note:above code is not fully in sync with current menu code
|
; Note:above code is not fully in sync with current menu code
|
||||||
|
|
||||||
RTC_TOP_LOOP:
|
RTC_TOP_LOOP:
|
||||||
|
CALL RTC_RESET_ON
|
||||||
|
CALL RTC_BIT_DELAY
|
||||||
|
CALL RTC_BIT_DELAY
|
||||||
|
CALL RTC_BIT_DELAY
|
||||||
|
|
||||||
|
LD A,(FCB+1) ; If there a command line tail
|
||||||
|
CP '/' ; get the command and feed it
|
||||||
|
LD A,(FCB+2) ; into the input stream
|
||||||
|
JR Z,RTC_UCL
|
||||||
|
|
||||||
LD DE,CRLF_MSG
|
LD DE,CRLF_MSG
|
||||||
LD C,09H ; CP/M write string to console call
|
LD C,09H ; CP/M write string to console call
|
||||||
CALL 0005H
|
CALL 0005H
|
||||||
|
|
||||||
CALL RTC_HELP
|
CALL RTC_HELP
|
||||||
|
|
||||||
CALL RTC_RESET_ON
|
|
||||||
|
|
||||||
CALL RTC_BIT_DELAY
|
|
||||||
CALL RTC_BIT_DELAY
|
|
||||||
CALL RTC_BIT_DELAY
|
|
||||||
|
|
||||||
RTC_TOP_LOOP_1:
|
RTC_TOP_LOOP_1:
|
||||||
LD DE,RTC_TOP_LOOP1_PROMPT
|
LD DE,RTC_TOP_LOOP1_PROMPT
|
||||||
LD C,09H ; CP/M write string to console call
|
LD C,09H ; CP/M write string to console call
|
||||||
@@ -1239,7 +1245,7 @@ RTC_TOP_LOOP_1:
|
|||||||
|
|
||||||
LD C,01H ; CP/M console input call
|
LD C,01H ; CP/M console input call
|
||||||
CALL 0005H
|
CALL 0005H
|
||||||
|
RTC_UCL:
|
||||||
AND %01011111 ; handle lower case responses to menu
|
AND %01011111 ; handle lower case responses to menu
|
||||||
|
|
||||||
CP 'L'
|
CP 'L'
|
||||||
@@ -1312,6 +1318,9 @@ RTC_TOP_LOOP_CHARGE:
|
|||||||
LD C,09H ; CP/M write string to console call
|
LD C,09H ; CP/M write string to console call
|
||||||
CALL 0005H
|
CALL 0005H
|
||||||
CALL RTC_CHARGE_ENABLE
|
CALL RTC_CHARGE_ENABLE
|
||||||
|
LD A,(FCB+1) ; If we came from the
|
||||||
|
CP '/' ; command line
|
||||||
|
RET Z ; exit back to CP/M
|
||||||
JP RTC_TOP_LOOP_1
|
JP RTC_TOP_LOOP_1
|
||||||
|
|
||||||
RTC_TOP_LOOP_NOCHARGE:
|
RTC_TOP_LOOP_NOCHARGE:
|
||||||
@@ -1319,6 +1328,9 @@ RTC_TOP_LOOP_NOCHARGE:
|
|||||||
LD C,09H ; CP/M write string to console call
|
LD C,09H ; CP/M write string to console call
|
||||||
CALL 0005H
|
CALL 0005H
|
||||||
CALL RTC_CHARGE_DISABLE
|
CALL RTC_CHARGE_DISABLE
|
||||||
|
LD A,(FCB+1) ; If we came from the
|
||||||
|
CP '/' ; command line
|
||||||
|
RET Z ; exit back to CP/M
|
||||||
JP RTC_TOP_LOOP_1
|
JP RTC_TOP_LOOP_1
|
||||||
|
|
||||||
RTC_TOP_LOOP_START:
|
RTC_TOP_LOOP_START:
|
||||||
@@ -1350,6 +1362,9 @@ RTC_TOP_LOOP_TIME:
|
|||||||
LD DE,RTC_PRINT_BUFFER
|
LD DE,RTC_PRINT_BUFFER
|
||||||
LD C,09H ; CP/M write string to console call
|
LD C,09H ; CP/M write string to console call
|
||||||
CALL 0005H
|
CALL 0005H
|
||||||
|
LD A,(FCB+1) ; If we came from the
|
||||||
|
CP '/' ; command line
|
||||||
|
RET Z ; exit back to CP/M
|
||||||
JP RTC_TOP_LOOP_1
|
JP RTC_TOP_LOOP_1
|
||||||
|
|
||||||
RTC_TOP_LOOP_RAW:
|
RTC_TOP_LOOP_RAW:
|
||||||
@@ -1552,7 +1567,7 @@ TESTING_BIT_DELAY_OVER:
|
|||||||
|
|
||||||
RTC_HELP_MSG:
|
RTC_HELP_MSG:
|
||||||
.DB 0Ah, 0Dh ; line feed and carriage return
|
.DB 0Ah, 0Dh ; line feed and carriage return
|
||||||
.TEXT "RTC: Version 1.4"
|
.TEXT "RTC: Version 1.5"
|
||||||
.DB 0Ah, 0Dh ; line feed and carriage return
|
.DB 0Ah, 0Dh ; line feed and carriage return
|
||||||
.TEXT "Commands: E)xit T)ime st(A)rt S)et R)aw L)oop C)harge N)ocharge D)elay I)nit G)et P)ut B)oot H)elp"
|
.TEXT "Commands: E)xit T)ime st(A)rt S)et R)aw L)oop C)harge N)ocharge D)elay I)nit G)et P)ut B)oot H)elp"
|
||||||
.DB 0Ah, 0Dh ; line feed and carriage return
|
.DB 0Ah, 0Dh ; line feed and carriage return
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
; 2018-01-26 [WBW] Initial release
|
; 2018-01-26 [WBW] Initial release
|
||||||
; 2018-01-28 [WBW] Added support for MYM sound files
|
; 2018-01-28 [WBW] Added support for MYM sound files
|
||||||
; 2019-11-21 [WBW] Added table-driven configuration
|
; 2019-11-21 [WBW] Added table-driven configuration
|
||||||
|
; 2020-02-11 [WBW] Made hardware config & detection more flexible
|
||||||
;_______________________________________________________________________________
|
;_______________________________________________________________________________
|
||||||
;
|
;
|
||||||
; ToDo:
|
; ToDo:
|
||||||
@@ -81,30 +82,48 @@ TYPMYM .EQU 3 ; FILTYP value for MYM sound file
|
|||||||
LD A,RMJ << 4 | RMN ; Expected HBIOS ver
|
LD A,RMJ << 4 | RMN ; Expected HBIOS ver
|
||||||
CP D ; Compare with result above
|
CP D ; Compare with result above
|
||||||
JP NZ,ERRBIO ; Handle BIOS error
|
JP NZ,ERRBIO ; Handle BIOS error
|
||||||
|
LD A,L ; Platform id to A
|
||||||
|
LD (CURPLT),A ; Save as current platform id
|
||||||
;
|
;
|
||||||
; Use platform id to setup active configuration
|
|
||||||
LD A,L ; Platform ID is still in L from above
|
|
||||||
RLCA ; Adjust for table entry size (4 bytes)
|
|
||||||
PUSH AF ; Save ID * 2 for later
|
|
||||||
RLCA
|
|
||||||
LD HL,CFGTBL ; Point to start of config table
|
LD HL,CFGTBL ; Point to start of config table
|
||||||
CALL ADDHLA ; HL := desired config table entry
|
CFGSEL:
|
||||||
LD DE,CFG ; Dest is active config
|
LD A,$FF ; End of table marker
|
||||||
LD BC,4 ; Copy 4 bytes
|
CP (HL) ; Compare
|
||||||
LDIR ; Copy to active config
|
JP Z,ERRHW ; Bail out if no more configs to try
|
||||||
|
;
|
||||||
|
LD BC,CFGSIZ ; Size of one entry
|
||||||
|
LD DE,CFG ; Active config structure
|
||||||
|
LDIR ; Update active config structure
|
||||||
|
;
|
||||||
|
LD A,(CURPLT) ; Get current running platform id
|
||||||
|
LD E,A ; Put in E
|
||||||
|
LD A,(PLT) ; Get platform id of loaded config
|
||||||
|
CP E ; Equal?
|
||||||
|
JR NZ,CFGSEL ; If no match keep trying
|
||||||
|
;
|
||||||
|
; Test for hardware (sound chip detection)
|
||||||
|
CALL SLOWIO
|
||||||
|
LD DE,(PORTS) ; D := RDAT, E := RSEL
|
||||||
|
LD C,E ; Port = RSEL
|
||||||
|
LD A,2 ; Register 2
|
||||||
|
OUT (C),A ; Select register 2
|
||||||
|
LD C,D ; Port = RDAT
|
||||||
|
LD A,$AA ; Value = $AA
|
||||||
|
OUT (C),A ; Write $AA to register 2
|
||||||
|
;LD C,E ; Port = RSEL
|
||||||
|
LD A,(RIN) ; Port = RIN
|
||||||
|
LD C,A ; ... to C
|
||||||
|
IN A,(C) ; Read back value in register 2
|
||||||
|
PUSH AF
|
||||||
|
CALL NORMIO
|
||||||
|
POP AF
|
||||||
|
;CALL PRTHEX ; *debug*
|
||||||
|
CP $AA ; Value as written?
|
||||||
|
JR NZ,CFGSEL ; If not, keep trying configs
|
||||||
;
|
;
|
||||||
LD HL,PLTSTR ; Point to platform string table
|
|
||||||
POP AF ; Recover platform id * 2 for table offset
|
|
||||||
CALL ADDHLA ; HL := Platform string index adr
|
|
||||||
LD E,(HL) ; DE := Platform string adr
|
|
||||||
INC HL
|
|
||||||
LD D,(HL)
|
|
||||||
CALL CRLF ; Formatting
|
CALL CRLF ; Formatting
|
||||||
CALL PRTSTR ; Display platform string
|
LD DE,(DESC) ; Load hardware description pointer
|
||||||
;
|
CALL PRTSTR ; Print description
|
||||||
LD A,(CFG) ; RSEL port address to A
|
|
||||||
INC A ; Test for $FF
|
|
||||||
JP Z,ERRPLT ; Bail out if unsupported platform
|
|
||||||
;
|
;
|
||||||
; Test for timer running to determine if it can be used for delay
|
; Test for timer running to determine if it can be used for delay
|
||||||
LD B,BF_SYSGET ; HBIOS: GET function
|
LD B,BF_SYSGET ; HBIOS: GET function
|
||||||
@@ -123,19 +142,6 @@ SETDLY:
|
|||||||
LD (WMOD),A ; Save wait mode
|
LD (WMOD),A ; Save wait mode
|
||||||
CALL PRTSTR ; Print it
|
CALL PRTSTR ; Print it
|
||||||
;
|
;
|
||||||
; ; *DEBUG*
|
|
||||||
; LD A,','
|
|
||||||
; CALL PRTCHR
|
|
||||||
; LD HL,CFG
|
|
||||||
; LD B,4
|
|
||||||
;DBGLP:
|
|
||||||
; LD A,' '
|
|
||||||
; CALL PRTCHR
|
|
||||||
; LD A,(HL)
|
|
||||||
; INC HL
|
|
||||||
; CALL PRTHEX
|
|
||||||
; DJNZ DBGLP
|
|
||||||
;
|
|
||||||
; Get CPU speed & type from RomWBW HBIOS and compute quark delay factor
|
; Get CPU speed & type from RomWBW HBIOS and compute quark delay factor
|
||||||
LD B,$F8 ; HBIOS SYSGET function 0xF8
|
LD B,$F8 ; HBIOS SYSGET function 0xF8
|
||||||
LD C,$F0 ; CPUINFO subfunction 0xF0
|
LD C,$F0 ; CPUINFO subfunction 0xF0
|
||||||
@@ -146,31 +152,13 @@ SETDLY:
|
|||||||
LD (QDLY),HL ; Save result as quark delay factor
|
LD (QDLY),HL ; Save result as quark delay factor
|
||||||
;
|
;
|
||||||
; Activate SCG card if applicable
|
; Activate SCG card if applicable
|
||||||
LD A,(CFG+3)
|
LD A,(ACR)
|
||||||
CP $FF
|
CP $FF
|
||||||
JR Z,NOSCG
|
JR Z,NOSCG
|
||||||
LD C,A
|
LD C,A
|
||||||
LD A,$FF
|
LD A,$FF
|
||||||
OUT (C),A
|
OUT (C),A
|
||||||
NOSCG:
|
NOSCG:
|
||||||
;
|
|
||||||
; Test for hardware (sound chip detection)
|
|
||||||
CALL SLOWIO
|
|
||||||
LD DE,(CFG) ; D := RDAT, E := RSEL
|
|
||||||
LD C,E ; Port = RSEL
|
|
||||||
LD A,2 ; Register 2
|
|
||||||
OUT (C),A ; Select register 2
|
|
||||||
LD C,D ; Port = RDAT
|
|
||||||
LD A,$AA ; Value = $AA
|
|
||||||
OUT (C),A ; Write $AA to register 2
|
|
||||||
LD C,E ; Port = RSEL
|
|
||||||
IN A,(C) ; Read back value in register 2
|
|
||||||
PUSH AF
|
|
||||||
CALL NORMIO
|
|
||||||
POP AF
|
|
||||||
;CALL PRTHEX ; *debug*
|
|
||||||
CP $AA ; Value as written?
|
|
||||||
JP NZ,ERRHW ; If not, handle hardware error
|
|
||||||
;
|
;
|
||||||
; Clear heap storage
|
; Clear heap storage
|
||||||
LD HL,HEAP ; Point to heap start
|
LD HL,HEAP ; Point to heap start
|
||||||
@@ -431,7 +419,7 @@ IDBIO2:
|
|||||||
;
|
;
|
||||||
;
|
;
|
||||||
SLOWCPU:
|
SLOWCPU:
|
||||||
LD A,(CFG+2) ; Z180 base I/O port
|
LD A,(Z180) ; Z180 base I/O port
|
||||||
CP $FF ; Check for no value
|
CP $FF ; Check for no value
|
||||||
RET Z ; Bail out if no value
|
RET Z ; Bail out if no value
|
||||||
ADD A,$1E ; Apply offset of CMR register
|
ADD A,$1E ; Apply offset of CMR register
|
||||||
@@ -451,7 +439,7 @@ SLOWCPU:
|
|||||||
;
|
;
|
||||||
;
|
;
|
||||||
NORMCPU:
|
NORMCPU:
|
||||||
LD A,(CFG+2) ; Z180 base I/O port
|
LD A,(Z180) ; Z180 base I/O port
|
||||||
CP $FF ; Check for no value
|
CP $FF ; Check for no value
|
||||||
RET Z ; Bail out if no value
|
RET Z ; Bail out if no value
|
||||||
ADD A,$1E ; Apply offset of CMR register
|
ADD A,$1E ; Apply offset of CMR register
|
||||||
@@ -467,7 +455,7 @@ NORMCPU:
|
|||||||
;
|
;
|
||||||
;
|
;
|
||||||
SLOWIO:
|
SLOWIO:
|
||||||
LD A,(CFG+2) ; Z180 base I/O port
|
LD A,(Z180) ; Z180 base I/O port
|
||||||
CP $FF ; Check for no value
|
CP $FF ; Check for no value
|
||||||
RET Z ; Bail out if no value
|
RET Z ; Bail out if no value
|
||||||
ADD A,$32 ; Apply offset of DCNTL register
|
ADD A,$32 ; Apply offset of DCNTL register
|
||||||
@@ -482,7 +470,7 @@ SLOWIO:
|
|||||||
;
|
;
|
||||||
;
|
;
|
||||||
NORMIO:
|
NORMIO:
|
||||||
LD A,(CFG+2) ; Z180 base I/O port
|
LD A,(Z180) ; Z180 base I/O port
|
||||||
CP $FF ; Check for no value
|
CP $FF ; Check for no value
|
||||||
RET Z ; Bail out if no value
|
RET Z ; Bail out if no value
|
||||||
ADD A,$32 ; Apply offset of DCNTL register
|
ADD A,$32 ; Apply offset of DCNTL register
|
||||||
@@ -716,25 +704,56 @@ ERR2: ; without the string
|
|||||||
;
|
;
|
||||||
; CONFIG TABLE, ENTRY ORDER MATCHES HBIOS PLATFORM ID
|
; CONFIG TABLE, ENTRY ORDER MATCHES HBIOS PLATFORM ID
|
||||||
;
|
;
|
||||||
CFGTBL: ; RSEL RDAT Z180 ACR
|
CFGSIZ .EQU 8
|
||||||
.DB $FF, $FF, $FF, $FF ; PLATFORM ID 0 IS INVALID
|
|
||||||
.DB $9A, $9B, $FF, $9C ; SBC W/ SCG
|
|
||||||
.DB $FF, $FF, $FF, $FF ; ZETA (NOT POSSIBLE)
|
|
||||||
.DB $FF, $FF, $FF, $FF ; ZETA 2 (NOT POSSIBLE)
|
|
||||||
.DB $9C, $9D, $40, $FF ; N8 W/ ONBOARD PSG
|
|
||||||
.DB $9A, $9B, $40, $9C ; MK4 W/ SCG
|
|
||||||
.DB $9A, $9B, $FF, $FF ; UNA (NOT SUPPORTED)
|
|
||||||
.DB $D8, $D0, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (EB)
|
|
||||||
.DB $68, $60, $C0, $FF ; RCZ180 W/ RC SOUND MODULE (EB)
|
|
||||||
.DB $D8, $D0, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB)
|
|
||||||
.DB $68, $60, $C0, $FF ; SCZ180 W/ RC SOUND MODULE (EB)
|
|
||||||
;
|
;
|
||||||
CFG: ; ACTIVE CONFIG VALUES (FROM SELECTED CFGTBL)
|
CFGTBL: ; PLT RSEL RDAT RIN Z180 ACR
|
||||||
|
; DESC
|
||||||
|
.DB $01, $9A, $9B, $9A, $FF, $9C ; SBC W/ SCG
|
||||||
|
.DW HWSTR_SCG
|
||||||
|
;
|
||||||
|
.DB $04, $9C, $9D, $9C, $40, $FF ; N8 W/ ONBOARD PSG
|
||||||
|
.DW HWSTR_N8
|
||||||
|
;
|
||||||
|
.DB $05, $9A, $9B, $9A, $40, $9C ; MK4 W/ SCG
|
||||||
|
.DW HWSTR_SCG
|
||||||
|
;
|
||||||
|
.DB $07, $D8, $D0, $D8, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (EB)
|
||||||
|
.DW HWSTR_RCEB
|
||||||
|
;
|
||||||
|
.DB $07, $D1, $D0, $D0, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (MF)
|
||||||
|
.DW HWSTR_RCMF
|
||||||
|
;
|
||||||
|
.DB $08, $68, $60, $68, $C0, $FF ; RCZ180 W/ RC SOUND MODULE (EB)
|
||||||
|
.DW HWSTR_RCEB
|
||||||
|
;
|
||||||
|
.DB $08, $61, $60, $60, $C0, $FF ; RCZ180 W/ RC SOUND MODULE (MF)
|
||||||
|
.DW HWSTR_RCMF
|
||||||
|
;
|
||||||
|
.DB $09, $D8, $D0, $D8, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB)
|
||||||
|
.DW HWSTR_RCEB
|
||||||
|
;
|
||||||
|
.DB $09, $D1, $D0, $D0, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB)
|
||||||
|
.DW HWSTR_RCMF
|
||||||
|
;
|
||||||
|
.DB $0A, $68, $60, $68, $C0, $FF ; SCZ180 W/ RC SOUND MODULE (EB)
|
||||||
|
.DW HWSTR_RCEB
|
||||||
|
;
|
||||||
|
.DB $0A, $61, $60, $60, $C0, $FF ; SCZ180 W/ RC SOUND MODULE (MF)
|
||||||
|
.DW HWSTR_RCMF
|
||||||
|
;
|
||||||
|
.DB $FF ; END OF TABLE MARKER
|
||||||
|
;
|
||||||
|
CFG: ; ACTIVE CONFIG VALUES (FROM SELECTED CFGTBL ENTRY)
|
||||||
|
PLT .DB 0 ; RomWBW HBIOS platform id
|
||||||
|
PORTS:
|
||||||
RSEL .DB 0 ; Register selection port
|
RSEL .DB 0 ; Register selection port
|
||||||
RDAT .DB 0 ; Register data port
|
RDAT .DB 0 ; Register data port
|
||||||
|
RIN .DB 0 ; Register input port
|
||||||
Z180 .DB 0 ; Z180 base I/O port
|
Z180 .DB 0 ; Z180 base I/O port
|
||||||
ACR .DB 0 ; Aux Ctrl Reg I/O port on SCG
|
ACR .DB 0 ; Aux Ctrl Reg I/O port on SCG
|
||||||
|
DESC .DW 0 ; Hardware description string adr
|
||||||
;
|
;
|
||||||
|
CURPLT .DB 0 ; Current platform id reported by HBIOS
|
||||||
QDLY .DW 0 ; quark delay factor
|
QDLY .DW 0 ; quark delay factor
|
||||||
WMOD .DB 0 ; delay mode, non-zero to use timer
|
WMOD .DB 0 ; delay mode, non-zero to use timer
|
||||||
DCSAV .DB 0 ; for saving original Z180 DCNTL value
|
DCSAV .DB 0 ; for saving original Z180 DCNTL value
|
||||||
@@ -747,8 +766,8 @@ FILTYP .DB 0 ; Sound file type (TYPPT2, TYPPT3, TYPMYM)
|
|||||||
TMP .DB 0 ; work around use of undocumented Z80
|
TMP .DB 0 ; work around use of undocumented Z80
|
||||||
;
|
;
|
||||||
|
|
||||||
MSGBAN .DB "Tune Player for RomWBW v2.2, 21-Nov-2019",0
|
MSGBAN .DB "Tune Player for RomWBW v2.3, 11-Feb-2020",0
|
||||||
MSGUSE .DB "Copyright (C) 2019, Wayne Warthen, GNU GPL v3",13,10
|
MSGUSE .DB "Copyright (C) 2020, Wayne Warthen, GNU GPL v3",13,10
|
||||||
.DB "PTxPlayer Copyright (C) 2004-2007 S.V.Bulba",13,10
|
.DB "PTxPlayer Copyright (C) 2004-2007 S.V.Bulba",13,10
|
||||||
.DB "MYMPlay by Marq/Lieves!Tuore",13,10,13,10
|
.DB "MYMPlay by Marq/Lieves!Tuore",13,10,13,10
|
||||||
.DB "Usage: TUNE <filename>.[PT2|PT3|MYM]",0
|
.DB "Usage: TUNE <filename>.[PT2|PT3|MYM]",0
|
||||||
@@ -764,29 +783,10 @@ MSGDLY .DB ", delay mode",0
|
|||||||
MSGPLY .DB "Playing...",0
|
MSGPLY .DB "Playing...",0
|
||||||
MSGEND .DB " Done",0
|
MSGEND .DB " Done",0
|
||||||
;
|
;
|
||||||
PLTSTR:
|
HWSTR_SCG .DB "SCG ECB Board",0
|
||||||
.DW 0
|
HWSTR_N8 .DB "N8 Onboard Sound",0
|
||||||
.DW PLTSTR_SBC
|
HWSTR_RCEB .DB "RC2014 Sound Module (EB)",0
|
||||||
.DW PLTSTR_ZETA
|
HWSTR_RCMF .DB "RC2014 Sound Module (MF)",0
|
||||||
.DW PLTSTR_ZETA2
|
|
||||||
.DW PLTSTR_N8
|
|
||||||
.DW PLTSTR_MK4
|
|
||||||
.DW PLTSTR_UNA
|
|
||||||
.DW PLTSTR_RCZ80
|
|
||||||
.DW PLTSTR_RCZ180
|
|
||||||
.DW PLTSTR_EZZ80
|
|
||||||
.DW PLTSTR_SCZ180
|
|
||||||
;
|
|
||||||
PLTSTR_SBC .DB "SBC w/ SCG ECB Sound Card",0
|
|
||||||
PLTSTR_ZETA .DB "Zeta -- Not Supported!!!",0
|
|
||||||
PLTSTR_ZETA2 .DB "Zeta 2 -- Not Supported!!!",0
|
|
||||||
PLTSTR_N8 .DB "N8 Onboard Sound System",0
|
|
||||||
PLTSTR_MK4 .DB "Mark IV w/ SCG ECB Sound Card",0
|
|
||||||
PLTSTR_UNA .DB "UNA -- Not Supported!!!",0
|
|
||||||
PLTSTR_RCZ80 .DB "RC2014 Z80 w/ Sound Module (EB)",0
|
|
||||||
PLTSTR_RCZ180 .DB "RC2014 Z180 w/ Sound Module (EB)",0
|
|
||||||
PLTSTR_EZZ80 .DB "Easy Z80 w/ Sound Module (EB)",0
|
|
||||||
PLTSTR_SCZ180 .DB "SC Z180 w/ Sound Module (EB)",0
|
|
||||||
;
|
;
|
||||||
;===============================================================================
|
;===============================================================================
|
||||||
; PTx Player Routines
|
; PTx Player Routines
|
||||||
@@ -2172,7 +2172,7 @@ LOUT OUT (C),A
|
|||||||
#IF WBW
|
#IF WBW
|
||||||
DI
|
DI
|
||||||
CALL SLOWIO
|
CALL SLOWIO
|
||||||
LD DE,(CFG) ; D := RDAT, E := RSEL
|
LD DE,(PORTS) ; D := RDAT, E := RSEL
|
||||||
XOR A ; start with reg 0
|
XOR A ; start with reg 0
|
||||||
LD C,E ; point to address port
|
LD C,E ; point to address port
|
||||||
LD HL,AYREGS ; start of value list
|
LD HL,AYREGS ; start of value list
|
||||||
@@ -2557,7 +2557,7 @@ upsg: ld a,(WMOD) ; if WMOD = 1, CPU is z180
|
|||||||
call SLOWIO
|
call SLOWIO
|
||||||
|
|
||||||
upsg1: ld hl,(psource)
|
upsg1: ld hl,(psource)
|
||||||
ld de,(CFG) ; E := RSEL, D := RDAT
|
ld de,(PORTS) ; E := RSEL, D := RDAT
|
||||||
xor a
|
xor a
|
||||||
|
|
||||||
psglp: ld c,e ; C := RSEL
|
psglp: ld c,e ; C := RSEL
|
||||||
@@ -2629,47 +2629,47 @@ HEAP .EQU $
|
|||||||
|
|
||||||
VARS
|
VARS
|
||||||
|
|
||||||
ChanA .DS CHP
|
ChanA .DS CHP
|
||||||
ChanB .DS CHP
|
ChanB .DS CHP
|
||||||
ChanC .DS CHP
|
ChanC .DS CHP
|
||||||
|
|
||||||
;GlobalVars
|
;GlobalVars
|
||||||
DelyCnt .DS 1
|
DelyCnt .DS 1
|
||||||
CurESld .DS 2
|
CurESld .DS 2
|
||||||
CurEDel .DS 1
|
CurEDel .DS 1
|
||||||
Ns_Base_AddToNs
|
Ns_Base_AddToNs
|
||||||
Ns_Base .DS 1
|
Ns_Base .DS 1
|
||||||
AddToNs .DS 1
|
AddToNs .DS 1
|
||||||
|
|
||||||
AYREGS
|
AYREGS
|
||||||
|
|
||||||
VT_ .DS 256 ;CreatedVolumeTableAddress
|
VT_ .DS 256 ;CreatedVolumeTableAddress
|
||||||
|
|
||||||
EnvBase .EQU VT_+14
|
EnvBase .EQU VT_+14
|
||||||
|
|
||||||
T1_ .EQU VT_+16 ;Tone tables data depacked here
|
T1_ .EQU VT_+16 ;Tone tables data depacked here
|
||||||
|
|
||||||
T_OLD_1 .EQU T1_
|
T_OLD_1 .EQU T1_
|
||||||
T_OLD_2 .EQU T_OLD_1+24
|
T_OLD_2 .EQU T_OLD_1+24
|
||||||
T_OLD_3 .EQU T_OLD_2+24
|
T_OLD_3 .EQU T_OLD_2+24
|
||||||
T_OLD_0 .EQU T_OLD_3+2
|
T_OLD_0 .EQU T_OLD_3+2
|
||||||
T_NEW_0 .EQU T_OLD_0
|
T_NEW_0 .EQU T_OLD_0
|
||||||
T_NEW_1 .EQU T_OLD_1
|
T_NEW_1 .EQU T_OLD_1
|
||||||
T_NEW_2 .EQU T_NEW_0+24
|
T_NEW_2 .EQU T_NEW_0+24
|
||||||
T_NEW_3 .EQU T_OLD_3
|
T_NEW_3 .EQU T_OLD_3
|
||||||
|
|
||||||
PT2EMPTYORN .EQU VT_+31 ;1,0,0 sequence
|
PT2EMPTYORN .EQU VT_+31 ;1,0,0 sequence
|
||||||
|
|
||||||
NT_ .FILL 192 ;CreatedNoteTableAddress
|
NT_ .DS 192 ;CreatedNoteTableAddress
|
||||||
|
|
||||||
;local var
|
;local var
|
||||||
Ampl .EQU AYREGS+AmplC
|
Ampl .EQU AYREGS+AmplC
|
||||||
|
|
||||||
VAR0END .EQU VT_+16 ;INIT zeroes from VARS to VAR0END-1
|
VAR0END .EQU VT_+16 ;INIT zeroes from VARS to VAR0END-1
|
||||||
|
|
||||||
VARSEND .EQU $
|
VARSEND .EQU $
|
||||||
|
|
||||||
MDLADDR .EQU $
|
MDLADDR .EQU $
|
||||||
;
|
;
|
||||||
;===============================================================================
|
;===============================================================================
|
||||||
; MYM Player Storage
|
; MYM Player Storage
|
||||||
@@ -2678,10 +2678,11 @@ MDLADDR .EQU $
|
|||||||
.ORG HEAP
|
.ORG HEAP
|
||||||
; Reserve room for uncompressed data
|
; Reserve room for uncompressed data
|
||||||
uncomp:
|
uncomp:
|
||||||
.org $+(3*FRAG*REGS)
|
.DS (3*FRAG*REGS)
|
||||||
|
|
||||||
; The tune is stored here
|
; The tune is stored here
|
||||||
rows: .dw 0
|
rows:
|
||||||
|
.DS 2 ; WORD value
|
||||||
data:
|
data:
|
||||||
;
|
;
|
||||||
;===============================================================================
|
;===============================================================================
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
|
|
||||||
set TOOLS=../../Tools
|
|
||||||
|
|
||||||
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
|
|
||||||
|
|
||||||
set TASMTABS=%TOOLS%\tasm32
|
|
||||||
|
|
||||||
set ZXBINDIR=%TOOLS%/cpm/bin/
|
|
||||||
set ZXLIBDIR=%TOOLS%/cpm/lib/
|
|
||||||
set ZXINCDIR=%TOOLS%/cpm/include/
|
|
||||||
|
|
||||||
tasm -t80 -g3 -fFF bl.asm bl.bin bl.lst
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
|
|
||||||
if exist *.bin del *.bin
|
|
||||||
if exist *.lst del *.lst
|
|
||||||
if exist *.sys del *.sys
|
|
||||||
@@ -75,7 +75,7 @@ should be consulted to understand these. The build process used here
|
|||||||
produces several different configurations which can be loaded at runtime.
|
produces several different configurations which can be loaded at runtime.
|
||||||
The original distributed memory segment configuration occupies the top
|
The original distributed memory segment configuration occupies the top
|
||||||
of memory which, unfortunately, conflicts with the RomWBW HBIOS need to
|
of memory which, unfortunately, conflicts with the RomWBW HBIOS need to
|
||||||
occupt this space.
|
occupy this space.
|
||||||
|
|
||||||
Although RomWBW HBIOS is implemented in it's own dedicated memory bank, it
|
Although RomWBW HBIOS is implemented in it's own dedicated memory bank, it
|
||||||
requires a small proxy at the top of memory which acts as a mechansim to
|
requires a small proxy at the top of memory which acts as a mechansim to
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
setlocal & cd ZCPR33 && call Build || exit /b 1 & endlocal
|
setlocal & cd ZCPR33 && call Build || exit /b 1 & endlocal
|
||||||
|
setlocal & cd Z34RCP11 && call Build || exit /b 1 & endlocal
|
||||||
|
setlocal & cd NZFCP13 && call Build || exit /b 1 & endlocal
|
||||||
|
|
||||||
set PATH=%PATH%;..\..\Tools\zx;..\..\Tools\cpmtools;
|
set PATH=%PATH%;..\..\Tools\zx;..\..\Tools\cpmtools;
|
||||||
|
|
||||||
@@ -26,22 +28,22 @@ call :makebp 41nbnk
|
|||||||
|
|
||||||
rem pause
|
rem pause
|
||||||
|
|
||||||
cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:ws*.*
|
rem cpmrm.exe -f wbw_hd0 ../../Binary/hd_bp.img 0:ws*.*
|
||||||
|
rem
|
||||||
cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:*.img
|
rem cpmrm.exe -f wbw_hd0 ../../Binary/hd_bp.img 0:*.img
|
||||||
cpmcp.exe -f wbw_hd0 ../../Binary/hd0.img *.img 0:
|
rem cpmcp.exe -f wbw_hd0 ../../Binary/hd_bp.img *.img 0:
|
||||||
|
rem
|
||||||
cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:*.rel
|
rem cpmrm.exe -f wbw_hd0 ../../Binary/hd_bp.img 0:*.rel
|
||||||
cpmcp.exe -f wbw_hd0 ../../Binary/hd0.img *.rel 0:
|
rem cpmcp.exe -f wbw_hd0 ../../Binary/hd_bp.img *.rel 0:
|
||||||
|
rem
|
||||||
rem cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:*.dat
|
rem rem cpmrm.exe -f wbw_hd0 ../../Binary/hd_bp.img 0:*.dat
|
||||||
rem cpmcp.exe -f wbw_hd0 ../../Binary/hd0.img *.dat 0:
|
rem rem cpmcp.exe -f wbw_hd0 ../../Binary/hd_bp.img *.dat 0:
|
||||||
|
rem
|
||||||
cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:*.zex
|
rem cpmrm.exe -f wbw_hd0 ../../Binary/hd_bp.img 0:*.zex
|
||||||
cpmcp.exe -f wbw_hd0 ../../Binary/hd0.img *.zex 0:
|
rem cpmcp.exe -f wbw_hd0 ../../Binary/hd_bp.img *.zex 0:
|
||||||
|
rem
|
||||||
cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:myterm.z3t
|
rem cpmrm.exe -f wbw_hd0 ../../Binary/hd_bp.img 0:myterm.z3t
|
||||||
cpmcp.exe -f wbw_hd0 ../../Binary/hd0.img myterm.z3t 0:myterm.z3t
|
rem cpmcp.exe -f wbw_hd0 ../../Binary/hd_bp.img myterm.z3t 0:myterm.z3t
|
||||||
|
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|||||||
@@ -10,3 +10,5 @@ if exist zcpr33*.rel del zcpr33*.rel
|
|||||||
if exist *.bak del *.bak
|
if exist *.bak del *.bak
|
||||||
|
|
||||||
setlocal & cd ZCPR33 && call Clean.cmd & endlocal
|
setlocal & cd ZCPR33 && call Clean.cmd & endlocal
|
||||||
|
setlocal & cd Z34RCP11 && call Clean.cmd & endlocal
|
||||||
|
setlocal & cd NZFCP13 && call Clean.cmd & endlocal
|
||||||
|
|||||||
@@ -6,24 +6,24 @@ VERSIONS = \
|
|||||||
41tbnk 41nbnk
|
41tbnk 41nbnk
|
||||||
|
|
||||||
HD0IMG = ../../Binary/hd0.img
|
HD0IMG = ../../Binary/hd0.img
|
||||||
OBJECTS = $(foreach ver,$(VERSIONS),bp$(ver).img)
|
IMGFILES = $(foreach ver,$(VERSIONS),bp$(ver).img)
|
||||||
|
DISTFILES = *.zex *.rel myterm.z3t
|
||||||
|
|
||||||
OTHERS = zcpr33n.rel zcpr33t.rel \
|
OTHERS = zcpr33n.rel zcpr33t.rel \
|
||||||
bpbio-ww.rel bpsys.dat bpsys.bak bpbio-ww.err def-ww.lib
|
bpbio-ww.rel bpsys.dat bpsys.bak bpbio-ww.err def-ww.lib
|
||||||
|
|
||||||
TOOLS = ../../Tools
|
TOOLS = ../../Tools
|
||||||
CPMCP = $(TOOLS)/`uname`/cpmcp
|
|
||||||
IMGFILES = *.img *.rel *.zex myterm.z3t
|
|
||||||
|
|
||||||
SUBDIRS = ZCPR33
|
SUBDIRS = ZCPR33
|
||||||
include $(TOOLS)/Makefile.inc
|
include $(TOOLS)/Makefile.inc
|
||||||
|
|
||||||
$(HD0IMG): $(IMGFILES)
|
$(HD0IMG): $(IMGFILES)
|
||||||
$(CPMCP) -f wbw_hd0 $(HD0IMG) $(IMGFILES) 0:
|
$(CPMCP) -f wbw_hd0 $(HD0IMG) $(IMGFILES) $(DISTFILES) 0:
|
||||||
|
|
||||||
zcpr33n.rel zcpr33t.rel:
|
zcpr33n.rel zcpr33t.rel:
|
||||||
(cd ZCPR33 ; make install)
|
(cd ZCPR33 ; make install)
|
||||||
|
|
||||||
all:: $(OBJECTS) $(HD0IMG)
|
all:: $(HD0IMG)
|
||||||
|
|
||||||
clobber::
|
clobber::
|
||||||
rm -f $(HD0IMG)
|
rm -f $(HD0IMG)
|
||||||
|
|||||||
11
Source/BPBIOS/NZFCP13/Build.cmd
Normal file
11
Source/BPBIOS/NZFCP13/Build.cmd
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
set PATH=%PATH%;..\..\..\Tools\zx;..\..\..\Tools\cpmtools;
|
||||||
|
|
||||||
|
set ZXBINDIR=../../../tools/cpm/bin/
|
||||||
|
set ZXLIBDIR=../../../tools/cpm/lib/
|
||||||
|
set ZXINCDIR=../../../tools/cpm/include/
|
||||||
|
|
||||||
|
zx Z80ASM -nzfcp13/MF
|
||||||
|
rem zx ZMAC -nzfcp13.z80 -/P
|
||||||
7
Source/BPBIOS/NZFCP13/Clean.cmd
Normal file
7
Source/BPBIOS/NZFCP13/Clean.cmd
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if exist *.prn del *.prn
|
||||||
|
if exist *.lst del *.lst
|
||||||
|
if exist *.err del *.err
|
||||||
|
if exist *.rel del *.rel
|
||||||
BIN
Source/BPBIOS/NZFCP13/fcp-4.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-4.zrl
Normal file
Binary file not shown.
BIN
Source/BPBIOS/NZFCP13/fcp-4t.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-4t.zrl
Normal file
Binary file not shown.
BIN
Source/BPBIOS/NZFCP13/fcp-5.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-5.zrl
Normal file
Binary file not shown.
BIN
Source/BPBIOS/NZFCP13/fcp-5t.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-5t.zrl
Normal file
Binary file not shown.
BIN
Source/BPBIOS/NZFCP13/fcp-6.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-6.zrl
Normal file
Binary file not shown.
BIN
Source/BPBIOS/NZFCP13/fcp-6t.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-6t.zrl
Normal file
Binary file not shown.
BIN
Source/BPBIOS/NZFCP13/fcp-7t.zrl
Normal file
BIN
Source/BPBIOS/NZFCP13/fcp-7t.zrl
Normal file
Binary file not shown.
89
Source/BPBIOS/NZFCP13/nzfcp.doc
Normal file
89
Source/BPBIOS/NZFCP13/nzfcp.doc
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
Z-Relocatable Flow Control Packages
|
||||||
|
11 October 89 by Carson Wilson
|
||||||
|
|
||||||
|
The seven pre-compiled Flow Control Packages (FCP's) in this library may be
|
||||||
|
loaded directly to Z System with NZ-COM, Z3PLUS, or JetLDR, provided
|
||||||
|
sufficient space has been allocated to the FCP segment. The FCP's come in two
|
||||||
|
flavors. Files named FCP-nT.ZRL implement extended flow control processing
|
||||||
|
when needed using a program named IF.COM at the root of your path, or at
|
||||||
|
directory A0 if there is no path. Files named simply FCP-n.ZRL rely
|
||||||
|
exclusively on memory-based processing. The "n" in the filename indicates the
|
||||||
|
total number of records required by each package. The standard number of
|
||||||
|
records for both NZ-COM and Z3PLUS is currently 5, so if you wish to load a
|
||||||
|
larger FCP you must reconfigure your system with MKZCM or by editing your .Z3P
|
||||||
|
file. For general help with flow control commands, see the file IF.HLP, or
|
||||||
|
section 3.2.2 of your NZ-COM or Z3PLUS manual.
|
||||||
|
|
||||||
|
While IF.COM allows options not available in memory-resident flow-control
|
||||||
|
processing, fully resident versions free the user from the requirement that
|
||||||
|
IF.COM be present during flow control processing. Resident processing is also
|
||||||
|
somewhat faster due to the need to load IF.COM from disk for each flow control
|
||||||
|
command. Finally, the ability to locate and load the transient IF.COM
|
||||||
|
requires considerable code space in the resident code itself. Generally,
|
||||||
|
IF.COM is best used on fixed-disk systems, while resident processing is more
|
||||||
|
suited to floppy-based systems.
|
||||||
|
|
||||||
|
The options included in fully resident versions were selected somewhat
|
||||||
|
differently than those of those using IF.COM. Criteria, in order of
|
||||||
|
precedence, were as follows:
|
||||||
|
|
||||||
|
Transient Versions Resident Versions
|
||||||
|
------------------ -----------------
|
||||||
|
1. Is the feature available in 1. How useful is the feature?
|
||||||
|
IF.COM? 2. How much memory does the feature
|
||||||
|
2. Does the feature require disk require?
|
||||||
|
access?
|
||||||
|
3. How useful is the feature?
|
||||||
|
4. How much memory does the feature
|
||||||
|
require?
|
||||||
|
|
||||||
|
The tables below summarize the size and features of each flavor of FCP. Each
|
||||||
|
package includes only the features appearing above it. For example,
|
||||||
|
FCP-5T.ZRL (the default FCP for both NZ-COM and Z3PLUS) contains only ZIF,
|
||||||
|
IFQ, OR, AND, negation, ERROR, and NULL. Size is expressed as records plus
|
||||||
|
remaining bytes required by the FCP. As FCP space is allocated in record
|
||||||
|
units only, I have attempted to include only combinations which leave as
|
||||||
|
little remaining space possible. Sizes without corresponding filenames are
|
||||||
|
included for reference purposes only.
|
||||||
|
|
||||||
|
FEATURES OF TRANSIENT (IF.COM) FCPS SIZE(RECS+BYTES) FILE NAME
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
ZIF - unconditionally clear IF states?
|
||||||
|
IFQ - show current if status? 3+124 FCP-4T.ZRL
|
||||||
|
OR - set state at current level? 4+25
|
||||||
|
AND - reset state at current level?
|
||||||
|
Allow negation of conditions?
|
||||||
|
ERROR - test program error flag?
|
||||||
|
NULL - test for no file name? 4+84 FCP-5T.ZRL
|
||||||
|
REG - test register values? 5+16
|
||||||
|
AMBIG - test for "?" in file spec?
|
||||||
|
COMPR - test for compressed filespec?
|
||||||
|
= - test tokens for equality? 5+92 FCP-6T.ZRL
|
||||||
|
INPUT - test user input? 6+25
|
||||||
|
Allow "IF T" and "IF F" forms?
|
||||||
|
WHEEL - test wheel byte?
|
||||||
|
TCAP - test whether TCAP loaded?
|
||||||
|
EXIST - test for file existence? 6+106 FCP-7T.ZRL
|
||||||
|
EMPTY - test files for contents? 7+10
|
||||||
|
|
||||||
|
|
||||||
|
FEATURES OF RESIDENT FCPS SIZE(RECS+BYTES) FILE NAME
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
ZIF - unconditionally clear IF states?
|
||||||
|
IFQ - show current if status?
|
||||||
|
OR - set state at current level?
|
||||||
|
AND - reset state at current level?
|
||||||
|
Allow negation of conditions?
|
||||||
|
NULL - test for no file name?
|
||||||
|
INPUT - test user input?
|
||||||
|
= - test tokens for equality?
|
||||||
|
ERROR - test program error flag?
|
||||||
|
Allow "IF T" and "IF F" forms?
|
||||||
|
EXIST - test for file existence? 3+123 FCP-4.ZRL
|
||||||
|
AMBIG - test for "?" in file spec?
|
||||||
|
COMPR - test for compressed filespec?
|
||||||
|
REG - test register values?
|
||||||
|
WHEEL - test wheel byte?
|
||||||
|
TCAP - test whether TCAP loaded? 4+113 FCP-5.ZRL
|
||||||
|
EMPTY - test files for contents? 5+17 FCP-6.ZRL
|
||||||
|
|
||||||
161
Source/BPBIOS/NZFCP13/nzfcp.lib
Normal file
161
Source/BPBIOS/NZFCP13/nzfcp.lib
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
; Module: NZFCP.LIB
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.3
|
||||||
|
; Date: 9 Oct 89
|
||||||
|
; Changes: Prompts for options if SLR true.
|
||||||
|
|
||||||
|
; This module is a set of configuration options for the flow control package
|
||||||
|
; code in NZFCP.Z80. The options are not fully commented here; see
|
||||||
|
; "ZCPR3, The Manual" for a detailed discussion of most of them.
|
||||||
|
|
||||||
|
|
||||||
|
; * * * * * * N O T I C E * * * * * *
|
||||||
|
;
|
||||||
|
; The main code in Z33FCP.Z80 has been written with relative jump instructions
|
||||||
|
; for minimum code size. If the options below are changed, then some of the
|
||||||
|
; jumps may become out-of-range. You will then have to change the code based
|
||||||
|
; on the error messages you get from your assembler. I cannot think of any
|
||||||
|
; way to handle the jumps automatically (macros fail because the jump distances
|
||||||
|
; cannot be resolved fully even in two passes of the assembler). If you want
|
||||||
|
; to play things really safe, you can do a global search and replace to change
|
||||||
|
; all occurrences of the JR instruction to JP (but note that this change is
|
||||||
|
; irreversible). I prefer to live with this nuisance so that I can get the
|
||||||
|
; most out of the code.
|
||||||
|
;
|
||||||
|
; Another possible way to clear up a problem with a relative jump that is out
|
||||||
|
; of range is to take the block of code with the labels IFCTRUE and IFCFALSE
|
||||||
|
; and move it up or down in the code. It is placed somewhere in the middle of
|
||||||
|
; the resident options, so that the options can reach those entry points with
|
||||||
|
; a relative jump. You should try to place that code near the middle of the
|
||||||
|
; options which you have enabled.
|
||||||
|
;
|
||||||
|
; Jay Sage (May 17, 1987)
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; M A C R O S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; SLR assemblers allow selection of options during assembly.
|
||||||
|
|
||||||
|
SLR equ no
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
|
||||||
|
y equ yes
|
||||||
|
n equ no
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
.accept comment,option ; Prompt user for selection
|
||||||
|
endm
|
||||||
|
|
||||||
|
.printx
|
||||||
|
.printx Answer "Y" to include, "N" to exclude commands:
|
||||||
|
.printx
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
option equ default ; Use selections from file
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
; -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command names
|
||||||
|
|
||||||
|
; The CTABLE macro, which constructs the command dispatch table, includes a
|
||||||
|
; line for each command, the first parameter of which is the name of the
|
||||||
|
; command. These names may be changed if you wish. But make sure that you
|
||||||
|
; do not use a name that is longer than the maximum allowed length. If you
|
||||||
|
; do, the name will be truncated and a nonfatal error will occur during
|
||||||
|
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower
|
||||||
|
; case letters will be converted to upper case. The macro COMMAND is defined
|
||||||
|
; in Z34MAC.LIB.
|
||||||
|
|
||||||
|
cmdsize equ 4 ; Maximum length of command names
|
||||||
|
|
||||||
|
; Command table name, enable, wheel, jump_addr
|
||||||
|
; [ DO NOT CHANGE THESE PARAMETERS ]
|
||||||
|
ctable macro
|
||||||
|
ifcmd: command if, yes, no, ifstart
|
||||||
|
command and, andopt, no, andstart
|
||||||
|
command or, oropt, no, orstart
|
||||||
|
command else, yes, no, ifelse
|
||||||
|
command fi, yes, no, ifend
|
||||||
|
command ifq, ifqopt, no, ifstat0
|
||||||
|
command xif, yes, no, ifexit
|
||||||
|
command zif, zifopt, no, ifzero
|
||||||
|
endm
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; General configuration options
|
||||||
|
|
||||||
|
NOISE equ no ; Don't display if-state messages
|
||||||
|
|
||||||
|
select COMIF no 'Enable transient IF processing? '
|
||||||
|
|
||||||
|
PATHROOT equ yes ; Find transient IF in root of path
|
||||||
|
|
||||||
|
ifdrv equ 'A' ; Drive to use if PATHROOT is off or
|
||||||
|
; ..if the path is empty
|
||||||
|
ifusr equ 0 ; User to use if PATHROOT is off or
|
||||||
|
; ..if the path is empty
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command inclusion options
|
||||||
|
|
||||||
|
select ZIFOPT yes 'ZIF - unconditionally clear IF states? '
|
||||||
|
select IFQOPT yes 'IFQ - show current if status? '
|
||||||
|
select OROPT yes 'OR - set state at current level? '
|
||||||
|
select ANDOPT yes 'AND - reset state at current level? '
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; If Condition Options
|
||||||
|
|
||||||
|
if COMIF ; Different precedence if transient IF available.
|
||||||
|
select IFONEG yes 'Allow negation of conditions? '
|
||||||
|
negchar equ '~' ; Character to use if negation allowed
|
||||||
|
select IFOERROR yes 'ERROR - test program error flag? '
|
||||||
|
select IFONULL yes 'NULL - test for no file name? '
|
||||||
|
select IFOREG yes 'REG - test register values? '
|
||||||
|
select IFAMBIG yes 'AMBIG - test for "?" in file spec? '
|
||||||
|
select IFCOMPR yes 'COMPR - test for compressed filespec? '
|
||||||
|
select IFOEQ yes '= - test tokens for equality? '
|
||||||
|
select IFOINPUT yes 'INPUT - test user input? '
|
||||||
|
XEQOPT equ yes ; Test only first token for equal sign
|
||||||
|
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? '
|
||||||
|
select IFOWHEEL no 'WHEEL - test wheel byte? '
|
||||||
|
select IFOTCAP no 'TCAP - test whether TCAP loaded? '
|
||||||
|
select IFOEXIST yes 'EXIST - test for file existence? '
|
||||||
|
select IFOEMPTY yes 'EMPTY - test files for contents? '
|
||||||
|
else
|
||||||
|
select IFONEG yes 'Allow negation of conditions? '
|
||||||
|
negchar equ '~' ; Character to use if negation allowed
|
||||||
|
select IFONULL yes 'NULL - test for no file name? '
|
||||||
|
select IFOINPUT yes 'INPUT - test user input? '
|
||||||
|
select IFOEQ yes '= - test tokens for equality? '
|
||||||
|
XEQOPT equ yes ; Test only first token for equal sign
|
||||||
|
select IFOERROR yes 'ERROR - test program error flag? '
|
||||||
|
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? '
|
||||||
|
select IFOEXIST yes 'EXIST - test for file existence? '
|
||||||
|
select IFAMBIG no 'AMBIG - test for "?" in file spec? '
|
||||||
|
select IFCOMPR no 'COMPR - test for compressed filespec? '
|
||||||
|
select IFOREG no 'REG - test register values? '
|
||||||
|
select IFOWHEEL no 'WHEEL - test wheel byte? '
|
||||||
|
select IFOTCAP no 'TCAP - test whether TCAP loaded? '
|
||||||
|
select IFOEMPTY no 'EMPTY - test files for contents? '
|
||||||
|
endif ; COMIF
|
||||||
|
|
||||||
|
; Miscellaneous configuration information
|
||||||
|
|
||||||
|
curusr equ z3msg+2eh ; Current logged user address
|
||||||
|
curdr equ z3msg+2fh ; Current logged drive address
|
||||||
|
curint equ '$' ; Path symbol for current drive/user
|
||||||
|
|
||||||
|
; END of NZFCP.LIB
|
||||||
|
|
||||||
161
Source/BPBIOS/NZFCP13/nzfcp.lib.sav
Normal file
161
Source/BPBIOS/NZFCP13/nzfcp.lib.sav
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
; Module: NZFCP.LIB
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.3
|
||||||
|
; Date: 9 Oct 89
|
||||||
|
; Changes: Prompts for options if SLR true.
|
||||||
|
|
||||||
|
; This module is a set of configuration options for the flow control package
|
||||||
|
; code in NZFCP.Z80. The options are not fully commented here; see
|
||||||
|
; "ZCPR3, The Manual" for a detailed discussion of most of them.
|
||||||
|
|
||||||
|
|
||||||
|
; * * * * * * N O T I C E * * * * * *
|
||||||
|
;
|
||||||
|
; The main code in Z33FCP.Z80 has been written with relative jump instructions
|
||||||
|
; for minimum code size. If the options below are changed, then some of the
|
||||||
|
; jumps may become out-of-range. You will then have to change the code based
|
||||||
|
; on the error messages you get from your assembler. I cannot think of any
|
||||||
|
; way to handle the jumps automatically (macros fail because the jump distances
|
||||||
|
; cannot be resolved fully even in two passes of the assembler). If you want
|
||||||
|
; to play things really safe, you can do a global search and replace to change
|
||||||
|
; all occurrences of the JR instruction to JP (but note that this change is
|
||||||
|
; irreversible). I prefer to live with this nuisance so that I can get the
|
||||||
|
; most out of the code.
|
||||||
|
;
|
||||||
|
; Another possible way to clear up a problem with a relative jump that is out
|
||||||
|
; of range is to take the block of code with the labels IFCTRUE and IFCFALSE
|
||||||
|
; and move it up or down in the code. It is placed somewhere in the middle of
|
||||||
|
; the resident options, so that the options can reach those entry points with
|
||||||
|
; a relative jump. You should try to place that code near the middle of the
|
||||||
|
; options which you have enabled.
|
||||||
|
;
|
||||||
|
; Jay Sage (May 17, 1987)
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; M A C R O S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; SLR assemblers allow selection of options during assembly.
|
||||||
|
|
||||||
|
SLR equ yes
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
|
||||||
|
y equ yes
|
||||||
|
n equ no
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
.accept comment,option ; Prompt user for selection
|
||||||
|
endm
|
||||||
|
|
||||||
|
.printx
|
||||||
|
.printx Answer "Y" to include, "N" to exclude commands:
|
||||||
|
.printx
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
option equ default ; Use selections from file
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
; -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command names
|
||||||
|
|
||||||
|
; The CTABLE macro, which constructs the command dispatch table, includes a
|
||||||
|
; line for each command, the first parameter of which is the name of the
|
||||||
|
; command. These names may be changed if you wish. But make sure that you
|
||||||
|
; do not use a name that is longer than the maximum allowed length. If you
|
||||||
|
; do, the name will be truncated and a nonfatal error will occur during
|
||||||
|
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower
|
||||||
|
; case letters will be converted to upper case. The macro COMMAND is defined
|
||||||
|
; in Z34MAC.LIB.
|
||||||
|
|
||||||
|
cmdsize equ 4 ; Maximum length of command names
|
||||||
|
|
||||||
|
; Command table name, enable, wheel, jump_addr
|
||||||
|
; [ DO NOT CHANGE THESE PARAMETERS ]
|
||||||
|
ctable macro
|
||||||
|
ifcmd: command if, yes, no, ifstart
|
||||||
|
command and, andopt, no, andstart
|
||||||
|
command or, oropt, no, orstart
|
||||||
|
command else, yes, no, ifelse
|
||||||
|
command fi, yes, no, ifend
|
||||||
|
command ifq, ifqopt, no, ifstat0
|
||||||
|
command xif, yes, no, ifexit
|
||||||
|
command zif, zifopt, no, ifzero
|
||||||
|
endm
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; General configuration options
|
||||||
|
|
||||||
|
NOISE equ no ; Don't display if-state messages
|
||||||
|
|
||||||
|
select COMIF no 'Enable transient IF processing? '
|
||||||
|
|
||||||
|
PATHROOT equ yes ; Find transient IF in root of path
|
||||||
|
|
||||||
|
ifdrv equ 'A' ; Drive to use if PATHROOT is off or
|
||||||
|
; ..if the path is empty
|
||||||
|
ifusr equ 0 ; User to use if PATHROOT is off or
|
||||||
|
; ..if the path is empty
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command inclusion options
|
||||||
|
|
||||||
|
select ZIFOPT yes 'ZIF - unconditionally clear IF states? '
|
||||||
|
select IFQOPT yes 'IFQ - show current if status? '
|
||||||
|
select OROPT yes 'OR - set state at current level? '
|
||||||
|
select ANDOPT yes 'AND - reset state at current level? '
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; If Condition Options
|
||||||
|
|
||||||
|
if COMIF ; Different precedence if transient IF available.
|
||||||
|
select IFONEG yes 'Allow negation of conditions? '
|
||||||
|
negchar equ '~' ; Character to use if negation allowed
|
||||||
|
select IFOERROR yes 'ERROR - test program error flag? '
|
||||||
|
select IFONULL yes 'NULL - test for no file name? '
|
||||||
|
select IFOREG yes 'REG - test register values? '
|
||||||
|
select IFAMBIG yes 'AMBIG - test for "?" in file spec? '
|
||||||
|
select IFCOMPR yes 'COMPR - test for compressed filespec? '
|
||||||
|
select IFOEQ yes '= - test tokens for equality? '
|
||||||
|
select IFOINPUT yes 'INPUT - test user input? '
|
||||||
|
XEQOPT equ yes ; Test only first token for equal sign
|
||||||
|
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? '
|
||||||
|
select IFOWHEEL no 'WHEEL - test wheel byte? '
|
||||||
|
select IFOTCAP no 'TCAP - test whether TCAP loaded? '
|
||||||
|
select IFOEXIST yes 'EXIST - test for file existence? '
|
||||||
|
select IFOEMPTY yes 'EMPTY - test files for contents? '
|
||||||
|
else
|
||||||
|
select IFONEG yes 'Allow negation of conditions? '
|
||||||
|
negchar equ '~' ; Character to use if negation allowed
|
||||||
|
select IFONULL yes 'NULL - test for no file name? '
|
||||||
|
select IFOINPUT yes 'INPUT - test user input? '
|
||||||
|
select IFOEQ yes '= - test tokens for equality? '
|
||||||
|
XEQOPT equ yes ; Test only first token for equal sign
|
||||||
|
select IFOERROR yes 'ERROR - test program error flag? '
|
||||||
|
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? '
|
||||||
|
select IFOEXIST yes 'EXIST - test for file existence? '
|
||||||
|
select IFAMBIG yes 'AMBIG - test for "?" in file spec? '
|
||||||
|
select IFCOMPR yes 'COMPR - test for compressed filespec? '
|
||||||
|
select IFOREG yes 'REG - test register values? '
|
||||||
|
select IFOWHEEL no 'WHEEL - test wheel byte? '
|
||||||
|
select IFOTCAP no 'TCAP - test whether TCAP loaded? '
|
||||||
|
select IFOEMPTY yes 'EMPTY - test files for contents? '
|
||||||
|
endif ; COMIF
|
||||||
|
|
||||||
|
; Miscellaneous configuration information
|
||||||
|
|
||||||
|
curusr equ z3msg+2eh ; Current logged user address
|
||||||
|
curdr equ z3msg+2fh ; Current logged drive address
|
||||||
|
curint equ '$' ; Path symbol for current drive/user
|
||||||
|
|
||||||
|
; END of NZFCP.LIB
|
||||||
|
|
||||||
9
Source/BPBIOS/NZFCP13/nzfcp13.for
Normal file
9
Source/BPBIOS/NZFCP13/nzfcp13.for
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Source code plus the compiled Flow Control Packages (FCP's)
|
||||||
|
distributed in FCP.LBR as part of the Z System. The precompiled
|
||||||
|
modules are in Z-Relocatable form, and must be loaded with JetLDR,
|
||||||
|
NZCOM, or Z3PLUS. Now features interactive assembly of code
|
||||||
|
a-la-Z34RCP11 under the SLR or ZMAC assemblers. Macro now reports
|
||||||
|
length of resulting FCP in records and bytes following assembly.
|
||||||
|
JetLDR signons also automatically generated. 9/15/90 Carson Wilson
|
||||||
|
|
||||||
|
|
||||||
1424
Source/BPBIOS/NZFCP13/nzfcp13.z80
Normal file
1424
Source/BPBIOS/NZFCP13/nzfcp13.z80
Normal file
File diff suppressed because it is too large
Load Diff
105
Source/BPBIOS/NZFCP13/z34cmn.lib
Normal file
105
Source/BPBIOS/NZFCP13/z34cmn.lib
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
;
|
||||||
|
; Library: Z34CMN.LIB
|
||||||
|
; Author: Carson Wilson <crw>
|
||||||
|
; Version: 1.2
|
||||||
|
; Date: 16 June 1988
|
||||||
|
; Changes: Renamed CRT0 to LINS for NZCOM compatibility.
|
||||||
|
; Added CUSR " " "
|
||||||
|
|
||||||
|
; Author: Carson Wilson <crw>
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: 12 June 1988
|
||||||
|
; Changes: Added CDRV for various Z34RCP commands.
|
||||||
|
; Added CRT0 for Z34RCP TYPE command.
|
||||||
|
; Added Z3TCAP and CLRSCR for Z34RCP CLS command.
|
||||||
|
; Added QUIET for ZCPR34 time in prompt.
|
||||||
|
; Added RSDMSG for ZCPR34 time in prompt.
|
||||||
|
|
||||||
|
; Library: Z34CMN.LIB
|
||||||
|
; Author: Joe Wright
|
||||||
|
; Date: 23 March 1988
|
||||||
|
|
||||||
|
; As a replacement for Z3BASE.LIB, some usual equates.
|
||||||
|
|
||||||
|
base equ 0 ; Base Page
|
||||||
|
|
||||||
|
false equ 0
|
||||||
|
true equ not false
|
||||||
|
|
||||||
|
no equ false
|
||||||
|
yes equ true
|
||||||
|
|
||||||
|
off equ false
|
||||||
|
on equ true
|
||||||
|
|
||||||
|
; Named COMMON declarations start here. For compatibility, these
|
||||||
|
; are the same names used by Bridger Mitchell's JetLDR.
|
||||||
|
|
||||||
|
common /_ENV_/
|
||||||
|
z3env: ; Z3 Environment descriptor
|
||||||
|
z3envs equ yes ; There is one
|
||||||
|
|
||||||
|
expath equ z3env+9 ; Address of External Path
|
||||||
|
expaths equ 10 ; Maximum 10 elements for MPATH
|
||||||
|
|
||||||
|
rcp equ z3env+0ch ; Address of RCP
|
||||||
|
rcps equ yes ; Used as existence test, not size
|
||||||
|
|
||||||
|
fcp equ z3env+12h ; Address of FCB
|
||||||
|
fcps equ yes ; Used as existence test, not size
|
||||||
|
|
||||||
|
z3ndir equ z3env+15h ; Address of NDR
|
||||||
|
z3ndirs equ yes ; Used as existence test, not size
|
||||||
|
|
||||||
|
quiet equ z3env+28h ; Quiet flag address <crw>
|
||||||
|
|
||||||
|
z3whl equ z3env+29h ; Wheel byte address
|
||||||
|
z3whls equ yes ; There is a wheel
|
||||||
|
|
||||||
|
lins equ z3env+33h ; CRT text lines address <crw>
|
||||||
|
|
||||||
|
ccp equ z3env+3fh ; CCP entry
|
||||||
|
ccps equ z3env+41h ; Size
|
||||||
|
|
||||||
|
dos equ z3env+42h ; DOS entry (+6)
|
||||||
|
doss equ z3env+44h ; Size
|
||||||
|
|
||||||
|
bio equ z3env+45h ; BIO entry
|
||||||
|
|
||||||
|
z3tcap equ z3env+80h ; TCAP address <crw>
|
||||||
|
|
||||||
|
clrscr equ z3env+97h ; Clear screen string address <crw>
|
||||||
|
|
||||||
|
common /_SSTK_/
|
||||||
|
shstk: ; Top of Shell stack
|
||||||
|
shstks equ yes ; There is a shell stack
|
||||||
|
|
||||||
|
common /_MSG_/
|
||||||
|
z3msg: ; Message buffer
|
||||||
|
z3msgs equ yes ; There is one
|
||||||
|
|
||||||
|
cusr equ z3msg+2eh ; Current user
|
||||||
|
cdrv equ z3msg+2fh ; Current drive <crw>
|
||||||
|
|
||||||
|
rsdmsg equ z3msg+3ah ; Reserved bytes <crw>
|
||||||
|
|
||||||
|
common /_FCB_/
|
||||||
|
extfcb: ; External file control block
|
||||||
|
extfcbs equ yes ; There is one
|
||||||
|
|
||||||
|
common /_MCL_/
|
||||||
|
z3cl: ; Multiple command line
|
||||||
|
z3cls equ yes ; There is one
|
||||||
|
|
||||||
|
common /_XSTK_/
|
||||||
|
extstk: ; External stack
|
||||||
|
extstks equ yes ; There is one
|
||||||
|
|
||||||
|
common /_BIOS_/
|
||||||
|
bios:
|
||||||
|
|
||||||
|
cseg ; Select Code Segment
|
||||||
|
|
||||||
|
; End of Z34CMN.LIB
|
||||||
|
|
||||||
|
|
||||||
122
Source/BPBIOS/NZFCP13/z34mac.lib
Normal file
122
Source/BPBIOS/NZFCP13/z34mac.lib
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
|
||||||
|
; Z33MAC.LIB : Macros for use with ZCPR33
|
||||||
|
|
||||||
|
; General purpose macros
|
||||||
|
|
||||||
|
putreg macro
|
||||||
|
push hl ; Save registers in order
|
||||||
|
push de
|
||||||
|
push bc
|
||||||
|
endm
|
||||||
|
|
||||||
|
getreg macro
|
||||||
|
pop bc ; Restore registers in order
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
endm
|
||||||
|
|
||||||
|
swap macro
|
||||||
|
rrca ; Exchange nibbles
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
endm
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; Macro for forming option bytes
|
||||||
|
|
||||||
|
; This macro generates a byte with bits corresponding to up to 8 option
|
||||||
|
; flags. The bits are filled in the order of the parameters and are right
|
||||||
|
; justified in the byte.
|
||||||
|
|
||||||
|
optflag macro f1,f2,f3,f4,f5,f6,f7,f8
|
||||||
|
|
||||||
|
flag defl 0 ;; initial value
|
||||||
|
|
||||||
|
irp temp,<f1,f2,f3,f4,f5,f6,f7,f8>
|
||||||
|
|
||||||
|
if not nul temp
|
||||||
|
flag defl flag shl 1
|
||||||
|
if temp
|
||||||
|
flag defl flag or 1
|
||||||
|
endif ;;temp
|
||||||
|
endif ;;not nul temp
|
||||||
|
|
||||||
|
endm ;; irp
|
||||||
|
|
||||||
|
defb low flag
|
||||||
|
|
||||||
|
endm ;; optflag
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command table entry definition macro
|
||||||
|
|
||||||
|
; Macro to form an entry for one command in the table. The first parameter is
|
||||||
|
; the name to be used for the command (no quotes); the second parameter is the
|
||||||
|
; flag that indicates whether or not the command is to be enabled; the third
|
||||||
|
; parameter is the wheel control flag; and the last parameter is the jump
|
||||||
|
; address to the code that carries out the command. The command names are
|
||||||
|
; automatically padded out to the correct length (they will be truncated and
|
||||||
|
; an error message will result if a command name is too long). The characters
|
||||||
|
; in the command name are automatically converted to upper case.
|
||||||
|
|
||||||
|
command macro cmdname,enableflag,wheelflag,address
|
||||||
|
|
||||||
|
if enableflag ;; Generate command only if enabled
|
||||||
|
|
||||||
|
whlmask defl wheelflag ;; Initialize variables
|
||||||
|
count defl cmdsize ;; Initialize to size of each command name
|
||||||
|
|
||||||
|
irpc char,cmdname ;; Repeat over letters in command name
|
||||||
|
|
||||||
|
count defl count - 1 ;; Count down characters in name
|
||||||
|
|
||||||
|
if [ count lt cmdsize ]
|
||||||
|
|
||||||
|
;; If character is lower case, convert to upper case
|
||||||
|
|
||||||
|
if [ '&char' ge 'a' ] and [ '&char' le 'z' ]
|
||||||
|
|
||||||
|
if whlmask
|
||||||
|
defb [ '&char' and 5fh ] + 80h
|
||||||
|
else ;;not whlmask
|
||||||
|
defb [ '&char' and 5fh ]
|
||||||
|
endif ;;whlmask
|
||||||
|
|
||||||
|
else ;;not lower case
|
||||||
|
|
||||||
|
if whlmask
|
||||||
|
defb '&char' + 80h ;; If controlled by wheel, set high bit
|
||||||
|
else ;;not whlmask
|
||||||
|
defb '&char' ;; If not restricted, leave high bit clear
|
||||||
|
endif ;;whlmask
|
||||||
|
|
||||||
|
endif ;;lower case
|
||||||
|
|
||||||
|
endif ;;[ count lt cmdsize ]
|
||||||
|
|
||||||
|
whlmask defl false ;; Turn off high-bit setting after first char
|
||||||
|
|
||||||
|
endm ;irpc
|
||||||
|
|
||||||
|
;; Pad command name with blanks
|
||||||
|
|
||||||
|
if [ count gt cmdsize ] ;; If we underflowed
|
||||||
|
*** Command name "&cmdname" is too long / truncated ***
|
||||||
|
else
|
||||||
|
rept count
|
||||||
|
defb ' '
|
||||||
|
endm
|
||||||
|
endif ;[ count gt cmdsize ]
|
||||||
|
|
||||||
|
dw address ;; Dispatch address for command
|
||||||
|
|
||||||
|
endif ;enable
|
||||||
|
|
||||||
|
endm ;command
|
||||||
|
|
||||||
|
; End Z33MAC.LIB
|
||||||
|
|
||||||
|
|
||||||
BIN
Source/BPBIOS/WW.Z3T
Normal file
BIN
Source/BPBIOS/WW.Z3T
Normal file
Binary file not shown.
11
Source/BPBIOS/Z34RCP11/Build.cmd
Normal file
11
Source/BPBIOS/Z34RCP11/Build.cmd
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
set PATH=%PATH%;..\..\..\Tools\zx;..\..\..\Tools\cpmtools;
|
||||||
|
|
||||||
|
set ZXBINDIR=../../../tools/cpm/bin/
|
||||||
|
set ZXLIBDIR=../../../tools/cpm/lib/
|
||||||
|
set ZXINCDIR=../../../tools/cpm/include/
|
||||||
|
|
||||||
|
rem zx Z80ASM -z34rcp11/MF
|
||||||
|
zx ZMAC -z34rcp11.z80 -/P
|
||||||
7
Source/BPBIOS/Z34RCP11/Clean.cmd
Normal file
7
Source/BPBIOS/Z34RCP11/Clean.cmd
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if exist *.prn del *.prn
|
||||||
|
if exist *.lst del *.lst
|
||||||
|
if exist *.err del *.err
|
||||||
|
if exist *.rel del *.rel
|
||||||
BIN
Source/BPBIOS/Z34RCP11/cledinst.com
Normal file
BIN
Source/BPBIOS/Z34RCP11/cledinst.com
Normal file
Binary file not shown.
BIN
Source/BPBIOS/Z34RCP11/cledsave.com
Normal file
BIN
Source/BPBIOS/Z34RCP11/cledsave.com
Normal file
Binary file not shown.
3010
Source/BPBIOS/Z34RCP11/nzrcp.z80
Normal file
3010
Source/BPBIOS/Z34RCP11/nzrcp.z80
Normal file
File diff suppressed because it is too large
Load Diff
33
Source/BPBIOS/Z34RCP11/rcpbase.lib
Normal file
33
Source/BPBIOS/Z34RCP11/rcpbase.lib
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
page
|
||||||
|
;
|
||||||
|
; Library: RCPBASE for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
|
||||||
|
; Comments: Use instead of Z34CMN.LIB to produce absolute RCP's.
|
||||||
|
; An absolute RCP will only load to one address, and requires
|
||||||
|
; that the message buffer and the environment descriptor
|
||||||
|
; remain constant within the environment.
|
||||||
|
|
||||||
|
; You must modify the next three addresses to match your system:
|
||||||
|
|
||||||
|
z3rcp equ 0ee80h ; RCP address
|
||||||
|
z3env equ 0fd00h ; Environment descriptor address
|
||||||
|
z3msg equ 0fe30h ; Message buffer address
|
||||||
|
|
||||||
|
; The rest of this file should not be changed.
|
||||||
|
|
||||||
|
fcp equ z3env+18 ; Address of FCB
|
||||||
|
quiet equ z3env+28h ; Quiet flag address
|
||||||
|
z3whl equ z3env+29h ; Wheel byte address
|
||||||
|
crt0 equ z3env+33h ; CRT 0 text lines address
|
||||||
|
ccp equ z3env+63 ; CCP entry
|
||||||
|
z3tcap equ z3env+80h ; TCAP address
|
||||||
|
clrscr equ z3env+97h ; Clear screen string address
|
||||||
|
|
||||||
|
cdrv equ z3msg+2fh ; Current drive
|
||||||
|
|
||||||
|
; End RCPBASE.LIB
|
||||||
|
|
||||||
|
|
||||||
62
Source/BPBIOS/Z34RCP11/rcpcled.doc
Normal file
62
Source/BPBIOS/Z34RCP11/rcpcled.doc
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
RCPCLED - Command Line Editing and History Shell for Z34RCP11
|
||||||
|
Author: Rob Friefeld
|
||||||
|
Version: 1.3
|
||||||
|
Date: October 2, 1989
|
||||||
|
|
||||||
|
Command: CLED
|
||||||
|
Syntax: CLED [/]
|
||||||
|
If "/", run once only (e.g. from a shell such as ZFILER)
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
CLED is a memory resident command line editor which extends the minimal
|
||||||
|
features of the CCP to include cursor movement, insert/delete, and
|
||||||
|
record/recall of command lines. Though part of the RCP, CLED is also a ZCPR
|
||||||
|
"shell" which automatically reinvokes itself following any ZCPR command. It
|
||||||
|
thus uses up one shell stack entry (normally there are four, which is plenty).
|
||||||
|
If a ZS/ZDDOS, DateStamper, or Z3PLUS clock is implemented, the command prompt
|
||||||
|
shows the system time. To disable time display under Z3PLUS (if you have no
|
||||||
|
clock), set the system date to 01/01/78.
|
||||||
|
|
||||||
|
The default control key set includes these important commands:
|
||||||
|
|
||||||
|
CR - execute command line
|
||||||
|
ESC Q - pop the shell
|
||||||
|
ESC S - toggle recording on/off (prompt shows >/>> to indicate state)
|
||||||
|
^W - recall command lines from history stack
|
||||||
|
^E - recall history in reverse direction
|
||||||
|
|
||||||
|
|
||||||
|
Installation:
|
||||||
|
|
||||||
|
The installation program, CLEDINST, allows you to set up the editor
|
||||||
|
to your preference. The RCP can be installed directly in memory or in a disk
|
||||||
|
file -- RCPxxx.ZRL or a system configuration saved with SNAP or NZBLITZ.
|
||||||
|
CLEDINST also serves as a "help" utility by displaying the current command
|
||||||
|
bindings. Type "CLEDINST //" for help with CLEDINST.COM.
|
||||||
|
|
||||||
|
|
||||||
|
History Tool:
|
||||||
|
|
||||||
|
CLEDSAVE writes the contents of the history stack to a text file on disk.
|
||||||
|
The file can be reloaded later (CLEDSAVE <file> L), or composed in advance
|
||||||
|
with a text editor, then loaded. If the file is too large for the history
|
||||||
|
stack, as many commmand lines as fit are loaded.
|
||||||
|
|
||||||
|
CLEDSAVE is useful as in a startup alias to load frequently used command
|
||||||
|
lines from an easily altered file. For example:
|
||||||
|
|
||||||
|
Alias: START
|
||||||
|
|
||||||
|
A15:
|
||||||
|
CLEDSYS <- load SNAP image of ENV,TCAP,RCP,FCP,NDR,QUIET,&PATH
|
||||||
|
CLEDSAVE CLED.VAR L <- load precomposed command lines into CLED
|
||||||
|
CLED <- turn the shell on
|
||||||
|
... <- rest of startup line runs before CLED gets control
|
||||||
|
|
||||||
|
For help with CLEDSAVE.COM, type "CLEDSAVE //".
|
||||||
|
|
||||||
|
You may also use SNAP or NZBLITZ to save the system segment image with
|
||||||
|
command lines already loaded (turn SAVE OFF first.)
|
||||||
|
|
||||||
|
|
||||||
1327
Source/BPBIOS/Z34RCP11/rcpcled.lib
Normal file
1327
Source/BPBIOS/Z34RCP11/rcpcled.lib
Normal file
File diff suppressed because it is too large
Load Diff
35
Source/BPBIOS/Z34RCP11/rcpcls.lib
Normal file
35
Source/BPBIOS/Z34RCP11/rcpcls.lib
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPCLS for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: CLS
|
||||||
|
; Function: To clear the CRT screen
|
||||||
|
; Comments: The setting of the CLSTCAP equate determines whether this
|
||||||
|
; command uses the TCAP information or not. If not, it uses the
|
||||||
|
; clear-screen string passed in macro CLSSTR. That string should
|
||||||
|
; end with the high bit set.
|
||||||
|
|
||||||
|
cls:
|
||||||
|
if clstcap ; If using TCAP for clear screen string
|
||||||
|
ld a,(z3tcap) ; TCAP address from Z34CMN.LIB
|
||||||
|
cp ' '+1 ; See if blank
|
||||||
|
jr nc,cls1 ; If not, go to clear screen code
|
||||||
|
jp crlf ; If blank, just do CRLF
|
||||||
|
cls1:
|
||||||
|
ld hl,clrscr ; Address from Z34CMN.LIB
|
||||||
|
jp printhl ; Display it
|
||||||
|
|
||||||
|
else ; Not using tcap
|
||||||
|
|
||||||
|
call print
|
||||||
|
clsstr ; String from Z34RCP.LIB
|
||||||
|
ret
|
||||||
|
|
||||||
|
endif ;clstcap
|
||||||
|
|
||||||
|
; End RCPCLS.LIB
|
||||||
|
|
||||||
|
|
||||||
56
Source/BPBIOS/Z34RCP11/rcpcmd.lib
Normal file
56
Source/BPBIOS/Z34RCP11/rcpcmd.lib
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPCMD for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
; Description: Command Table and Custom Commands for Z34-RCP
|
||||||
|
|
||||||
|
; This is the customization file for the ZCPR Version 3.4 resident command
|
||||||
|
; package. Use it to add your own custom commands to the RCP.
|
||||||
|
|
||||||
|
; Give each of your custom commands a unique label and command name. Then
|
||||||
|
; add the command name(s) to the macro CUSTTBL, below, and append the code
|
||||||
|
; for the commands to the end of this file.
|
||||||
|
|
||||||
|
; CUSTTBL - Custom commands table.
|
||||||
|
;
|
||||||
|
; Add one line to CUSTTBL for each of your custom commands. Each line
|
||||||
|
; must be of the form:
|
||||||
|
;
|
||||||
|
; COMMAND name, TRUE, wheel, label
|
||||||
|
;
|
||||||
|
; Where COMMAND and TRUE appear as-is, and "name", "wheel", and "label"
|
||||||
|
; are created by the user. "Name" is a name of four characters or less used
|
||||||
|
; to invoke the command, in upper case. "Wheel" is "true" to protect the
|
||||||
|
; command from non-wheel users, "false" otherwise. "Label" marks the
|
||||||
|
; beginning of the custom code. For example, to create a wheel-
|
||||||
|
; protected command named "DIR" which calls the code at label "directory",
|
||||||
|
; CUSTTBL appears as follows:
|
||||||
|
;
|
||||||
|
;custtbl macro
|
||||||
|
; command DIR, true, true, directory
|
||||||
|
; endm
|
||||||
|
|
||||||
|
custtbl macro
|
||||||
|
;; command ____, true, ____, _______ ; Template for custom commands
|
||||||
|
endm
|
||||||
|
|
||||||
|
; ------------------------------
|
||||||
|
|
||||||
|
; RCP command dispatch table
|
||||||
|
|
||||||
|
db cmdsize ; Length of each command name
|
||||||
|
cmdtbl ; Dispatch table from Z34RCP.LIB
|
||||||
|
custtbl ; Optional custom commands
|
||||||
|
db 0 ; Marks end of command jump table
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
|
||||||
|
; Insert label(s) and code for custom RCP commands here:
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
; END RCPCMD.LIB
|
||||||
|
|
||||||
|
|
||||||
245
Source/BPBIOS/Z34RCP11/rcpcp.lib
Normal file
245
Source/BPBIOS/Z34RCP11/rcpcp.lib
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPCP for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.3
|
||||||
|
; Date: August 11, 1989
|
||||||
|
; Changes: Responds dynamically to QUIET flag, eliminating "noise."
|
||||||
|
|
||||||
|
; Version: 1.2
|
||||||
|
; Date: December 30, 1988
|
||||||
|
; Changes: Now works properly with CP/M Plus.
|
||||||
|
; Moved SETDMA to common routines.
|
||||||
|
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 4, 1988
|
||||||
|
; Changes: Now initializes FCB1 before calling SetFStp, allowing
|
||||||
|
; stamp setting of multiple-extent files.
|
||||||
|
;
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: CP
|
||||||
|
; Function: Copy a file from one place to another
|
||||||
|
; Syntax: If FCBSWAP false:
|
||||||
|
; CP destfile=srcfile, CP =srcfile
|
||||||
|
; If FCBSWAP true:
|
||||||
|
; CP srcfile destfile, CP srcfile
|
||||||
|
; If TESTEQ and FCBSWAP true:
|
||||||
|
; Both of the above forms work
|
||||||
|
;
|
||||||
|
; Comments: Both file specifications can include a directory specification.
|
||||||
|
; If only one file name is given, then the current directory and
|
||||||
|
; the source file name are assumed for the destination.
|
||||||
|
|
||||||
|
;
|
||||||
|
; New ZSDOS/DosDisk BDOS standard functions:
|
||||||
|
;
|
||||||
|
GetFStp equ 102 ; Get file stamp function
|
||||||
|
SetFStp equ 103 ; Set file stamp function
|
||||||
|
|
||||||
|
copy:
|
||||||
|
call retsave
|
||||||
|
call dirchek ; Test bad directory
|
||||||
|
|
||||||
|
if leftright
|
||||||
|
call fcbswap ; Exchange fcb1 with fcb2
|
||||||
|
endif
|
||||||
|
|
||||||
|
; If new is blank, make it the same name and type as old
|
||||||
|
|
||||||
|
ld de,fcb1+1 ; Point to destination file name
|
||||||
|
ld a,(de) ; Get first character
|
||||||
|
cp ' ' ; If not blank (no name)
|
||||||
|
jr nz,copy0 ; ..then branch to copy
|
||||||
|
ld hl,fcb2+1 ; Copy source name into destination FCB
|
||||||
|
ld b,11 ; Name and type are 11 bytes
|
||||||
|
call blkmov
|
||||||
|
|
||||||
|
; See if destination is same as source, and abort if so
|
||||||
|
|
||||||
|
copy0:
|
||||||
|
ld hl,fcb1 ; Set up pointers to two files
|
||||||
|
ld de,fcb2
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
inc hl ; Point to names of files
|
||||||
|
inc de
|
||||||
|
ld b,13 ; Compare 13 bytes (name, type, and user #)
|
||||||
|
copy1: call comp
|
||||||
|
jr nz,copy2 ; If they differ, go on with copy
|
||||||
|
ld a,(cdrv) ; ZCPR current drive
|
||||||
|
inc a ; Shift to range 1..16
|
||||||
|
ld b,a ; ..and keep value in B
|
||||||
|
pop de ; Restore pointers to FCBs
|
||||||
|
pop hl
|
||||||
|
ld a,(de) ; Get drive of source file
|
||||||
|
ld c,a ; ..and save it in C
|
||||||
|
or a ; Is it default drive?
|
||||||
|
jr nz,copy1a ; Branch if drive made explicit
|
||||||
|
ld c,b ; Otherwise, copy default drive into C
|
||||||
|
copy1a: ld a,(hl) ; Get drive of destination file
|
||||||
|
or a ; Is it default drive?
|
||||||
|
jr nz,copy1b ; Branch if drive made explicit
|
||||||
|
ld a,b ; Otherwise, get current drive
|
||||||
|
copy1b: cp c ; Compare the two drives specified
|
||||||
|
jr nz,copy3 ; Branch if they are different
|
||||||
|
jp duperr ; Tell EH duplicate filespecs
|
||||||
|
copy2:
|
||||||
|
pop de ; Clean up the stack
|
||||||
|
pop hl
|
||||||
|
|
||||||
|
; Make note of the user numbers of the two files
|
||||||
|
|
||||||
|
copy3:
|
||||||
|
ld a,(fcb1+13) ; Get destination user number
|
||||||
|
ld (usrdest),a
|
||||||
|
ld a,(fcb2+13) ; Get source user number
|
||||||
|
ld (usrsrc),a
|
||||||
|
|
||||||
|
; Set up new FCB for source file and open the source
|
||||||
|
|
||||||
|
call define ; Define buffer addresses dynamically
|
||||||
|
srcfcb equ $+1
|
||||||
|
ld hl,0 ; Get address to use for new source FCB
|
||||||
|
push hl
|
||||||
|
ex de,hl ; Copy file data to new FCB
|
||||||
|
ld b,12
|
||||||
|
call blkmov
|
||||||
|
call logsrc ; Log in user number of source file
|
||||||
|
pop hl ; Initialize the source file FCB
|
||||||
|
call initfcb2
|
||||||
|
ld c,15 ; Open source file
|
||||||
|
call bdos
|
||||||
|
inc a ; Check for error
|
||||||
|
jp z,noflerr ; File not found error handler
|
||||||
|
|
||||||
|
if StpCall
|
||||||
|
call cpmver
|
||||||
|
jr nc,copy4 ; Don't do this if CP/M Plus
|
||||||
|
stpbuf equ $+1
|
||||||
|
ld de,0
|
||||||
|
call setdma ; Set DMA to date buffer
|
||||||
|
ld de,(srcfcb)
|
||||||
|
ld c,GetFStp ; Get stamp (if any) to DMA
|
||||||
|
call bdos
|
||||||
|
ld (gotstp),a ; Store result
|
||||||
|
ld de,tbuff ; Restore DMA
|
||||||
|
call setdma ; ..for search
|
||||||
|
copy4:
|
||||||
|
endif ; StpCall
|
||||||
|
|
||||||
|
; Make sure destination file does not already exist
|
||||||
|
|
||||||
|
call logdest ; Log into destination user area
|
||||||
|
call extest ; Test for existence of file in fcb1
|
||||||
|
jp z,exit ; Branch if it exists and user says no
|
||||||
|
|
||||||
|
; Create destination file
|
||||||
|
|
||||||
|
ld de,fcb1 ; Point to destination FCB
|
||||||
|
ld c,22 ; BDOS make-file function
|
||||||
|
call bdos
|
||||||
|
inc a ; Test for error (no directory space)
|
||||||
|
jp z,fulerr ; Invoke EH if not OK
|
||||||
|
|
||||||
|
; Copy source to destination
|
||||||
|
|
||||||
|
copy5: call logsrc ; Log in source user area
|
||||||
|
ld b,0 ; Initialize counter
|
||||||
|
ld de,(cbuff) ; Initialize buffer pointer
|
||||||
|
copy5a: push de ; Save address and counter
|
||||||
|
push bc
|
||||||
|
call setdma ; Set DMA to cbuff+(b*128)
|
||||||
|
ld de,(srcfcb) ; Point to source file FCB
|
||||||
|
ld c,20 ; BDOS read-sequential function
|
||||||
|
call bdos
|
||||||
|
pop bc ; Get counter and address
|
||||||
|
pop de
|
||||||
|
or a ; Read Ok?
|
||||||
|
jr nz,copy5b ; Branch if end of file
|
||||||
|
ld hl,128 ; Point DE to next buffer address
|
||||||
|
add hl,de
|
||||||
|
ex de,hl
|
||||||
|
inc b ; Increment counter
|
||||||
|
ld a,b ; See if buffer full
|
||||||
|
cp cpblocks
|
||||||
|
jr nz,copy5a ; If not, go back for more
|
||||||
|
copy5b: ld a,b ; Get count of blocks loaded into buffer
|
||||||
|
or a ; Are there any?
|
||||||
|
jr z,copy6 ; Branch if not (we are done)
|
||||||
|
push bc ; Save count
|
||||||
|
call logdest ; Log into destination user number
|
||||||
|
cbuff equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld de,0 ; Point to beginning of copy buffer
|
||||||
|
copy5c: push de ; Save buffer address
|
||||||
|
call setdma ; Set dma to buffer
|
||||||
|
ld de,fcb1 ; Point to destination file FCB
|
||||||
|
ld c,21 ; Sequential write the block
|
||||||
|
call bdos
|
||||||
|
or a ; Get result
|
||||||
|
jp nz,fulerr ; Invoke EH (disk full or write error)
|
||||||
|
pop de ; Get buffer address & balance stack
|
||||||
|
pop bc ; Get count
|
||||||
|
dec b ; Buffer empty?
|
||||||
|
jr z,copy5 ; Yes. Back for refill
|
||||||
|
push bc ; No. Save count
|
||||||
|
ld hl,128
|
||||||
|
add hl,de
|
||||||
|
ex de,hl ; DE points to next buffer address
|
||||||
|
jr copy5c ; Back for another sector to write
|
||||||
|
|
||||||
|
; Close the destination file
|
||||||
|
|
||||||
|
copy6: call logdest ; Log into destination user number
|
||||||
|
ld de,fcb1 ; Point to destination FCB
|
||||||
|
ld c,16 ; Close file
|
||||||
|
call bdos
|
||||||
|
inc a ; 0ffh --> 0 if error
|
||||||
|
jp z,fulerr ; Invoke EH
|
||||||
|
|
||||||
|
if StpCall
|
||||||
|
gotstp equ $+1
|
||||||
|
ld a,0 ; File had stamp?
|
||||||
|
dec a ; 1 --> 0 = yes
|
||||||
|
jr nz,noset ; No
|
||||||
|
ld de,(stpbuf) ; Point to buffer
|
||||||
|
call setdma ; Set DMA
|
||||||
|
call initfcb1 ; Init. for SetFStp, point to dest.
|
||||||
|
ld c,SetFStp ; Set file's stamp
|
||||||
|
call bdos ; CCP restores DMA
|
||||||
|
noset:
|
||||||
|
endif ; StpCall
|
||||||
|
|
||||||
|
ld a,(quiet)
|
||||||
|
or a
|
||||||
|
jr nz,qcpdone
|
||||||
|
call print
|
||||||
|
db ' Don','e'+80h
|
||||||
|
qcpdone:
|
||||||
|
if cpsp and spaceon
|
||||||
|
jp spaexit ; Report space remaining on destination drive
|
||||||
|
else
|
||||||
|
jp exit
|
||||||
|
endif ;cpsp and spaceon
|
||||||
|
|
||||||
|
; Log into user number of source file
|
||||||
|
|
||||||
|
logsrc:
|
||||||
|
usrsrc equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld a,0 ; Get user number
|
||||||
|
jr setusrrel ; Local jump to save code
|
||||||
|
|
||||||
|
; Log into user number of destination file
|
||||||
|
|
||||||
|
logdest:
|
||||||
|
usrdest equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld a,0 ; Get user number
|
||||||
|
setusrrel:
|
||||||
|
jp setusr
|
||||||
|
|
||||||
|
; End RCPCP.LIB
|
||||||
|
|
||||||
|
|
||||||
137
Source/BPBIOS/Z34RCP11/rcpdir.lib
Normal file
137
Source/BPBIOS/Z34RCP11/rcpdir.lib
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPDIR for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: August 6, 1989
|
||||||
|
; Changes: Now allows "DIR [dir:].aft" as well as "DIR [dir:]*.aft"
|
||||||
|
; to show all files of a given file extentsion,
|
||||||
|
; e.g., "d .?80" gives all .Z80 and .180 files.
|
||||||
|
;
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: DIR
|
||||||
|
; Function: Display a directory of the files on disk
|
||||||
|
; Syntax: DIR [dir:afn] Displays the DIR files
|
||||||
|
; DIR [dir:afn] S Displays the SYS files
|
||||||
|
; DIR [dir:afn] A Display both DIR and SYS files
|
||||||
|
;
|
||||||
|
; If slashchk is true:
|
||||||
|
;
|
||||||
|
; DIR [dir:]/S Equivalent to DIR [dir:]*.* S
|
||||||
|
; DIR [dir:]/A Equivalent to DIR [dir:]*.* A
|
||||||
|
|
||||||
|
dir:
|
||||||
|
call retsave ; Save return address and set stack
|
||||||
|
|
||||||
|
; See if FCB should be made wild (all '?')
|
||||||
|
|
||||||
|
ld hl,fcb1+1 ; Point to file name in FCP
|
||||||
|
ld a,(hl) ; Get first character of filename
|
||||||
|
|
||||||
|
if slashchk ; Allow "DIR /S" and "DIR /A" formats
|
||||||
|
cp '/' ; If name does not start with '/'
|
||||||
|
jr nz,dir01 ; ..branch and process normally
|
||||||
|
inc hl ; Point to second character
|
||||||
|
ld a,(hl) ; Get option character after slash
|
||||||
|
ld (fcb2+1),a ; ..and put it into second FCB
|
||||||
|
dec hl ; Back to first character
|
||||||
|
ld a,' ' ; Simulate empty FCB
|
||||||
|
endif ;slashchk
|
||||||
|
|
||||||
|
dir01:
|
||||||
|
cp ' ' ; See if no file spec given
|
||||||
|
jr nz,dir02 ; Spec given
|
||||||
|
|
||||||
|
ld b,8 ; Wildcard name
|
||||||
|
ld a,(fcb1+9)
|
||||||
|
cp ' ' ; Wildcard type?
|
||||||
|
jr nz,dir01a ; No
|
||||||
|
ld b,11 ; Yes. Fill name and type.
|
||||||
|
dir01a: ld a,'?' ; Get ready to fill with '?'
|
||||||
|
call fillp ; ..carry out fill
|
||||||
|
dir02:
|
||||||
|
if nosys ; Suppress-SYS-file-if-no-wheel option
|
||||||
|
call getwhl ; Get wheel status
|
||||||
|
jr z,dirnly ; If wheel off, ignore options
|
||||||
|
endif
|
||||||
|
|
||||||
|
ld a,(fcb2+1) ; Get first char of 2nd file name
|
||||||
|
ld b,1 ; Set for both dir and sys files
|
||||||
|
cp allflag ; SYS and DIR flag specifier?
|
||||||
|
jr z,dirpr ; Got system specifier
|
||||||
|
dec b ; B=0 for sys files only
|
||||||
|
cp sysflag ; SYS only?
|
||||||
|
jr z,dirpr
|
||||||
|
|
||||||
|
dirnly: ld b,80h ; Must be dir-only selection
|
||||||
|
|
||||||
|
; DIRECTORY PRINT ROUTINE
|
||||||
|
; On entry, B reg is set as follows:
|
||||||
|
; 0 for only system files, 80h for only dir files, 1 for both
|
||||||
|
;
|
||||||
|
dirpr:
|
||||||
|
ld a,b ; Get systst flag
|
||||||
|
call getdir ; Load and sort directory
|
||||||
|
jp z,prfnf ; Print no file message
|
||||||
|
if wide
|
||||||
|
ld e,5
|
||||||
|
else
|
||||||
|
ld e,4 ; Count down to 0
|
||||||
|
endif ; wide
|
||||||
|
;
|
||||||
|
; ENTRY PRINT LOOP
|
||||||
|
; On entry, HL pts to files selected (terminated by 0)
|
||||||
|
; and E is entry counter
|
||||||
|
;
|
||||||
|
dir3:
|
||||||
|
ld a,(hl) ; Check for done
|
||||||
|
or a
|
||||||
|
if dirsp and spaceon
|
||||||
|
jp z,spaexit ; Show space when done
|
||||||
|
else
|
||||||
|
jp z,exit ; Exit if done
|
||||||
|
endif ; Dirsp and spaceon
|
||||||
|
ld a,e ; Get entry counter
|
||||||
|
or a ; Output CRLF if 4 or 5 entries printed in line
|
||||||
|
jr nz,dir3a ; Continue
|
||||||
|
call crlf ; New line
|
||||||
|
if wide
|
||||||
|
ld e,5
|
||||||
|
else
|
||||||
|
ld e,4 ; Reset entry count
|
||||||
|
endif ; wide
|
||||||
|
|
||||||
|
ld a,e ; Get entry count
|
||||||
|
dir3a:
|
||||||
|
if wide
|
||||||
|
cp 5
|
||||||
|
else
|
||||||
|
cp 4 ; First entry?
|
||||||
|
endif ; wide
|
||||||
|
|
||||||
|
jr z,dir4
|
||||||
|
call print
|
||||||
|
;
|
||||||
|
if wide
|
||||||
|
;
|
||||||
|
db ' ' ; 2 spaces
|
||||||
|
db ' '+80h ; Then 1 more space
|
||||||
|
;
|
||||||
|
else
|
||||||
|
;
|
||||||
|
db ' ' ; Space
|
||||||
|
db fence+80h ; Then fence char
|
||||||
|
;
|
||||||
|
endif ; Wide
|
||||||
|
;
|
||||||
|
dir4:
|
||||||
|
call prfn ; Print file name
|
||||||
|
call break ; Check for abort
|
||||||
|
dec e ; Decrement entry counter
|
||||||
|
jr dir3
|
||||||
|
|
||||||
|
; End RCPDIR.LIB
|
||||||
|
|
||||||
|
|
||||||
162
Source/BPBIOS/Z34RCP11/rcpecho.lib
Normal file
162
Source/BPBIOS/Z34RCP11/rcpecho.lib
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPECHO for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: ECHO
|
||||||
|
; Function: Echo text to console or printer
|
||||||
|
|
||||||
|
echo:
|
||||||
|
xor a ; Lower case/printer off flag setting
|
||||||
|
ld (crtfl),a ; Printer off by default
|
||||||
|
|
||||||
|
if upcase ; If upper case default
|
||||||
|
dec a
|
||||||
|
endif ;upcase
|
||||||
|
|
||||||
|
ld (casefl),a ; Store flag in code below
|
||||||
|
ld hl,tbuff+1 ; Point to first character
|
||||||
|
call getchar ; Get first character (should be blank)
|
||||||
|
; If none, exit from routine
|
||||||
|
|
||||||
|
; Loop to echo chars
|
||||||
|
|
||||||
|
echo2: call getchar
|
||||||
|
|
||||||
|
if echolst
|
||||||
|
cp ff ; Form feed?
|
||||||
|
jr z,echo3
|
||||||
|
endif ;echolst
|
||||||
|
|
||||||
|
cp '^'
|
||||||
|
jr nz,echo2a ; Not control character prefix
|
||||||
|
call getchar ; Get next character
|
||||||
|
and 1fh ; Convert to control character
|
||||||
|
jr echo2e ; Echo it
|
||||||
|
echo2a:
|
||||||
|
cp cmdchar ; Case shift prefix?
|
||||||
|
jr nz,echo2e ; No, normal echo
|
||||||
|
call getchar ; Get next character
|
||||||
|
|
||||||
|
if echolst
|
||||||
|
cp prtchar ; Turn printer on?
|
||||||
|
jr z,echo2b ; Store non-zero in crt flag
|
||||||
|
cp crtchar ; Turn printer off?
|
||||||
|
jr nz,echo2c ; No, test for shift characters
|
||||||
|
xor a ; Yes, clear crt flag
|
||||||
|
echo2b: ld (crtfl),a
|
||||||
|
jr echo2 ; On to next character
|
||||||
|
echo2c:
|
||||||
|
endif ; echolst
|
||||||
|
|
||||||
|
cp ucasechar ; Up-shift character?
|
||||||
|
jr z,echo2d ; Store non-zero value in case flag
|
||||||
|
cp lcasechar ; Lower-case character?
|
||||||
|
jr nz,echo2e ; No, echo the character as is
|
||||||
|
xor a ; Else, clear case flag
|
||||||
|
echo2d: ld (casefl),a
|
||||||
|
jr echo2 ; On to next character
|
||||||
|
echo2e:
|
||||||
|
call echout ; Send char
|
||||||
|
jr echo2
|
||||||
|
|
||||||
|
; Form feed - send new line followed by form feed if printer output
|
||||||
|
|
||||||
|
if echolst
|
||||||
|
echo3:
|
||||||
|
ld a,(crtfl) ; Check for printer output
|
||||||
|
or a ; Non-zero?
|
||||||
|
jr z,echoff ; No, send form feed normally
|
||||||
|
call echonl ; Send new line
|
||||||
|
ld a,ff ; Send form feed
|
||||||
|
jr echout
|
||||||
|
|
||||||
|
; Send form feed char to console
|
||||||
|
|
||||||
|
echoff:
|
||||||
|
ld a,ff ; Get char
|
||||||
|
jr echo2e
|
||||||
|
endif ;echolst
|
||||||
|
|
||||||
|
; End of print loop - check for printer termination
|
||||||
|
|
||||||
|
echo4:
|
||||||
|
if not echolst
|
||||||
|
ret
|
||||||
|
|
||||||
|
else
|
||||||
|
ld a,(crtfl) ; Get list mode flag
|
||||||
|
or a
|
||||||
|
ret z ; Done if no printer output
|
||||||
|
|
||||||
|
; Output a new line
|
||||||
|
|
||||||
|
echonl:
|
||||||
|
ld a,cr ; Output new line on printer
|
||||||
|
call echout
|
||||||
|
ld a,lf ; Fall thru to echout
|
||||||
|
endif ; not echolst
|
||||||
|
|
||||||
|
; Output char to printer or console
|
||||||
|
|
||||||
|
echout:
|
||||||
|
ld c,a ; Char in c
|
||||||
|
cp 'A' ; If less than 'A'
|
||||||
|
jr c,echouta ; Leave as is
|
||||||
|
cp 'Z'+1 ; If greater than 'Z'
|
||||||
|
jr nc,echouta ; Leave as is
|
||||||
|
add 20h ; Else convert to lower case
|
||||||
|
echouta:
|
||||||
|
ld d,a ; Save lower case version in d
|
||||||
|
casefl equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld a,0
|
||||||
|
or a ; Upper case?
|
||||||
|
jr nz,echoutb ; If upper case selected, go on as is
|
||||||
|
ld c,d ; Else substitute lower case version
|
||||||
|
echoutb:
|
||||||
|
|
||||||
|
push hl ; Save hl
|
||||||
|
push bc ; Save bc
|
||||||
|
ld de,0ch-3 ; Offset for BIOS console output
|
||||||
|
|
||||||
|
if echolst
|
||||||
|
|
||||||
|
crtfl equ $+1
|
||||||
|
ld a,0
|
||||||
|
or a ; Printer?
|
||||||
|
jr z,echout1 ; No
|
||||||
|
inc de ; Offset for BIOS printer output
|
||||||
|
inc de
|
||||||
|
inc de
|
||||||
|
endif ;echolst
|
||||||
|
|
||||||
|
; Output char in C with BIOS offset in DE
|
||||||
|
|
||||||
|
echout1:
|
||||||
|
call biout ; Bios output
|
||||||
|
pop bc ; Restore bc,hl
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
; Get a character from the command tail buffer
|
||||||
|
|
||||||
|
getchar:
|
||||||
|
ld a,(hl) ; Get character
|
||||||
|
inc hl ; Point to next one
|
||||||
|
or a ; Check for end of string
|
||||||
|
ret nz ; If not end, return
|
||||||
|
pop hl ; Else, clean up stack
|
||||||
|
jr echo4 ; And exit from routine
|
||||||
|
|
||||||
|
; Output char in C to BIOS with offset in DE
|
||||||
|
|
||||||
|
biout:
|
||||||
|
ld hl,(wboot+1) ; Get address of warm boot
|
||||||
|
add hl,de ; Pt to routine
|
||||||
|
jp (hl) ; Jump to it
|
||||||
|
|
||||||
|
; End RCPECHO.LIB
|
||||||
|
|
||||||
|
|
||||||
76
Source/BPBIOS/Z34RCP11/rcpera.lib
Normal file
76
Source/BPBIOS/Z34RCP11/rcpera.lib
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPERA for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.2
|
||||||
|
; Date: Sept. 15, 1989
|
||||||
|
; Changes: Chains to error handler with flag set to invoke transient ERA
|
||||||
|
; if a read only file is encountered. Propose error code
|
||||||
|
; 17 decimal for "file read only" error.
|
||||||
|
;
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 12, 1989
|
||||||
|
; Changes: Now responds dynamically to QUIET flag, eliminating "noise".
|
||||||
|
; NOTE: if QUIET is active, using the inspect option or trying
|
||||||
|
; to erase R/O files will give meaningless messages. Use
|
||||||
|
; the PROT command to set R/O files to R/W first in order to
|
||||||
|
; erase them quietly.
|
||||||
|
;
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: ERA
|
||||||
|
; Function: Erase files
|
||||||
|
; Forms:
|
||||||
|
; ERA <afn> Erase Specified files and print their names
|
||||||
|
; ERA <afn> o Erase Specified files and print their names, but ask
|
||||||
|
; for verification before Erase is done
|
||||||
|
|
||||||
|
era:
|
||||||
|
call retsave
|
||||||
|
ld a,(fcb2+1) ; Get eraflg if it's there
|
||||||
|
ld (eraflg),a ; Save it as a flag
|
||||||
|
ld a,1 ; Dir files only
|
||||||
|
call getdir ; Load directory of files
|
||||||
|
jp z,prfnf ; Abort if no files
|
||||||
|
;
|
||||||
|
; Main erase loop
|
||||||
|
;
|
||||||
|
era1: call break ; See if user wants to stop
|
||||||
|
call qplug ; Turn of output if quiet
|
||||||
|
push hl ; Save ptr to file
|
||||||
|
call prfn ; Print its name
|
||||||
|
ld (nxtfile),hl ; Save ptr to next file
|
||||||
|
pop hl ; Get ptr to this file
|
||||||
|
call unplug ; Turn output on
|
||||||
|
call rotest ; Test file pted to by hl for r/o
|
||||||
|
ld a,17 ; Proposed file R/O error code
|
||||||
|
ld b,00010000b ; EH flag to invoke transient
|
||||||
|
jp nz,errex1 ; Chain to transient if R/O
|
||||||
|
eraflg equ $+1 ; Address of flag
|
||||||
|
ld a,0 ; 2nd byte is flag
|
||||||
|
cp ' ' ; Is it an inspect option?
|
||||||
|
jr z,era2 ; Skip prompt if it is not
|
||||||
|
call eraq ; Erase?
|
||||||
|
jr nz,era3 ; Skip if not
|
||||||
|
era2: ld de,fcb1+1 ; Copy into fcb1
|
||||||
|
ld b,11 ; 11 bytes
|
||||||
|
call blkmov
|
||||||
|
call initfcb1 ; Init fcb
|
||||||
|
ld c,19 ; Delete file
|
||||||
|
call bdos
|
||||||
|
era3: ld hl,(nxtfile) ; Hl pts to next file
|
||||||
|
ld a,(hl) ; Get char
|
||||||
|
or a ; Done?
|
||||||
|
if erasp and spaceon
|
||||||
|
jp z,spaexit
|
||||||
|
else
|
||||||
|
jp z,exit
|
||||||
|
endif ; Erasp and spaceon
|
||||||
|
call crlf ; New line
|
||||||
|
jr era1
|
||||||
|
|
||||||
|
; End RCPERA.LIB
|
||||||
|
|
||||||
|
|
||||||
119
Source/BPBIOS/Z34RCP11/rcph.lib
Normal file
119
Source/BPBIOS/Z34RCP11/rcph.lib
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPH for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: HELP
|
||||||
|
; Function: This command displays a list of all resident commands that
|
||||||
|
; are supported, including those in the CPR (command processor),
|
||||||
|
; RCP, and FCP.
|
||||||
|
;
|
||||||
|
; Syntax: H
|
||||||
|
|
||||||
|
clist:
|
||||||
|
|
||||||
|
; Print the FCP-resident command names
|
||||||
|
|
||||||
|
if listfcp
|
||||||
|
call print ; Print header for FCP
|
||||||
|
db lf
|
||||||
|
db 'FC','P'+80h
|
||||||
|
ld hl,(fcp) ; Get FCP address dynamically from ENV
|
||||||
|
ld a,h ; See if still there
|
||||||
|
or l
|
||||||
|
jr z,nofcp ; FCP has been removed
|
||||||
|
ld bc,5 ; Calculate address of FCP command table
|
||||||
|
add hl,bc
|
||||||
|
call cmdlist ; Display list of commands
|
||||||
|
nofcp:
|
||||||
|
endif ;listfcp
|
||||||
|
|
||||||
|
; Print the CPR-resident command names
|
||||||
|
|
||||||
|
if listcpr
|
||||||
|
call print ; Print "CPR"
|
||||||
|
db cr,lf ; Need CR if no FCP
|
||||||
|
db 'CP','R'+80h
|
||||||
|
ld hl,(ccp) ; Get CCP address from ENV
|
||||||
|
ld bc,offcmd ; Point to command table in CPR
|
||||||
|
add hl,bc
|
||||||
|
call cmdlist ; Display the list of commands
|
||||||
|
endif ;listcpr
|
||||||
|
|
||||||
|
; Print the RCP-resident command names
|
||||||
|
|
||||||
|
call crlf ; Skip a line
|
||||||
|
ld hl,rcpname ; Print RCP name
|
||||||
|
call printhl
|
||||||
|
ld hl,RCPbegin+5 ; Point to RCP command table
|
||||||
|
; Fall through to CMDLIST
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; Subroutine to display list of commands in a command table (code above
|
||||||
|
; falls through to this routine -- do not move it). The commands are
|
||||||
|
; displayed 5 per line with 8 character spaces allowed for each command
|
||||||
|
; (subject to equates below).
|
||||||
|
|
||||||
|
cmdlist:
|
||||||
|
call crlf ; Start with new line
|
||||||
|
ld e,(hl) ; Get size of each command name into DE
|
||||||
|
ld d,0
|
||||||
|
inc hl ; Point to name of first command
|
||||||
|
ld c,cmdsline ; Set names-per-line value
|
||||||
|
cmdlist1:
|
||||||
|
ld a,(hl) ; Get first character of the command name
|
||||||
|
or a ; See if it is null
|
||||||
|
jr nz,cmdlist1a ; If not, continue
|
||||||
|
ld a,cmdsline ; See if we are already on a new line
|
||||||
|
cp c
|
||||||
|
call nz,crlf ; If not, skip a line
|
||||||
|
ret
|
||||||
|
|
||||||
|
cmdlist1a:
|
||||||
|
if noshow ; Option to suppress wheel-limited cmds
|
||||||
|
rla ; Shift high bit of name into carry bit
|
||||||
|
jr nc,cmdlist2 ; If not restricted, go on
|
||||||
|
call getwhl ; Otherwise, check wheel byte
|
||||||
|
or a
|
||||||
|
jr nz,cmdlist2 ; If wheel set, continue as usual
|
||||||
|
add hl,de ; Otherwise skip this command
|
||||||
|
jr cmdlist5
|
||||||
|
endif
|
||||||
|
|
||||||
|
; Print leading spaces between names
|
||||||
|
|
||||||
|
cmdlist2:
|
||||||
|
ld a,cmdspace ; Spacing between command names
|
||||||
|
sub e ; Less length of each command name
|
||||||
|
ld b,a
|
||||||
|
cmdlist3:
|
||||||
|
call spac
|
||||||
|
djnz cmdlist3
|
||||||
|
|
||||||
|
; Print name of command
|
||||||
|
|
||||||
|
ld b,e ; Length of each name into B
|
||||||
|
cmdlist4:
|
||||||
|
ld a,(hl) ; Get command name character
|
||||||
|
call conout
|
||||||
|
inc hl ; Point to next
|
||||||
|
djnz cmdlist4
|
||||||
|
|
||||||
|
dec c ; Decrement count of names on this line
|
||||||
|
jr nz,cmdlist5 ; Branch if room for more names
|
||||||
|
call crlf ; Otherwise, end this line and
|
||||||
|
ld c,cmdsline ; ..reset count for another line of commands
|
||||||
|
|
||||||
|
; Skip to next command name
|
||||||
|
|
||||||
|
cmdlist5:
|
||||||
|
inc hl ; Skip jump vector
|
||||||
|
inc hl
|
||||||
|
jr cmdlist1 ; Back to process next name
|
||||||
|
|
||||||
|
; End RCPH.LIB
|
||||||
|
|
||||||
|
|
||||||
64
Source/BPBIOS/Z34RCP11/rcpid.lib
Normal file
64
Source/BPBIOS/Z34RCP11/rcpid.lib
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPID for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: September 29, 1989
|
||||||
|
; Changes: ID appended with 'C' if CLED is present
|
||||||
|
;
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: September 14, 1988
|
||||||
|
;
|
||||||
|
; Function: Build the name of the RCP and append it at the end of the
|
||||||
|
; file at label RCPID. This serves two purposes: first it
|
||||||
|
; allows the 'H' command to describe which RCP is active,
|
||||||
|
; second, the string identifies the actual end of the RCP
|
||||||
|
; in memory.
|
||||||
|
;
|
||||||
|
; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Macros to build RCP ID for Help command
|
||||||
|
|
||||||
|
; Under SLR and compatible assemblers, the RCP name reflects the
|
||||||
|
; RCP size, e.g., "RCP-21F" means the RCP occupies 21 records.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
rcpid macro
|
||||||
|
rcplen defl RCPend - RCPbegin
|
||||||
|
fulrecs equ rcplen / 128 ; Full records
|
||||||
|
lastr equ [rcplen mod 128 + 127]/128 ; Last record, if any
|
||||||
|
ttlrecs equ fulrecs + lastr
|
||||||
|
|
||||||
|
db 'RCP-'
|
||||||
|
db ttlrecs / 10 + '0' ; Tens of records
|
||||||
|
db ttlrecs mod 10 + '0' ; Ones
|
||||||
|
db rcptype ; 'F', 'H', etc. from RCP.LIB
|
||||||
|
if cledon
|
||||||
|
db 'C' ; Distinguish CLED versions
|
||||||
|
endif
|
||||||
|
db 0 ; ID string terminator
|
||||||
|
endm
|
||||||
|
|
||||||
|
else ; Non-SLR
|
||||||
|
rcpid macro
|
||||||
|
db 'RCP-'
|
||||||
|
db rcptype
|
||||||
|
db 0
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
; -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Name of RCP
|
||||||
|
|
||||||
|
; This block allows the 'H' command and/or the SHOW utility to display a name
|
||||||
|
; and version number for this RCP as well as the commands that are supported.
|
||||||
|
; It also generates a unique string marking the end of the RCP module.
|
||||||
|
|
||||||
|
rcpname:
|
||||||
|
rcpid
|
||||||
|
|
||||||
|
; End of RCPID.LIB
|
||||||
|
|
||||||
|
|
||||||
296
Source/BPBIOS/Z34RCP11/rcpiom.lib
Normal file
296
Source/BPBIOS/Z34RCP11/rcpiom.lib
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPIOM for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 12, 1989
|
||||||
|
; Changes: POKE and PORT now respond dynamically to QUIET flag,
|
||||||
|
; eliminating "noise."
|
||||||
|
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Commands: PEEK, POKE, and PORT
|
||||||
|
|
||||||
|
; ------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Command: PEEK
|
||||||
|
; Function: Display memory contents
|
||||||
|
;
|
||||||
|
; Form:
|
||||||
|
; PEEK startadr 128 bytes displayed
|
||||||
|
; PEEK startadr endadr Range of bytes displayed
|
||||||
|
|
||||||
|
if peekon
|
||||||
|
peek:
|
||||||
|
call retsave
|
||||||
|
ld hl,tbuff+1 ; Find first number
|
||||||
|
nxtpeek equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld de,100h ; Default peek address if none
|
||||||
|
call sksp ; Skip to first token (if any)
|
||||||
|
call nz,hexnum ; Get start address if any
|
||||||
|
push de ; Save starting address
|
||||||
|
ld bc,peeklen ; Compute default ending address
|
||||||
|
ex de,hl
|
||||||
|
add hl,bc
|
||||||
|
|
||||||
|
if peekchk ; Check for overflow
|
||||||
|
jr nc,peek0 ; If no overflow past FFFF, go on
|
||||||
|
ld hl,0ffffh ; Else use FFFF as ending address
|
||||||
|
peek0:
|
||||||
|
endif ;peekchk
|
||||||
|
|
||||||
|
ex de,hl ; End address in DE
|
||||||
|
call sksp ; Skip to next token (if any)
|
||||||
|
call nz,hexnum ; Get 2nd number in DE (else default)
|
||||||
|
peek1: pop hl ; HL is start address, DE is end address
|
||||||
|
|
||||||
|
if peekhdr
|
||||||
|
push hl ; Save starting address again
|
||||||
|
ld b,8 ; Output leading spaces
|
||||||
|
peek0a: call spac
|
||||||
|
djnz peek0a
|
||||||
|
ld b,16 ; Display 16 column headers
|
||||||
|
peek0b: ld a,l ; Get low byte of address
|
||||||
|
and 0fh ; Display low hex digit
|
||||||
|
call pashc
|
||||||
|
inc hl
|
||||||
|
djnz peek0b
|
||||||
|
;
|
||||||
|
; Display header for ASCII area
|
||||||
|
;
|
||||||
|
call print
|
||||||
|
db ' ',' '+80H ; Space over to ASCII area
|
||||||
|
pop hl ; Get address
|
||||||
|
push hl
|
||||||
|
ld b,16 ; Display 16 chars. ASCII header
|
||||||
|
peek0b1:ld a,l ; Get byte
|
||||||
|
and 0fh ; Mask
|
||||||
|
call pah ; Print ASCII char.
|
||||||
|
inc hl ; Next byte
|
||||||
|
djnz peek0b1
|
||||||
|
|
||||||
|
if peekbdr
|
||||||
|
call crlf
|
||||||
|
ld b,8
|
||||||
|
peek0c: call spac ; Print leading spaces
|
||||||
|
djnz peek0c
|
||||||
|
ld b,16
|
||||||
|
peek0d: call print
|
||||||
|
db ' -','-'+80h
|
||||||
|
djnz peek0d
|
||||||
|
|
||||||
|
; Print border at ASCII area
|
||||||
|
|
||||||
|
call print
|
||||||
|
db ' ',' '+80h ; Space to ASCII border
|
||||||
|
ld b,16 ; 16 dashes
|
||||||
|
peek0e: call print
|
||||||
|
db '-'+80h
|
||||||
|
djnz peek0e
|
||||||
|
endif ;peekbdr
|
||||||
|
|
||||||
|
pop hl ; Restore starting address
|
||||||
|
endif ;peekhdr
|
||||||
|
|
||||||
|
ld c,0ffh ; Use C as continue flag
|
||||||
|
call peek2 ; Do peek
|
||||||
|
ld (nxtpeek),hl ; Set continued peek address
|
||||||
|
jp exit
|
||||||
|
peek2:
|
||||||
|
ld a,c ; Check continuation flag
|
||||||
|
or a
|
||||||
|
ret z
|
||||||
|
|
||||||
|
; Print line header
|
||||||
|
|
||||||
|
peek2a: call crlf ; New line
|
||||||
|
ld a,h ; Print address
|
||||||
|
call pashc
|
||||||
|
ld a,l
|
||||||
|
call pahc
|
||||||
|
call dash ; Print leader
|
||||||
|
ld b,16 ; 16 bytes to display
|
||||||
|
push hl ; Save start address
|
||||||
|
|
||||||
|
; Print hex values for 16 bytes
|
||||||
|
|
||||||
|
peek3: ld a,(hl) ; Get next byte
|
||||||
|
call pashc ; Print with leading space
|
||||||
|
|
||||||
|
; Check for last address. If C is already 0, leave it that way.
|
||||||
|
; Otherwise check for end address and if so set C to zero.
|
||||||
|
|
||||||
|
ld a,c ; See if continue flag already cleared
|
||||||
|
or a
|
||||||
|
jr z,peek3a ; If so, skip test
|
||||||
|
ld a,h
|
||||||
|
sub a,d ; See if h = d
|
||||||
|
ld c,a
|
||||||
|
ld a,l
|
||||||
|
sub a,e ; See if l = e
|
||||||
|
or c ; Combine two tests
|
||||||
|
ld c,a
|
||||||
|
peek3a: inc hl ; Pt to next
|
||||||
|
djnz peek3
|
||||||
|
|
||||||
|
; Print ASCII equivalents for 16 bytes
|
||||||
|
|
||||||
|
pop hl ; Pt to first address again
|
||||||
|
ld b,16 ; 16 bytes
|
||||||
|
call print ; Space and fence
|
||||||
|
db ' '
|
||||||
|
db fence+80h
|
||||||
|
push bc ; Save flag in c
|
||||||
|
peek4: ld a,(hl) ; Get next byte
|
||||||
|
ld c,'.' ; Assume dot
|
||||||
|
and 7fh ; Mask it
|
||||||
|
cp ' ' ; Dot if less than space
|
||||||
|
jr c,peek5
|
||||||
|
cp 7fh ; Don't print del
|
||||||
|
jr z,peek5
|
||||||
|
ld c,a ; Char in c
|
||||||
|
peek5: ld a,c ; Get char
|
||||||
|
call conout ; Send it
|
||||||
|
inc hl ; Pt to next
|
||||||
|
djnz peek4
|
||||||
|
call print ; Closing fence
|
||||||
|
db fence+80h
|
||||||
|
pop bc ; Get flag in c back
|
||||||
|
call break ; Allow abort
|
||||||
|
jr peek2
|
||||||
|
endif ; Peekon
|
||||||
|
|
||||||
|
; PAHC - Print A as 2 hex chars
|
||||||
|
; PASHC - With leading space
|
||||||
|
|
||||||
|
if peekon or pokeon or porton
|
||||||
|
pashc:
|
||||||
|
push af ; Save A
|
||||||
|
call spac
|
||||||
|
pop af
|
||||||
|
pahc: push bc ; Save bc
|
||||||
|
ld c,a ; Byte in c
|
||||||
|
rrca ; Exchange nybbles
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
call pah ; Print hex char
|
||||||
|
ld a,c ; Get low
|
||||||
|
pop bc ; Restore bc and fall thru to pah
|
||||||
|
pah: and 0fh ; Mask
|
||||||
|
add '0' ; Convert to ascii
|
||||||
|
cp '9'+1 ; Letter?
|
||||||
|
jr c,pah1
|
||||||
|
add 7 ; Adjust to letter
|
||||||
|
pah1: jp conout
|
||||||
|
endif ; Peekon or pokeon or porton
|
||||||
|
|
||||||
|
; --------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Command: POKE
|
||||||
|
; Function: Place Values into Memory
|
||||||
|
;
|
||||||
|
; Form:
|
||||||
|
; POKE startadr val1 val2 ...
|
||||||
|
;
|
||||||
|
if pokeon
|
||||||
|
poke:
|
||||||
|
call retsave
|
||||||
|
ld hl,tbuff+1 ; Pt to first char
|
||||||
|
call sksp ; Skip to non-blank
|
||||||
|
jp z,numerr ; Numerical error
|
||||||
|
call hexnum ; Convert to number
|
||||||
|
call qplug ; Shut off output if quiet
|
||||||
|
call print
|
||||||
|
db ' Pok','e'+80h
|
||||||
|
call adrat ; Print at message (quiet sensitive)
|
||||||
|
call unplug ; Turn on output
|
||||||
|
|
||||||
|
; Loop for storing hex values sequentially via POKE
|
||||||
|
|
||||||
|
poke1: push de ; Save address
|
||||||
|
call sksp ; Skip to non-blank
|
||||||
|
jp z,exit ; Done
|
||||||
|
cp '"' ; Quoted text?
|
||||||
|
jr z,poke2
|
||||||
|
call hexnum ; Get number
|
||||||
|
ld a,e ; Get low
|
||||||
|
pop de ; Get address
|
||||||
|
ld (de),a ; Store number
|
||||||
|
inc de ; Pt to next
|
||||||
|
jr poke1
|
||||||
|
|
||||||
|
; Store ASCII chars.
|
||||||
|
|
||||||
|
poke2: pop de ; Get next address
|
||||||
|
inc hl ; Pt to next char
|
||||||
|
poke3: ld a,(hl) ; Get next char
|
||||||
|
or a ; Done?
|
||||||
|
jp z,exit
|
||||||
|
ld (de),a ; Put char
|
||||||
|
inc hl ; Pt to next
|
||||||
|
inc de
|
||||||
|
jr poke3
|
||||||
|
|
||||||
|
endif ; Pokeon
|
||||||
|
|
||||||
|
; -------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Command: PORT
|
||||||
|
; Function: Display or Set I/O Port Data
|
||||||
|
;
|
||||||
|
; Forms:
|
||||||
|
; PORT addr - Read port and display value
|
||||||
|
; PORT addr value - Output value to port
|
||||||
|
;
|
||||||
|
if porton
|
||||||
|
port:
|
||||||
|
call retsave
|
||||||
|
ld hl,tbuff+1 ; Find first number
|
||||||
|
call sksp ; Skip to first command-line token
|
||||||
|
jp z,numerr ; Numerical error
|
||||||
|
call hexnum ; Get start address into de
|
||||||
|
push hl ; Save pointer to command tail
|
||||||
|
ld hl,portadl ; Modify code
|
||||||
|
ld (hl),e ; Move specified port addr into place
|
||||||
|
dec hl ; Point to opcode position
|
||||||
|
ld (hl),0dbh ; Poke 'in' opcode
|
||||||
|
dec hl
|
||||||
|
ld (hl),d ; Save MSB for port address
|
||||||
|
inc hl
|
||||||
|
ex (sp),hl ; Get tail pointer back while saving this one
|
||||||
|
call qplug ; Shut off output if quiet
|
||||||
|
call print ; Print header
|
||||||
|
db ' Por','t'+80h
|
||||||
|
ld a,e
|
||||||
|
call pashc ; Print port address
|
||||||
|
call sksp ; Skip to possible second value
|
||||||
|
jr z,portin ; Proceed with port input
|
||||||
|
call hexnum ; Get 2nd number in de
|
||||||
|
ex (sp),hl ; Get pointer to opcode back
|
||||||
|
ld (hl),0d3h ; Poke 'out' opcode
|
||||||
|
call print
|
||||||
|
db ': OU','T'+80h
|
||||||
|
ld a,e ; Get value to output
|
||||||
|
jr paddr
|
||||||
|
portin:
|
||||||
|
call print
|
||||||
|
db ': I','N'+80h
|
||||||
|
xor a ; Make sure high port address = 0 (for hd64180)
|
||||||
|
portadh equ $+1
|
||||||
|
paddr: ld b,0 ; ..for both in and out instructions
|
||||||
|
opcode:
|
||||||
|
db 0 ; Opcode for in or out inserted by code above
|
||||||
|
portadl:
|
||||||
|
db 0 ; Port address inserted by code above
|
||||||
|
call pashc
|
||||||
|
call unplug ; Turn on output
|
||||||
|
pop hl ; Clean up stack
|
||||||
|
jp exit
|
||||||
|
|
||||||
|
endif ; Porton
|
||||||
|
|
||||||
|
; End RCPIOM.Z80
|
||||||
|
|
||||||
256
Source/BPBIOS/Z34RCP11/rcplt.lib
Normal file
256
Source/BPBIOS/Z34RCP11/rcplt.lib
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPLT for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 26, 1989
|
||||||
|
; Changes: Some WordStar characters caused garbage to appear on the
|
||||||
|
; screen. Now filters control characters other than CR,
|
||||||
|
; TAB, and LF. Thanks to Gene Pizzetta for this suggestion.
|
||||||
|
;
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Commands: LIST and TYPE
|
||||||
|
|
||||||
|
; ----------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Command: LIST
|
||||||
|
; Function: Print out specified file on the LST: Device
|
||||||
|
; Forms:
|
||||||
|
; LIST Do form feed
|
||||||
|
; LIST <afn> Print file(s) (NO Paging)
|
||||||
|
; Notes:
|
||||||
|
; The flags which apply to TYPE do not take effect with LIST
|
||||||
|
; The tab expansion code is required for LST: output.
|
||||||
|
|
||||||
|
if liston
|
||||||
|
list:
|
||||||
|
ld a,(fcb1+1) ; Get filename or ' ' from command
|
||||||
|
ld (prflg),a ; List flag (A can't be 0)
|
||||||
|
cp ' ' ; Null command?
|
||||||
|
jp z,lstff ; Yes, do form feed and return
|
||||||
|
jr type0 ; No, send file to LST:
|
||||||
|
endif ;liston
|
||||||
|
|
||||||
|
; --------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Command: TYPE
|
||||||
|
; Function: Print out specified file on the CON: Device
|
||||||
|
; Forms:
|
||||||
|
; TYPE <afn> Print file
|
||||||
|
; TYPE <afn> P Print file with paging flag
|
||||||
|
; Notes:
|
||||||
|
; The flag PGDFLG defines the letter which toggles the paging
|
||||||
|
; facility (P in the forms section above)
|
||||||
|
; The flag PGDFLT determines if TYPE is to page by default
|
||||||
|
; (PGDFLT=TRUE if TYPE pages by default); combined with
|
||||||
|
; PGDFLG, the following events occur --
|
||||||
|
; If PGDFLT = TRUE, PGDFLG turns OFF paging
|
||||||
|
; If PGDFLT = FALSE, PGDFLG turns ON paging
|
||||||
|
|
||||||
|
type:
|
||||||
|
if liston
|
||||||
|
xor a ; Turn off printer flag
|
||||||
|
ld (prflg),a ; Set flag
|
||||||
|
endif ; Liston
|
||||||
|
|
||||||
|
; Entry point for list function (LIST)
|
||||||
|
|
||||||
|
type0: call retsave ; Save return address
|
||||||
|
ld a,(fcb2+1) ; Get page flag from command
|
||||||
|
ld (pgflg),a ; Store it
|
||||||
|
ld a,1 ; Select dir files
|
||||||
|
call getdir ; Allow ambiguous files (HL points to buffer)
|
||||||
|
jp z,noflerr ; EH no files error
|
||||||
|
ld a,(lins) ; Set line count
|
||||||
|
ld (pagcnt),a
|
||||||
|
jr typex1
|
||||||
|
|
||||||
|
; Entry point for successive files
|
||||||
|
|
||||||
|
typex0: pop hl ; Balance stack for skip
|
||||||
|
pop hl ; ..to next file command (^X)
|
||||||
|
typex: ld hl,(nxtfile) ; Get ptr to next file
|
||||||
|
ld a,(hl) ; Any files?
|
||||||
|
or a
|
||||||
|
jp z,exit
|
||||||
|
|
||||||
|
if liston
|
||||||
|
ld a,(prflg) ; Check for lst: output
|
||||||
|
or a ; 0=type
|
||||||
|
jr z,typex1
|
||||||
|
ld a,cr ; Bol on printer
|
||||||
|
call lcout
|
||||||
|
call lstff ; Form feed the printer
|
||||||
|
; fall thru
|
||||||
|
endif ; Liston
|
||||||
|
|
||||||
|
; Entry point for 1st file
|
||||||
|
typex1: ld de,fcb1+1 ; Copy into fcb1
|
||||||
|
ld b,11 ; 11 bytes
|
||||||
|
call blkmov
|
||||||
|
ld (nxtfile),hl ; Set ptr to next file
|
||||||
|
call initfcb1 ; Init fcb1
|
||||||
|
ld c,15 ; Open file
|
||||||
|
call bdos
|
||||||
|
inc a ; Set error flag
|
||||||
|
jp z,noflerr ; EH no files error
|
||||||
|
ld a,cr ; New line
|
||||||
|
call lcout
|
||||||
|
ld a,lf
|
||||||
|
call lcout
|
||||||
|
ld bc,080h ; Set char position and tab count
|
||||||
|
; (b=0=tab, c=080h=char position)
|
||||||
|
|
||||||
|
; Main loop for loading next block
|
||||||
|
|
||||||
|
type2: ld a,c ; Get char count
|
||||||
|
cp 80h
|
||||||
|
jr c,type3
|
||||||
|
call break
|
||||||
|
push bc ; Read next block
|
||||||
|
ld de,fcb1 ; Pt to fcb
|
||||||
|
ld c,20 ; Read record
|
||||||
|
call bdos
|
||||||
|
or a ; Set flags
|
||||||
|
pop bc
|
||||||
|
jr nz,typex ; End of file?
|
||||||
|
ld c,0 ; Set char count
|
||||||
|
ld hl,tbuff ; Pt to first char
|
||||||
|
|
||||||
|
; Main loop for printing chars in tbuff
|
||||||
|
|
||||||
|
type3: ld a,(hl) ; Get next char
|
||||||
|
and 7fh ; Mask out msb
|
||||||
|
cp 1ah ; End of file (^z)?
|
||||||
|
jr z,typex ; Next file if so
|
||||||
|
|
||||||
|
; Output char to CON: or LST: device with tabulation
|
||||||
|
|
||||||
|
cp cr ; Reset tab count?
|
||||||
|
jr z,type4
|
||||||
|
cp lf ; Reset tab count?
|
||||||
|
jr z,type4
|
||||||
|
cp tab ; Tab?
|
||||||
|
jr z,type5
|
||||||
|
cp ' ' ; Skip other ctls.
|
||||||
|
jr c,type6
|
||||||
|
|
||||||
|
; Output char and increment char count
|
||||||
|
|
||||||
|
call lcout ; Output char
|
||||||
|
inc b ; Increment tab count
|
||||||
|
jr type6
|
||||||
|
|
||||||
|
; Output <CR> or <LF> and reset tab count
|
||||||
|
|
||||||
|
type4: call lcout ; Output <cr> or <lf>
|
||||||
|
ld b,0 ; Reset tab counter
|
||||||
|
jr type6
|
||||||
|
|
||||||
|
; Tabulate
|
||||||
|
|
||||||
|
type5: ld a,' ' ; <sp>
|
||||||
|
call lcout
|
||||||
|
inc b ; Incr pos count
|
||||||
|
ld a,b
|
||||||
|
and 7
|
||||||
|
jr nz,type5
|
||||||
|
|
||||||
|
; Continue processing
|
||||||
|
|
||||||
|
type6:
|
||||||
|
inc c ; Increment char count
|
||||||
|
inc hl ; Pt to next char
|
||||||
|
jr type2
|
||||||
|
|
||||||
|
; Send a formfeed to LST:. Assumes PRFLG <> 0.
|
||||||
|
|
||||||
|
lstff:
|
||||||
|
ld a,ff ; formfeed
|
||||||
|
; fall thru
|
||||||
|
|
||||||
|
; Send output to LST: or CON:, as per the flag
|
||||||
|
; Return with Z if abort
|
||||||
|
|
||||||
|
lcout: push hl ; Save regs
|
||||||
|
push bc
|
||||||
|
ld e,a ; Char in e
|
||||||
|
ld c,2 ; Output to con:
|
||||||
|
|
||||||
|
if liston
|
||||||
|
prflg equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld a,0 ; 2nd byte is the print flag
|
||||||
|
or a ; 0=type
|
||||||
|
jr z,lc1
|
||||||
|
ld c,5 ; Output to lst:
|
||||||
|
endif ; Liston
|
||||||
|
|
||||||
|
lc1: push de ; Save char
|
||||||
|
call bdos ; Output char in e
|
||||||
|
pop de ; Get char
|
||||||
|
ld a,e
|
||||||
|
cp lf ; New line?
|
||||||
|
jr nz,lc2 ; No, return
|
||||||
|
call break ; Check for abort
|
||||||
|
jp z,typex0 ; Skip if ^X
|
||||||
|
|
||||||
|
if liston
|
||||||
|
ld a,(prflg) ; Output to lst:?
|
||||||
|
or a ; Nz = yes
|
||||||
|
jr nz,lc2
|
||||||
|
endif ; Liston
|
||||||
|
|
||||||
|
; New line, so check for paging
|
||||||
|
|
||||||
|
ld hl,pagcnt
|
||||||
|
dec (hl)
|
||||||
|
jr nz,lc2 ; Jump if not end of page
|
||||||
|
ld a,(lins)
|
||||||
|
ld (hl),a ; Reset counter
|
||||||
|
pgflg equ $+1 ; Pointer to in-the-code buffer
|
||||||
|
ld a,0 ; 2nd byte is the paging flag
|
||||||
|
cp pgdflg ; Page default override option wanted?
|
||||||
|
|
||||||
|
if pgdflt ; If paging is default
|
||||||
|
jr z,lc2 ; Pgdflg means no paging
|
||||||
|
else
|
||||||
|
jr nz,lc2 ; Pgdflg means page
|
||||||
|
endif ; Pgdflt
|
||||||
|
|
||||||
|
push hl ; Save hl
|
||||||
|
call print
|
||||||
|
db cr,lf,' Typing',' '+80h
|
||||||
|
ld hl,fcb1+1 ; Print file name
|
||||||
|
call prfn
|
||||||
|
call dash ; Print dash
|
||||||
|
call conin ; Get input
|
||||||
|
pop hl ; Restore hl
|
||||||
|
call break1 ; Set Z flag or abort
|
||||||
|
push af ; Save results
|
||||||
|
|
||||||
|
if typecls and clson
|
||||||
|
call cls ; Clear between screens
|
||||||
|
else
|
||||||
|
call crlf
|
||||||
|
endif
|
||||||
|
|
||||||
|
pop af ; Get results
|
||||||
|
jp z,typex0 ; Control-X, so skip to next file
|
||||||
|
cp ctrlz ; If Control-Z,
|
||||||
|
jr nz,lc2
|
||||||
|
ld a,pgdflg ; Switch to non-default
|
||||||
|
ld (pgflg),a ; ..paging mode
|
||||||
|
lc2: pop bc ; Restore regs
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
; Storage for line counter
|
||||||
|
|
||||||
|
pagcnt:
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
; End RCPLT.LIB
|
||||||
|
|
||||||
130
Source/BPBIOS/Z34RCP11/rcpprot.lib
Normal file
130
Source/BPBIOS/Z34RCP11/rcpprot.lib
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPPROT for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 12, 1989
|
||||||
|
; Changes: Now responds dynamically to QUIET flag, eliminating "noise."
|
||||||
|
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: PROT
|
||||||
|
; Function: To set the attributes of a file (R/O, SYS, and ARC)
|
||||||
|
; Form: PROT afn RSAI
|
||||||
|
; Comments: If R, S, or A are omitted, the file is made R/W, DIR, or
|
||||||
|
; modified, respectively. R, S, A, and I may be in any order.
|
||||||
|
; If I is present, Inspection is enabled.
|
||||||
|
|
||||||
|
att:
|
||||||
|
call retsave
|
||||||
|
call dirchek ; Test bad directory
|
||||||
|
xor a ; Set no inspect
|
||||||
|
ld (inspect),a
|
||||||
|
ld hl,0 ; Set r/o and sys attributes off
|
||||||
|
ld c,0 ; Set Arc attribute off
|
||||||
|
ld de,fcb2+1 ; Pt to attributes
|
||||||
|
ld b,4 ; 4 chars max
|
||||||
|
att1:
|
||||||
|
ld a,(de) ; Get char
|
||||||
|
inc de ; Pt to next
|
||||||
|
cp 'I' ; Inspect?
|
||||||
|
jr z,atti
|
||||||
|
cp 'R' ; Set r/o?
|
||||||
|
jr z,attr
|
||||||
|
cp 'S' ; Set sys?
|
||||||
|
jr z,atts
|
||||||
|
cp 'A'
|
||||||
|
jr z,atta
|
||||||
|
att2:
|
||||||
|
djnz att1
|
||||||
|
jr att3
|
||||||
|
atti:
|
||||||
|
ld (inspect),a ; Set flag
|
||||||
|
jr att2
|
||||||
|
attr:
|
||||||
|
ld h,a ; Save R/O flag
|
||||||
|
jr att2
|
||||||
|
atts:
|
||||||
|
ld l,a ; Save SYS flag
|
||||||
|
jr att2
|
||||||
|
atta:
|
||||||
|
ld c,a ; Save ARC
|
||||||
|
jr att2
|
||||||
|
att3:
|
||||||
|
ld (fatt2),hl ; Save file attributes
|
||||||
|
ld a,c
|
||||||
|
ld (fatt1),a ; Save Arc attribute
|
||||||
|
ld a,1 ; Select dir and sys files
|
||||||
|
call getdir ; Load directory
|
||||||
|
jp z,noflerr ; Tell error handler no file
|
||||||
|
jr att5
|
||||||
|
att4:
|
||||||
|
ld hl,(nxtfile) ; Pt to next file
|
||||||
|
ld a,(hl) ; End of list?
|
||||||
|
or a
|
||||||
|
jp z,exit
|
||||||
|
call crlf ; New line
|
||||||
|
att5: call break ; Check for possible abort
|
||||||
|
call qplug ; Turn off output if quiet
|
||||||
|
push hl ; Save ptr to current file
|
||||||
|
call prfn ; Print its name
|
||||||
|
ld (nxtfile),hl ; Save ptr to next file
|
||||||
|
call print
|
||||||
|
db ' Set to R','/'+80h
|
||||||
|
ld hl,(fatt2) ; Get attributes
|
||||||
|
ld c,'W' ; Assume r/w
|
||||||
|
ld a,h ; Get r/o bit
|
||||||
|
or a
|
||||||
|
jr z,att6
|
||||||
|
ld c,'O' ; Set r/o
|
||||||
|
att6: ld a,c ; Get char
|
||||||
|
call conout
|
||||||
|
ld a,l ; Get sys flag
|
||||||
|
or a ; Set flag
|
||||||
|
jr z,att7
|
||||||
|
call print
|
||||||
|
db ', SY','S'+80h
|
||||||
|
att7: ld a,(fatt1)
|
||||||
|
or a
|
||||||
|
jr z,att7a
|
||||||
|
call print
|
||||||
|
db ', AR','C'+80h
|
||||||
|
att7a: call unplug ; Turn output on
|
||||||
|
inspect equ $+1 ; Ptr for in-the-code modification
|
||||||
|
ld a,0 ; Get inspect flag
|
||||||
|
or a ; Z=no
|
||||||
|
pop hl ; Get ptr to current file
|
||||||
|
jr z,att8
|
||||||
|
call eraq1 ; Ask for y/n
|
||||||
|
jr nz,att4 ; Advance to next file if not y
|
||||||
|
att8: ld de,fcb1+1 ; Copy into fcb1
|
||||||
|
ld b,11 ; 11 bytes
|
||||||
|
call blkmov
|
||||||
|
ex de,hl
|
||||||
|
dec hl ; Pt to archive byte
|
||||||
|
fatt1 equ $+1
|
||||||
|
ld a,0
|
||||||
|
call attset
|
||||||
|
dec hl ; Pt to sys byte
|
||||||
|
fatt2 equ $+1 ; Ptr for in-the-code modification
|
||||||
|
ld de,0 ; Get attributes
|
||||||
|
ld a,e ; Get sys flag
|
||||||
|
call attset ; Set attribute correctly
|
||||||
|
dec hl ; Pt to r/o byte
|
||||||
|
ld a,d ; Get r/o flag
|
||||||
|
call attset
|
||||||
|
ld de,fcb1 ; Pt to fcb
|
||||||
|
ld c,30 ; Set attributes
|
||||||
|
call bdos
|
||||||
|
jp att4
|
||||||
|
attset:
|
||||||
|
res 7,(hl) ; Clear attribute
|
||||||
|
or a
|
||||||
|
ret z ; 0=clear attribute
|
||||||
|
set 7,(hl) ; Set attribute
|
||||||
|
ret
|
||||||
|
|
||||||
|
; End RCPPROT.LIB
|
||||||
|
|
||||||
49
Source/BPBIOS/Z34RCP11/rcpquiet.lib
Normal file
49
Source/BPBIOS/Z34RCP11/rcpquiet.lib
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPQUIET for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 6, 1989
|
||||||
|
; Changes: Now "Q R[eset]" and "Q S[et]" just reset and set quiet status
|
||||||
|
; without showing it, and Q alone (or with any other character,
|
||||||
|
; e.g., "Q ?") always just shows status.
|
||||||
|
; Forms:
|
||||||
|
; Q - Display quiet flag (always)
|
||||||
|
; Q s - Set quiet flag ON
|
||||||
|
; Q r - Set quiet flag OFF
|
||||||
|
;
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: Q
|
||||||
|
; Function: Set the Quiet flag on or off
|
||||||
|
; Comments: If QQUIET equate is true, then RCP does not report
|
||||||
|
; quiet status with the Q command.
|
||||||
|
; Forms:
|
||||||
|
; Q - Display quiet flag (if QQUIET false)
|
||||||
|
; Q s - Set quiet flag ON
|
||||||
|
; Q r - Set quiet flag OFF
|
||||||
|
|
||||||
|
quset:
|
||||||
|
ld a,(fcb1+1) ; Get first char
|
||||||
|
ld b,1 ; Prepare to turn on
|
||||||
|
cp 'S' ; S-et quiet (ON)
|
||||||
|
jr z,quset1
|
||||||
|
ld b,0 ; Prepare to turn off
|
||||||
|
cp 'R' ; R-eset quiet (OFF)
|
||||||
|
jr nz,qmsg ; Neither S nor R, so display
|
||||||
|
quset1:
|
||||||
|
ld a,b
|
||||||
|
ld (quiet),a
|
||||||
|
ret
|
||||||
|
|
||||||
|
qmsg:
|
||||||
|
; Print Quiet Flag Message
|
||||||
|
|
||||||
|
ld a,(quiet)
|
||||||
|
jp tella ; Say " On" or " Off" and return
|
||||||
|
|
||||||
|
; End RCPQUIET.LIB
|
||||||
|
|
||||||
|
|
||||||
108
Source/BPBIOS/Z34RCP11/rcpr.lib
Normal file
108
Source/BPBIOS/Z34RCP11/rcpr.lib
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPR for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.5
|
||||||
|
; Date: August 30, 1989
|
||||||
|
; Changes: Minor bug fix as suggested by Howard Goldstein.
|
||||||
|
;
|
||||||
|
; Version: 1.4
|
||||||
|
; Date: August 26, 1989
|
||||||
|
; Changes: Now performs reset 37 for ALL drives under CP/M 2.2 or ZRDOS
|
||||||
|
; to ensure that fast fixed disks are reset under ZRDOS, then
|
||||||
|
; exits with reset 13 to compensate for bugs in ZRDOS/CP/M 2.2
|
||||||
|
; reset 37. Still resets individual drives selectively under
|
||||||
|
; CP/M Plus and ZS/ZDDOS.
|
||||||
|
|
||||||
|
; Version: 1.3
|
||||||
|
; Date: August 11, 1989
|
||||||
|
; Changes: Now responds dynamically to QUIET flag, eliminating "noise."
|
||||||
|
; Now performs reset 37 in ALL cases, reset 13 as well if not
|
||||||
|
; CP/M Plus or ZSDOS (per suggestion by Howard Goldstein).
|
||||||
|
|
||||||
|
; Version: 1.2
|
||||||
|
; Date: December 30, 1988
|
||||||
|
; Changes: Now resets single drives under Z3PLUS.
|
||||||
|
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: September 11, 1988
|
||||||
|
; Changes: Fixed bug which failed to detect ZRDOS. ZRDOS' function
|
||||||
|
; 37, like CP/M's, is not reliable.
|
||||||
|
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: RESET
|
||||||
|
; Function: Reset the disk system
|
||||||
|
; Forms: R [d: or dir:] - ZSDOS or CP/M Plus
|
||||||
|
; R - CP/M 2.2 or ZRDOS
|
||||||
|
; Comments: ZRDOS does not require a disk system reset when disks are
|
||||||
|
; changed, but directory programs will not show the correct
|
||||||
|
; size if this is not done. It is also good practice. Since
|
||||||
|
; no warm boot is performed, the disk in drive A need not have
|
||||||
|
; the operating system on it.
|
||||||
|
;
|
||||||
|
; Under ZSDOS or CP/M Plus, individual drives may be reset, and
|
||||||
|
; if RESETSP is true, space remaining is also given. If
|
||||||
|
; the fast hard disk reset capability is enabled under ZSDOS,
|
||||||
|
; any "fast" fixed disks are also reset at this time.
|
||||||
|
;
|
||||||
|
; NOTE: It is necessary to reset a legal directory or DU when there are
|
||||||
|
; protected directories.
|
||||||
|
|
||||||
|
reset: ld a,(quiet)
|
||||||
|
or a ; Skip message if quiet
|
||||||
|
jr nz,QReset
|
||||||
|
call print ; Report action
|
||||||
|
db ' Rese','t'+80h
|
||||||
|
QReset: call cpmver ; CP/M Plus?
|
||||||
|
jr nc,reset0 ; Yes
|
||||||
|
ld c,48
|
||||||
|
call bdos ; ZRDOS or CP/M?
|
||||||
|
ld a,h
|
||||||
|
or a
|
||||||
|
jr nz,reset0 ; No, assume bug-free F37
|
||||||
|
ld de,0ffffh ; Yes, reset ALL drives, both ways
|
||||||
|
ld c,37
|
||||||
|
call bdos
|
||||||
|
ld c,13
|
||||||
|
jp bdos ; Yes, do regular reset
|
||||||
|
|
||||||
|
; Reset individual drive(s)
|
||||||
|
|
||||||
|
reset0: call dirchek ; Abort with error if illegal drivespec
|
||||||
|
ld a,(fcb1) ; Use default drive?
|
||||||
|
or a
|
||||||
|
jr nz,reset1 ; No, use drive from FCB1
|
||||||
|
ld a,(cdrv) ; Yes, get ZCPR 3.3 current drive byte
|
||||||
|
inc a ; Shift range to 1..16
|
||||||
|
reset1: ld hl,1 ; Map drive "A:"
|
||||||
|
reset2: dec a ; Done yet?
|
||||||
|
jr z,reset3 ; Yes
|
||||||
|
add hl,hl ; No, shift vector to next drive
|
||||||
|
jr reset2
|
||||||
|
|
||||||
|
; Check for fixed disks
|
||||||
|
|
||||||
|
reset3: push hl ; Save current or specified vector
|
||||||
|
ld c,39
|
||||||
|
call bdos ; ZSDOS return fixed disks in HL
|
||||||
|
pop de ; Restore vector
|
||||||
|
ld a,d
|
||||||
|
or h ; Add any fixed disks
|
||||||
|
ld d,a
|
||||||
|
ld a,e
|
||||||
|
or l
|
||||||
|
ld e,a
|
||||||
|
ld c,37 ; Reset individual drive(s)
|
||||||
|
|
||||||
|
if spaceon and resetsp
|
||||||
|
call bdos
|
||||||
|
jp crspace ; Show space remaining (QUIET sensitive)
|
||||||
|
else
|
||||||
|
jp bdos ; Do reset and return
|
||||||
|
endif
|
||||||
|
|
||||||
|
; End RCPR.LIB
|
||||||
|
|
||||||
165
Source/BPBIOS/Z34RCP11/rcpreg.lib
Normal file
165
Source/BPBIOS/Z34RCP11/rcpreg.lib
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPREG for Z34RCP
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: August 11, 1989
|
||||||
|
; Changes: Register Set, Decrement, and Increment commands now respond
|
||||||
|
; dynamically to QUIET flag, eliminating "noise."
|
||||||
|
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: REG
|
||||||
|
; Function: Manipulate Memory Registers
|
||||||
|
;
|
||||||
|
; Forms:
|
||||||
|
; REG D or REG <-- Display 10 Register Values
|
||||||
|
; REG Mreg <-- Decrement Register Value
|
||||||
|
; REG Preg <-- Increment Register Value
|
||||||
|
; REG Sreg value <-- Set Register Value
|
||||||
|
;
|
||||||
|
; Vers 2.1 Joe Wright
|
||||||
|
;
|
||||||
|
; REG reg <-- Display a single register value
|
||||||
|
;
|
||||||
|
; REG numbers now range from 0 to 31, although only the first ten are
|
||||||
|
; displayed with REG D.
|
||||||
|
;
|
||||||
|
; REG now treats the program error byte as register E.
|
||||||
|
;
|
||||||
|
register:
|
||||||
|
ld de,fcb1+2 ; Pt to first arg
|
||||||
|
ld a,(de) ; Get possible digit
|
||||||
|
call regptr ; Pt hl to potential register
|
||||||
|
dec de ; Point to command
|
||||||
|
ld a,(de)
|
||||||
|
cp 'S' ; Set?
|
||||||
|
jr z,rset
|
||||||
|
cp 'P' ; Plus?
|
||||||
|
jr z,rinc
|
||||||
|
cp 'M' ; Minus?
|
||||||
|
jr z,rdec
|
||||||
|
cp ' '
|
||||||
|
jr z,rshow
|
||||||
|
cp 'D'
|
||||||
|
jr z,rshow
|
||||||
|
call regptr
|
||||||
|
jp regout
|
||||||
|
|
||||||
|
; Increment register value
|
||||||
|
; HL pts to memory register on input
|
||||||
|
|
||||||
|
rinc: inc (hl) ; Increment it
|
||||||
|
jr Qregout ; Print result
|
||||||
|
|
||||||
|
; Decrement register value
|
||||||
|
; HL pts to memory register on input
|
||||||
|
|
||||||
|
rdec: dec (hl) ; Decrement value
|
||||||
|
jr Qregout ; Print result
|
||||||
|
|
||||||
|
; Show first ten registers and Program Error byte
|
||||||
|
|
||||||
|
rshow: call rshow10
|
||||||
|
ld hl,z3msg+6
|
||||||
|
jp regout
|
||||||
|
|
||||||
|
rshow10:xor a ; Select register 0
|
||||||
|
ld b,a ; Counter set to 0 in b
|
||||||
|
call regp1 ; Hl pts to register 0
|
||||||
|
rshow1: ld a,b ; Get counter value
|
||||||
|
cp 10 ; First ten registers
|
||||||
|
ret z ; Exit if done
|
||||||
|
push bc ; Save counter
|
||||||
|
push hl ; Save pointer
|
||||||
|
call regout ; Print register value
|
||||||
|
pop hl ; Get pointer
|
||||||
|
pop bc ; Get counter
|
||||||
|
inc b ; Increment counter
|
||||||
|
ld a,b ; Check for new line
|
||||||
|
and 3
|
||||||
|
call z,crlf ; Newline after fourth display
|
||||||
|
inc hl ; Pt to next register
|
||||||
|
jr rshow1
|
||||||
|
|
||||||
|
; Set register value
|
||||||
|
; HL pts to register on input
|
||||||
|
|
||||||
|
rset:
|
||||||
|
ld de,fcb2+1 ; Pt to value
|
||||||
|
call de2bin ; Eval string at de to binary in b
|
||||||
|
ld (hl),b ; Set value
|
||||||
|
|
||||||
|
; Enter with HL pointing to the register. HL is maintained.
|
||||||
|
;
|
||||||
|
qregout:ld a,(quiet)
|
||||||
|
or a
|
||||||
|
ret nz
|
||||||
|
regout: call print
|
||||||
|
db ' Reg',' '+80h
|
||||||
|
ld de,z3msg+30h ; Register 0
|
||||||
|
sbc hl,de ; Register number in hl
|
||||||
|
ld a,l
|
||||||
|
cp 32 ; A numbered register?
|
||||||
|
jr c,rego0 ; Yep
|
||||||
|
call print
|
||||||
|
db ' ','E'+80h
|
||||||
|
jr rego1 ; Report
|
||||||
|
|
||||||
|
rego0: push hl
|
||||||
|
push de
|
||||||
|
ld b,0 ; Suppress zeros
|
||||||
|
call decdsp2 ; Report register number
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
rego1: add hl,de ; Hl points to register again
|
||||||
|
call print
|
||||||
|
db ' =',' '+80h
|
||||||
|
ld l,(hl)
|
||||||
|
xor a
|
||||||
|
ld h,a
|
||||||
|
ld b,a ; Suppress leading zeros
|
||||||
|
jp decdsp3 ; Display value
|
||||||
|
|
||||||
|
; Evaluate decimal string at DE to binary in B
|
||||||
|
|
||||||
|
de2bin: ld b,0 ; Init value to zero
|
||||||
|
de2b: ld a,(de) ; Get this digit
|
||||||
|
inc de ; Pt to next
|
||||||
|
sub '0' ; Convert to binary
|
||||||
|
ret c ; A space, finished
|
||||||
|
cp 10 ; Range?
|
||||||
|
ret nc ; Not decimal, finished
|
||||||
|
ld c,a ; Digit in c
|
||||||
|
ld a,b ; Multiply old by 10
|
||||||
|
add a,a ; *2
|
||||||
|
add a,a ; *4
|
||||||
|
add a,b ; *5
|
||||||
|
add a,a ; *10
|
||||||
|
add a,c ; Add in new digit
|
||||||
|
ld b,a ; Result in b
|
||||||
|
jr de2b ; Again
|
||||||
|
|
||||||
|
; Set HL to point to memory register whose index is pted to by HL
|
||||||
|
; On input, A contains register char
|
||||||
|
; On output, HL = address of memory register (reg 0 assumed if error)
|
||||||
|
|
||||||
|
regptr: ld hl,z3msg+6 ; The e register
|
||||||
|
cp 'E'
|
||||||
|
ret z
|
||||||
|
push de
|
||||||
|
call de2bin ; Get register number in b
|
||||||
|
pop de
|
||||||
|
ld a,b
|
||||||
|
cp 32 ; Range 0-31
|
||||||
|
ld a,0
|
||||||
|
jr nc,regp1 ; Out of range, use 0
|
||||||
|
ld a,b ; Value in a
|
||||||
|
regp1: ld hl,z3msg+30h ; Pt to memory registers
|
||||||
|
add a,l ; Pt to proper register
|
||||||
|
ld l,a
|
||||||
|
ret ; No chance of crossing page boundary
|
||||||
|
|
||||||
|
; End RCPREG.LIB
|
||||||
|
|
||||||
100
Source/BPBIOS/Z34RCP11/rcpren.lib
Normal file
100
Source/BPBIOS/Z34RCP11/rcpren.lib
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPREN for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: REN
|
||||||
|
; Function: To change the name of an existing file
|
||||||
|
; Forms:
|
||||||
|
; LEFTRIGHT false:
|
||||||
|
; REN <New [du: or dir:]ufn>=<Old [du: or dir:]ufn>
|
||||||
|
; LEFTRIGHT true:
|
||||||
|
; REN <Old [du: or dir:]ufn> <New [du: or dir:]ufn>
|
||||||
|
; LEFTRIGHT and TESTEQ both true:
|
||||||
|
; Either of the above forms may be used.
|
||||||
|
|
||||||
|
ren:
|
||||||
|
call retsave
|
||||||
|
call dirchek ; Test bad dirspec
|
||||||
|
|
||||||
|
if leftright
|
||||||
|
call fcbswap ; Exchange command line fcb's
|
||||||
|
endif
|
||||||
|
;
|
||||||
|
; STEP 1: See if old name is ambiguous
|
||||||
|
;
|
||||||
|
ld hl,fcb2+1 ; Can't be ambiguous
|
||||||
|
call ambchk1
|
||||||
|
;
|
||||||
|
; STEP 2: Log into user area
|
||||||
|
;
|
||||||
|
; If dirspec given at old name, use it
|
||||||
|
; else use dirspec (or default) given at new name.
|
||||||
|
|
||||||
|
ld hl,fcb1 ; Pt to new name
|
||||||
|
push hl
|
||||||
|
ld de,fcb2 ; Pt to old name
|
||||||
|
push de ; Save ptr
|
||||||
|
ld a,(de) ; Test if dirspec issued
|
||||||
|
or a ; ..at old name
|
||||||
|
jr z,ren1 ; No, use user at new name
|
||||||
|
ld (hl),a ; Stuff drive into new file
|
||||||
|
ld a,(fcb2+13) ; Yes, log to user area
|
||||||
|
call setusr ; ..of old name
|
||||||
|
jr ren2
|
||||||
|
;
|
||||||
|
; Use dirspec at new name (none given at old name)
|
||||||
|
;
|
||||||
|
ren1:
|
||||||
|
ld a,(hl) ; Stuff drive of new name
|
||||||
|
ld (de),a ; ..into old name
|
||||||
|
call logusr ; Log to user at new name
|
||||||
|
ren2:
|
||||||
|
;
|
||||||
|
; STEP 3: See if old file is R/O
|
||||||
|
;
|
||||||
|
pop de ; Restore ptr to old FCB
|
||||||
|
push de ; Save it again
|
||||||
|
ld c,17 ; Look for old file
|
||||||
|
call bdos
|
||||||
|
inc a
|
||||||
|
jr z,rnxit
|
||||||
|
call getsbit ; Match found, get ptr to entry in tbuff
|
||||||
|
ex de,hl ; Hl pts to entry
|
||||||
|
inc hl ; Pt to fn
|
||||||
|
call rotest ; See if file is r/o
|
||||||
|
jr nz,rnxit1 ; Abort if so
|
||||||
|
;
|
||||||
|
; STEP 4: See if new file already exists
|
||||||
|
; EXTEST performs a number of checks:
|
||||||
|
; 1) Ambiguity
|
||||||
|
; 2) R/O
|
||||||
|
; 3) If file exists and not R/O, permission to delete
|
||||||
|
;
|
||||||
|
call extest
|
||||||
|
jr z,rnxit1 ; R/o or no permission
|
||||||
|
;
|
||||||
|
; STEP 5: Exchange file name fields for rename
|
||||||
|
;
|
||||||
|
pop de ; Pt to old
|
||||||
|
pop hl ; Pt to new
|
||||||
|
push hl ; Save ptr
|
||||||
|
ld b,12 ; 12 bytes
|
||||||
|
call iswap1
|
||||||
|
;
|
||||||
|
; STEP 6: Rename the file
|
||||||
|
;
|
||||||
|
pop de ; Get ptr to FCB
|
||||||
|
ld c,23 ; Rename
|
||||||
|
call bdos
|
||||||
|
inc a ; Set zero flag if error
|
||||||
|
rnxit:
|
||||||
|
jp z,noflerr ; EH print no source file message
|
||||||
|
rnxit1:
|
||||||
|
jp exit
|
||||||
|
|
||||||
|
; End RCPREN.LIB
|
||||||
|
|
||||||
|
|
||||||
163
Source/BPBIOS/Z34RCP11/rcpsp.lib
Normal file
163
Source/BPBIOS/Z34RCP11/rcpsp.lib
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPSP for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.2
|
||||||
|
; Date: August 11, 1989
|
||||||
|
; Changes: CRSPACE does nothing if QUIET is true.
|
||||||
|
;
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: December 30, 1988
|
||||||
|
; Changes: Calls CPMVER common routine.
|
||||||
|
; Sets DMA to TBUFF for CP/M Plus in case we chained to SP.
|
||||||
|
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: SP
|
||||||
|
; Function: Shows space remaining on designated drive
|
||||||
|
; Syntax: SP [DIR:|DU:]
|
||||||
|
; Comments: This code can be called by several other RCP commands so that
|
||||||
|
; they can show the space remaining on the disk after their
|
||||||
|
; operation.
|
||||||
|
|
||||||
|
; Now works with CP/M Plus.
|
||||||
|
|
||||||
|
if [erasp or cpsp or dirsp]
|
||||||
|
crspace: ; Used to call space after other subroutines
|
||||||
|
ld a,(quiet)
|
||||||
|
or a ; Skip if we're being quiet
|
||||||
|
ret nz
|
||||||
|
call crlf ; Start new line
|
||||||
|
jr space0 ; Skip directory check
|
||||||
|
endif ;[erasp or cpsp or dirsp]
|
||||||
|
space:
|
||||||
|
call dirchek ; Abort to EH on bad dirspec
|
||||||
|
space0: ld a,(fcb1) ; Determine requested drive
|
||||||
|
or a ; If drive explicitly selected
|
||||||
|
jr nz,space1 ; ..then skip
|
||||||
|
ld a,(cdrv) ; Get current drive from ZCPR 3.4
|
||||||
|
inc a ; Shift to range 1..16
|
||||||
|
|
||||||
|
space1:
|
||||||
|
dec a ; Shift to range 0..15
|
||||||
|
ld e,a ; Save in E for selecting disk below
|
||||||
|
add a,'A' ; Convert to letter and
|
||||||
|
ld (seldrv),a ; save in message string below
|
||||||
|
ld c,14 ; BDOS select disk function
|
||||||
|
call bdos ; Not needed if no drive selected, but smallest
|
||||||
|
; ..possible code size this way.
|
||||||
|
|
||||||
|
; Here we extract the following disk parameter information from the disk
|
||||||
|
; parameter block (DPB):
|
||||||
|
; BLKSHF: block shift factor (1 byte)
|
||||||
|
; BLKMAX: max number of blocks on disk (2 bytes)
|
||||||
|
|
||||||
|
call cpmver ; What BDOS is running?
|
||||||
|
jr nc,isplus
|
||||||
|
ld c,31 ; BDOS get disk parameters function
|
||||||
|
call bdos
|
||||||
|
inc hl ; Advance to block shift factor byte
|
||||||
|
inc hl
|
||||||
|
ld a,(hl) ; Get value and
|
||||||
|
ld (blkshf),a ; ..save it in code below
|
||||||
|
inc hl ; Advance to max block number word
|
||||||
|
inc hl
|
||||||
|
inc hl
|
||||||
|
ld e,(hl) ; Get value into HL
|
||||||
|
inc hl
|
||||||
|
ld d,(hl)
|
||||||
|
inc de ; Add 1 for max number of blocks
|
||||||
|
|
||||||
|
; Compute amount of free space left on disk
|
||||||
|
|
||||||
|
dfree:
|
||||||
|
ld c,27 ; BDOS get allocation vector function
|
||||||
|
push de ; Save BLKMAX value
|
||||||
|
call bdos ; Get allocation vector into HL
|
||||||
|
ld b,h ; Copy allocation vector to BC
|
||||||
|
ld c,l
|
||||||
|
pop hl ; Restore BLKMAX value to HL
|
||||||
|
ld de,0 ; Inititialize count of free blocks
|
||||||
|
|
||||||
|
; At this point we have
|
||||||
|
; BC = allocation vector address
|
||||||
|
; DE = free block count
|
||||||
|
; HL = number of blocks on disk
|
||||||
|
|
||||||
|
free1: push bc ; Save allocation address
|
||||||
|
ld a,(bc) ; Get bit pattern of allocation byte
|
||||||
|
ld b,8 ; Set to process 8 blocks
|
||||||
|
free2: rla ; Rotate allocated block bit into carry flag
|
||||||
|
jr c,free3 ; If set (bit=1), block is allocated
|
||||||
|
inc de ; If not set, block is not allocated, so
|
||||||
|
; ..increment free block count
|
||||||
|
free3: ld c,a ; Save remaining allocation bits in C
|
||||||
|
dec hl ; Count down number of blocks on disk
|
||||||
|
ld a,l ; See if we are down to zero
|
||||||
|
or h
|
||||||
|
jr z,free4 ; Branch if no more blocks to check
|
||||||
|
ld a,c ; Get back current allocation bit pattern
|
||||||
|
djnz free2 ; Loop through 8 bits
|
||||||
|
pop bc ; Get pointer to allocation vector
|
||||||
|
inc bc ; Point to next allocation byte
|
||||||
|
jr free1 ; Continue by processing next allocation byte
|
||||||
|
|
||||||
|
free4: pop bc ; Clean up stack
|
||||||
|
ex de,hl ; Free block count to HL
|
||||||
|
blkshf equ $+1 ; Pointer for in-the-code modification
|
||||||
|
ld a,0 ; Get block shift factor
|
||||||
|
sub 3 ; Convert to log base 2 of K per block
|
||||||
|
jr z,free6 ; Done if single density (1k per block)
|
||||||
|
|
||||||
|
; Convert for blocks of more than 1K each
|
||||||
|
|
||||||
|
free5: add hl,hl
|
||||||
|
dec a
|
||||||
|
jr nz,free5
|
||||||
|
|
||||||
|
; At this point HL = amount of free space on disk in K
|
||||||
|
|
||||||
|
; Display decimal value of HL
|
||||||
|
|
||||||
|
free6: ld b,0 ; Initialize count of digits already printed
|
||||||
|
ld de,10000 ; Divisor in DE
|
||||||
|
call decdsp ; Print digit (or space if leading '0')
|
||||||
|
ld de,1000
|
||||||
|
call decdsp
|
||||||
|
call decdsp3 ; Display hundreds, tens, and units
|
||||||
|
|
||||||
|
call print
|
||||||
|
db 'k free on '
|
||||||
|
seldrv: db 0 ; Modified above to contain drive letter
|
||||||
|
db ':'+80h
|
||||||
|
ret
|
||||||
|
|
||||||
|
; CP/M Plus free space calculation
|
||||||
|
|
||||||
|
isplus: ld de,tbuff ; We may have chained to SP
|
||||||
|
call setdma
|
||||||
|
ld a,(seldrv) ; Get drive letter
|
||||||
|
sub 'A' ; Convert to BDOS call value
|
||||||
|
ld e,a
|
||||||
|
ld c,2eh ; Get free space call
|
||||||
|
call bdos
|
||||||
|
|
||||||
|
; Convert 3 byte count of records to K
|
||||||
|
|
||||||
|
ld b,3 ; Total amount to shift
|
||||||
|
c3fre1: ld hl,tbuff+2 ; Point to buffer start
|
||||||
|
rr (hl)
|
||||||
|
dec hl
|
||||||
|
rr (hl)
|
||||||
|
dec hl
|
||||||
|
rr (hl)
|
||||||
|
djnz c3fre1
|
||||||
|
ld hl,(tbuff) ; Get free mod 65536k
|
||||||
|
jr free6
|
||||||
|
|
||||||
|
; End RCPSP.LIB
|
||||||
|
|
||||||
|
|
||||||
1057
Source/BPBIOS/Z34RCP11/rcpsubs.lib
Normal file
1057
Source/BPBIOS/Z34RCP11/rcpsubs.lib
Normal file
File diff suppressed because it is too large
Load Diff
54
Source/BPBIOS/Z34RCP11/rcpwhl.lib
Normal file
54
Source/BPBIOS/Z34RCP11/rcpwhl.lib
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
page
|
||||||
|
|
||||||
|
; Library: RCPWHL for Z34RCP
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Version: 1.0
|
||||||
|
; Date: June 15, 1988
|
||||||
|
;
|
||||||
|
; Command: WHL
|
||||||
|
; Function: Set the Wheel Byte on or off
|
||||||
|
; Comments:
|
||||||
|
;
|
||||||
|
; If WHLQUIET equate is true, then RCP does not report wheel status with WHL
|
||||||
|
; command.
|
||||||
|
;
|
||||||
|
; Forms:
|
||||||
|
; WHL -- Report Wheel Status
|
||||||
|
; WHL password -- Set Wheel ON if password is correct
|
||||||
|
; -- Set Wheel OFF if password incorrect
|
||||||
|
whl: ld hl,fcb1+1 ; Pt to first char
|
||||||
|
ld a,(hl) ; Get it
|
||||||
|
cp ' '
|
||||||
|
jr z,whlmsg ; Report wheel status if no password
|
||||||
|
ld de,whlpass
|
||||||
|
ld b,8 ; Check 8 chars
|
||||||
|
call comp ; Compare
|
||||||
|
jr nz,whloff ; Set wheel off if incorrect password
|
||||||
|
|
||||||
|
; Turn ON wheel byte
|
||||||
|
|
||||||
|
ld a,0ffh ; Turn on wheel byte
|
||||||
|
jr whlset
|
||||||
|
|
||||||
|
; Turn OFF wheel byte
|
||||||
|
|
||||||
|
whloff: xor a ; Turn off wheel byte
|
||||||
|
whlset: ld hl,(z3whl) ; Get wheel address from ENV
|
||||||
|
ld (hl),a ; Set wheel byte
|
||||||
|
|
||||||
|
if whlquiet
|
||||||
|
ret ; No report if WHLQUIET
|
||||||
|
endif
|
||||||
|
|
||||||
|
; Print Wheel Byte Message
|
||||||
|
|
||||||
|
whlmsg: call getwhl
|
||||||
|
jp tella ; Say " On" or " Off"
|
||||||
|
|
||||||
|
; Wheel password defined from SYSRCP.LIB file
|
||||||
|
|
||||||
|
db 'Z'-'@' ; Leading ^Z to block attempt to type RCP file
|
||||||
|
whlpass:wpass ; Use macro
|
||||||
|
|
||||||
|
; End RCPWHL.LIB
|
||||||
|
|
||||||
BIN
Source/BPBIOS/Z34RCP11/sysdef.lib
Normal file
BIN
Source/BPBIOS/Z34RCP11/sysdef.lib
Normal file
Binary file not shown.
105
Source/BPBIOS/Z34RCP11/z34cmn.lib
Normal file
105
Source/BPBIOS/Z34RCP11/z34cmn.lib
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
;
|
||||||
|
; Library: Z34CMN.LIB
|
||||||
|
; Author: Carson Wilson <crw>
|
||||||
|
; Version: 1.2
|
||||||
|
; Date: 16 June 1988
|
||||||
|
; Changes: Renamed CRT0 to LINS for NZCOM compatibility.
|
||||||
|
; Added CUSR " " "
|
||||||
|
|
||||||
|
; Author: Carson Wilson <crw>
|
||||||
|
; Version: 1.1
|
||||||
|
; Date: 12 June 1988
|
||||||
|
; Changes: Added CDRV for various Z34RCP commands.
|
||||||
|
; Added CRT0 for Z34RCP TYPE command.
|
||||||
|
; Added Z3TCAP and CLRSCR for Z34RCP CLS command.
|
||||||
|
; Added QUIET for ZCPR34 time in prompt.
|
||||||
|
; Added RSDMSG for ZCPR34 time in prompt.
|
||||||
|
|
||||||
|
; Library: Z34CMN.LIB
|
||||||
|
; Author: Joe Wright
|
||||||
|
; Date: 23 March 1988
|
||||||
|
|
||||||
|
; As a replacement for Z3BASE.LIB, some usual equates.
|
||||||
|
|
||||||
|
base equ 0 ; Base Page
|
||||||
|
|
||||||
|
false equ 0
|
||||||
|
true equ not false
|
||||||
|
|
||||||
|
no equ false
|
||||||
|
yes equ true
|
||||||
|
|
||||||
|
off equ false
|
||||||
|
on equ true
|
||||||
|
|
||||||
|
; Named COMMON declarations start here. For compatibility, these
|
||||||
|
; are the same names used by Bridger Mitchell's JetLDR.
|
||||||
|
|
||||||
|
common /_ENV_/
|
||||||
|
z3env: ; Z3 Environment descriptor
|
||||||
|
z3envs equ yes ; There is one
|
||||||
|
|
||||||
|
expath equ z3env+9 ; Address of External Path
|
||||||
|
expaths equ 10 ; Maximum 10 elements for MPATH
|
||||||
|
|
||||||
|
rcp equ z3env+0ch ; Address of RCP
|
||||||
|
rcps equ yes ; Used as existence test, not size
|
||||||
|
|
||||||
|
fcp equ z3env+12h ; Address of FCB
|
||||||
|
fcps equ yes ; Used as existence test, not size
|
||||||
|
|
||||||
|
z3ndir equ z3env+15h ; Address of NDR
|
||||||
|
z3ndirs equ yes ; Used as existence test, not size
|
||||||
|
|
||||||
|
quiet equ z3env+28h ; Quiet flag address <crw>
|
||||||
|
|
||||||
|
z3whl equ z3env+29h ; Wheel byte address
|
||||||
|
z3whls equ yes ; There is a wheel
|
||||||
|
|
||||||
|
lins equ z3env+33h ; CRT text lines address <crw>
|
||||||
|
|
||||||
|
ccp equ z3env+3fh ; CCP entry
|
||||||
|
ccps equ z3env+41h ; Size
|
||||||
|
|
||||||
|
dos equ z3env+42h ; DOS entry (+6)
|
||||||
|
doss equ z3env+44h ; Size
|
||||||
|
|
||||||
|
bio equ z3env+45h ; BIO entry
|
||||||
|
|
||||||
|
z3tcap equ z3env+80h ; TCAP address <crw>
|
||||||
|
|
||||||
|
clrscr equ z3env+97h ; Clear screen string address <crw>
|
||||||
|
|
||||||
|
common /_SSTK_/
|
||||||
|
shstk: ; Top of Shell stack
|
||||||
|
shstks equ yes ; There is a shell stack
|
||||||
|
|
||||||
|
common /_MSG_/
|
||||||
|
z3msg: ; Message buffer
|
||||||
|
z3msgs equ yes ; There is one
|
||||||
|
|
||||||
|
cusr equ z3msg+2eh ; Current user
|
||||||
|
cdrv equ z3msg+2fh ; Current drive <crw>
|
||||||
|
|
||||||
|
rsdmsg equ z3msg+3ah ; Reserved bytes <crw>
|
||||||
|
|
||||||
|
common /_FCB_/
|
||||||
|
extfcb: ; External file control block
|
||||||
|
extfcbs equ yes ; There is one
|
||||||
|
|
||||||
|
common /_MCL_/
|
||||||
|
z3cl: ; Multiple command line
|
||||||
|
z3cls equ yes ; There is one
|
||||||
|
|
||||||
|
common /_XSTK_/
|
||||||
|
extstk: ; External stack
|
||||||
|
extstks equ yes ; There is one
|
||||||
|
|
||||||
|
common /_BIOS_/
|
||||||
|
bios:
|
||||||
|
|
||||||
|
cseg ; Select Code Segment
|
||||||
|
|
||||||
|
; End of Z34CMN.LIB
|
||||||
|
|
||||||
|
|
||||||
BIN
Source/BPBIOS/Z34RCP11/z34defn.lib
Normal file
BIN
Source/BPBIOS/Z34RCP11/z34defn.lib
Normal file
Binary file not shown.
122
Source/BPBIOS/Z34RCP11/z34mac.lib
Normal file
122
Source/BPBIOS/Z34RCP11/z34mac.lib
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
|
||||||
|
; Z33MAC.LIB : Macros for use with ZCPR33
|
||||||
|
|
||||||
|
; General purpose macros
|
||||||
|
|
||||||
|
putreg macro
|
||||||
|
push hl ; Save registers in order
|
||||||
|
push de
|
||||||
|
push bc
|
||||||
|
endm
|
||||||
|
|
||||||
|
getreg macro
|
||||||
|
pop bc ; Restore registers in order
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
endm
|
||||||
|
|
||||||
|
swap macro
|
||||||
|
rrca ; Exchange nibbles
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
endm
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; Macro for forming option bytes
|
||||||
|
|
||||||
|
; This macro generates a byte with bits corresponding to up to 8 option
|
||||||
|
; flags. The bits are filled in the order of the parameters and are right
|
||||||
|
; justified in the byte.
|
||||||
|
|
||||||
|
optflag macro f1,f2,f3,f4,f5,f6,f7,f8
|
||||||
|
|
||||||
|
flag defl 0 ;; initial value
|
||||||
|
|
||||||
|
irp temp,<f1,f2,f3,f4,f5,f6,f7,f8>
|
||||||
|
|
||||||
|
if not nul temp
|
||||||
|
flag defl flag shl 1
|
||||||
|
if temp
|
||||||
|
flag defl flag or 1
|
||||||
|
endif ;;temp
|
||||||
|
endif ;;not nul temp
|
||||||
|
|
||||||
|
endm ;; irp
|
||||||
|
|
||||||
|
defb low flag
|
||||||
|
|
||||||
|
endm ;; optflag
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command table entry definition macro
|
||||||
|
|
||||||
|
; Macro to form an entry for one command in the table. The first parameter is
|
||||||
|
; the name to be used for the command (no quotes); the second parameter is the
|
||||||
|
; flag that indicates whether or not the command is to be enabled; the third
|
||||||
|
; parameter is the wheel control flag; and the last parameter is the jump
|
||||||
|
; address to the code that carries out the command. The command names are
|
||||||
|
; automatically padded out to the correct length (they will be truncated and
|
||||||
|
; an error message will result if a command name is too long). The characters
|
||||||
|
; in the command name are automatically converted to upper case.
|
||||||
|
|
||||||
|
command macro cmdname,enableflag,wheelflag,address
|
||||||
|
|
||||||
|
if enableflag ;; Generate command only if enabled
|
||||||
|
|
||||||
|
whlmask defl wheelflag ;; Initialize variables
|
||||||
|
count defl cmdsize ;; Initialize to size of each command name
|
||||||
|
|
||||||
|
irpc char,cmdname ;; Repeat over letters in command name
|
||||||
|
|
||||||
|
count defl count - 1 ;; Count down characters in name
|
||||||
|
|
||||||
|
if [ count lt cmdsize ]
|
||||||
|
|
||||||
|
;; If character is lower case, convert to upper case
|
||||||
|
|
||||||
|
if [ '&char' ge 'a' ] and [ '&char' le 'z' ]
|
||||||
|
|
||||||
|
if whlmask
|
||||||
|
defb [ '&char' and 5fh ] + 80h
|
||||||
|
else ;;not whlmask
|
||||||
|
defb [ '&char' and 5fh ]
|
||||||
|
endif ;;whlmask
|
||||||
|
|
||||||
|
else ;;not lower case
|
||||||
|
|
||||||
|
if whlmask
|
||||||
|
defb '&char' + 80h ;; If controlled by wheel, set high bit
|
||||||
|
else ;;not whlmask
|
||||||
|
defb '&char' ;; If not restricted, leave high bit clear
|
||||||
|
endif ;;whlmask
|
||||||
|
|
||||||
|
endif ;;lower case
|
||||||
|
|
||||||
|
endif ;;[ count lt cmdsize ]
|
||||||
|
|
||||||
|
whlmask defl false ;; Turn off high-bit setting after first char
|
||||||
|
|
||||||
|
endm ;irpc
|
||||||
|
|
||||||
|
;; Pad command name with blanks
|
||||||
|
|
||||||
|
if [ count gt cmdsize ] ;; If we underflowed
|
||||||
|
*** Command name "&cmdname" is too long / truncated ***
|
||||||
|
else
|
||||||
|
rept count
|
||||||
|
defb ' '
|
||||||
|
endm
|
||||||
|
endif ;[ count gt cmdsize ]
|
||||||
|
|
||||||
|
dw address ;; Dispatch address for command
|
||||||
|
|
||||||
|
endif ;enable
|
||||||
|
|
||||||
|
endm ;command
|
||||||
|
|
||||||
|
; End Z33MAC.LIB
|
||||||
|
|
||||||
|
|
||||||
515
Source/BPBIOS/Z34RCP11/z34rcp.lib
Normal file
515
Source/BPBIOS/Z34RCP11/z34rcp.lib
Normal file
@@ -0,0 +1,515 @@
|
|||||||
|
|
||||||
|
; File: Z34RCP.LIB
|
||||||
|
; Description: Resident Command Package (RCP) for ZCPR34
|
||||||
|
; Version: 1.4
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: October 4, 1989
|
||||||
|
; Changes: Added PUSER0 equate suggested by Rob Friefeld.
|
||||||
|
;
|
||||||
|
; Version: 1.3
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: September 29, 1989
|
||||||
|
; Changes: Added CLED (Command Line Editor Shell) command options
|
||||||
|
; and equates.
|
||||||
|
;
|
||||||
|
; Version: 1.2
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: August 11, 1989
|
||||||
|
; Changes: Removed several "quiet" conditional assembly equates as
|
||||||
|
; we are now sensing the QUIET flag instead.
|
||||||
|
; Changed default of WHLQUIET to false.
|
||||||
|
;
|
||||||
|
; Version: 1.1
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: July 10, 1989
|
||||||
|
; Changes: Changed 'S' command name to 'SP'.
|
||||||
|
; Removed wheel protection from 'Q' command and set QQUIET
|
||||||
|
; on by default.
|
||||||
|
; Changed command order.
|
||||||
|
|
||||||
|
; Version: 1.0
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: June 15, 1988
|
||||||
|
|
||||||
|
; This is the configuration file for the ZCPR Version 3.4 resident command
|
||||||
|
; package. You should read through this file and set the equates according
|
||||||
|
; to the features you want to implement. Since most systems have a limited
|
||||||
|
; amount of space for the resident command package, it will probably be
|
||||||
|
; impossible to include all features.
|
||||||
|
|
||||||
|
; If you are using an SLR or equivalent assembler, you will be prompted
|
||||||
|
; at assembly time for which commands to include in the RCP.
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; A S S E M B L Y O P T I O N S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; SLR controls whether special pseudo-ops such as ".printx" and ".accept",
|
||||||
|
; and complex macros are used at assembly time. For SLR Systems or compatible
|
||||||
|
; macro assemblers, set this equate to true.
|
||||||
|
|
||||||
|
SLR equ false
|
||||||
|
|
||||||
|
; RCPTYPE is the final character of the RCP name in the H(elp) command,
|
||||||
|
; and determines the order in which commands are added.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
Y equ true
|
||||||
|
N equ false
|
||||||
|
H equ 'H'
|
||||||
|
F equ 'F'
|
||||||
|
|
||||||
|
.accept 'Enter "F" for floppy, "H" for fixed disk version: ',rcptype
|
||||||
|
else
|
||||||
|
rcptype equ 'H' ; Floppy disk version
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
; ZRL controls whether named common labels are used in the code. To create
|
||||||
|
; absolute code, modify RCPBASE.LIB to reflect your system's addresses, set
|
||||||
|
; ZRL to false and instruct your assembler to generate absolute code (either
|
||||||
|
; a .COM or .HEX file).
|
||||||
|
;
|
||||||
|
; To create a relocatable file for use with Bridger Mitchell's JetLDR or
|
||||||
|
; Joe Wright's NZCOM, you must use an assembler which recognizes named
|
||||||
|
; common blocks. If your assembler has this capability, set ZRL to true
|
||||||
|
; and instruct the assembler to generate relocatable (.REL) code.
|
||||||
|
|
||||||
|
ZRL equ true
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; M A C R O S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; SLR assemblers allow selection of options during assembly.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
.accept comment,option ; Prompt user for selection
|
||||||
|
endm
|
||||||
|
|
||||||
|
.printx
|
||||||
|
.printx Answer "Y" to include, "N" to exclude commands:
|
||||||
|
.printx
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
option equ default ; Use selections from file
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; R E S I D E N T C O M M A N D S S E L E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; Commands to include in the resident command package
|
||||||
|
|
||||||
|
; There are some interrelations between a number of the possible resident
|
||||||
|
; commands. Some are so close (LIST and TYPE) that a single equate controls
|
||||||
|
; both functions. Others like DIR and ERA share code (both display file
|
||||||
|
; listings). It is efficient to select or deselect them together.
|
||||||
|
|
||||||
|
; If you are using an SLR or compatible assembler, you will be prompted
|
||||||
|
; at assembly time for command selections. Otherwise, select commands to
|
||||||
|
; be included by setting each SELECT macro below to yes or no.
|
||||||
|
|
||||||
|
select CLEDON no 'CLED - command line editor shell? '
|
||||||
|
select CLSON yes 'CLS - clear screen? '
|
||||||
|
select RESON yes 'R - reset disk system? '
|
||||||
|
select SPACEON yes 'SP - show space remaining on disk? '
|
||||||
|
|
||||||
|
if RCPTYPE='F' ; Assemble in floppy order
|
||||||
|
select DIRON yes 'D - disk directory? '
|
||||||
|
select ERAON yes 'ERA - erase files? '
|
||||||
|
select ECHOON yes 'ECHO - send text to screen or printer? '
|
||||||
|
select RENON yes 'REN - rename files? '
|
||||||
|
select CPON yes 'CP - copy file? '
|
||||||
|
select LTON yes 'TYPE - display file on console? '
|
||||||
|
select POKEON yes 'POKE - set memory? '
|
||||||
|
select PEEKON yes 'PEEK - view memory? '
|
||||||
|
else ; Assemble in fixed-disk order
|
||||||
|
select ECHOON yes 'ECHO - send text to screen or printer? '
|
||||||
|
select POKEON yes 'POKE - set memory? '
|
||||||
|
select PEEKON yes 'PEEK - view memory? '
|
||||||
|
select QUIETON yes 'Q - set or clear quiet status? '
|
||||||
|
select DIRON yes 'D - disk directory? '
|
||||||
|
select ERAON no 'ERA - erase files? '
|
||||||
|
select RENON no 'REN - rename files? '
|
||||||
|
select CPON no 'CP - copy file? '
|
||||||
|
select LTON yes 'TYPE - display file on console? '
|
||||||
|
endif ; RCPTYPE='F'
|
||||||
|
|
||||||
|
if LTON
|
||||||
|
select LISTON no 'LIST - list to printer? '
|
||||||
|
else ; allowed only if TYPE is enabled
|
||||||
|
LISTON equ no
|
||||||
|
endif
|
||||||
|
|
||||||
|
if RCPTYPE='F' ; Assemble in floppy order
|
||||||
|
select QUIETON yes 'Q - set or clear quiet status? '
|
||||||
|
endif
|
||||||
|
|
||||||
|
select PROTON no 'PROT - set file attributes? '
|
||||||
|
select NOTEON no 'NOTE - command-line comment? '
|
||||||
|
select REGON no 'REG - set and display user registers? '
|
||||||
|
select WHLON no 'WHL - set or clear wheel status? '
|
||||||
|
select PORTON no 'PORT - view and set I/O ports? '
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; W H E E L P R O T E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; To prevent unauthorized users from performing certain dangerous or sensitive
|
||||||
|
; operations on the computer, ZCPR34 provides the capability of disabling the
|
||||||
|
; operation of certain commands when the wheel byte is off. In ZCPR30, an
|
||||||
|
; attempt to use one of these wheel-protected commands when the wheel byte was
|
||||||
|
; off resulted in an error message. In ZCPR34 things work differently. In the
|
||||||
|
; same situation, the command simply disappears. In this way a transient
|
||||||
|
; program or extended command processor function can take over and deal with
|
||||||
|
; the attempt to use the command in a much more flexible way.
|
||||||
|
;
|
||||||
|
; Wheel-protected commands in ZCPR30 had extra code to intercept the function
|
||||||
|
; and disable it. In ZCPR34, wheel protection is enabled and disabled in a
|
||||||
|
; different way. To wheel-protect a command the high bit of the first
|
||||||
|
; character in the command name is set. The command table scanner in ZCPR34
|
||||||
|
; will not recognize these commands when the wheel byte is off. Since the same
|
||||||
|
; command scanner is used to scan the commands in the RCP and FCP (flow control
|
||||||
|
; package), commands there can be wheel protected in the same way. For skilled
|
||||||
|
; computer operators it is very easy to use a debugger, file patcher, or disk
|
||||||
|
; utility to enable and disable wheel protection without having to reassemble
|
||||||
|
; the CPR, RCP, or FCP.
|
||||||
|
;
|
||||||
|
; Because of the way the command scanner works, once wheel protection is
|
||||||
|
; implemented in the CCP, there is no further code penalty in protecting RCP
|
||||||
|
; commands. Therefore, we recommend protecting all possibly sensitive
|
||||||
|
; commands or none.
|
||||||
|
|
||||||
|
wcled equ no ; CLED
|
||||||
|
wcp equ yes ; CP
|
||||||
|
wdir equ no ; DIR
|
||||||
|
wera equ yes ; ERA
|
||||||
|
wlist equ yes ; LIST
|
||||||
|
wpeek equ yes ; PEEK
|
||||||
|
wpoke equ yes ; POKE
|
||||||
|
wport equ yes ; PORT
|
||||||
|
wprot equ yes ; PROT
|
||||||
|
wquiet equ no ; QUIET
|
||||||
|
wreg equ yes ; REG
|
||||||
|
wren equ yes ; REN
|
||||||
|
wspop equ yes ; SPOP
|
||||||
|
wtype equ yes ; TYPE
|
||||||
|
whrc equ no ; H
|
||||||
|
|
||||||
|
wheel defl wcp or wdir or wera or wlist or wpeek or wpoke or wport
|
||||||
|
wheel defl wheel or wprot or wreg or wren or wtype or whrc
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; C O M M A N D O P T I O N S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; Options affecting several commands
|
||||||
|
|
||||||
|
; DSORT includes code to sort file entries for the D, TYPE, LIST, ERA,
|
||||||
|
; and PROT commands.
|
||||||
|
|
||||||
|
dsort equ yes
|
||||||
|
|
||||||
|
; LEFTRIGHT affects the COPY and RENAME commands. If yes, add code to allow
|
||||||
|
; CP and REN operations work from left to right, and CP to accept a
|
||||||
|
; single filespec as its source.
|
||||||
|
; Examples:
|
||||||
|
; B0>ren b1:old.nam new.nam Renames B1:old.nam to B1:new.nam
|
||||||
|
; B0>cp a15:that.fil Copies A15:that.fil to B0:
|
||||||
|
; B0>cp source.fil dest.fil Copies source.fil to dest.fil
|
||||||
|
|
||||||
|
leftright equ yes
|
||||||
|
|
||||||
|
; If LEFTRIGHT is yes, setting TESTEQ to yes also allows CP and REN commands
|
||||||
|
; to be processed from right to left if they contain an equal sign ("=").
|
||||||
|
; Costs 11 bytes.
|
||||||
|
; Example:
|
||||||
|
; B0>cp dest.fil=source.fil Copies source.fil to dest.fil
|
||||||
|
|
||||||
|
testeq equ yes
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'CLS' command
|
||||||
|
|
||||||
|
; This command clears the console screen. It can either use a fixed string
|
||||||
|
; (for shorter code if the same terminal is always used) or use the TCAP
|
||||||
|
; entry for automatic adaptation to any terminal.
|
||||||
|
|
||||||
|
clstcap equ true ; Use TCAP for clear-screen string
|
||||||
|
|
||||||
|
; If CLSTCAP is not enabled, then the string below must be provided and
|
||||||
|
; it must end with a character with the high bit set
|
||||||
|
|
||||||
|
if not clstcap
|
||||||
|
clsstr macro
|
||||||
|
db 'Z'-'@'+80h ; Control-Z to clear screen
|
||||||
|
endm
|
||||||
|
endif ;not clstcap
|
||||||
|
|
||||||
|
typecls equ true ; Clear between screens when typing files
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'CP' command
|
||||||
|
|
||||||
|
; This command copies a single file. The destination file can have a different
|
||||||
|
; name from the source file. Set the size of the memory buffer in K below (do
|
||||||
|
; not change the second definition). The copy buffer is placed at the top of
|
||||||
|
; the TPA, where it will generally not interfere with subsequent use of the GO
|
||||||
|
; command to rerun a program loaded in the TPA.
|
||||||
|
|
||||||
|
cpblocks defl 16 ; Size of copy buffer in K
|
||||||
|
|
||||||
|
cpblocks defl cpblocks * 8 ; Convert to number of records
|
||||||
|
|
||||||
|
; If you will be using a BDOS or RSX which supports new functions 102 (Get
|
||||||
|
; Stamp) and 103 (Set Stamp), set STPCALL to true, and datestamps of files
|
||||||
|
; will be preserved across copies. The "last access" stamps of both copies
|
||||||
|
; are set to the time the copy took place if access stamping is enabled.
|
||||||
|
|
||||||
|
stpcall equ true ; Copy file stamps with functions 102/3
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'DIR' command
|
||||||
|
|
||||||
|
; This command displays a sorted listing of the files in a directory. The
|
||||||
|
; file name buffer is allocated at the top of the TPA so as not to modify
|
||||||
|
; any program loaded in low memory. Consequently, the size of the buffer
|
||||||
|
; must be set in advance.
|
||||||
|
|
||||||
|
|
||||||
|
maxdirs equ 256 ; Maximum number of names in directory buffer
|
||||||
|
|
||||||
|
nosys equ yes ; suppress 'A' and 'S' options if wheel off
|
||||||
|
|
||||||
|
slashchk equ yes ; allow "DIR /S" or "DIR /A" formats (costs
|
||||||
|
; about 12 bytes)
|
||||||
|
|
||||||
|
allflag equ 'A' ; Option character for showing
|
||||||
|
; all file (both SYS and DIR)
|
||||||
|
sysflag equ 'S' ; Option character for showing
|
||||||
|
; SYS files only
|
||||||
|
sortnt equ yes ; Sort file by name then type
|
||||||
|
wide equ yes ; Make display for 80-column screen
|
||||||
|
fence equ '|' ; Character to use as fence between columns
|
||||||
|
; ..if WIDE is false.
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'ECHO' command
|
||||||
|
|
||||||
|
; This command sends characters to the console or list device. If ECHOLST is
|
||||||
|
; enabled, then code is included for sending characters to the LST device.
|
||||||
|
; Characters normally go the the console device and are normally upper or lower
|
||||||
|
; case depending on the setting of UPCASE. The command line can have special
|
||||||
|
; command sequences to toggle the case of the output and to change the
|
||||||
|
; destination between the console and printer. Any other character following
|
||||||
|
; the command character will be sent as is. For the normal setting of the
|
||||||
|
; equates below (upcase/yes, cmdchar/%, prtchar/P, crtchar/C, lcasech/>,
|
||||||
|
; and ucasech/<) an example command line would be:
|
||||||
|
; A0:ROOT>ECHO T%>HIS IS A TEST^M^J^IDONE%PONE, TWO, %<THREE
|
||||||
|
; The following text would be echoed to the console (inlcuding carriage return,
|
||||||
|
; linefeed, and tab characters, '|' indicates the left margin):
|
||||||
|
; |This is a test
|
||||||
|
; | done
|
||||||
|
; The string "one, two, THREE" would be sent to the printer.
|
||||||
|
|
||||||
|
echolst equ yes ; Allow ECHO to LST device
|
||||||
|
|
||||||
|
upcase equ yes ; Initial case of output
|
||||||
|
|
||||||
|
cmdchar equ '%' ; Character to flag case change
|
||||||
|
|
||||||
|
prtchar equ 'P' ; Character to start sending output to
|
||||||
|
; the printer (must be upper case)
|
||||||
|
crtchar equ 'C' ; Character to start sending output to
|
||||||
|
; the CRT (must be upper case)
|
||||||
|
ucasechar equ '<' ; Character after CASECHAR that toggles
|
||||||
|
; subsequent output to upper case
|
||||||
|
lcasechar equ '>' ; Character after CASECHAR that toggles
|
||||||
|
; subsequent output to lower case
|
||||||
|
|
||||||
|
; ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'H' command
|
||||||
|
|
||||||
|
; This command displays a list of the resident commands implemented in the
|
||||||
|
; system. FCP, CPR, and RCP commands can be displayed. The basic command is
|
||||||
|
; not optional; it is always included.
|
||||||
|
|
||||||
|
listcpr equ yes ; Include list of CPR-resident commands in
|
||||||
|
; display (highly recommended)
|
||||||
|
|
||||||
|
listfcp equ yes ; Include list of FCP-resident commands in
|
||||||
|
; display (recommended if there is room)
|
||||||
|
|
||||||
|
noshow equ yes ; Suppress listing commands that are wheel-
|
||||||
|
; restricted unless wheel byte is set (i.e.,
|
||||||
|
; don't show commands that won't run)
|
||||||
|
|
||||||
|
cmdsline equ 5 ; Number of commands on each line of display
|
||||||
|
|
||||||
|
cmdspace equ 8 ; Space in display for each command name
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'LIST' and 'TYPE' commands
|
||||||
|
|
||||||
|
pgdflt equ yes ; Default to paging of console output
|
||||||
|
|
||||||
|
pgdflg equ 'P' ; Character to toggle paging status
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'PEEK' command
|
||||||
|
|
||||||
|
peekhdr equ yes ; Label columns in PEEK display
|
||||||
|
|
||||||
|
peekbdr equ yes ; Include line of hyphens under labels
|
||||||
|
|
||||||
|
peekchk equ yes ; If yes, the ending address will be tested to
|
||||||
|
; prevent overflow past FFFF (costs 5 bytes)
|
||||||
|
|
||||||
|
peeklen equ 127 ; Display 1 record (128 bytes) as default.
|
||||||
|
; PEEK displays in increments of 16 bytes.
|
||||||
|
; You may set PEEKLEN for 0 to 65525.
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'S' command
|
||||||
|
|
||||||
|
; Print disk space with other commands (recommended)
|
||||||
|
|
||||||
|
dirsp equ true ; Show space after DIR
|
||||||
|
erasp equ true ; Show space after ERA
|
||||||
|
cpsp equ true ; Show space after CP
|
||||||
|
resetsp equ true ; Show space after R
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'WHL' command
|
||||||
|
|
||||||
|
whlquiet equ false ; If true, don't report wheel state with
|
||||||
|
; .."WHL password" command (costs 1 byte)
|
||||||
|
|
||||||
|
wpass macro
|
||||||
|
db 'SYSTEM '
|
||||||
|
endm
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'CLED' command
|
||||||
|
;
|
||||||
|
; Command line editing takes place in the line buffer. It does not take up
|
||||||
|
; room in the RCP. The editor will handle a 255 byte line. Although that
|
||||||
|
; is larger than the maximum command line size, it allows you to edit a long
|
||||||
|
; line without deleting something first. The history is kept inside the RCP,
|
||||||
|
; so its size will depend upon how many other RCP commands are enabled.
|
||||||
|
; HISTSIZE should be at least as large as the multiple command line buffer
|
||||||
|
; (204 bytes).
|
||||||
|
|
||||||
|
lbufwid equ 255 ; Line buffer size, byte
|
||||||
|
histsize equ 204 ; History buffer size, word
|
||||||
|
|
||||||
|
; CLERA controls whether to null the internal history when CLED is exited, or
|
||||||
|
; to leave it for the next run. Secure systems will want to set it to YES.
|
||||||
|
|
||||||
|
clera equ no ; Erase history on terminating shell
|
||||||
|
|
||||||
|
; CLMIN sets the cutoff for discarding short lines from history recording.
|
||||||
|
; A setting of 3 would discard a command such as DIR.
|
||||||
|
|
||||||
|
clmin equ 5 ; Discard lines which do not exceed this
|
||||||
|
|
||||||
|
clins equ yes ; Initial insert state ON
|
||||||
|
clsav equ yes ; Initial history recording ON
|
||||||
|
|
||||||
|
; The appearance of the command line prompt may include the system time if a
|
||||||
|
; DateStamper or ZS/ZDDOS clock is implemented. The DU:DIR separator character
|
||||||
|
; can be changed to indicate that CLED is running.
|
||||||
|
|
||||||
|
dudir_sep equ '/' ; DU:DIR separator char
|
||||||
|
puser0 equ no ; Print user #0 in prompt
|
||||||
|
systime equ yes ; Include system time in prompt
|
||||||
|
|
||||||
|
if systime
|
||||||
|
civtim equ yes ; Yes for 12-hr civil time vs. 24-hr military
|
||||||
|
timesep equ '.' ; Separator between hours and minutes
|
||||||
|
endif
|
||||||
|
|
||||||
|
; The editor must use EREOL. The VLIB routine to send the EREOL sequence
|
||||||
|
; to the terminal needs to test for a video delay and the presence of the "/"
|
||||||
|
; quote character. Most terminals can just print the TCAP sequence as is. If
|
||||||
|
; that doesn't work, set ERLQUICK to NO. If you are using only one terminal,
|
||||||
|
; it will be most efficient to set ERLTCAP to NO and use the CLR_EOL macro.
|
||||||
|
|
||||||
|
erltcap equ yes ; Use TCAP routine vs macro
|
||||||
|
|
||||||
|
if erltcap
|
||||||
|
erlquick equ yes ; Use simplified TCAP routine
|
||||||
|
else
|
||||||
|
|
||||||
|
clr_eol macro ; Define terminal specific string
|
||||||
|
dc 1bh,'T' ; ...set high bit on last character
|
||||||
|
endm
|
||||||
|
|
||||||
|
endif ;erltcap
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command names
|
||||||
|
|
||||||
|
; The CTABLE macro, which constructs the command dispatch table, includes a
|
||||||
|
; line for each command, the first parameter of which is the name of the
|
||||||
|
; command. These names may be changed if you wish. But make sure that you
|
||||||
|
; do not use a name that is longer than the maximum allowed length. If you
|
||||||
|
; do, the name will be truncated and a nonfatal error will occur during
|
||||||
|
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower
|
||||||
|
; case letters will be converted to upper case. The macro COMMAND is defined
|
||||||
|
; in Z34MAC.LIB.
|
||||||
|
|
||||||
|
cmdsize equ 4 ; Length of each command name
|
||||||
|
|
||||||
|
cmdtbl macro
|
||||||
|
command CLED, cledon, wcled, cled
|
||||||
|
command CLS, clson, false, cls
|
||||||
|
command CP, cpon, wcp, copy
|
||||||
|
command D, diron, wdir, dir
|
||||||
|
command ECHO, echoon, false, echo
|
||||||
|
command ERA, eraon, wera, era
|
||||||
|
command H, true, whrc, clist
|
||||||
|
command LIST, liston, wlist, list
|
||||||
|
command NOTE, noteon, false, note
|
||||||
|
command P, peekon, wpeek, peek
|
||||||
|
command POKE, pokeon, wpoke, poke
|
||||||
|
command PORT, porton, wport, port
|
||||||
|
command PROT, proton, wprot, att
|
||||||
|
command Q, quieton,wquiet, quset
|
||||||
|
command R, reson, false, reset
|
||||||
|
command REG, regon, wreg, register
|
||||||
|
command REN, renon, wren, ren
|
||||||
|
command SP, spaceon,false, space
|
||||||
|
command SPOP, cledon, wspop, shpop
|
||||||
|
command TYPE, lton, wtype, type
|
||||||
|
command WHL, whlon, false, whl
|
||||||
|
endm
|
||||||
|
|
||||||
|
; END Z34RCP.LIB
|
||||||
|
|
||||||
515
Source/BPBIOS/Z34RCP11/z34rcp.lib.sav
Normal file
515
Source/BPBIOS/Z34RCP11/z34rcp.lib.sav
Normal file
@@ -0,0 +1,515 @@
|
|||||||
|
|
||||||
|
; File: Z34RCP.LIB
|
||||||
|
; Description: Resident Command Package (RCP) for ZCPR34
|
||||||
|
; Version: 1.4
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: October 4, 1989
|
||||||
|
; Changes: Added PUSER0 equate suggested by Rob Friefeld.
|
||||||
|
;
|
||||||
|
; Version: 1.3
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: September 29, 1989
|
||||||
|
; Changes: Added CLED (Command Line Editor Shell) command options
|
||||||
|
; and equates.
|
||||||
|
;
|
||||||
|
; Version: 1.2
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: August 11, 1989
|
||||||
|
; Changes: Removed several "quiet" conditional assembly equates as
|
||||||
|
; we are now sensing the QUIET flag instead.
|
||||||
|
; Changed default of WHLQUIET to false.
|
||||||
|
;
|
||||||
|
; Version: 1.1
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: July 10, 1989
|
||||||
|
; Changes: Changed 'S' command name to 'SP'.
|
||||||
|
; Removed wheel protection from 'Q' command and set QQUIET
|
||||||
|
; on by default.
|
||||||
|
; Changed command order.
|
||||||
|
|
||||||
|
; Version: 1.0
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: June 15, 1988
|
||||||
|
|
||||||
|
; This is the configuration file for the ZCPR Version 3.4 resident command
|
||||||
|
; package. You should read through this file and set the equates according
|
||||||
|
; to the features you want to implement. Since most systems have a limited
|
||||||
|
; amount of space for the resident command package, it will probably be
|
||||||
|
; impossible to include all features.
|
||||||
|
|
||||||
|
; If you are using an SLR or equivalent assembler, you will be prompted
|
||||||
|
; at assembly time for which commands to include in the RCP.
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; A S S E M B L Y O P T I O N S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; SLR controls whether special pseudo-ops such as ".printx" and ".accept",
|
||||||
|
; and complex macros are used at assembly time. For SLR Systems or compatible
|
||||||
|
; macro assemblers, set this equate to true.
|
||||||
|
|
||||||
|
SLR equ true
|
||||||
|
|
||||||
|
; RCPTYPE is the final character of the RCP name in the H(elp) command,
|
||||||
|
; and determines the order in which commands are added.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
Y equ true
|
||||||
|
N equ false
|
||||||
|
H equ 'H'
|
||||||
|
F equ 'F'
|
||||||
|
|
||||||
|
.accept 'Enter "F" for floppy, "H" for fixed disk version: ',rcptype
|
||||||
|
else
|
||||||
|
rcptype equ 'F' ; Floppy disk version
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
; ZRL controls whether named common labels are used in the code. To create
|
||||||
|
; absolute code, modify RCPBASE.LIB to reflect your system's addresses, set
|
||||||
|
; ZRL to false and instruct your assembler to generate absolute code (either
|
||||||
|
; a .COM or .HEX file).
|
||||||
|
;
|
||||||
|
; To create a relocatable file for use with Bridger Mitchell's JetLDR or
|
||||||
|
; Joe Wright's NZCOM, you must use an assembler which recognizes named
|
||||||
|
; common blocks. If your assembler has this capability, set ZRL to true
|
||||||
|
; and instruct the assembler to generate relocatable (.REL) code.
|
||||||
|
|
||||||
|
ZRL equ true
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; M A C R O S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; SLR assemblers allow selection of options during assembly.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
.accept comment,option ; Prompt user for selection
|
||||||
|
endm
|
||||||
|
|
||||||
|
.printx
|
||||||
|
.printx Answer "Y" to include, "N" to exclude commands:
|
||||||
|
.printx
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
select macro option default comment
|
||||||
|
option equ default ; Use selections from file
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; R E S I D E N T C O M M A N D S S E L E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; Commands to include in the resident command package
|
||||||
|
|
||||||
|
; There are some interrelations between a number of the possible resident
|
||||||
|
; commands. Some are so close (LIST and TYPE) that a single equate controls
|
||||||
|
; both functions. Others like DIR and ERA share code (both display file
|
||||||
|
; listings). It is efficient to select or deselect them together.
|
||||||
|
|
||||||
|
; If you are using an SLR or compatible assembler, you will be prompted
|
||||||
|
; at assembly time for command selections. Otherwise, select commands to
|
||||||
|
; be included by setting each SELECT macro below to yes or no.
|
||||||
|
|
||||||
|
select CLEDON no 'CLED - command line editor shell? '
|
||||||
|
select CLSON yes 'CLS - clear screen? '
|
||||||
|
select RESON yes 'R - reset disk system? '
|
||||||
|
select SPACEON yes 'SP - show space remaining on disk? '
|
||||||
|
|
||||||
|
if RCPTYPE='F' ; Assemble in floppy order
|
||||||
|
select DIRON yes 'D - disk directory? '
|
||||||
|
select ERAON yes 'ERA - erase files? '
|
||||||
|
select ECHOON yes 'ECHO - send text to screen or printer? '
|
||||||
|
select RENON yes 'REN - rename files? '
|
||||||
|
select CPON yes 'CP - copy file? '
|
||||||
|
select LTON yes 'TYPE - display file on console? '
|
||||||
|
select POKEON yes 'POKE - set memory? '
|
||||||
|
select PEEKON yes 'PEEK - view memory? '
|
||||||
|
else ; Assemble in fixed-disk order
|
||||||
|
select ECHOON yes 'ECHO - send text to screen or printer? '
|
||||||
|
select POKEON yes 'POKE - set memory? '
|
||||||
|
select PEEKON yes 'PEEK - view memory? '
|
||||||
|
select QUIETON yes 'Q - set or clear quiet status? '
|
||||||
|
select DIRON yes 'D - disk directory? '
|
||||||
|
select ERAON yes 'ERA - erase files? '
|
||||||
|
select RENON yes 'REN - rename files? '
|
||||||
|
select CPON yes 'CP - copy file? '
|
||||||
|
select LTON yes 'TYPE - display file on console? '
|
||||||
|
endif ; RCPTYPE='F'
|
||||||
|
|
||||||
|
if LTON
|
||||||
|
select LISTON no 'LIST - list to printer? '
|
||||||
|
else ; allowed only if TYPE is enabled
|
||||||
|
LISTON equ no
|
||||||
|
endif
|
||||||
|
|
||||||
|
if RCPTYPE='F' ; Assemble in floppy order
|
||||||
|
select QUIETON yes 'Q - set or clear quiet status? '
|
||||||
|
endif
|
||||||
|
|
||||||
|
select PROTON no 'PROT - set file attributes? '
|
||||||
|
select NOTEON no 'NOTE - command-line comment? '
|
||||||
|
select REGON no 'REG - set and display user registers? '
|
||||||
|
select WHLON no 'WHL - set or clear wheel status? '
|
||||||
|
select PORTON no 'PORT - view and set I/O ports? '
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; W H E E L P R O T E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; To prevent unauthorized users from performing certain dangerous or sensitive
|
||||||
|
; operations on the computer, ZCPR34 provides the capability of disabling the
|
||||||
|
; operation of certain commands when the wheel byte is off. In ZCPR30, an
|
||||||
|
; attempt to use one of these wheel-protected commands when the wheel byte was
|
||||||
|
; off resulted in an error message. In ZCPR34 things work differently. In the
|
||||||
|
; same situation, the command simply disappears. In this way a transient
|
||||||
|
; program or extended command processor function can take over and deal with
|
||||||
|
; the attempt to use the command in a much more flexible way.
|
||||||
|
;
|
||||||
|
; Wheel-protected commands in ZCPR30 had extra code to intercept the function
|
||||||
|
; and disable it. In ZCPR34, wheel protection is enabled and disabled in a
|
||||||
|
; different way. To wheel-protect a command the high bit of the first
|
||||||
|
; character in the command name is set. The command table scanner in ZCPR34
|
||||||
|
; will not recognize these commands when the wheel byte is off. Since the same
|
||||||
|
; command scanner is used to scan the commands in the RCP and FCP (flow control
|
||||||
|
; package), commands there can be wheel protected in the same way. For skilled
|
||||||
|
; computer operators it is very easy to use a debugger, file patcher, or disk
|
||||||
|
; utility to enable and disable wheel protection without having to reassemble
|
||||||
|
; the CPR, RCP, or FCP.
|
||||||
|
;
|
||||||
|
; Because of the way the command scanner works, once wheel protection is
|
||||||
|
; implemented in the CCP, there is no further code penalty in protecting RCP
|
||||||
|
; commands. Therefore, we recommend protecting all possibly sensitive
|
||||||
|
; commands or none.
|
||||||
|
|
||||||
|
wcled equ no ; CLED
|
||||||
|
wcp equ yes ; CP
|
||||||
|
wdir equ no ; DIR
|
||||||
|
wera equ yes ; ERA
|
||||||
|
wlist equ yes ; LIST
|
||||||
|
wpeek equ yes ; PEEK
|
||||||
|
wpoke equ yes ; POKE
|
||||||
|
wport equ yes ; PORT
|
||||||
|
wprot equ yes ; PROT
|
||||||
|
wquiet equ no ; QUIET
|
||||||
|
wreg equ yes ; REG
|
||||||
|
wren equ yes ; REN
|
||||||
|
wspop equ yes ; SPOP
|
||||||
|
wtype equ yes ; TYPE
|
||||||
|
whrc equ no ; H
|
||||||
|
|
||||||
|
wheel defl wcp or wdir or wera or wlist or wpeek or wpoke or wport
|
||||||
|
wheel defl wheel or wprot or wreg or wren or wtype or whrc
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; C O M M A N D O P T I O N S
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
; Options affecting several commands
|
||||||
|
|
||||||
|
; DSORT includes code to sort file entries for the D, TYPE, LIST, ERA,
|
||||||
|
; and PROT commands.
|
||||||
|
|
||||||
|
dsort equ yes
|
||||||
|
|
||||||
|
; LEFTRIGHT affects the COPY and RENAME commands. If yes, add code to allow
|
||||||
|
; CP and REN operations work from left to right, and CP to accept a
|
||||||
|
; single filespec as its source.
|
||||||
|
; Examples:
|
||||||
|
; B0>ren b1:old.nam new.nam Renames B1:old.nam to B1:new.nam
|
||||||
|
; B0>cp a15:that.fil Copies A15:that.fil to B0:
|
||||||
|
; B0>cp source.fil dest.fil Copies source.fil to dest.fil
|
||||||
|
|
||||||
|
leftright equ yes
|
||||||
|
|
||||||
|
; If LEFTRIGHT is yes, setting TESTEQ to yes also allows CP and REN commands
|
||||||
|
; to be processed from right to left if they contain an equal sign ("=").
|
||||||
|
; Costs 11 bytes.
|
||||||
|
; Example:
|
||||||
|
; B0>cp dest.fil=source.fil Copies source.fil to dest.fil
|
||||||
|
|
||||||
|
testeq equ yes
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'CLS' command
|
||||||
|
|
||||||
|
; This command clears the console screen. It can either use a fixed string
|
||||||
|
; (for shorter code if the same terminal is always used) or use the TCAP
|
||||||
|
; entry for automatic adaptation to any terminal.
|
||||||
|
|
||||||
|
clstcap equ true ; Use TCAP for clear-screen string
|
||||||
|
|
||||||
|
; If CLSTCAP is not enabled, then the string below must be provided and
|
||||||
|
; it must end with a character with the high bit set
|
||||||
|
|
||||||
|
if not clstcap
|
||||||
|
clsstr macro
|
||||||
|
db 'Z'-'@'+80h ; Control-Z to clear screen
|
||||||
|
endm
|
||||||
|
endif ;not clstcap
|
||||||
|
|
||||||
|
typecls equ true ; Clear between screens when typing files
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'CP' command
|
||||||
|
|
||||||
|
; This command copies a single file. The destination file can have a different
|
||||||
|
; name from the source file. Set the size of the memory buffer in K below (do
|
||||||
|
; not change the second definition). The copy buffer is placed at the top of
|
||||||
|
; the TPA, where it will generally not interfere with subsequent use of the GO
|
||||||
|
; command to rerun a program loaded in the TPA.
|
||||||
|
|
||||||
|
cpblocks defl 16 ; Size of copy buffer in K
|
||||||
|
|
||||||
|
cpblocks defl cpblocks * 8 ; Convert to number of records
|
||||||
|
|
||||||
|
; If you will be using a BDOS or RSX which supports new functions 102 (Get
|
||||||
|
; Stamp) and 103 (Set Stamp), set STPCALL to true, and datestamps of files
|
||||||
|
; will be preserved across copies. The "last access" stamps of both copies
|
||||||
|
; are set to the time the copy took place if access stamping is enabled.
|
||||||
|
|
||||||
|
stpcall equ true ; Copy file stamps with functions 102/3
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'DIR' command
|
||||||
|
|
||||||
|
; This command displays a sorted listing of the files in a directory. The
|
||||||
|
; file name buffer is allocated at the top of the TPA so as not to modify
|
||||||
|
; any program loaded in low memory. Consequently, the size of the buffer
|
||||||
|
; must be set in advance.
|
||||||
|
|
||||||
|
|
||||||
|
maxdirs equ 256 ; Maximum number of names in directory buffer
|
||||||
|
|
||||||
|
nosys equ yes ; suppress 'A' and 'S' options if wheel off
|
||||||
|
|
||||||
|
slashchk equ yes ; allow "DIR /S" or "DIR /A" formats (costs
|
||||||
|
; about 12 bytes)
|
||||||
|
|
||||||
|
allflag equ 'A' ; Option character for showing
|
||||||
|
; all file (both SYS and DIR)
|
||||||
|
sysflag equ 'S' ; Option character for showing
|
||||||
|
; SYS files only
|
||||||
|
sortnt equ yes ; Sort file by name then type
|
||||||
|
wide equ yes ; Make display for 80-column screen
|
||||||
|
fence equ '|' ; Character to use as fence between columns
|
||||||
|
; ..if WIDE is false.
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'ECHO' command
|
||||||
|
|
||||||
|
; This command sends characters to the console or list device. If ECHOLST is
|
||||||
|
; enabled, then code is included for sending characters to the LST device.
|
||||||
|
; Characters normally go the the console device and are normally upper or lower
|
||||||
|
; case depending on the setting of UPCASE. The command line can have special
|
||||||
|
; command sequences to toggle the case of the output and to change the
|
||||||
|
; destination between the console and printer. Any other character following
|
||||||
|
; the command character will be sent as is. For the normal setting of the
|
||||||
|
; equates below (upcase/yes, cmdchar/%, prtchar/P, crtchar/C, lcasech/>,
|
||||||
|
; and ucasech/<) an example command line would be:
|
||||||
|
; A0:ROOT>ECHO T%>HIS IS A TEST^M^J^IDONE%PONE, TWO, %<THREE
|
||||||
|
; The following text would be echoed to the console (inlcuding carriage return,
|
||||||
|
; linefeed, and tab characters, '|' indicates the left margin):
|
||||||
|
; |This is a test
|
||||||
|
; | done
|
||||||
|
; The string "one, two, THREE" would be sent to the printer.
|
||||||
|
|
||||||
|
echolst equ yes ; Allow ECHO to LST device
|
||||||
|
|
||||||
|
upcase equ yes ; Initial case of output
|
||||||
|
|
||||||
|
cmdchar equ '%' ; Character to flag case change
|
||||||
|
|
||||||
|
prtchar equ 'P' ; Character to start sending output to
|
||||||
|
; the printer (must be upper case)
|
||||||
|
crtchar equ 'C' ; Character to start sending output to
|
||||||
|
; the CRT (must be upper case)
|
||||||
|
ucasechar equ '<' ; Character after CASECHAR that toggles
|
||||||
|
; subsequent output to upper case
|
||||||
|
lcasechar equ '>' ; Character after CASECHAR that toggles
|
||||||
|
; subsequent output to lower case
|
||||||
|
|
||||||
|
; ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'H' command
|
||||||
|
|
||||||
|
; This command displays a list of the resident commands implemented in the
|
||||||
|
; system. FCP, CPR, and RCP commands can be displayed. The basic command is
|
||||||
|
; not optional; it is always included.
|
||||||
|
|
||||||
|
listcpr equ yes ; Include list of CPR-resident commands in
|
||||||
|
; display (highly recommended)
|
||||||
|
|
||||||
|
listfcp equ yes ; Include list of FCP-resident commands in
|
||||||
|
; display (recommended if there is room)
|
||||||
|
|
||||||
|
noshow equ yes ; Suppress listing commands that are wheel-
|
||||||
|
; restricted unless wheel byte is set (i.e.,
|
||||||
|
; don't show commands that won't run)
|
||||||
|
|
||||||
|
cmdsline equ 5 ; Number of commands on each line of display
|
||||||
|
|
||||||
|
cmdspace equ 8 ; Space in display for each command name
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; 'LIST' and 'TYPE' commands
|
||||||
|
|
||||||
|
pgdflt equ yes ; Default to paging of console output
|
||||||
|
|
||||||
|
pgdflg equ 'P' ; Character to toggle paging status
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'PEEK' command
|
||||||
|
|
||||||
|
peekhdr equ yes ; Label columns in PEEK display
|
||||||
|
|
||||||
|
peekbdr equ yes ; Include line of hyphens under labels
|
||||||
|
|
||||||
|
peekchk equ yes ; If yes, the ending address will be tested to
|
||||||
|
; prevent overflow past FFFF (costs 5 bytes)
|
||||||
|
|
||||||
|
peeklen equ 127 ; Display 1 record (128 bytes) as default.
|
||||||
|
; PEEK displays in increments of 16 bytes.
|
||||||
|
; You may set PEEKLEN for 0 to 65525.
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'S' command
|
||||||
|
|
||||||
|
; Print disk space with other commands (recommended)
|
||||||
|
|
||||||
|
dirsp equ true ; Show space after DIR
|
||||||
|
erasp equ true ; Show space after ERA
|
||||||
|
cpsp equ true ; Show space after CP
|
||||||
|
resetsp equ true ; Show space after R
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'WHL' command
|
||||||
|
|
||||||
|
whlquiet equ false ; If true, don't report wheel state with
|
||||||
|
; .."WHL password" command (costs 1 byte)
|
||||||
|
|
||||||
|
wpass macro
|
||||||
|
db 'SYSTEM '
|
||||||
|
endm
|
||||||
|
|
||||||
|
;----------------------------------------
|
||||||
|
|
||||||
|
; 'CLED' command
|
||||||
|
;
|
||||||
|
; Command line editing takes place in the line buffer. It does not take up
|
||||||
|
; room in the RCP. The editor will handle a 255 byte line. Although that
|
||||||
|
; is larger than the maximum command line size, it allows you to edit a long
|
||||||
|
; line without deleting something first. The history is kept inside the RCP,
|
||||||
|
; so its size will depend upon how many other RCP commands are enabled.
|
||||||
|
; HISTSIZE should be at least as large as the multiple command line buffer
|
||||||
|
; (204 bytes).
|
||||||
|
|
||||||
|
lbufwid equ 255 ; Line buffer size, byte
|
||||||
|
histsize equ 204 ; History buffer size, word
|
||||||
|
|
||||||
|
; CLERA controls whether to null the internal history when CLED is exited, or
|
||||||
|
; to leave it for the next run. Secure systems will want to set it to YES.
|
||||||
|
|
||||||
|
clera equ no ; Erase history on terminating shell
|
||||||
|
|
||||||
|
; CLMIN sets the cutoff for discarding short lines from history recording.
|
||||||
|
; A setting of 3 would discard a command such as DIR.
|
||||||
|
|
||||||
|
clmin equ 5 ; Discard lines which do not exceed this
|
||||||
|
|
||||||
|
clins equ yes ; Initial insert state ON
|
||||||
|
clsav equ yes ; Initial history recording ON
|
||||||
|
|
||||||
|
; The appearance of the command line prompt may include the system time if a
|
||||||
|
; DateStamper or ZS/ZDDOS clock is implemented. The DU:DIR separator character
|
||||||
|
; can be changed to indicate that CLED is running.
|
||||||
|
|
||||||
|
dudir_sep equ '/' ; DU:DIR separator char
|
||||||
|
puser0 equ no ; Print user #0 in prompt
|
||||||
|
systime equ yes ; Include system time in prompt
|
||||||
|
|
||||||
|
if systime
|
||||||
|
civtim equ yes ; Yes for 12-hr civil time vs. 24-hr military
|
||||||
|
timesep equ '.' ; Separator between hours and minutes
|
||||||
|
endif
|
||||||
|
|
||||||
|
; The editor must use EREOL. The VLIB routine to send the EREOL sequence
|
||||||
|
; to the terminal needs to test for a video delay and the presence of the "/"
|
||||||
|
; quote character. Most terminals can just print the TCAP sequence as is. If
|
||||||
|
; that doesn't work, set ERLQUICK to NO. If you are using only one terminal,
|
||||||
|
; it will be most efficient to set ERLTCAP to NO and use the CLR_EOL macro.
|
||||||
|
|
||||||
|
erltcap equ yes ; Use TCAP routine vs macro
|
||||||
|
|
||||||
|
if erltcap
|
||||||
|
erlquick equ yes ; Use simplified TCAP routine
|
||||||
|
else
|
||||||
|
|
||||||
|
clr_eol macro ; Define terminal specific string
|
||||||
|
dc 1bh,'T' ; ...set high bit on last character
|
||||||
|
endm
|
||||||
|
|
||||||
|
endif ;erltcap
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; Command names
|
||||||
|
|
||||||
|
; The CTABLE macro, which constructs the command dispatch table, includes a
|
||||||
|
; line for each command, the first parameter of which is the name of the
|
||||||
|
; command. These names may be changed if you wish. But make sure that you
|
||||||
|
; do not use a name that is longer than the maximum allowed length. If you
|
||||||
|
; do, the name will be truncated and a nonfatal error will occur during
|
||||||
|
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower
|
||||||
|
; case letters will be converted to upper case. The macro COMMAND is defined
|
||||||
|
; in Z34MAC.LIB.
|
||||||
|
|
||||||
|
cmdsize equ 4 ; Length of each command name
|
||||||
|
|
||||||
|
cmdtbl macro
|
||||||
|
command CLED, cledon, wcled, cled
|
||||||
|
command CLS, clson, false, cls
|
||||||
|
command CP, cpon, wcp, copy
|
||||||
|
command D, diron, wdir, dir
|
||||||
|
command ECHO, echoon, false, echo
|
||||||
|
command ERA, eraon, wera, era
|
||||||
|
command H, true, whrc, clist
|
||||||
|
command LIST, liston, wlist, list
|
||||||
|
command NOTE, noteon, false, note
|
||||||
|
command P, peekon, wpeek, peek
|
||||||
|
command POKE, pokeon, wpoke, poke
|
||||||
|
command PORT, porton, wport, port
|
||||||
|
command PROT, proton, wprot, att
|
||||||
|
command Q, quieton,wquiet, quset
|
||||||
|
command R, reson, false, reset
|
||||||
|
command REG, regon, wreg, register
|
||||||
|
command REN, renon, wren, ren
|
||||||
|
command SP, spaceon,false, space
|
||||||
|
command SPOP, cledon, wspop, shpop
|
||||||
|
command TYPE, lton, wtype, type
|
||||||
|
command WHL, whlon, false, whl
|
||||||
|
endm
|
||||||
|
|
||||||
|
; END Z34RCP.LIB
|
||||||
|
|
||||||
429
Source/BPBIOS/Z34RCP11/z34rcp11.doc
Normal file
429
Source/BPBIOS/Z34RCP11/z34rcp11.doc
Normal file
@@ -0,0 +1,429 @@
|
|||||||
|
|
||||||
|
ZCPR Version 3.4 Resident Command Package
|
||||||
|
Source Code
|
||||||
|
|
||||||
|
Revised Documentation for Version 1.1
|
||||||
|
October 7, 1989 by Carson Wilson
|
||||||
|
|
||||||
|
Version 1.0 Documentation
|
||||||
|
June 17, 1988 by Carson Wilson
|
||||||
|
|
||||||
|
|
||||||
|
Contents
|
||||||
|
--------
|
||||||
|
|
||||||
|
1. Files in this Library.
|
||||||
|
|
||||||
|
2. Purpose of the Resident Command Package.
|
||||||
|
|
||||||
|
2.1. "Resident" vs. "Transient" Commands.
|
||||||
|
|
||||||
|
2.2. The Z-System Resident Command Package.
|
||||||
|
|
||||||
|
2.2.1. Design Philosophy of the Z34 RCP.
|
||||||
|
|
||||||
|
3. Structure and Operation of the RCP Segment.
|
||||||
|
|
||||||
|
4. Generating an RCP for your System.
|
||||||
|
|
||||||
|
4.1. The Z-Relocatable Approach.
|
||||||
|
|
||||||
|
4.1.1. NZCOM and JetLDR.
|
||||||
|
4.1.2. Z-Relocatable (ZRL) Code
|
||||||
|
|
||||||
|
4.2. The Assembly Approach.
|
||||||
|
|
||||||
|
4.2.1. Note on Assemblers.
|
||||||
|
4.2.2. Assembly to Absolute Code.
|
||||||
|
4.2.3. Assembly to Z-Relocatable Code.
|
||||||
|
4.2.4. Adding Custom Commands to Z34RCP.
|
||||||
|
|
||||||
|
5. Legal Use of These Files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1. Files in this Library.
|
||||||
|
|
||||||
|
This library of files contains the assembler source code and
|
||||||
|
accompanying documentation for the Z-System Resident Command
|
||||||
|
Package (RCP). To use Z34RCP you must be running ZCPR versions
|
||||||
|
3.3 or above. For pre-assembled Z-Relocatable (ZRL) RCPs, see
|
||||||
|
RCPZRL11.LBR. Z34RCP11.LBR consists of the following files
|
||||||
|
(uncompress with UNCR.COM, QL.COM or LBRE.COM):
|
||||||
|
|
||||||
|
CLEDINST.CZM - Installer for CLED command.
|
||||||
|
CLEDSAVE.CZM - Command file utility for CLED.
|
||||||
|
RCPCLED .DZC - Documentation on CLED.
|
||||||
|
RCPBASE .LZB - Used to assemble an absolute address RCP.
|
||||||
|
RCPCMD .LZB - Used to include custom commands in the RCP.
|
||||||
|
RCP?????.LZB - Code modules for the standard RCP commands.
|
||||||
|
SYSDEF .LZB - Commonly used equates.
|
||||||
|
Z34CMN .LZB - Used to assemble Z-Relocatable RCP's.
|
||||||
|
Z34DEFN .LZB - Offsets in the ZCPR 3.4 code.
|
||||||
|
Z34MAC .LZB - Assembler macros.
|
||||||
|
Z34RCP11.DZC - This file.
|
||||||
|
Z34RCP11.FOR - Short description of the library.
|
||||||
|
Z34RCP11.HZP - Help file for the RCP, gives command syntax and
|
||||||
|
examples.
|
||||||
|
Z34RCP .LZB - Used to select features when assembling the RCP.
|
||||||
|
Z34RCP11.NZW - Changes since Z34RCP10.LBR. Intended for former
|
||||||
|
RCP users, this will be only of passing interest
|
||||||
|
to new users.
|
||||||
|
Z34RCP11.ZZ0 - Main file for assembling the RCP.
|
||||||
|
ZSYSTEM .AZ - General information about Z System.
|
||||||
|
|
||||||
|
|
||||||
|
2. Purpose of the Resident Command Package.
|
||||||
|
|
||||||
|
2.1. "Resident" vs. "Transient" Commands.
|
||||||
|
|
||||||
|
Most of the commands used under CP/M and Z-System are "transient"
|
||||||
|
commands. The machine code for these commands (or "programs") is
|
||||||
|
stored in "command files," whose file type is normally .COM.
|
||||||
|
Thus, the machine code for WordStar is stored in a file called
|
||||||
|
"WS.COM".
|
||||||
|
|
||||||
|
To run WordStar, the user issues the command "WS" at the command
|
||||||
|
line, the operating system loads WS.COM from the disk drive to
|
||||||
|
memory, and WS.COM takes over control of the computer. If the
|
||||||
|
user then exits WordStar and issues another command, the
|
||||||
|
operating system can load another command file from the disk,
|
||||||
|
reusing the area of memory previously occupied by WordStar.
|
||||||
|
|
||||||
|
Recycling memory in this way makes personal computers quite
|
||||||
|
versatile, as the number of commands available to the user is
|
||||||
|
only limited to the number of command files stored on disk.
|
||||||
|
There are some drawbacks to this approach, however. Although
|
||||||
|
disk-based commands conserve memory by recycling it, they must be
|
||||||
|
loaded from disk each time they operate. This creates its own
|
||||||
|
costs in terms of speed of execution, disk storage space, and
|
||||||
|
memory reallocation.
|
||||||
|
|
||||||
|
The most obvious disadvantage of loading a file from disk each
|
||||||
|
time a command is issued is that it takes time to find and load
|
||||||
|
disk files. Especially with floppy diskettes, the amount of time
|
||||||
|
which elapses after the command is issued and before the command
|
||||||
|
executes is significant. A second drawback to disk-based
|
||||||
|
commands is that commands will not execute unless their machine
|
||||||
|
code is available on the disk system. This means that the user
|
||||||
|
must know what command files are available on disk before issuing
|
||||||
|
commands. The final disadvantage of disk file based commands is
|
||||||
|
that some commands (e.g., SAVE) require that the area of memory
|
||||||
|
normally overwritten by command files (known as the "Transient
|
||||||
|
Program Area" or TPA) be preserved.
|
||||||
|
|
||||||
|
In answer to these difficulties, the creators of CP/M designed
|
||||||
|
some of its commands as "built-in" commands. The DIR, REN, SAVE,
|
||||||
|
ERA, USER, and TYPE commands of CP/M 2.2 remain in memory and can
|
||||||
|
be issued without loading machine code files from disk. Thus,
|
||||||
|
the DIR command provides a disk directory regardless of whether
|
||||||
|
the command file "DIR.COM" is present on disk, and the SAVE
|
||||||
|
command saves the contents of memory at 100 hex to a disk file.
|
||||||
|
Residing permanently in memory, these commands are simple in
|
||||||
|
order to leave memory for disk-based commands to load in.
|
||||||
|
|
||||||
|
2.2. The Z-System Resident Command Package.
|
||||||
|
|
||||||
|
The creators of Z-System have followed the resident command
|
||||||
|
philosophy of CP/M, extending and enhancing the capabilities of
|
||||||
|
resident commands with the Z-System Resident Command Package.
|
||||||
|
Under CP/M 2.2, resident commands are tightly integrated with the
|
||||||
|
operating system. The user is therefore limited to a fixed set
|
||||||
|
of resident commands. The code in the Z-System Resident Command
|
||||||
|
Package is much more loosely linked with the operating system.
|
||||||
|
|
||||||
|
The RCP occupies a section of protected memory, but how that
|
||||||
|
memory is used is only very loosely constrained. The Z-System
|
||||||
|
resident command package may be tailored for a wide variety of
|
||||||
|
installations, and easily altered within a single installation.
|
||||||
|
|
||||||
|
2.2.1. Design Philosophy of the Z34 RCP.
|
||||||
|
|
||||||
|
Though any set of commands which will fit in the RCP memory area
|
||||||
|
can be loaded as an RCP, a standard set of Z-System RCP commands
|
||||||
|
have evolved over the years. Distributed as the standard
|
||||||
|
Z-System RCP, this set of commands consists of universal,
|
||||||
|
single-purpose commands modeled after the resident command set of
|
||||||
|
CP/M 2.2, such as DIR, REN, and ERA.
|
||||||
|
|
||||||
|
Keeping these commands simple both conserves memory and allows
|
||||||
|
their use in custom command scripts. None of the standard RCP
|
||||||
|
commands require interaction on the part of the user--they
|
||||||
|
perform a single function and quit. Aliases or other command
|
||||||
|
scripts which build complex commands from simple RCP commands
|
||||||
|
therefore retain complete control over the user interface.
|
||||||
|
|
||||||
|
However, the standard RCP forms only one of many alternative uses
|
||||||
|
to which the Z-System RCP memory segment may be put. Since the
|
||||||
|
RCP memory is protected, it can be used by background programs
|
||||||
|
which continue to function even while other applications have
|
||||||
|
been loaded into the transient program area. Several such
|
||||||
|
programs, including key-redefiners, screen-trapping programs,
|
||||||
|
background numeric calculators, program assembly environments,
|
||||||
|
and memory utilities have been developed.
|
||||||
|
|
||||||
|
Until Z34RCP, all but the most advanced users had to surrender
|
||||||
|
their entire RCP to use the custom commands, even if the commands
|
||||||
|
needed far less than the available RCP space. Thus, to use a
|
||||||
|
key-redefinition RCP, one was forced to give up all of his other
|
||||||
|
RCP commands. Z34RCP solves this problem by acting as a base to
|
||||||
|
which programmers may easily add code. By modifying the standard
|
||||||
|
file RCPCMD.LIB, programmers can implement and distribute custom
|
||||||
|
RCP commands which may be installed by those with only basic
|
||||||
|
knowledge of assembly language. See "Adding Custom Commands,"
|
||||||
|
below, for details.
|
||||||
|
|
||||||
|
|
||||||
|
3. Structure and Operation of the RCP Segment.
|
||||||
|
|
||||||
|
Typically, the Resident Command Package occupies 2 kilobytes of
|
||||||
|
memory, protected above the system's Basic Input Output System
|
||||||
|
(BIOS). Its internal structure is very simple, consisting of the
|
||||||
|
five byte string "Z3RCP", a table of command names and their
|
||||||
|
addresses within the RCP, and the machine code of the commands
|
||||||
|
themselves. This means that an RCP of a given length can contain
|
||||||
|
any number of resident commands which will fit in 2k, from one
|
||||||
|
large program to many shorter programs.
|
||||||
|
|
||||||
|
Further, since the RCP is independent of the rest of the
|
||||||
|
operating system, the resident commands may be changed at will.
|
||||||
|
On system startup, a default RCP is loaded into memory.
|
||||||
|
Thereafter the RCP's commands remain active until the system is
|
||||||
|
turned off or another RCP is loaded.
|
||||||
|
|
||||||
|
Using loader programs to load the RCP to memory allows another
|
||||||
|
important ability--it can exchange RCPs during a single session.
|
||||||
|
By allowing users to change their RCPs "on-the-fly," loader
|
||||||
|
programs provide some of the benefits of transient commands even
|
||||||
|
while preserving the benefits of resident commands. In fact,
|
||||||
|
even what portion of memory is allocated to the RCP can be
|
||||||
|
altered in this way by advanced users! (see the Z-System User's
|
||||||
|
Manual for more on this).
|
||||||
|
|
||||||
|
|
||||||
|
4. Generating an RCP for your System.
|
||||||
|
|
||||||
|
Since Z80 computers come with a wide variety of operating system
|
||||||
|
environments, it is impossible for a single segment of machine
|
||||||
|
code function as a universal RCP. Due to differences in
|
||||||
|
operating system and hardware design, the size and location of
|
||||||
|
memory available to the Z-System RCP vary widely. Until
|
||||||
|
Z34RCP, this meant that each type of Z80 computer required an RCP
|
||||||
|
segment assembled specifically for that computer.
|
||||||
|
|
||||||
|
Now, however, there are two basic means by which you may generate
|
||||||
|
an RCP for your system. The simplest route is to load already-
|
||||||
|
assembled Z-Relocatable code modules. This technique is
|
||||||
|
recommended for beginners and those with little experience in
|
||||||
|
assembly language. See RCPZRL11.LBR for pre-assembled RCP
|
||||||
|
modules. For more experienced users with an interest in
|
||||||
|
customizing or their RCPs or adding their own commands, custom
|
||||||
|
assembly of the files in this library is also an option.
|
||||||
|
|
||||||
|
4.1. The Z-Relocatable Approach.
|
||||||
|
|
||||||
|
4.1.1. NZCOM and JetLDR.
|
||||||
|
|
||||||
|
LDR.COM, the familiar Z-System segment loader first introduced by
|
||||||
|
Rick Conn as a means of loading the various segments of the ZCPR
|
||||||
|
environment from disk to memory, required that system segments be
|
||||||
|
assembled to run only at system-specific addresses. For example,
|
||||||
|
if the system's RCP started at FA00 hex, only an RCP assembled to
|
||||||
|
run at that starting address would function on the system.
|
||||||
|
Therefore, separate SYS.RCP files were needed for each computer
|
||||||
|
installation.
|
||||||
|
|
||||||
|
Thanks to several advanced loader utilities, namely NZCOM by Joe
|
||||||
|
Wright and JetLDR and Z3PLUS by Bridger Mitchell, custom-
|
||||||
|
assembling an RCP for a given target machine is no longer
|
||||||
|
necessary. These three programs can load specially assembled RCP
|
||||||
|
segments (known as Z-ReLocatable or "ZRL" segments) to any area
|
||||||
|
of memory. Z-System users now need only obtain previously
|
||||||
|
assembled RCP segments, much as they need only obtain assembled
|
||||||
|
.COM or .OBJ files to run transient programs.
|
||||||
|
|
||||||
|
Using information in the system's environmental descriptor,
|
||||||
|
advanced loaders load pre-assembled segments to the proper
|
||||||
|
addresses in any system. The only remaining constraint is the
|
||||||
|
amount of memory allocated to the RCP. While the standard RCP
|
||||||
|
size is 2 kilobytes, many Z-System installations vary
|
||||||
|
considerably from this standard, so it is still necessary to
|
||||||
|
ensure that a ZRL segment does not exceed available RCP memory.
|
||||||
|
Fortunately, this is taken care of automatically by the advanced
|
||||||
|
loader programs.
|
||||||
|
|
||||||
|
Using NZCOM or JetLDR, it is possible to load an RCP directly
|
||||||
|
from RCPZRL11.LBR. See NZCOM or JetLDR documentation for full
|
||||||
|
instructions on how to load Z-Relocatable RCPs with these
|
||||||
|
programs.
|
||||||
|
|
||||||
|
4.1.2. Z-Relocatable (ZRL) Code
|
||||||
|
|
||||||
|
The technique used by NZCOM and JetLDR to load a single RCP to
|
||||||
|
any address in memory involves relocatable code. Relocatable
|
||||||
|
code has been used for years by the "linker" programs available
|
||||||
|
to assembly language programmers. Since only portions of a given
|
||||||
|
Z80 machine code routine are specific to one memory address, it
|
||||||
|
is possible to create "relocatable" files of Z80 routines (known
|
||||||
|
by their file type .REL) containing all but the address-specific
|
||||||
|
codes. These files can then be very quickly relocated (or
|
||||||
|
"linked") by a linker program to operate at any memory address.
|
||||||
|
|
||||||
|
Z-Relocatable code is simply a more sophisticated form of
|
||||||
|
relocatable code. ZRL files contain separately labeled segments,
|
||||||
|
known as "named common blocks." Where normal relocatable code is
|
||||||
|
all linked to operate at one address at a time by the linker
|
||||||
|
program, named common blocks allow the linker to distinguish
|
||||||
|
between different sections of the file and to link each "block"
|
||||||
|
to operate at a different address.
|
||||||
|
|
||||||
|
This represents a major step forwards in user convenience, and
|
||||||
|
will certainly lead to more innovative work using the ZCPR system
|
||||||
|
segments. There is a minor drawback, however, inherent in the
|
||||||
|
form of assembly required by NZCOM and JetLDR. Before the advent
|
||||||
|
of these two programs, system segments were equivalent to .COM
|
||||||
|
files which were assembled to operate at addresses other than the
|
||||||
|
standard 100 hex. The ability to load a single system segment to
|
||||||
|
any address depends partially on the form of the assembled system
|
||||||
|
segment itself.
|
||||||
|
|
||||||
|
While public domain assemblers will produce absolute object
|
||||||
|
files, more sophisticated assemblers, such as SLR's Z80ASM (a
|
||||||
|
bargain at $50) are required to assemble code with named common
|
||||||
|
addresses. NZCOM and JetLDR thus greatly reduce the time needed
|
||||||
|
by most users to install Z-System segments, but those wishing to
|
||||||
|
assemble Z-Relocatable segments will probably need a commercial
|
||||||
|
assembler.
|
||||||
|
|
||||||
|
4.2. The Assembly Approach.
|
||||||
|
|
||||||
|
Those with knowledge of assembly language may opt to assemble
|
||||||
|
their own custom RCPs, including only the commands and options
|
||||||
|
which match their exact requirements. Z34RCP.LBR contains the
|
||||||
|
complete source to the ZCPR 3.4 RCP. The file Z34RCP.Z80
|
||||||
|
contains include statements to combine the various library files
|
||||||
|
during assembly. The file Z34RCP.LIB contains all of the equates
|
||||||
|
controlling assembly time options, and should be edited before
|
||||||
|
assembling Z34RCP.Z80.
|
||||||
|
|
||||||
|
4.2.1. Note on Assemblers.
|
||||||
|
|
||||||
|
The development work on Z34RCP was done exclusively with the SLR
|
||||||
|
Systems line of Z80 assemblers. Hence, some of the source code
|
||||||
|
is unavoidably specific to SLR and compatible assemblers. Those
|
||||||
|
using incompatible assemblers such as public-domain Z80
|
||||||
|
assemblers should set the SLR equate in Z34RCP.LIB to FALSE.
|
||||||
|
This removes most SLR-specific pseudo-ops, but some additional
|
||||||
|
editing of the source files may be required for error-free
|
||||||
|
assembly. Unless your assembler can handle named common blocks,
|
||||||
|
you will also want to set the ZRL equate in Z34RCP.LIB to FALSE.
|
||||||
|
|
||||||
|
4.2.2. Assembly to Absolute Code.
|
||||||
|
|
||||||
|
If you are assembling a custom RCP for use at one memory address
|
||||||
|
only, or if your assembler can't handle named common blocks, you
|
||||||
|
can set the ZRL equate in Z34RCP.LIB to FALSE, and instruct your
|
||||||
|
assembler to produce absolute code (either a .HEX or a .COM file).
|
||||||
|
|
||||||
|
Before generating absolute code you must set addresses in the
|
||||||
|
file RCPBASE.LIB for the particular installation. Once you have
|
||||||
|
set these addresses, you may proceed to assemble Z34RCP.Z80 to
|
||||||
|
either Z34RCP.COM or Z34RCP.HEX. If your assembler generated a
|
||||||
|
.HEX file, use LOAD.COM to convert Z34RCP.HEX to Z34RCP.COM.
|
||||||
|
|
||||||
|
If you are running a version of ZCPR prior to 3.4, you must now
|
||||||
|
alter two bytes in your Z-System environment segment to point to
|
||||||
|
your system's CCP address. The bytes at offset 39 and 40 hex
|
||||||
|
(formerly containing "width of printer 2" and "lines on printer
|
||||||
|
2") should contain a 2-byte address of your system's CCP, most
|
||||||
|
significant byte last.
|
||||||
|
|
||||||
|
Z34RCP.COM may now be renamed to SYS.RCP and loaded with the Z-
|
||||||
|
System loader program LDR.COM or Bridger Mitchell's JetLDR.
|
||||||
|
|
||||||
|
4.2.3. Assembly to Z-Relocatable Code.
|
||||||
|
|
||||||
|
Unlike absolute RCP segments, Z-Relocatable segments may be
|
||||||
|
loaded to ANY address, provided enough RCP space to contain them
|
||||||
|
is available. To assemble a Z-Relocatable RCP, you will need an
|
||||||
|
assembler which can handle named common blocks (see 4.2.1 above).
|
||||||
|
Set the ZRL equate in Z34RCP.LIB to TRUE, and instruct your
|
||||||
|
assembler to produce a relocatable (.REL) file. The resulting
|
||||||
|
Z34RCP.REL may then be renamed to Z34RCP.ZRL and loaded with
|
||||||
|
NZCOM, Z3PLUS, JetLDR.
|
||||||
|
|
||||||
|
4.2.4. Adding Custom Commands to Z34RCP.
|
||||||
|
|
||||||
|
As mentioned above, I have designed Z34RCP as a base to which
|
||||||
|
custom RCP commands may readily be added. All code and command
|
||||||
|
names for custom commands may be included in RCPCMD.LIB.
|
||||||
|
Thereafter, whenever the RCP is assembled the commands added to
|
||||||
|
RCPCMD.LIB will be included automatically. To remove the custom
|
||||||
|
commands, just replace the modified RCPCMD.LIB with an unmodified
|
||||||
|
copy. See RCPCMD.LIB for detailed instructions on how to add
|
||||||
|
code and command names.
|
||||||
|
|
||||||
|
RCPCMD.LIB also facilitates distribution of custom commands to be
|
||||||
|
included by others in their RCPs. Simply distribute a copy of
|
||||||
|
your modified RCPCMD.LIB along with instructions on how to use
|
||||||
|
your custom commands. Users may then easily include the new
|
||||||
|
commands by substituting your modified RCPCMD.LIB for their
|
||||||
|
original copy and reassembling their RCPs.
|
||||||
|
|
||||||
|
Of course, users of NZCOM, Z3PLUS, or JetLDR may simply trade
|
||||||
|
custom RCPs in Z-Relocatable form and dispense with the need for
|
||||||
|
any assembly work on the part of the user. All three of these
|
||||||
|
advanced loaders are available from Z Systems Associates (see
|
||||||
|
below).
|
||||||
|
|
||||||
|
|
||||||
|
5. Legal Use of These Files.
|
||||||
|
|
||||||
|
Z34RCP is copyright 1989 by Z Systems Associates (ZSA), all
|
||||||
|
rights reserved. Any commercial use of Z34RCP, defined as any
|
||||||
|
situation where the duplicator recieves revenue by duplicating or
|
||||||
|
distributing Z34RCP by itself or in conjunction with any hardware
|
||||||
|
or software product, is expressly prohibited unless authorized in
|
||||||
|
writing by ZSA.
|
||||||
|
|
||||||
|
Except for the file RCPCMD.LIB (see 4.2.4 above), you may
|
||||||
|
redistribute Z34RCP.LBR in its present form only. I encourage
|
||||||
|
you to explore the source code, suggest improvements, and
|
||||||
|
document errors. However, please obtain permission from Z
|
||||||
|
Systems Associates before redistributing any of these files in
|
||||||
|
altered form. This will prevent confusion by allowing your work
|
||||||
|
to be coordinated with the efforts of others.
|
||||||
|
|
||||||
|
The Z Systems Associates are:
|
||||||
|
|
||||||
|
Sage Microsystems East
|
||||||
|
Selling & Supporting the Best in 8-Bit Software
|
||||||
|
1435 Centre St., Newton Centre, MA 02159-2469
|
||||||
|
Voice: 617/965-3552 (9:00am - 11:30pm)
|
||||||
|
Modem: 617/965-7259 (password = DDT)(MABOS on PC-Pursuit)
|
||||||
|
|
||||||
|
and:
|
||||||
|
|
||||||
|
Plu*Perfect Systems
|
||||||
|
"==World-Class Software"
|
||||||
|
410 23rd Street, Santa Monica, CA 90402
|
||||||
|
Voice: 213/393-6105 (evenings)
|
||||||
|
Modem: 213/670-9465 (leave message for "Bridger Mitchell")
|
||||||
|
|
||||||
|
For more information on Z System, check at the above bulletin
|
||||||
|
board systems, or consult The Computer Journal for excellent
|
||||||
|
articles on ZCPR and CP/M. The Computer Journal is published six
|
||||||
|
times a year by Publishing Consultants, 190 Sullivan Crossroad,
|
||||||
|
Columbia Falls, MT 59912, phone 406/257-9119. An issue averages
|
||||||
|
forty pages with few ads. Subscription rates are $16 for one
|
||||||
|
year (6 issues), or $28 for two years (12 issues) in the U.S.,
|
||||||
|
$22 for one year Canada and Mexico, and $24 (surface) for one
|
||||||
|
year in other countries.
|
||||||
|
|
||||||
|
|
||||||
|
Carson Wilson is the operator of:
|
||||||
|
|
||||||
|
Antelope Freeway Remote Access System
|
||||||
|
Chicago, 312-764-5162
|
||||||
|
300-1200-2400 Baud, 24 Hours
|
||||||
|
|
||||||
7
Source/BPBIOS/Z34RCP11/z34rcp11.for
Normal file
7
Source/BPBIOS/Z34RCP11/z34rcp11.for
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Z-System Resident Command Package (RCP) in source code form, version
|
||||||
|
1.1. Complete Z80 source code to the RCP plus documentation, for
|
||||||
|
ZCPR versions 3.3 and above. Adds several exciting new commands and
|
||||||
|
features and fixes various bugs in the previous release. See
|
||||||
|
companion file RCPZRL11.LBR for pre-compiled RCP modules which may
|
||||||
|
be loaded with NZ-COM, Z3PLUS, or JetLDR.
|
||||||
|
|
||||||
390
Source/BPBIOS/Z34RCP11/z34rcp11.hlp
Normal file
390
Source/BPBIOS/Z34RCP11/z34rcp11.hlp
Normal file
@@ -0,0 +1,390 @@
|
|||||||
|
The RCP Commands
|
||||||
|
CLED/SPOP Command Line Editor
|
||||||
|
CLS Clear the CRT screen
|
||||||
|
CP Copy a File
|
||||||
|
D Display Directory
|
||||||
|
ECHO Echo Command Tail
|
||||||
|
ERA Erase Files
|
||||||
|
H Display Available Commands
|
||||||
|
LIST/TYPE Display a File on Printer/CRT
|
||||||
|
NOTE Comment
|
||||||
|
P/POKE Display/Alter Memory
|
||||||
|
PORT Input/Output to system ports
|
||||||
|
PROT Protect Files
|
||||||
|
Q Alter or Query the Quiet Flag
|
||||||
|
R Reset Disk
|
||||||
|
REG ZCPR3 Register Display/Alter
|
||||||
|
REN Rename a File
|
||||||
|
SP Display Disk Space Remaining
|
||||||
|
WHL Alter or Query Wheel Byte <02>
|
||||||
|
:Thå RCÐ Commands
|
||||||
|
|
||||||
|
|
||||||
|
Thå standarä ZCPR³ Systeí Residenô Commanä Packagå (RCP© <20>
|
||||||
|
distributeä witè thå ZCPR³ systeí containó á numbeò oæ residenô <20>
|
||||||
|
commandó whicè maù bå enableä (dependinç oî systeí memorù anä <20>
|
||||||
|
securitù characteristics© aô thå discretioî oæ thå installer® <20>
|
||||||
|
Usagå oæ thå RCÐ commandó ió describeä iî thió HELÐ file.
|
||||||
|
|
||||||
|
Thå RCÐ commandó residå iî memorù ratheò thaî beinç loadeä <20>
|
||||||
|
froí disk¬ anä thereforå operatå verù efficientlù anä arå disë <20>
|
||||||
|
independent® Oî thå otheò hand¬ duå tï memorù constraints¬ thå <20>
|
||||||
|
RCÐ commandó arå ofteî lesó powerfuì thaî theiò transienô prograí <20>
|
||||||
|
counterparts®
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Iæ aî erroò occurs¬ thå RCÐ commandó generallù chaiî tï thå <20>
|
||||||
|
installeä erroò handler¬ providinç á detaileä reporô oæ thå erroò <20>
|
||||||
|
anä allowinç thå commanä tï bå editeä oò aborted® Iæ nï erroò <20>
|
||||||
|
handleò ió installed¬ thå commanä whicè causeä thå erroò ió <20>
|
||||||
|
echoeä tï thå screen¬ followeä bù á questioî mark.
|
||||||
|
|
||||||
|
Alì RCÐ commandó arå installatioî-dependent¬ anä manù maù bå <20>
|
||||||
|
configureä aô assemblù timå tï perforí iî slightlù differenô <20>
|
||||||
|
ways® Thå exampleó giveî iî thió HELÐ filå arå baseä oî thå <20>
|
||||||
|
distributeä seô oæ options® Seå sourcå codå filå Z34RCP.LIÂ foò <20>
|
||||||
|
morå detailó oî commanä anä optioî selection.
|
||||||
|
|
||||||
|
:CLED anä SPOÐ Commands
|
||||||
|
Transient Counterparts: LSÈ anä SPOP
|
||||||
|
|
||||||
|
Thå CLEÄ commanä invokeó á speciaì prograí whicè provideó <20>
|
||||||
|
WordStaò-likå editinç oæ commandó aô thå systeí prompt® Iô alsï <20>
|
||||||
|
allowó yoõ tï recalì thå lasô severaì commandó invokeä witè onlù <20>
|
||||||
|
onå keystroke® Finally¬ iæ available¬ CLEÄ displayó thå currenô <20>
|
||||||
|
systeí timå tï thå lefô oæ youò prompt® Thå syntaø is:
|
||||||
|
|
||||||
|
CLED - invoke as shell
|
||||||
|
CLED / - invoke for next command only
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Thå SPOÐ commanä "pops¢ thå toð shelì froí thå shelì stack¬ <20>
|
||||||
|
sï thaô iô nï longeò loadó afteò everù command® Thió commanä ió <20>
|
||||||
|
rarelù needed¬ anä ió includeä onlù witè versionó oæ thå RCÐ <20>
|
||||||
|
includinç CLEÄ (seå above)® Thå syntaø ió simply:
|
||||||
|
|
||||||
|
SPOP
|
||||||
|
:CLS Command
|
||||||
|
Transient Counterpart: None
|
||||||
|
|
||||||
|
Thå CLÓ commanä clearó thå terminaì screen¬ removinç <20>
|
||||||
|
displayó whicè mighô havå beeî lefô bù previouó commandó oò <20>
|
||||||
|
programs® Thå syntaø is:
|
||||||
|
|
||||||
|
CLS
|
||||||
|
|
||||||
|
:CP Command
|
||||||
|
Transient Counterpart: MCOPY
|
||||||
|
|
||||||
|
Thå CÐ commanä copieó onå filå froí onå DÕ tï anotheò oò <20>
|
||||||
|
intï thå samå DÕ undeò á differenô name® Iæ functionó 10² (geô <20>
|
||||||
|
stamp© anä 10³ (seô stamp© arå supporteä bù aî RSØ oò DOS¬ filå <20>
|
||||||
|
datestampó arå preserveä acrosó copies® Thå syntaø is:
|
||||||
|
|
||||||
|
CP dir:ufn1 dir:ufn2 -- ufn1 to ufn2
|
||||||
|
CP dir:ufn1 -- ufn1 to current dir:
|
||||||
|
CP dir:ufn2=dir:ufn1 -- ufn1 to ufn2
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
CP f1.txt f2.txt
|
||||||
|
CP b0:f1.txt a15:
|
||||||
|
CP root:f1.txt
|
||||||
|
|
||||||
|
:D Command
|
||||||
|
Transient Counterpart: DIR, XD, XDIR
|
||||||
|
|
||||||
|
Thå Ä commanä displayó thå directorù oæ fileó iî <20>
|
||||||
|
alphabeticaì ordeò acrosó thå lineó tï thå user® Thå syntaø is:
|
||||||
|
|
||||||
|
D dir:afn.aft o
|
||||||
|
D .aft o
|
||||||
|
D /o
|
||||||
|
|
||||||
|
Options (wheel only) are:
|
||||||
|
|
||||||
|
S - Display System Files Only
|
||||||
|
A - Display Both Non-System and System Files
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
D /a
|
||||||
|
D root:myfile.txt
|
||||||
|
Š D .com
|
||||||
|
|
||||||
|
:ECHO Command
|
||||||
|
Transient Counterpart: ECHO
|
||||||
|
|
||||||
|
ECHÏ ió usefuì iî issuinç botè messageó (tï thå user¬ <20>
|
||||||
|
saù withiî á commanä filå durinç execution© anä escapå sequences® <20>
|
||||||
|
Bù uså oæ thå %¾ anä %¼ parameters¬ ECHÏ caî senä itó outpuô iî <20>
|
||||||
|
combinationó oæ uppeò anä loweò case® Bù uså oæ thå %Ð anä %Ã <20>
|
||||||
|
parameters¬ ECHÏ outpuô caî bå toggleä betweeî screeî anä <20>
|
||||||
|
printer® ECHÏ useó BIOÓ calls¬ sï alì controì characteró <20>
|
||||||
|
(entereä aó ^character© arå passeä exactly® Hence¬ consolå-leveì <20>
|
||||||
|
programminç oæ sucè deviceó (CRTó anä printers© ió possible.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
ECHO %Pthis is a test%Cof echo%P
|
||||||
|
-- "THIS IS A TEST" goes to the printer
|
||||||
|
"OF ECHO" goes to the console
|
||||||
|
(trailing %P flushes printer buffer)
|
||||||
|
|
||||||
|
ECHO t%>his is a %<test^j
|
||||||
|
-- "This is a TEST", followed by Control-J,
|
||||||
|
goes to the console<6C>
|
||||||
|
:ERA Command
|
||||||
|
Transient Counterpart: ERASE
|
||||||
|
|
||||||
|
Thå ERÁ commanä eraseó files® Iæ anù characteò ió entereä <20>
|
||||||
|
afteò thå filespec¬ thå useò ió prompteä beforå eacè erasure® <20>
|
||||||
|
Thå syntaø is:
|
||||||
|
|
||||||
|
ERA dir:afn
|
||||||
|
or:
|
||||||
|
ERA dir:afn o -- Inspect files first
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
ERA b7:*.bak
|
||||||
|
ERA text:*.tmp i
|
||||||
|
|
||||||
|
:H Command
|
||||||
|
Transient Counterpart: SHOW
|
||||||
|
|
||||||
|
Thå È (help© commanä displayó tï thå consolå alì oæ thå <20>
|
||||||
|
builô-iî commandó currentlù availablå oî thå system¬ includinç <20>
|
||||||
|
RCP¬ FCP¬ anä CCÐ commands® Iæ á commanä ió wheeì-protected¬ iô <20>
|
||||||
|
ió noô displayeä whilå thå wheeì bytå ió off.
|
||||||
|
|
||||||
|
The syntax is simply:
|
||||||
|
|
||||||
|
H
|
||||||
|
|
||||||
|
:LIST and TYPE Commands
|
||||||
|
Transient Counterparts: PRINT and PAGE
|
||||||
|
|
||||||
|
Thå TYPÅ commanä displayó á grouð oæ fileó oî thå CRÔ whilå <20>Šthå LISÔ commanä printó á grouð oæ fileó oî thå printer® Whilå <20>
|
||||||
|
thå fileó arå beinç displayeä oò printed¬ controì-Ø entereä aô <20>
|
||||||
|
thå consolå skipó tï thå nexô filå anä controì-Ã cancels® Whilå <20>
|
||||||
|
TYPEinç á filå oò files¬ paginç maù bå switcheä ofæ witè controì <20>
|
||||||
|
Z® Iæ LISÔ ió giveî withouô parameters¬ á forí feeä ió senô tï <20>
|
||||||
|
thå printer® Thå syntaø is:
|
||||||
|
|
||||||
|
TYPE dir:afn o -or- LIST dir:afn -or- LIST
|
||||||
|
|
||||||
|
Option to TYPE:
|
||||||
|
|
||||||
|
P - Do NOT Page Output to CRT
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
TYPE b7:*.asm p
|
||||||
|
LIST text:*.txt<78>
|
||||||
|
:NOTE Command
|
||||||
|
Transient Counterpart: NOTE
|
||||||
|
|
||||||
|
NOTÅ ió simplù á "dï nothing¢ commanä whicè caî bå useä tï <20>
|
||||||
|
placå commentó intï multiplå commanä lines® Foò instance¬ iî thå <20>
|
||||||
|
followinç line:
|
||||||
|
|
||||||
|
d *.com;note this is a dir display;era *.bak
|
||||||
|
|
||||||
|
thå Ä anä ERÁ commandó perforí normally¬ anä thå NOTÅ commanä <20>
|
||||||
|
simplù doeó nothinç verù efficiently.
|
||||||
|
|
||||||
|
:P and POKE Commands
|
||||||
|
Transient Counterparts: None (Subset of DDT)
|
||||||
|
|
||||||
|
Thå Ð commanä allowó thå useò tï examinå á chunë oæ memory® <20>
|
||||||
|
Iæ thå useò simplù typeó "P¢ witè nï address¬ thå nexô 12¸ byteó <20>
|
||||||
|
oæ memorù arå displayed® Iæ thå useò typeó "Ð address"¬ 12¸ <20>
|
||||||
|
byteó oæ memorù startinç aô thå indicateä addresó arå displayed® <20>
|
||||||
|
Iæ thå useò typeó "Ð address± address2"¬ memorù iî thió addresó <20>
|
||||||
|
rangå ió displayed® Thå syntax:
|
||||||
|
|
||||||
|
P
|
||||||
|
or:
|
||||||
|
P address
|
||||||
|
or:
|
||||||
|
P address1 address2<73>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Thå POKÅ commanä allowó thå useò tï changå thå contenô oæ <20>
|
||||||
|
memory® Thå useò musô specifù aî addresó tï POKE¬ anä twï basiã <20>
|
||||||
|
formó arå allowed:
|
||||||
|
|
||||||
|
POKE address val1 val2 ... valn
|
||||||
|
and:
|
||||||
|
POKE address "character string
|
||||||
|
|
||||||
|
Thå twï formó maù bå intermixeä witè leadinç valueó anä á <20>
|
||||||
|
trailinç characteò string:
|
||||||
|
|
||||||
|
POKE address val1 val2 ... valn "character string<6E>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
P
|
||||||
|
P f400
|
||||||
|
P f400 f425
|
||||||
|
POKE f400 0 1 2
|
||||||
|
POKE f400 "this is a test
|
||||||
|
POKE f400 1 2 3 "hello, world
|
||||||
|
|
||||||
|
:PORT Command
|
||||||
|
Transient Counterpart: None
|
||||||
|
|
||||||
|
Thå PORÔ commanä allowó thå useò tï inpuô anä outpuô valueó <20>
|
||||||
|
tï thå computer'ó input/outpuô ports® Thå syntaø is:
|
||||||
|
|
||||||
|
PORT addr -- Read and display value
|
||||||
|
PORT addr value -- Send value to port
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
PORT fc
|
||||||
|
PORT fd 21
|
||||||
|
|
||||||
|
:PROT Command
|
||||||
|
Transient Counterpart: PROTECÔ
|
||||||
|
|
||||||
|
Thå PROÔ commanä setó thå filå protectioî attributeó foò á <20>
|
||||||
|
grouð oæ files® Thå R/O¬ System¬ anä Archivå attributeó maù bå <20>
|
||||||
|
seô witè thå R¬ S¬ anä Á options¬ respectively¬ giveî iî anù <20>
|
||||||
|
ordeò aó "RSA¢ oò "ASR"® Omissioî oæ onå oæ theså optionó <20>
|
||||||
|
toggleó thå oppositå (ie¬ omissioî oæ Ò makeó thå fileó R/W)® <20>
|
||||||
|
Thå É optioî allowó onå tï inspecô eacè filenamå beforå settinç <20>
|
||||||
|
itó filå attributes® Thå syntax:
|
||||||
|
|
||||||
|
PROT dir:afn - set to read write, directory, modified
|
||||||
|
PROT dir:afn R - set to read only, directory, modified
|
||||||
|
PROT dir:afn RA - set to read only, directory, archived
|
||||||
|
PROT dir:afn RASI - set to read only, system, archived,
|
||||||
|
with inspection
|
||||||
|
Examples:
|
||||||
|
PROT b7:*.com rai
|
||||||
|
PROT this.doc<6F>
|
||||||
|
:Q Command
|
||||||
|
Transient Counterpart: QUIET
|
||||||
|
|
||||||
|
Thå Ñ commanä turnó thå ZCPÒ quieô flaç oî oò off® Thå <20>
|
||||||
|
quieô flaç ió useä bù somå programó anä partó oæ thå operatinç <20>
|
||||||
|
systeí tï determinå ho÷ mucè informatioî theù shoulä displaù tï <20>
|
||||||
|
thå screen® Aó á rule¬ wheî thå quieô flaç ió on¬ programó <20>
|
||||||
|
displaù onlù erroò messageó tï thå screen® Thå syntaø is:
|
||||||
|
|
||||||
|
"Q" or "Q Dis" -- display quiet flag
|
||||||
|
"Q S" or "Q Set" -- turn quiet flag ON
|
||||||
|
Š "Q R" or "Q Reset" -- turn quiet flag OFF
|
||||||
|
|
||||||
|
:R Command
|
||||||
|
Transient Counterpart: None
|
||||||
|
|
||||||
|
Thå Ò (reset© commanä resetó á floppù disë anä displayó thå <20>
|
||||||
|
amounô oæ spacå remaining® ZSDOÓ doeó noô requirå diskó tï bå <20>
|
||||||
|
reseô witè controì-C¬ buô programó wilì reporô disë spacå <20>
|
||||||
|
properlù untiì á disë ió reset¬ anä iô ió á gooä practice® Ò <20>
|
||||||
|
alsï forceó á reseô oæ alì diskó usinç thå "fasô fixeä disë <20>
|
||||||
|
relog¢ featurå oæ ZSDOS.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
R -- Reset current disk
|
||||||
|
R b: -- Reset disk B
|
||||||
|
|
||||||
|
|
||||||
|
:REG Command
|
||||||
|
Transient Counterpart: REG
|
||||||
|
|
||||||
|
Á registeò ió á ZCPR³ buffer¬ indicateä bù á digiô froí ° tï <20>
|
||||||
|
31¬ oò thå letteò Å foò prograí Erroò byte® Thå registeró arå <20>
|
||||||
|
useä tï pasó informatioî betweeî programó oò portionó oæ thå <20>
|
||||||
|
operatinç system.
|
||||||
|
|
||||||
|
The REG command forms are:
|
||||||
|
REG D or REG = display values of first 10 registers
|
||||||
|
REG Mreg = subtract 1 from a register (Minus)
|
||||||
|
REG Preg = add 1 to a register (Plus)
|
||||||
|
REG Sreg value = set value of indicated register
|
||||||
|
REG reg = display a single register value<75>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
REG S0 4 -- reg 0 = 4
|
||||||
|
REG S12 -- reg 12 = 0
|
||||||
|
REG P -- reg 0 = reg 0 + 1
|
||||||
|
REG P5 -- reg 5 = reg 5 + 1
|
||||||
|
REG M9 -- reg 9 = reg 9 - 1
|
||||||
|
REG -- show first ten values
|
||||||
|
REG SE 0 -- zero program error byte
|
||||||
|
|
||||||
|
:REN Command
|
||||||
|
Transient Counterpart: RENAME
|
||||||
|
|
||||||
|
Thå REÎ commanä changeó thå namå oæ onå filå tï another® <20>
|
||||||
|
Thå filå nameä oî thå lefô wilì bå renameä witè thå namå tï thå <20>
|
||||||
|
right® Iæ aî equaì sigî ("="© ió used¬ thå oldeò CP/Í syntaø ió <20>
|
||||||
|
used¬ anä thå filå nameä oî thå righô ió renameä tï thå namå oî <20>
|
||||||
|
thå left® Iæ anotheò filå alreadù haó thió name¬ thå useò ió <20>
|
||||||
|
askeä whetheò oò noô tï eraså thå olä file® Thå syntaø is:
|
||||||
|
|
||||||
|
REN dir:ufn1 ufn2
|
||||||
|
REN ufn1 dir:ufn2
|
||||||
|
REN ufn2=ufn1
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
REN oldfile.txt newfile.txt
|
||||||
|
REN root:sys.rcp sys1.rcp
|
||||||
|
REN oldname work:newname
|
||||||
|
REN work:newname=oldname<6D>
|
||||||
|
:SP Command
|
||||||
|
Transient Counterpart: None (Subset of STAT)
|
||||||
|
|
||||||
|
Thå Ó commanä displayó spacå remaininç oî thå currenô oò <20>
|
||||||
|
specifieä disk.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
SP -- Display space on current disk
|
||||||
|
SP a: -- Display space on disk A
|
||||||
|
:WHL Command
|
||||||
|
Transient Counterpart: WHEEL
|
||||||
|
|
||||||
|
Thå WHÌ commanä ió useä tï turî ofæ thå Wheeì Bytå (makå <20>
|
||||||
|
thå useò noî-privileged)¬ tï turî oî thå Wheeì Bytå (makå thå <20>
|
||||||
|
useò privileged)¬ oò tï displaù thå Wheeì state® Thå syntaø is:
|
||||||
|
|
||||||
|
WHL password - Turn wheel ON if password correct,
|
||||||
|
turn wheel OFF if not.
|
||||||
|
|
||||||
|
WHL - Display wheel state
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Š
|
||||||
|
WHL
|
||||||
|
WHL mypass<73>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Bù default¬ thå followinç RCÐ commandó arå noô availablå <20>
|
||||||
|
whilå thå wheeì bytå ió off:
|
||||||
|
|
||||||
|
CP Copy a File
|
||||||
|
ERA Erase Files
|
||||||
|
LIST/TYPE Display a File on Printer/CRT
|
||||||
|
P/POKE Display/Alter Memory
|
||||||
|
PORT Input/Output to system ports
|
||||||
|
PROT Protect Files
|
||||||
|
SPOP Pop Shell Stack
|
||||||
|
REG ZCPR3 Register Display/Alter
|
||||||
|
REN Rename a File
|
||||||
|
|
||||||
|
Thå commandó dï noô appeaò iî thå È (help© display¬ anä <20>
|
||||||
|
attemptó tï uså theí invokå thå erroò handleò (iæ present© oò <20>
|
||||||
136
Source/BPBIOS/Z34RCP11/z34rcp11.new
Normal file
136
Source/BPBIOS/Z34RCP11/z34rcp11.new
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
|
||||||
|
Enhancements to the ZCPR 3.4 Resident Command Package
|
||||||
|
October 8, 1989 by Carson Wilson
|
||||||
|
|
||||||
|
The following is a description of the functional enhancements I have made
|
||||||
|
since Z34RCP10.LBR. Most of the changes are relatively minor, but several
|
||||||
|
exciting new capabilities have been added, and a few important bugs have been
|
||||||
|
fixed.
|
||||||
|
|
||||||
|
New CLED (Command Line EDitor) Command:
|
||||||
|
--------------------------------------
|
||||||
|
Rob Friefeld, author of LSH and many other excellent Z System tools, has
|
||||||
|
outdone himself with a new RCP command line editor. CLED is different from
|
||||||
|
other RCP commands, in that it is the first RCP command which also works as a
|
||||||
|
shell. By combining the memory-resident characteristics of the RCP with the
|
||||||
|
shell concept, Rob has created a command which significantly transforms the Z
|
||||||
|
System environment. CLED greatly expands the user's ability to edit and
|
||||||
|
correct command lines with such features as insert and move and delete word
|
||||||
|
left and right, but that isn't all--it also stores a queue of previous
|
||||||
|
commands (up to 203 bytes total) which can then be recalled (and edited). And
|
||||||
|
since CLED is memory-resident, there are NO time disk access penalties
|
||||||
|
involved! Please see RCPCLED.DOC for details on this exciting enhancement.
|
||||||
|
|
||||||
|
Enhancements Pertaining to Several Commands:
|
||||||
|
-------------------------------------------
|
||||||
|
1. Dynamic Quiet Flag Sensing.
|
||||||
|
|
||||||
|
I have added dynamic QUIET flag sensing to the CP, DIR, ERA, POKE, PORT, PROT,
|
||||||
|
REG, and Reset commands. These commands should now only display error
|
||||||
|
messages if QUIET is active. Otherwise they should just go about their
|
||||||
|
business with as little screen activity as possible. The only change to DIR
|
||||||
|
is that it doesn't show SPace remaining if QUIET is on (this is actually just
|
||||||
|
a side effect from ERA and CP). Note the anomaly that if QUIET is on, Reset
|
||||||
|
now operates somewhat differently on non-default drives: since SPace is no
|
||||||
|
longer called, the drive doesn't actually log back (no physical activity)
|
||||||
|
until accessed by another command. Also note that using the "Inspect" option
|
||||||
|
of ERA will produce odd results if Quiet is on: you will be prompted for each
|
||||||
|
file, but no filenames will be displayed. I don't really know an ideal
|
||||||
|
solution for this, but in general I think someone who gives their computer
|
||||||
|
contradictory instructions should expect contradictory results!
|
||||||
|
|
||||||
|
Some confusion has arisen as to the purpose of the Quiet flag. It is not, nor
|
||||||
|
was it ever intended to be, a security feature. As Richard Conn, original
|
||||||
|
author of ZCPR states on page 77 of _ZCPR3: The Manual_, if the Quiet flag is
|
||||||
|
on, certain informative messages are suppressed "in order to cut down on the
|
||||||
|
'noise' created by the command." I feel that it is far better in a security
|
||||||
|
sensitive situation to simply turn off the remote terminal using the remote
|
||||||
|
terminal software than to rely on the QUIET flag. BYE supports two system
|
||||||
|
calls which can turn off the remote console altogether (both input AND
|
||||||
|
output), and I think this a better solution where sensitive commands are
|
||||||
|
concerned than use of QUIET. For one thing, QUIET wasn't designed to disable
|
||||||
|
interruption by the remote terminal of commands such as ERA or PROT.
|
||||||
|
Additionally, control of console I/O through BYE allows ANY CP/M program to be
|
||||||
|
used "quietly." Finally, Z System programs vary somewhat in their treatment
|
||||||
|
of QUIET.
|
||||||
|
|
||||||
|
For these reasons I now consider QUIET purely a display control flag, rather
|
||||||
|
than a security device. For similar reasons, I have changed the default of
|
||||||
|
WHLQUIET to FALSE, causing WHL to display the new setting. I realize this is
|
||||||
|
a departure from recent practice, but I think the advantages in terms of
|
||||||
|
clarity, uniformity, and safety outweigh any disadvantages that may result.
|
||||||
|
|
||||||
|
2. Intelligent Error Handling
|
||||||
|
|
||||||
|
The CP, ERA, and REN commands now allow an intelligent error handler to act
|
||||||
|
differently when certain errors occur. The main idea is to allow larger, more
|
||||||
|
powerful transient equivalents of the resident commands to take over when more
|
||||||
|
features are required (much the same as CP/M Plus), but the interface also
|
||||||
|
allows other actions to be taken if desired. If the CP or REN commands detect
|
||||||
|
an ambiguous file specification, or if the ERA command detects a read-only
|
||||||
|
file, bit 4 of ZCPR's command status flag (CST) is set before chaining to the
|
||||||
|
error handler (if installed). Newer error handlers will bypass normal error
|
||||||
|
handling when this bit is set, instead prepending a user-installable string to
|
||||||
|
the original command and re-executing the new command. Typically, the new
|
||||||
|
string will be a single colon, or a drive, user, or directory name.
|
||||||
|
|
||||||
|
For example, in order to save memory, the RCP CP command will not copy
|
||||||
|
multiple files, and the command
|
||||||
|
|
||||||
|
CP *.* B:
|
||||||
|
|
||||||
|
normally results in an error. However, if the error handler is configured to
|
||||||
|
recognize CST bit 4, it prepends a ":" to the original command, resulting in
|
||||||
|
|
||||||
|
:CP *.* B:
|
||||||
|
|
||||||
|
Because a leading colon (or directory specification) causes ZCPR to skip
|
||||||
|
resident command processing, a search is now made for a command file named
|
||||||
|
"CP". By storing a more powerful copy program under this name at the current
|
||||||
|
directory (or along the path if available), you can use this feature to invoke
|
||||||
|
the transient program only when needed, using the faster resident command for
|
||||||
|
single files.
|
||||||
|
|
||||||
|
A similar approach can be used with the ERA and REN commands.
|
||||||
|
|
||||||
|
Since any string of up to 9 characters can be installed to prepend the errant
|
||||||
|
commands, you can also gain even greater control by prepending the command
|
||||||
|
with "/" (or "ARUNZ ") to invoke ARUNZ with an arbitrary command (or no
|
||||||
|
command at all) for each CP, ERA, and/or REN. See ZERRxx.LBR for details on
|
||||||
|
how to install the error handler.
|
||||||
|
|
||||||
|
|
||||||
|
Enhancements Pertaining to Specific Commands:
|
||||||
|
--------------------------------------------
|
||||||
|
(Selectable = may be deselected at assembly time)
|
||||||
|
|
||||||
|
Cmnd Selectable Enhancement(s):
|
||||||
|
---- ---------- --------------------------------------------------------------
|
||||||
|
CLED - New command.
|
||||||
|
|
||||||
|
CP - Now works properly with Z3PLUS.
|
||||||
|
- Now properly sets destination datestamps of multiple-extent
|
||||||
|
files.
|
||||||
|
|
||||||
|
D - Now allows the syntax "DIR [dir:].aft" to display all files
|
||||||
|
matching a filetype (e.g., "D .COM now the same as "D *.COM").
|
||||||
|
|
||||||
|
H - RCP name now appended with 'C' if CLED is included.
|
||||||
|
|
||||||
|
Q - Now "Q R[eset]" and "Q S[et]" just reset and set quiet
|
||||||
|
status without showing it, and Q alone (or with any other
|
||||||
|
character, e.g., "Q ?") always just shows status.
|
||||||
|
* - No longer wheel protected.
|
||||||
|
|
||||||
|
R - Revised to work properly with ZRDOS.
|
||||||
|
- Now properly resets individual drives under Z3PLUS.
|
||||||
|
|
||||||
|
SP * - Command name changed from 'S'.
|
||||||
|
|
||||||
|
SPOP - New command.
|
||||||
|
|
||||||
|
TYPE - Control characters other than ^I, ^M, and ^J are filtered out,
|
||||||
|
allowing legible display of WordStar files.
|
||||||
|
|
||||||
|
WHL * - Now always reports Wheel status.
|
||||||
|
|
||||||
268
Source/BPBIOS/Z34RCP11/z34rcp11.z80
Normal file
268
Source/BPBIOS/Z34RCP11/z34rcp11.z80
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
|
||||||
|
; Program: Z34RCP
|
||||||
|
; Description: Resident Command Package (RCP) for ZCPR34
|
||||||
|
; Version: 1.3
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: September 13, 1989
|
||||||
|
; Changes: Added CLED (command line editor shell) command.
|
||||||
|
; To save space, JetLDR ID section no longer pads end of each
|
||||||
|
; line. (JetLDR allows only 256 bytes maximum in its
|
||||||
|
; description field).
|
||||||
|
|
||||||
|
; Version: 1.2
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: July 9, 1989
|
||||||
|
; Changes: Uses spaces instead of tabs in JetLDR displays.
|
||||||
|
; Copyright now ZSA.
|
||||||
|
|
||||||
|
; Version: 1.1
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: September 14, 1988
|
||||||
|
; Changes: RCPID macro called from RCPID.LIB so that the final INCLUDE
|
||||||
|
; macro call gives total size of the RCP, including the ID
|
||||||
|
; string, with SLR assemblers.
|
||||||
|
; Label WHLQ changed to WHLQUIET in Option macro to match
|
||||||
|
; Z34HDR.LIB equate.
|
||||||
|
|
||||||
|
; Version: 1.0
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: June 15, 1988
|
||||||
|
|
||||||
|
; Derivation: SYSRCP (Richard Conn)
|
||||||
|
|
||||||
|
; Z34RCP is copyright 1989 by Z Systems Associates. All rights reserved.
|
||||||
|
; End-user distribution and duplication permitted for non-commercial purposes
|
||||||
|
; only. Any commercial use of Z34RCP, defined as any situation where the
|
||||||
|
; duplicator recieves revenue by duplicating or distributing Z34RCP by itself
|
||||||
|
; or in conjunction with any hardware or software product, is expressly
|
||||||
|
; prohibited unless authorized in writing by Z Systems Associates.
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; D E F I N I T I O N S S E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
maclib sysdef.lib ; Common logic, sys, ascii defines
|
||||||
|
maclib z34defn.lib ; Defines offsets in Z34 command processor
|
||||||
|
maclib z34mac.lib ; Macros
|
||||||
|
maclib z34rcp.lib ; Defines command options
|
||||||
|
|
||||||
|
if ZRL
|
||||||
|
maclib z34cmn.lib ; Defines universal ZCPR named common blocks
|
||||||
|
else
|
||||||
|
maclib rcpbase.lib ; Defines addresses for one system
|
||||||
|
endif
|
||||||
|
|
||||||
|
name RCP11 ; Declare module name
|
||||||
|
|
||||||
|
; ============================================================================
|
||||||
|
|
||||||
|
; M A C R O S S E C T I O N
|
||||||
|
|
||||||
|
; ============================================================================
|
||||||
|
|
||||||
|
; Macros to include module file and print module length.
|
||||||
|
; Under SLR and compatible assemblers, a running account of current RCP
|
||||||
|
; size and bytes added will be given for each module.
|
||||||
|
;
|
||||||
|
; For other assemblers you may have to either modify the non-SLR include
|
||||||
|
; macro or use a text editor to read in the actual contents of each file
|
||||||
|
; in place of the include statement.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
;
|
||||||
|
; General purpose macro to display decimal values and messages
|
||||||
|
;
|
||||||
|
prtdec macro m1,m2,m3,m4,m5
|
||||||
|
.radix 10 ; Decimal output
|
||||||
|
.printx m1 m2 m3 m4 m5 ; Print to screen
|
||||||
|
endm
|
||||||
|
;
|
||||||
|
; Macro to include modules and display lengths.
|
||||||
|
;
|
||||||
|
include macro filename
|
||||||
|
before defl $
|
||||||
|
$include filename&.lib
|
||||||
|
after defl $
|
||||||
|
modlen defl after - before ; Module length
|
||||||
|
rcplen defl after - RCPbegin ; RCP length
|
||||||
|
recs defl rcplen / 128 ; ..in records
|
||||||
|
bytes defl rcplen mod 128 ; ..and additional bytes
|
||||||
|
prtdec %modlen,<bytes added by filename&>
|
||||||
|
prtdec <Current length is>,%recs,<records>,%bytes,<bytes.>
|
||||||
|
prtdec ; Trailing CRLF
|
||||||
|
endm
|
||||||
|
|
||||||
|
else ; Non-SLR assemblers
|
||||||
|
include macro filename
|
||||||
|
$include filename&.lib
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
|
||||||
|
if ZRL
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
; J e t L D R I D S E C T I O N
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
; Macro to build ID block message for JetLDR. Max. length is ~256 chars.
|
||||||
|
|
||||||
|
optcnt defl 0 ; Options counter
|
||||||
|
|
||||||
|
option macro string1,enable1,string2,enable2
|
||||||
|
|
||||||
|
if enable1 ;; Skip if command not present
|
||||||
|
if [optcnt mod 4] eq 0
|
||||||
|
db cr,lf ;; New line every four options
|
||||||
|
endif
|
||||||
|
optcnt defl optcnt + 1 ;; Increment options counter
|
||||||
|
count defl 0 ;; Initialize character count
|
||||||
|
|
||||||
|
irpc char,string1 ;; Count and define characters
|
||||||
|
count defl count + 1
|
||||||
|
db '&char'
|
||||||
|
endm ; irpc
|
||||||
|
|
||||||
|
if not nul enable2 ;; Sub-option label present
|
||||||
|
if enable2 ;; Sub-option enabled
|
||||||
|
db ' (' ;; Begin sub-opt description
|
||||||
|
irpc char,string2 ;; Count and define characters
|
||||||
|
count defl count + 1
|
||||||
|
db '&char'
|
||||||
|
endm ; irpc
|
||||||
|
db ')' ;; End sub-opt description
|
||||||
|
count defl count + 3 ;; For ' ()'
|
||||||
|
endif ; enable2
|
||||||
|
endif ; not nul enable2
|
||||||
|
|
||||||
|
if [optcnt mod 4] ne 0
|
||||||
|
count defl 11 - count
|
||||||
|
rept count
|
||||||
|
db ' ' ;; Pad to 11 spaces
|
||||||
|
endm ; rept
|
||||||
|
endif ; [optcnt mod 4] ne 0
|
||||||
|
|
||||||
|
endif ; enable1
|
||||||
|
endm ; option macro
|
||||||
|
|
||||||
|
; ---------------------------------------------------------
|
||||||
|
|
||||||
|
COM /_ID_/ ; JetLDR ID block
|
||||||
|
db 'Copr. 1989 ZSA. Enabled Commands:'
|
||||||
|
option Cled,cledon
|
||||||
|
option Cls,clson,TC,clstcap
|
||||||
|
option Cp,cpon,stp,stpcall
|
||||||
|
option Dir,diron,sp,<spaceon and dirsp>
|
||||||
|
option Echo,echoon,lst,echolst
|
||||||
|
option Era,eraon,sp,<spaceon and erasp>
|
||||||
|
option Help,true
|
||||||
|
option List,liston
|
||||||
|
option Note,noteon
|
||||||
|
option Peek,peekon,hdr,peekhdr
|
||||||
|
; option Poke,pokeon,q,pokeq
|
||||||
|
option Poke,pokeon
|
||||||
|
option Port,porton
|
||||||
|
option Protect,proton
|
||||||
|
option Quiet,quieton
|
||||||
|
option Register,regon
|
||||||
|
option Rename,renon
|
||||||
|
option Reset,reson,sp,<spaceon and resetsp>
|
||||||
|
option Space,spaceon
|
||||||
|
option Spop,cledon
|
||||||
|
option Type,lton,cls,<clson and typecls>
|
||||||
|
option Wheel,whlon,q,whlquiet
|
||||||
|
db 0 ; ID string terminator
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; E N T R Y C O D E S E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
cseg
|
||||||
|
else
|
||||||
|
org z3rcp
|
||||||
|
endif ; ZRL
|
||||||
|
|
||||||
|
RCPbegin:
|
||||||
|
db 'Z3RCP' ; Package ID
|
||||||
|
|
||||||
|
include RCPcmd ; Command table and custom commands
|
||||||
|
|
||||||
|
include RCPsubs ; File of subroutines
|
||||||
|
|
||||||
|
include RCPh ; 'H' help (command list) command
|
||||||
|
|
||||||
|
; Include only selected code sections.
|
||||||
|
|
||||||
|
if cledon ; 'CLED' and 'SPOP' commands
|
||||||
|
include RCPcled
|
||||||
|
endif ;cledon
|
||||||
|
|
||||||
|
if clson
|
||||||
|
include RCPcls ; 'CLS' clear screen command
|
||||||
|
endif ;clson
|
||||||
|
|
||||||
|
if reson
|
||||||
|
include RCPr ; 'R' disk reset command
|
||||||
|
endif ;reson
|
||||||
|
|
||||||
|
if spaceon
|
||||||
|
include RCPsp ; 'SP' space on disk command
|
||||||
|
endif ;spaceon
|
||||||
|
|
||||||
|
if diron
|
||||||
|
include RCPdir ; 'DIR' directory command
|
||||||
|
endif ;diron
|
||||||
|
|
||||||
|
if eraon
|
||||||
|
include RCPera ; 'ERA' erase command
|
||||||
|
endif ;eraon
|
||||||
|
|
||||||
|
if renon
|
||||||
|
include RCPren ; 'REN' rename command
|
||||||
|
endif ;renon
|
||||||
|
|
||||||
|
if cpon
|
||||||
|
include RCPcp ; 'CP' file copying command
|
||||||
|
endif ;cpon
|
||||||
|
|
||||||
|
if echoon
|
||||||
|
include RCPecho ; 'ECHO' command
|
||||||
|
endif ;echoon
|
||||||
|
|
||||||
|
if quieton
|
||||||
|
include RCPquiet ; 'Q' quiet flag
|
||||||
|
endif ;quieton
|
||||||
|
|
||||||
|
if lton
|
||||||
|
include RCPlt ; 'LIST' and 'TYPE' commands
|
||||||
|
endif ;lton
|
||||||
|
|
||||||
|
if proton
|
||||||
|
include RCPprot ; 'PROT' file attribute setting command
|
||||||
|
endif ;proton
|
||||||
|
|
||||||
|
if peekon or pokeon or porton
|
||||||
|
include RCPiom ; 'PEEK', 'POKE', 'PORT' commands
|
||||||
|
endif ;peekon or pokeon or porton
|
||||||
|
|
||||||
|
if regon
|
||||||
|
include RCPreg ; 'REG' register operation commands
|
||||||
|
endif ;regon
|
||||||
|
|
||||||
|
if whlon
|
||||||
|
include RCPwhl ; 'WHL' command
|
||||||
|
endif ;whlon
|
||||||
|
|
||||||
|
include RCPid ; Add ID string (must come last)
|
||||||
|
|
||||||
|
RCPend: ; Used to calculate length
|
||||||
|
end
|
||||||
|
|
||||||
|
; End of Z34RCP.Z80
|
||||||
|
|
||||||
267
Source/BPBIOS/Z34RCP11/z34rcp11.z80.sav
Normal file
267
Source/BPBIOS/Z34RCP11/z34rcp11.z80.sav
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
|
||||||
|
; Program: Z34RCP
|
||||||
|
; Description: Resident Command Package (RCP) for ZCPR34
|
||||||
|
; Version: 1.3
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: September 13, 1989
|
||||||
|
; Changes: Added CLED (command line editor shell) command.
|
||||||
|
; To save space, JetLDR ID section no longer pads end of each
|
||||||
|
; line. (JetLDR allows only 256 bytes maximum in its
|
||||||
|
; description field).
|
||||||
|
|
||||||
|
; Version: 1.2
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: July 9, 1989
|
||||||
|
; Changes: Uses spaces instead of tabs in JetLDR displays.
|
||||||
|
; Copyright now ZSA.
|
||||||
|
|
||||||
|
; Version: 1.1
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: September 14, 1988
|
||||||
|
; Changes: RCPID macro called from RCPID.LIB so that the final INCLUDE
|
||||||
|
; macro call gives total size of the RCP, including the ID
|
||||||
|
; string, with SLR assemblers.
|
||||||
|
; Label WHLQ changed to WHLQUIET in Option macro to match
|
||||||
|
; Z34HDR.LIB equate.
|
||||||
|
|
||||||
|
; Version: 1.0
|
||||||
|
; Author: Carson Wilson
|
||||||
|
; Date: June 15, 1988
|
||||||
|
|
||||||
|
; Derivation: SYSRCP (Richard Conn)
|
||||||
|
|
||||||
|
; Z34RCP is copyright 1989 by Z Systems Associates. All rights reserved.
|
||||||
|
; End-user distribution and duplication permitted for non-commercial purposes
|
||||||
|
; only. Any commercial use of Z34RCP, defined as any situation where the
|
||||||
|
; duplicator recieves revenue by duplicating or distributing Z34RCP by itself
|
||||||
|
; or in conjunction with any hardware or software product, is expressly
|
||||||
|
; prohibited unless authorized in writing by Z Systems Associates.
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; D E F I N I T I O N S S E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
maclib sysdef.lib ; Common logic, sys, ascii defines
|
||||||
|
maclib z34defn.lib ; Defines offsets in Z34 command processor
|
||||||
|
maclib z34mac.lib ; Macros
|
||||||
|
maclib z34rcp.lib ; Defines command options
|
||||||
|
|
||||||
|
if ZRL
|
||||||
|
maclib z34cmn.lib ; Defines universal ZCPR named common blocks
|
||||||
|
else
|
||||||
|
maclib rcpbase.lib ; Defines addresses for one system
|
||||||
|
endif
|
||||||
|
|
||||||
|
name RCP11 ; Declare module name
|
||||||
|
|
||||||
|
; ============================================================================
|
||||||
|
|
||||||
|
; M A C R O S S E C T I O N
|
||||||
|
|
||||||
|
; ============================================================================
|
||||||
|
|
||||||
|
; Macros to include module file and print module length.
|
||||||
|
; Under SLR and compatible assemblers, a running account of current RCP
|
||||||
|
; size and bytes added will be given for each module.
|
||||||
|
;
|
||||||
|
; For other assemblers you may have to either modify the non-SLR include
|
||||||
|
; macro or use a text editor to read in the actual contents of each file
|
||||||
|
; in place of the include statement.
|
||||||
|
|
||||||
|
if SLR
|
||||||
|
;
|
||||||
|
; General purpose macro to display decimal values and messages
|
||||||
|
;
|
||||||
|
prtdec macro m1,m2,m3,m4,m5
|
||||||
|
.radix 10 ; Decimal output
|
||||||
|
.printx m1 m2 m3 m4 m5 ; Print to screen
|
||||||
|
endm
|
||||||
|
;
|
||||||
|
; Macro to include modules and display lengths.
|
||||||
|
;
|
||||||
|
include macro filename
|
||||||
|
before defl $
|
||||||
|
$include filename&.lib
|
||||||
|
after defl $
|
||||||
|
modlen defl after - before ; Module length
|
||||||
|
rcplen defl after - RCPbegin ; RCP length
|
||||||
|
recs defl rcplen / 128 ; ..in records
|
||||||
|
bytes defl rcplen mod 128 ; ..and additional bytes
|
||||||
|
prtdec %modlen,<bytes added by filename&>
|
||||||
|
prtdec <Current length is>,%recs,<records>,%bytes,<bytes.>
|
||||||
|
prtdec ; Trailing CRLF
|
||||||
|
endm
|
||||||
|
|
||||||
|
else ; Non-SLR assemblers
|
||||||
|
include macro filename
|
||||||
|
$include filename&.lib
|
||||||
|
endm
|
||||||
|
endif ; SLR
|
||||||
|
|
||||||
|
|
||||||
|
if ZRL
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
; J e t L D R I D S E C T I O N
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
; Macro to build ID block message for JetLDR. Max. length is ~256 chars.
|
||||||
|
|
||||||
|
optcnt defl 0 ; Options counter
|
||||||
|
|
||||||
|
option macro string1,enable1,string2,enable2
|
||||||
|
|
||||||
|
if enable1 ;; Skip if command not present
|
||||||
|
if [optcnt mod 4] eq 0
|
||||||
|
db cr,lf ;; New line every four options
|
||||||
|
endif
|
||||||
|
optcnt defl optcnt + 1 ;; Increment options counter
|
||||||
|
count defl 0 ;; Initialize character count
|
||||||
|
|
||||||
|
irpc char,string1 ;; Count and define characters
|
||||||
|
count defl count + 1
|
||||||
|
db '&char'
|
||||||
|
endm ; irpc
|
||||||
|
|
||||||
|
if not nul enable2 ;; Sub-option label present
|
||||||
|
if enable2 ;; Sub-option enabled
|
||||||
|
db ' (' ;; Begin sub-opt description
|
||||||
|
irpc char,string2 ;; Count and define characters
|
||||||
|
count defl count + 1
|
||||||
|
db '&char'
|
||||||
|
endm ; irpc
|
||||||
|
db ')' ;; End sub-opt description
|
||||||
|
count defl count + 3 ;; For ' ()'
|
||||||
|
endif ; enable2
|
||||||
|
endif ; not nul enable2
|
||||||
|
|
||||||
|
if [optcnt mod 4] ne 0
|
||||||
|
count defl 11 - count
|
||||||
|
rept count
|
||||||
|
db ' ' ;; Pad to 11 spaces
|
||||||
|
endm ; rept
|
||||||
|
endif ; [optcnt mod 4] ne 0
|
||||||
|
|
||||||
|
endif ; enable1
|
||||||
|
endm ; option macro
|
||||||
|
|
||||||
|
; ---------------------------------------------------------
|
||||||
|
|
||||||
|
COM /_ID_/ ; JetLDR ID block
|
||||||
|
db 'Copr. 1989 ZSA. Enabled Commands:'
|
||||||
|
option Cled,cledon
|
||||||
|
option Cls,clson,TC,clstcap
|
||||||
|
option Cp,cpon,stp,stpcall
|
||||||
|
option Dir,diron,sp,<spaceon and dirsp>
|
||||||
|
option Echo,echoon,lst,echolst
|
||||||
|
option Era,eraon,sp,<spaceon and erasp>
|
||||||
|
option Help,true
|
||||||
|
option List,liston
|
||||||
|
option Note,noteon
|
||||||
|
option Peek,peekon,hdr,peekhdr
|
||||||
|
option Poke,pokeon,q,pokeq
|
||||||
|
option Port,porton
|
||||||
|
option Protect,proton
|
||||||
|
option Quiet,quieton
|
||||||
|
option Register,regon
|
||||||
|
option Rename,renon
|
||||||
|
option Reset,reson,sp,<spaceon and resetsp>
|
||||||
|
option Space,spaceon
|
||||||
|
option Spop,cledon
|
||||||
|
option Type,lton,cls,<clson and typecls>
|
||||||
|
option Wheel,whlon,q,whlquiet
|
||||||
|
db 0 ; ID string terminator
|
||||||
|
|
||||||
|
;=============================================================================
|
||||||
|
;
|
||||||
|
; E N T R Y C O D E S E C T I O N
|
||||||
|
;
|
||||||
|
;=============================================================================
|
||||||
|
|
||||||
|
cseg
|
||||||
|
else
|
||||||
|
org z3rcp
|
||||||
|
endif ; ZRL
|
||||||
|
|
||||||
|
RCPbegin:
|
||||||
|
db 'Z3RCP' ; Package ID
|
||||||
|
|
||||||
|
include RCPcmd ; Command table and custom commands
|
||||||
|
|
||||||
|
include RCPsubs ; File of subroutines
|
||||||
|
|
||||||
|
include RCPh ; 'H' help (command list) command
|
||||||
|
|
||||||
|
; Include only selected code sections.
|
||||||
|
|
||||||
|
if cledon ; 'CLED' and 'SPOP' commands
|
||||||
|
include RCPcled
|
||||||
|
endif ;cledon
|
||||||
|
|
||||||
|
if clson
|
||||||
|
include RCPcls ; 'CLS' clear screen command
|
||||||
|
endif ;clson
|
||||||
|
|
||||||
|
if reson
|
||||||
|
include RCPr ; 'R' disk reset command
|
||||||
|
endif ;reson
|
||||||
|
|
||||||
|
if spaceon
|
||||||
|
include RCPsp ; 'SP' space on disk command
|
||||||
|
endif ;spaceon
|
||||||
|
|
||||||
|
if diron
|
||||||
|
include RCPdir ; 'DIR' directory command
|
||||||
|
endif ;diron
|
||||||
|
|
||||||
|
if eraon
|
||||||
|
include RCPera ; 'ERA' erase command
|
||||||
|
endif ;eraon
|
||||||
|
|
||||||
|
if renon
|
||||||
|
include RCPren ; 'REN' rename command
|
||||||
|
endif ;renon
|
||||||
|
|
||||||
|
if cpon
|
||||||
|
include RCPcp ; 'CP' file copying command
|
||||||
|
endif ;cpon
|
||||||
|
|
||||||
|
if echoon
|
||||||
|
include RCPecho ; 'ECHO' command
|
||||||
|
endif ;echoon
|
||||||
|
|
||||||
|
if quieton
|
||||||
|
include RCPquiet ; 'Q' quiet flag
|
||||||
|
endif ;quieton
|
||||||
|
|
||||||
|
if lton
|
||||||
|
include RCPlt ; 'LIST' and 'TYPE' commands
|
||||||
|
endif ;lton
|
||||||
|
|
||||||
|
if proton
|
||||||
|
include RCPprot ; 'PROT' file attribute setting command
|
||||||
|
endif ;proton
|
||||||
|
|
||||||
|
if peekon or pokeon or porton
|
||||||
|
include RCPiom ; 'PEEK', 'POKE', 'PORT' commands
|
||||||
|
endif ;peekon or pokeon or porton
|
||||||
|
|
||||||
|
if regon
|
||||||
|
include RCPreg ; 'REG' register operation commands
|
||||||
|
endif ;regon
|
||||||
|
|
||||||
|
if whlon
|
||||||
|
include RCPwhl ; 'WHL' command
|
||||||
|
endif ;whlon
|
||||||
|
|
||||||
|
include RCPid ; Add ID string (must come last)
|
||||||
|
|
||||||
|
RCPend: ; Used to calculate length
|
||||||
|
end
|
||||||
|
|
||||||
|
; End of Z34RCP.Z80
|
||||||
|
|
||||||
97
Source/BPBIOS/Z34RCP11/zsystem.ad
Normal file
97
Source/BPBIOS/Z34RCP11/zsystem.ad
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
Z System Upgrades CP/M
|
||||||
|
|
||||||
|
Z System is first-rate, state-of-the-art software for your CP/M machine.
|
||||||
|
ZCPR has been with us for over five years now, and has enhanced computer
|
||||||
|
productivity for thousands of CP/M users. Z System is now a mature
|
||||||
|
replacement for CP/M 2.2 or CP/M Plus, yet is "backward compatible" with
|
||||||
|
almost all programs written for CP/M. This means that you can still run
|
||||||
|
the CP/M programs you now use, yet take advantage of greatly increased
|
||||||
|
power and performance at the same time.
|
||||||
|
|
||||||
|
NZ-COM and Z3PLUS form the heart of Z System. They replace the most
|
||||||
|
visible parts of CP/M 2.2 and CP/M Plus respectively, adding enhanced
|
||||||
|
command processing, named directories, vastly improved resident
|
||||||
|
commands, flow control processing, error handling, and much more. But
|
||||||
|
it isn't necessary to master all of these (at least at first!) to take
|
||||||
|
advantage of NZ-COM and Z3PLUS. In fact, though both packages come with
|
||||||
|
several disks of software and excellent manuals, almost anyone can
|
||||||
|
install either of these packages on their CP/M computer in just a few
|
||||||
|
minutes' time. The price for either NZ-COM or Z3PLUS is $69.95 plus $3
|
||||||
|
shipping.
|
||||||
|
|
||||||
|
The next step up in sophistication for CP/M 2.2 users is ZSDOS. ZSDOS
|
||||||
|
replaces the less visible portion of CP/M 2.2 which controls program
|
||||||
|
input and output. Through clever coding and exhaustive testing, the
|
||||||
|
authors of ZSDOS offer significant improvements in performance, safety,
|
||||||
|
and versatility for CP/M 2.2, including file time and date stamping,
|
||||||
|
file archiving for faster backups, public files (accessable from all
|
||||||
|
user areas), path access to files, and improved error messages and
|
||||||
|
handling. As with NZ-COM and Z3PLUS, ZSDOS installation is completely
|
||||||
|
menu-driven. ZSDOS comes with a collection of state-of-the-art utility
|
||||||
|
programs and a 140 page manual to help you make the most of the extended
|
||||||
|
features. ZSDOS costs $75 ($60 when purchased with NZ-COM) plus $3
|
||||||
|
shipping.
|
||||||
|
|
||||||
|
Another path to system enhancement for CP/M 2.2 users with hard or RAM
|
||||||
|
disks is available in the form of BackGrounder ii (BGii). BGii allows
|
||||||
|
you to "suspend" any program at the touch of a button and use a wide
|
||||||
|
range of resident commands such as DIR, REN, ERA, CALC, or TYPE. Then
|
||||||
|
hit the button again and BGii quickly returns you to the program you
|
||||||
|
suspended, right where you left off. Or use BGii's SWAP command and
|
||||||
|
you're back at the CP/M prompt, ready to run any other CP/M program.
|
||||||
|
When you're through, SWAP again and BGii returns you to your original
|
||||||
|
program, exactly as you left it! Advanced "Cut" and "Paste" commands
|
||||||
|
are also available for many terminals, allowing you to transfer sections
|
||||||
|
of screen directly from one program to another. Print spooling,
|
||||||
|
advanced key redefinition and recording capabilities, and a beautifully
|
||||||
|
designed 140-page user's manual are included. Installation is
|
||||||
|
menu-driven and easy. BGii is compatible with either ZCPR or CP/M 2.2,
|
||||||
|
and costs $75.00 plus $3 shipping.
|
||||||
|
|
||||||
|
Last but not least is DosDisk, a small but powerful program which allows
|
||||||
|
you to read or write DIRECTLY to MS-DOS disks with your CP/M computer.
|
||||||
|
No more file transfers--simply insert a standard MS-DOS DSDD diskette in
|
||||||
|
your CP/M machine, type "DosDisk <drive>:", and away you go--all files
|
||||||
|
on the diskette are now accessable by all of your CP/M programs--even
|
||||||
|
files in MS-DOS subdirectories! DosDisk comes with a handsome 38-page
|
||||||
|
user's manual, and is available preconfigured for most machines at just
|
||||||
|
$30.00 plus $3 shipping. DosDisk is compatible with either ZCPR or
|
||||||
|
CP/M 2.2.
|
||||||
|
|
||||||
|
These and other fine products for CP/M and CP/M Plus are available from
|
||||||
|
users groups around the country, or directly from Z Systems Associates.
|
||||||
|
Sizeable discounts for users' groups are also available from Z Systems
|
||||||
|
Associates through the Z Plan. The Z Systems Associates are:
|
||||||
|
|
||||||
|
Sage Microsystems East
|
||||||
|
Selling & Supporting the Best in 8-Bit Software
|
||||||
|
1435 Centre St., Newton Centre, MA 02159-2469
|
||||||
|
Voice: 617/965-3552 (9:00am - 11:30pm)
|
||||||
|
Modem: 617/965-7259 (password = DDT)(MABOS on PC-Pursuit)
|
||||||
|
|
||||||
|
Same-day shipping of most products with modem download and support
|
||||||
|
available. Order by phone, mail, or modem. Shipping and handling $4
|
||||||
|
per order (USA). Check, VISA, or MasterCard. Specify exact disk format.
|
||||||
|
|
||||||
|
and:
|
||||||
|
|
||||||
|
Plu*Perfect Systems
|
||||||
|
"==World-Class Software"
|
||||||
|
410 23rd Street, Santa Monica, CA 90402
|
||||||
|
Voice: 213/393-6105 (evenings)
|
||||||
|
Modem: 213/670-9465 (leave message for "Bridger Mitchell")
|
||||||
|
|
||||||
|
To order: Specify product, operating system, computer, 5 1/4" disk
|
||||||
|
format. Enclose check, adding $3 shipping ($5 foreign) + 6.5% tax in
|
||||||
|
California. Enclose invoice if upgrading BGii or ZRDOS.
|
||||||
|
|
||||||
|
For more information on Z System, check at the above bulletin board
|
||||||
|
systems, or consult The Computer Journal for excellent articles on ZCPR
|
||||||
|
and CP/M. The Computer Journal is published six times a year by
|
||||||
|
Publishing Consultants, 190 Sullivan Crossroad, Columbia Falls, MT
|
||||||
|
59912, phone 406/257-9119. An issue averages forty pages with few ads.
|
||||||
|
Subscription rates are $16 for one year (6 issues), or $28 for two years
|
||||||
|
(12 issues) in the U.S., $22 for one year Canada and Mexico, and $24
|
||||||
|
(surface) for one year in other countries.
|
||||||
|
|
||||||
@@ -11,6 +11,11 @@
|
|||||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
|
||||||
CSEG
|
CSEG
|
||||||
|
|
||||||
|
; Table has been reordered so that hard disk entries come before
|
||||||
|
; floppy entries. This means that "DRV_A" appears as I: and "DRV_E"
|
||||||
|
; appears as A:. The point is to allow booting from the first
|
||||||
|
; hard drive which pretty much needs to be A:
|
||||||
|
|
||||||
DPHTBL:
|
DPHTBL:
|
||||||
IF DRV_E AND HARDDSK
|
IF DRV_E AND HARDDSK
|
||||||
@@ -34,27 +39,6 @@ DPHTBL:
|
|||||||
DEFW 00
|
DEFW 00
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF DRV_A
|
|
||||||
DEFW DPH$00 ; Dph for drive A (Floppy)
|
|
||||||
ELSE
|
|
||||||
DEFW 00
|
|
||||||
ENDIF
|
|
||||||
IF DRV_B
|
|
||||||
DEFW DPH$01 ; Dph for drive B (Floppy)
|
|
||||||
ELSE
|
|
||||||
DEFW 00
|
|
||||||
ENDIF
|
|
||||||
IF DRV_C
|
|
||||||
DEFW DPH$02 ; Dph for drive C (Floppy)
|
|
||||||
ELSE
|
|
||||||
DEFW 00
|
|
||||||
ENDIF
|
|
||||||
IF DRV_D
|
|
||||||
DEFW DPH$03 ; Dph for drive D (Floppy)
|
|
||||||
ELSE
|
|
||||||
DEFW 0 ; Dph for drive D
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
IF DRV_I AND HARDDSK
|
IF DRV_I AND HARDDSK
|
||||||
DEFW DPH$54 ; Dph for Hard drive Partition I
|
DEFW DPH$54 ; Dph for Hard drive Partition I
|
||||||
ELSE
|
ELSE
|
||||||
@@ -76,6 +60,27 @@ DPHTBL:
|
|||||||
DEFW 00
|
DEFW 00
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF DRV_A
|
||||||
|
DEFW DPH$00 ; Dph for drive A (Floppy)
|
||||||
|
ELSE
|
||||||
|
DEFW 00
|
||||||
|
ENDIF
|
||||||
|
IF DRV_B
|
||||||
|
DEFW DPH$01 ; Dph for drive B (Floppy)
|
||||||
|
ELSE
|
||||||
|
DEFW 00
|
||||||
|
ENDIF
|
||||||
|
IF DRV_C
|
||||||
|
DEFW DPH$02 ; Dph for drive C (Floppy)
|
||||||
|
ELSE
|
||||||
|
DEFW 00
|
||||||
|
ENDIF
|
||||||
|
IF DRV_D
|
||||||
|
DEFW DPH$03 ; Dph for drive D (Floppy)
|
||||||
|
ELSE
|
||||||
|
DEFW 0 ; Dph for drive D
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF DRV_M AND RAMDSK
|
IF DRV_M AND RAMDSK
|
||||||
DEFW DPH$90 ; Dph for RAM Drive M in DPHM-xx.Z80
|
DEFW DPH$90 ; Dph for RAM Drive M in DPHM-xx.Z80
|
||||||
ELSE
|
ELSE
|
||||||
|
|||||||
@@ -189,7 +189,8 @@ HDSK_RW1:
|
|||||||
POP BC ; RESTORE INCOMING FUNCTION, DEVICE/UNIT
|
POP BC ; RESTORE INCOMING FUNCTION, DEVICE/UNIT
|
||||||
RET NZ ; ABORT IF SEEK RETURNED AN ERROR W/ ERROR IN A
|
RET NZ ; ABORT IF SEEK RETURNED AN ERROR W/ ERROR IN A
|
||||||
LD HL,(HB_DSKBUF) ; GET BUFFER ADDRESS
|
LD HL,(HB_DSKBUF) ; GET BUFFER ADDRESS
|
||||||
LD DE,1 ; TRANSFER ONE SECTOR
|
LD D,BID_HB ; BUFFER IN HBIOS BANK
|
||||||
|
LD E,1 ; ONE SECTOR
|
||||||
CALL HBX_INVOKE ; DO IT
|
CALL HBX_INVOKE ; DO IT
|
||||||
OR A ; SET FLAGS
|
OR A ; SET FLAGS
|
||||||
RET Z ; DONE IF NO ERROR
|
RET Z ; DONE IF NO ERROR
|
||||||
|
|||||||
@@ -194,6 +194,9 @@ HBX_ROM:
|
|||||||
|
|
||||||
IF MK4
|
IF MK4
|
||||||
RLCA
|
RLCA
|
||||||
|
JR NC,HBX_BNKSEL1
|
||||||
|
XOR 00100001B
|
||||||
|
HBX_BNKSEL1:
|
||||||
RLCA
|
RLCA
|
||||||
RLCA
|
RLCA
|
||||||
OUT0 (CPU_BBR),A
|
OUT0 (CPU_BBR),A
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ HBCLK EQU YES ; HBIOS clock driver
|
|||||||
;
|
;
|
||||||
; Set HB_IODEV to appropriate console device
|
; Set HB_IODEV to appropriate console device
|
||||||
;
|
;
|
||||||
HB_IODEV EQU 0
|
HB_IODEV EQU 0 ; Assume we want to use first HBIOS serial device
|
||||||
;
|
;
|
||||||
; Set HB_HDDEV to appropriate hard disk driver
|
; Set HB_HDDEV to appropriate hard disk driver
|
||||||
;
|
;
|
||||||
HB_HDDEV EQU 2
|
HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device
|
||||||
;
|
;
|
||||||
; Set HB_MDDEV to appropriate memory disk driver
|
; Set HB_MDDEV to appropriate memory disk driver
|
||||||
;
|
;
|
||||||
HB_MDDEV EQU 0
|
HB_MDDEV EQU 0 ; Assumes disk device #0 is ROM disk device
|
||||||
;
|
;
|
||||||
; RAM/ROM disk sizes expressed as count of 2K blocks
|
; RAM/ROM disk sizes expressed as count of 2K blocks
|
||||||
;
|
;
|
||||||
@@ -66,3 +66,17 @@ MEMTOP EQU 0FFE0H - 1 ; Start of HBIOS 32 byte control block
|
|||||||
ELSE
|
ELSE
|
||||||
MEMTOP EQU HBLOC - 1 ; Start of HBIOS 512 byte proxy
|
MEMTOP EQU HBLOC - 1 ; Start of HBIOS 512 byte proxy
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF INTPXY
|
||||||
|
HB_EI MACRO
|
||||||
|
ENDM
|
||||||
|
HB_DI MACRO
|
||||||
|
ENDM
|
||||||
|
ELSE
|
||||||
|
HB_EI MACRO
|
||||||
|
EI
|
||||||
|
ENDM
|
||||||
|
HB_DI MACRO
|
||||||
|
DI
|
||||||
|
ENDM
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ HBCLK EQU YES ; HBIOS clock driver
|
|||||||
;
|
;
|
||||||
; Set HB_IODEV to appropriate console device
|
; Set HB_IODEV to appropriate console device
|
||||||
;
|
;
|
||||||
HB_IODEV EQU 0
|
HB_IODEV EQU 0 ; Assume we want to use first HBIOS serial device
|
||||||
;
|
;
|
||||||
; Set HB_HDDEV to appropriate hard disk driver
|
; Set HB_HDDEV to appropriate hard disk driver
|
||||||
;
|
;
|
||||||
HB_HDDEV EQU 2
|
HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device
|
||||||
;
|
;
|
||||||
; Set HB_MDDEV to appropriate memory disk driver
|
; Set HB_MDDEV to appropriate memory disk driver
|
||||||
;
|
;
|
||||||
HB_MDDEV EQU 0
|
HB_MDDEV EQU 0 ; Assumes disk device #0 is ROM disk device
|
||||||
;
|
;
|
||||||
; RAM/ROM disk sizes expressed as count of 2K blocks
|
; RAM/ROM disk sizes expressed as count of 2K blocks
|
||||||
;
|
;
|
||||||
@@ -66,3 +66,17 @@ MEMTOP EQU 0FFE0H - 1 ; Start of HBIOS 32 byte control block
|
|||||||
ELSE
|
ELSE
|
||||||
MEMTOP EQU HBLOC - 1 ; Start of HBIOS 512 byte proxy
|
MEMTOP EQU HBLOC - 1 ; Start of HBIOS 512 byte proxy
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF INTPXY
|
||||||
|
HB_EI MACRO
|
||||||
|
ENDM
|
||||||
|
HB_DI MACRO
|
||||||
|
ENDM
|
||||||
|
ELSE
|
||||||
|
HB_EI MACRO
|
||||||
|
EI
|
||||||
|
ENDM
|
||||||
|
HB_DI MACRO
|
||||||
|
DI
|
||||||
|
ENDM
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
IOPINIT
|
IOPINIT
|
||||||
LDR SYS.RCP,SYS.NDR,SYS.FCP,WW.Z3T
|
JETLDR RCP.ZRL,SYS.NDR,FCP.ZRL,MYTERM.Z3T
|
||||||
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
IOPINIT
|
IOPINIT
|
||||||
LDR SYS.RCP,SYS.NDR,SYS.FCP,WW.Z3T
|
JETLDR RCP.ZRL,SYS.NDR,FCP.ZRL,MYTERM.Z3T
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
IOPINIT
|
IOPINIT
|
||||||
LDR SYS.NDR,SYS.FCP,WW.Z3T
|
JETLDR SYS.NDR,FCP.ZRL,MYTERM.Z3T
|
||||||
ZSCFG2 CB
|
ZSCFG2 CB
|
||||||
|
|
||||||
@@ -4,6 +4,6 @@ setlocal
|
|||||||
REM setlocal & call BuildDoc || exit /b 1 & endlocal
|
REM setlocal & call BuildDoc || exit /b 1 & endlocal
|
||||||
setlocal & call BuildProp || exit /b 1 & endlocal
|
setlocal & call BuildProp || exit /b 1 & endlocal
|
||||||
setlocal & call BuildShared || exit /b 1 & endlocal
|
setlocal & call BuildShared || exit /b 1 & endlocal
|
||||||
setlocal & call BuildImages || exit /b 1 & endlocal
|
|
||||||
REM setlocal & call BuildBP || exit /b 1 & endlocal
|
REM setlocal & call BuildBP || exit /b 1 & endlocal
|
||||||
|
setlocal & call BuildImages || exit /b 1 & endlocal
|
||||||
setlocal & call BuildROM %* || exit /b 1 & endlocal
|
setlocal & call BuildROM %* || exit /b 1 & endlocal
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
setlocal & cd Apps && call Build || exit /b 1 & endlocal
|
setlocal & cd CBIOS && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd CPM22 && call Build || exit /b 1 & endlocal
|
setlocal & cd CPM22 && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd ZCPR && call Build || exit /b 1 & endlocal
|
setlocal & cd ZCPR && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd ZCPR-DJ && call Build || exit /b 1 & endlocal
|
setlocal & cd ZCPR-DJ && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd ZSDOS && call Build || exit /b 1 & endlocal
|
setlocal & cd ZSDOS && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd CBIOS && call Build || exit /b 1 & endlocal
|
|
||||||
setlocal & cd CPM3 && call Build || exit /b 1 & endlocal
|
setlocal & cd CPM3 && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd ZPM3 && call Build || exit /b 1 & endlocal
|
setlocal & cd ZPM3 && call Build || exit /b 1 & endlocal
|
||||||
|
setlocal & cd Apps && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd Forth && call Build || exit /b 1 & endlocal
|
setlocal & cd Forth && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd Fonts && call Build || exit /b 1 & endlocal
|
setlocal & cd Fonts && call Build || exit /b 1 & endlocal
|
||||||
setlocal & cd BL && call Build || exit /b 1 & endlocal
|
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ BOOT:
|
|||||||
LD SP,STACK ; STACK FOR INITIALIZATION
|
LD SP,STACK ; STACK FOR INITIALIZATION
|
||||||
|
|
||||||
;
|
;
|
||||||
; COPY INITIALIZATION CODE TO RUNNINT LOCATION $8000
|
; COPY INITIALIZATION CODE TO RUNNING LOCATION $8000
|
||||||
LD HL,BUFPOOL
|
LD HL,BUFPOOL
|
||||||
LD DE,$8000
|
LD DE,$8000
|
||||||
LD BC,CBIOS_END - BUFPOOL
|
LD BC,CBIOS_END - BUFPOOL
|
||||||
@@ -1670,8 +1670,8 @@ DPB_RF:
|
|||||||
.DB 15 ; BLM: BLOCK MASK
|
.DB 15 ; BLM: BLOCK MASK
|
||||||
.DB 0 ; EXM: EXTENT MASK
|
.DB 0 ; EXM: EXTENT MASK
|
||||||
.DW 2047 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = (4MB / 2K BLS) - 1 = 2047
|
.DW 2047 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = (4MB / 2K BLS) - 1 = 2047
|
||||||
.DW 255 ; DRM: DIR ENTRIES - 1 = 256 - 1 = 255
|
.DW 511 ; DRM: DIR ENTRIES - 1 = 256 - 1 = 255
|
||||||
.DB 11110000B ; AL0: DIR BLK BIT MAP, FIRST BYTE
|
.DB 11111111B ; AL0: DIR BLK BIT MAP, FIRST BYTE
|
||||||
.DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE
|
.DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE
|
||||||
.DW 0 ; CKS: ZERO FOR NON-REMOVABLE MEDIA
|
.DW 0 ; CKS: ZERO FOR NON-REMOVABLE MEDIA
|
||||||
.DW 0 ; OFF: RESERVED TRACKS = 0 TRK
|
.DW 0 ; OFF: RESERVED TRACKS = 0 TRK
|
||||||
@@ -2014,7 +2014,7 @@ AUTOSUB:
|
|||||||
INC A ; CHECK FOR ERR, $FF --> $00
|
INC A ; CHECK FOR ERR, $FF --> $00
|
||||||
RET Z ; ERR, DO NOT ATTEMPT AUTO SUBMIT
|
RET Z ; ERR, DO NOT ATTEMPT AUTO SUBMIT
|
||||||
;
|
;
|
||||||
LD HL,CMD ; ADDRESS OF STARTUP COMMAND
|
LD HL,CMD ; ADDRESS OF STARTUP COMMANDs
|
||||||
LD DE,CCP_LOC + 7 ; START OF COMMAND BUFFER IN CCP
|
LD DE,CCP_LOC + 7 ; START OF COMMAND BUFFER IN CCP
|
||||||
LD BC,CMDLEN ; LENGTH OF AUTOSTART COMMAND
|
LD BC,CMDLEN ; LENGTH OF AUTOSTART COMMAND
|
||||||
LDIR ; PATCH COMMAND LINE INTO CCP
|
LDIR ; PATCH COMMAND LINE INTO CCP
|
||||||
@@ -2398,7 +2398,11 @@ DRV_INIT:
|
|||||||
LD (DRVMAPADR),HL ; SAVE AS DRVMAP ADDRESS
|
LD (DRVMAPADR),HL ; SAVE AS DRVMAP ADDRESS
|
||||||
LD (HEAPTOP),HL ; AND AS NEW HEAP TOP
|
LD (HEAPTOP),HL ; AND AS NEW HEAP TOP
|
||||||
;
|
;
|
||||||
; SETUP TO LOOP THROUGH AVAILABLE DEVICES
|
; SETUP TO LOOP THROUGH AVAILABLE DEVICES BUILDING LIST OF
|
||||||
|
; ACTIVE UNITS AND COUNTING NUMBER OF ACTIVE HARD DISK
|
||||||
|
; DEVICES. NON-HARD DISK UNITS ARE ALWAYS CONSIDERED
|
||||||
|
; ACTIVE, BUT HARD DISK UNITS ARE ONLY CONSIDERED ACTIVE
|
||||||
|
; IF THERE IS MEDIA IN THE DRIVE.
|
||||||
LD B,BF_SYSGET
|
LD B,BF_SYSGET
|
||||||
LD C,BF_SYSGET_DIOCNT
|
LD C,BF_SYSGET_DIOCNT
|
||||||
RST 08 ; E := DISK UNIT COUNT
|
RST 08 ; E := DISK UNIT COUNT
|
||||||
@@ -2408,31 +2412,76 @@ DRV_INIT:
|
|||||||
RET Z ; HANDLE ZERO DEVICES (ALBEIT POORLY)
|
RET Z ; HANDLE ZERO DEVICES (ALBEIT POORLY)
|
||||||
;
|
;
|
||||||
; LOOP THRU DEVICES TO COUNT TOTAL HARD DISK VOLUMES
|
; LOOP THRU DEVICES TO COUNT TOTAL HARD DISK VOLUMES
|
||||||
PUSH BC ; SAVE THE DEVICE COUNT
|
LD C,0 ; INIT C AS DEVICE LIST INDEX
|
||||||
LD C,0 ; USE C AS DEVICE LIST INDEX
|
LD D,0 ; INIT D AS TOTAL DEVICE COUNT
|
||||||
LD E,0 ; INIT E FOR HARD DISK VOLUME COUNT
|
LD E,0 ; INIT E FOR HARD DISK DEVICE COUNT
|
||||||
|
LD HL,DRVLST ; INIT HL PTR TO DRIVE LIST
|
||||||
;
|
;
|
||||||
DRV_INIT2:
|
DRV_INIT2:
|
||||||
PUSH BC ; SAVE LOOP CONTROL
|
|
||||||
CALL DRV_INIT3 ; CHECK DRIVE
|
CALL DRV_INIT3 ; CHECK DRIVE
|
||||||
POP BC ; RESTORE LOOP CONTROL
|
|
||||||
INC C ; NEXT UNIT
|
INC C ; NEXT UNIT
|
||||||
DJNZ DRV_INIT2 ; LOOP
|
DJNZ DRV_INIT2 ; LOOP
|
||||||
POP BC ; RESTORE UNIT COUNT IN B
|
LD A,D ; TOTAL DEVICE COUNT TO D
|
||||||
|
LD (DRVLSTC),A ; SAVE THE COUNT
|
||||||
JR DRV_INIT4 ; CONTINUE
|
JR DRV_INIT4 ; CONTINUE
|
||||||
;
|
;
|
||||||
DRV_INIT3:
|
DRV_INIT3:
|
||||||
PUSH DE ; SAVE DE (HARD DISK VOLUME COUNTER)
|
PUSH DE ; SAVE DE (HARD DISK VOLUME COUNTER)
|
||||||
|
PUSH HL ; SAVE DRIVE LIST PTR
|
||||||
|
PUSH BC ; SAVE LOOP CONTROL
|
||||||
LD B,BF_DIODEVICE ; HBIOS FUNC: REPORT DEVICE INFO
|
LD B,BF_DIODEVICE ; HBIOS FUNC: REPORT DEVICE INFO
|
||||||
RST 08 ; CALL HBIOS, UNIT TO C
|
RST 08 ; CALL HBIOS, UNIT TO C
|
||||||
LD A,D ; DEVICE TYPE TO A
|
LD A,D ; DEVICE TYPE TO A
|
||||||
|
POP BC ; RESTORE LOOP CONTROL
|
||||||
|
POP HL ; RESTORE DRIVE LIST PTR
|
||||||
POP DE ; RESTORE DE
|
POP DE ; RESTORE DE
|
||||||
CP DIODEV_IDE ; HARD DISK DEVICE?
|
CP DIODEV_IDE ; HARD DISK DEVICE?
|
||||||
RET C ; NOPE, RETURN
|
JR NC,DRV_INIT3A ; IF SO, HANDLE SPECIAL
|
||||||
|
LD (HL),C ; SAVE UNIT NUM IN LIST
|
||||||
|
INC HL ; BUMP PTR
|
||||||
|
INC D ; INC TOTAL DEVICE COUNT
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
DRV_INIT3A:
|
||||||
|
; CHECK FOR ACTIVE AND RETURN IF NOT
|
||||||
|
PUSH DE ; SAVE DE (HARD DISK VOLUME COUNTER)
|
||||||
|
PUSH HL ; SAVE DRIVE LIST PTR
|
||||||
|
PUSH BC ; SAVE LOOP CONTROL
|
||||||
|
|
||||||
|
LD B,BF_DIOMEDIA ; HBIOS FUNC: SENSE MEDIA
|
||||||
|
LD E,1 ; PERFORM MEDIA DISCOVERY
|
||||||
|
RST 08
|
||||||
|
|
||||||
|
POP BC ; RESTORE LOOP CONTROL
|
||||||
|
POP HL ; RESTORE DRIVE LIST PTR
|
||||||
|
POP DE ; RESTORE DE
|
||||||
|
|
||||||
|
RET NZ ; IF NO MEDIA, JUST RETURN
|
||||||
|
|
||||||
|
; IF ACTIVE...
|
||||||
|
LD (HL),C ; SAVE UNIT NUM IN LIST
|
||||||
|
INC HL ; BUMP PTR
|
||||||
|
INC D ; INC TOTAL DEVICE COUNT
|
||||||
INC E ; INCREMENT HARD DISK COUNT
|
INC E ; INCREMENT HARD DISK COUNT
|
||||||
RET ; AND RETURN
|
RET ; AND RETURN
|
||||||
;
|
;
|
||||||
DRV_INIT4: ; SET SLICES PER VOLUME (HDSPV) BASED ON HARD DISK VOLUME COUNT
|
DRV_INIT4: ; SET SLICES PER VOLUME (HDSPV) BASED ON HARD DISK VOLUME COUNT
|
||||||
|
|
||||||
|
; ; *** DEBUG ***
|
||||||
|
; CALL NEWLINE2
|
||||||
|
; LD A,(DRVLSTC)
|
||||||
|
; LD B,A
|
||||||
|
; CALL PRTHEXBYTE
|
||||||
|
; LD A,' '
|
||||||
|
; CALL COUT
|
||||||
|
; LD HL,DRVLST
|
||||||
|
;TEMP1:
|
||||||
|
; LD A,(HL)
|
||||||
|
; INC HL
|
||||||
|
; CALL PRTHEXBYTE
|
||||||
|
; DJNZ TEMP1
|
||||||
|
; ; *** DEBUG ***
|
||||||
|
|
||||||
LD A,E ; HARD DISK VOLUME COUNT TO A
|
LD A,E ; HARD DISK VOLUME COUNT TO A
|
||||||
LD E,8 ; ASSUME 8 SLICES PER VOLUME
|
LD E,8 ; ASSUME 8 SLICES PER VOLUME
|
||||||
DEC A ; DEC ACCUM TO CHECK FOR COUNT = 1
|
DEC A ; DEC ACCUM TO CHECK FOR COUNT = 1
|
||||||
@@ -2446,14 +2495,20 @@ DRV_INIT5:
|
|||||||
LD A,E ; SLICES PER VOLUME VALUE TO ACCUM
|
LD A,E ; SLICES PER VOLUME VALUE TO ACCUM
|
||||||
LD (HDSPV),A ; SAVE IT
|
LD (HDSPV),A ; SAVE IT
|
||||||
;
|
;
|
||||||
; SETUP TO ENUMERATE DEVICES TO BUILD DRVMAP
|
; ; SETUP TO ENUMERATE DEVICES TO BUILD DRVMAP
|
||||||
LD B,BF_SYSGET
|
; LD B,BF_SYSGET
|
||||||
LD C,BF_SYSGET_DIOCNT
|
; LD C,BF_SYSGET_DIOCNT
|
||||||
RST 08 ; E := DISK UNIT COUNT
|
; RST 08 ; E := DISK UNIT COUNT
|
||||||
LD B,E ; COUNT TO B
|
; LD B,E ; COUNT TO B
|
||||||
LD C,0 ; USE C AS DEVICE LIST INDEX
|
; LD C,0 ; USE C AS DEVICE LIST INDEX
|
||||||
|
;
|
||||||
|
LD A,(DRVLSTC) ; ACTIVE DRIVE LIST COUNT TO ACCUM
|
||||||
|
LD B,A ; ... AND MOVE TO B FOR LOOP COUNTER
|
||||||
|
LD HL,DRVLST ; HL IS PTR TO ACTIVE DRIVE LIST
|
||||||
;
|
;
|
||||||
DRV_INIT6: ; LOOP THRU ALL UNITS AVAILABLE
|
DRV_INIT6: ; LOOP THRU ALL UNITS AVAILABLE
|
||||||
|
PUSH HL ; PRESERVE DRIVE LIST PTR
|
||||||
|
LD C,(HL) ; GET UNIT NUM FROM LIST
|
||||||
PUSH BC ; PRESERVE LOOP CONTROL
|
PUSH BC ; PRESERVE LOOP CONTROL
|
||||||
LD B,BF_DIODEVICE ; HBIOS FUNC: REPORT DEVICE INFO
|
LD B,BF_DIODEVICE ; HBIOS FUNC: REPORT DEVICE INFO
|
||||||
RST 08 ; CALL HBIOS, D := DEVICE TYPE
|
RST 08 ; CALL HBIOS, D := DEVICE TYPE
|
||||||
@@ -2462,6 +2517,8 @@ DRV_INIT6: ; LOOP THRU ALL UNITS AVAILABLE
|
|||||||
CALL DRV_INIT7 ; MAKE DRIVE MAP ENTRY(S)
|
CALL DRV_INIT7 ; MAKE DRIVE MAP ENTRY(S)
|
||||||
POP BC ; RESTORE LOOP CONTROL
|
POP BC ; RESTORE LOOP CONTROL
|
||||||
INC C ; INCREMENT LIST INDEX
|
INC C ; INCREMENT LIST INDEX
|
||||||
|
POP HL ; RESTORE DRIVE LIST PTR
|
||||||
|
INC HL ; INCREMENT ACTIVE DRIVE LIST PTR
|
||||||
DJNZ DRV_INIT6 ; LOOP AS NEEDED
|
DJNZ DRV_INIT6 ; LOOP AS NEEDED
|
||||||
RET ; FINISHED
|
RET ; FINISHED
|
||||||
;
|
;
|
||||||
@@ -2880,6 +2937,8 @@ HEAPTOP .DW BUFPOOL ; CURRENT TOP OF HEAP
|
|||||||
BOOTVOL .DW 0 ; BOOT VOLUME, MSB=BOOT UNIT, LSB=BOOT SLICE
|
BOOTVOL .DW 0 ; BOOT VOLUME, MSB=BOOT UNIT, LSB=BOOT SLICE
|
||||||
BNKRAMD .DB 0 ; STARTING BANK ID FOR RAM DRIVE
|
BNKRAMD .DB 0 ; STARTING BANK ID FOR RAM DRIVE
|
||||||
HDSPV .DB 2 ; SLICES PER VOLUME FOR HARD DISKS (MUST BE >= 1)
|
HDSPV .DB 2 ; SLICES PER VOLUME FOR HARD DISKS (MUST BE >= 1)
|
||||||
|
DRVLST .FILL 32 ; ACTIVE DRIVE LIST USED DURINT DRV_INIT
|
||||||
|
DRVLSTC .DB 0 ; ENTRY COUNT FOR ACTIVE DRIVE LIST
|
||||||
;
|
;
|
||||||
CMD .DB CMDLEN - 2
|
CMD .DB CMDLEN - 2
|
||||||
.TEXT "SUBMIT PROFILE"
|
.TEXT "SUBMIT PROFILE"
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
#DEFINE RMN 9
|
#DEFINE RMN 9
|
||||||
#DEFINE RUP 2
|
#DEFINE RUP 2
|
||||||
#DEFINE RTP 0
|
#DEFINE RTP 0
|
||||||
#DEFINE BIOSVER "2.9.2-pre.27"
|
#DEFINE BIOSVER "2.9.2-pre.29"
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ zx MLOAD25 -OS2CCP.BIN=OS2CCP.HEX
|
|||||||
zx MAC -OS3BDOS.ASM -$PO
|
zx MAC -OS3BDOS.ASM -$PO
|
||||||
zx MLOAD25 -OS3BDOS.BIN=OS3BDOS.HEX
|
zx MLOAD25 -OS3BDOS.BIN=OS3BDOS.HEX
|
||||||
|
|
||||||
|
tasm -t80 -g3 -fFF loader.asm loader.bin loader.lst
|
||||||
|
|
||||||
|
copy /b os2ccp.bin + os3bdos.bin + ..\cbios\cbios_wbw.bin cpm_wbw.bin
|
||||||
|
copy /b os2ccp.bin + os3bdos.bin + ..\cbios\cbios_una.bin cpm_una.bin
|
||||||
|
|
||||||
|
copy /b loader.bin + cpm_wbw.bin cpm_wbw.sys
|
||||||
|
copy /b loader.bin + cpm_una.bin cpm_una.sys
|
||||||
|
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:asm
|
:asm
|
||||||
|
|||||||
@@ -5,3 +5,4 @@ if exist *.bin del *.bin
|
|||||||
if exist *.lst del *.lst
|
if exist *.lst del *.lst
|
||||||
if exist *.prn del *.prn
|
if exist *.prn del *.prn
|
||||||
if exist *.hex del *.hex
|
if exist *.hex del *.hex
|
||||||
|
if exist *.sys del *.sys
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
#DEFINE RMN 9
|
#DEFINE RMN 9
|
||||||
#DEFINE RUP 2
|
#DEFINE RUP 2
|
||||||
#DEFINE RTP 0
|
#DEFINE RTP 0
|
||||||
#DEFINE BIOSVER "2.9.2-pre.27"
|
#DEFINE BIOSVER "2.9.2-pre.29"
|
||||||
@@ -35,7 +35,8 @@ zx Z80ASM -CHARIO/MF
|
|||||||
zx Z80ASM -MOVE/MF
|
zx Z80ASM -MOVE/MF
|
||||||
zx Z80ASM -DRVTBL/MF
|
zx Z80ASM -DRVTBL/MF
|
||||||
zx Z80ASM -DISKIO/MF
|
zx Z80ASM -DISKIO/MF
|
||||||
zx LINK -BIOS3[OS]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO
|
zx Z80ASM -UTIL/MF
|
||||||
|
zx LINK -BIOS3[OS]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL
|
||||||
zx GENCPM -AUTO -DISPLAY
|
zx GENCPM -AUTO -DISPLAY
|
||||||
copy cpm3.sys cpm3res.sys
|
copy cpm3.sys cpm3res.sys
|
||||||
rem pause
|
rem pause
|
||||||
@@ -54,7 +55,8 @@ zx Z80ASM -CHARIO/MF
|
|||||||
zx Z80ASM -MOVE/MF
|
zx Z80ASM -MOVE/MF
|
||||||
zx Z80ASM -DRVTBL/MF
|
zx Z80ASM -DRVTBL/MF
|
||||||
zx Z80ASM -DISKIO/MF
|
zx Z80ASM -DISKIO/MF
|
||||||
zx LINK -BNKBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO
|
zx Z80ASM -UTIL/MF
|
||||||
|
zx LINK -BNKBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL
|
||||||
zx GENCPM -AUTO -DISPLAY
|
zx GENCPM -AUTO -DISPLAY
|
||||||
copy cpm3.sys cpm3bnk.sys
|
copy cpm3.sys cpm3bnk.sys
|
||||||
rem pause
|
rem pause
|
||||||
@@ -73,7 +75,8 @@ zx Z80ASM -CHARIO/MF
|
|||||||
zx Z80ASM -MOVE/MF
|
zx Z80ASM -MOVE/MF
|
||||||
zx Z80ASM -DRVTBL/MF
|
zx Z80ASM -DRVTBL/MF
|
||||||
zx Z80ASM -DISKIO/MF
|
zx Z80ASM -DISKIO/MF
|
||||||
zx LINK -ZPMBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO
|
zx Z80ASM -UTIL/MF
|
||||||
|
zx LINK -ZPMBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL
|
||||||
rem zx GENCPM -AUTO -DISPLAY
|
rem zx GENCPM -AUTO -DISPLAY
|
||||||
rem copy cpm3.sys zpm3.sys
|
rem copy cpm3.sys zpm3.sys
|
||||||
rem pause
|
rem pause
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ co$next:
|
|||||||
push h ; save the vector
|
push h ; save the vector
|
||||||
push b ; save the count and character
|
push b ; save the count and character
|
||||||
not$out$ready:
|
not$out$ready:
|
||||||
call coster ! ora a ! jz not$out$ready
|
push b ! call coster ! pop b ! ora a ! jz not$out$ready
|
||||||
pop b ! push b ; restore and resave the character and device
|
pop b ! push b ; restore and resave the character and device
|
||||||
call ?co ; if device selected, print it
|
call ?co ; if device selected, print it
|
||||||
pop b ; recover count and character
|
pop b ; recover count and character
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
extrn @dtbl,@ctbl
|
extrn @dtbl,@ctbl
|
||||||
extrn @date,@hour,@min,@sec
|
extrn @date,@hour,@min,@sec
|
||||||
extrn @srch1
|
extrn @srch1
|
||||||
|
extrn addhla, bcd2bin, bin2bcd
|
||||||
|
;extrn cout, phex8
|
||||||
|
|
||||||
include ver.inc
|
include ver.inc
|
||||||
|
|
||||||
@@ -120,32 +122,113 @@ dinit:
|
|||||||
or a ; set flags
|
or a ; set flags
|
||||||
ret z ; !!! handle zero devices (albeit poorly) !!!
|
ret z ; !!! handle zero devices (albeit poorly) !!!
|
||||||
|
|
||||||
; loop thru devices to count total hard disk volumes
|
; ; loop thru devices to count total hard disk volumes
|
||||||
push bc ; save the device count
|
; push bc ; save the device count
|
||||||
ld c,0 ; use c as device list index
|
; ld c,0 ; use c as device list index
|
||||||
ld e,0 ; init e for hard disk volume count
|
; ld e,0 ; init e for hard disk volume count
|
||||||
|
;
|
||||||
|
;dinit2:
|
||||||
|
; push bc ; save loop control
|
||||||
|
; call dinit3 ; check drive
|
||||||
|
; pop bc ; restore loop control
|
||||||
|
; inc c ; next unit
|
||||||
|
; djnz dinit2 ; loop
|
||||||
|
; pop bc ; restore unit count in b
|
||||||
|
; jr dinit4 ; continue
|
||||||
|
|
||||||
|
; loop thru devices to count total hard disk volumes
|
||||||
|
ld c,0 ; init c as device list index
|
||||||
|
ld d,0 ; init d as total device count
|
||||||
|
ld e,0 ; init e for hard disk device count
|
||||||
|
ld hl,drvlst ; init hl ptr to drive list
|
||||||
|
;
|
||||||
dinit2:
|
dinit2:
|
||||||
push bc ; save loop control
|
|
||||||
call dinit3 ; check drive
|
call dinit3 ; check drive
|
||||||
pop bc ; restore loop control
|
|
||||||
inc c ; next unit
|
inc c ; next unit
|
||||||
djnz dinit2 ; loop
|
djnz dinit2 ; loop
|
||||||
pop bc ; restore unit count in b
|
ld a,d ; total device count to d
|
||||||
|
ld (drvlstc),a ; save the count
|
||||||
jr dinit4 ; continue
|
jr dinit4 ; continue
|
||||||
|
|
||||||
|
;dinit3:
|
||||||
|
; push de ; save de (hard disk volume counter)
|
||||||
|
; ld b,017h ; hbios func: report device info
|
||||||
|
; rst 08 ; call hbios, unit to c
|
||||||
|
; ld a,d ; device type to a
|
||||||
|
; pop de ; restore de
|
||||||
|
; cp 050h ; hard disk device?
|
||||||
|
; ret c ; nope, return
|
||||||
|
; inc e ; increment hard disk count
|
||||||
|
; ret ; and return
|
||||||
|
|
||||||
dinit3:
|
dinit3:
|
||||||
push de ; save de (hard disk volume counter)
|
push de ; save de (hard disk volume counter)
|
||||||
ld b,017h ; hbios func: report device info
|
push hl ; save drive list ptr
|
||||||
|
push bc ; save loop control
|
||||||
|
ld b,17h ; hbios func: report device info
|
||||||
rst 08 ; call hbios, unit to c
|
rst 08 ; call hbios, unit to c
|
||||||
ld a,d ; device type to a
|
ld a,d ; device type to a
|
||||||
|
pop bc ; restore loop control
|
||||||
|
pop hl ; restore drive list ptr
|
||||||
pop de ; restore de
|
pop de ; restore de
|
||||||
cp 050h ; hard disk device?
|
cp 30h ; hard disk device?
|
||||||
ret c ; nope, return
|
jr nc,dinit3a ; if so, handle special
|
||||||
|
ld (hl),c ; save unit num in list
|
||||||
|
inc hl ; bump ptr
|
||||||
|
inc d ; inc total device count
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
dinit3a:
|
||||||
|
; check for active and return if not
|
||||||
|
push de ; save de (hard disk volume counter)
|
||||||
|
push hl ; save drive list ptr
|
||||||
|
push bc ; save loop control
|
||||||
|
|
||||||
|
ld b,18h ; hbios func: sense media
|
||||||
|
ld e,1 ; perform media discovery
|
||||||
|
rst 08
|
||||||
|
|
||||||
|
pop bc ; restore loop control
|
||||||
|
pop hl ; restore drive list ptr
|
||||||
|
pop de ; restore de
|
||||||
|
|
||||||
|
ret nz ; if no media, just return
|
||||||
|
|
||||||
|
; if active...
|
||||||
|
ld (hl),c ; save unit num in list
|
||||||
|
inc hl ; bump ptr
|
||||||
|
inc d ; inc total device count
|
||||||
inc e ; increment hard disk count
|
inc e ; increment hard disk count
|
||||||
ret ; and return
|
ret ; and return
|
||||||
|
|
||||||
|
|
||||||
|
;dinit4: ; set slices per volume (hdspv) based on hard disk volume count
|
||||||
|
; ld a,e ; hard disk volume count to a
|
||||||
|
; ld e,8 ; assume 8 slices per volume
|
||||||
|
; dec a ; dec accum to check for count = 1
|
||||||
|
; jr z,dinit5 ; yes, skip ahead to implement 8 hdspv
|
||||||
|
; ld e,4 ; now assume 4 slices per volume
|
||||||
|
; dec a ; dec accum to check for count = 2
|
||||||
|
; jr z,dinit5 ; yes, skip ahead to implement 4 hdspv
|
||||||
|
; ld e,2 ; in all other cases, we use 2 hdspv
|
||||||
|
|
||||||
dinit4: ; set slices per volume (hdspv) based on hard disk volume count
|
dinit4: ; set slices per volume (hdspv) based on hard disk volume count
|
||||||
|
|
||||||
|
; ; *** debug ***
|
||||||
|
; ;call newline2
|
||||||
|
; ld a,(drvlstc)
|
||||||
|
; ld b,a
|
||||||
|
; call phex8
|
||||||
|
; ld a,' '
|
||||||
|
; call cout
|
||||||
|
; ld hl,drvlst
|
||||||
|
;temp1:
|
||||||
|
; ld a,(hl)
|
||||||
|
; inc hl
|
||||||
|
; call phex8
|
||||||
|
; djnz temp1
|
||||||
|
; ; *** debug ***
|
||||||
|
|
||||||
ld a,e ; hard disk volume count to a
|
ld a,e ; hard disk volume count to a
|
||||||
ld e,8 ; assume 8 slices per volume
|
ld e,8 ; assume 8 slices per volume
|
||||||
dec a ; dec accum to check for count = 1
|
dec a ; dec accum to check for count = 1
|
||||||
@@ -155,29 +238,56 @@ dinit4: ; set slices per volume (hdspv) based on hard disk volume count
|
|||||||
jr z,dinit5 ; yes, skip ahead to implement 4 hdspv
|
jr z,dinit5 ; yes, skip ahead to implement 4 hdspv
|
||||||
ld e,2 ; in all other cases, we use 2 hdspv
|
ld e,2 ; in all other cases, we use 2 hdspv
|
||||||
|
|
||||||
|
;dinit5:
|
||||||
|
; ld a,e ; slices per volume value to accum
|
||||||
|
; ld (hdspv),a ; save it
|
||||||
|
;
|
||||||
|
; ; setup to enumerate devices to build drvmap
|
||||||
|
; ld b,0F8h ; SYS GET
|
||||||
|
; ld c,010h ; Disk Drive Unit Count
|
||||||
|
; rst 08 ; e := disk unit count
|
||||||
|
; ld b,e ; count to b
|
||||||
|
; ld c,0 ; use c as device list index
|
||||||
|
; ld hl,0 ; dph index
|
||||||
|
|
||||||
dinit5:
|
dinit5:
|
||||||
ld a,e ; slices per volume value to accum
|
ld a,e ; slices per volume value to accum
|
||||||
ld (hdspv),a ; save it
|
ld (hdspv),a ; save it
|
||||||
|
ld a,(drvlstc) ; active drive list count to accum
|
||||||
; setup to enumerate devices to build drvmap
|
ld b,a ; ... and move to b for loop counter
|
||||||
ld b,0F8h ; SYS GET
|
ld de,drvlst ; de is ptr to active drive list
|
||||||
ld c,010h ; Disk Drive Unit Count
|
|
||||||
rst 08 ; e := disk unit count
|
|
||||||
ld b,e ; count to b
|
|
||||||
ld c,0 ; use c as device list index
|
|
||||||
ld hl,0 ; dph index
|
ld hl,0 ; dph index
|
||||||
|
|
||||||
|
;dinit6: ; loop thru all units available
|
||||||
|
; push bc ; preserve loop control
|
||||||
|
; push hl ; preserve dph pointer
|
||||||
|
; ld b,017h ; hbios func: report device info
|
||||||
|
; rst 08 ; call hbios, d := device type
|
||||||
|
; pop hl ; restore dph pointer
|
||||||
|
; pop bc ; get unit index back in c
|
||||||
|
; push bc ; resave loop control
|
||||||
|
; call dinit7 ; update dph entries
|
||||||
|
; pop bc ; restore loop control
|
||||||
|
; inc c ; increment list index
|
||||||
|
; djnz dinit6 ; loop as needed
|
||||||
|
|
||||||
dinit6: ; loop thru all units available
|
dinit6: ; loop thru all units available
|
||||||
|
push de ; preserve drive list ptr
|
||||||
|
ex de,hl ; list ptr to hl
|
||||||
|
ld c,(hl) ; get unit num from list
|
||||||
|
ex de,hl ; list ptr back to de
|
||||||
push bc ; preserve loop control
|
push bc ; preserve loop control
|
||||||
push hl ; preserve dph pointer
|
push hl ; preserve dph pointer
|
||||||
ld b,017h ; hbios func: report device info
|
ld b,17h ; hbios func: report device info
|
||||||
rst 08 ; call hbios, d := device type
|
rst 08 ; call hbios, d := device type
|
||||||
pop hl ; restore dph pointer
|
pop hl ; restore dph pointer
|
||||||
pop bc ; get unit index back in c
|
pop bc ; get unit index back in c
|
||||||
push bc ; resave loop control
|
push bc ; resave loop control
|
||||||
call dinit7 ; update dph entries
|
call dinit7 ; make drive map entry(s)
|
||||||
pop bc ; restore loop control
|
pop bc ; restore loop control
|
||||||
inc c ; increment list index
|
inc c ; increment list index
|
||||||
|
pop de ; restore drive list ptr
|
||||||
|
inc de ; increment active drive list ptr
|
||||||
djnz dinit6 ; loop as needed
|
djnz dinit6 ; loop as needed
|
||||||
|
|
||||||
; zero out remaining dph table entries
|
; zero out remaining dph table entries
|
||||||
@@ -570,50 +680,6 @@ read:
|
|||||||
ld c,20
|
ld c,20
|
||||||
jp bdos
|
jp bdos
|
||||||
|
|
||||||
addhla:
|
|
||||||
add a,l
|
|
||||||
ld l,a
|
|
||||||
ret nc
|
|
||||||
inc h
|
|
||||||
ret
|
|
||||||
|
|
||||||
bcd2bin:
|
|
||||||
; convert A from packed bcd to binary
|
|
||||||
push bc
|
|
||||||
ld c,a
|
|
||||||
and 0F0h
|
|
||||||
srl a
|
|
||||||
ld b,a
|
|
||||||
srl a
|
|
||||||
srl a
|
|
||||||
add a,b
|
|
||||||
ld b,a
|
|
||||||
ld a,c
|
|
||||||
and 0Fh
|
|
||||||
add a,b
|
|
||||||
pop bc
|
|
||||||
ret
|
|
||||||
|
|
||||||
bin2bcd:
|
|
||||||
; convert A from binary to packed bcd
|
|
||||||
push bc
|
|
||||||
ld b,10
|
|
||||||
ld c,-1
|
|
||||||
bin2bcd1:
|
|
||||||
inc c
|
|
||||||
sub b
|
|
||||||
jr nc,bin2bcd1
|
|
||||||
add a,b
|
|
||||||
ld b,a
|
|
||||||
ld a,c
|
|
||||||
add a,a
|
|
||||||
add a,a
|
|
||||||
add a,a
|
|
||||||
add a,a
|
|
||||||
or b
|
|
||||||
pop bc
|
|
||||||
ret
|
|
||||||
|
|
||||||
if zpm
|
if zpm
|
||||||
|
|
||||||
signon$msg db 13,10,'ZPM3'
|
signon$msg db 13,10,'ZPM3'
|
||||||
@@ -656,6 +722,8 @@ fcb$nr db 0,0,0
|
|||||||
|
|
||||||
@bootdu db 0
|
@bootdu db 0
|
||||||
hdspv db 2 ; slices per volume for hard disks (must be >= 1)
|
hdspv db 2 ; slices per volume for hard disks (must be >= 1)
|
||||||
|
drvlst ds 32 ; active drive list used durint drv_init
|
||||||
|
drvlstc db 0 ; entry count for active drive list
|
||||||
|
|
||||||
; The following section contains key information and addresses for the
|
; The following section contains key information and addresses for the
|
||||||
; RomWBW CBIOS. A pointer to the start of this section is stored with
|
; RomWBW CBIOS. A pointer to the start of this section is stored with
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
extrn ?const ; get console status
|
extrn ?const ; get console status
|
||||||
|
|
||||||
extrn ?bnkxlt
|
extrn ?bnkxlt
|
||||||
|
|
||||||
|
;extrn phex8, cout
|
||||||
|
|
||||||
|
|
||||||
; CP/M 3 Disk definition macros
|
; CP/M 3 Disk definition macros
|
||||||
@@ -365,6 +367,9 @@ dsk$login:
|
|||||||
; simple single density only environment.
|
; simple single density only environment.
|
||||||
|
|
||||||
|
|
||||||
|
;ld a,'L'
|
||||||
|
;call cout
|
||||||
|
|
||||||
push de ; save DPH ptr
|
push de ; save DPH ptr
|
||||||
|
|
||||||
; check media
|
; check media
|
||||||
@@ -372,7 +377,8 @@ dsk$login:
|
|||||||
;halt
|
;halt
|
||||||
ld c,a ; put in C
|
ld c,a ; put in C
|
||||||
ld b,18h ; HBIOS Media function
|
ld b,18h ; HBIOS Media function
|
||||||
ld e,1 ; Enabled media check/discovery
|
ld e,1 ; Enable media check/discovery
|
||||||
|
;rst 08
|
||||||
call 0FFF0H ; HBIOS call
|
call 0FFF0H ; HBIOS call
|
||||||
ld a,e ; Resultant media id to accum
|
ld a,e ; Resultant media id to accum
|
||||||
or a ; Set flags
|
or a ; Set flags
|
||||||
@@ -380,8 +386,11 @@ dsk$login:
|
|||||||
;
|
;
|
||||||
; !!! Need to do something on error !!!
|
; !!! Need to do something on error !!!
|
||||||
;
|
;
|
||||||
ret z ; Bail out on error
|
jr nz,dsk$login0 ; continue if OK
|
||||||
|
pop de ; else error
|
||||||
|
ret ; return
|
||||||
|
|
||||||
|
dsk$login0:
|
||||||
ld hl,dpb$start - dpb$sz
|
ld hl,dpb$start - dpb$sz
|
||||||
ld de,dpb$sz
|
ld de,dpb$sz
|
||||||
ld b,a ; loop count
|
ld b,a ; loop count
|
||||||
@@ -422,6 +431,9 @@ dsk$read:
|
|||||||
; ld ix,30H
|
; ld ix,30H
|
||||||
; halt
|
; halt
|
||||||
|
|
||||||
|
;ld a,'R'
|
||||||
|
;call cout
|
||||||
|
|
||||||
push de ; save XDPH pointer
|
push de ; save XDPH pointer
|
||||||
call dsk$seek ; disk seek
|
call dsk$seek ; disk seek
|
||||||
pop hl ; restore pointer to HL
|
pop hl ; restore pointer to HL
|
||||||
@@ -440,8 +452,10 @@ dsk$read:
|
|||||||
endif
|
endif
|
||||||
ld d,a ; set desk bank
|
ld d,a ; set desk bank
|
||||||
ld e,1 ; 1 sector
|
ld e,1 ; 1 sector
|
||||||
;rst 08 ; do it
|
rst 08 ; do it
|
||||||
call 0FFF0H
|
;call 0FFF0H
|
||||||
|
|
||||||
|
;call phex8
|
||||||
ret ; return
|
ret ; return
|
||||||
|
|
||||||
; lxi h,read$msg ; point at " Read "
|
; lxi h,read$msg ; point at " Read "
|
||||||
@@ -470,8 +484,8 @@ dsk$write:
|
|||||||
endif
|
endif
|
||||||
ld d,a ; set desk bank
|
ld d,a ; set desk bank
|
||||||
ld e,1 ; 1 sector
|
ld e,1 ; 1 sector
|
||||||
;rst 08 ; do it
|
rst 08 ; do it
|
||||||
call 0FFF0H
|
;call 0FFF0H
|
||||||
ret ; return
|
ret ; return
|
||||||
|
|
||||||
; lxi h,write$msg ; point at " Write "
|
; lxi h,write$msg ; point at " Write "
|
||||||
@@ -485,34 +499,44 @@ dsk$seek:
|
|||||||
ld c,a ; BIOS Disk Unit in C
|
ld c,a ; BIOS Disk Unit in C
|
||||||
ld b,12H ; HBIOS SEEK function
|
ld b,12H ; HBIOS SEEK function
|
||||||
push bc ; save it
|
push bc ; save it
|
||||||
|
push de ; save XDPH pointer
|
||||||
|
ld b,17h ; HBIOS DEVICE function
|
||||||
|
rst 08 ; Do it, D=device type
|
||||||
|
ld a,d ; put in accum
|
||||||
|
and 0F0h ; isolate high bits
|
||||||
|
ld b,1 ; assume it is floppy, 1 head bit
|
||||||
|
ld c,01h ; 1 bit head mask
|
||||||
|
cp 10h ; floppy?
|
||||||
|
jr z,seek0 ; yup, skip ahead
|
||||||
|
ld b,4 ; must be hard disk, 4 head bits
|
||||||
|
ld c,0Fh ; 4 bit head mask
|
||||||
|
seek0:
|
||||||
|
pop de ; recover XDPH pointer
|
||||||
|
push bc ; save bc
|
||||||
inc de ; point to slice field of XDPH
|
inc de ; point to slice field of XDPH
|
||||||
ld a,(de) ; get it
|
ld a,(de) ; get it
|
||||||
ld e,a ; slice to E
|
ld e,a ; slice to E
|
||||||
ld h,65 ; number of tracks per slice
|
ld h,65 ; number of tracks per slice
|
||||||
call mult8 ; HL now has track offset for slice
|
call mult8 ; HL now has track offset for slice
|
||||||
push hl ; save it for now
|
pop bc ; recover bc
|
||||||
|
push hl ; save track offset for now
|
||||||
ld hl,(@trk) ; get track value
|
ld hl,(@trk) ; get track value
|
||||||
ld a,l ; lsb of track to a
|
ld a,l ; lsb of track to a
|
||||||
and 0FH ; isolate head in low 4 bits
|
and c ; apply mask
|
||||||
ld d,a ; stuff it in d
|
ld d,a ; save in d
|
||||||
ld a,(@sect) ; get sector
|
|
||||||
ld e,a ; stuff it in e
|
|
||||||
ld b,4 ; prepare to shift out 4 bit head value
|
|
||||||
seek1:
|
seek1:
|
||||||
srl h ; shift one bit out
|
srl h ; shift one bit out
|
||||||
rr l ; ... of hl
|
rr l ; ... of hl
|
||||||
djnz seek1 ; do all 4 bits
|
djnz seek1 ; do all bits
|
||||||
|
ld a,(@sect) ; get sector
|
||||||
|
ld e,a ; stuff it in e
|
||||||
ex de,hl ; de=track, hl=head/sect
|
ex de,hl ; de=track, hl=head/sect
|
||||||
ex (sp),hl ; save head/sect, hl = offset
|
ex (sp),hl ; save head/sect, hl = offset
|
||||||
add hl,de ; hl has final track value
|
add hl,de ; hl has final track value
|
||||||
pop de ; recover head/sect to de
|
pop de ; recover head/sect to de
|
||||||
|
|
||||||
pop bc ; recover function & unit
|
pop bc ; recover function & unit
|
||||||
;rst 08 ; perform seek
|
rst 08 ; perform seek
|
||||||
call 0FFF0H
|
;call 0FFF0H
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|||||||
133
Source/CPM3/util.z80
Normal file
133
Source/CPM3/util.z80
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
title 'Utility module for RomWBW'
|
||||||
|
|
||||||
|
maclib options.lib
|
||||||
|
|
||||||
|
public addhla, bcd2bin, bin2bcd
|
||||||
|
public phex16, phex8, cout
|
||||||
|
|
||||||
|
cseg
|
||||||
|
|
||||||
|
addhla:
|
||||||
|
add a,l
|
||||||
|
ld l,a
|
||||||
|
ret nc
|
||||||
|
inc h
|
||||||
|
ret
|
||||||
|
|
||||||
|
bcd2bin:
|
||||||
|
; convert A from packed bcd to binary
|
||||||
|
push bc
|
||||||
|
ld c,a
|
||||||
|
and 0F0h
|
||||||
|
srl a
|
||||||
|
ld b,a
|
||||||
|
srl a
|
||||||
|
srl a
|
||||||
|
add a,b
|
||||||
|
ld b,a
|
||||||
|
ld a,c
|
||||||
|
and 0Fh
|
||||||
|
add a,b
|
||||||
|
pop bc
|
||||||
|
ret
|
||||||
|
|
||||||
|
bin2bcd:
|
||||||
|
; convert A from binary to packed bcd
|
||||||
|
push bc
|
||||||
|
ld b,10
|
||||||
|
ld c,-1
|
||||||
|
bin2bcd1:
|
||||||
|
inc c
|
||||||
|
sub b
|
||||||
|
jr nc,bin2bcd1
|
||||||
|
add a,b
|
||||||
|
ld b,a
|
||||||
|
ld a,c
|
||||||
|
add a,a
|
||||||
|
add a,a
|
||||||
|
add a,a
|
||||||
|
add a,a
|
||||||
|
or b
|
||||||
|
pop bc
|
||||||
|
ret
|
||||||
|
|
||||||
|
if 0
|
||||||
|
;
|
||||||
|
; Print the hex word value in HL
|
||||||
|
;
|
||||||
|
phex16:
|
||||||
|
push af
|
||||||
|
ld a,h
|
||||||
|
call phex8
|
||||||
|
ld a,l
|
||||||
|
call phex8
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
; Print the hex byte value in A
|
||||||
|
;
|
||||||
|
phex8:
|
||||||
|
push af
|
||||||
|
push de
|
||||||
|
call hexascii
|
||||||
|
ld a,d
|
||||||
|
call cout
|
||||||
|
ld a,e
|
||||||
|
call cout
|
||||||
|
pop de
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
|
;
|
||||||
|
; Convert binary value in A to ascii hex characters in DE
|
||||||
|
;
|
||||||
|
hexascii:
|
||||||
|
ld d,a
|
||||||
|
call hexconv
|
||||||
|
ld e,a
|
||||||
|
ld a,d
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
call hexconv
|
||||||
|
ld d,a
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
; convert low nibble of A to ascii hex
|
||||||
|
;
|
||||||
|
hexconv:
|
||||||
|
and 0Fh ;low nibble only
|
||||||
|
add a,90h
|
||||||
|
daa
|
||||||
|
adc a,40h
|
||||||
|
daa
|
||||||
|
ret
|
||||||
|
;
|
||||||
|
; output character from A
|
||||||
|
;
|
||||||
|
cout:
|
||||||
|
; save all incoming registers
|
||||||
|
push af
|
||||||
|
push bc
|
||||||
|
push de
|
||||||
|
push hl
|
||||||
|
ld e,a
|
||||||
|
ld bc,0100h
|
||||||
|
rst 08
|
||||||
|
pop hl
|
||||||
|
pop de
|
||||||
|
pop bc
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
phex16:
|
||||||
|
phex8:
|
||||||
|
cout:
|
||||||
|
halt
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
end
|
||||||
@@ -3,5 +3,5 @@ rmn equ 9
|
|||||||
rup equ 2
|
rup equ 2
|
||||||
rtp equ 0
|
rtp equ 0
|
||||||
biosver macro
|
biosver macro
|
||||||
db "2.9.2-pre.27"
|
db "2.9.2-pre.29"
|
||||||
endm
|
endm
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ setlocal & cd CPM3 && call Clean.cmd & endlocal
|
|||||||
setlocal & cd ZPM3 && call Clean.cmd & endlocal
|
setlocal & cd ZPM3 && call Clean.cmd & endlocal
|
||||||
setlocal & cd Forth && call Clean.cmd & endlocal
|
setlocal & cd Forth && call Clean.cmd & endlocal
|
||||||
setlocal & cd Fonts && call Clean.cmd & endlocal
|
setlocal & cd Fonts && call Clean.cmd & endlocal
|
||||||
setlocal & cd BL && call Clean.cmd & endlocal
|
|
||||||
setlocal & cd BPBIOS && call Clean.cmd & endlocal
|
setlocal & cd BPBIOS && call Clean.cmd & endlocal
|
||||||
setlocal & cd HBIOS && call Clean.cmd & endlocal
|
setlocal & cd HBIOS && call Clean.cmd & endlocal
|
||||||
setlocal & cd Doc && call Clean.cmd & endlocal
|
setlocal & cd Doc && call Clean.cmd & endlocal
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ $ComFile = "${OutDir}/${RomName}.com" # Final name of COM image (command line lo
|
|||||||
$ImgFile = "${OutDir}/${RomName}.img" # Final name of IMG image (memory loadable HBIOS/CBIOS image)
|
$ImgFile = "${OutDir}/${RomName}.img" # Final name of IMG image (memory loadable HBIOS/CBIOS image)
|
||||||
|
|
||||||
# Select the proper CBIOS to include in the ROM. UNA is special.
|
# Select the proper CBIOS to include in the ROM. UNA is special.
|
||||||
if ($Platform -eq "UNA") {$CBiosFile = '../CBIOS/cbios_una.bin'} else {$CBiosFile = '../CBIOS/cbios_wbw.bin'}
|
if ($Platform -eq "UNA") {$Bios = 'una'} else {$Bios = 'wbw'}
|
||||||
|
|
||||||
# List of RomWBW proprietary apps to imbed in ROM disk.
|
# List of RomWBW proprietary apps to imbed in ROM disk.
|
||||||
$RomApps = "assign","fdu","format","mode","osldr","rtc","survey","syscopy","sysgen","talk","timer","xm","inttest"
|
$RomApps = "assign","fdu","format","mode","osldr","rtc","survey","syscopy","sysgen","talk","timer","xm","inttest"
|
||||||
@@ -140,7 +140,7 @@ Function Concat($InputFileList, $OutputFile)
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Since TASM has no mechanism to include files dynamically based on variables, a file
|
# Since TASM has no mechanism to include files dynamically based on variables, a file
|
||||||
# if built on-the-fly here for imbedding in the build process. This file is basically
|
# is built on-the-fly here for imbedding in the build process. This file is basically
|
||||||
# just used to include the platform and config files. It also passes in some values
|
# just used to include the platform and config files. It also passes in some values
|
||||||
# from the build to include in the build.
|
# from the build to include in the build.
|
||||||
|
|
||||||
@@ -155,14 +155,6 @@ ROMSIZE .EQU ${ROMSize}
|
|||||||
;
|
;
|
||||||
"@ | Out-File "build.inc" -Encoding ASCII
|
"@ | Out-File "build.inc" -Encoding ASCII
|
||||||
|
|
||||||
# Bring over previously assembled binary copy of the CP/M CCP and BDOS images for later use.
|
|
||||||
Copy-Item '..\cpm22\os2ccp.bin' 'ccp.bin'
|
|
||||||
Copy-Item '..\cpm22\os3bdos.bin' 'bdos.bin'
|
|
||||||
|
|
||||||
# Bring over previously assembled binary copy of the ZSystem CCP and BDOS images for later use.
|
|
||||||
Copy-Item '..\zcpr-dj\zcpr.bin' 'zcpr.bin'
|
|
||||||
Copy-Item '..\zsdos\zsdos.bin' 'zsdos.bin'
|
|
||||||
|
|
||||||
# Bring over previously assembled binary copy of Forth for later use.
|
# Bring over previously assembled binary copy of Forth for later use.
|
||||||
Copy-Item '..\Forth\camel80.bin' 'camel80.bin'
|
Copy-Item '..\Forth\camel80.bin' 'camel80.bin'
|
||||||
|
|
||||||
@@ -170,14 +162,10 @@ Copy-Item '..\Forth\camel80.bin' 'camel80.bin'
|
|||||||
Copy-Item '..\Fonts\font*.asm' '.'
|
Copy-Item '..\Fonts\font*.asm' '.'
|
||||||
|
|
||||||
# Assemble individual components. Note in the case of UNA, there is less to build.
|
# Assemble individual components. Note in the case of UNA, there is less to build.
|
||||||
Asm 'dbgmon'
|
#
|
||||||
Asm 'prefix'
|
$RomComponentList = "dbgmon", "prefix", "romldr", "eastaegg", "nascom", "tastybasic", "game", "usrrom", "imgpad", "imgpad0"
|
||||||
Asm 'romldr'
|
ForEach ($RomComponentName in $RomComponentList) {Asm $RomComponentName}
|
||||||
Asm 'eastaegg'
|
|
||||||
Asm 'nascom'
|
|
||||||
Asm 'tastybasic'
|
|
||||||
Asm 'imgpad'
|
|
||||||
Asm 'imgpad0'
|
|
||||||
if ($Platform -ne "UNA")
|
if ($Platform -ne "UNA")
|
||||||
{
|
{
|
||||||
Asm 'hbios' '-dROMBOOT' -Output 'hbios_rom.bin' -List 'hbios_rom.lst'
|
Asm 'hbios' '-dROMBOOT' -Output 'hbios_rom.bin' -List 'hbios_rom.lst'
|
||||||
@@ -191,17 +179,10 @@ if ($Platform -ne "UNA")
|
|||||||
#
|
#
|
||||||
"Building ${RomName} output files..."
|
"Building ${RomName} output files..."
|
||||||
|
|
||||||
# Combine the CCP and BDOS portions of CP/M and ZSystem to create OS images
|
|
||||||
Concat 'ccp.bin','bdos.bin',$CBiosFile 'cpm.bin'
|
|
||||||
Concat 'zcpr.bin','zsdos.bin',$CBiosFile 'zsys.bin'
|
|
||||||
|
|
||||||
# Prepend a bit of boot code required to bootstrap the OS images
|
|
||||||
Concat 'prefix.bin','cpm.bin' 'cpm.sys'
|
|
||||||
Concat 'prefix.bin','zsys.bin' 'zsys.sys'
|
|
||||||
|
|
||||||
# Build 32K OS chunk containing the loader, debug monitor, and OS images
|
# Build 32K OS chunk containing the loader, debug monitor, and OS images
|
||||||
Concat 'romldr.bin', 'eastaegg.bin','dbgmon.bin', 'cpm.bin', 'zsys.bin' osimg.bin
|
Concat 'romldr.bin', 'eastaegg.bin','dbgmon.bin', "..\cpm22\cpm_${Bios}.bin", "..\zsdos\zsys_${Bios}.bin" osimg.bin
|
||||||
Concat 'camel80.bin', 'nascom.bin', 'tastybasic.bin', 'imgpad0.bin' osimg1.bin
|
Concat 'camel80.bin', 'nascom.bin', 'tastybasic.bin', 'game.bin', 'imgpad0.bin', 'usrrom.bin' osimg1.bin
|
||||||
|
|
||||||
#
|
#
|
||||||
# Now the ROM disk image is created. This is done by starting with a
|
# Now the ROM disk image is created. This is done by starting with a
|
||||||
# blank ROM disk image of the correct size, then cpmtools is used to
|
# blank ROM disk image of the correct size, then cpmtools is used to
|
||||||
@@ -229,7 +210,8 @@ foreach ($App in $RomApps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Add the CP/M and ZSystem system images to the ROM disk (used by SYSCOPY)
|
# Add the CP/M and ZSystem system images to the ROM disk (used by SYSCOPY)
|
||||||
cpmcp -f $RomFmt $RomDiskFile *.sys 0:
|
cpmcp -f $RomFmt $RomDiskFile ..\cpm22\cpm_${Bios}.sys 0:cpm.sys
|
||||||
|
cpmcp -f $RomFmt $RomDiskFile ..\zsdos\zsys_${Bios}.sys 0:zsys.sys
|
||||||
|
|
||||||
#
|
#
|
||||||
# Finally, the individual binary components are concatenated together to produce
|
# Finally, the individual binary components are concatenated together to produce
|
||||||
@@ -249,5 +231,5 @@ else
|
|||||||
Concat 'hbios_img.bin','osimg.bin' $ImgFile
|
Concat 'hbios_img.bin','osimg.bin' $ImgFile
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove the temprary working ROM disk file
|
# Remove the temporary working ROM disk file
|
||||||
Remove-Item $RomDiskFile
|
Remove-Item $RomDiskFile
|
||||||
|
|||||||
@@ -38,10 +38,8 @@ FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
|
|||||||
FDMODE .SET FDMODE_DIDE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
|
FDMODE .SET FDMODE_DIDE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
|
||||||
;
|
;
|
||||||
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||||
IDEMODE .SET IDEMODE_MK4 ; IDE: DRIVER MODE: IDEMODE_[DIO|DIDE]
|
|
||||||
;
|
;
|
||||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||||
PPIDEMODE .SET PPIDEMODE_MFP ; PPIDE: DRIVER MODE: PPIDEMODE_[SBC|DIO3|MFP|N8|RC]
|
|
||||||
;
|
;
|
||||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||||
SDMODE .SET SDMODE_MK4 ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC]
|
SDMODE .SET SDMODE_MK4 ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC]
|
||||||
|
|||||||
@@ -41,6 +41,5 @@ FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
|
|||||||
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
|
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
|
||||||
;
|
;
|
||||||
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||||
IDEMODE .SET IDEMODE_RC ; IDE: DRIVER MODE: IDEMODE_[DIO|DIDE]
|
|
||||||
;
|
;
|
||||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user