Perform the documented encoding of SIXBIT character data for MACRO-10

This commit is contained in:
Jeff 2017-03-12 11:56:15 -07:00 committed by Jeff Parsons
commit 9ac0ffe679
11 changed files with 20 additions and 12 deletions

View file

@ -1103,7 +1103,7 @@ class Bus extends Component {
* [iBlock0, [dw0, dw1, ...], iBlock1, [dw0, dw1, ...], ...]
*
* In a normal 4Kb block, there will be 1K DWORD values in the data array. Remember that each DWORD is a signed 32-bit
* integer (because they are formed using bit-wise operator rather than floating-point math operators), so don't be
* integer (because they are formed using bitwise operator rather than floating-point math operators), so don't be
* surprised to see negative numbers in the data.
*
* The above example assumes "uncompressed" data arrays. If we choose to use "compressed" data arrays, the data arrays

View file

@ -1530,7 +1530,7 @@ class X86FPU extends Component {
* might exist. That test code can be resurrected from the repo; this code is being retained for future tests.
*
* NOTE: If either min or max is a value containing 32 or more significant bits AND bit 31 is set AND it has passed
* through some bit-wise operation(s), then that value may end up being negative, so you may end up with an inverted
* through some bitwise operation(s), then that value may end up being negative, so you may end up with an inverted
* range, or a range that's smaller or larger than intended.
*
* @this {X86FPU}

View file

@ -678,7 +678,7 @@ X86.fnDIVw = function(dst, src)
* Detect too-small divisor (quotient overflow)
*
* WARNING: We CANNOT simply do "src = (this.regEDX << 16) | this.regEAX", because if bit 15 of DX
* is set, JavaScript will create a negative 32-bit number. So we instead use non-bit-wise operators
* is set, JavaScript will create a negative 32-bit number. So we instead use non-bitwise operators
* to force JavaScript to create a floating-point value that won't suffer from 32-bit-math side-effects.
*/
src = (this.regEDX & 0xffff) * 0x10000 + (this.regEAX & 0xffff);