80-Bus News


May–June 1983, Volume 2, Issue 3

Page 42 of 59

. %

term4: and 7fh

termfa: cp cr


Output to console

Strip parity ep bs If BS make CUL jr nz,termd4a

1d a,cul

jr term5

Ok if CR

jr z,term5 ep if

jr 2,term5 ep bell jr z2,term5 ep 20h

jr c,term2 ep 7fh

je a,term?

OK if LF


OK if Bell


Output to display

term5: 1d e,a ; Save for printing

. ,

push de call vdu pop de

Print ld a, (sprt) ora call nz,print

Test toggle

Test keyboard

term6: call keyin


or a jr z,term2

ld hl, chex

ep (hl)

dp 2,Jjwboot 1d hl,chpr ; Toggle printer ep (hl)

jr na,termio ld a,(sprt)


ld (sprt),a

iv term2

No input

Exit to CP/M

Output to UART

term10O: call serout

To display if half duplex ld c,a ld a, (param) ep cs H” jr nz, term2 ld a,e jr term4

Otherwise ignore non-printing chars

3; I/O routines

3; Check keyboard



ld a,Offh ; 1d (vbusy),a

ld e,esc 3 eall vdu

ld e,"k” call vdu call getive ora

jr z,key2 ld e,ese call vdu

ld e,"K” call vdu call getive push af xor a ; ld (vbusy),a

pop af


oe on

Flag VDU busy

Check if char entered

No input Get character

Flag VDU normal

3 Get character from the TVC getive: call serin ;

in a, (pvdus) rla jr c,getive in a, (pvdud) ret

Sean for serial input

3; Send character in E to IVC


3; Print


spe: sp4:

push de call serin pop de

in a, (pvdus) ; rra

jr c,vdu

ld a,e

out (pvdud),a ss; ret


character in E if cpml

ld c,list

dp jbdos


ld a,e


ip pe,sp2

xor 80h

push af

call serin ; in a, (puarts)

if p8250

bit 5,a


bit 6a |

Sean for serial input

Check status

Output character

Output to CP/M list device

Output to serial printer

Make even parity

Sean for serial input


This is an OCR’d version of the scanned page and likely contains recognition errors.

Page 42 of 59