1
0
Fork 0

Added HBIOS patch and binaries

This commit is contained in:
acn 2020-09-14 14:25:38 +02:00
parent 6ec863d991
commit bad966dfcf
5 changed files with 372 additions and 0 deletions

View File

@ -57,6 +57,26 @@ Direct download:
The patch file is ```QT-CPM3.Z```.
### RomWBW HBIOS patch
This patch has been provided by Paul Wrightson.
It uses direct RomWBW HBIOS calls for talking to the serial port, so it is also independant of the type of serial chip.
The patch ```QT-HB_1.Z``` uses RomWBW device 1 (ie. the second serial port), the patch ```QT-HB_2.Z``` uses device 2 (third serial port).
So this should be equivalent to the ```QTERM82.COM``` and ```QTERM84.COM``` versions for SIO/2.
If another serial device needs to be used, just change the variable ```DEVICE``` at the beginning of the patch file and assemble it as shown below.
As this uses the RomWBW drivers, RTS/CTS signals should also be used automatically.
Using this QTERM version, it should be possible to use other serial chips than SIO/2 on CP/M 2.2, as long as RomWBW is used.
Direct download:
* [QTERMH1.COM](qtermh1.com) - RomWBW device 1
* [QTERMH2.COM](qtermh2.com) - RomWBW device 2
## Technical details
### Files

176
qt-hb_1.z Normal file
View File

@ -0,0 +1,176 @@
; QTROMWBW.Z - QTerm patch for RC2014 and RomWBW with VT 100 terminal
;
; July 2020, Paul Wrightson. Convert to use ROMWBW API
; September 2019, Anna Christina Nass
; based on IMSAI8080 patch: September 2019, Udo Munk
;
.var DEVICE 0x01 ; HBIOS device to use
.var CIOIN 0x00
.var CIOOUT 0x01
.var CIOIST 0x02
.var CIOOST 0x03
.var CIOINIT 0x04
.org 0x0110 ; modem input status
modist: ld B,CIOIST ; HBIOS CIOOUT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
rst 8 ; do it, result in A
ret
.org 0x0120 ; modem input
modin: ld B,CIOIN ; HBIOS CIOIN function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
rst 8 ; do it, result in E, status in A
ld A,E ; put received char in A
ret
.org 0x0130 ; modem output status
modost: ld B,CIOOST ; HBIOS CIOOUT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
rst 8 ; do it, result in A
ret
.org 0x0140 ; modem output
modout: ld B,CIOOUT ; HBIOS CIOOUT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
ld E,A ; put char in E
rst 8 ; do it, result in A
ret
.org 0x0150 ; start break
sbreak: ret
.org 0x0160 ; stop break
ebreak: ret
.org 0x0170 ; drop DTR
dtroff: ret
db 0x0c ;length of modem hang up string
db 0xfe,0xfe ;two delays
db 0x2b,0x2b,0x2b ;+++
db 0xfe,0xfe ;two delays
db 'ATH0',0x0d ;ATH0 <return>
.org 0x0180 ; restore DTR
dtron: ret
.org 0x0190 ; set baud rate
setbd: ret
.org 0x01a0 ; baud rate table
baudtb:
db 0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0
.org 0x01b0 ; set communication mode
setmod: ret
.org 0x01c0 ; communication mode table
modetb:
db 0,0,0,0,0,0,0,0
db 0,0,0,0
.org 0x01cc
resrvd: db 0 ; reserved for later use
.org 0x01cd ; protocol transfer size
xfersz: db 8
.org 0x01ce ; processor speed
speed: db 8 ; cpu speed in Mhz;
.org 0x01cf ; escape character
escape: db 0x19 ; 0x19: ^Y
.org 0x01d0 ; signon message
signon: db 'RomWBW HBIOS - VT100\0'
.org 0x01f0 ; clear screen
clrs: db '\e[2J'
db '\e[1;1H\0'
.var scrout 0x0109 ; print character in C
.var decout 0x010c ; print string of value in HL
.org 0x0200 ; moveto routine
moveto: push HL
ld C,'\e'
call scrout
ld C,'['
call scrout
pop HL
push HL
ld L,H
ld H,00
inc L
call decout
ld C,';'
call scrout
pop HL
ld H,00
inc L
call decout
ld C,'H'
jp scrout
.org 0x022f
tcbits: db 0b11000011 ;terminal capabilities
.org 0x0230
;brites: db '\e[1m\0' ;bright
brites: db '\0' ;bright
.org 0x0238
;dims: db '\e[0m\0' ;dim
dims: db '\0' ;dim
.org 0x0240
dlstr: db '\0' ;delete line
.org 0x0248
ilstr: db '\0' ;insert line
.org 0x0250
dcstr: db '\0' ;Delete character
.org 0x0258
icstr: db '\0' ;Insert character
.org 0x0260
ceol: db '\e[K\0' ;Clear to end of line
.org 0x0268
ceos: db '\e[J\0' ;Clear to end of screen
.org 0x0270 ;entry subroutine
entry: jp init
.org 0x0273 ;exit subroutine
exit: jp uninit
.org 0x0276 ;user subroutine
user: ret
.org 0x0279 ;keyboard map subroutine
kbmap: ret
.org 0x0280 ; user patch area
; PUT RomWBW UNIT # here
device: db DEVICE
; INITIALIZE RomWBW SERIAL DEVICE
init: ; ret ; Initialize. fall through to re-initialize.
; RE-INITIALIZE RomWBW SERIAL DEVICE
uninit: ld B,CIOINIT ; HBIOS CIOINIT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
ld DE,-1 ; "Reset with current settings"
rst 8 ; do it
ret ; not initialized, so no un-initialize

176
qt-hb_2.z Normal file
View File

@ -0,0 +1,176 @@
; QTROMWBW.Z - QTerm patch for RC2014 and RomWBW with VT 100 terminal
;
; July 2020, Paul Wrightson. Convert to use ROMWBW API
; September 2019, Anna Christina Nass
; based on IMSAI8080 patch: September 2019, Udo Munk
;
.var DEVICE 0x02 ; HBIOS device to use
.var CIOIN 0x00
.var CIOOUT 0x01
.var CIOIST 0x02
.var CIOOST 0x03
.var CIOINIT 0x04
.org 0x0110 ; modem input status
modist: ld B,CIOIST ; HBIOS CIOOUT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
rst 8 ; do it, result in A
ret
.org 0x0120 ; modem input
modin: ld B,CIOIN ; HBIOS CIOIN function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
rst 8 ; do it, result in E, status in A
ld A,E ; put received char in A
ret
.org 0x0130 ; modem output status
modost: ld B,CIOOST ; HBIOS CIOOUT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
rst 8 ; do it, result in A
ret
.org 0x0140 ; modem output
modout: ld B,CIOOUT ; HBIOS CIOOUT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
ld E,A ; put char in E
rst 8 ; do it, result in A
ret
.org 0x0150 ; start break
sbreak: ret
.org 0x0160 ; stop break
ebreak: ret
.org 0x0170 ; drop DTR
dtroff: ret
db 0x0c ;length of modem hang up string
db 0xfe,0xfe ;two delays
db 0x2b,0x2b,0x2b ;+++
db 0xfe,0xfe ;two delays
db 'ATH0',0x0d ;ATH0 <return>
.org 0x0180 ; restore DTR
dtron: ret
.org 0x0190 ; set baud rate
setbd: ret
.org 0x01a0 ; baud rate table
baudtb:
db 0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0
.org 0x01b0 ; set communication mode
setmod: ret
.org 0x01c0 ; communication mode table
modetb:
db 0,0,0,0,0,0,0,0
db 0,0,0,0
.org 0x01cc
resrvd: db 0 ; reserved for later use
.org 0x01cd ; protocol transfer size
xfersz: db 8
.org 0x01ce ; processor speed
speed: db 8 ; cpu speed in Mhz;
.org 0x01cf ; escape character
escape: db 0x19 ; 0x19: ^Y
.org 0x01d0 ; signon message
signon: db 'RomWBW HBIOS - VT100\0'
.org 0x01f0 ; clear screen
clrs: db '\e[2J'
db '\e[1;1H\0'
.var scrout 0x0109 ; print character in C
.var decout 0x010c ; print string of value in HL
.org 0x0200 ; moveto routine
moveto: push HL
ld C,'\e'
call scrout
ld C,'['
call scrout
pop HL
push HL
ld L,H
ld H,00
inc L
call decout
ld C,';'
call scrout
pop HL
ld H,00
inc L
call decout
ld C,'H'
jp scrout
.org 0x022f
tcbits: db 0b11000011 ;terminal capabilities
.org 0x0230
;brites: db '\e[1m\0' ;bright
brites: db '\0' ;bright
.org 0x0238
;dims: db '\e[0m\0' ;dim
dims: db '\0' ;dim
.org 0x0240
dlstr: db '\0' ;delete line
.org 0x0248
ilstr: db '\0' ;insert line
.org 0x0250
dcstr: db '\0' ;Delete character
.org 0x0258
icstr: db '\0' ;Insert character
.org 0x0260
ceol: db '\e[K\0' ;Clear to end of line
.org 0x0268
ceos: db '\e[J\0' ;Clear to end of screen
.org 0x0270 ;entry subroutine
entry: jp init
.org 0x0273 ;exit subroutine
exit: jp uninit
.org 0x0276 ;user subroutine
user: ret
.org 0x0279 ;keyboard map subroutine
kbmap: ret
.org 0x0280 ; user patch area
; PUT RomWBW UNIT # here
device: db DEVICE
; INITIALIZE RomWBW SERIAL DEVICE
init: ; ret ; Initialize. fall through to re-initialize.
; RE-INITIALIZE RomWBW SERIAL DEVICE
uninit: ld B,CIOINIT ; HBIOS CIOINIT function
ld HL,device
ld C,(HL) ; device number (0,1,2,3)
ld DE,-1 ; "Reset with current settings"
rst 8 ; do it
ret ; not initialized, so no un-initialize

BIN
qtermh1.com Normal file

Binary file not shown.

BIN
qtermh2.com Normal file

Binary file not shown.