DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦d5e042411⟧ TextFile

    Length: 8448 (0x2100)
    Types: TextFile
    Names: »cgmoninit«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦this⟧ »cgmoninit« 

TextFile

     ;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     ;; init of acia and acia interupt controlers.
     ;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
b.   m10,n10,o10 w.
n0:  0                 ; return address.
n1:  0                 ; save name table address.
n2:  ;; copy table of name from options.
t.
     0
n3:  ;; copy table of names of amd9519 intrupt controlers 
     ;; from options.
t.
     0                 ; end of table.
     n4 = 2.00000011   ; acia reset command.
n5:  2.101000000       ; receive enable transmit disable mask.
     rs. w3     n0.    ; save return address.
     al. w3     n2.    ; get address of first name oc acia controler.
m1:  ;; repeat until last name in list
     rl  w0  x3        ; load first word in name.
     sn  w0     0      ; if finis then
     jl.        m2.    ; goto init of interupt controlers.
     jd         1<11+4 ; call find process decription.
     ;; init of acia controlers.
     rl  w1     0      ; load acia process description address.
     rl  w2  x1+a50    ; load acia device control address.
     al  w0     n4     ; load acia reset command.
     do  w0  x2        ; write reset command to acia controler
                       ; using acia control address.
     rl  w0  x1+a78+24 ; load acia transmission mode.
     do  w0  x2        ; write acia transmission mode to acia
                       ; controler using acia control addres.
     di  w0  x2+8      ; read acia data using acia data address.
     di  w0  x2        ; read acia status using acia data address.
     rl  w0  x1+a78+24 ; load acia transmission mode command.
     lo. w0     n5.    ; mask receive enable transmit disable into
                       ; transmission mode mask.
     do  w0  x2        ; write interupt/mode mask to acia controler
                       ; using acia control address.
     al  w3  x3+8      ; get address of next name
     jl.        m1.    ; goto control of next.
     ;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     ;; init of hc8000 interupt controler.
     ;; ++++++++++++++++++++++++++++++
     ;; call of interupt controler.
     ;; ++++++++++++++++++++++++++++++
m2:  ;;
     al. w3     n3.    ; load address of first name of amd9519
                       ; interupt cotroler.
m3:  ;; repeat until last name in list
     rl  w0  x3        ; load first word in name.
     sn  w0     0      ; if last process then
     jl.     (  n0.    ; return from init of acia and amd9519.
     jd         1<11+4 ; else call process decription.
     rl  w1     0      ; load process decription address.
     rs. w3     n1.    ; save name address.
     rl  w2  x1+a50    ; get complete device address of amd9519
                       ; interupt controler.
     rl  w1  x1+a70    ; get no in interupt controler list.
     ls  w1     3      ; first interupt no is interupt controler
                       ; no*8+0.
     jl. w3     m5.    ; call init of interupt controler.
     rl. w3     n1.    ; load name address.
     al  w3  x3+8      ; next name in table.
     jl.        m3.
     ;; end call of init of interupt controler.



     ;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     ;; init of amd9519 interupt controler.
     ;; writen by: carsten gyrn, sept. 1982.
     ;; entry address: g18.
     ;; entry address and other modification 
     ;; for monitor use november 1982.
     ;; entry address: m5.
     ;; call: 
     ;;       w0 = not used.
     ;;       w1 = value of level 0 in interupt
     ;;            controler.
     ;;            (evry level is initialized to
     ;;             C(w1) + 2*level no).
     ;;       w2 = device address of control port of 
     ;;            interupt controler.
     ;;       w3 = return address.
     ;; destroyed = w0 w1 w2 w3.
     ;; the amd9519 interupt controler is initialised
     ;; to auto clear for all interupt and to
     ;; fixed priority.
     ;; see: advancded micro devices 9519  universal
     ;;      interupt controler documentation for 
     ;;      detailed and complete description,
     ;;      and for other possibilities.
     ;;
     ;;
     ;; note: acknovlege of interupt is made by
     ;;       the privilegd instruction: gg wX 94.
     ;;
     ;; for all amd9519 interupt controler:
     ;; device address     = data address
     ;; device address + 1 = control address.
     ;;
     ;; function: initialize the interupt amd9519 interupt controler
     ;;           no masked interupt, autoclear for all,
     ;;           fixed priority ( = lower interupt before higher)
     ;;           no polling.
     ;;           and arm ( enable ) interupt controler.
b.   c8, b0 w.
c.   -1                ;; skiped in monitor use.
g18: ;; normal entry
     ls  w2     3      ; shift data address 3 left.
     lo. w2     c1.    ; mask device base into data address.
g19: ;; entry when device data address already is complete.
z.

m5:  ;; entry when in monitor use
     rs. w3     c0.    ; save return address.
     al  w3  x2+8      ; calculate device control address.
     ds. w3     c3.    ; save device control and data address.
     al  w0     0      ; set master reset control byte.
     do  w0  x3        ; send master reset to device.
     al  w3     0      ; level counter := 0;
     rl. w2     c4.    ; load control byte preselecting response 
                       ; memory for writing.
b0:  al  w0  x2        ; get preselect mask
     do. w0  (  c3.    ; send preselect response memory for writing,
                       ; to interupt controler.
     al  w0  x1        ; get logical interupt level.
     do. w0  (  c2.    ; send logical level to interupt controler.
     al  w1  x1+2      ; next logical interupt level.
     al  w2  x2+1      ; next physical interupt level in this
                       ; interupt controler, (last 3 bit of control
                       ; byte for preselecting response memory for
                       ; writing).
     al  w3  x3+1      ; next level counter.
     se  w3     8      ; if not last level then
     jl.        b0.    ; goto repeat.
     rl. w0     c5.    ; get control byte for preselect 
                       ; autoclear mask register in interupt controler 
                       ; for writing.
     do. w0  (  c3.    ; send control byte to interupt controler
     rl. w0     c6.    ; get auto clear mask, ( clear all interupts).
     do. w0  (  c2.    ; send auto clear mask to interupt controler.
     rl. w0     c7.    ; get clear interupt and request bit mask.
     do. w0  (  c3.    ; send clear interupt and request bit mask to
                       ; interupt controler.
     rl. w0     c8.    ; get mask for arm interupt controler and 
                       ; preselect interupt request register for reading.
     do. w0  (  c3.    ; send arm comand and preselect for reading
                       ; to interupt controler.
     jl.     (  c0.    ; return.
c0:  0                 ; saved return address.
c1:  1<23+0<3+2.100    ; charakter device no.: 0
                       ; (base for all charakter devices).
c2:  0                 ; device address for data to intrupt controler.
c3:  0                 ; device address for control of interupt 
                       ; controler.
c4:  2.11100000        ; control byte for preselect response
                       ; memory for writing.
c5:  2.11000000        ; control byte for preselect auto clear
                       ; register for writing.
c6:  2.11111111        ; data byte to auto clear register, 
                       ; 255 = auto clear on all interupts.
c7:  2.00010000        ; control byte for clear interupt mask
                       ; ( all interupt active) 
c8:  2.10101001        ; control byte for preselecting interupt
                       ; request register for reading and arm
                       ; ( arm = special word for enable) interupt
                       ; controler.
     ;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e.   ;; end of code to standard initialiation of interupt controler.
     ;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


     ;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e.   ;; end init of acia controllers and acia interupt controlers.
▶EOF◀