DOCERR: MASM 6.0 Programmer's Guide Errors: Chapters 7-10Last reviewed: November 3, 1994Article ID: Q74173 |
The information in this article applies to:
The following is a list of documentation additions and corrections for Chapters 7 through 10 of the "Microsoft Macro Assembler Programmer's Guide" for version 6.0. The section and page numbers are listed first, followed by a description of the addition or correction.
Section 7.1.2.3, Page 174The note in the margin states:
"pairs of operands cannot be both registers or both memory locations."This is incorrect. The TEST instruction is able to take two registers as operands.
Section 7.2.1, Page 178The summary of the action for the ".REPEAT,.UNTILCXZ" directive is incorrect. It specifies this directive will compare a label to an expression. However, this is not the case. The correct description is as follows:
The .UNTILCXZ directive can be used with expression1 == expression2 or expression1 != expression2 to generate a LOOPE or LOOPNE instruction. The .UNTILCXZ directive also decrements CX and exits the loop if CX = 0. If <condition> is omitted, the .UNTILCXZ directive generates a LOOP instruction. Section 7.2.1, Page 182Line number eight of the sample program is incorrect. It should be:
.CONTINUE .IF (al < '0') || (al > '9') Section 7.3.3.2, Page 191The syntax description for parameters has a "single" closing square bracket rather than a "double" closing square bracket. It must have a "double" closing square bracket.
Section 7.3.3.2, Page 192The last sentence of the third paragraph should end with the following:
"...--the first MOV gets the address of the parameter, and the second MOV gets the parameter." Section 7.3.4, Page 195The fourth portion of the diagram in this page does not show where SP is located. This is misleading. SP should be shown at the same location as BP-2.
Section 7.3.8.2, Page 206The first sentence on this page is incorrect. It should read:
"Therefore parmbytes is not always equal to the bytes occupied by the parameters." Section 8.2.1, Page 217Midway through the second paragraph the sentence should read:
Multiple /I options can be used to specify that multiple *directories* be searched in the order they appear on the command line. Section 8.2.2.1, Page 219In figure 8.1, there are three files and MOD2.ASM contains the following line:
mov ax, array[12]This line should be changed to:
mov al, array[12]Also, the last sentence in this section states:
You can also use EXTERNDEF to make code labels global.This means EXTERNDEF can make code labels global between files so that another module can access that label. However, the code label must have global scope within the file where it is defined. For example:
File 1
EXTERNDEF codelabel:near .model small .code firstproc proc codelabel:: mov ax,1 firstproc endp File 2
EXTERNDEF codelabel:near .model small .code secondproc proc jmp codelabel secondproc endpIn the first file, it is important that the label codelabel is defined with two colons (::). With the OPTION SCOPED turned on by default, the double colon allows the variable to be seen globally in the first file. The EXTERNDEF statement makes codelabel public so that it can be seen by file 2.
Section 8.3.1, Page 224In figure 8.3, the file MOD2.ASM should read:
.model small, pascal EXTERN Var:BYTE, BuildTable:NEAR .code . . . mov al,Var call BuildTable . . . Section 8.4.2, Page 226Change the example line of code from
EXTERN init(dummy)to the following:
EXTERN init(dummy):PROC Section 9.3.2, Page 239Page 239 states that the following line should work:
work MACRO arg:=%07hThis is incorrect. The line above will produce a syntax error when trying to assemble. It was not implemented in MASM 6.0.
Section 9.4.3, Page 245In the sample at the bottom of page 245, the following line should be change from
FOR arg, arglistto the following:
%FOR arg, arglist Section 9.5, Page 249The first sentence on this page should read:
The string in the SUBSTR syntax, as well as in the syntax for the other string directives and predefined functions, can be any textItem where textItem can be text enclosed in angle brackets (<>), the name of a text macro, or a constant expression preceded by a percent sign (%) such as %constExpr or %(constExpr). Section 9.5, Page 249The first paragraph in the description for SIZESTR states:
Although the length is always a positive number, it is assigned as a string of digits in the current radix rather than as a numeric value.The above statement is incorrect. The SIZESTR directive assigns a number to a variable like a numeric equate. For example
stringsize SIZESTR <hello>makes stringsize a numeric equate, setting it equal to 5.
Section 9.5, Page 250Change the following
RestoreRegs MACRO LOCAL regs %FOR reg,regpushed pop reg ENDM ENDMto the following:
RestoreRegs MACRO LOCAL regs %FOR regs,regpushed ; reg s/b regs... pop regs ; " " " " ENDM ENDM Section 9.7.2, Page 257The Macro Assembler 6.0 README.DOC has the following correction for the table on the top of page 257:
Option Description ------ ----------- ASSUMES Saves segment register information LISTING Saves listing and CREF information CPU Saves current CPU and processor RADIX Saves current default radix ALL All of the above Section 10.3.1.5, Page 268The following is the example shown in section 10.3.1.5:
project.exe:*.obj LINK $*.obj;The documentation states that this description block links all files having the .OBJ extension in the current directory. This should be written as:
project.exe:*.obj LINK $**; Section A.1.4, Page 555The list of new directives at the bottom of this page is missing the directive .ENDIF.
Section A.2.3, Page 583There is a comma missing from the encoding example at the bottom of the page. The line should be:
"MASM 6.0 uses this encoding instead: rm16/32,imm8." |
Additional reference words: 6.00 6.00a 6.00b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |