Updated Computer constants
This commit is contained in:
parent
46195474a6
commit
5cb676e501
73 changed files with 139 additions and 80 deletions
|
|
@ -1013,6 +1013,12 @@
|
|||
<xsl:template match="computer[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:param name="machineState" select="''"/>
|
||||
<xsl:variable name="autoPower">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@autopower"><xsl:value-of select="@autopower"/></xsl:when>
|
||||
<xsl:otherwise>true</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="busWidth">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@buswidth"><xsl:value-of select="@buswidth"/></xsl:when>
|
||||
|
|
@ -1035,7 +1041,7 @@
|
|||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">computer</xsl:with-param>
|
||||
<xsl:with-param name="parms">,busWidth:<xsl:value-of select="$busWidth"/>,resume:<xsl:value-of select="$resume"/>,state:'<xsl:value-of select="$state"/>'</xsl:with-param>
|
||||
<xsl:with-param name="parms">,autoPower:<xsl:value-of select="$autoPower"/>,busWidth:<xsl:value-of select="$busWidth"/>,resume:<xsl:value-of select="$resume"/>,state:'<xsl:value-of select="$state"/>'</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -65,10 +65,22 @@ documentation for the 80386 and 80486.
|
|||
|
||||
### Timing
|
||||
|
||||
Operands | **x** | **88** | **86** | **286** | **386** | **486**
|
||||
---------- | :---: | :----: | :----: | :-----: | :-----: | :-----:
|
||||
none | 0 | 8 | 8 | 3 | 4 | 3
|
||||
Operands | **x** | **8088** | **8086** | **80286** | **80386** | **80486**
|
||||
---------- | :---: | :------: | :------: | :-------: | :-------: | :-------:
|
||||
none | 0 | 8 | 8 | 3 | 4 | 3
|
||||
|
||||
(x is the number of memory transfers)
|
||||
|
||||
---
|
||||
|
||||
Source: PC Magazine "Programmer's Technical Reference: The Processor and Coprocessor," by Robert L. Hummel.
|
||||
|
||||
---
|
||||
|
||||
### PCjs Code
|
||||
|
||||
{% highlight javascript linenos %}
|
||||
|
||||
{% include_relative pcjs/opAAA.js %}
|
||||
|
||||
{% endhighlight %}
|
||||
|
|
|
|||
26
docs/x86/ops/pcjs/opAAA.js
Normal file
26
docs/x86/ops/pcjs/opAAA.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* op=0x37 (AAA)
|
||||
*
|
||||
* @this {X86CPU}
|
||||
*/
|
||||
X86.opAAA = function()
|
||||
{
|
||||
var CF, AF;
|
||||
var AL = this.regEAX & 0xff;
|
||||
var AH = (this.regEAX >> 8) & 0xff;
|
||||
if ((AL & 0xf) > 9 || this.getAF()) {
|
||||
AL += 6;
|
||||
/*
|
||||
* Simulate the fact that the 80286 and higher add 6 to AX rather than AL.
|
||||
*/
|
||||
if (this.model >= X86.MODEL_80286 && AL > 0xff) AH++;
|
||||
AH++;
|
||||
CF = AF = 1;
|
||||
} else {
|
||||
CF = AF = 0;
|
||||
}
|
||||
this.regEAX = (this.regEAX & ~0xffff) | (((AH << 8) | AL) & 0xff0f);
|
||||
if (CF) this.setCF(); else this.clearCF();
|
||||
if (AF) this.setAF(); else this.clearAF();
|
||||
this.nStepCycles -= this.cycleCounts.nOpCyclesAAA;
|
||||
};
|
||||
Loading…
Reference in a new issue