Added support for parsing of values (ie, integers) greater than 32 bits, and fixed PDP-10 Bus writes (parameter order differs from other emulators)

This commit is contained in:
Jeff Parsons 2017-02-24 13:07:38 -08:00 committed by Jeff Parsons
commit ef70ed74b3
11 changed files with 66 additions and 39 deletions

View file

@ -478,7 +478,7 @@ class BusPDP10 extends Component {
*
* @this {BusPDP10}
* @param {number} addr is a physical address
* @return {number} word (16-bit) value at that address
* @return {number} word (36-bit) value at that address
*/
getWord(addr)
{
@ -492,13 +492,13 @@ class BusPDP10 extends Component {
*
* @this {BusPDP10}
* @param {number} addr is a physical address
* @param {number} w is the word (16-bit) value to write
* @param {number} w is the word (36-bit) value to write
*/
setWord(addr, w)
{
var off = addr & this.nBlockLimit;
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
this.aBusBlocks[iBlock].writeWord(off, w, addr);
this.aBusBlocks[iBlock].writeWord(w, off, addr);
}
/**
@ -520,7 +520,7 @@ class BusPDP10 extends Component {
*
* @this {BusPDP10}
* @param {number} addr is a physical address
* @return {number} word (16-bit) value at that address
* @return {number} word (36-bit) value at that address
*/
getWordDirect(addr)
{
@ -540,14 +540,14 @@ class BusPDP10 extends Component {
*
* @this {BusPDP10}
* @param {number} addr is a physical address
* @param {number} w is the word (16-bit) value to write (we truncate it to 16 bits to be safe)
* @param {number} w is the word (36-bit) value to write (we truncate it to 16 bits to be safe)
*/
setWordDirect(addr, w)
{
var off = addr & this.nBlockLimit;
var block = this.getBlockDirect(addr);
this.nDisableFaults++;
block.writeWordDirect(off, w & 0xffff, addr);
block.writeWordDirect(w, off, addr);
this.nDisableFaults--;
}

View file

@ -2487,7 +2487,7 @@ class DebuggerPDP10 extends Debugger {
sData += ' ';
}
for (var i = 0; size == 1 && i < 6; i++) {
var c = ((w % 64)|0) + 33;
var c = ((w % 64)|0) + 32;
sChars += String.fromCharCode(c);
w /= 64;
}

View file

@ -216,7 +216,7 @@ class MemoryPDP10 {
*/
if (len === undefined) len = this.size;
Component.assert(off >= 0 && off < this.size);
for (i = off; len-- && i < this.size; i++) this.writeWordDirect(off, pattern, this.addr + off);
for (i = off; len-- && i < this.size; i++) this.writeWordDirect(pattern, off, this.addr + off);
}
/**