1
0
mirror of https://github.com/pkimpel/retro-220.git synced 2026-04-07 14:03:59 +00:00

Update and reorganize 220 diagnostics tests from bitsavers.org.

1. Commit original paper tape images B220_Paper_Tapes.zip and
TR1101_TR1301.zip archives from
http://bitsavers.org/bits/Burroughs/B220/.
2. Update and reorganize software/Diagnostics folder; Add README.txt.
3. Commit Michael Mahon's consolidation of the TR1202..TR1206 tests as
Mahon-Regression-Test.pt.
4. Correct formatting of "*" (current assembler location) operand in
BAC-Disassembler.html.
5. Minor corrections to 220-Paper-Tape-Decoder.html.
6. Commit new 220-Format-Band-Disassembler.html script to generate BAC-
Assembler FBGR pseudo ops from memory images of Cardatron format bands.
This commit is contained in:
Paul Kimpel
2021-09-04 17:07:29 -07:00
parent fcfab2700e
commit 4773bec4eb
22 changed files with 3317 additions and 27 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,68 @@
Index of folder retro-220/software/Diagnostics:
Diagnostic programs for the retro-220 emulator.
TR1101_TR1301/
Files for the Burroughs TR1101 System Maintenance Test and TR1301
Magnetic Tape Performance Test. These were obtained from an eBay
sale in September 2020 by Al Kossow of bitsavers.org with financial
assistance from Loren Wilton and Paul Kimpel. These are diagnostic
programs on paper tape -- just the object code, with nothing but
very sketchy notes for documentation.
The original paper tape image files were converted to the format
(.pt) required by the retro-220 emulator. Those converted files were
then disassembled into an assembler-like listing by the software/
tools/BAC-Disassembler.html program in this project.
These programs are very difficult to understand and get running,
although TR1101 has revealed some emulator bugs that have since been
fixed. TR1101 mostly runs -- if you set its very obscure parameters
properly -- but there are still problems in the magnetic tape and
Cardatron areas. TR1301 is still in a largely unexplored state.
See http://bitsavers.org/bits/Burroughs/B220/ for the original paper
tape image files.
TR1202-TR1206/
A collection of five Burroughs diagnostic programs:
TR1202 Memory Test
Runs about 6m40s on a 5000-word system. Halts with
9999 00 aaaa in C, where aaaa is the memory size - 101.
TR1203 Operations Test
Runs 100 iterations in about 100s, printing the
iteration counter at the end of each set of 100.
Runs until you stop it.
TR1204 Arithmetic Test
Runs about 2m35s; halts with 9999 00 9999 in C.
TR1205 Floating-Point Test
Runs about 4m35s; halts with 9999 00 9999 in C.
TR1206 Field Select Test
Runs about 2m54s; halts with 9999 00 9999 in C.
TR1202 requires the system memory size to be pre-stored in word 0000
of the 220 memory. See Memory_Test_MemSize.pt for a loadable paper
tape program that can be prefixed to the TR1202 tape to accomplish
this. An alternative is to store the memory size using the console
keyboard.
The other programs require no special preparation. The .pt
files for these tests are configured to load from paper tape reader
#1. The times above assume the reader is set to the HI speed.
Mahon-Regression-Test.pt
A consolidation of TR1203, TR1204, TR1205, and TR1206 into a single
program that runs only one iteration of each of the five tests.
Developed by Michael Mahon and included here with his permissions.
Load from paper tape reader #1. It requires no other setup. In the
retro-220 emulator, this test completes in about 95 seconds with the
paper tape reader set to the HI speed.
Paul Kimpel
September 2021

View File

@@ -393,7 +393,7 @@ Source File: TR1101.pt
388 0225 0 1015 00 0218 HLT 218,1015
389 0226 0 0000 30 0221 BUN 221
390 0227 0 1000 38 0221 BCS 221,1
391 0228 0 0000 10 0228 CAD *0
391 0228 0 0000 10 0228 CAD *
392 0229 0 0000 18 0228 CFA *-1
393 0230 0 0000 34 0233 BCH *+3
394 0231 0 0001 34 0233 BCL *+2
@@ -1741,7 +1741,7 @@ Source File: TR1101.pt
1736 1573 1 9920 86 5640 CNST 19920865640
1737 1574 0 0215 24 1576 FMU *+2,215
1738 1575 1 0418 10 8517 CAD - 8517,418
1739 1576 0 0815 24 1576 FMU *0,815
1739 1576 0 0815 24 1576 FMU *,815
1740 1577 0 5279 68 4000 CNST 5279684000
1741 1578 1 5279 68 4000 CNST 15279684000
1742 1579 0 0000 00 0000 HLT
@@ -2242,7 +2242,7 @@ Source File: TR1101.pt
2237 0252 0 0000 41 0004 LDR 4
2238 0253 0 0000 42 0118 LDB 118
2239 0254 1 0000 46 1000 CLL - 1000
2240 0255 0 0001 21 0255 DBB *0,1
2240 0255 0 0001 21 0255 DBB *,1
2241 0256 0 1111 40 0258 STR *+2,11
2242 0257 0 1111 40 0260 STR *+3,11
2243 0258 0 0110 05 1000 PRI 1000,0,11
@@ -2875,7 +2875,7 @@ Source File: TR1101.pt
2870 0147 0 0001 48 0000 SRT 0
2871 0148 0 0001 40 0571 STR 571
2872 0149 0 0000 49 0009 SLA 9
2873 0150 0 4210 18 0150 CFA *0,42
2873 0150 0 4210 18 0150 CFA *,42
2874 0151 0 0001 34 0149 BCL *-2
2875 0152 0 4210 40 0188 STA 188,42
2876 0153 0 4210 40 0220 STA 220,42
@@ -3006,7 +3006,7 @@ Source File: TR1101.pt
3001 0278 0 1100 36 0277 BFA *-1,11,0
3002 0279 0 0000 40 0008 STA 8
3003 0280 0 6229 26 0258 IFL 258,62,29
3004 0281 0 0000 38 0281 BCS *0
3004 0281 0 0000 38 0281 BCS *,0
3005 0282 0 0001 45 0000 CLA
3006 0283 0 0000 41 0007 LDR 7
3007 0284 0 0001 49 0001 SLT 1
@@ -3170,7 +3170,7 @@ Source File: TR1101.pt
3165 0442 0 2201 27 0443 DFL *+1,22,1
3166 0443 0 0000 32 0445 BRP *+2
3167 0444 0 1105 27 0445 DFL *+1,11,5
3168 0445 0 5000 10 0445 CAD *0,5000
3168 0445 0 5000 10 0445 CAD *,5000
3169 0446 0 1105 36 0484 BFA 484,11,5
3170 0447 0 0000 10 0443 CAD 443
3171 0448 0 2299 36 0450 BFA *+2,22,99
@@ -3663,7 +3663,7 @@ Source File: TR1101.pt
3658 1108 3 3333 33 3333 CNST 33333333333
3659 1109 3 3331 11 1111 CNST 33331111111
3660 1110 1 3111 11 1111 CSA - *+1,3111
3661 1111 1 3111 11 1111 CSA - *0,3111
3661 1111 1 3111 11 1111 CSA - *,3111
3662 1112 1 3111 11 1111 CSA - *-1,3111
3663 1113 1 3111 11 1111 CSA - *-2,3111
3664 1114 1 3111 11 1111 CSA - *-3,3111
@@ -5299,7 +5299,7 @@ Source File: TR1101.pt
5294 0844 0 0007 45 0000 CLT
5295 0845 0 0005 43 0000 LSA 5
5296 0846 0 1000 04 0020 PRB 20,1
5297 0847 0 0000 30 0847 BUN *0
5297 0847 0 0000 30 0847 BUN *
5298 0848 0 0000 01 0000 NOP
5299 0849 0 0000 00 0000 HLT
5300 0850 0 9999 99 9999 CNST 9999999999

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
61000040000
00000005000

View File

@@ -0,0 +1,588 @@
<!DOCTYPE html>
<head>
<title>Burroughs 220 Format Band Disassembler</title>
<meta name="Author" content="Paul Kimpel">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<script>
/***********************************************************************
* retro-220/tools 220-Format-Band-Disassembler.html
************************************************************************
* Copyright (c) 2021, Paul Kimpel.
* Licensed under the MIT License,
* see http://www.opensource.org/licenses/mit-license.php
************************************************************************
* Burroughs 220 Cardatron format band disassembler.
*
* This script accepts a 220 Cardatron format band in paper-tape image
* format, one word per line, with the words in reverse order, as they
* would be on a loadable paper tape and stored in 220 memory.
*
* The digit patterns are analyzed and converted to the notation used
* by the FBGR pseudo-instruction for the BAC-Assembler, also known as
* the "Burroughs 220 Assembler-Compiler," as described in Burroughs
* Bulletin 5024, April 1960, available at the Charles Babbage Institute
* in Minnenapolis, MN: CBI 90, Series 74 Box 5 Folder 17, 69pp.
*
* To use, run this script in a web browser. Copy the sequence of
* format-band words from a 220 paper tape image and paste them into the
* "Raw Band" text area on the browser page. Select the band type as
* either input or ouput, and click the Convert button. The disassembled
* band will appear in the FBGR text area.
************************************************************************
* 2021-02-10 P.Kimpel
* Original version, from retro-220 tools/220-Paper-Tape-Decoder.html.
***********************************************************************/
"use strict";
window.onload = function() {
let band = "";
let bandType = "";
let eolRex = /([^\n\r\f]*)((:?\r[\n\f]?)|\n|\f)?/g;
let formatText ="";
/**************************************/
function loadBand() {
/* Loads the band string from the contents of RawBandText.
If less than 319 digits are present, 3s are pre-pended
to the array (since the band words are loaded in reverse order) */
let bandText = document.getElementById("RawBandText").value;
let line = ""; // one text line (word) from RawBandText
let lineLength = 0; // length of current text line
let match = null; // regex match object
let x = 0; // bandText index
band = "";
while (x < bandText.length) {
eolRex.lastIndex = x;
match = eolRex.exec(bandText);
if (!match) {
line = "";
} else {
x += match[0].length;
line = match[1].trim().replace(/\s/g, "");
}
lineLength = line.length;
if (lineLength > 0) {
if (lineLength > 11) {
alert("Input line too long: " + line);
line = line.substring(lineLength-11, 11);
}
if (lineLength < 11) {
let signDigit = line.substring(0, 1);
let wordValue = line.substring(1);
while (wordValue.length < 10) {
wordValue = "0" + wordValue;
}
line = signDigit + wordValue;
}
band += line;
}
}
while (band.length < 319) {
band = "3" + band;
}
}
/**************************************/
function optimizePhrase(phrase) {
let code ="";
let count = 0;
let lastCode = "";
let newPhrase = "";
for (let x=phrase.length-1; x>=0; --x) {
code = phrase[x];
if (code == lastCode) {
++count;
} else {
if (lastCode != "") {
newPhrase = lastCode + newPhrase;
if (count > 1) {
newPhrase = count.toString() + newPhrase;
}
}
lastCode = code;
count = 1;
}
}
newPhrase = lastCode + newPhrase;
if (count > 1) {
newPhrase = count.toString() + newPhrase;
}
return newPhrase;
}
/**************************************/
function formatFBGR(phrases) {
let phrase ="";
let count = 0;
let lastPhrase = "";
let text = "";
for (let x=phrases.length-1; x>=0; --x) {
phrase = phrases[x];
if (phrase == lastPhrase) {
++count;
} else {
if (lastPhrase != "") {
if (count > 1) {
text = count.toString() + "(" + lastPhrase + ")," + text;
} else {
text = lastPhrase + "," + text;
}
}
lastPhrase = phrase;
count = 1;
}
}
if (count > 1) {
text = count.toString() + "(" + lastPhrase + ")," + text;
} else {
text = lastPhrase + "," + text;
}
return text.substring(0, text.length-1);
}
/**************************************/
function disassembleInputBand() {
/* Disassembles the input band data in "band" to FBGR format */
let ax = 0; // start of active segment
let bx = band.length-1; // band string index
let col = 0; // card column counter, right-to-left
let d = ""; // current band digit
let lastDigit = ""; // last band digit
let overPunch = false; // overpunch sequence in progress
let phrase = ""; // current word phrase
let phrases = []; // disassembled FBGR phrases
let wx = 0; // digit-in-word counter
let zoneDigit = false; // true if zone digit; false if numeric digit
function getDigit() {
if (bx < ax) {
return "3";
} else {
return band[bx--];
}
}
function setOverPunch() {
if (!overPunch) {
overPunch = true;
switch (lastDigit) {
case "":
break;
case "1":
phrase = "N" + phrase;
++wx;
break;
case "3":
phrase = "B" + phrase;
break;
default:
phrase = "?" + lastDigit + phrase;
break;
}
lastDigit = "";
}
}
// Process the inactive segment of the band
do {
switch (band[ax]) {
case "3":
++ax;
break;
case "0":
++wx;
if (wx <= 11) {
++ax;
}
break;
default:
wx = 12;
break;
}
} while (ax <= bx && wx <= 11);
// Process the active segment of the band
while (bx >= ax) {
// Build a word phrase
phrase = "";
zoneDigit = overPunch = false;
wx = 0;
while (wx < 10) {
d = getDigit();
switch (zoneDigit) {
case false:
switch (d) {
case "0":
phrase = "Z" + phrase;
++wx;
break;
case "1":
lastDigit = d;
zoneDigit = true;
++wx;
break;
case "2":
phrase = "?2" + phrase;
++wx;
break;
case "3":
lastDigit = d;
zoneDigit = true;
break;
}
break;
case true:
switch (d) {
case "0":
setOverPunch();
phrase = "Z" + phrase;
++wx;
break;
case "1":
if (overPunch) {
phrase = "?1" + phrase;
overPunch = false;
++wx;
} else if (lastDigit == "1") {
phrase = "A" + phrase;
++wx;
} else {
phrase = "?1" + lastDigit + phrase;
++wx;
}
zoneDigit = false;
break;
case "2":
setOverPunch();
phrase = "?2" + phrase;
++wx;
break;
case "3":
if (overPunch) {
phrase = "?3" + phrase;
overPunch = false;
} else if (lastDigit == "1") {
phrase = "N" + phrase;
} else if (lastDigit == "3") {
phrase = "B" + phrase;
} else {
phrase = "?3" + lastDigit + phrase;
}
lastDigit = "";
zoneDigit = false;
break;
}
break;
} // switch zoneDigit
} // while wx
// Process the sign
if (wx != 10) {
phrase = "!" + phrase;
}
d = getDigit();
if (zoneDigit) {
if (!overPunch) {
if (d == "3" && lastDigit == "1") {
phrase = "N" + phrase;
lastDigit = "";
d = getDigit();
} else {
setOverPunch();
}
}
}
switch (d) {
case "0":
if (overPunch) {
phrase = "?OP0" + phrase;
} else {
phrase = "P" + phrase;
}
break;
case "1":
if (overPunch) {
phrase = "X" + phrase;
overPunch = false;
} else {
d = getDigit();
if (d == "3") {
phrase = "S" + phrase;
} else {
phrase + "?" + d + "1" + phrase;
}
}
break;
case "2":
if (overPunch) {
phrase = "?OP2" + phrase;
} else {
phrase = "T" + phrase;
}
break;
case "3":
if (overPunch) {
phrase = "?OP3" + phrase;
} else {
d = getDigit();
if (d == "1") {
phrase = "X" + phrase;
} else {
phrase = "?" + d + "3" + phrase;
}
}
break;
} // switch d
phrase = optimizePhrase(phrase);
phrases.unshift(phrase);
} // for dx
document.getElementById("FBGRText").value = formatFBGR(phrases);
}
/**************************************/
function disassembleOutputBand() {
/* Disassembles the output band data in "band" to FBGR format */
let ax = 0; // start of active segment
let bx = band.length-1; // band string index
let col = 0; // card column counter, right-to-left
let d = ""; // current band digit
let lastDigit = ""; // last band digit
let overPunch = false; // overpunch sequence in progress
let phrase = ""; // current word phrase
let phrases = []; // disassembled FBGR phrases
let wx = 0; // digit-in-word counter
let zoneDigit = false; // true if zone digit; false if numeric digit
function getDigit() {
if (bx < ax) {
return "3";
} else {
return band[bx--];
}
}
function setOverPunch() {
if (!overPunch) {
overPunch = true;
switch (lastDigit) {
case "":
break;
case "0":
phrase = "B" + phrase;
break;
case "1":
phrase = "N" + phrase;
++wx;
break;
default:
phrase = "?" + lastDigit + phrase;
break;
}
lastDigit = "";
}
}
// Process the inactive segment of the band
while (band[ax] == "3") {
++ax;
}
// Process the active segment of the band
while (bx >= ax) {
// Build a word phrase
phrase = "";
zoneDigit = overPunch = false;
wx = 0;
while (wx < 10) {
d = getDigit();
switch (zoneDigit) {
case false:
switch (d) {
case "0":
lastDigit = d;
zoneDigit = true;
break;
case "1":
lastDigit = d;
zoneDigit = true;
++wx;
break;
case "2":
phrase = "N" + phrase;
++wx;
break;
case "3":
phrase = "Z" + phrase;
++wx;
break;
}
break;
case true:
switch (d) {
case "0":
if (lastDigit == "0") {
phrase = "B" + phrase;
} else {
phrase = "?0" + lastDigit + phrase;
}
break;
case "1":
if (lastDigit == "1") {
phrase = "A" + phrase;
++wx;
} else {
phrase = "?1" + lastDigit + phrase;
++wx;
}
break;
case "2":
phrase = "?2" + lastDigit + phrase;
lastDigit = "";
++wx;
break;
case "3":
phrase = "?3" + lastDigit + phrase;
lastDigit = "";
++wx;
break;
}
zoneDigit = false;
break;
} // switch zoneDigit
} // while wx
// Process the sign
if (wx != 10) {
phrase = "!" + phrase;
}
d = getDigit();
if (zoneDigit) {
setOverPunch();
}
switch (d) {
case "0":
if (overPunch) {
phrase = "?S0" + phrase;
} else {
d = getDigit();
if (d == "1") {
phrase = "XB" + phrase;
} else {
phrase = "?S" + d + "0" + phrase;
}
}
break;
case "1":
if (overPunch) {
phrase = "X" + phrase;
} else {
phrase + "?S1" + phrase;
}
break;
case "2":
if (overPunch) {
phrase = "?S2" + phrase;
} else {
phrase = "S" + phrase;
}
break;
case "3":
if (overPunch) {
phrase = "?S3" + phrase;
} else {
phrase = "P" + phrase;
}
break;
} // switch d
phrase = optimizePhrase(phrase);
phrases.unshift(phrase);
} // for dx
document.getElementById("FBGRText").value = formatFBGR(phrases);
}
/**************************************/
function ConvertBtn_onclick(ev) {
/* Click handler for the Convert button, which starts the disassembly
process */
bandType = document.getElementById("BandTypeSelect").value;
document.getElementById("FBGRText").textContent = "";
loadBand();
switch (bandType) {
case "I":
disassembleInputBand();
break;
case "O":
disassembleOutputBand();
break;
}
}
/**************************************/
/* Start of window.onload() */
document.getElementById("RawBandText").textContent = "";
document.getElementById("ConvertBtn").addEventListener("click", ConvertBtn_onclick, false);
}
</script>
<style>
BODY {
font-family: Calibri, Arial, Helvetica, sans-serif}
TR {
vertical-align: top}
</style>
</head>
<body>
<h3>retro-220 Cardatron Format Band Disassembler Utility</h3>
<table border=0 cellpadding=2 cellspacing=0>
<tr>
<td>Raw Band:
<td><textarea id=RawBandText cols=20 rows=12></textarea>
<tr>
<td>Band Type:
<td><select id=BandTypeSelect>
<option value="I" selected>Input
<option value="O" >Output
</select>
<button id=ConvertBtn type=button value=1>Convert</button>
<tr>
<td>FBGR:
<td><textarea id=FBGRText cols=80 rows=3></textarea>
</table>
</body>
</html>

View File

@@ -10,11 +10,11 @@
/***********************************************************************
* retro-220/tools 220-Paper-Tape-Decoder.html
************************************************************************
* Copyright (c) 2012, Paul Kimpel.
* Copyright (c) 2020, Paul Kimpel.
* Licensed under the MIT License,
* see http://www.opensource.org/licenses/mit-license.php
************************************************************************
* Burroughs 220 Library Maintenance tape file extract and conversion.
* Raw paper tape image file conversion to Burroughs 220 paper tape format.
*
* This script reads a Burroughs Burroughs 220 paper tape image as one
* large blob and extracts the data, converting the punch pattern bytes
@@ -27,7 +27,7 @@
* X 0 P 8 4 2 1
*
* where "P" is the odd-parity bit, "X" has the value 32, and "0" has the
* value 16.
* value 16. The 8, 4, 2, and 1 bits have their respective values
*
* To use, select the .ptp file using the file selection control on the
* page. The script writes a log of activity to the web page.
@@ -213,9 +213,9 @@ window.onload = function() {
box.value = text;
box.focus();
box.select();
result = !confirm("Copy and save " + fileName + " from the sub-window.\n" +
"Then click OK to continue or Cancel to quit.");
win.close();
//result = !confirm("Copy and save " + fileName + " from the sub-window.\n" +
// "Then click OK to continue or Cancel to quit.");
//win.close();
return result;
}

View File

@@ -357,7 +357,7 @@ window.addEventListener("load", function() {
"BZA": [ 36, 1, -1, 7, 0, 9, 0],
"BFR": [ 37, 1, -1, 7, -1, 9, -1],
"BZR": [ 37, 1, -1, 7, 0, 9, 0],
"BCS": [ 38, 1, -1, 4, 0],
"BCS": [ 38, 1, -1, 4, -1],
"SOR": [ 39, 20, 0, 2, 0],
"SOH": [ 139, 20, 0, 2, 0],
"IOM": [ 239, 1, -1, 2, 0],
@@ -600,7 +600,7 @@ window.addEventListener("load", function() {
/**************************************/
function readAWord() {
/* Reads one word from the buffer, converts ite to decimal, and
/* Reads one word from the buffer, converts it to decimal, and
fills in the global "wordData" structure with the word and its
location in the buffer */
var bx = bufferOffset; // current buffer offset
@@ -643,8 +643,6 @@ window.addEventListener("load", function() {
if (lineLength > 11) {
printError("Input line too long: " + line);
line = line.substring(lineLength-11, 11);
} else if (lineLength == 0) {
line = "0";
}
w = parseInt(line, 10);
@@ -834,14 +832,14 @@ window.addEventListener("load", function() {
case 19: // resolved address only in (04)
w1 = getField(word, 4);
w2 = w1 - location;
if (Math.abs(w2) < 4) {
if (w2 > 0) {
operand += "*+" + w2;
} else {
operand += "*" + w2;
}
} else {
if (Math.abs(w2) > 3) {
operand += w1;
} else if (w2 > 0) {
operand += "*+" + w2;
} else if (w2 < 0) {
operand += "*" + w2;
} else {
operand += "*";
}
break;
case 2: // secondary value inserted in (33)

View File

@@ -6,6 +6,12 @@ Unless otherwise specified, all files are in standard Windows text
format, with carriage-return/line-feed delimiters.
220-Format-Band-Disassembler.html
HTML/Javascript utility to disassemble words of a 220 Cardatron
format band into the notation used by the BAC-Assembler FBGR pseudo-
instruction. See instructions for use at the beginning of the
source.
220-Paper-Tape-Decoder.html
HTML/Javascript utility to translate Al Kossow's binary paper-
tape image files to the paper-tape image format used by the
@@ -66,3 +72,6 @@ January 2018
Added Xlate-Card-PT.wsf.
2020-08-20
Added 220-Paper-Tape-Decoder.html and BAC-Disassembler.html.
2021-09-03
Added 220-Format-Band-Disassembler.html.