forked from JamesHagerman/nankervis-pdp11-js
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pdp11-45.html
executable file
·1696 lines (1514 loc) · 53.2 KB
/
pdp11-45.html
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset="UTF-8">
<title>Javascript PDP 11/45 Emulator</title>
<meta name="description" content="Javascript PDP 11/45 Emulator">
<meta name="keywords" content="PDP,PDP-11,11/45,JavaScript,Emulator">
<style>
:root {
--unitWidth: 4px;
--unitHeight: 5px;
--ledColor: radial-gradient(circle at 2px 2px, yellow, red);
}
.frame {
width: calc(var(--unitWidth) * 272);
height: calc(var(--unitHeight) * 93);
position: relative;
background: linear-gradient(#c3bcaa, #a39c8a);
-webkit-text-size-adjust: none;
text-size-adjust: none;
}
.decBase {
width: calc(var(--unitWidth) * 106);
height: calc(var(--unitHeight) * 8);
position: absolute;
top: calc(var(--unitHeight) * 1);
left: calc(var(--unitWidth) * 3);
border: 1px solid #736c62;
border-radius: calc(var(--unitWidth) * 2);
color: #736c62;
font-family: arial, helvetica, sans-serif;
}
.smallSpace {
width: calc(var(--unitWidth) * 2.66);
height: 1px;
float: left;
}
.decLetter {
width: calc(var(--unitWidth) * 4);
height: calc(var(--unitHeight) * 5);
border: 1px solid #736c62;
border-bottom-color: #534c42;
font-weight: 100;
font-size: calc(var(--unitHeight) * 4);
line-height: calc(var(--unitHeight) * 5);
text-align: center;
position: relative;
top: 50%;
transform: translateY(-50%);
float: left;
}
.decName {
position: absolute;
top: 0;
height: 100%;
font-size: calc(var(--unitHeight) * 2);
line-height: calc(var(--unitHeight) * 8);
float: left;
}
.topEdge {
width: calc(var(--unitWidth) * 256);
height: 0;
position: absolute;
top: calc(var(--unitHeight) * 10);
left: 0;
right: 0;
margin: auto;
padding: calc(var(--unitWidth) * 3.33);
background: #837c72;
border: none;
border-radius: calc(var(--unitWidth) * 8);
}
.sideEdges {
width: calc(var(--unitWidth) * 263);
height: 0;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
border-bottom: calc(var(--unitHeight) * 80) solid #9c9781;
border-left: calc(var(--unitWidth) * 2) solid transparent;
border-right: calc(var(--unitWidth) * 2) solid transparent;
}
.switchBevel {
width: calc(var(--unitWidth) * 265);
height: calc(var(--unitHeight) * 1);
background: #a39c8a;
border-top: calc(var(--unitHeight) * 8) solid #9c9781;
border-bottom: calc(var(--unitHeight) * 7) solid #534c42;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.switchPanel {
position: relative;
top: calc(var(--unitHeight) * 12);
left: calc(var(--unitWidth) * 8);
}
.panel {
width: calc(var(--unitWidth) * 256);
height: calc(var(--unitHeight) * 65);
background: #181818;
border-radius: calc(var(--unitWidth) * 4);
color: white;
font-family: arial, helvetica, sans-serif;
font-size: calc(var(--unitHeight) * 1.4);
font-weight: 500;
text-align: center;
}
.floatLeft {
float: left;
}
.floatRight {
float: right;
}
.clear {
clear: both;
}
.blankLine {
width: 100%;
height: calc(var(--unitHeight) * 5);
clear: both;
}
.smallLine {
width: 100%;
height: calc(var(--unitHeight) * 4);
clear: both;
}
.space {
width: calc(var(--unitWidth) * 8);
height: 1px;
float: left;
}
.margin {
margin-right: 1px;
width: calc(100% - 1px);
}
.logo {
width: calc(var(--unitWidth) * 40);
float: left;
}
.statusBlock {
width: calc(var(--unitWidth) * 8);
background-color: black;
font-size: calc(var(--unitHeight) * 1.4);
float: left;
}
.statusLabel1 {
width: 100%;
height: calc(var(--unitHeight) * 2);
line-height: calc(var(--unitHeight) * 3);
}
.statusLabel2 {
width: calc(var(--unitWidth) * 8 - 1px);
height: calc(var(--unitHeight) * 7);
position: relative;
float: left;
}
.ledBlock {
width: calc(var(--unitWidth) * 24);
float: left;
}
.ledBase {
margin-right: 1px;
width: calc(100% - 1px);
height: calc(var(--unitHeight) * 2);
line-height: calc(var(--unitHeight) * 2);
font-size: calc(var(--unitHeight) * 1.45);
position: relative;
float: left;
}
.statusPanel {
width: calc(var(--unitWidth) * 88);
height: calc(var(--unitHeight) * 8);
position: relative;
background: black;
border-radius: calc(var(--unitWidth) * 2);
float: left;
}
.statusTable {
display: table;
table-layout: fixed;
width: 100%;
height: 85%;
position: relative;
top: 15%;
left: 5%;
text-align: left;
float: left;
}
.nick {
height: 0;
width: 0;
border-bottom: calc(var(--unitHeight) * 1.7) solid black;
border-left: calc(var(--unitWidth) * 0.3) solid transparent;
border-right: calc(var(--unitWidth) * 1) solid transparent;
position: absolute;
left: calc(var(--unitWidth) * 7);
bottom: 0;
}
.notch {
height: 0;
width: 1px;
border-top: calc(var(--unitHeight) * 1.9) solid purple;
border-left: calc(var(--unitWidth) * 1.0) solid transparent;
border-right: calc(var(--unitWidth) * 1.0) solid transparent;
position: absolute;
left: calc(var(--unitWidth) * 7);
top: 0;
z-index: 1;
}
.ledPad {
position: relative;
margin-right: 1px;
width: calc(var(--unitWidth) * 8 - 1px);
height: calc(var(--unitHeight) * 10);
background-color: black;
border-bottom-left-radius: calc(var(--unitWidth) * 1.5);
border-bottom-right-radius: calc(var(--unitWidth) * 1.5);
float: left;
}
.mainLed,
.rotaryLed {
width: calc(var(--unitWidth) * 3);
height: calc(var(--unitWidth) * 3);
border-radius: 32%;
background: var(--ledColor);
}
.mainLed {
position: absolute;
bottom: calc(var(--unitWidth) * 2);
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
}
.rotaryLed {
margin-left: 5%;
margin-right: 10%;
float: left;
}
.lockPanel {
position: relative;
width: calc(var(--unitWidth) * 15);
height: calc(var(--unitHeight) * 12);
font-size: calc(var(--unitHeight) * 1.4);
float: left;
}
.atBottom {
position: absolute;
bottom: 0;
}
.lock {
position: relative;
top: 50%;
transform: translateY(-50%);
margin-left: auto;
margin-right: auto;
width: 55%;
height: 55%;
border-radius: 50%;
background: linear-gradient(15deg, #808080, #383838);
border: solid 1px #707070;
}
.lock::before {
content: "";
display: block;
position: relative;
top: 50%;
transform: translateY(-50%);
margin-left: auto;
margin-right: auto;
width: 45%;
height: 45%;
border-radius: 50%;
background: linear-gradient(15deg, #101010, silver);
border: solid 2px #11100e;
box-shadow: 0 0 0 1px #404040;
}
.key {
content: "";
display: block;
position: absolute;
border: solid 1px #101010;
top: -25%;
left: 46%;
width: 8%;
height: 150%;
background: #b0b0b0;
transform: rotate(-45deg);
transition: 0.5s;
}
.rotaryPanel {
width: calc(var(--unitWidth) * 88);
height: calc(var(--unitHeight) * 12);
position: relative;
background: black;
border-radius: calc(var(--unitWidth) * 3);
float: left;
}
.rotaryTopPanel {
width: calc(var(--unitWidth) * 56);
height: calc(var(--unitHeight) * 25);
position: relative;
background: black;
border-radius: calc(var(--unitWidth) * 3);
float: left;
}
.rotaryBottomPanel {
width: calc(var(--unitWidth) * 56);
height: calc(var(--unitHeight) * 12);
position: relative;
background: black;
border-radius: calc(var(--unitWidth) * 3);
float: left;
}
.rotaryTable {
display: table;
table-layout: fixed;
width: 70%;
height: 85%;
position: absolute;
top: 15%;
left: 5%;
text-align: left;
}
.rotaryTableCell {
display: table-cell;
}
.rotaryTableRow {
display: table-row;
}
.rotaryBase {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 10%;
}
.rotarySwitch {
height: calc(var(--unitWidth) * 10);
width: calc(var(--unitWidth) * 10);
position: relative;
border: solid 1px #202020;
border-radius: 50%;
background: linear-gradient(
0deg,
#b0b0c0,
#020212 25%,
#404050 35%,
#303040 65%,
#020212 75%,
#b0b0c0
);
transform: rotate(-45deg);
transition: 0.5s;
}
.rotarySwitch:before {
position: absolute;
display: block;
content: "";
width: 50%;
height: 6%;
top: 47%;
background: #faf8f9;
margin: 0 auto;
}
.rotaryCentre {
position: relative;
background: #faf8f9;
left: 43%;
top: 44%;
width: 12%;
height: 12%;
border-radius: 50%;
}
.switchLabels {
position: absolute;
bottom: 0px;
}
.switchPad {
margin: 2px 1px 2px 1px;
width: calc(var(--unitWidth) * 8 - 2px);
height: calc(var(--unitHeight) * 8);
line-height: calc(var(--unitHeight) * 8);
float: left;
}
.switchPadHalf {
width: 100%;
height: 49%;
line-height: calc(var(--unitHeight) * 4);
}
.switchPadBar {
width: 100%;
height: 2%;
background: black;
}
.multiText {
display: inline-block;
vertical-align: middle;
line-height: calc(var(--unitHeight) * 1.5);
}
.switch {
width: calc(var(--unitWidth) * 5);
height: calc(var(--unitHeight) * 1);
border-top: calc(var(--unitHeight) * 8) solid rgba(0, 0, 0, 0);
border-bottom: calc(var(--unitHeight) * 7) solid rgba(40, 0, 10, 0.4);
border-left: calc(var(--unitWidth) * 1.5) solid rgba(0, 0, 0, 0.25);
border-right: calc(var(--unitWidth) * 1.5) solid rgba(0, 0, 0, 0.35);
transition: 0.33s;
float: left;
}
.textRight {
text-align: right;
}
.single {
width: calc(var(--unitWidth) * 8);
}
.double {
width: calc(var(--unitWidth) * 16);
}
.triple {
width: calc(var(--unitWidth) * 24 - 1px);
}
.roundTopLeft,
.roundLeft,
.roundTop {
border-top-left-radius: calc(var(--unitWidth) * 1.5);
}
.roundTopRight,
.roundRight,
.roundTop {
border-top-right-radius: calc(var(--unitWidth) * 1.5);
}
.roundBottomLeft,
.roundLeft {
border-bottom-left-radius: calc(var(--unitWidth) * 1.5);
}
.roundBottomRight,
.roundRight {
border-bottom-right-radius: calc(var(--unitWidth) * 1.5);
}
.red {
background: linear-gradient(crimson, firebrick);
}
.redBase {
background: crimson;
}
.purple {
background: linear-gradient(darkmagenta, purple);
}
.purpleBase {
background: darkmagenta;
}
.black {
background-color: black;
}
.white {
background-color: #f0e6d9;
}
thead {
font-weight: bold;
}
.disk {
font-weight: bold;
}
.system {
white-space: nowrap;
font-weight: bold;
}
pre {
font-family: "Courier New", Courier, "Lucida Console", Monaco, monospace;
font-size: 14px;
}
b {
color: blue;
}
</style>
</head>
<body>
<div class=frame>
<div class=decBase>
<span class=smallSpace></span>
<span class=decLetter>d</span>
<span class=decLetter>i</span>
<span class=decLetter>g</span>
<span class=decLetter>i</span>
<span class=decLetter>t</span>
<span class=decLetter>a</span>
<span class=decLetter>l</span>
<span class=smallSpace></span>
<span class=decName>digital equipment corporation • maynard, massachusetts</span>
</div>
<div class=sideEdges></div>
<div class=topEdge></div>
<div class=switchBevel></div>
<div class=switchPanel>
<div class=panel>
<div class=blankLine></div>
<div class=blankLine></div>
<div class=space></div>
<div class=floatLeft>
<div class=clear>
<div class=floatLeft>
<div class=clear>
<span class=ledBlock>
<div class="ledBase red roundTopLeft"></div>
<div class=ledPad>
<div id=a17 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a16 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a15 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase purple"></div>
<div class=ledPad>
<div id=a14 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a13 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a12 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase red"></div>
<div class=ledPad>
<div id=a11 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a10 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a9 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase purple"></div>
<div class=ledPad>
<div id=a8 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a7 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a6 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase red"></div>
<div class=ledPad>
<div id=a5 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a4 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a3 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase purple textRight roundTopRight">ADDRESS </div>
<div class=ledPad>
<div id=a2 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a1 class=mainLed></div>
</div>
<div class=ledPad>
<div id=a0 class=mainLed></div>
</div>
</span>
</div>
<div class=blankLine></div>
<div class=clear>
<div class=lockPanel>
<div class=floatLeft>POWER</div>
<div class=floatRight>LOCK</div>
<div class=lock onclick="if (event && event.shiftKey) { if (--panel.powerSwitch < -1) panel.powerSwitch = 1; } else { if (++panel.powerSwitch > 1) panel.powerSwitch = -1; } if (panel.powerSwitch < 0) { CPU.runState = STATE_HALT; } key.style.transform='rotate('+(panel.powerSwitch * 90 - 45)+'deg)';">
<div id=key class=key></div>
</div>
<div class=atBottom>OFF</div>
</div>
<div class=floatRight>
<span class="ledBlock single">
<div class="ledBase red roundTopLeft"></div>
<div class=ledPad>
<div id=d15 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase purple">
</div>
<div class=ledPad>
<div id=d14 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d13 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d12 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase red">
</div>
<div class=ledPad>
<div id=d11 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d10 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d9 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase purple">
</div>
<div class=ledPad>
<div id=d8 class=mainLed></div>
<div class=notch></div>
</div>
<div class=ledPad>
<div id=d7 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d6 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase red"></div>
<div class=ledPad>
<div id=d5 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d4 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d3 class=mainLed></div>
</div>
</span>
<span class=ledBlock>
<div class="ledBase purple textRight roundTopRight">DATA </div>
<div class=ledPad>
<div id=d2 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d1 class=mainLed></div>
</div>
<div class=ledPad>
<div id=d0 class=mainLed></div>
</div>
</span>
</div>
</div>
<div class=smallLine></div>
<div class=clear>
<span class=logo>
<img src="pdp11-45.svg" alt="pdp11-70" width=100% style="top: 10px;">
</span>
</div>
</div>
<div class=space></div>
<div class=floatLeft>
<div class=rotaryPanel>
<span class=rotaryTable>
<div class=rotaryTableRow>
<div class=rotaryTableCell>
<span class=rotaryLed id=s21></span>USER I
</div>
<div class=rotaryTableCell>
<span class=rotaryLed id=s19></span>SUPER I
</div>
<div class=rotaryTableCell>
<span class=rotaryLed id=s17></span>KERNEL I
</div>
<div class=rotaryTableCell>
<div class=rotaryLed id=s15></div>PROG PHY
</div>
</div>
<div class=rotaryTableRow>
<div class=rotaryTableCell>
<span class=rotaryLed id=s20></span>USER D
</div>
<div class=rotaryTableCell>
<span class=rotaryLed id=s18></span>SUPER D
</div>
<div class=rotaryTableCell>
<span class=rotaryLed id=s16></span>KERNEL D
</div>
<div class=rotaryTableCell>
<div class=rotaryLed id=s14></div>CONS PHY
</div>
</div>
</span>
<span class=rotaryBase>
<div class=rotarySwitch onclick="if (event && event.shiftKey) { if (--panel.rotary0 < 0) panel.rotary0 = 7; } else { if (++panel.rotary0 > 7) panel.rotary0 = 0; } this.style.transform = 'rotate('+(panel.rotary0*45-45)+'deg)'; panel.autoIncr = 0;">
<div class=rotaryCentre></div>
</div>
</span>
</div>
<div class=blankLine></div>
<div class=rotaryPanel>
<span class=rotaryTable>
<div class=rotaryTableRow>
<div class=rotaryTableCell>
<span class=rotaryLed id=s22></span>DATA PATHS
</div>
<div class=rotaryTableCell>
<span class=rotaryLed id=s23></span>µ ADRS FPP/CPU
</div>
</div>
<div class=rotaryTableRow>
<div class=rotaryTableCell>
<span class=rotaryLed id=s24></span>BUS REG
</div>
<div class=rotaryTableCell>
<span class=rotaryLed id=s25></span>DISPLAY REGISTER
</div>
</div>
</span>
<span class=rotaryBase>
<div class=rotarySwitch onclick="if (event && event.shiftKey) { if (--panel.rotary1 < 0) panel.rotary1 = 3; } else { if (++panel.rotary1 > 3) panel.rotary1 = 0; } this.style.transform = 'rotate('+(panel.rotary1*45-45)+'deg)'; panel.autoIncr = 0;">
<div class=rotaryCentre></div>
</div>
</span>
</div>
<div class=blankLine></div>
<div class=statusPanel>
<span class=statusTable>
<div class=rotaryTableRow>
<div class=rotaryTableCell>ADRS ERR</div>
<div class=rotaryTableCell>RUN</div>
<div class=rotaryTableCell>PAUSE</div>
<div class=rotaryTableCell>MASTER</div>
<div class=rotaryTableCell>USER</div>
<div class=rotaryTableCell>SUPER</div>
<div class=rotaryTableCell>KERNEL</div>
<div class=rotaryTableCell>DATA</div>
</div>
<div class=rotaryTableRow>
<div class=rotaryTableCell>
<div id=s10 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s9 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s8 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s7 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s6 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s5 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s4 class=rotaryLed></div>
</div>
<div class=rotaryTableCell>
<div id=s3 class=rotaryLed></div>
</div>
</div>
</span>
</div>
</div>
</div>
<div class=switchLabels>
<span class="switchPad red roundLeft">17</span>
<span class="switchPad red">16</span>
<span class="switchPad red roundRight">15</span>
<span class="switchPad purple roundLeft">14</span>
<span class="switchPad purple">13</span>
<span class="switchPad purple roundRight">12</span>
<span class="switchPad red roundLeft">11</span>
<span class="switchPad red">10</span>
<span class="switchPad red roundRight">9</span>
<span class="switchPad purple roundLeft">8</span>
<span class="switchPad purple">7</span>
<span class="switchPad purple roundRight">6</span>
<span class="switchPad red roundLeft">5</span>
<span class="switchPad red">4</span>
<span class="switchPad red roundRight">3</span>
<span class="switchPad purple roundLeft">2</span>
<span class="switchPad purple">1</span>
<span class="switchPad purple roundRight">0</span>
<span class=space></span>
<span class="switchPad red roundTop"><span class=multiText>LOAD ADRS</span></span>
<span class="switchPad purple roundTop">EXAM</span>
<span class="switchPad red roundTop">CONT</span>
<span class="switchPad purple roundTop">
<div class="switchPadHalf">ENABLE</div>
<div class="switchPadBar"></div>
<div class="switchPadHalf">HALT</div>
</span>
<span class="switchPad red roundTop">
<div class="switchPadHalf">S INST</div>
<div class="switchPadBar"></div>
<div class="switchPadHalf">S BUS</div>
</span>
<span class="switchPad purple roundTop">START</span>
<span class=space></span>
<span class="switchPad red roundTop">DEP</span>
<span class=space></span>
<span class="switchPad purple roundTop"><span class=multiText>REG EXAM</span></span>
<span class="switchPad red roundTop"><span class=multiText>REG DEP</span></span>
</div>
</div>
</div>
<div class=floatLeft>
<span class=space></span>
<span class="switch redBase" onClick="setSwitch(this, 17);"></span>
<span class="switch redBase" onClick="setSwitch(this, 16);"></span>
<span class="switch redBase" onClick="setSwitch(this, 15);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 14);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 13);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 12);"></span>
<span class="switch redBase" onClick="setSwitch(this, 11);"></span>
<span class="switch redBase" onClick="setSwitch(this, 10);"></span>
<span class="switch redBase" onClick="setSwitch(this, 9);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 8);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 7);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 6);"></span>
<span class="switch redBase" onClick="setSwitch(this, 5);"></span>
<span class="switch redBase" onClick="setSwitch(this, 4);"></span>
<span class="switch redBase" onClick="setSwitch(this, 3);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 2);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 1);"></span>
<span class="switch purpleBase" onClick="setSwitch(this, 0);"></span>
<span class="switch white" onclick="moveSwitch(this, panel.lampTest = 1 - panel.lampTest); if (!panel.powerSwitch) { if (panel.lamp) panel.lamp = 1; }"></span>
<span class="switch redBase" onClick="toggleSwitch(this, 0); CPU.displayAddress = CPU.switchRegister; panel.autoIncr = 0;"></span>
<span class="switch purpleBase" onClick="toggleSwitch(this, 0); if (!panel.powerSwitch) { if (CPU.runState == STATE_HALT) examineDeposit(-1); }"></span>
<span class="switch redBase" onClick="toggleSwitch(this, 0); if (!panel.powerSwitch && CPU.runState == STATE_HALT) { if (panel.halt) { CPU.runState = STATE_STEP; } else { CPU.runState = STATE_RUN; }}"></span>
<span class="switch purpleBase" onClick="moveSwitch(this, panel.halt = 1 - panel.halt); if (!panel.powerSwitch) { if (panel.halt) { CPU.runState = STATE_HALT; }}"></span>
<span class="switch redBase" onClick="moveSwitch(this, panel.step = 1 - panel.step);"></span>
<span class="switch purpleBase" onclick="toggleSwitch(this, 0); if (!panel.powerSwitch) { if (CPU.runState == STATE_HALT) {iopage.reset(); CPU.registerVal[7] = CPU.displayAddress & 0xffff; if (!panel.halt) { CPU.runState = STATE_RUN; }}}"></span>
<span class="switch white"></span>
<span class="switch redBase" onClick="toggleSwitch(this, 0); if (!panel.powerSwitch) { if (CPU.runState == STATE_HALT) examineDeposit(CPU.switchRegister); }"></span>
<span class="switch white"></span>
<span class="switch purpleBase" onclick="toggleSwitch(this, 0); if (!panel.powerSwitch) { if (CPU.runState == STATE_HALT) regExamineDeposit(-1); }"></span>
<span class="switch redBase" onclick="toggleSwitch(this, 0); if (!panel.powerSwitch) { if (CPU.runState == STATE_HALT) regExamineDeposit(CPU.switchRegister); }"></span>
</div>
</div>
</div>
<p class=clear>console<br>
<textarea autofocus id=0 cols=132 rows=24 style="font-family:'Courier New',Courier,'Lucida Console',Monaco,monospace;" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
<br>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(3))">Ctrl/C</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(4))">Ctrl/D</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(8))">Ctrl/H</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(10))">LF</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(17))">Ctrl/Q</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(19))">Ctrl/S</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(20))">Ctrl/T</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(26))">Ctrl/Z</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(27))">ESC</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(9))">TAB</button>
<button onclick="vt52Input(vt52LastUnit,String.fromCharCode(0))">Break</button>
<button onclick="vt52Put(0,10);boot();">REBOOT</button>
</p>
<p>
<label>Paper tape reader file</label>
<select id="ptr">
<option value="">none</option>
<option value="DEC-11-AJPB-PB.ptap">BASIC-11 V007A</option>
<option value="DEC-11-O2PA-PB.ptap">ODT-11X-V004A</option>
<option value="ED-11-V004B-8K.ptap">ED-11-V004B</option>
</select>
</p>
<br>
<div id="vt11"></div>
<br>
<div id="vg11"></div>
<br>
<div id="dl11"></div>
<div id="lp11"></div>
<br>
<h3>PDP 11/45 Emulator</h3>
<p>
This emulator came about because years ago I was a programmer for RSTS/E on a PDP 11/45 and had admired the console idle loop light pattern - but I couldn't quite remember how it looked. Given the unavailability of real systems it became time to write an emulator!
</p>
<p>
I was going to start with a PDP 11/45 emulator but the extra memory of a PDP 11/70 became far too attractive (nearly a whole 4MB!). I eventually wrote a
<a href="https://paulnank.github.io/pdp11-js/pdp11.html">PDP 11/70</a> version as well as a
<a href="https://paulnank.github.io/pdp11-js/pdp11-45.html">PDP 11/45</a> version, and later also a
<a href='https://skn.noip.me/pdp10/pdp10.html'>PDP-10</a>.
</p>
<p>
I met my core objective - I can now see the RSTS/E console light pattern that I was looking for, and found that newer versions (eg v9.6) have a different light pattern. Also I have now seen some of the light patterns for other OSes. RSX and BSD 2.11
have their own different patterns, and Unix V5 and Ultrix operate with absolute minimum light movement (I'm assuming they operate mostly in WAIT mode).
</p>
<p>
Getting all of the operating systems used here presents its own set of challenges - one of which is finding the software in the first place. But one of the most interesting was RSTS/E V06C which has its own
<a href='https://paulnank.github.io/pdp11-js/RSTSv06c.html'>story</a>.
</p>
<p>
Many of the systems also include source in some form or another and it is very interesting to see the different approaches they used. All had a profound influence on systems which evolved later and unix in particular would be familiar to administrators of current systems. I reflect that if I had been exposed to Ultrix earlier I might have chosen a different career path.
<p>
The boot code in this emulator is a custom PDP 11 program running with it's own set of light patterns. It is initially loaded at address 120000 and includes a LIGHTS command which operates by mapping and executing a WAIT instruction from a pattern of virtual addresses. The resulting display simply shows the content of R0 and the address of the instruction being executed. You can also use the BOOT command to start one of the guest operating systems listed below, or the ODT command to start a version of the Octal Debugging Tool.
</p>
<p>
However boot code like this was not part of early PDP 11s. These systems had no BIOS or other software to help get the bare metal started. If you were lucky perhaps the previous boot code would still be intact in non-volatile magnetic core memory, but in general booting the system required toggling in a small bootstrap loader from the front panel.
</p>
<p>
Here is an example of the switch commands for booting from an RK05 where the value at address 1002 selects the unit number (rk0, rk1, rk2, etc). Goodluck!
</p>
<pre>
<b>
Address Data Code Switch commands
</b>
HALT, 001000, LOAD ADDRESS
001000 012737 mov #unit,rkda 012737, DEPOSIT
001002 000000 000000, DEPOSIT or 020000 for rk1, 040000 for rk2, etc
001004 177412 177412, DEPOSIT
001006 012700 mov #rkwc, r0 012700, DEPOSIT
001010 177406 177406, DEPOSIT
001012 012710 mov #-256,(r0) 012710, DEPOSIT