Fixed inspections

This commit is contained in:
Jeff Parsons 2015-12-15 11:09:21 -08:00
commit 6360fda120
7 changed files with 1042 additions and 27 deletions

View file

@ -7,8 +7,8 @@ description: >
Classic computer simulations in JavaScript. Classic computer simulations in JavaScript.
Includes an archive of historical PC software and publications. Includes an archive of historical PC software and publications.
Additional computer simulations in JavaScript include the 6502-based Ohio Scientifc Challenger 1P. Additional computer simulations in JavaScript include the 6502-based Ohio Scientifc Challenger 1P.
baseurl: "" # "/pcjs" when using http://jeffpar.github.io or "" when using http://pcjs.org baseurl: "" # "/pcjs" when using http://jeffpar.github.io or "" when using http://www.pcjs.org
url: "http://www.pcjs.org" # "http://jeffpar.github.io" or "http://pcjs.org" url: "http://www.pcjs.org" # "http://jeffpar.github.io" or "http://www.pcjs.org"
twitter_username: jeffpar twitter_username: jeffpar
github_username: jeffpar github_username: jeffpar
@ -24,9 +24,9 @@ kramdown:
pcjs: pcjs:
domain: pcjs.org # whereas site.url is used for linking purposes, site.pcjs.domain is used for display purposes domain: pcjs.org # whereas site.url is used for linking purposes, site.pcjs.domain is used for display purposes
version: 1.20.2 # IMPORTANT: Keep pcjs.version in sync with package.json:version version: 1.20.2 # IMPORTANT: keep pcjs.version in sync with package.json:version
compiled: true # By default, the compiled pcjs.version scripts will be used (eg, pc.js or pc-dbg.js) compiled: true # by default, the compiled pcjs.version scripts will be used (eg, pc.js or pc-dbg.js)
pc_scripts: # If pcjs.compiled is false, the following scripts will be included instead, in the order listed pc_scripts: # if pcjs.compiled is false, the following scripts will be included instead, in the order listed
- /modules/shared/lib/defines.js - /modules/shared/lib/defines.js
- /modules/shared/lib/diskapi.js - /modules/shared/lib/diskapi.js
- /modules/shared/lib/dumpapi.js - /modules/shared/lib/dumpapi.js

View file

@ -779,6 +779,15 @@ MarkOut.prototype.convertMDLines = function(s)
*/ */
MarkOut.prototype.convertMDLinks = function(sBlock) MarkOut.prototype.convertMDLinks = function(sBlock)
{ {
/*
* Before we start replacing Markdown links, see if there are any Liquid-style replacements
* (in case this Markdown file is part of a Jekyll installation) and remove them.
*
* TODO: These replacements should use appropriate values from _config.yml; however, unless/until
* we start using Node again to host the public site, that's low priority.
*/
sBlock = sBlock.replace(/\{([\{%]).*?\1}/, "");
var aMatch; var aMatch;
var re = /\[([^\[\]]*)]\((.*?)(?:\s*"(.*?)"\)|\))/g; var re = /\[([^\[\]]*)]\((.*?)(?:\s*"(.*?)"\)|\))/g;
while ((aMatch = re.exec(sBlock))) { while ((aMatch = re.exec(sBlock))) {

View file

@ -37,7 +37,6 @@ if (NODE) {
var web = require("../../shared/lib/weblib"); var web = require("../../shared/lib/weblib");
var Component = require("../../shared/lib/component"); var Component = require("../../shared/lib/component");
var Messages = require("./messages"); var Messages = require("./messages");
var Bus = require("./bus");
var Memory = require("./memory"); var Memory = require("./memory");
var State = require("./state"); var State = require("./state");
var CPU = require("./cpu"); var CPU = require("./cpu");
@ -1301,7 +1300,7 @@ X86CPU.prototype.zeroSeg = function(seg)
* *
* @this {X86CPU} * @this {X86CPU}
* @param {number} size (2 for 2-byte/16-bit operands, or 4 for 4-byte/32-bit operands) * @param {number} size (2 for 2-byte/16-bit operands, or 4 for 4-byte/32-bit operands)
*/ *
X86CPU.prototype.setAddrSize = function(size) X86CPU.prototype.setAddrSize = function(size)
{ {
if (this.sizeAddr != size) { if (this.sizeAddr != size) {
@ -1311,6 +1310,7 @@ X86CPU.prototype.setAddrSize = function(size)
this.updateAddrSize(); this.updateAddrSize();
} }
}; };
*/
/** /**
* updateAddrSize() * updateAddrSize()
@ -3643,7 +3643,7 @@ X86CPU.prototype.getIPShort = function()
* *
* @this {X86CPU} * @this {X86CPU}
* @return {number} long at the current IP; IP advanced by 4 * @return {number} long at the current IP; IP advanced by 4
*/ *
X86CPU.prototype.getIPLong = function() X86CPU.prototype.getIPLong = function()
{ {
var l = (PREFETCH? this.getLongPrefetch() : this.getLong(this.regLIP)); var l = (PREFETCH? this.getLongPrefetch() : this.getLong(this.regLIP));
@ -3656,6 +3656,7 @@ X86CPU.prototype.getIPLong = function()
this.advanceIP(4); this.advanceIP(4);
return l; return l;
}; };
*/
/** /**
* getIPAddr() * getIPAddr()

View file

@ -41,7 +41,6 @@ if (NODE) {
var Component = require("../../shared/lib/component"); var Component = require("../../shared/lib/component");
var State = require("./state"); var State = require("./state");
var X86 = require("./x86"); var X86 = require("./x86");
var X86Seg = require("./x86seg");
} }
/* /*
@ -283,7 +282,6 @@ X86FPU.prototype.restore = function(data)
X86FPU.prototype.resetFPU = function() X86FPU.prototype.resetFPU = function()
{ {
this.regUsed = 0; // bits 0-7 are set as regs 0-7 are used this.regUsed = 0; // bits 0-7 are set as regs 0-7 are used
this.regTags = 0xffff; // this is updated only as needed by getTags()
this.regControl = X86.FPU.CONTROL.INIT; this.regControl = X86.FPU.CONTROL.INIT;
this.regStatus = 0; // contains all status register bits EXCEPT for ST this.regStatus = 0; // contains all status register bits EXCEPT for ST
this.iST = 0; // the ST bits for regStatus are actually stored here this.iST = 0; // the ST bits for regStatus are actually stored here
@ -344,7 +342,7 @@ X86FPU.prototype.isAtLeastModel = function(model)
* @param {number} min (inclusive) * @param {number} min (inclusive)
* @param {number} max (inclusive) * @param {number} max (inclusive)
* @return {number} * @return {number}
*/ *
X86FPU.prototype.getRandomInt = function(min, max) X86FPU.prototype.getRandomInt = function(min, max)
{ {
max -= min; max -= min;
@ -354,6 +352,7 @@ X86FPU.prototype.getRandomInt = function(min, max)
} }
return Math.floor(Math.random() * (max + 1)) + min; return Math.floor(Math.random() * (max + 1)) + min;
}; };
*/
/** /**
* opStop(fError) * opStop(fError)

View file

@ -2200,7 +2200,6 @@ X86.fnPUSHw = function(dst, src)
X86.fnRCLb = function(dst, src) X86.fnRCLb = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = this.getCarry(); var carry = this.getCarry();
@ -2227,7 +2226,6 @@ X86.fnRCLb = function(dst, src)
X86.fnRCLw = function(dst, src) X86.fnRCLw = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = this.getCarry(); var carry = this.getCarry();
@ -2254,7 +2252,6 @@ X86.fnRCLw = function(dst, src)
X86.fnRCLd = function(dst, src) X86.fnRCLd = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; // this 32-bit-only function could mask with 0x1f directly var count = src & this.nShiftCountMask; // this 32-bit-only function could mask with 0x1f directly
if (count) { if (count) {
var carry = this.getCarry(); var carry = this.getCarry();
@ -2281,7 +2278,6 @@ X86.fnRCLd = function(dst, src)
X86.fnRCRb = function(dst, src) X86.fnRCRb = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = this.getCarry(); var carry = this.getCarry();
@ -2308,7 +2304,6 @@ X86.fnRCRb = function(dst, src)
X86.fnRCRw = function(dst, src) X86.fnRCRw = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = this.getCarry(); var carry = this.getCarry();
@ -2335,7 +2330,6 @@ X86.fnRCRw = function(dst, src)
X86.fnRCRd = function(dst, src) X86.fnRCRd = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; // this 32-bit-only function could mask with 0x1f directly var count = src & this.nShiftCountMask; // this 32-bit-only function could mask with 0x1f directly
if (count) { if (count) {
var carry = this.getCarry(); var carry = this.getCarry();
@ -2416,7 +2410,6 @@ X86.fnRETF = function(n)
X86.fnROLb = function(dst, src) X86.fnROLb = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry; var carry;
@ -2443,7 +2436,6 @@ X86.fnROLb = function(dst, src)
X86.fnROLw = function(dst, src) X86.fnROLw = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry; var carry;
@ -2470,7 +2462,6 @@ X86.fnROLw = function(dst, src)
X86.fnROLd = function(dst, src) X86.fnROLd = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = dst << (count - 1); var carry = dst << (count - 1);
@ -2491,7 +2482,6 @@ X86.fnROLd = function(dst, src)
X86.fnRORb = function(dst, src) X86.fnRORb = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry; var carry;
@ -2518,7 +2508,6 @@ X86.fnRORb = function(dst, src)
X86.fnRORw = function(dst, src) X86.fnRORw = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry; var carry;
@ -2545,7 +2534,6 @@ X86.fnRORw = function(dst, src)
X86.fnRORd = function(dst, src) X86.fnRORd = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = dst << (32 - count); var carry = dst << (32 - count);
@ -2974,7 +2962,6 @@ X86.fnSGDT = function(dst, src)
X86.fnSHLb = function(dst, src) X86.fnSHLb = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = 0; var carry = 0;
@ -3000,7 +2987,6 @@ X86.fnSHLb = function(dst, src)
X86.fnSHLw = function(dst, src) X86.fnSHLw = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; var count = src & this.nShiftCountMask;
if (count) { if (count) {
var carry = 0; var carry = 0;
@ -3026,7 +3012,6 @@ X86.fnSHLw = function(dst, src)
X86.fnSHLd = function(dst, src) X86.fnSHLd = function(dst, src)
{ {
var result = dst; var result = dst;
var flagsIn = (DEBUG? this.getPS() : 0);
var count = src & this.nShiftCountMask; // this 32-bit-only function could mask with 0x1f directly var count = src & this.nShiftCountMask; // this 32-bit-only function could mask with 0x1f directly
if (count) { if (count) {
var carry = dst << (count - 1); var carry = dst << (count - 1);

View file

@ -34,7 +34,6 @@
if (NODE) { if (NODE) {
var str = require("../../shared/lib/strlib"); var str = require("../../shared/lib/strlib");
var Component = require("../../shared/lib/component");
var Messages = require("./messages"); var Messages = require("./messages");
var X86 = require("./x86"); var X86 = require("./x86");
} }

1022
tests/pc/80386/test386.json Normal file

File diff suppressed because it is too large Load diff