This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ordering assumed Remember that the ARM microcontroller must access all half-word quantities on 16bit boundaries. In other words, it cannot access a half-word memory location if that
location is at an odd address. See the .align directive for a solution.
See also the .byte and .word assembler directives. .include "filename"
Insert the contents of filename into the current source file, as if that file had been
typed into the current file directly. This is exactly the same as C’s use of #include,
and is for the same reason: it allows you to include header files full of various definitions. By the way, beware of having .end in the included file: the GNU Assembler will
stop reading everything after that directive! .ltorg
Insert the literal pool of constants at this point in the program. The literal pool is
used by the ldr = and adrl assembly language pseudo-instructions and is specific
to the ARM. Using this assembler directive is almost always optional, as the GNU
Assembler is smart enough to figure out when and where to put any literal pool.
However, there are situations when it is very useful to include this directive, such as
when you need absolute control over where the assembler places your code. –4– .set symbol, expression
This is a synonym for the .equ assembler directive; it is a personal preference as to
which you use (but be consistent!). .skip expression
Skip expression bytes in the object file output. The bytes so skipped should be
treated as unpredictable in value, although they are often initialised to zero. This
directive is useful for declaring uninitialised variables of a certain size. As an example, the following three lines declare three variables, two that are pre-initialised, one
(buffer) that is not:
512 ; Head pointer to within buffer (initially zero)
; Tail pointer to within buffer (initially zero)
; Buffer of 512 bytes, uninitialised See also the .ascii, .asciz, .byte, .hword and .word directives f...
View Full Document
This test prep was uploaded on 03/30/2014 for the course CGS 1000 at Hillsborough.
- Assembly Language