|
|
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: 16128 (0x3f00)
Types: TextFile
Names: »ttesthc01o«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »ttesthc01o«
*load: m2901
jmp(recont) ; by some stange reason the
; micro program schall start with
; a jump.
*origo: 1
; entry address from vector
; from local dma.
jmp(dmasel) ; goto select dma operation.
*origo: 18
recont: jsb(wacont) ; call wait control register.
move(r0,tstreg) ; move control word from testregister
; to r0.
cjmp(zero,recont) ; if control word = 0 then goto
; read control word.
cont1: ; detect control word.
mzero(r4) ;
inc(r4) ; r4 := 1
sub(r0,r4) noload ; if control word = 1 then
cjmp(zero,rwtst) ; goto read and write test reg.
inc(r4) ; r4 := 2.
sub(r0,r4) noload ; if control word = 2 then
cjmp(zero,rwsft) ; goto read and write test reg with shift.
inc(r4) ; r4 := 3.
sub(r0,r4) noload ; if control word is 3 then
cjmp(zero,wrmewo) ; goto write and read memory word.
inc(r4) ; r4 := 4.
sub(r0,r4) noload ; if control word = 4 then
cjmp(zero,remewo) ; goto read memory word .
inc(r4) ; r4 := 5.
sub(r0,r4) noload ; ic control word = 5 then goto
cjmp(zero,wralme) ; write and read all memory.
inc(r4) ; r4 := 6.
sub(r0,r4) noload ; if control word is 4 then
cjmp(zero,dmain) ; goto dmmain.
inc(r4) ; r4 := 7
sub(r0,r4) noload ; if control word is 7 then
cjmp(zero,dmaout) ; goto damout.
inc(r4) ; r4 := 8.
sub(r0,r4) noload ; if control word = 4 then goto
cjmp(zero,rwsftq) ; shift q and ram.
jmp(func9) ; else if control word is unknown
; goto bottom for extensions.
; function wait vektor.
;=====================
wavek: cjvt(vect) move(r8,hc2903) noload noint; wait vektor interupt
jmp(wavek) ;
; subroutine move r12 to r3 and show r3.
shwr12: move(r3,r12) ; move r12 to r3 and continue in next subroutine.
; subroutine show contents of r3 in test reg.
showr3: rtn move(tstreg,r3) ; move r3 to test register and return.
; subroutine move r11 to r3 and show r3.
shwr11: move(r3,r11) ; move r11 to r3.
rtn move(tstreg,r3) ; show r3 in testregister and return.
; subroutne move r10 to r3 and show r3.
shwr10: move(r3,r10) ; move r10 to r3.
rtn move(tstreg,r3) ; show r3 in testreg and return.
; subroutine move r4 to r3 and show r3.
showr4: move(r3,r4) ; move r4 to r3.
rtn move(tstreg,r3) ; show r3 in test register and return.
; subroutine move q to r3 and show r3.
showq: move(r3,q) ; move q to r3.
rtn move(tstreg,r3) ; show r3 in test register an return.
; subroutine wait control word command.
; subroutine wait for control.
wacont: move(r0,tstreg) ; read test register.
cjmp(tstrdy,wacont) not ; wait for test flag to be high.
wacon1: move(r0,tstreg) ; read test register.
cjmp(tstrdy,wacon1) ; wait for test flag to be low.
rtn ; return from subroutine.
; subroutine wait for testreg.
; ============================
waitst: cjmp(tstrdy,waitst) not ; wait for testflag to be high
watst2: cjmp(tstrdy,watst2) ; wait for test flag to go low
rtn ; return from subroutine
; the next subroutine is deleted cause of error
; subroutine write mememory.
; ==========================
; addr in r12
; data in r10
move(addrs,r12) ;
cjmp(rememo,wrwa1) not ; wait for mememory
move(memory,r10) ; move data to memory
cjmp(rememo,wrwa2) not ; wait for memory write cycle.
rtn ; return from subroutine.
; *** the next subroutine is not used cause of error
; subroutine read memory word.
; =============================
; addr in r12
; return data in r11
move(addrs,r12) ;
cjmp(rememo,rewa1) not ; wait for memory ready
rtn move(r11,memory) ; move data from memory to r11 and return
; write and read a memory word.
; first param is address
; second is data.
; continu reading the address until testreg is set
; into manual mode.
; the data word which is read is shown in the
; testreg.
wrmewo: jsb(waitst) ; call wait test register.
move(r12,tstreg) ; get data from testreg.
wait3: jsb(waitst) ; call wait test register.
move(r10,tstreg) ; get data word.
jsb(wrmem) ; call write memory.
recon1: jsb(remem) ; call read memory
jsb(shwr11) ; show data read from memory.
cjmp(tstrdy,recont) ; if testreg. flag is set then
; goto read control word.
jmp(recon1) ; else goto read memory and continue
; read test regisster and write the
; data inverted into the testregister until
; the test register is set into manual mode.
rwtst: jsb(waitst) ; wait test register.
rwtst1: move(r12,tstreg) ; get word from test reg.
move(r10,r12) ; r12 :=
moinv(r12,r12) ; invert data word read.
jsb(shwr12) ; show r12 in testreg.
cjmp(tstrdy,recont) ; if test register is set then goto
; goto read control word.
jmp(rwtst1) ; continue.
; double shift a test pattern into q and ram
rwsftq: ; read and write test reg with shift.
mzero(q) ; q := 0.
mzero(r4) ; r4 := 0
moinc(r5,r4) ; r5 := 1.
lcpu(24) ;
move(r4,r4) sraq ;
add(q,r5) ;
rep move(r4,r4) sraq ;
jsb(showr4) ; show r4 in test register.
jsb(waitst) ;
jsb(showq) ; show q reg. in testregister.
jsb(recont) ;
; read test reg shift 12 left and write
; wait test shift 12 rigth and write
; continue until data word is zero.
rwsft: mzero(q) ; q := 0
inc(q) ; q := 1.
jsb(waitst) ; wait test register.
move(r12,tstreg) ; get data word from testreg.
lcpu(12) ;
rep move(r12,r12) sl ;
jsb(shwr12) ; show r10 in testregister.
jsb(waitst) ; call wait testreg.
lcpu(12) ;
rep move(r12,r12) sr ;
jsb(shwr12) ; show r10 in test register.
jmp(recont) ; goto read ccontrol word.
; write the inverted address to the memory word
; and read it again, if is dir_fferent from the
; word which was read then the program is stoppep and
; the last succesfull address is shown on the test register.
wralme: mzero(r12) ; r12 := 0.
wralm1: moinv(r10,r12) ; r10 := not ( r12)
jsb(wrmem) ; call write memory
jsb(remem) ; call read memory.
cjmp(npmem,wralm3) not ; if parrity error then goto show data word.
sub(r11,r10) noload ; if word read <> word written then
cjmp(zero,wralm2)not ; stop loop.
inc(r12) ;
inc(r12) ; r12 := next address.
jsb(shwr12) ; show current address in test reg.
jmp(wralm1) ; repeat with next address.
wralm2: dec(r12) ;
dec(r12) ; r12 := next address.
wralm3: jsb(shwr12) ; show r12 in test register.
jmp(recont) ; goto read control word.
; read memory word an show contents in test register.
; ===================================================
remewo: jsb(waitst) ; call subroutine wait test register.
move(r12,tstreg) ; move addrers tto r12.
remem1: jsb(remem) ; call subroutine read mememory.
jsb(shwr11) ; show r11 in test register.
cjmp(tstrdy,recont) ; if test register clocked then
; goto read control word.
jmp(remem1) ; repeat with same addrs.
; select dam operation.
; =====================
dmasel: move(r15,r15) ; if r15 = 0 then goto
cjmp(zero,dmain1) ; goto continue damin operation
jmp(dmaou1) ; else continue dmaout operation.
; local dma input operation.
; ==========================
; get memory address from test reg and no of words
; and control word to the dma channel
; and perform a block input operation on the local dma
; show the data word in the test register.
; clear r15 to indicate that we are performing a
; dma input operation.
; return to read control word mode.
dmain: jsb(waitst) ; wait test register.
move(r12,tstreg) ; get first address to memory.
jsb(waitst) ; wait test register.
move(r14,tstreg) ; get no of words.
jsb(waitst) ; wait test register.
move(r7,tstreg) ; get control word to dma addr reg.
move(r14,r14) ; test of no of words.
cjmp(neg,recont) ; if word counter < 0 then goto read control word.
mzero(r15) ; clear r15 to indicat a dma input operation.
move(dmaadr,r7) ; clock the dma channal wit the control word.
dmain1: move(r14,r14) ; if word counter > 0 then
cjmp(zero,recont) ; goto read control word.
move(r10,dmada) set(14) ; get data word from dma channel.
jsb(shwr10) ; show data word in test register.
jsb(wrmem) ; call write memory.
inc(r12) ; block addresss := block address + 2.
inc(r12) ;
dec(r14) ; word counter := word counter - 2.
dec(r14) ;
jmp(wavek) ; goto function wait vektor.
; dma channnal.
; local dma output.
; =================
; get address of block and no of word from test regsiter
; and control word to the dma channal
; and perform a dma output operation,
; show tthe data wordin the test register.
; set r15 to 1 to indicate that a out put operation is per
; performed.
; return to read control word mode.
dmaout: jsb(waitst) ; wait test register.
move(r12,tstreg) ; get first memory addess
jsb(waitst) ; wait test register.
move(r14,tstreg) ; get no of words.
jsb(waitst) ; wait test register.
move(r7,tstreg) ; get dma address word.
move(r14,r14) ;test of no of words.
cjmp(neg,recont) ; if data length word is negative
; then goto read control, word.
mzero(r15) ; r15 := 1 to indicat that we are
inc(r15) ; performing a dma data out.
move(dmaadr,r7) ; send dma addrs word to dma channal.
dmaou1: move(r14,r14) ; if word counter = 0 then goto
cjmp(zero,recont) ; read control.
*test: biton
jsb(remem) ; call read memory word.
jsb(shwr11) ; show data word in test reg.
move(dmada,r11) set(14) ; move data word to dma channal
; and clock dam.
inc(r12) ; data pointer := data pointer + 2.
*test: bitoff
inc(r12) ;
dec(r14) ; word counter := word counter - 2.
dec(r14) ;
jmp(wavek) ; goto wait vektor.
; subroutine write mememory.
; ==========================
; addr in r12
; data in r10
wrmem: move(addrs,r12) ;
cont ; important continue for sync of memory.
wrwa1: cjmp(rememo,wrwa1) not ; wait for mememory
move(memory,r10) ; move data to memory
cont ; important sync of memory.
wrwa2: cjmp(rememo,wrwa2) not ; wait for memory write cycle.
rtn ; return from subroutine.
; subroutine read memory word.
; =============================
; addr in r12
; return data in r11
remem: move(addrs,r12) ;
cont ; important sync. of memory.
rewa1: cjmp(rememo,rewa1) not ; wait for memory ready
rtn move(r11,memory) ; move data from memory to r11 and return
; first read control word to signifi function
func9:
inc(r4) ; r4 := 9.
sub(r0,r4) noload ; if control word <> 9 then
cjmp(zero,func10) not ; then goto function 10.
; function 9.
; read a word from testregister
; and write it at the 2903 until
; the test register is clocked then
; return to read continue.
jsb(waitst) ; wait for test register.
move(r12,tstrdy) ; get data word from test register.
wr2903: move(hc2903,r12) ; send data word to hc2903.
cjmp(tstrdy,recont) ; if test register clocked then
; goto read control word.
jmp(wr2903) ; else goto write to hc2903.
*end:
▶EOF◀