|
The Art of Assembly Language Programming
2010/5/3:
In section 12.14, Calling Base Class Methods, AoA2e (AoA 2nd edition) states that HLA does not let you directly call methods and you must use an indirect call through the virtual method table in order to call the parent class' version of some method. As of HLA v2.8, this is no longer necessary. HLA v2.8 (and later) supports a special "super" reserved word that you can use to directly call the parent's version of some method within a child class' method. You would use the "super" keyword in a similar manner to "this", e.g.,
type
parentClass: class
.
.
.
method m(i:int32);
.
.
.
endclass;
childClass: class inherits( parentClass );
.
.
.
override method m;
.
.
.
endclass;
.
.
.
method childClass.m(i:int32);
begin m;
.
.
.
// Call parent class' version of m:
super.m( i );
.
.
.
end m;
Note that you get to use the high-level calling syntax when using the super keyword.
Of course, the calling sequence that AoA2e section 12.14 describes is still valid and useful for certain tasks. The new "super" keyword, however, is better suited for the common case of calling a parent's version of the method, however.
2010/05/10:
Page 364
Section 6.1.5
test(1, al); example: "...if bit 1 of AL contains 0, "
Should be "...if bit 0 of AL contains 0, "
2021/01/22
Table 6.11 is incorrect in the second edition. Table 6.10 was inadvertently copied for both 6.10 and 6.11. Here's the correction:
Table 6.10: FPU Condition Code Bits
Instruction
|
Condition Code Bits
|
Condition
|
|
C3
|
C2
|
C1
|
C0
|
|
fcom,
fcomp,
fcompp,
ficom,
ficomp
|
0
0
1
1
|
0
0
0
1
|
X
X
X
X
|
0
1
0
1
|
ST > source
ST < source
ST = source
ST or source undefined
|
ftst
|
0
0
1
1
|
0
0
0
1
|
X
X
X
X
|
0
1
0
1
|
ST is positive
ST is negative
ST is zero (+ or -)
ST is uncomparable
|
fxam
|
0
0
0
0
1
1
1
1
0
0
0
0
1
|
0
0
1
1
0
0
1
1
0
0
1
1
X
|
0
1
0
1
0
1
0
1
0
1
0
1
X
|
0
0
0
0
0
0
0
1
1
1
1
1
|
+ Unnormalized
-Unnormalized
+Normalized
-Normalized
+0
-0
+Denormalized
-Denormalized
+NaN
-NaN
+Infinity
-Infinity
Empty register
|
fucom,
fucomp,
fucompp
|
0
0
1
1
|
0
0
0
1
|
X
X
X
X
|
0
1
0
1
|
ST > source
ST < source
ST = source
Unordered
|
|
X = Don’t care
|
|
Table 6.11: Condition Code Interpretations
Instruction(s)
|
Condition Code Bits
|
|
C0
|
C3
|
C2
|
C1
|
fcom, fcomp, fcmpp, ftst,
fucom, fucomp, fucompp, ficom, ficomp
|
Result of comparison. See previous table.
|
Result of comparison. See previous table.
|
Operands are not comparable
|
Result of comparison. See previous table.
Also denotes stack
overflow/underflow if stack exception bit is set.
|
fxam
|
See previous table.
|
See previous table.
|
See previous table.
|
Sign of result, or stack
overflow/underflow (if stack exception bit is set).
|
fprem, fprem1
|
Bit 2 of remainder
|
Bit 0 of remainder
|
0- reduction done.
1- reduction incomplete.
|
Bit 1 of remainder or stack
overflow/underflow (if stack exception bit is set).
|
fist, fbstp, frndint, fst, fstp, fadd, fmul, fdiv, fdivr,
fsub, fsubr, fscale, fsqrt, fpatan, f2xm1, fyl2x, fyl2xp1
|
Undefined
|
Undefined
|
Undefined
|
Round up occurred or stack
overflow/underflow (if stack exception bit is set).
|
fptan, fsin, fcos, fsincos
|
Undefined
|
Undefined
|
0- reduction done.
1- reduction incomplete.
|
Round up occurred or stack
overflow/underflow (if stack exception bit is set).
|
fchs, fabs, fxch, fincstp, fdecstp, constant loads, fxtract, fld, fild, fbld,
fstp (80 bit)
|
Undefined
|
Undefined
|
Undefined
|
Zero result or stack
overflow/underflow (if stack exception bit is set).
|
fldenv, fstor
|
Restored from memory
operand.
|
Restored from memory
operand.
|
Restored from memory
operand.
|
Restored from memory operand.
|
fldcw, fstenv, fstcw, fstsw, fclex
|
Undefined
|
Undefined
|
Undefined
|
Undefined
|
finit, fsave
|
Cleared to zero.
|
Cleared to zero.
|
Cleared to zero.
|
Cleared to zero.
|
|
|