First batch of pdp11.js code adapted but totally untested
This commit is contained in:
parent
475b08fa91
commit
100779e30a
22 changed files with 2697 additions and 1273 deletions
|
|
@ -939,6 +939,17 @@ CPU.prototype.calcRemainingTime = function()
|
|||
return msRemainsThisRun;
|
||||
};
|
||||
|
||||
/**
|
||||
* endBurst()
|
||||
*
|
||||
* @this {CPU}
|
||||
*/
|
||||
CPU.prototype.endBurst = function()
|
||||
{
|
||||
this.nBurstCycles -= this.nStepCycles;
|
||||
this.nStepCycles = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* runCPU(fUpdateFocus)
|
||||
*
|
||||
|
|
@ -1089,8 +1100,7 @@ CPU.prototype.stepCPU = function(nMinCycles)
|
|||
CPU.prototype.stopCPU = function(fComplete)
|
||||
{
|
||||
this.isBusy(true);
|
||||
this.nBurstCycles -= this.nStepCycles;
|
||||
this.nStepCycles = 0;
|
||||
this.endBurst();
|
||||
this.addCycles(this.nRunCycles);
|
||||
this.nRunCycles = 0;
|
||||
if (this.flags.fRunning) {
|
||||
|
|
@ -1131,9 +1141,8 @@ CPU.prototype.updateCPU = function(fForce)
|
|||
*/
|
||||
CPU.prototype.yieldCPU = function()
|
||||
{
|
||||
this.endBurst(); // this will break us out of stepCPU()
|
||||
this.aCounts.nCyclesNextYield = 0; // this will break us out of runCPU(), once we break out of stepCPU()
|
||||
this.nBurstCycles -= this.nStepCycles;
|
||||
this.nStepCycles = 0; // this will break us out of stepCPU()
|
||||
// if (DEBUG) this.nSnapCycles = this.nBurstCycles;
|
||||
/*
|
||||
* The Debugger calls yieldCPU() after every message() to ensure browser responsiveness, but it looks
|
||||
|
|
|
|||
Loading…
Reference in a new issue