Module 7: Assembly Language Flashcards

1
Q

machine language

A

bit patterns that are directly executable by the computer

  • -may look like gibberish to humans but it is actually the binary encoded instructions that the CPU can understand
  • -may also contain data in addition to instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

assembly language

A

symbolic representation of machine langauge

  • -instructions as mnemonic ASCII strings
  • -cannot run but mostly readable by humans
  • -can be handwritten or produced by a compiler from a high level language like C
  • -assembly files can also contain ASCII lables (e.g. BRnzp LOOP)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

assembler

A

used to translate assembly programs (.ASM) into machine code (.OBJ)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

linking

A

process of connecting several .OBJ files together into one executable program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

programming

A

process of designing/writing/testing/debugging/maintaining the “source code” of computer programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

variables

A

places to “store” information as in algebra

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

loops

A

a way to “repeat” a portion of a program over and over again

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

conditional control

A

a way for our program to change the natural flow of a program based on a condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

subroutine

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

pointers

A

variable storing a memory address (as opposed to a regular variable that holds data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

dereferencing

A

act of using memory address held by a pointer to read/write from the memory location held onto by that pointer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

assembly directives

A

provide an indication to the assembler of where it should place various blocks of code or data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Loops & if-else statements

A

covers: loading constants, arithmetic, compare, branch, basic jump instructions, labeling in assembling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

subroutines

A

covers: JSR, RET, labels, assembly directives: .FALIGN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

accessing data memory

A

covers: LDR, STR, what is a pointer?, for loops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

an “assembler” program

A

operates in two phases:

  1. converts labels into offsets and removes comments
  2. converts assembly code into machine code
    - -uses ISA to do this and saves in a .OBJ file
17
Q

Loader

A

after assembler finishes a “loader” program loads it into computer memory

18
Q

LC4 memory

A

user region

  • programs run by users e.g. MS Word
  • processes run in user mode with PSR[15]=0 are not allowed to access OS locations in the memory

OS region

  • processes run in OS mode with PSR[15]=1
  • note: address x8200, first address of your OS
19
Q

LC4 assembly directives

A

.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