6Assembler Directives aWrite assembler directives toreserve
6.Assembler Directives
a.Write assembler directives toreserve 100 bytes to a variableZero and initialize them to 0 (use FILL directive)
b.Write assembler directives to build a table, named Table, to hold the ASCII codes of the capital letters A–Z (use DC directive)
c.Write assembler directives to store the following message in memory locations named Message starting from $1000: Welcome to Engineering Department! (use DC directive)
Solution
b) TABLE ORG $00
LDAA #26
LDD #$41
LOOP STD TABLE
DECA
BNE LOOP
INX
END
a) .bss directive is used to reserve space for variables. This directory is usually used to allocate space in RAM.
i. The symbol is required parameter. it defines a symbol that points to the first location reserved bythe directive.
ii. The size in bytesis a required parameter it must be absolute constant expression.
iii. The alignment is an optional parameter that ensues thatthe space allocated to the symbol occures on the specified boundary.
