In other words it cannot access a half word memory

Info iconThis preview shows page 1. Sign up to view the full content.

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

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: head_ptr: tail_ptr: buffer: .word .word .skip 0 0 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

{[ snackBarMessage ]}

Ask a homework question - tutors are online