mirror of
https://github.com/pkimpel/retro-220.git
synced 2026-04-14 15:55:30 +00:00
Release emulator 1.03a and TR1101/TR1301 diagnostic tests.
1. Correct 220-Paper-Tape-Decoder.html to support the full 64-character paper tape encoding. 2. Correct BAC-Disassembler.html to support the full 64-character set and properly output sign-2 constant words. 3. Correct the Processor and Paper Tape drivers to support the full 64-character set and allow literal error codes (17) to be read without setting the paper-tape alarm. 4. Commit the TR1101 and TR1301 diagnostic test paper tape images received from Al Kossow at http://bitsavers.org/bits/Burroughs/B220/TR1101_TR1301.zip.
This commit is contained in:
@@ -260,7 +260,7 @@ function B220Processor(config, devices) {
|
||||
* Global Constants *
|
||||
***********************************************************************/
|
||||
|
||||
B220Processor.version = "1.03";
|
||||
B220Processor.version = "1.03a";
|
||||
|
||||
B220Processor.tick = 1000/200000; // milliseconds per clock cycle (200KHz)
|
||||
B220Processor.cyclesPerMilli = 1/B220Processor.tick;
|
||||
@@ -2991,37 +2991,38 @@ B220Processor.prototype.consoleInputInitiateNormal = function consoleInputInitia
|
||||
this.C.inc();
|
||||
this.CADDR = this.C.value%0x10000;
|
||||
|
||||
switch (code) {
|
||||
case 0x17: // invalid character/parity error
|
||||
if (result.error) {
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
break;
|
||||
case 0x35: // end-of-word
|
||||
this.consoleInputFinishWord(result);
|
||||
break;
|
||||
case 0x82: // sign=2, set alpha translation
|
||||
this.PZT.set(!this.HOLDPZTZEROSW);
|
||||
this.D.set(2);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
break;
|
||||
default: // anything else, set numeric translation
|
||||
this.PZT.set(0);
|
||||
if ((code & 0xF0) == 0x80) {// it's a numeric sign -- okay
|
||||
this.D.set(code%0x10);
|
||||
} else {
|
||||
switch (code) {
|
||||
case 0x35: // end-of-word
|
||||
this.consoleInputFinishWord(result);
|
||||
break;
|
||||
case 0x82: // sign=2, set alpha translation
|
||||
this.PZT.set(!this.HOLDPZTZEROSW);
|
||||
this.D.set(2);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else if (code == 0) { // we'll take a space as a zero
|
||||
this.D.set(0);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // sign is non-numeric -- invalid
|
||||
this.D.set(0);
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
}
|
||||
break;
|
||||
} // switch code
|
||||
break;
|
||||
default: // anything else, set numeric translation
|
||||
this.PZT.set(0);
|
||||
if ((code & 0xF0) == 0x80) {// it's a numeric sign -- okay
|
||||
this.D.set(code%0x10);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else if (code == 0) { // we'll take a space as a zero
|
||||
this.D.set(0);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // sign is non-numeric -- invalid
|
||||
this.D.set(0);
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
}
|
||||
break;
|
||||
} // switch code
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3038,31 +3039,32 @@ B220Processor.prototype.consoleInputInitiateInverse = function consoleInputIniti
|
||||
this.C.inc();
|
||||
this.CADDR = this.C.value%0x10000;
|
||||
|
||||
switch (code) {
|
||||
case 0x17: // invalid character/parity error
|
||||
if (result.error) {
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
break;
|
||||
case 0x35: // end-of-word
|
||||
this.consoleInputFinishWord(result);
|
||||
break;
|
||||
default: // anything else, set numeric translation
|
||||
this.PZT.set(0);
|
||||
if ((code & 0xF0) == 0x80) {// it's a numeric code -- okay
|
||||
this.D.set(code%0x10);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else if (code == 0) { // we'll take a space as a zero
|
||||
this.D.set(0);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // digit is non-numeric -- invalid
|
||||
this.D.set(0);
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
}
|
||||
break;
|
||||
} // switch code
|
||||
} else {
|
||||
switch (code) {
|
||||
case 0x35: // end-of-word
|
||||
this.consoleInputFinishWord(result);
|
||||
break;
|
||||
default: // anything else, set numeric translation
|
||||
this.PZT.set(0);
|
||||
if ((code & 0xF0) == 0x80) {// it's a numeric code -- okay
|
||||
this.D.set(code%0x10);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else if (code == 0) { // we'll take a space as a zero
|
||||
this.D.set(0);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // digit is non-numeric -- invalid
|
||||
this.D.set(0);
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
}
|
||||
break;
|
||||
} // switch code
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3079,35 +3081,36 @@ B220Processor.prototype.consoleInputReceiveChar = function consoleInputReceiveCh
|
||||
|
||||
this.asyncOff();
|
||||
if (this.AST.value) { // if false, we've probably been cleared
|
||||
switch (code) {
|
||||
case 0x17: // invalid character/parity error
|
||||
if (result.error) {
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
break;
|
||||
case 0x35: // end-of-word
|
||||
this.consoleInputFinishWord(result);
|
||||
break;
|
||||
default: // anything else, accumulate digits in word
|
||||
if (this.PZT.value) { // alphanumeric translation
|
||||
this.D.set((this.D.value % 0x1000000000)*0x100 + code);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // numeric translation
|
||||
if ((code & 0xF0) == 0x80) {// it's a numeric code -- okay
|
||||
this.D.set((this.D.value % 0x10000000000)*0x10 + code%0x10);
|
||||
} else {
|
||||
switch (code) {
|
||||
case 0x35: // end-of-word
|
||||
this.consoleInputFinishWord(result);
|
||||
break;
|
||||
default: // anything else, accumulate digits in word
|
||||
if (this.PZT.value) { // alphanumeric translation
|
||||
this.D.set((this.D.value % 0x1000000000)*0x100 + code);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else if (code == 0) { // we'll take a space as a zero
|
||||
this.D.set((this.D.value % 0x10000000000)*0x10);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // code is non-numeric -- invalid
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
} else { // numeric translation
|
||||
if ((code & 0xF0) == 0x80) {// it's a numeric code -- okay
|
||||
this.D.set((this.D.value % 0x10000000000)*0x10 + code%0x10);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else if (code == 0) { // we'll take a space as a zero
|
||||
this.D.set((this.D.value % 0x10000000000)*0x10);
|
||||
this.asyncOn();
|
||||
result.readChar(this.boundConsoleInputReceiveChar);
|
||||
} else { // code is non-numeric -- invalid
|
||||
this.setPaperTapeCheck(1);
|
||||
this.ioComplete(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
} // switch code
|
||||
break;
|
||||
} // switch code
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
TR1101 Instructions [written on inside of box lid]
|
||||
|
||||
Enter Unit Z[?] by keyboard Restart 0030
|
||||
|
||||
Execute 10000 04 0000 with A Sgn = 1
|
||||
|
||||
Before read in:
|
||||
|
||||
Cell 0001 5000
|
||||
2 Card units
|
||||
3 TSU's
|
||||
4 1 in A-1
|
||||
5 0
|
||||
6 0
|
||||
|
||||
Prg Switches - 6 [7 crossed out]
|
||||
|
||||
5 6 7 & 9 (locks up on Sect 3)
|
||||
|
||||
_____________
|
||||
|
||||
Program switch use (deduced from behavior):
|
||||
|
||||
1 Lock up execution on current test
|
||||
|
||||
4 Skips initial positioning of mag tape drives
|
||||
|
||||
5 Skips printing test name on SPO
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>Burroughs 220 Paper Tape Extract</title>
|
||||
<title>Burroughs 220 Paper Tape Decoder</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">
|
||||
@@ -45,6 +45,7 @@
|
||||
"use strict";
|
||||
|
||||
window.onload = function() {
|
||||
var debug = false;
|
||||
var endOfWord = 0x0D;
|
||||
var panel = document.getElementById("TextPanel");
|
||||
var tapeBlob = null; // blob read from .ptp file
|
||||
@@ -55,42 +56,42 @@ window.onload = function() {
|
||||
// so B220 carriage-return (16) translates to "|". To avoid space-expansion
|
||||
// of tabs (26), they are translated to "~". The 02 "blank" code is "_".
|
||||
// Form-feed (15) translates to "^".
|
||||
// 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
||||
" ", "?", "_", ".", "\u00A4", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 00-0F
|
||||
"&", "?", "?", "$", "*", "^", "|", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 10-1F
|
||||
"-", "/", "?", ",", "%", "?", "~", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 20-2F
|
||||
"?", "?", "?", "#", "@", "\\", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 30-3F
|
||||
"?", "A", "B", "C", "D", "E", "F", "G", "H", "I", "!", "!", "!", "!", "!", "!", // 40-4F
|
||||
"?", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "!", "!", "!", "!", "!", "!", // 50-5F
|
||||
"?", "?", "S", "T", "U", "V", "W", "X", "Y", "Z", "!", "!", "!", "!", "!", "!", // 60-6F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 70-7F
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "!", "!", "!", "!", "!", // 80-8F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 90-9F
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // A0-AF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // B0-BF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // C0-CF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // D0-DF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // E0-EF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!"]; // F0-FF
|
||||
// 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
||||
" ", "?", "_", ".", "<", ">", "\\","?", "?", "?", "!", "!", "!", "!", "!", "!", // 00-0F
|
||||
"&", "?", "]", "$", "*", "^", "|", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 10-1F
|
||||
"-", "/", "{", ",", "%", "}", "~", ":", "?", "?", "!", "!", "!", "!", "!", "!", // 20-2F
|
||||
"?", "?", "[", "#", "@", "\n","\"","`", "?", "?", "!", "!", "!", "!", "!", "!", // 30-3F
|
||||
"?", "A", "B", "C", "D", "E", "F", "G", "H", "I", "!", "!", "!", "!", "!", "!", // 40-4F
|
||||
"?", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "!", "!", "!", "!", "!", "!", // 50-5F
|
||||
"?", "?", "S", "T", "U", "V", "W", "X", "Y", "Z", "!", "!", "!", "!", "!", "!", // 60-6F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 70-7F
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "!", "!", "!", "!", "!", // 80-8F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 90-9F
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // A0-AF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // B0-BF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // C0-CF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // D0-DF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // E0-EF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!"]; // F0-FF
|
||||
|
||||
var ptXlate = [ // translate 220 paper tape punch patterns to ANSI
|
||||
// 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
||||
"?", "1", "2", "?", "4", "?", "?", "7", "8", "?", "?", "#", "?", "?", "<", "?", // 00-0F
|
||||
" ", "?", "?", "3", "?", "5", "6", "?", "?", "9", "?", "?", "@", "?", "?", "?", // 10-1F
|
||||
"0", "?", "?", "T", "?", "V", "W", "?", "?", "Z", "?", ",", "%", "?", "?", "?", // 20-2F
|
||||
"?", "/", "S", "?", "U", "?", "?", "X", "Y", "?", "?", "?", "?", "?", "~", "?", // 30-3F
|
||||
"-", "?", "?", "L", "?", "N", "O", "?", "?", "R", "?", "?", "*", "?", "?", "?", // 40-4F
|
||||
"?", "J", "K", "?", "M", "?", "?", "P", "Q", "?", "?", "$", "?", "^", "|", "?", // 50-5F
|
||||
"?", "A", "B", "?", "D", "?", "?", "G", "H", "?", "?", ".", "?", "?", "?", "?", // 60-6F
|
||||
"&", "?", "?", "C", "?", "E", "F", "?", "?", "I", "_", "?", "\u00A4", "?", "?", "?", // 70-7F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 80-8F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 90-9F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // A0-AF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // B0-BF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // C0-CF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // D0-DF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // E0-EF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?"]; // F0-FF
|
||||
// 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
||||
"?", "1", "2", "?", "4", "?", "?", "7", "8", "?", "?", "#", "?", "\n","\"","?", // 00-0F
|
||||
" ", "?", "?", "3", "?", "5", "6", "?", "?", "9", "[", "?", "@", "?", "?", "`", // 10-1F
|
||||
"0", "?", "?", "T", "?", "V", "W", "?", "?", "Z", "{", "?", "%", "?", "?", ":", // 20-2F
|
||||
"?", "/", "S", "?", "U", "?", "?", "X", "Y", "?", "?", ",", "?", "}", "~", "?", // 30-3F
|
||||
"-", "?", "?", "L", "?", "N", "O", "?", "?", "R", "]", "?", "*", "?", "?", "?", // 40-4F
|
||||
"?", "J", "K", "?", "M", "?", "?", "P", "Q", "?", "?", "$", "?", "^", "|", "?", // 50-5F
|
||||
"?", "A", "B", "?", "D", "?", "?", "G", "H", "?", "?", ".", "?", ">", "\\","?", // 60-6F
|
||||
"&", "?", "?", "C", "?", "E", "F", "?", "?", "I", "_", "?", "<", "?", "?", "?", // 70-7F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 80-8F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 90-9F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // A0-AF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // B0-BF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // C0-CF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // D0-DF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // E0-EF
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?"]; // F0-FF
|
||||
|
||||
var pow2 = [ // powers of 2 from 0 to 52
|
||||
0x1, 0x2, 0x4, 0x8,
|
||||
@@ -157,7 +158,9 @@ window.onload = function() {
|
||||
Returns true if no more files should be converted */
|
||||
var box = null;
|
||||
var frame = 0;
|
||||
var hex = "";
|
||||
var len = data.byteLength;
|
||||
var line = "";
|
||||
var result = false;
|
||||
var text = "";
|
||||
var win = null;
|
||||
@@ -181,15 +184,29 @@ window.onload = function() {
|
||||
win.document.body.appendChild(box);
|
||||
|
||||
for (x=0; x<len; ++x) {
|
||||
frame = data.getUint8(x);
|
||||
frame = data.getUint8(x) & 0x7F;
|
||||
switch (frame) {
|
||||
case 0: // ignore blank tape
|
||||
case 0x7F: // ignore tape feed (punches in all channels)
|
||||
break;
|
||||
case 0x0D: // End of Word code
|
||||
text += "\n";
|
||||
if (!debug) {
|
||||
text += line + "\n";
|
||||
} else {
|
||||
while (line.length < 15) {
|
||||
line += " ";
|
||||
}
|
||||
text += line + hex + " 0d\n";
|
||||
hex = "";
|
||||
}
|
||||
|
||||
line = "";
|
||||
break;
|
||||
default:
|
||||
text += ptXlate[frame];
|
||||
line += ptXlate[frame];
|
||||
if (debug) {
|
||||
hex += " " + (frame+0x100).toString(16).substring(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -233,27 +233,27 @@ window.addEventListener("load", function() {
|
||||
|
||||
var xlateANSI220 = [ // translate ANSI to 220 internal character codes
|
||||
// 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-0F
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10-1F
|
||||
0, 0, 0, 33, 13, 24, 10, 34, 24, 4, 14, 10, 23, 20, 3, 21, // 20-2F
|
||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 0, 13, 4, 33, 0, 0, // 30-3F
|
||||
17, 17, 17, 17, 17, 17, 17, 17, 17, 26, 35, 17, 15, 16, 17, 17, // 00-0F
|
||||
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, // 10-1F
|
||||
0, 17, 36, 33, 13, 24, 10, 34, 24, 4, 14, 10, 23, 20, 3, 21, // 20-2F
|
||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 27, 13, 4, 33, 5, 17, // 30-3F
|
||||
34, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, // 40-4F
|
||||
57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 0, 0, 0, 15, 2, // 50-5F
|
||||
0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, // 60-6F
|
||||
57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 0, 16, 0, 26, 0]; // 70-7F
|
||||
57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 32, 6, 12, 15, 2, // 50-5F
|
||||
37, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, // 60-6F
|
||||
57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 22, 16, 25, 26, 17]; // 70-7F
|
||||
|
||||
var xlate220ANSI = [ // translate internal B220 code to ANSI (Algol glyphs)
|
||||
// 00 01 02 03 04 05 06 07 08 09
|
||||
" ", "?", "_", ".", ")", "?", "?", "?", "?", "?", // 00-09
|
||||
"+", "?", "?", "$", "*", "^", "|", "?", "?", "?", // 10-19
|
||||
"-", "/", "?", ",", "(", "?", "~", "?", "?", "?", // 20-29
|
||||
"?", "?", "?", "=", "@", "\\", "?", "?", "?", "?", // 30-39
|
||||
"?", "A", "B", "C", "D", "E", "F", "G", "H", "I", // 40-49
|
||||
"?", "J", "K", "L", "M", "N", "O", "P", "Q", "R", // 50-59
|
||||
"?", "?", "S", "T", "U", "V", "W", "X", "Y", "Z", // 60-69
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 70-79
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", // 80-89
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?"]; // 90-99
|
||||
// 00 01 02 03 04 05 06 07 08 09
|
||||
" ", "?", "_", ".", "<", ">", "\\","?", "?", "?", // 00-09
|
||||
"&", "?", "]", "$", "*", "^", "|", "?", "?", "?", // 10-19
|
||||
"-", "/", "{", ",", "%", "}", "~", ":", "?", "?", // 20-29
|
||||
"?", "?", "[", "#", "@", "\n","\"","`", "?", "?", // 30-39
|
||||
"?", "A", "B", "C", "D", "E", "F", "G", "H", "I", // 40-49
|
||||
"?", "J", "K", "L", "M", "N", "O", "P", "Q", "R", // 50-59
|
||||
"?", "?", "S", "T", "U", "V", "W", "X", "Y", "Z", // 60-69
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 70-79
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", // 80-89
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?"]; // 90-99
|
||||
|
||||
/***************************************
|
||||
* Opcode table:
|
||||
@@ -302,6 +302,7 @@ window.addEventListener("load", function() {
|
||||
var pseudoFBGR = -6;
|
||||
var pseudoFINI = -9;
|
||||
|
||||
// Table of the primary field (sL code) for each opTab table field type code.
|
||||
var fieldTab = [-1,
|
||||
4, 33, 44, 11, 41, 22, 22, 32, 42, 21, 62, 64, 11, 41, 41, 31, 41, 33, 4, 4];
|
||||
|
||||
@@ -633,11 +634,11 @@ window.addEventListener("load", function() {
|
||||
}
|
||||
|
||||
w = ((((200 +
|
||||
xlateANSI220[line.charAt(1)])*100 +
|
||||
xlateANSI220[line.charAt(2)])*100 +
|
||||
xlateANSI220[line.charAt(3)])*100 +
|
||||
xlateANSI220[line.charAt(4)])*100 +
|
||||
xlateANSI220[line.charAt(5)];
|
||||
xlateANSI220[line.charCodeAt(1)])*100 +
|
||||
xlateANSI220[line.charCodeAt(2)])*100 +
|
||||
xlateANSI220[line.charCodeAt(3)])*100 +
|
||||
xlateANSI220[line.charCodeAt(4)])*100 +
|
||||
xlateANSI220[line.charCodeAt(5)];
|
||||
} else {
|
||||
if (lineLength > 11) {
|
||||
printError("Input line too long: " + line);
|
||||
@@ -774,15 +775,16 @@ window.addEventListener("load", function() {
|
||||
function emitConstant(location, word, lab, sign, comment) {
|
||||
/* Emits one word as a CNST pseudo */
|
||||
var char = 0;
|
||||
var temp = word;
|
||||
var text = "";
|
||||
|
||||
if (sign != 2) {
|
||||
emitPseudo(location, word, lab, "CNST", 0, word.toString());
|
||||
} else {
|
||||
while (word >= 200) {
|
||||
char = word%100;
|
||||
while (temp > 2) {
|
||||
char = temp%100;
|
||||
text = xlate220ANSI[char] + text;
|
||||
word = (word-char)/100;
|
||||
temp = (temp-char)/100;
|
||||
}
|
||||
|
||||
emitPseudo(location, word, lab, "CNST", 0, "$" + text + "$");
|
||||
@@ -1319,6 +1321,7 @@ window.addEventListener("load", function() {
|
||||
printLine("");
|
||||
|
||||
errorCount = 0;
|
||||
lineNr = 0;
|
||||
location = 0;
|
||||
wordData.atEOF = false;
|
||||
wordData.serial = 0;
|
||||
@@ -1344,7 +1347,7 @@ window.addEventListener("load", function() {
|
||||
/* Determines the output mode. Opens the source deck window if
|
||||
needed and sets it up. Finally, calls disassembleFile() */
|
||||
var index = 0;
|
||||
var select = document.getElementById("OutputModeSelect");
|
||||
var select = $$("OutputModeSelect");
|
||||
var title = "220 BAC-Disassembler Source Deck";
|
||||
|
||||
function configureDeck(ev) {
|
||||
|
||||
@@ -58,22 +58,23 @@ B220PaperTapePunch.codeXlate = [ // translate internal B220 code to ANSI
|
||||
// so B220 carriage-return (16) translates to "|". To avoid space-expansion
|
||||
// of tabs (26), they are translated to "~". The 02 "blank" code is "_".
|
||||
// Form-feed (15) translates to "^".
|
||||
" ", "?", "_", ".", "\u00A4", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 00-0F
|
||||
"&", "?", "?", "$", "*", "^", "|", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 10-1F
|
||||
"-", "/", "?", ",", "%", "?", "~", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 20-2F
|
||||
"?", "?", "?", "#", "@", "\\", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 30-3F
|
||||
"?", "A", "B", "C", "D", "E", "F", "G", "H", "I", "!", "!", "!", "!", "!", "!", // 40-4F
|
||||
"?", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "!", "!", "!", "!", "!", "!", // 50-5F
|
||||
"?", "?", "S", "T", "U", "V", "W", "X", "Y", "Z", "!", "!", "!", "!", "!", "!", // 60-6F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 70-7F
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "!", "!", "!", "!", "!", // 80-8F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 90-9F
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // A0-AF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // B0-BF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // C0-CF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // D0-DF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // E0-EF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!"]; // F0-FF
|
||||
// 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
||||
" ", "?", "_", ".", "<", ">", "\\","?", "?", "?", "!", "!", "!", "!", "!", "!", // 00-0F
|
||||
"&", "?", "]", "$", "*", "^", "|", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 10-1F
|
||||
"-", "/", "{", ",", "%", "}", "~", ":", "?", "?", "!", "!", "!", "!", "!", "!", // 20-2F
|
||||
"?", "?", "[", "#", "@", "\n","\"","`", "?", "?", "!", "!", "!", "!", "!", "!", // 30-3F
|
||||
"?", "A", "B", "C", "D", "E", "F", "G", "H", "I", "!", "!", "!", "!", "!", "!", // 40-4F
|
||||
"?", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "!", "!", "!", "!", "!", "!", // 50-5F
|
||||
"?", "?", "S", "T", "U", "V", "W", "X", "Y", "Z", "!", "!", "!", "!", "!", "!", // 60-6F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 70-7F
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "!", "!", "!", "!", "!", // 80-8F
|
||||
"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "!", "!", "!", "!", "!", "!", // 90-9F
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // A0-AF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // B0-BF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // C0-CF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // D0-DF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", // E0-EF
|
||||
"!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!", "!"]; // F0-FF
|
||||
|
||||
|
||||
/**************************************/
|
||||
|
||||
@@ -35,6 +35,7 @@ function B220PaperTapeReader(mnemonic, unitIndex, config) {
|
||||
this.boundReadTapeChar = B220PaperTapeReader.prototype.readTapeChar.bind(this);
|
||||
|
||||
this.readResult = { // object passed back to Processor for each read
|
||||
error: false, // ANSI character read from tape
|
||||
code: 0, // 220 char code sent to processor
|
||||
signDigit: 0, // copy of first digit read for word
|
||||
frameCount: 0, // count of tape frames read for word
|
||||
@@ -71,14 +72,14 @@ B220PaperTapeReader.idleTime = 50; // idle time before reader requires star
|
||||
// "^" translates to form-feed (15).
|
||||
B220PaperTapeReader.xlate220 = [
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x26, 0x16, 0x17, 0x15, 0x16, 0x17, 0x17, // 00-0F
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x26, 0x35, 0x17, 0x15, 0x16, 0x17, 0x17, // 00-0F
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // 10-1F
|
||||
0x00, 0x17, 0x17, 0x33, 0x13, 0x24, 0x10, 0x34, 0x24, 0x04, 0x14, 0x10, 0x23, 0x20, 0x03, 0x21, // 20-2F
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x17, 0x13, 0x04, 0x33, 0x17, 0x17, // 30-3F
|
||||
0x00, 0x17, 0x36, 0x33, 0x13, 0x24, 0x10, 0x34, 0x24, 0x04, 0x14, 0x10, 0x23, 0x20, 0x03, 0x21, // 20-2F
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x27, 0x13, 0x04, 0x33, 0x05, 0x17, // 30-3F
|
||||
0x34, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, // 40-4F
|
||||
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x17, 0x17, 0x17, 0x15, 0x02, // 50-5F
|
||||
0x17, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, // 60-6F
|
||||
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x17, 0x16, 0x17, 0x26, 0x17, // 70-7F
|
||||
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x32, 0x06, 0x12, 0x15, 0x02, // 50-5F
|
||||
0x37, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, // 60-6F
|
||||
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x22, 0x16, 0x25, 0x26, 0x17, // 70-7F
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // 80-8F
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // 90-9F
|
||||
0x17, 0x17, 0x17, 0x17, 0x04, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // A0-AF
|
||||
@@ -305,6 +306,7 @@ B220PaperTapeReader.prototype.initiateInput = function initiateInput(successor)
|
||||
the processor and gets the ball rolling */
|
||||
var stamp = performance.now();
|
||||
|
||||
this.readResult.error = false;
|
||||
this.readResult.code = 0;
|
||||
this.readResult.signDigit = 0;
|
||||
this.readResult.frameCount = 0;
|
||||
@@ -326,6 +328,12 @@ B220PaperTapeReader.prototype.sendTapeChar = function sendTapeChar(c, code, rece
|
||||
var text = this.tapeView.value;
|
||||
|
||||
this.readResult.code = code;
|
||||
if (code == 0x17) { // if it's the error code
|
||||
if (c != 0x3F) { // if it's not a literal "?" character
|
||||
this.readResult.error = true;
|
||||
}
|
||||
}
|
||||
|
||||
++this.readResult.frameCount;
|
||||
if (this.readResult.frameCount == 1) {
|
||||
this.readResult.signDigit = code;
|
||||
|
||||
Reference in New Issue
Block a user