home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
TERMS
/
QTPATCH.ARC
/
QT-ALPSA.Z
< prev
next >
Wrap
Text File
|
1989-09-08
|
5KB
|
278 lines
; QTERM patch source file for Alspa ACI-2DS (Z80, 64K, 2-8" DSDD drives)
; Recreated By David Goodenough from the working overlay provided by
; Bill Swan
.var scrout 0x0109
.var decout 0x010c
.var modc 5 ; modem control
.var modd 4 ; modem data
.var rxrdy 2 ; receiver ready
.var txrdy 1 ; transmitter ready
.var yes -1
.var no 0
.var dtr yes ; set no if your modem doesn't hang up when
; dtr goes away
.var hayes no ; set yes if dtr is no, and your modem knows
; about '+++' and Hayes AT commands
; modem input status
.org 0x0110
modist:
in a,(modc)
and rxrdy
ret
; read modem character
.org 0x0120
modin:
in a,(modd)
ret
; modem output status
.org 0x0130
modost:
in a,(modc)
and txrdy
ret
; modem output
.org 0x0140
modout:
out (modd),a
ret
; start break
.org 0x0150
sbreak:
ld a,0x2f
out (modc),a
ret
; end break
.org 0x0160
ebreak:
ld a,0x27
out (modc),a
ret
; turn off dtr
.if dtr
.org 0x0170
dtroff:
ld a,0x25
out (modc),a
ret
; turn dtr back on
.org 0x0180
dtron:
ld a,0x27
out (modc),a
ret
.elif hayes
.org 0x0170
dtroff:
ret ; no code, but we can handle it
db 10 ; 10 chars to send
db 0xfe ; send a delay
db '+++' ; the +++ to get to command mode
db 0xfe ; another delay
db 'ATH0\r' ; and finally a string to hang up
.org 0x0180
dtron:
ret ; don't need this, but here it is
.else ; neither dtr nor hayes - not much we can do
.org 0x0170
dtroff:
nop ; don't put the return at 0x0170
ret
.org 0x0180
dtron:
ret
.endif
.org 0x0190 ; set baud (not possible)
ret
.org 0x01a0 ; baud table
db 0,no
db 0,no
db 0,no
db 0,no
db 0,no
db 0,no
db 0,no
db 0,no
;.org 0x01b0 ; set comm mode
push af
ld a,0xa6
out (modc),a
ld a,0x40
out (modc),a
pop af
out (modc),a
ret
.org 0x01c0 ; comm mode table
n17: db 0b01001010
n18: db 0b01001110
n27: db 0b11001010
n28: db 0b11001110
e17: db 0b01111010
e18: db 0b01111110
e27: db 0b11111010
e28: db 0b11111110
o17: db 0b01011010
o18: db 0b01011110
o27: db 0b11011010
o28: db 0b11011110
;.org 0x01cc
resrvd:
db 0 ; reserved for later use
;.org 0x01cd
xfersz
db 8 ; protocol I/O in 8K chunks
;.org 0x01ce
speed:
db 4 ; speed
;.org 0x01cf
escchr:
db '\\' & 0x1f ; escape char
;.org 0x01d0 ; signon message
db 'Alspa ACI-2DS\0'
; From here on down, the stuff is terminal dependant. I've made three .vars
; one each for Televideo, VT52 and ANSI (i.e. VT100 / VT220 etc)
; set _EXACTLY_ one to be true, this will provide a bare bones overlay.
; If the spirit moves, feel free to alter the terminal capabilities at the
; bottom to suit your terminal
.var tvi yes ; Televideo: also C128, Kaypro, ADM 3A
; ADM 31, Wyse (all models), Liberty
; Freedom (all models)
.var vt52 no ; Heath / Zenith 19 / 89 / 90, Intertec
; Superbrain
.var vt100 no ; Any ansi compatible tube
.org 0x01f0
clrs:
.if tvi
db 'z' & 0x1f, 0 ;clear screen string (Control-Z)
.elif vt52
db '\eE\0'
.elif vt100
db '\e[H\e[2J\0'
.endif
.org 0x0200
.if tvi | vt52
moveto: push hl ;move cursor to position in HL (Row,Col)
ld c,'\e' ; lead-in with Esc (the ASCII one; not QTERM's)
call scrout
ld c,[ tvi ? '=' : 'Y' ] ; 2nd lead-in is '=' or 'Y'
call scrout
pop hl
push hl
ld a,h ; row value (top row is 0.)
call poff ; add offset and send it to screen
pop hl
ld a,l ; col value (leftmost col is 0.)
poff: add a,' ' ; (adds 20h)
ld c,a
jp scrout ; (scrout returns from 'moveto's call)
.elif vt100
push hl
ld c,'\e'
call scrout
ld c,'['
call scrout
pop hl
push hl
ld h,0
inc l
call decout
ld c,';'
call scrout
pop hl
ld l,h
ld h,0
inc l
call decout
ld c,'H'
jp scrout
.endif
.org 0x22f
tcbits:
db 0b00000000 ; must be zero for "generic" overlay
; ||||||||
; |||||||+------ bright (end highlight)
; ||||||+------- dim (start highlight)
; |||||+-------- delete line
; ||||+--------- insert line
; |||+---------- delete character
; ||+----------- insert character
; |+------------ clear to end of line
; +------------- clear to end of screen
;
;
;.org 0x0230
brites: db 0 ;bright string
.org 0x0238
dims: db 0 ;dim string
.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 0 ;clear to end of line
.org 0x0268
ceos: db 0 ;clear to end-of-screen
; Entry and Exit hooks. These are provided to perform custom initialisation
; on startup and on exit from QTERM.
.org 0x0270
entry: ret ; entry hook (270h .. 272h)
.org 0x0273 ; exit hook (273h .. 275h)
exit: ret ; don't need anything.
; Extra patch area if needed. 276h .. 2ffh
.org 0x0276
patcha: