1 ;;; -*- Mode: Midas -*-
2 ;;; Copyright (c) 1999 Massachusetts Institute of Technology
4 ;;; This program is free software; you can redistribute it and/or
5 ;;; modify it under the terms of the GNU General Public License as
6 ;;; published by the Free Software Foundation; either version 3 of the
7 ;;; License, or (at your option) any later version.
9 ;;; This program is distributed in the hope that it will be useful,
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; General Public License for more details.
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with this program; if not, write to the Free Software
16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 ;;; Canonical symbol definition macro, FOO==BAR with error check.
27 IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
36 ;;; RH11/TM03 Interrupt vector:
37 DEFSYM %TMVEC==224 ;(224/4 = 45) Interrupts occur on level 6
38 ; (high priority) on UBA #1.
39 DEFSYM %TMBAS==772440 ;Unibus address of first register
41 ;;; RH11/TM03 Unibus register addresses:
43 DEFSYM %TMCS1==%TMBAS ;CONTROL AND STATUS 1
44 DEFSYM %TM1SC==1_15. ; Special Condition
45 DEFSYM %TM1TE==1_14. ; Transfer Error
46 DEFSYM %TM1MP==1_13. ; Massbus Control Bus Parity Error
47 DEFSYM %TM1DA==1_11. ; Drive Available
48 DEFSYM %TM1A7==1_9. ; UB Address Extension Bit 17
49 DEFSYM %TM1A6==1_8. ; UB Address Extension Bit 16
50 DEFSYM %TM1RY==1_7. ; Ready
51 DEFSYM %TM1IE==1_6. ; Interrupt Enable
52 DEFSYM $TM1CM==.BP 77 ; Bits 0-5 specify commands.
53 DEFSYM %TM1GO==1_0. ; GO bit
55 ;;; Commands with bit 0 (GO) included:
57 DEFSYM %TMNOP==1 ;No Operation
58 DEFSYM %TMUNL==3 ;Unload
59 DEFSYM %TMREW==7 ;Rewind
60 DEFSYM %TMCLR==11 ;Formatter clear (reset errors etc.)
61 DEFSYM %TMER3==25 ;Erase three inch gap
62 DEFSYM %TMWTM==27 ;Write Tape Mark
63 DEFSYM %TMSPF==31 ;Space Forward
64 DEFSYM %TMSPR==33 ;Space Reverse
65 DEFSYM %TMWCF==51 ;Write Check FOrward
66 DEFSYM %TMWCR==57 ;Write Check Reverse
67 DEFSYM %TMWRT==61 ;Write Forward
68 DEFSYM %TMRDF==71 ;Read Forward
69 DEFSYM %TMRDR==77 ;Read Data Reverse
71 DEFSYM %TMWC==%TMBAS+2 ;WORD COUNT.
73 DEFSYM %TMBA==%TMBAS+4 ;UNIBUS ADDRESS.
75 DEFSYM %TMFC==%TMBAS+6 ;TAPE FRAME COUNT
77 DEFSYM %TMCS2==%TMBAS+10 ;CONTROL AND STATUS 2.
78 DEFSYM %TM2DL==1_15. ; Data Late
79 DEFSYM %TM2UP==1_13. ; Unibus Parity Error
80 DEFSYM %TM2NF==1_12. ; Non-existant Formatter
81 DEFSYM %TM2NM==1_11. ; %TMBA is NXM during DMA
82 DEFSYM %TM2PE==1_10. ; Program Error
83 DEFSYM %TM2MT==1_9. ; Missed Transfer
84 DEFSYM %TM2MP==1_8. ; Massbus Data Bus Parity Error
85 DEFSYM %TM2OR==1_7. ; Output Ready (for Silo buffer diag.)
86 DEFSYM %TM2IR==1_6. ; Input Ready (for Silo buffer diag.)
87 DEFSYM %TM2CC==1_5. ; Controller Clear
88 DEFSYM %TM2PT==1_4. ; Parity Test
89 DEFSYM %TM2AI==1_3. ; Unibus Address Increment Inhibit
91 DEFSYM %TMFS==%TMBAS+12 ;FORMATTER STATUS
92 DEFSYM %TMSAA==1_15. ; Attention Active
93 DEFSYM %TMSES==1_14. ; Error Summary
94 DEFSYM %TMSPP==1_13. ; Positioning in Progress
95 DEFSYM %TMSOL==1_12. ; Medium On-Line
96 DEFSYM %TMSWL==1_11. ; Write Locked
97 DEFSYM %TMSET==1_10. ; End of Tape
98 DEFSYM %TMSFP==1_8. ; Formatter Present
99 DEFSYM %TMSFR==1_7. ; Formatter Ready
100 DEFSYM %TMSSC==1_6 ; Slave Status Change
101 DEFSYM %TMSPE==1_5. ; Phase Encoded (1600BPI) Mode
102 DEFSYM %TMSSD==1_4. ; Slowing Down
103 DEFSYM %TMSIB==1_3. ; PE Identification Burst Detected
104 DEFSYM %TMSTM==1_2. ; Tape Mark detected
105 DEFSYM %TMSBT==1_1. ; Beginning of Tape
106 DEFSYM %TMSSA==1_0. ; Slave Attention (on-line)
108 DEFSYM %TMERR==%TMBAS+14 ;ERROR REGISTER
109 DEFSYM %TMECE==1_15. ; Correctable Data/CRC Error
110 DEFSYM %TMEUS==1_14. ; Unsafe
111 DEFSYM %TMEOI==1_13. ; Operation Incomplete
112 DEFSYM %TMECT==1_12. ; Controller Timing Error
113 DEFSYM %TMENX==1_11. ; Non Executable Function
114 DEFSYM %TMECS==1_10. ; Correctable Skew/Illegal Tape Mark Error
115 DEFSYM %TMEFC==1_9. ; Frame Count Error
116 DEFSYM %TMENG==1_8. ; Non-standard Gap
117 DEFSYM %TMEFL==1_7. ; PE Format/LRC Error
118 DEFSYM %TMEIC==1_6. ; Incorrectable Data/Hard Error
119 DEFSYM %TMEMD==1_5. ; Massbus Data Parity Error
120 DEFSYM %TMEFS==1_4. ; Format Select Error
121 DEFSYM %TMEMC==1_3. ; Massbus Control Parity Error
122 DEFSYM %TMERM==1_2. ; Register Modification Refused
123 DEFSYM %TMEIR==1_1. ; Illegal Register
124 DEFSYM %TMEIF==1_0. ; Illegal Function
125 DEFSYM %TMEHD==44077 ; Hard errors - US,NX,MD,FS,MC,RM,IR,IF
127 DEFSYM %TMASN==%TMBAS+16 ;ATTENTION SUMMARY.
128 ;Each bit 7-0 corresponds to a formatter asserting ATA.
130 DEFSYM %TMCCR==%TMBAS+20 ;CHECK CHARACTER REGISTER
131 DEFSYM %TMCDP==1_8. ; Dead Track Parity/CRC Parity
132 DEFSYM $TMCEI==.BP 177 ; Error Information
134 DEFSYM %TMBUF==%TMBAS+22 ;DATA BUFFER REGISTER
136 DEFSYM %TMMNT==%TMBAS+24 ;MAINTENANCE.
138 DEFSYM %TMTYP==%TMBAS+26 ;DRIVE TYPE.
139 ;2.7 Not Sector addressed
142 ;2.3 Dual controller option available
143 ;1.9 - 1.1 Drive Type Number.
144 ; TU77=14, TU45=12, TE16=11 Nothing=10
146 DEFSYM %TMSER==%TMBAS+30 ;SERIAL NUMBER
148 DEFSYM %TMTC==%TMBAS+32 ;TAPE CONTROL REGISTER
149 DEFSYM %TMTAC==1_15. ; Acceleration (not up to speed)
150 DEFSYM %TMTFC==1_14. ; Frame Count non-zero
151 DEFSYM %TMTSA==1_13. ; Slave Address (selected slave) Changed
152 DEFSYM %TMTEA==1_12. ; Enable Abort on data transfer error
153 DEFSYM %TMTDS==7_8. ; Density Select Field
154 DEFSYM $TMTDS==.BP %TMTDS
155 DEFSYM %TMD08==3 ; 800 BPI NRZI
156 DEFSYM %TMD16==4 ; 1600 BPI PE
157 DEFSYM %TMTFS==17_4. ; Format Select
158 DEFSYM $TMTFS==.BP %TMTFS
159 DEFSYM %TMFCD==0 ; PDP10 Core Dump
160 DEFSYM %TMFIC==3 ; Industry Compatible (32 bit mode)
161 DEFSYM %TMTEP==1_3. ; Even Parity
162 DEFSYM %TMTTS==7 ; Transport Select
163 DEFSYM $TMTTS==.BP %TMTTS
165 IFN $$TEMP,EXPUNG DEFSYM