LMAPGAPB

LMAPGAPB - 123 APPENDIX A \z...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 123 APPENDIX A \z "PGAPBW.DOC-1001" \z "PGAPBW.DOC-1002" \z "PGAPBW.DOC-1003" This appendix provides a complete description of symbols, operators, and directives for MASM 6.1. It uses the Backus-Naur Form (BNF) for grammar notation. You can use BNF grammar to determine the exact syntax for any language component and find all available options for any MASM command. BNF definitions consist of nonterminals and terminals. Nonterminals are placeholders within a BNF definition, defined elsewhere in the BNF grammar. Terminals are endpoints in a BNF definition, consisting of MASM 6.1 keywords. In this Appendix, all nonterminals appear in italics type and all terminals appear in bold type. BNF Conventions The conventions use different font attributes for different items in the BNF. The symbols and formats are as follows: Attribute Description nonterminal Italic type indicates nonterminals. RESERVED Terminals in boldface type are literal reserved words and symbols that must be entered as shown. Characters in this context are always case insensitive. [[ ]] Objects enclosed in double brackets ([[ ]]) are optional. The brackets do not actually appear in the source code. | A vertical bar indicates a choice between the items on each side of the bar. .8086 Underlined items indicate the default option if one is given. BNF Grammar Filename: d8fbcc4a2091a92a901e0dfc0bcb904f4fc2edcd.DOC Project: Template: Author: Last Saved By: Revision #: 0 Page: 123 of 32 Printed: Programmers Guide default typeface Characters in the set described or listed can be used as terminals in MASM statements. How to Use the BNF Grammar To illustrate the use of the BNF, Figure B.1 diagrams the definition of the TYPEDEF directive, starting with the nonterminal typedefDir . The entries under each horizontal brace in Figure B.1 are terminals (such as NEAR16 , NEAR32 , FAR16 , and FAR32 ) or nonterminals (such as qualifier , qualifiedType , distance , and protoSpec ) that can be further defined. Each italicized nonterminal in the typedefDir definition is also an entry in the BNF. Three vertical dots indicate a branching definition for a nonterminal that, for the sake of simplicity, this figure does not illustrate. \z "PGAPBW.DOC-1005" The BNF grammar allows recursive definitions. For example, the grammar uses qualifiedType as a possible definition for qualifiedType , which is also a component of the definition for qualifier . Figure B.1 BNF Definition of the TYPEDEF Directive Nonterminal Definition ;; endOfLine | comment =Dir id = immExpr ;; addOp + | - aExpr term Filename: d8fbcc4a2091a92a901e0dfc0bcb904f4fc2edcd.DOC Project: Template: Author: Last Saved By: Revision #: 0 Page: 124 of 32 Printed: Appendix B BNF Grammar 125 | aExpr && term Nonterminal Definition altId id arbitraryText charList asmInstruction mnemonic [[ exprList ]] assumeDir ASSUME assumeList ;; | ASSUME NOTHING ;; assumeList assumeRegister | assumeList , assumeRegister assumeReg register : assumeVal assumeRegister...
View Full Document

This note was uploaded on 01/24/2012 for the course EE 3751 taught by Professor Desouza during the Spring '04 term at LSU.

Page1 / 32

LMAPGAPB - 123 APPENDIX A \z...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online