|
|
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: »kkhcclock«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦this⟧ »kkhcclock«
s. a50,b121,c35,d120,f120,i25,h20,p5 w.;
;;
;; +++ c names used by timer and clock.
;; +++ b names used for inter nal syetm tabs and dump
;; addrs.
;; +++ d names used for process description constants.
;;
0,r.256 ;
k= 8 ;
10 ; start addrs
jl. b120. ; goto start.
;; reg. dump addrs + 0 = w0
;; 2 = w1
;; 4 = w2
;; 6 = w3
;; 8 = status
;; 10 = ic
;; 12 = cause
;; 14 = addrs.
;;
;; process definition reg.s.
;; reg. dump adress + efective addrs of 'ri' instr.
;; + 0 = cpa ( common protected area ).
;; + 2 = base
;; + 4 = lowlim
;; + 6 = uplim
;; + 8 = intlim.
; device channel address blocks.
0,r.20
b30: 0,r.5 ; 1. static definition
; process definition addrs.
;
b10: 0,r.8 ; 1. reg dump addrs
b31: 0,r.5 ; 2. process definition reg. addrs.
b11: 0,r.8 ; 2. reg dump addrs
b32: 0,r.5 ; 3. proces definition regisster addrs.
b12: 0,r.8 ; 3. reg dump addrs
0,r.6
b33: ; 4. process definition reg. addrs.
0 ; cpa should be set to b90
0 ; base = 0
0 ; low lim schold be set to b100
0 ; upper lim schold be set to b101.
256 ; interupt limit.
b13: 0,r.8 ; 4. reg dump addrs.
; + 10 schould be set to b100.
;; sys information reg. inf, points to 2.
;; half word of status/intlim initialisatiosation in
;; sys tab entry.
;; the sys tab entry consist of 6 consequtive words
;; with the following contents:
;; inf - 5 = monitor call service addrs
;; inf - 3 = interupt service addrs
;; inf - 1 = status/intlim initialisation.
;; inf + 1 = reg. dump addrs.
;; inf + 3 = exeption service addrs
;; inf + 5 = escape service addrs
b20: 0,r.6 ; 1. sys tab entry
;
b21: 0,r.6 ; 2. sys tab entry
; system table error entry.
b22: 0,r.6 ; 3. sys tab entry, monitor table.
b23: ; 4. sys tab entry.
0 ; monitor call service addrs
0 ; interupt service addrs.
0 ; status interupt limit addrs
0 ; reg dump addrs.
0 ; exeption service addrs
0 ; escape service addrs.
;; status reg. constant.
h. ;
d10: 0,256 ; status 0, interupt limit 0
d13: 6,6 ; monitor process interupt limit.
d14: 256,256 ; user process interupt limit
w. ;
d11: 1<23+6 ; monitor mode , interupt limit 6
d12: 1<23 ; monitor mode.
d5: 5 ; relative inf init from sys tab start.
b66: 0 ; addrs of current sys tab.
b68: 0 ; addrs of next sys tab.
-1 ; last in systam tab.
b. a128 w. ;
;; begin block monitor procedures.
;; the monitor procedures is identified by its a names.
a0: ;; set interupt.
gg w1 26 ; get information register.
al w1 x1+12 ; get user system table.
al w3 x1+2 ; get user reg ddump address.
rl w0 x3+6 ; get user proc w3.
al w2 x1+4 ; get user system table interupt address.
rs w0 x2 ; store new interupt address.
jl. i2. ; start 1. active.
d20: rl w2 8 ; get contents of location 8.
al w2 x2+8+2 ; calculate address of channel block.
ds w0 x2 ; store word counter adn start address
; in channel block address.
do. w0 (d21. ; start data out channel .
jl. i2. ; goto next process.
d21: 1<23+1<3+2.001 ; effective address for start of
; channel program with address in
; of device block in contents
; of location 8 + 8.
b40: ;; monitor call addrs.
jl. x2+f120. ; switch to function.
f120:jl. a0. ; monitor 0 goto set interupt address.
jl. i2. ; swop process.
jl. i13. ; wrong entry.
jl. i14. ; entry 1 < 11 + 3 cause 6 can not be used.
jl. d20. ; entry 1 < 11 + 8 data out channel start.
b41: ;; interupt tab intry.
; w2 contain cause.
; cause 14 = timer interupt
; 16 = channel input finis.
; 18 = channel input start
; 20 = channel output finis
; 22 = charakter device interupt.
sn w2 20 ; if interupt cause = channel output finis
jl. i2. ; goto next process.
se w2 14 ; skip if timer interupt.
rl. w2 d36. ; get watch
al w2 x2+1 ; increase watch.
rs. w2 d36. ; save watch.
jl. i15. ; goto same process.
d36: 0 ; watch.
jl. i15. ; else same process.
b42: ;; exeption address.
jl. i16. ;
b43: ;; escape address.
jl. i17. ;
e. ; end monitor jump table , and monitor
;procedure block.
b120: ; start
al w0 0 ;
gp w0 64 ;
; init of user proc in b100.
al. w1 b33. ; addrs of process definition reg.s
al. w0 b90. ; addrs of cpa.
rs w0 x1 ; save cpa in user pt&roc def. reg.
al. w0 b100. ; get addrs of low lim.
rs w0 x1+4 ; save lower limit.
;
al. w0 b101. ; get upper limit.
rs w0 x1+6 ; save upper limit.
rl. w0 d14. ; interupt limit
rs w0 x1+8 ; save interupt limit
; init of 2. user process.
al. w1 b31. ; addrs of 2. user process
; process definition reg.s.
al. w0 b90. ; addrs of cpa.
rs w0 x1 ; save cpa.
al. w0 b110. ; get lower limit.
rs w0 x1+4 ; save lower limit.
al. w0 b111. ; get upper limit.
rs w0 x1+6 ; save upper limit.
rl. w0 d14. ; get inter limit.
rs w0 x1+8 ; save interupt limit.
; init of first user proc reg. (ic).
al. w2 b13. ; get reg. addrs.
al. w0 b100. ; get user proc start addrs.
rs w0 x2+10 ; save start addrs ( ic.)
; set user proc in monitor mode.
rl. w0 d12. ; get status reg contents for monitor
; mode.
rs w0 x2+8 ; save monitor mode in user proc st
; status register.
; init of 2. user proc reg. (ic).
al. w2 b11. ; get reg addrs
al. w0 b110. ; get user proc start addrs.
rs w0 x2+10 ; save start addrs.
; set user proc in monitor mode.
rl. w0 d12. ; get status register contents
; for monitor mode.
rs w0 x2+8 ; save monitor mode in user proc.
; init of first user proc sys tab.
al. w2 b23. ; get addrs of sys tab to user program.
rl. w0 d11. ; get status/ interupt limit init.
al. w1 b13. ; get addrs of reg dump addrs
jl. w3 b50. ; call init of sys tab.
rl. w0 d11. ; get status and inter limit .
al. w2 b21. ; addrs of 2. suer proc sys tab.
al. w1 b11. ; reg. dump addrs of 2. user proc.
jl. w3 b50. ; call init of sys tab.
jl. b80. ; goto continue.
b50: ;; subroutine init of sys tab.
;; w2 = addrs of sys tab.
;; w1 = addrs of reg dumb addrs of user proc.
;; w0 = status interupt limit initialisation.
;; w3 = return addrs.
rs w0 x2+4 ; save status and interupt limit.
;
al. w0 b40. ; get addrs of monitor call.
rs w0 x2 ; save monitor call addrs in syetm tab.
al. w0 b41. ; get addrs of interupt servece.
rs w0 x2+2 ; save interupt service addrs in sys tab.
rs w1 x2+6 ; save reg dump addrs of user process in
; sys tab.
al. w0 b116. ;
; al w0 0 ; get std exeption
;address.
rs w0 x2+8 ; save exeption
al w0 0 ; get std escape address.
rs w0 x2+10 ; save escape.
jl x3 ; return from subroutine.
b51: ;; subroutine init of process definition
;; registers for a monitor process.
;; call: w2 = address of 1. process definition register.
;; w3 = return address.
;;
;; return w0 = destroyed.
al w0 0 ; w0 := 0.
rs w0 x2 ; cpa := 0.
rs w0 x2+2 ; base := 0.
al w0 8 ; w0 := 8.
rs w0 x2+4 ; lowerlimit := 8.
rl. w0 b52. ; get max upper limit.
rs w0 x2+6 ; upperlimit := max.
rl. w0 b53. ; get interupt limit 6,6
rs w0 x2+8 ; save interupt limit
jl x3 ; return from subroutine.
b52: 8000000 ; upper limit
b53: 6<12+6 ; disable level + enable level.
;
b80: ; continue.
; init of first monitor tab.
rl. w0 d12. ; status and interupt limit init for
; monitor
; process. status := monitor mode
; interupt limit :=0.
al. w1 b10. ; reg dump addres.
rl. w3 d12. ; get monitor mode init.
rs w3 x1+8 ; save monitor mode.
al. w2 b20. ; sys tab addrs.
jl. w3 b50. ; call init of sys tab.
; init of 2. monitor tab.
rl. w0 d12. ; status := monitor mode interupt limit
; := 0.
al. w1 b12. ; reg dum addrs.
rl. w3 d12. ; get monitor mode.
rs w3 x1+8 ; init reg dump status.
al. w2 b22. ; sys tab addrs.
jl. w3 b50. ; call init of sys tab.
al. w2 b30. ; w0 := address of process definition
; register for monitor proc 1.
jl. w3 b51. ; call subroutine init of monitor
; process definition registers.
al. w2 b32. ; w0 := address of process definition
; registers for monitor proc 2.
jl. w3 b51. ; call subroutine init of monitor
; process definition registers.
; b22 = process in b100
; b20 = process in b110.
b121:al. w2 b20.+5 ; get addrs of 1 monitor sys tab.
; address of process in b110.
al. w3 b22.+5 ; get addrs of 2. monitor sys tab.
; address of process in b100.
rs. w3 b68.-2 ;
rs. w2 b68. ; save addrs of next and current.
gp w2 26 ; init of information reg.
jl. w2 i0. ; call subroutine init of timer
jd 1<11+2 ; start
;;+++++++++++++++++++++++++++++++++++++
;; init of timer
;;++++++++++++++++++++++++++++++++++++
;; entry i0.
;; return address in w2.
;; destroyed w1.
b. c40 w. ;
; constants for timer initialisation.
; cr = control reg. in timer (1 ,2 ,3 )
; interupt disabled from timer by 0<6
c10: 1<7+0<6+000<3+0<2+0<1+0; cr 1 operate all timers
c11: 1<7+0<6<000<3+0<2+0<1+1; cr 1 preset all timers.
c20: 1<7+0<6+000<3+0<2+0<1+0; cr 2 select cr 3.
c21: 1<7+0<6+000<3+0<2+0<1+1; cr 2 select cr 1.
c30: 1<7+0<6+000<3+0<2+1<1+0; cr 3 no prescale.
c31: 1<7+0<6+000<3+0<2+1<1+1; cr 3 prescale.
; device addrs for clock.
c0: 1<23+0<3+2.100 ;addrs for write cr 1 or 3.
; read nothing.
c1: 1<23+1<3+2.100 ; addrs write cr 2.
; addrs read status reg..
c2: 1<23+2<3+2.100 ; addrs write most sgnf. byte
; buffer reg..
; addrs read timer no 1 counter.
c3: 1<23+3<3+2.100 ; addrs write timer no 1 latches.
; addrs read least sgnf. bytes
; buffer reg..
c4: 1<23+4<3+2.100 ; addrs write most sgnf. byte buffer
;reg..
;
; addrs read timer no 2 counter.
c5: 1<23+5<3+2.100 ; addrs write timer 2 latches.
; read least sgnf. byte buffer reg..
c6: 1<23+6<3+2.100 ; addrs write most sgnf. byte buffer
;reg..
; addrs read timer 3 counter.
c7: 1<23+7<3+2.100 ; addrs write write timer no 3 latches.
; addrs read least sgnf. byte buffer
;reg..
c12: 10 ; most sgnf. byte to rtimer 0.
c14: 127 ; leats sgnf. byte to timer 1.
c22: 10 ; most sgnf. byte to timewr 2.
c24: 127 ; least sgnf. byte to timer 2.
c32: 0 ; most sgnf. byte to timer 3.
c34: 49 ; least sgnf. byte to timer 3.
i0: ; init of timer.
rs. w2 c29. ; save return address.
rl. w1 c21. ; select control reg 1 as addrs 0.
do. w1 (c1.) ; write dev no 1.
rl. w1 c11. ; preset all timers.
do. w1 (c0.) ; write char dev. 0.
rl. w1 c20. ; select cr 3 ass addrs 0.
do. w1 (c1.) ; write char dev. 1.
rl. w1 c30. ; set cr 3 no prescale.
do. w1 (c0.) ; swrite char dev. 0.
rl. w1 c21. ; select cr as1 as addrs 0.
do. w1 (c1.) ; write char dev. 1.
rl. w1 c32. ; load most sgnf. counter
; value to timer bufffer.
do. w1 (c6.) ; write char dev. no 6.
rl. w1 c34. ; load least signif. byte to counter 3.
do. w1 (c7.) ; write char dev. no. 7.
rl. w1 c22. ; load most sgnf. byte to counter 2.
do. w1 (c4.) ; write char dev. 4.
rl. w1 c24. ; load least sgnf. byte to counter 3.
do. w1 (c5.) ; write char dev. no. 5.
rl. w1 c12. ; load most sgnf. byte to counter 1.
do. w1 (c2.) ; write char dev. no. 2.
rl. w1 c14. ; load least sgnf. byte to counter 1.
do. w1 (c3.) ; write char dev. no. 3.
rl. w1 c10. ; send cr 1 operate all timers
do. w1 (c0.) ; write char dev. no. 0.
di. w1 (c1.) ; data in char dev. 1.
jl. (c29.) ; return from subroutine.
c29: 0 ; return address.
e. ; end block init of timer.
; interupt and monitor call service.
i15: ;
; same process
rl. w3 b66. ; get address of system table of current.
gp w3 26 ; init information register with
; value of current system table.
ri -10 ; return from interupt to n
; last current.
i2: ; monitor call service.
; from call 2.
dl. w3 b68. ; get addrs of current and next.
rs. w2 b68. ; next := current.
rs. w3 b66. ; current := next.
gp w3 26 ; inf reg := symbol tab of next.
ri -10 ; call return from intprt effective addrs
;
; = relative from reg. dump addrs.
0 ; h8 - 2 : chain addrs.
h. ; half word.
h8: 0, 0 ; zero , reciever iccn dev no.
w. ; full word
1 ; no of word to be send
0 ; addrs in iccn slave or message word.
0 ; addrs in iccn master.
h0: 1<23 +0<3 + 2.011 ;reset hmess stack
h1: 1<23 +0<3 + 2.001 ;next from hmess stack
h3 : 1<23 ;monitor mode
h6: 1<23 +0<3 + 2.000 ;hresponse errror
b90: 0 ; cpa
b100:al w2 0 ;
rl. w1 b105. ; counter := b105.
b102:dl. w0 b103. ; get double operand.
wm w3 0 ; multiply w3.
ds. w3 b104. ; save multiply.
ba. w2 1 ; increase w2.
gp w1 64 ;
ls w1 -1 ; special move
sn w1 0 ; if w1 = 0 thee
rl. w1 b105. ; w1 := (b105).
jl. b102. ; go back.
3 ;
b103:0 ;
b104:0 ;
b105:2.11<22 ;
b101:0 ;
b110: ; 2. user process.
jl. b115. ; goto start
b116:am 0,r.8 ; 8 word for dump address.
; b116 exeption address.
; start address after exeption.
rl. w3 b116.+6 ; get sawed w3.
ac w3 x3 ; invert w3.
gp w3 64 ; show w3.
rs. w3 b117. ; w3 := 0.
b115: rl. w3 b117. ; w3 := data.
al. w2 b117. ; w2 := address of buffer.
al w1 128 ; w1 := no of bytes.
al w3 x3+1
b118: rs w3 x2 ; save data in buffer
al w3 x3+1 ; invert data
al w2 x2+2 ; next address
al w1 x1-2 ; rest no of bytes.
se w1 0 ; if more bytes left then
jl. b118. ; goto next.
al. w0 b117. ; get address of b output buffer.
al w3 128 ; length of buffer in bytes.
jd 1<11+8 ; call data out channel.
jl. b115. ; goto next.
b112:dl. w1 b113. ; get double operand.
wa w1 0 ; w1 := w1 + w0.
ds. w2 b114. ; save double operand.
al w3 x3+1 ; increase displayed counter.
gp w3 64 ; show counter in test register.
; so w3 63 ; skip next instr if
;w3 and 63
sl w3 2047 ; skip next if w3 > 1023
je 2000 ; escape
jl. b112. ; goto repeat.
0 ;
b114:0 ;
b113:8388606 ;
b117: 0,r.128
b111:-1 ;
; end of 2. user program.
i10: jl. 0 ;
i13: jl. 0 ;
i14: jl. 0 ;
i16: jl. 0 ;
i17: jl. 0 ;
; error entry for monitor system table
;error.
i3: jl. 0 ;
0,r.(:1024-k:)>1 ;
e. ;
▶EOF◀