3
Subj: H316 Simulator Usage
8
The following copyright notice applies to both the SIMH source and binary:
10
Original code published in 1993-2004, written by Robert M Supnik
11
Copyright (c) 1993-2004, Robert M Supnik
13
Permission is hereby granted, free of charge, to any person obtaining a
14
copy of this software and associated documentation files (the "Software"),
15
to deal in the Software without restriction, including without limitation
16
the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
and/or sell copies of the Software, and to permit persons to whom the
18
Software is furnished to do so, subject to the following conditions:
20
The above copyright notice and this permission notice shall be included in
21
all copies or substantial portions of the Software.
23
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26
ROBERT M SUPNIK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
27
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
Except as contained in this notice, the name of Robert M Supnik shall not
31
be used in advertising or otherwise to promote the sale, use or other dealings
32
in this Software without prior written authorization from Robert M Supnik.
34
This memorandum documents the Honeywell 316/516 simulator.
39
The H316 requires the following files:
69
The Honeywell 316/516 simulator is configured as follows:
74
CPU H316/H516 CPU with 16/32KW memory
75
PTR 316/516-50 paper tape reader
76
PTP 316/516-52 paper tape punch
77
TTY 316/516-33 console terminal
78
CLK 316/516-12 real time clock
79
LPT 316/516 line printer
80
FHD 4400 fixed head disk
81
DP 4623/4653/4720 disk pack controller with eight drives
82
MT 4100 seven track magtape with four drives
84
The H316/H516 simulator implements several unique stop conditions:
86
- decode of an undefined instruction, and STOP_INST is et
87
- reference to an undefined I/O device, and STOP_DEV is set
88
- more than INDMAX indirect references are detected during
89
memory reference address decoding
90
- DMA/DMC direction does not agree with I/O device operation
91
- a write operation is initiated on a write locked magtape
92
unit (hangs the real system)
93
- a disk write overruns the specified record size (destroys
94
the rest of the track on the real system)
95
- a disk track has an illegal format
97
The H316/H516 loader is not implemented.
101
CPU options include choice of instruction set, memory size, DMC option,
102
and number of DMA channels.
104
SET CPU HSA high speed arithmetic instructions
105
SET CPU NOHSA no high speed arithmetic instructions
106
SET CPU 4K set memory size = 4K
107
SET CPU 8K set memory size = 8K
108
SET CPU 12K set memory size = 12K
109
SET CPU 16K set memory size = 16K
110
SET CPU 24K set memory size = 24K
111
SET CPU 32K set memory size = 32K
112
SET CPU DMC enable DMC option
113
SET CPU NODMC disable DMC option
114
SET CPU DMA=n set number of DMA channels to n (0-4)
116
If memory size is being reduced, and the memory being truncated contains
117
non-zero data, the simulator asks for confirmation. Data in the truncated
118
portion of memory is lost. Initial memory size is 32K. The HSA and DMC
119
options are enabled, and four DMA channels are configured.
121
The CPU includes special show commands to display the state of the DMA
124
SHOW CPU DMAn show DMA channel n
126
CPU registers include the visible state of the processor as well as the
127
control registers for the interrupt system.
138
PME 1 previous mode extend flag
139
EXT_OFF 1 extend off pending flag
140
DP 1 double precision flag
141
SS1..4 1 sense switches 1..4
142
ION 1 interrupts enabled
143
INODEF 1 interrupts not deferred
144
INTREQ 16 interrupt requests
145
DEVRDY 16 device ready flags (read only)
146
DEVENB 16 device interrupt enable flags (read only)
147
CHREQ 20 DMA/DMC channel requests
148
DMAAD[0:3] 16 DMA channel current address, channels 1-4
149
DMAWC[0:3] 15 DMA channel word count, channels 1-4
150
DMAEOR[0:3] 1 DMA end of range flag, channels 1-4
151
STOP_INST 1 stop on undefined instruction
152
STOP_DEV 1 stop on undefined device
153
INDMAX 1 indirect address limit
154
PCQ[0:63] 15 PC prior to last JMP, JSB, or interrupt;
155
most recent PC change first
156
WRU 8 interrupt character
158
2.2 Programmed I/O Devices
160
2.2.1 316/516-50 Paper Tape Reader (PTR)
162
The paper tape reader (PTR) reads data from a disk file. The POS
163
register specifies the number of the next data item to be read.
164
Thus, by changing POS, the user can backspace or advance the reader.
166
The paper tape reader supports the BOOT command. BOOT PTR copies the
167
absolute binary loader into memory and starts it running.
169
The paper tape reader implements these registers:
173
BUF 8 last data item processed
174
INTREQ 1 device interrupt request
176
ENABLE 1 device interrupts enabled
177
POS 32 position in the input or output file
178
TIME 24 time from I/O initiation to interrupt
179
STOP_IOE 1 stop on I/O error
181
Error handling is as follows:
183
error STOP_IOE processed as
185
not attached 1 report error and stop
188
end of file 1 report error and stop
189
0 out of tape or paper
191
OS I/O error x report error and stop
193
2.2.2 316/516-52 Paper Tape Punch (PTP)
195
The paper tape punch (PTP) writes data to a disk file. The POS
196
register specifies the number of the next data item to be written.
197
Thus, by changing POS, the user can backspace or advance the punch.
199
The paper tape punch implements these registers:
203
BUF 8 last data item processed
204
INTREQ 1 device interrupt request
206
ENABLE 1 device interrupts enabled
207
POWER 1 device powered up
208
POS 32 position in the input or output file
209
TIME 24 time from I/O initiation to interrupt
210
PWRTIME 24 time from I/O request to power up
211
STOP_IOE 1 stop on I/O error
213
Error handling is as follows:
215
error STOP_IOE processed as
217
not attached 1 report error and stop
220
OS I/O error x report error and stop
222
2.2.3 316/516-33 Console Teletype (TTY)
224
The Teletype units (TTY0, TTY1) can be set to one of three modes:
225
KSR, 7B, or 8B. In KSR mode, lower case input and output characters
226
are automatically converted to upper case, and the high order bit is
227
forced to one on input. In 7B mode, input and output characters are
228
masked to 7 bits. In 8B mode, characters are not modified. Changing
229
the mode of either unit changes both. The default mode is KSR.
231
The Teletype reads from the console keyboard and writes to the
232
simulator console window. It implements these registers:
236
BUF 8 last data item processed
237
MODE 1 read/write mode
238
INTREQ 1 device interrupt request
240
ENABLE 1 device interrupts enabled
241
KPOS 32 number of characters input
242
KTIME 24 keyboard polling interval
243
TPOS 32 number of characters output
244
TTIME 24 time from I/O initiation to interrupt
246
2.2.4 316/516-12 Real Time Clock (CLK)
248
The real time clock (CLK) frequency can be adjusted as follows:
250
SET CLK 60HZ set frequency to 60Hz
251
SET CLK 50HZ set frequency to 50Hz
255
The clock implements these registers:
259
INTREQ 1 device interrupt request
261
ENABLE 1 device interrupts enabled
262
TIME 24 clock interval
264
The real-time clock autocalibrates; the clock interval is adjusted up or
265
down so that the clock tracks actual elapsed time.
267
2.3 316/516 Line Printer (LPT)
269
The line printer (LPT) writes data to a disk file. The POS register
270
specifies the number of the next data item to be written. Thus,
271
by changing POS, the user can backspace or advance the printer.
273
The line printer can be connected to the IO bus, a DMC channel, or
276
SET LPT IOBUS connect to IO bus
277
SET LPT DMC=n connect to DMC channel n (1-16)
278
SET LPT DMA=n connect to DMA channel n (1-4)
280
By default, the line printer is connected to the IO bus.
282
The line printer implements these registers:
286
WDPOS 6 word position in current scan
287
DRPOS 6 drum position
288
CRPOS 1 carriage position
289
PRDN 1 print done flag
291
EOR 1 (DMA/DMC) end of range flag
292
DMA 1 transfer using DMA/DMC
293
INTREQ 1 device interrupt request
294
ENABLE 1 device interrupt enable
295
SVCST 2 service state
296
SVCCH 2 service channel
298
POS 32 number of characters output
299
XTIME 24 delay between transfers
300
ETIME 24 delay at end of scan
301
PTIME 24 delay for shuttle/line advance
302
STOP_IOE 1 stop on I/O error
304
Error handling is as follows:
306
error STOP_IOE processed as
308
not attached 1 report error and stop
311
OS I/O error x report error and stop
313
2.4 4400 Fixed Head Disk (FHD)
315
Fixed head disk options include the ability to set the number of
316
surfaces to a fixed value between 1 and 16, or to autosize the number
317
of surfaces from the attached file:
319
SET FHD 1S one surface (98K)
320
SET FHD 2S two platters (196K)
322
SET FHD 16S sixteen surfaces (1568K)
323
SET FHD AUTOSIZE autosized on attach
325
The default is one surface.
327
The fixed head disk can be connected to the IO bus, a DMC channel, or
330
SET FHD IOBUS connect to IO bus
331
SET FHD DMC=n connect to DMC channel n (1-16)
332
SET FHD DMA=n connect to DMA channel n (1-4)
334
By default, the fixed head disk is connected to the IO bus.
337
The fixed head disk implements these registers:
341
CW1 16 control word 1 (read write, surface, track)
342
CW2 16 control word 2 (character address)
344
BUSY 1 controller busy flag
345
RDY 1 transfer ready flag
346
DTE 1 data transfer error flag
347
ACE 1 access error flag
348
EOR 1 (DMA/DMC) end of range
349
DMA 1 transfer using DMA/DMC
350
CSUM 1 transfer parity checksum
351
INTREQ 1 device interrupt request
352
ENABLE 1 device interrupt enable
353
TIME 24 delay between words
354
STOP_IOE 1 stop on I/O error
356
The fixed head disk does not support the BOOT command.
358
Error handling is as follows:
360
error STOP_IOE processed as
362
not attached 1 report error and stop
365
Fixed head disk data files are buffered in memory; therefore, end of file
366
and OS I/O errors cannot occur.
368
2.5 4100 7-track Magnetic Tape (MT)
370
Magnetic tape options include the ability to make units write enabled or
373
SET MTn LOCKED set unit n write locked
374
SET MTn WRITEENABLED set unit n write enabled
376
Units can be set ONLINE or OFFLINE, and WRITEENABLED or write LOCKED.
378
The magtape controller can be connected to the IO bus, a DMC channel, or
381
SET MT IOBUS connect to IO bus
382
SET MT DMC=n connect to DMC channel n (1-16)
383
SET MT DMA=n connect to DMA channel n (1-4)
385
By default, the magtape controller is connected to the IO bus.
387
The magnetic tape controller implements these registers:
393
BUSY 1 controller busy flag
394
RDY 1 transfer ready flag
396
EOF 1 end of file flag
397
EOR 1 (DMA/DMC) end of range
398
DMA 1 transfer using DMA/DMC
399
MDIRQ 1 motion done interrupt request
400
INTREQ 1 device interrupt request
401
ENABLE 1 device interrupt enable
402
DBUF[0:65535] 8 transfer buffer
403
BPTR 17 transfer buffer pointer
404
BMAX 17 transfer size (reads)
405
CTIME 24 start/stop time
406
XTIME 24 delay between words
407
POS[0:3] 32 position, units 0-3
408
STOP_IOE 1 stop on I/O error
410
Error handling is as follows:
414
not attached tape not ready; if STOP_IOE, stop
418
OS I/O error parity error; if STOP_IOE, stop
420
2.6 4623/4651/4720 Disk Packs (DP)
422
The disk controller can be configured as a 4623, supporting 10 surface
423
disk packs; a 4651, supporting 2 surface disk packs; or a 4720, supporting
424
20 surface disk packs:
426
SET DP 4623 controller is 4623
427
SET DP 4651 controller is 4651
428
SET DP 4720 controller is 4720
430
The default is 4651. All disk packs on the controller must be of the
431
same type. Units can be set ONLINE or OFFLINE, and WRITEENABLED or
434
The disk pack controller can be connected to a DMC channel or a DMA
435
channel; it cannot be connected to the IO bus:
437
SET DP DMC=n connect to DMC channel n (1-16)
438
SET DP DMA=n connect to DMA channel n (1-4)
440
The disk pack controller supports variable track formatting. Each track
441
can contain between 1 and 103 records, with a minimum size of 1 word and
442
a maximum size of 1893 words. Record addresses are unconstrained. The
443
simulator provides a command to perform a simple, fixed record size format
446
SET DPn FORMAT=k format unit n with k words per record
447
SET -R DPn FORMAT=k format unit n with k records per track
449
Record addresses can either be geometric (cylinder/track/sector) or simple
450
sequential starting from 0:
452
SET DPn FORMAT=k format with geometric record addresses
453
SET -S DPn FORMAT=k format with sequential record addresses
455
Geometric address have the cylinder number in bits<1:8>, the head number in
456
bits<9:13>, and the sector number in bits <14:16>.
458
A summary of the current format, and its validity, can be obtained with
461
SHOW DPn FORMAT display format of unit n
463
To accomodate the variable formatting, each track is allocated 2048 words
464
in the data file. A record consists of a three word header, the data, and
467
word 0 record length in words, not including header/trailer
468
word 1 record address
469
word 2 number of extension words used (0-4)
470
word 3 start of data record
471
word 3+n-1 end of data record
472
word 3+n..7+n record trailer: up to four extension words,
475
A record can "grow" by up to four words without disrupting the track formatting;
476
writing more than four extra words destroys the formatting of the rest of the
477
track and causes a simulator error.
479
The disk pack controller implements these registers:
485
FNC 4 controller function
486
CW1 16 command word 1
487
CW2 16 command word 2
488
CSUM 16 record checksum
489
BUSY 1 controller busy
491
EOR 1 (DMA/DMC) end of range
492
DEFINT 1 seek deferred interrupt pending
493
INTREQ 1 interrupt request
494
ENABLE 1 interrupt enable
495
TBUF[0:2047] 16 track buffer
496
RPTR 11 pointer to start of record in track buffer
497
WPTR 11 pointer to current word in record
498
BCTR 15 bit counter for formatting
499
STIME 24 seek time, per cylinder
500
XTIME 24 transfer time, per word
501
BTIME 24 controller busy time
503
Error handling is as follows:
507
not attached pack off line; if STOP_IOE, stop
511
OS I/O error data error; if STOP_IOE, stop
513
2.7 Symbolic Display and Input
515
The H316/H516 simulator implements symbolic display and input. Display is
516
controlled by command line switches:
518
-a display as ASCII character
519
-c display as two character string
520
-m display instruction mnemonics
522
Input parsing is controlled by the first character typed in or by command
525
' or -a ASCII character
526
" or -c two character sixbit string
527
alphabetic instruction mnemonic
530
Instruction input uses standard H316/H516 assembler syntax. There are six
531
instruction classes: memory reference, I/O, control, shift, skip, and
534
Memory reference instructions have the format
536
memref{*} {C/Z} address{,1}
538
where * signifies indirect, C a current sector reference, Z a sector zero
539
reference, and 1 indexed. The address is an octal number in the range 0 -
540
077777; if C or Z is specified, the address is a page offset in the range
541
0 - 0777. Normally, C is not needed; the simulator figures out from the
542
address what mode to use. However, when referencing memory outside the CPU,
543
there is no valid PC, and C must be used to specify current sector addressing.
545
I/O instructions have the format
549
The pulse+device is an octal number in the range 0 - 01777.
551
Control and operate instructions consist of a single opcode
555
Shift instructions have the format
559
where n is an octal number in the range 0-77.
561
Skip instructions have the format
563
sub-op sub-op sub-op...
565
The simulator checks that the combination of sub-opcodes is legal.