Hi All;
Don, Here it is..
;VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
19 ;
20 ; The original code in 23-765A9 is REALLY BROKEN when it comes to
21 ; supporting a non-std CSR other than 776500 in R1 on entry
22 ;
23 ; All the hard references to: ddrbuf, ddxcsr, ddxbuf
24 ; have been changed to: 2(R1), 4(R1), 6(R1)
25 ;
26 ; The one reference where 'ddrcsr' might have been used is '(R1)' instead
27 ; which is actually correct (but totally inconsistent with other usage).
28 ;
29 ;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
30
31
32 176500 ddcsr =176500 ; std TU58 csrbase
33
34 000000 ddrcsr =+0 ; receive control
35 000002 ddrbuf =+2 ; receive data
36 000004 ddxcsr =+4 ; transmit control
37 000006 ddxbuf =+6 ; transmit data
38
39 165564 diags =165564 ; console diags phase2 entry
40
41 .asect
42 100000 .=100000
43
44 ; --------------------------------------------------
45
46 100000 104 104 start: .ascii "DD" ; device code (reversed)
47
48 100002 000176 .word last-. ; offset to next boot header
49
50 100004 000261 dd0n: sec ; boot std csr, unit zero, no diags
51 100006 012700 000000 dd0d: mov #0,r0 ; boot std csr, unit zero, with diags
52 100012 012701 176500 ddNr: mov #ddcsr,r1 ; boot std csr, unit <R0>
53 100016 010704 ddNb: mov pc,r4 ; boot csr <R1>, unit <R0>
54 100020 103055 bcc diag ; br if diags requested
55 100022 000402 br go ; return to (R4)+2 from diags
56 ; then skip over pseudo reboot vector
57
58 ; --------------------------------------------------
59
60 100024 173000 .word 173000 ; prom start addess @ 24
61 100026 000340 .word 340 ; and priority level @ 26
62
63 ; --------------------------------------------------
64
65 100030 012706 002000 go: mov #2000,sp ; setup a stack
66 100034 005004 clr r4 ; zap old return address
67 100036 005261 000004 inc ddxcsr(r1) ; set break bit
68 100042 005003 clr r3 ; data 000,000
69 100044 004767 100120' jsr pc,10$ ; transmit a bunch of zero chars
70 100050 005061 000004 clr ddxcsr(r1) ; clear break bit
71 100054 005761 000002 tst ddrbuf(r1) ; read/flush any stale rx char
72 100060 012703 004004 mov #<010*400>+004,r3 ; data 010,004
73 100064 004767 100124' jsr pc,12$ ; transmit 004 (init) and 010 (boot)
74 100070 010003 mov r0,r3 ; get unit number
75 100072 004767 100126' jsr pc,13$ ; transmit unit number
76
77 100076 005003 clr r3 ; clear rx buffer ptr
78 100100 105711 2$: tstb (r1) ; wait for rcv'd char available
79 100102 100376 bpl 2$ ; br if not yet
80 100104 116123 000002 movb ddrbuf(r1),(r3)+ ; store the char in buffer, bump ptr
81 100110 022703 001000 cmp #1000,r3 ; hit end of buffer (512. bytes)?
82 100114 101371 bhi 2$ ; br if not yet
83
84 100116 005007 clr pc ; jump to bootstrap at zero
85
86 100120 004717 10$: jsr pc,(pc) ; recursive call for char replication
87 100122 004717 11$: jsr pc,(pc) ; recursive call for char replication
88 100124 004717 12$: jsr pc,(pc) ; recursive call for char replication
89 100126 105761 000004 13$: tstb ddxcsr(r1) ; wait for xmit buffer available
90 100132 100375 bpl 13$ ; br if not yet
91 100134 110361 000006 movb r3,ddxbuf(r1) ; send the char
92 100140 000303 swab r3 ; swap to other char
93 100142 000207 rts pc ; now recurse or return
94
95 ; --------------------------------------------------
96
97 100144 000261 dd1n: sec ; boot std csr, unit one, no diags
98 100146 012700 000001 dd1d: mov #1,r0 ; boot std csr, unit one, with diags
99 100152 000717 br ddNr ; continue
100
101 ; --------------------------------------------------
102
103 100154 000137 165564 diag: jmp @#diags ; jump to console diags
104
105 ; --------------------------------------------------
106
107 100160 000000 000000 000000 .word 0,0,0,0,0,0,0 ; unused
100166 000000 000000 000000
100174 000000
108
109 ; --------------------------------------------------
110
111 100176 .=start+176
112 100176 046154 crc16: .word <046154> ; CRC-16 will go here
113
114 last: ; next boot prom starts here
115
116 .end
116
THANK YOU Marty