80-Bus News

  

September–October 1984, Volume 3, Issue 5











Page 15 of 47











; Characters 1f equ Oah er equ Odh

3 Ports

uartd equ Ob8h uartm equ uartdt+4 uarts equ uartd+5 uarth equ uartd+6 pdl equ Ob4h pel equ pdl+2 pd2 equ ObSh pe2 equ pd2+2

3; Dummy routines

reset:

open:

close:

read:

write:

make:

setdma: xor a ip bret

Line feed Carriage return

UART data port Modem control

Line status

Modem status

PIO data port A PLO control port A PIO data port B PIO control port B

AR eR ERE em OR om

3; Heading message and work area head: defb cr,1f,"* GIPB * “

hw: defb “0 waiting hs: defb “0 spare

hh: defb “

her: defb cr,1f,"8"

headl equ $-head

wait equ work+hw-head spare equ workt+hs-head headh equ work+hh-head haltm: defb “Halted”

gipb:

w

; Length of message

; Copy RP/M to RAM at same address to avoid hardware problem

ld hl ,Q8000h

ld be,1000h

ldir

: Switch out the ROM

ld a,0fh

out Cuartm),a

3 RS232, no ROM

3; Write interrupt address table to work area

ld hl,procl

ld (inttab) ,hl

>

x

Y

Disable CPU interrupts di

Disable PIO id a,03h out (pe2),a ; Port B disabled if cent out (pel),a ; Port A disabled endif

Ensure PIO happy ld hl,eph push hl reti

Load I register

eph: ld a,high(inttab)

3

a.

ld i,a

Interrupt mode im 2

Interrupt vector ld a,low(inttab) 4f cent out (pel),a + Port A else out (pe2),a 3; Port B endif

if cent PIO port B to mode 3, control ld a,Ocfh out (pe2),a Direction control word – ail bits are inpu 1d a,Offh out (pe2),a PIO port A to mode 3, control id a,Ocfh out (pel),a Direction control word – define bit 0 as output and rest as input ld a,0feh out (pel),a Output value to data port A to show printer busy ld a,Oih out (pdl),a Interrupt control word – enable interrupts for low to high, mask follows lid a,Ob7h out (pel),a Interrupt mask – only interrupt on input bit 1 (when it goes low) 1d a,0fdh out (pel),a else

15


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











Page 15 of 47