machine language
bit patterns that are directly executable by the computer
assembly language
symbolic representation of machine langauge
assembler
used to translate assembly programs (.ASM) into machine code (.OBJ)
linking
process of connecting several .OBJ files together into one executable program
programming
process of designing/writing/testing/debugging/maintaining the “source code” of computer programs
variables
places to “store” information as in algebra
loops
a way to “repeat” a portion of a program over and over again
conditional control
a way for our program to change the natural flow of a program based on a condition
subroutine
group of instructions meant to perform a specific task e.g. square a number, print out a string, etc. in assembly; similar to a “function” in a high level language
pointers
variable storing a memory address (as opposed to a regular variable that holds data)
dereferencing
act of using memory address held by a pointer to read/write from the memory location held onto by that pointer
assembly directives
provide an indication to the assembler of where it should place various blocks of code or data
Loops & if-else statements
covers: loading constants, arithmetic, compare, branch, basic jump instructions, labeling in assembling
subroutines
covers: JSR, RET, labels, assembly directives: .FALIGN
accessing data memory
covers: LDR, STR, what is a pointer?, for loops
an “assembler” program
operates in two phases:
Loader
after assembler finishes a “loader” program loads it into computer memory
LC4 memory
user region
OS region
LC4 assembly directives
.DATA
-next values are in DATA memory
.ADDR
-set current address to the specified value
.FILL IMM16
-set value at the current address to the specified 16-bit value
ultimately, the assembly program gets assembled to an object file that is a specification for how the machine memory should be set up