
ARCHITECTURE AND INSTRUCTIONS
Labels in instruction statements are always optional; names in directive statements can be mandatory, optional, or prohibited, depend- ing on the particular directive.
Mnemonics in instruction statements specify the purpose of the statement. Directives, in directive statements, specify the purpose of the statement. The instruction mgemonics correspond to the set of approximately 100 opcodes available in the 8088. The directives correspond to the set of some 20 functions provided by the
The mnemonic or directive may require addi- tional information to define its purpose completely. This information is provided by' a sequence of arguments.
Optional comments make the program more readable; when present they must be pre- ceded by a semicolon.
Directive Statements
The various directive statements in
1)
2)
3)
4)
5)termination
The EQU statement provides a means for defining symbolic names to represent values or other symbolic names. The two forms of the EQU statement are illustrated:
name EQU expression
new name EQU old_name
Some examples are:
BOILING_POINT EQU 212
BUFFEFLSIZE EQU 32
NEW_PORT EQU PORT_VAL+1
COUNTEQU CS
The last example differs from the other three in that COUNT does not represent a value; it is a synonym for the ex register.
A symbolic name can be "undefined" by a PURGE statement so it may later represent something entirely different:
PURGE
are: (see below) | . |
In the example below, THING is a symbolic name associated with a byte in memory, BIGGER_THING with two consecutive bytes in memory, and BIGGEST_THING with four consecutive bytes in memory.
Initial Values
Before we can discuss the question marks (?), we need to introduce the concept of initial values of data items.
The object code produced by the assembler contains the l's and O's that make up each instructIon and the memory address at which each instruction should reside. Mter the object code is produced, the instructions are
THING | DB | ? | ;defines a byte |
BIGGER_THING | OW | ? | ;defines a word (2 bytes) |
BIGGEST_THING | DO | ? | ;defines a doubleword (4 bytes) |