Assembly Language(1.2.4 c) Flashcards
What is assembly language?
when a program is executing the processor receives instructions from RAM in a sequential order
these instructions are coded in assembly language
decode unit takes assembly language instruction in binary and decodes them into a valid operation
What is Little Man Computer(LMC)?
an instruction set designed for educational purposes
contains 11 instructions(mnemonic) to demonstrate important concepts or tracing and writing assembly code
ADD
add
0001
1
SUB
subtract
0010
2
STA
store
0011
3
LDA
load
0101
5
BRA
branch always
0110
6
BRZ
branch if zero
0111
7
BRP
branch if positive
1000
8
INP
input
1001 1001
9(1)
OUT
output
1001 0010
9(2)
HLT
end program
0000
0
DAT
data location
What is tracing?
the process of following the flow of information through each line of program and calculating values or outputs that would occur
00 INP
01 STA 05
02 INP
03 ADD 05
04 OUT
05 DAT 00(gets overwritten)
takes input from user
stores inputted data in memory location 05
takes a second input from the user
adds value stored in location 05
outputs result to the console