Pseudo-ops
| Type | Quiz 3 Material |
|---|
Pseudo-ops(Assembler Directive)
Pseudo-ops are helpful to the assembler in performing that task of taking a string input of characters representing a computer program written in LC-3 assembly language and translating it into a program in the ISA of the LC-3.
- Know the following pseudo-ops:
.orig,.end,.fill,.blkw,.stringz.ORIG
.ORIG tells the assembler where in memory to place the LC-3 program.
.FILL
Reserve and fill a word with a numeric value, initialization data with memory
.BLKW
Block Word, Reserve n memories in a row —> Array
C. .blkw 20 —> Set C to the current address and reserve 20 words of memory starting at C
.STRINGZ
Store an ASCII string memory with a zero terminator(string length + 1 memory locations), optionally naming it
memory used is length of string + 1 (accounting for 0 to terminate string)
Decimal: #
Hex: x
Binary: b
BRP —> Branch if positive
LC3 has 8 Registers R1 - R8
- What is the purpose of each of these pseudo-ops? How do they affect the resulting memory layout of your program?
- Example types of questions that you may be asked:
- Compute the total amount of memory used by a sequence of pseudo-ops
- Determine the address of data/an instruction based on
.orig
- Figure out what data gets placed at an address by a pseudo-op






