Consolidate license copies
[its.git] / sysdoc / magtap.101
1 Copyright (c) 1999 Massachusetts Institute of Technology
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or (at
6 your option) any later version.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 ------------------------------
17
18 MAG TAPE SPECS
19 Copied from memo from S.Cutler 2/23/72
20 THIS MEMO CONTAINS MANY LOWER-CASE CHARS
21
22 Bits in left half word of .OPEN call:
23 3.1=1,,0
24     0=> Input
25     1=> Output
26
27 3.2=2,,0
28     0=> Unit
29     1=> Block
30
31 3.3=4,,0
32     0=> ASCII
33     1=> Image
34
35 3.4=10,,0
36     0=> Ignore record gaps,treat them as part of the hardware
37     1=> "Chunk mode."   [does not appear to be implemented any more]
38         If output then write an EOR gap after each .IOT.
39         If input, if user defined block IOT pointer is big enough 
40         one record is read. See .IOT for details. Must be 
41         opened in block mode.
42
43 3.5=20,,0
44     0=> Skip to EOF on last close on read
45     1=> Don't  " "  "   "     "   "   "
46
47 3.6=40,,0
48     0=> Odd parity
49     1=> Even parity
50
51 3.7,8=300,,0
52     00=> default (800 or 1600 BPI depending on drive type)
53     01=> 800 BPI                (used to be 200 BPI)
54     10=> 1600 BPI               (used to be 556 BPI)
55     11=> 6250 BPI               (used to be 800 BPI)
56
57 3.9=400,,0 Only meaningful for 9 track tapes
58     0=> Core dump mode, 36 bit words, any density allowed.
59     1=> IBM Character Mode, 32 bit words, doesn't allow 200/556 BPI
60
61 4.1,2,3=7000,,0
62     0=> 2000=1024. words per record
63     1=> 1000=512. WPR
64     2=> 400=256. WPR
65     3=> 200=128. WPR
66     4=> 100=64. WPR
67     5=> 40=32. WPR
68     6=> 20=16. WPR
69     7=> 10=8. WPR
70
71 Open error if:
72          1) Open for writing and 
73                 a) Open for reading on another channel
74                 b) Tape write locked (i.e. no ring)
75                 c) IBM mode and less than 800 BPI
76         2) Open for reading and already open for writing on another 
77            channel
78         3) Transport not on line
79         4) Chunk mode and not block mode
80
81
82 .IOT CHNM,LOC
83 -------------
84
85 For standard .OPEN, this works as a standard .IOT.  If open 
86 in chunk mode input [not implemented any more], loc has 
87
88         loc/  -count,,loc2
89
90 where count is a number greater than the possible number of words to 
91 be written into core.  The .IOT causes words to be read into core 
92 starting at loc2.  For each word read, the count in decreased by one.
93 An IOC error occurs if the count is too small to contain the 
94 record.
95
96 On chunk mode output, an EOR gap is written after each .IOT, 
97 and the tape is written after each .IOT instead of waiting for 
98 system buffers to fill or the channel closed. [not implemented any more]
99
100
101
102
103 .CLOSE CHNM,
104 ------------
105
106 Closes the channel, releases the transport if not open on another 
107 channel.  Writes out all buffers in the system and writes 2 EOF 
108 marks if open for writing, and backs up over second one.
109
110
111
112
113 .STATUS CHNM,LOC
114 ----------------
115
116 1.1-1.6=>   physical device code (15)
117
118 1.7-1.9     mode open in
119
120 2.1=>       System buffering capacity empty (i.e. 0=> data read from 
121             tape and not yet transferred to user by a .IOT or data 
122             .IOTed from the user to the system but not actually 
123             written onto tape or user core image.)
124
125 2.2=>       System buffering capacity full (i.e. no core in which to 
126             allocate buffers for reading from tape.  Also too many 
127             buffers resident in system but not yet written onto either
128             tape or users core image.)
129
130 2.3=>       1=> Beginning of tape
131
132 2.4=>       1=> End of tape
133
134 2.5=>       1=> 9 track, 0=> 7 track
135
136 2.6=>       1=>IBM mode, 0=> core dump mode
137
138 2.7=>       Transport idle (no pending command)
139
140 2.8=>       EOF (last thing seen was a tape mark)
141
142 Left half standard.
143
144
145
146
147 .RCHST AC,
148 ----------
149
150 AC/  CHNM,,LOC
151
152 LOC:    0) 0,,(SIXBIT /MTn/)
153         1) 0
154         2) 0
155         3) 0
156         4) -1
157
158
159
160
161 .MTAPE AC,
162 ----------
163
164 AC/  CHNM,,COMAND
165
166 COMAND/  COUNT,,FUNCTION
167
168 Right half of COMAND
169         0=> Hang until all tape motions finish
170         1=> Rewind
171         2=> Rewind and unload  (also shreds tape leader)
172         3=> Write EOR.  Writes out current system buffers even if
173             less than record size and writes an EOR gap.
174         4=> Write 3 inches of blank tape
175         5=> Write EOF. (Two EOF's are written automatically 
176             after a close on a channel open for writing.)
177         6=> Space forward COUNT records. COUNT=0 implies 1 
178             record.  COUNT negative implies space reverse.  Stops
179             at EOF or BOT.
180         7=> Space forward +- COUNT files. (Stops at BOT or 
181             logical EOT.)
182         8.=> Space forward to logical EOT, back up over second 
183             EOF.
184         9.=> Stop and reset the tape system.
185        10.=> Set write record size to COUNT words.
186        11.=> Read into AC write record size or size of last record
187              gobbled by an input IOT.
188
189 Skips if successful.
190
191 Rewind and space only if open for reading.
192
193 Write EOR, 3 inch, EOF writing only.
194
195 Stop and hang for both read and write.
196
197
198
199
200 Transport State Notes
201 --------- ----- -----
202
203 A transport turned off or off line is equivalent to not being there.
204
205 Tape can not be written unless the write enable ring is in the hub 
206 of the tape.
207
208 A transport can be opened by an arbitrary number of channels in
209 different modes, but can not be opened by more than one user, or in 
210 both input and output.  The device dependent bits (3.4-4.9) must be 
211 the same for all channels with the exception of chunk mode.
212
213
214 The logical end of tape (EOT) is located after two EOF's in a 
215 row.  A close on a channel open for writing writes two EOF's and 
216 then backspaces over one of them.  The .MTAPE command to go to 
217 the end of the tape also backspaces over the second EOF.
218
219 If the physical end of tape mark is reached while writing a record, 
220 the record is finished being output (there is always room for a few 
221 records after the reflective strip) and an IOC error is raised 
222 saying End of Tape.
223 \ 3\f