|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 19200 (0x4b00)
Types: TextFile
Names: »hcacia2«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦this⟧ »hcacia2«
;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;; hc8000 acia procedures.
;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;; procedures for communication with mc6850 acia.
;; writen by: carsten gyrn, sept. 1982
;; acia = asynchronous communication interface adapter.
;;
;; procedures for reset acia, read acai status,
;; read acia data, write acia data.
;;
;; see motorola acia mc6850 for detailed and complete
;; description, and for possibilities not used here,
;; ex. modem communication.
;;
;; entry address: g20 to g40
;; g20 = reset acia.
;; g21 = reset acia with complete device address.
;; g22 = read acia status.
;; g23 = read acia status with complete device address.
;; g24 = read acia data.
;; g25 = read acia data with complete device address.
;; g26 = write acia data.
;; g27 = write acia data with complete device address.
;; g28 = read acia data with complete device address
;; and no receive check.
;; g29 = calculate complete device address.
;; g30 = write acia data with complete device address
;; and no transmit check.
;; g31 = disable transmit disable receive interupt.
;; g32 = enable transmit disable receive interupt.
;; g33 = disable transmit enable receive interupt.
;; g34 = enable transmit enable receive interupt.
;; g35 = get acia interupt ( works in connection with
;; use of amd9519 interupt controler).
;; g37 = reestablish acia enable/disable status after
;; contents of acia controler table.
;; data:
;; g36 = acia control status table.
;; parameters:
;; c5 = number of acia controlers.
;; for all mc6850 asyncron communication interface adapter:
;; device address = control address.
;; device address + 1 = data address.
b. b10,c10,d10 w.
;; common data
;; -----------
c0: 1<23+0<3+2.100 ; acia device base.
c1: 2.00000000 ; mask for disable transmit disable receive.
c2: 2.00100000 ; mask for enable transmit disable receive.
c3: 2.10000000 ; mask for disable transmit enable receive.
c4: 2.10100000 ; mask for enable transmit enable receive.
c5: 2.00000011 ; acia master reset command.
;; masks for acia receive/transmit format.
c7: 2.00000001 ; mask for acia terminal/console kind.
; kind = 8.
; bit 4 3 2 = 0 0 0 = 7 data bit even parrity
; 2 stop bit.
; bit 1 0 = 0 1 = divide counter with 16.
c8: 2.00011001 ; mask for acia communication line kind.
; kind = 92.
; bit 4 3 2 = 1 1 0 = 8 data bit even parity
; 1 stop bit.
c. a0 ; not in minimal set.
d0 = 8 ; kind = teminal/console
d1 = 92 ; kind = acia communication line.
d2 = 6 ; number of acia, first is device no 64.
d3 = 64 ; first logical device no.
d4 = d3<3 ; first device base address in acia table.
;; status table of acia controlers.
;; format 8 words.
d6 = 0 ; +0 = transmit interupt status ( i.e. is transmit
; interupt enabled, when receive interupt is
; acknolegd).
d7 = 2 ; +2 = acai control kind.
; 92 = computer.
; 8 = ctr terminal.
d8 = 4 ; +4 = transmission mode.
; mask for no of tranmission bits
; start and stop bits
; odd/even parity.
g36: ;; global address.
c9: ;; local address.
0 ,r.d2<3 ; acia control table.
z. ; end not in minimal set.
;; reset and initialize acia.
;; ----------------------------
;; entry address: g20.
;; call: w0 = not used.
;; w1 = kind = 8 = terminal/console.
;; 7 data bit even parrity 2 stop bits.
;; = 92 = acia communication.
;; 8 data bit even parrity 1 stop bit.
;; w2 = device address.
;; w3 = return address.
;; return: w0= destroyed.
;; w1= not used.
;; w2= complete device address.
;; w3= return address.
;;
;; function: reset acia and initialize it to
g20: ;; entry.
b. f3 w.
ls w2 3 ; shift device control address 3 left
; so it fits into acia device base
; word.
lo. w2 c0. ; mask device base word into device
; control address.
g21: ;; entry if device control address allready is complete.
rl. w0 c5. ; load and write reset command
do w0 x2 ; to acia.
c. a0 ; not in minimal set.
lx. w2 c0. ; convert complete device address to table
; entry.
rs. w1 x2+c9.-d4+d7; save acia kind in acia controler table.
z. ; end not in minimal set.
sn w1 d1 ; if kind = d1 then
am 2 ; get next init.
rl. w0 c7. ; load and receive enable
c. a0 ; not in minimal set.
rs. w0 x2 c9.-d4+d8; save tranmission mode.
lo. w2 c0. ; convert acia table entry to device address.
z. ; end not in minimal set.
do w0 x2 ; write interupts disable and tranmisson format
; to acia control register.
di w0 x2+8 ; read acia data.
di w1 x2 ; read acia status.
jl x3 ; return from subroutine.
e. ;; end reset and init of acia.
;; ---------------------------
;; read acia status.
;; -----------------
;;entry address: g22
;; call: w0 = not used.
;; w1 = not used.
;; w2 = device no.
;; w3 = return address.
;; return:
;; w0 = complete status octet.
;; w1 = the transmit and the receive bit of the
;; status register shifted left 2 so it can
;; be used as table jump. (i.e. the value indicates
;; the following meaning:
;; 0 = transmit not set receive not set
;; 2 = transmit not set receive set
;; 4 = transmit set receive not set
;; 6 = transmit set receive set)
;; w2 = complete device address.
;; w3 = return address.
;;
;; function: reads the status octet from an acia
;; mask the transmit and receive bit out
;; and deliver them as an additional result.
;;
;; meaning of complete the status octet:
;; bit 0 = receive data register full.
;; bit 1 = transmit data register empty.
;; bit 3 = no data carrier detect.
;; bit 4 = no clear to send.
;; bit 5 = framing error.
;; bit 6 = receiver overrun.
;; bit 7 = interupt request.
b. f3 w.
c. a0 ; not in minimal set.
g22: ;; entry
ls w2 3 ; shift device control address 3 left
; so it fits into acia device base word.
lo. w2 c0. ; mask device base word into device
; control address.
z. ; end not in minimal set.
g23: ;; entry if device control address allready is complete.
di w1 x2 ; read status octet from acia.
al w0 x1 ; copy status octet.
la. w1 f0. ; mask out all bits in status octet exept
; receive and transmit.
ls w1 1 ; transform receive/transmit status bit so
; they can be used as table jump.
jl x3 ; return from subroutine.
f0: 2.00000011 ; mask for transmit and receive.
e. ;; end read acia status.
;; ---------------------
;; read acia data
;; --------------
;; entry address: g24
;; call: w0 = not used.
;; w1 = not used.
;; w2 = device no.
;; w3 = return address.
;; return: w0 = octet read if result in w1 = 0.
;; status octet form acia controler
;; otherwise.
;; w1 = result 0 = octet read
;; 2 = octet not read
;; w2 = complete device no.
;; w3 = return address.
;;
;; function: reads a data octet from an acia.
;; if any is ready.
b. f3,b0 w.
c. a0 ; not in minimal set.
g24: ;; entry.
ls w2 3 ; shift device control address 3 left
; so it fits into acia device base word.
lo. w2 c0. ; mask device base word into device control
; address.
z. ; end not in minimal set.
g25: ;; entry if device control address allready is complete.
di w1 x2 ; read status octet from acia.
al w0 x1 ; save complete status octet.
la. w1 f0. ; if status register shows that no
se w1 1 ; no data word is received or
; framing error or receiver overrun or
; parity error then
jl. b0. ; goto return showing no data read.
g28: ;; entry if device control address allready is complete,
;; and no check of received data is wanted.
di w0 x2+8 ;else read data octet from the device data address
; ( adding the odd bit into the device no address
; in the complete device control address)
al w1 0 ; set result data read.
jl x3 ; return from subroutine.
b0: al w1 2 ; set result data not read.
jl x3 ; return from subroutine.
f0: 2.01110001 ; status octet mask used for read,
; bit 0 = receiver data register full,
; bit 4 = framming error,
; bit 5 = receiver error,
; bit 6 = parity error.
e. ;; end read acia data
;; ------------------
;; write acia data
;; ---------------
;; entry address: g26
;; call: w0 = octet to be written
;; w1 = not used
;; w2 = device no.
;; w3 = return address.
;; return: w0 = destroyed.
;; w1 = result 0 = octet written
;; 2 = octet not written
;; w2 = complete device no.
;; w3 = return address.
;;
;; function: write a data octet to an acia
;; if the acia is ready to recive data,
;; enable transmit interupt and update
;; acia controler table ( c9 ++)
b. f3,b0 w.
c. a0 ; not in minimal set.
g26: ;; entry.
ls w2 3 ; shift device control address 3 left
; so it fits into acia device base word.
lo. w2 c0. ; mask device base word into device control
; address.
z. ; end not in mninimal set.
g27: ;; entry if device control address allready is complete.
al w1 259
di w1 x2 ; read status octet from acia.
la. w1 f0. ; if status register shows that previus written
se w1 2 ; has not been transmitted from the acia then
jl. b0. ; goto return showing data not written
g30: ;; entry if device control address allready is complete
;; and no check of transmitted data is wanted.
do w0 x2+8 ;else write data octet to the device data address,
; ( adding the odd bit into the device no address
; in the complete device control address)
al w1 0 ; set result data written.
jl x3 ; return from subroutine.
b0: al w1 2 ; set result data not written.
jl x3 ; return from subroutine.
f0: 2.00000010 ; status octet mask used for write.
e. ;; end write acia data
;; -------------------
c. a0 ; not in minimal set.
;; calculate complete device address.
;; ----------------------------------
;; entry address: g29
;; call: w0= not used
;; w1= not used
;; w2 = device no.
;; w3 = return address
;; return: w0 = not used.
;; w1 = not used.
;; w2 = complete device address.
;; w3 = return address.
g29: ;; entry
b.w.
ls w2 3 ; shift device control address 3 left
; so it fits into acia device base word.
lo. w2 c0. ; mask device base word into device control
; address.
jl x3 ; return from subroutine.
e. ;; end calculate complete device address.
;; --------------------------------------
;; enabling and disabling of interupts.
;; ------------------------------------
;; entry address: g31,g32,g33,g34
;; call: w0 = not used.
;; w1 = not used.
;; w2 = complete device address.
;; w3 = return address.
;; return: w0 = destroyed.
;; w1 = device no.
;; w2 = complete device address.
;; w3 = return address.
;; function: set the acia interupt in the different
;; enable and disable situation.
b.w.
g34: ;; entry enable transmit enable receive.
am 2 ; modify load address.
g33: ;; entry enable transmit disable receive.
am 2 ; modify load address.
g32: ;; entry disable transmit enable receive.
am 2 ; modify load address.
g31: ;; entry disable transmit disable receive.
rl. w0 c1. ; load mask for setting interupt anable/disable.
lx. w2 c0. ; convert complete device address to
; acia table entry.
lo. w0 x2 c9.-d4+d8; mask transmission form from acia controler
; table into enable/disable mask.
rs. w0 x2 c9.-d4+d6; save last status in acia table.
lo. w2 c0. ; convert acia table entry to complete device
; address.
do w0 x2 ; write mask to device control address.
jl x3 ; return from subroutine.
e. ;; end enabling and disabling of interupts.
;; -------------------------
;; get acia interupts.
;; ----------------------
;; entry address: g35
;; call: w0 = not used.
;; w1 = not used.
;; w2 = not used.
;; w3 = return address.
;; return: w0 = complete status octet.
;; w1 = the transmit and the receive bit of the
;; status register shifted left 2 so the can
;; be used as table jump.(i.e. the value of
;; indicates the following:
;; 0 = transmit not set receive not set ( error )
;; 2 = transmit not set receive set
;; 4 = transmit set receive not set
;; 6 = transmit set receive set
;; w2 = complete device address.
;; w3 = interupt no ( acia device no).
;;
;; function: this procedure function only in connection with
;; amd9519 interupt controler. the interupt no is
;; received from the interupt controler. the interupting
;; acia is completely disabled and the status register is
;; read. the status bit is caculated so they can be
;; used in a table jump.
g35: ;; entry
b. f3 w.
rs. w3 f0. ; save return address.
gg w3 94 ; get interupt no of intererupting acia
; from the amd9519 controler.
al w2 x3 ; move device address.
ls w2 3 ; shift interupt no ( device address) 3 left
; so it fits into acia device base word.
rl. w0 x2 c9.-d4+d8; load transmit/receive format mask from
; acia control table.
;; lo. w0 c1. ; mask disable all interupts into format mask,
; ( not used because the format mask allready
; diable all interupts).
lo. w2 c0. ; mask device base word into device control
; address.
do w0 x2 ; write disable to acia.
di w1 x2 ; read device status.
al w0 x1 ; load complete status octet.
la. w1 f1. ; mask transmit and receive bit out
; of complete status octet.
ls w1 1 ; transmit/receive status bits transformed so
; they can be used as table entry jump.
jl. ( f0. ; return from subroutine.
f0: 0 ; return address.
f1: 2.00000011 ; mask bit for transmit and receive bit.
e. ;; end of acia interupt handling.
;; ------------------------------
;; reestablish acia enable/disable status.
;; --------------------------------------
;; entry address: g37
;; call: w0 = not used.
;; w1 = not used.
;; w2 = complete device address.
;; w3 = return address.
;; return: w0 = destroyed.
;; w1 = device no.
;; w2 = complete device address.
;; w3 = return address.
g37: ;; entry.
b.w.
lx. w2 c0. ; convert complete device address to
; acia table entry format.
rl. w0 x2+c9.-d4+d6; get acia control status from
; acia controller table.
lo. w2 c0. ; convert acia table entry to complete
; device address.
gp w0 64
do w0 x2 ; waite status to controler.
jl x3 ; return from subroutine.
e. ;; end of reestablisih enable/disable.
;; -----------------------------------
z. ; end not in minimal set.
;; +++++++++++++++++++++++++
e. ;; acia handling procedures.
;; +++++++++++++++++++++++++
▶EOF◀