Documente Academic
Documente Profesional
Documente Cultură
DD- Define double word: The DD directive is used END- End Program: The directive is put after the
to declare a variable of type double word or to last statement of a program to tell the assembler that
reserve memory locations which can be accessed as this is the end of the program module. The assembler
type double word. The statement will ignore any statements after an END directive, so
ARRAY_POINTER DD 25629261H, for example, you should make sure to use only one END directive
will define a double word with the specified value at the very end of your program module. A carriage
when the program is loaded into memory to be run. return is required after the END directive.
DQ- Define Quad word: This directive is used to ENDP- End Procedure: This directive is used along
tell the assembler to declare a variable 4 words in with the name of the procedure to indicate the end of
length or to reserve 4 words of storage in memory. a procedure to the assembler. This directive, together
For example, the statement BIG_NUMBER DQ with the procedure directive, PROC, is used to
243598740192A92BH, will declare a variable named “bracket” a procedure. For example,
BIG_NUMBER and initialize the 4 words set aside
SQUARE_ROOT PROC; Start of procedure
with the specified number when the program is
loaded into memory to be run. The statement ; Procedure
STORAGE DQ 100 DUP (0) reserves 100 quad instruction
; Statement EXTRN: The EXTRN directive is used to tell the
assembler that the names or labels following the
SQUARE_ROOT ENDP; End of procedure
directive are in some other assembly module. For
ENDS- End segment: This directive is used with the example, if you want to call a procedure which is in a
name of a segment to indicate the end of that logical program module assembled at a different time from
segment. ENDS are used with the SEGMENT that which contains the CALL instruction, you must
directive to “bracket” a logical segment instructions tell the assembler that the procedure is external. The
or data. Look at this example: assembler will then put information in the object
code file so that the linker can connect the two
CODE SEGMENT; start of logical segment modules together.
If the string was declared as a string of bytes, specific type to a variable or to a label. It is necessary
LENGTH will produce the number of bytes in the to do this in any instruction where the type of the
string. If the string was declared as a word string, operand is not clear. We also use the PTR operator to
LENGTH will produce the number of words in the clarity our intentions when we use indirect jump
string. instructions.
NAME: The NAME directive is used to give a PUBLIC: Large programs are usually written as
specific name to each assembly module when several separate modules. Each module is
programs consisting of several module are written. individually assembled, tested, and debugged. When
The statement NAME PC_BOARD, for example, all the modules are working correctly, their object
might be used to name an assembly module which code files are linked together to firm the complete
contains the instructions for controlling a printed- program. In order for the modules to link together
assembler function.
For example:
.section program
.glb _asm_func
_asm_func:
pushc FLG
pushm R3, R1
popm R3, R1
popc FLG
rts
F0018 F3 RTS
.END
4. CONCLUSION:
REFERENCES: