80-Bus News

  

November-December 1982, Volume 1, Issue 4











Page 46 of 51











+280

title Remote terminal emulation

as

escape equ uartd equ uarts equ ived equ ives equ

pollu: in and ret in and ld ine ld ep

limit equ ret dec ret

{bh Ob8h uartd+5 Obth Ob2h

*ee* Yart Drivers. *eet

a, (uarts) Oth

z

a, (uartd) Tfh (de),a de

a,d 2 3-4 ng de

j + ; . ; ’ ;

+

fe om em em te om

en ow

Remote terminal Emulation for GEC 4065.

8250 data port 8250 status port IVC data port IVC status port

POLLU – polls the Uart and moves any waiting character to (DE)

Check status

Return if no character Get it

Strip msb

Store in the buffer Bump pointer

Cheek for limit

Return if not there Else don’t advance pointer

; SEROUT – Outputs the character in <A> to the

serout: push

seroO: in and jr pop or dp or

seroi: out ret

aN em om em ee

getvid: call in rlca jr in ret

af

a, (uarts) 20h %,sero0 af.

a

pe, serot 80h (uartd),a

week TVG drivers *##*

pollu a, (ives)

c,getvid a, (ived)

an am ae

Check ready to accept wait if not

Get character back Check parity

Send character

GETVID – gets a character from the IVC. PUTVID – sends character in <A> to the IVC. Both poll the Serial Port while waiting.

Check for incoming character See if IVC ready

Loop if busy

putvid: push af

pvd:

ee on

const:

ee em eR ew

start:

LoopO0:

loopi:

-*-

stack: buffer

in a, (ives) ; See if IVC ready rrea

dr c,pvd

pop af 3} Recover character out (ived),a ; Send to Ive

ret

Get a character from the keyboard Returns NZ if a character is read

1a a, escape ; Send ESC "k" eall putvid

1d a,’k’

call putvid

call getvid

or a

ret z

ld a,escape call putvid

ld a,’K’

call putvid

eall getvid

ep ‘c’ and 1fh ret ne

jp QO

SERENE MATH LOOP See eE

Read reply

o

return if none Send ESC "K" to get it

eA em

Read the character

-

“Cc? No, return with NZ set Yes, abort & reboot

Uses a FIFO buffer to handle the data DE = Input pointer HL = Output pointer

1d sp, stack ld a,(7)

dec a

ld (limit),a 1d de, buffer 1d hl, buffer call const eall ng, serout push hl

or a

sbe hi,de

pop hl

jr &, loo

ld a, (hl

ine hl

eall putvid $ «+eand echo it dr loop!

Get buffer limit (Make sure we don’t clobber BDOS) set the buffer limit

en eA an

Check keyboard.... »s,and echo any character See if anything in the buffer

ee

No, zero pointers Yes, get character...

am

Workspace defs 32 equ $

\ end’


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











Page 46 of 51