/
tm78s.defs2
executable file
·181 lines (150 loc) · 6.47 KB
/
tm78s.defs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
;;; -*- Mode: Midas -*-
;;; Copyright (c) 1999 Massachusetts Institute of Technology
;;; See the COPYING file at the top-level directory of this project.
.AUXIL
;;; Canonical symbol definition macro, FOO==BAR with error check.
IFNDEF DEFSYM,[
DEFINE DEFSYM X/
IRPS Z,,[X]
IFNDEF Z,X
.ELSE [ $$TEM1==Z
X
IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
]
.ISTOP
TERMIN TERMIN
$$TEMP==1
] ;IFNDEF DEFSYM
.ELSE, $$TEMP==0
;;; RH11/TM78 Interrupt vector:
DEFSYM %ARVEC==224 ;(224/4 = 45) Interrupts occur on level 6
; (high priority) on UBA #1.
DEFSYM %ARBAS==772400 ;Unibus address of first register
;;; RH11/TM78 Unibus register addresses:
DEFSYM %ARCS1==%ARBAS ;CONTROL AND STATUS 1 (RH11 and MB Reg 00)
DEFSYM %A1SC==1_15. ; Special Condition
DEFSYM %A1TE==1_14. ; Transfer Error
DEFSYM %A1MCP==1_13. ; Massbus Control Bus Parity Error
DEFSYM %A1DA==1_11. ; Drive (TM78) Available
DEFSYM %A1A7==1_9. ; UB Address Extension Bit 17
DEFSYM %A1A6==1_8. ; UB Address Extension Bit 16
DEFSYM %A1RDY==1_7. ; Ready
DEFSYM %A1IE==1_6. ; Interrupt Enable
DEFSYM %A1CMD==77 ; Bits 0-5 specify commands.
DEFSYM %A1GO==1_0. ; GO bit
;;; Commands, with GO bit or'd in.
;;; --NOTE--
;;; Commands are passed to the controller in two ways. Data transfer
;;; command get written into the CS1 register, as usual. Non-data-transfer
;;; commands are written to the %ARNDC register for the desired drive
;;; unit (see below). Non-data-transfer commands are marked with a '*'.
DEFSYM %ACNOP==3 ;(*) No Operation
DEFSYM %ACUNL==5 ;(*) Unload
DEFSYM %ACREW==7 ;(*) Rewind
DEFSYM %ACSNS==11 ;(*) Sense (Get status from TM)
DEFSYM %ACDSE==13 ;(*) Data Security Erase! (Erase rest of tape)
DEFSYM %ACWPM==15 ;(*) Write Phase Encoded (1600bpi) Tape Mark
DEFSYM %ACWGM==17 ;(*) Write GCR (6250bpi Tape Mark
DEFSYM %ACSFR==21 ;(*) Space Forward Record
DEFSYM %ACSRR==23 ;(*) Space Reverse Record
DEFSYM %ACSFF==25 ;(*) Space Forward File
DEFSYM %ACSRF==27 ;(*) Space Reverse File
DEFSYM %ACSFE==31 ;(*) Space Forward Either (record or file)
DEFSYM %ACSRE==33 ;(*) Space Reverse Either
DEFSYM %ACE3P==35 ;(*) Erase Three-inch gap, set PE
DEFSYM %ACE3G==37 ;(*) Erase Three-inch gap, set GCR
DEFSYM %ACCFP==41 ;(*) Close File PE (write two marks, back one)
DEFSYM %ACCFG==43 ;(*) Close File GCR
DEFSYM %ACEOT==45 ;(*) Space to Logical EOT
DEFSYM %ACSFU==47 ;(*) Space forward usefully (to file or EOT)
DEFSYM %ACWCF==51 ;Write Check Forward
DEFSYM %ACWCR==57 ;Write Check Reverse
DEFSYM %ACWRP==61 ;Write Forward PE
DEFSYM %ACWRG==63 ;Write Forward GCR
DEFSYM %ACRDF==71 ;Read Forward
DEFSYM %ACRES==73 ;Read Extended Sense Information
DEFSYM %ACRDR==77 ;Read Data Reverse
DEFSYM %ARWC==%ARBAS+2 ;UNIBUS DMA WORD COUNT. (RH11)
; Negative count of the number of PDP11 (18-bit) words to DMA
DEFSYM %ARBA==%ARBAS+4 ;UNIBUS ADDRESS. (RH11)
; Unibus address of start of DMA transfer
DEFSYM %ARFC==%ARBAS+6 ;TAPE FRAME BYTE COUNT (MB Reg 05)
DEFSYM %ARCS2==%ARBAS+10 ;CONTROL AND STATUS 2. (RH11)
DEFSYM %A2DL==1_15. ; Data Late
DEFSYM %A2UPE==1_13. ; Unibus Parity Error
DEFSYM %A2NF==1_12. ; Non-existant Formatter (TM78)
DEFSYM %A2NM==1_11. ; Unibus mem NXM during DMA
DEFSYM %A2PE==1_10. ; Program Error
DEFSYM %A2MT==1_9. ; Missed Transfer
DEFSYM %A2MDP==1_8. ; Massbus Data Bus Parity Error
DEFSYM %A2OR==1_7. ; Output Ready (for Silo buffer diag.)
DEFSYM %A2IR==1_6. ; Input Ready (for Silo buffer diag.)
DEFSYM %A2CC==1_5. ; Controller Clear
DEFSYM %A2PT==1_4. ; Parity Test
DEFSYM %A2UAI==1_3. ; Unibus Address Increment Inhibit
DEFSYM %ARDER==%ARBAS+12 ;DATA TRANSFER ERROR REPORT (MB Reg 01)
DEFSYM %ADEIC==77 ; Interrupt Code
DEFSYM %ADEDP==1_8. ; DPR ???
DEFSYM %ADEFC==77_10. ; Failure Code
DEFSYM %ARDCA==%ARBAS+14 ;DATA COMMAND ARGUMENTS (MB Reg 02)
DEFSYM %ADACA==3 ; Command Address (TU78 unit number)
DEFSYM %ADARC==77_2. ; Record Count
DEFSYM %ADASC==17_8. ; Skip Count
DEFSYM %ADAFT==7_12. ; Format
DEFSYM %ADASR==1_15. ; Supress Repositioning on error
DEFSYM %ARASN==%ARBAS+16 ;ATTENTION SUMMARY. (MB Reg 04)
;Each bit 3-0 corresponds to a drive wanting attention
; You must explicitly -RESET- an attention bit by writing a
; one into it before the controller can interrupt you again.
DEFSYM %ARDS==%ARBAS+20 ;DRIVE STATUS (MB Reg 07)
;;; This register is valid only after a SENSE command
;;; (or possibly an unsolicited ONLINE interrupt)
DEFSYM %ASRDY==1_15. ; Tape Ready
DEFSYM %ASPRE==1_14. ; Present (TM78 powered up)
DEFSYM %ASONL==1_13. ; Online
DEFSYM %ASREW==1_12. ; Tape Rewinding
DEFSYM %ASPE==1_11. ; Tape is Phase Encoded
DEFSYM %ASBOT==1_10. ; Tape at BOT
DEFSYM %ASEOT==1_9. ; Tape at EOT
DEFSYM %ASWPT==1_8. ; Tape is Write Protected
DEFSYM %ASUA==1_7. ; Unit Available
DEFSYM %ASUS==1_6. ; Unit is shared
DEFSYM %ASMMD==1_5. ; Unit is in Maintainance mode
DEFSYM %ASDSE==1_4. ; Data Security Erase in progress.
DEFSYM %ARBUF==%ARBAS+22 ;DATA BUFFER REGISTER (RH11)
DEFSYM %ARMR1==%ARBAS+24 ;MAINTENANCE REGISTER 1 (MB Reg 03)
DEFSYM %ARTYP==%ARBAS+26 ;DRIVE TYPE. (MB Reg 06)
;;; This register is valid only after a SENSE command
;2.7 Not Sector addressed
;2.6 Tape
;2.5 Moving Head (always 0)
;2.4 7 track (always 0)
;2.3 Dual port (must do arbitration)
;2.2 Slave present (always 1)
;2.1 Writable Control Store (always 0)
;1.9 - 1.1 Drive Type Number.
; TU78=101
DEFSYM %ARSER==%ARBAS+30 ;SERIAL NUMBER (MB Reg 010)
;;; This register is valid only after a SENSE command
;0-3 SN digit 0, in BCD
;4-7 SN digit 1
;8-11 SN digit 2
;12-15 SN digit 3
DEFSYM %ARMR2==%ARBAS+32 ;MAINTAINANCE REGISTER 2 (MB Reg 011)
DEFSYM %ARMR3==%ARBAS+34 ;MAINTAINANCE REGISTER 3 (MB Reg 012)
DEFSYM %ARNDE==%ARBAS+36 ;NON-DATA CMD ERROR REGISTER (MB Reg 013)
DEFSYM %ANEIC==77 ; NDT Interrupt code
DEFSYM %ANEAA==3_8. ; Attention Address (drive that caused this)
DEFSYM %ANEFC==77_10. ; NDT Failure Code
DEFSYM %ARNDA==%ARBAS+40 ;NON-DATA CMD ARG REGISTERS (MB Reg 014 - 017)
;;; There are four of these, one for each of the possible slave TU78
;;; units on the TM78. This is where you write commands that don't
;;; move data over the massbus.
DEFSYM %ANCMD==77 ; Command to execute
DEFSYM %ANCNT==377_8. ; Count
DEFSYM %ARIA==%ARBAS+50 ;INTERNAL ADDRESS (MB Reg 020)
DEFSYM %ARID==%ARBAS+52 ;HARDWARE CONTROL (MB Reg 021)
DEFSYM %AHRDY==1_15. ; Set when controller is ready. (read only)
DEFSYM %AHCLR==1_14. ; Write 1 here to reset controller.
;;; And a bunch of other stuff
IFN $$TEMP,EXPUNG DEFSYM