~ubuntu-branches/ubuntu/utopic/simh/utopic

« back to all changes in this revision

Viewing changes to H316/h316_doc.txt

  • Committer: Bazaar Package Importer
  • Author(s): Vince Mulhollon
  • Date: 2004-04-20 20:01:26 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040420200126-ehsuleda8xcgi51h
Tags: 3.2.0-1
New upstream 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
To:     Users
 
2
From:   Bob Supnik
 
3
Subj:   H316 Simulator Usage
 
4
Date:   15-Feb-2004
 
5
 
 
6
                        COPYRIGHT NOTICE
 
7
 
 
8
The following copyright notice applies to both the SIMH source and binary:
 
9
 
 
10
   Original code published in 1993-2004, written by Robert M Supnik
 
11
   Copyright (c) 1993-2004, Robert M Supnik
 
12
 
 
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:
 
19
 
 
20
   The above copyright notice and this permission notice shall be included in
 
21
   all copies or substantial portions of the Software.
 
22
 
 
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.
 
29
 
 
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.
 
33
 
 
34
This memorandum documents the Honeywell 316/516 simulator.
 
35
 
 
36
 
 
37
1. Simulator Files
 
38
 
 
39
The H316 requires the following files:
 
40
 
 
41
sim/            scp.h
 
42
                sim_console.h
 
43
                sim_defs.h
 
44
                sim_fio.h
 
45
                sim_rev.h
 
46
                sim_sock.h
 
47
                sim_tape.h
 
48
                sim_timer.h
 
49
                sim_tmxr.h
 
50
                scp.c
 
51
                sim_console.c
 
52
                sim_fio.c
 
53
                sim_sock.c
 
54
                sim_tape.c
 
55
                sim_timer.c
 
56
                sim_tmxr.c
 
57
 
 
58
sim/h316/       h316_defs.h
 
59
                h316_cpu.c
 
60
                h316_fhd.c
 
61
                h316_lp.c
 
62
                h316_mt.c
 
63
                h316_dp.c
 
64
                h316_stddev.c
 
65
                h316_sys.c
 
66
 
 
67
2. H316/H516 Features
 
68
 
 
69
The Honeywell 316/516 simulator is configured as follows:
 
70
 
 
71
device          simulates
 
72
name(s)
 
73
 
 
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
 
83
 
 
84
The H316/H516 simulator implements several unique stop conditions:
 
85
 
 
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
 
96
 
 
97
The H316/H516 loader is not implemented.
 
98
 
 
99
2.1 CPU
 
100
 
 
101
CPU options include choice of instruction set, memory size, DMC option,
 
102
and number of DMA channels.
 
103
 
 
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)
 
115
 
 
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.
 
120
 
 
121
The CPU includes special show commands to display the state of the DMA
 
122
channels:
 
123
 
 
124
        SHOW CPU DMAn           show DMA channel n
 
125
 
 
126
CPU registers include the visible state of the processor as well as the
 
127
control registers for the interrupt system.
 
128
 
 
129
        name            size    comments
 
130
 
 
131
        P               15      program counter
 
132
        A               16      A register
 
133
        B               16      B register
 
134
        X               16      index register
 
135
        SC              16      shift count
 
136
        C               1       carry flag
 
137
        EXT             1       extend flag
 
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
 
157
 
 
158
2.2 Programmed I/O Devices
 
159
 
 
160
2.2.1 316/516-50 Paper Tape Reader (PTR)
 
161
 
 
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.
 
165
 
 
166
The paper tape reader supports the BOOT command.  BOOT PTR copies the
 
167
absolute binary loader into memory and starts it running.
 
168
 
 
169
The paper tape reader implements these registers:
 
170
 
 
171
        name            size    comments
 
172
 
 
173
        BUF             8       last data item processed
 
174
        INTREQ          1       device interrupt request
 
175
        READY           1       device ready
 
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
 
180
 
 
181
Error handling is as follows:
 
182
 
 
183
        error        STOP_IOE   processed as
 
184
 
 
185
        not attached    1       report error and stop
 
186
                        0       out of tape
 
187
 
 
188
        end of file     1       report error and stop
 
189
                        0       out of tape or paper
 
190
 
 
191
        OS I/O error    x       report error and stop
 
192
 
 
193
2.2.2 316/516-52 Paper Tape Punch (PTP)
 
194
 
 
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.
 
198
 
 
199
The paper tape punch implements these registers:
 
200
 
 
201
        name            size    comments
 
202
 
 
203
        BUF             8       last data item processed
 
204
        INTREQ          1       device interrupt request
 
205
        READY           1       device ready
 
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
 
212
 
 
213
Error handling is as follows:
 
214
 
 
215
        error        STOP_IOE   processed as
 
216
 
 
217
        not attached    1       report error and stop
 
218
                        0       out of tape
 
219
 
 
220
        OS I/O error    x       report error and stop
 
221
 
 
222
2.2.3 316/516-33 Console Teletype (TTY)
 
223
 
 
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.
 
230
 
 
231
The Teletype reads from the console keyboard and writes to the
 
232
simulator console window.  It implements these registers:
 
233
 
 
234
        name            size    comments
 
235
 
 
236
        BUF             8       last data item processed
 
237
        MODE            1       read/write mode
 
238
        INTREQ          1       device interrupt request
 
239
        READY           1       device ready
 
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
 
245
 
 
246
2.2.4 316/516-12 Real Time Clock (CLK)
 
247
 
 
248
The real time clock (CLK) frequency can be adjusted as follows:
 
249
 
 
250
        SET CLK 60HZ            set frequency to 60Hz
 
251
        SET CLK 50HZ            set frequency to 50Hz
 
252
 
 
253
The default is 60Hz.
 
254
 
 
255
The clock implements these registers:
 
256
 
 
257
        name            size    comments
 
258
 
 
259
        INTREQ          1       device interrupt request
 
260
        READY           1       device ready
 
261
        ENABLE          1       device interrupts enabled
 
262
        TIME            24      clock interval
 
263
 
 
264
The real-time clock autocalibrates; the clock interval is adjusted up or
 
265
down so that the clock tracks actual elapsed time.
 
266
 
 
267
2.3 316/516 Line Printer (LPT)
 
268
 
 
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.
 
272
 
 
273
The line printer can be connected to the IO bus, a DMC channel, or
 
274
a DMA channel:
 
275
 
 
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)
 
279
 
 
280
By default, the line printer is connected to the IO bus.
 
281
 
 
282
The line printer implements these registers:
 
283
 
 
284
        name            size    comments
 
285
 
 
286
        WDPOS           6       word position in current scan
 
287
        DRPOS           6       drum position
 
288
        CRPOS           1       carriage position
 
289
        PRDN            1       print done flag
 
290
        RDY             1       ready 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
 
297
        BUF             8       buffer
 
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
 
303
 
 
304
Error handling is as follows:
 
305
 
 
306
        error        STOP_IOE   processed as
 
307
 
 
308
        not attached    1       report error and stop
 
309
                        0       out of paper
 
310
 
 
311
        OS I/O error    x       report error and stop
 
312
 
 
313
2.4 4400 Fixed Head Disk (FHD)
 
314
 
 
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:
 
318
 
 
319
        SET FHD 1S              one surface (98K)
 
320
        SET FHD 2S              two platters (196K)
 
321
        :
 
322
        SET FHD 16S             sixteen surfaces (1568K)
 
323
        SET FHD AUTOSIZE        autosized on attach
 
324
 
 
325
The default is one surface.
 
326
 
 
327
The fixed head disk can be connected to the IO bus, a DMC channel, or
 
328
a DMA channel:
 
329
 
 
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)
 
333
 
 
334
By default, the fixed head disk is connected to the IO bus.
 
335
 
 
336
 
 
337
The fixed head disk implements these registers:
 
338
 
 
339
        name            size    comments
 
340
 
 
341
        CW1             16      control word 1 (read write, surface, track)
 
342
        CW2             16      control word 2 (character address)
 
343
        BUF             16      data buffer
 
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
 
355
 
 
356
The fixed head disk does not support the BOOT command.
 
357
 
 
358
Error handling is as follows:
 
359
 
 
360
        error        STOP_IOE   processed as
 
361
 
 
362
        not attached    1       report error and stop
 
363
                        0       disk not ready
 
364
 
 
365
Fixed head disk data files are buffered in memory; therefore, end of file
 
366
and OS I/O errors cannot occur.
 
367
 
 
368
2.5 4100 7-track Magnetic Tape (MT)
 
369
 
 
370
Magnetic tape options include the ability to make units write enabled or
 
371
or write locked.
 
372
 
 
373
        SET MTn LOCKED          set unit n write locked
 
374
        SET MTn WRITEENABLED    set unit n write enabled
 
375
 
 
376
Units can be set ONLINE or OFFLINE, and WRITEENABLED or write LOCKED.
 
377
 
 
378
The magtape controller can be connected to the IO bus, a DMC channel, or
 
379
a DMA channel:
 
380
 
 
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)
 
384
 
 
385
By default, the magtape controller is connected to the IO bus.
 
386
 
 
387
The magnetic tape controller implements these registers:
 
388
 
 
389
        name            size    comments
 
390
 
 
391
        BUF             16      data buffer
 
392
        USEL            2       unit select
 
393
        BUSY            1       controller busy flag
 
394
        RDY             1       transfer ready flag
 
395
        ERR             1       error 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
 
409
 
 
410
Error handling is as follows:
 
411
 
 
412
        error                   processed as
 
413
 
 
414
        not attached            tape not ready; if STOP_IOE, stop
 
415
 
 
416
        end of file             bad tape
 
417
 
 
418
        OS I/O error            parity error; if STOP_IOE, stop
 
419
 
 
420
2.6 4623/4651/4720 Disk Packs (DP)
 
421
 
 
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:
 
425
 
 
426
        SET DP 4623             controller is 4623
 
427
        SET DP 4651             controller is 4651
 
428
        SET DP 4720             controller is 4720
 
429
 
 
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
 
432
write LOCKED.
 
433
 
 
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:
 
436
 
 
437
        SET DP DMC=n            connect to DMC channel n (1-16)
 
438
        SET DP DMA=n            connect to DMA channel n (1-4)
 
439
 
 
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
 
444
of a new disk:
 
445
 
 
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
 
448
 
 
449
Record addresses can either be geometric (cylinder/track/sector) or simple
 
450
sequential starting from 0:
 
451
 
 
452
        SET DPn FORMAT=k        format with geometric record addresses
 
453
        SET -S DPn FORMAT=k     format with sequential record addresses
 
454
 
 
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>.
 
457
 
 
458
A summary of the current format, and its validity, can be obtained with
 
459
the command:
 
460
 
 
461
        SHOW DPn FORMAT         display format of unit n
 
462
 
 
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
 
465
a five word trailer:
 
466
 
 
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,
 
473
                        plus checksum
 
474
 
 
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.
 
478
 
 
479
The disk pack controller implements these registers:
 
480
 
 
481
        name            size    comments
 
482
 
 
483
        STA             16      status
 
484
        BUF             16      data buffer
 
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
 
490
        RDY             1       transfer ready
 
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
 
502
 
 
503
Error handling is as follows:
 
504
 
 
505
        error                   processed as
 
506
 
 
507
        not attached            pack off line; if STOP_IOE, stop
 
508
 
 
509
        end of file             ignored
 
510
 
 
511
        OS I/O error            data error; if STOP_IOE, stop
 
512
 
 
513
2.7 Symbolic Display and Input
 
514
 
 
515
The H316/H516 simulator implements symbolic display and input.  Display is
 
516
controlled by command line switches:
 
517
 
 
518
        -a                      display as ASCII character
 
519
        -c                      display as two character string
 
520
        -m                      display instruction mnemonics
 
521
 
 
522
Input parsing is controlled by the first character typed in or by command
 
523
line switches:
 
524
 
 
525
        ' or -a                 ASCII character
 
526
        " or -c                 two character sixbit string
 
527
        alphabetic              instruction mnemonic
 
528
        numeric                 octal number
 
529
 
 
530
Instruction input uses standard H316/H516 assembler syntax.  There are six
 
531
instruction classes: memory reference, I/O, control, shift, skip, and
 
532
operate.
 
533
 
 
534
Memory reference instructions have the format
 
535
 
 
536
        memref{*} {C/Z} address{,1}
 
537
 
 
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.
 
544
 
 
545
I/O instructions have the format
 
546
 
 
547
        io pulse+device
 
548
 
 
549
The pulse+device is an octal number in the range 0 - 01777.
 
550
 
 
551
Control and operate instructions consist of a single opcode
 
552
 
 
553
        opcode
 
554
 
 
555
Shift instructions have the format
 
556
 
 
557
        shift n
 
558
 
 
559
where n is an octal number in the range 0-77.
 
560
 
 
561
Skip instructions have the format
 
562
 
 
563
        sub-op sub-op sub-op...
 
564
 
 
565
The simulator checks that the combination of sub-opcodes is legal.