-
Notifications
You must be signed in to change notification settings - Fork 0
/
unix-and-ms11.html
774 lines (694 loc) · 67.1 KB
/
unix-and-ms11.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>fritzm.github.io - PDP-11/45: V6 Unix attempts & MS11-L repairs</title>
<meta name="description" content="">
<meta name="author" content="Fritz Mueller">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://fritzm.github.io/theme/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="https://fritzm.github.io/theme/bootstrap.min.css" rel="stylesheet">
<link href="https://fritzm.github.io/theme/bootstrap.min.responsive.css" rel="stylesheet">
<link href="https://fritzm.github.io/theme/local.css" rel="stylesheet">
<link href="https://fritzm.github.io/theme/pygments.css" rel="stylesheet">
<!-- Photoswipe -->
<link rel="stylesheet" href="https://fritzm.github.io/theme/photoswipe.css">
<link rel="stylesheet" href="https://fritzm.github.io/theme/default-skin/default-skin.css">
<script src="https://fritzm.github.io/theme/photoswipe.min.js"></script>
<script src="https://fritzm.github.io/theme/photoswipe-ui-default.min.js"></script>
<script src="https://fritzm.github.io/galleries.js"></script>
<script type="text/javascript">
var pswipe = function(gname, index) {
var pswpElement = document.querySelectorAll('.pswp')[0];
var items = galleries[gname];
var options = { index: index };
var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
};
</script>
<!-- So Firefox can bookmark->"abo this site" -->
<link href="https://fritzm.github.io/feeds/all.rss.xml" rel="alternate" title="fritzm.github.io" type="application/rss+xml">
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="https://fritzm.github.io">fritzm.github.io</a>
<div class="nav-collapse">
<ul class="nav">
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="row">
<div class="span9">
<div class='article'>
<div class="content-title">
<h1>PDP-11/45: V6 Unix attempts & MS11-L repairs</h1>
Mon 21 January 2019
by <a class="url fn" href="https://fritzm.github.io/author/fritz-mueller.html">Fritz Mueller</a>
</div>
<div><p>Following up on Noel's suggestion, I decided to give V6 Unix a try to see how it fared in comparison to the
problems seen with RSTS/E V06C. I recently scored an additional RK05 pack from eBay, and decided to try and
use that so I could keep my current RSTS/E pack intact.</p>
<p>Inspected the pack, and it looked in good shape, clean, with no apparent crashes on the media. Mounted it up
and was able to do only a partial recovery. What I got looks like pretty generic RT-11/BASIC-11 stuff, so I'm
not too concerned about attempting a complete recovery. Went ahead and reformatted the pack, after which I
could read/write the entire pack with no bad sectors. So now I had two clean packs to work with.</p>
<p>Built a V6 Unix pack image from the Ken Wellsch tape under SIMH (using directions <a href="http://gunkies.org/wiki/Installing_Unix_v6_%28PDP-11%29_on_SIMH">here</a>). Transferred it over using PDP11GUI, and it
did boot in single-user mode. However, it immediately dumped core on the first <code>ls</code> command... Tried a
multi-user Unix boot (what's to lose?) and this actually fared a bit better; able to <code>ls</code>, but still dumped
core when trying to run the C compiler or do anything else memory-intensive.</p>
<p>So, all of this taken together made me (and others collaborating on the troubleshooting on cctalk) think that
I might have a memory issue in the machine. My machine has a 256KB MS11-L; I had previously spot-checked this
from the front panel by manipulating the KT11-C mapping registers and trying some writes/and reads within each
bank. This was enough to identify and repair a few major problems (see <a href="https://fritzm.github.io/ms11-debug.html">this</a> older
blog post) and to get me this far. But I had never thoroughly and substantially beat this card up after
things seemed to be working with RT-11. There was still also nagging concern that none of the heavier-weight
KT11, MS11, KB11 "exerciser" MAINDEC diagnostics had yet been run to completion on the restored machine
either...</p>
<p>The recommended DEC diagnostic for the MS11-L is ZQMC, but it is complicated, takes a long time to download,
and the available sources don't exactly match the binary. So, probably better to work up my own standalone
diagnostic to catch and fix obvious things... Thus followed about a week of part-time work working up and
successively refining the following test code, and repairing identified problems (failed DRAMs) on the MS11-L
along the way. This code maps and tests every memory location on the MS11-L, using KT11 memory management.
It relocates itself so it can test the lowest physical bank as well. Tests include all-ones, all-zeros,
write address to location, and a "random" data test which just uses program code test sequence:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 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</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="nt">KIPDR0</span><span class="o">=</span><span class="nt">172300</span>
<span class="nt">KIPDR1</span><span class="o">=</span><span class="nt">172302</span>
<span class="nt">KIPDR2</span><span class="o">=</span><span class="nt">172304</span>
<span class="nt">KIPDR3</span><span class="o">=</span><span class="nt">172306</span>
<span class="nt">KIPDR4</span><span class="o">=</span><span class="nt">172310</span>
<span class="nt">KIPDR5</span><span class="o">=</span><span class="nt">172312</span>
<span class="nt">KIPDR6</span><span class="o">=</span><span class="nt">172314</span>
<span class="nt">KIPDR7</span><span class="o">=</span><span class="nt">172316</span>
<span class="nt">KIPAR0</span><span class="o">=</span><span class="nt">172340</span>
<span class="nt">KIPAR1</span><span class="o">=</span><span class="nt">172342</span>
<span class="nt">KIPAR2</span><span class="o">=</span><span class="nt">172344</span>
<span class="nt">KIPAR3</span><span class="o">=</span><span class="nt">172346</span>
<span class="nt">KIPAR4</span><span class="o">=</span><span class="nt">172350</span>
<span class="nt">KIPAR5</span><span class="o">=</span><span class="nt">172352</span>
<span class="nt">KIPAR6</span><span class="o">=</span><span class="nt">172354</span>
<span class="nt">KIPAR7</span><span class="o">=</span><span class="nt">172356</span>
<span class="nt">SR0</span><span class="o">=</span><span class="nt">177572</span>
<span class="nt">XCSR</span><span class="o">=</span><span class="nt">177564</span>
<span class="nt">XBUF</span><span class="o">=</span><span class="nt">177566</span>
<span class="p">.</span><span class="nc">ASECT</span>
<span class="o">.=</span><span class="nt">1000</span>
<span class="nt">START</span><span class="o">:</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">700</span><span class="o">,</span><span class="nt">SP</span> <span class="o">;</span><span class="nt">INIT</span> <span class="nt">STACK</span> <span class="nt">POINTER</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">INSTALL</span> <span class="nt">TRAP</span> <span class="nt">CATCHERS</span>
<span class="nt">TRPS</span><span class="o">:</span> <span class="nt">CLR</span> <span class="nt">R0</span> <span class="o">;</span><span class="nt">CURRENT</span> <span class="nt">VECTOR</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">2</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">VECTOR</span> <span class="nt">TARGET</span>
<span class="nt">CLR</span> <span class="nt">R2</span> <span class="o">;</span><span class="nt">HALT</span> <span class="nt">INSTR</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">100</span><span class="o">,</span><span class="nt">R3</span> <span class="o">;</span><span class="nt">END</span> <span class="nt">VECTOR</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="nt">R1</span><span class="o">,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">STORE</span> <span class="nt">TARGET</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">MOV</span> <span class="nt">R2</span><span class="o">,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">STORE</span> <span class="nt">HALT</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">ADD</span> <span class="p">#</span><span class="nn">4</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">UPDATE</span> <span class="nt">TARGET</span>
<span class="nt">SOB</span> <span class="nt">R3</span><span class="o">,</span><span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">OVER</span> <span class="nt">VECTORS</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">INIT</span> <span class="nt">AND</span> <span class="nt">ENABLE</span> <span class="nt">MEMORY</span> <span class="nt">MAPPING</span>
<span class="nt">INITM</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">IPDRS</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">SRC</span> <span class="nt">PDR</span> <span class="nt">INIT</span> <span class="nt">TABLE</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">KIPDR0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">DST</span> <span class="nt">KIPDR0</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">10</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">DO</span> <span class="nt">EIGHT</span> <span class="nt">PDRS</span>
<span class="nt">MOV</span> <span class="o">(</span><span class="nt">R0</span><span class="o">)+,(</span><span class="nt">R1</span><span class="o">)+</span> <span class="o">;</span><span class="nt">COPY</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">SOB</span> <span class="nt">R2</span><span class="o">,</span><span class="p">.</span><span class="nc">-2</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">OVER</span> <span class="nt">PDRS</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">IPARS</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">SRC</span> <span class="nt">PAR</span> <span class="nt">INIT</span> <span class="nt">TABLE</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">KIPAR0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">DST</span> <span class="nt">KIPAR0</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">10</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">DO</span> <span class="nt">EIGHT</span> <span class="nt">PARS</span>
<span class="nt">MOV</span> <span class="o">(</span><span class="nt">R0</span><span class="o">)+,(</span><span class="nt">R1</span><span class="o">)+</span> <span class="o">;</span><span class="nt">COPY</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">SOB</span> <span class="nt">R2</span><span class="o">,</span><span class="p">.</span><span class="nc">-2</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">OVER</span> <span class="nt">PARS</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">1</span><span class="o">,@</span><span class="p">#</span><span class="nn">SR0</span> <span class="o">;</span><span class="nt">ENABLE</span> <span class="nt">MEMORY</span> <span class="nt">MGMT</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">TEST</span> <span class="nt">32K</span> <span class="nt">MS11</span> <span class="nt">BANKS</span> <span class="nt">AT</span> <span class="nt">PA</span> <span class="nt">100000</span> <span class="nt">THRU</span> <span class="nt">700000</span><span class="o">,</span>
<span class="o">;</span> <span class="nt">RELOCATE</span><span class="o">,</span> <span class="nt">THEN</span> <span class="nt">TEST</span> <span class="nt">BANK</span> <span class="nt">AT</span> <span class="nt">PA</span> <span class="nt">000000</span>
<span class="nt">DOPASS</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">1000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">100000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">2000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">200000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">3000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">300000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">4000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">400000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">5000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">500000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">6000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">600000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">7000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">700000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">1000</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">RELOC</span> <span class="nt">TARGET</span> <span class="nt">PA</span><span class="p">:</span><span class="nd">100000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">RELOC</span> <span class="o">;</span><span class="nt">GO</span> <span class="nt">DO</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">0000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">PAR</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">000000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">DOBANK</span> <span class="o">;</span><span class="nt">TEST</span> <span class="nt">IT</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">ALL</span> <span class="nt">DONE</span> <span class="nt">WITH</span> <span class="nt">PASS</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">0000</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">RELOC</span> <span class="nt">TARGET</span> <span class="nt">PA</span><span class="p">:</span><span class="nd">000000</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">RELOC</span> <span class="o">;</span><span class="nt">GO</span> <span class="nt">DO</span> <span class="nt">IT</span>
<span class="nt">CLR</span> <span class="o">@</span><span class="p">#</span><span class="nn">SR0</span> <span class="o">;</span><span class="nt">DISABLE</span> <span class="nt">MEMORY</span> <span class="nt">MGMT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">PCOMPL</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">PASS</span> <span class="nt">COMPLETE</span> <span class="nt">MSG</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">HALT</span> <span class="o">;</span><span class="nt">ALL</span> <span class="nt">DONE</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">MAP</span> <span class="nt">A</span> <span class="nt">SINGLE</span> <span class="nt">32K</span> <span class="nt">BANK</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">DOBANK</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">KIPAR1</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">WILL</span> <span class="nt">MAP</span> <span class="nt">USING</span> <span class="nt">KIPAR1</span> <span class="nt">THRU</span> <span class="nt">KIPAR4</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">4</span><span class="o">,</span><span class="nt">R3</span> <span class="o">;</span><span class="nt">FOUR</span> <span class="nt">KIPARS</span> <span class="nt">TO</span> <span class="nt">SET</span>
<span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="p">#</span><span class="nn">7000</span> <span class="o">;</span><span class="nt">UNLESS</span> <span class="nt">WE</span> <span class="nt">ARE</span> <span class="nt">IN</span> <span class="nt">PA</span> <span class="nt">700000</span> <span class="nt">BANK</span><span class="o">...</span>
<span class="nt">BNE</span> <span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">3</span><span class="o">,</span><span class="nt">R3</span> <span class="o">;</span><span class="nt">OTHERWISE</span><span class="o">,</span> <span class="nt">SCALE</span> <span class="nt">BACK</span> <span class="nt">TO</span> <span class="nt">3</span> <span class="nt">KIPARS</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="nt">R0</span><span class="o">,(</span><span class="nt">R1</span><span class="o">)+</span> <span class="o">;</span><span class="nt">SET</span> <span class="nt">A</span> <span class="nt">KIPAR</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">ADD</span> <span class="p">#</span><span class="nn">200</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">INCREMENT</span> <span class="nt">VALUE</span> <span class="nt">FOR</span> <span class="nt">NEXT</span> <span class="nt">KIPAR</span>
<span class="nt">SOB</span> <span class="nt">R3</span><span class="o">,</span><span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">OVER</span> <span class="nt">KIPARS</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">CALCULATE</span> <span class="nt">END</span> <span class="nt">VA</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">120000</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">MAPPED</span> <span class="nt">BANK</span> <span class="nt">END</span> <span class="nt">IS</span> <span class="nt">VA</span> <span class="nt">120000</span>
<span class="nt">CMP</span> <span class="o">@</span><span class="p">#</span><span class="nn">KIPAR1</span><span class="o">,</span><span class="p">#</span><span class="nn">7000</span> <span class="o">;</span><span class="nt">UNLESS</span> <span class="nt">WE</span> <span class="nt">ARE</span> <span class="nt">IN</span> <span class="nt">PA</span> <span class="nt">700000</span> <span class="nt">BANK</span><span class="o">...</span>
<span class="nt">BNE</span> <span class="nt">ZEROS</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">100000</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">OTHERWISE</span><span class="o">,</span> <span class="nt">END</span> <span class="nt">IS</span> <span class="nt">VA</span> <span class="nt">100000</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">ZEROS</span> <span class="nt">TEST</span>
<span class="nt">ZEROS</span><span class="o">:</span> <span class="nt">CLR</span> <span class="nt">R2</span> <span class="o">;</span><span class="nt">EXPECTED</span> <span class="nt">VALUE</span> <span class="nt">IS</span> <span class="nt">000000</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">START</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="nt">R2</span><span class="o">,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">CLEAR</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BNE</span> <span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">LOOP</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">START</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">2</span><span class="o">$:</span> <span class="nt">TST</span> <span class="o">(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">CHECK</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">BEQ</span> <span class="nt">3</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">ZERO</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRERR</span> <span class="o">;</span><span class="nt">OTHERWISE</span><span class="o">,</span> <span class="nt">REPORT</span> <span class="nt">ERROR</span>
<span class="nt">3</span><span class="o">$:</span> <span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BNE</span> <span class="nt">2</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">LOOP</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">ONES</span> <span class="nt">TEST</span>
<span class="nt">ONES</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">177777</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">EXPECTED</span> <span class="nt">VALUE</span> <span class="nt">US</span> <span class="nt">177777</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">START</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="nt">R2</span><span class="o">,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">WRITE</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BNE</span> <span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">LOOP</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">START</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">2</span><span class="o">$:</span> <span class="nt">CMP</span> <span class="o">(</span><span class="nt">R0</span><span class="o">)+,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">CHECK</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">BEQ</span> <span class="nt">3</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">EXPECTED</span> <span class="nt">VALUE</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRERR</span> <span class="o">;</span><span class="nt">OTHERWISE</span><span class="o">,</span> <span class="nt">REPORT</span> <span class="nt">ERROR</span>
<span class="nt">3</span><span class="o">$:</span> <span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BNE</span> <span class="nt">2</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">LOOP</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">WRITE</span> <span class="nt">LOCATION</span> <span class="nt">WITH</span> <span class="nt">ITS</span> <span class="nt">VA</span> <span class="nt">TEST</span>
<span class="nt">ADDRS</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">START</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">USE</span> <span class="nt">VA</span> <span class="nt">AS</span> <span class="nt">TEST</span> <span class="nt">VALUE</span>
<span class="nt">MOV</span> <span class="nt">R2</span><span class="o">,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">WRITE</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BNE</span> <span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">LOOP</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">START</span> <span class="nt">AT</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">2</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">USE</span> <span class="nt">VA</span> <span class="nt">AS</span> <span class="nt">TEST</span> <span class="nt">VALUE</span>
<span class="nt">CMP</span> <span class="o">(</span><span class="nt">R0</span><span class="o">)+,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">CHECK</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">BEQ</span> <span class="nt">3</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">EXPECTED</span> <span class="nt">VALUE</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRERR</span> <span class="o">;</span><span class="nt">REPORT</span> <span class="nt">ERROR</span>
<span class="nt">3</span><span class="o">$:</span> <span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BNE</span> <span class="nt">2</span><span class="o">$</span>
<span class="o">;</span><span class="nt">-----</span> <span class="s2">"RANDOM"</span> <span class="nt">DATA</span> <span class="nt">TEST</span> <span class="o">(</span><span class="nt">PROGRAM</span> <span class="nt">AS</span> <span class="nt">TEST</span> <span class="nt">DATA</span><span class="o">)</span>
<span class="nt">RNDM</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">START</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">SRC</span><span class="o">:</span> <span class="nt">START</span> <span class="nt">OF</span> <span class="nt">PROGRAM</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">DST</span><span class="o">:</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="o">(</span><span class="nt">R2</span><span class="o">)+,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">WRITE</span> <span class="nt">A</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BEQ</span> <span class="nt">2</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">SO</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">CMP</span> <span class="nt">R2</span><span class="o">,</span><span class="p">#</span><span class="nn">END</span> <span class="o">;</span><span class="nt">TIME</span> <span class="nt">TO</span> <span class="nt">RESET</span> <span class="nt">SRC</span><span class="o">?</span>
<span class="nt">BLO</span> <span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">GO</span> <span class="nt">DO</span> <span class="nt">ANOTHER</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">START</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">OTHERWISE</span> <span class="nt">RESET</span> <span class="nt">SRC</span>
<span class="nt">BR</span> <span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">AND</span> <span class="nt">GO</span> <span class="nt">DO</span> <span class="nt">ANOTHER</span>
<span class="nt">2</span><span class="o">$:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">START</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">SRC1</span><span class="o">:</span> <span class="nt">START</span> <span class="nt">OF</span> <span class="nt">PROGRAM</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R0</span> <span class="o">;</span><span class="nt">SRC2</span><span class="o">:</span> <span class="nt">VA</span> <span class="nt">20000</span>
<span class="nt">3</span><span class="o">$:</span> <span class="nt">CMP</span> <span class="o">(</span><span class="nt">R2</span><span class="o">)+,(</span><span class="nt">R0</span><span class="o">)+</span> <span class="o">;</span><span class="nt">COMPARE</span> <span class="nt">ONE</span> <span class="nt">WORD</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">BEQ</span> <span class="nt">4</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">SAME</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">MOV</span> <span class="nt">R2</span><span class="o">,</span><span class="nt">-</span><span class="o">(</span><span class="nt">SP</span><span class="o">)</span> <span class="o">;</span><span class="nt">SAVE</span> <span class="nt">SRC1</span>
<span class="nt">MOV</span> <span class="nt">-2</span><span class="o">(</span><span class="nt">R2</span><span class="o">),</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">FETCH</span> <span class="nt">EXPECTED</span> <span class="nt">VALUE</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRERR</span> <span class="o">;</span><span class="nt">REPORT</span> <span class="nt">ERROR</span>
<span class="nt">MOV</span> <span class="o">(</span><span class="nt">SP</span><span class="o">)+,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">RESTORE</span> <span class="nt">SRC1</span>
<span class="nt">4</span><span class="o">$:</span> <span class="nt">CMP</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">AT</span> <span class="nt">END</span><span class="o">?</span>
<span class="nt">BEQ</span> <span class="nt">5</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">SO</span><span class="o">,</span> <span class="nt">SKIP</span> <span class="nt">AHEAD</span>
<span class="nt">CMP</span> <span class="nt">R2</span><span class="o">,</span><span class="p">#</span><span class="nn">END</span> <span class="o">;</span><span class="nt">TIME</span> <span class="nt">TO</span> <span class="nt">RESET</span> <span class="nt">SRC1</span><span class="o">?</span>
<span class="nt">BLO</span> <span class="nt">3</span><span class="o">$</span> <span class="o">;</span><span class="nt">IF</span> <span class="nt">NOT</span><span class="o">,</span> <span class="nt">GO</span> <span class="nt">DO</span> <span class="nt">ANOTHER</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">START</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">OTHERWISE</span> <span class="nt">RESET</span> <span class="nt">SRC1</span>
<span class="nt">BR</span> <span class="nt">3</span><span class="o">$</span> <span class="o">;</span><span class="nt">AND</span> <span class="nt">GO</span> <span class="nt">DO</span> <span class="nt">ANOTHER</span>
<span class="nt">5</span><span class="o">$:</span> <span class="nt">RTS</span> <span class="nt">PC</span> <span class="o">;</span><span class="nt">TESTS</span> <span class="nt">DONE</span><span class="o">,</span> <span class="nt">RETURN</span> <span class="nt">TO</span> <span class="nt">CALLER</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">RELOCATE</span>
<span class="nt">RELOC</span><span class="o">:</span> <span class="nt">MOV</span> <span class="nt">R5</span><span class="o">,@</span><span class="p">#</span><span class="nn">KIPAR1</span> <span class="o">;</span><span class="nt">MAP</span> <span class="nt">VA</span><span class="p">:</span><span class="nd">020000</span> <span class="nt">-</span><span class="o">></span> <span class="nt">PA</span><span class="o">:(</span><span class="nt">R5</span><span class="o"><<</span><span class="nt">6</span><span class="o">)</span>
<span class="nt">CLR</span> <span class="nt">R0</span> <span class="o">;</span><span class="nt">SRC</span> <span class="nt">VA</span><span class="p">:</span><span class="nd">000000</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">20000</span><span class="o">,</span><span class="nt">R1</span> <span class="o">;</span><span class="nt">DST</span> <span class="nt">VA</span><span class="p">:</span><span class="nd">020000</span>
<span class="nt">MOV</span> <span class="nt">R1</span><span class="o">,</span><span class="nt">R2</span> <span class="o">;</span><span class="nt">FULL</span> <span class="nt">PAGE</span> <span class="o">(</span><span class="nt">4K</span> <span class="nt">WORDS</span><span class="o">)</span>
<span class="nt">MOV</span> <span class="o">(</span><span class="nt">R0</span><span class="o">)+,(</span><span class="nt">R1</span><span class="o">)+</span> <span class="o">;</span><span class="nt">COPY</span> <span class="nt">A</span> <span class="nt">WORD</span>
<span class="nt">SOB</span> <span class="nt">R2</span><span class="o">,</span><span class="p">.</span><span class="nc">-2</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">UNTIL</span> <span class="nt">DONE</span>
<span class="nt">MOV</span> <span class="nt">R5</span><span class="o">,@</span><span class="p">#</span><span class="nn">KIPAR0</span> <span class="o">;</span><span class="nt">MAP</span> <span class="nt">VA</span><span class="p">:</span><span class="nd">000000</span> <span class="nt">-</span><span class="o">></span> <span class="nt">PA</span><span class="o">:(</span><span class="nt">R5</span><span class="o"><<</span><span class="nt">6</span><span class="o">)</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">RELSTR</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">RELOCATED</span> <span class="nt">STRING</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="o">@</span><span class="p">#</span><span class="nn">KIPAR1</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">RELOCATION</span> <span class="nt">TARGET</span>
<span class="nt">ASHC</span> <span class="p">#</span><span class="nn">6</span><span class="o">,</span><span class="nt">R4</span> <span class="o">;</span><span class="nt">SHIFT</span> <span class="nt">OVER</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">IN</span> <span class="nt">R4</span><span class="p">:</span><span class="nd">R5</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRW18</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">CRLF</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">CRLF</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">RTS</span> <span class="nt">PC</span> <span class="o">;</span><span class="nt">RETURN</span> <span class="nt">TO</span> <span class="nt">CALLER</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">REPORT</span> <span class="nt">AN</span> <span class="nt">ERROR</span>
<span class="nt">PRERR</span><span class="o">:</span> <span class="nt">MOV</span> <span class="o">@</span><span class="p">#</span><span class="nn">KIPAR1</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">KIPAR</span> <span class="nt">FOR</span> <span class="nt">MAPPED</span> <span class="nt">BASE</span>
<span class="nt">ASHC</span> <span class="p">#</span><span class="nn">6</span><span class="o">,</span><span class="nt">R4</span> <span class="o">;</span><span class="nt">SHIFT</span> <span class="nt">OVER</span> <span class="nt">FOR</span> <span class="nt">PA</span> <span class="nt">IN</span> <span class="nt">R4</span><span class="p">:</span><span class="nd">R5</span>
<span class="nt">ADD</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">ADD</span> <span class="nt">IN</span> <span class="nt">ERROR</span> <span class="nt">VA</span>
<span class="nt">ADC</span> <span class="nt">R4</span> <span class="o">;</span><span class="nt">CARRY</span> <span class="nt">IF</span> <span class="nt">NECESSSARY</span>
<span class="nt">SUB</span> <span class="p">#</span><span class="nn">20002</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">SUB</span> <span class="nt">VA</span> <span class="nt">OFFSET</span> <span class="nt">AND</span> <span class="nt">BACK</span> <span class="nt">UP</span> <span class="nt">ONE</span>
<span class="nt">SBC</span> <span class="nt">R4</span> <span class="o">;</span><span class="nt">BORROW</span> <span class="nt">IF</span> <span class="nt">NECESSARY</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRW18</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">PHYSICAL</span> <span class="nt">ADDRESS</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">DELIM1</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">DELIMITER</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="nt">R2</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">EXPECTED</span> <span class="nt">VALUE</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRW16</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">DELIM2</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">DELIMETER</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="nt">R0</span><span class="o">,</span><span class="nt">R4</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">ADDRESS</span> <span class="nt">AFTER</span> <span class="nt">ERROR</span>
<span class="nt">MOV</span> <span class="nt">-</span><span class="o">(</span><span class="nt">R4</span><span class="o">),</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">BACK</span> <span class="nt">UP</span> <span class="nt">AND</span> <span class="nt">GET</span> <span class="nt">ERROR</span> <span class="nt">VALUE</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRW16</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">MOV</span> <span class="p">#</span><span class="nn">CRLF</span><span class="o">,</span><span class="nt">R5</span> <span class="o">;</span><span class="nt">GET</span> <span class="nt">CRLF</span>
<span class="nt">JSR</span> <span class="nt">PC</span><span class="o">,</span><span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">RTS</span> <span class="nt">PC</span> <span class="o">;</span><span class="nt">RETURN</span> <span class="nt">TO</span> <span class="nt">CALLER</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">PRINT</span> <span class="nt">SIX</span> <span class="nt">DIGIT</span> <span class="nt">OCTAL</span> <span class="nt">NUMBER</span>
<span class="nt">PRW16</span><span class="o">:</span> <span class="nt">CLR</span> <span class="nt">R4</span> <span class="o">;</span><span class="nt">CLEAR</span> <span class="nt">UPPER</span> <span class="nt">WORD</span>
<span class="nt">PRW18</span><span class="o">:</span> <span class="nt">MOV</span> <span class="p">#</span><span class="nn">6</span><span class="o">,</span><span class="nt">R3</span> <span class="o">;</span><span class="nt">SIX</span> <span class="nt">DIGITS</span> <span class="nt">TO</span> <span class="nt">PRINT</span>
<span class="nt">ASHC</span> <span class="p">#</span><span class="nn">1</span><span class="o">,</span><span class="nt">R4</span> <span class="o">;</span><span class="nt">SHIFT</span> <span class="nt">IN</span> <span class="nt">MSB</span> <span class="nt">OF</span> <span class="nt">LOW</span> <span class="nt">WORD</span>
<span class="nt">1</span><span class="o">$:</span> <span class="nt">ADD</span> <span class="p">#</span><span class="nn">60</span><span class="o">,</span><span class="nt">R4</span> <span class="o">;</span><span class="nt">MAKE</span> <span class="nt">INTO</span> <span class="nt">ASCII</span> <span class="nt">DIGIT</span>
<span class="nt">MOV</span> <span class="nt">R4</span><span class="o">,@</span><span class="p">#</span><span class="nn">XBUF</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">IT</span>
<span class="nt">TSTB</span> <span class="o">@</span><span class="p">#</span><span class="nn">XCSR</span> <span class="o">;</span><span class="nt">CHECK</span> <span class="nt">IF</span> <span class="nt">XMIT</span> <span class="nt">DONE</span>
<span class="nt">BPL</span> <span class="p">.</span><span class="nc">-4</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">UNTIL</span> <span class="nt">SO</span>
<span class="nt">CLR</span> <span class="nt">R4</span> <span class="o">;</span><span class="nt">RESET</span> <span class="nt">OUTPUT</span> <span class="nt">CHAR</span>
<span class="nt">ASHC</span> <span class="p">#</span><span class="nn">3</span><span class="o">,</span><span class="nt">R4</span> <span class="o">;</span><span class="nt">SHIFT</span> <span class="nt">IN</span> <span class="nt">NEXT</span> <span class="nt">THREE</span> <span class="nt">BITS</span>
<span class="nt">SOB</span> <span class="nt">R3</span><span class="o">,</span><span class="nt">1</span><span class="o">$</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">DIGITS</span>
<span class="nt">RTS</span> <span class="nt">PC</span> <span class="o">;</span><span class="nt">RETURN</span> <span class="nt">TO</span> <span class="nt">CALLER</span>
<span class="o">;</span><span class="nt">-----</span> <span class="nt">PRINT</span> <span class="nt">NULL-TERMINATED</span> <span class="nt">STRING</span>
<span class="nt">PRSTR</span><span class="o">:</span> <span class="nt">MOVB</span> <span class="o">(</span><span class="nt">R5</span><span class="o">)+,@</span><span class="p">#</span><span class="nn">XBUF</span> <span class="o">;</span><span class="nt">PRINT</span> <span class="nt">ONE</span> <span class="nt">CHAR</span> <span class="nt">AND</span> <span class="nt">ADVANCE</span>
<span class="nt">TSTB</span> <span class="o">@</span><span class="p">#</span><span class="nn">XCSR</span> <span class="o">;</span><span class="nt">CHECK</span> <span class="nt">IF</span> <span class="nt">XMIT</span> <span class="nt">DONE</span>
<span class="nt">BPL</span> <span class="p">.</span><span class="nc">-4</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">UNTIL</span> <span class="nt">SO</span>
<span class="nt">TSTB</span> <span class="p">@</span><span class="k">R5</span> <span class="p">;</span><span class="nt">CHECK</span> <span class="nt">IF</span> <span class="nt">END</span> <span class="nt">OF</span> <span class="nt">STRING</span>
<span class="nt">BNE</span> <span class="nt">PRSTR</span> <span class="o">;</span><span class="nt">LOOP</span> <span class="nt">IF</span> <span class="nt">NOT</span>
<span class="nt">RTS</span> <span class="nt">PC</span> <span class="o">;</span><span class="nt">ELSE</span> <span class="nt">RETURN</span> <span class="nt">TO</span> <span class="nt">CALLER</span>
<span class="nt">IPDRS</span><span class="o">:</span> <span class="p">.</span><span class="nc">WORD</span> <span class="nt">077406</span><span class="o">,</span><span class="nt">077406</span><span class="o">,</span><span class="nt">077406</span><span class="o">,</span><span class="nt">077406</span>
<span class="p">.</span><span class="nc">WORD</span> <span class="nt">077406</span><span class="o">,</span><span class="nt">000000</span><span class="o">,</span><span class="nt">000000</span><span class="o">,</span><span class="nt">077406</span>
<span class="nt">IPARS</span><span class="o">:</span> <span class="p">.</span><span class="nc">WORD</span> <span class="nt">000000</span><span class="o">,</span><span class="nt">000200</span><span class="o">,</span><span class="nt">000400</span><span class="o">,</span><span class="nt">000600</span>
<span class="p">.</span><span class="nc">WORD</span> <span class="nt">001000</span><span class="o">,</span><span class="nt">000000</span><span class="o">,</span><span class="nt">000000</span><span class="o">,</span><span class="nt">007600</span>
<span class="nt">DELIM1</span><span class="o">:</span> <span class="p">.</span><span class="nc">ASCIZ</span> <span class="o">/:</span> <span class="o">/</span> <span class="o">;</span><span class="nt">POST-ADDRESS</span> <span class="nt">DELIMETER</span>
<span class="nt">DELIM2</span><span class="o">:</span> <span class="p">.</span><span class="nc">ASCIZ</span> <span class="o">/</span> <span class="o">/</span> <span class="o">;</span><span class="nt">POST-CRC</span> <span class="nt">DELIMETER</span>
<span class="nt">CRLF</span><span class="o">:</span> <span class="p">.</span><span class="nc">ASCIZ</span> <span class="o"><</span><span class="nt">15</span><span class="o">><</span><span class="nt">12</span><span class="o">></span> <span class="o">;</span><span class="nt">LINE</span> <span class="nt">DELIMETER</span>
<span class="nt">RELSTR</span><span class="o">:</span> <span class="p">.</span><span class="nc">ASCIZ</span> <span class="o">/</span><span class="nt">RELOCATED</span> <span class="nt">TO</span> <span class="nt">PA</span><span class="o">:/</span>
<span class="nt">PCOMPL</span><span class="o">:</span> <span class="p">.</span><span class="nc">ASCIZ</span> <span class="o">/</span><span class="nt">PASS</span> <span class="nt">COMPLETED</span><span class="o">/<</span><span class="nt">15</span><span class="o">><</span><span class="nt">12</span><span class="o">><</span><span class="nt">15</span><span class="o">><</span><span class="nt">12</span><span class="o">></span>
<span class="nt">END</span><span class="o">:</span> <span class="p">.</span><span class="nc">END</span> <span class="nt">START</span>
</pre></div>
</td></tr></table>
<p>The code above is the end result of quite a bit of successive refinement. Things learned along the way:</p>
<ul>
<li>
<p>At first the tests consisted only of writing and checking all-ones and all-zeros to each location. This did
uncover one more bank with a stuck bit at only some addresses, that my previous spot-checking had missed.
Lesson: you really gotta check every byte. Removed, socketed, and replaced the implicated DRAM, and my
tests passed.</p>
</li>
<li>
<p>Maybe I fixed it, so after this I invested the download time to try the the DEC ZQMC diagnostic again. It
ran better than I had seen before, proceeding through a few subtests, but soon started flagging a lot of
errors that my diagnostic missed. Hmmm. Inspecting the DEC code, it seemed to be writing and checking
random data at the time, not just all ones an zeros. Went ahead and implemented "random" data test in my
diagnostic, and it immediately started implicating the same chips. Lesson: all-ones, all-zeros isn't good
enough...</p>
</li>
<li>
<p>While I was at it, I implemented an additional "write/check each byte with its virtual address" test.
Interestingly, this found <em>most</em>, but not <em>all</em> of the same chips as the random data test. Lesson:
all-ones, all-zeros, and address in each word isn't good enough, either; you really do gotta have that
"random" data test, too. At this point, went ahead and replaced three more implicated DRAMS, and my tests
once again passed clean...</p>
</li>
<li>
<p>In the meantime, I did some more code reading on the DEC diagnostic, and found that various features could
be enabled/disabled via the front panel switches. With some care, the diagnostic might also be restartable
without having to wait for an entire re-download, if stopped carefully and in the right place. So I spent
the time to re-download, and found with experimentation that the DEC diagnostic would now pass all banks of
memory cleanly, as long as <em>parity checking was disabled</em>. Hmm...</p>
</li>
<li>
<p>Moving back to my diagnostic, I noticed that while it ran clean now on all banks, on a fresh power-up it
would usually light the parity-error LED on the MS11-L on its first pass. Subsequent passes, after every
location had been written at least once, were fine. Since the MS11-L doesn't have any fancy power-up init
logic, it would make sense to see this if the program read locations without writing them first, but I
didn't think my code did that. Enabling parity traps let me catch it in the act, and it was happening on a
<code>CLR</code> instruction that I was using to init memory! Lesson: on an 11/45, <code>CLR</code> is implemented like other
single- operand, modifying instructions, and actually does a DATIP bus cycle from the destination before
writing back a zero! So use <code>MOV</code> instead of <code>CLR</code> to init memory if you are worried about tripping parity
errors... Cleaned this up in my code, and my diagnostic now runs clean on my machine in all circumstances
without ever tripping a parity error.</p>
</li>
</ul>
<p>So, a lot of issues found and repaired on the MS11-L. Maybe still some issues with parity error handling,
which seems to be halting the machine instead of taking a trap. Figured it might be worth a shot to try the
operating systems again, so mounted the respective disks and tried both, and... exact same failures in both
cases! Womp, womp...</p>
<p>Well, might as well continue to look into the parity error handling, since some things still seem fishy there.
The DEC documentation is a bit murky here; various versions of the KB11-A maintenance manual and 11/45
processor handbook say different and somewhat contradictory things; some info in earlier editions is also
removed from later ones. The available engineering drawings for the relevant parts of the KB11-A CPU look to
have some significant differences from the actual boards I have on hand, and there are more than a few ECO's
for these boards listed as relating specifically to parity handling, but for which no other information is
available. And Noel has uncovered evidence that even the Unibus signaling related to parity may have been
changed by DEC around the times of the early 11/45. Could be interesting...</p></div>
<hr>
</div>
</div>
<div class="span3">
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Site
</li>
<li><a href="https://fritzm.github.io/archives.html">Archives</a>
<li><a href="https://fritzm.github.io/tags.html">Tags</a>
<li><a href="https://fritzm.github.io/feeds/all.rss.xml" rel="alternate">RSS feed</a></li>
</ul>
</div>
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Categories
</li>
<li><a href="https://fritzm.github.io/category/arcade-games.html">Arcade Games</a></li>
<li><a href="https://fritzm.github.io/category/math.html">Math</a></li>
<li><a href="https://fritzm.github.io/category/micros.html">Micros</a></li>
<li><a href="https://fritzm.github.io/category/pdp-11.html">PDP-11</a></li>
<li><a href="https://fritzm.github.io/category/programming.html">Programming</a></li>
<li><a href="https://fritzm.github.io/category/radios.html">Radios</a></li>
</ul>
</div>
<div class="social">
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Social
</li>
<li><a href="http://facebook.com/fritzmueller">facebook</a></li>
<li><a href="http://instagram.com/infrafritz">Instagram</a></li>
<li><a href="http://www.linkedin.com/pub/fritz-mueller/a/679/62/">LinkedIn</a></li>
<li><a href="http://jsfiddle.net/user/fritzm/fiddles/">JSFiddle</a></li>
<li><a href="https://github.com/fritzm">GitHub</a></li>
</ul>
</div>
</div>
</div>
</div> </div>
<footer>
<br />
<p><a href="https://fritzm.github.io">fritzm.github.io</a> © Fritz Mueller 2023</p>
</footer>
</div> <!-- /container -->
<!-- Photoswipe -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<div class="pswp__bg"></div>
<div class="pswp__scroll-wrap">
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--share" title="Share"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
</button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://fritzm.github.io/theme/bootstrap-collapse.js"></script>
</body>
</html>