Save
A-level Computer Science
School Notes
LMC
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Ana Saker
Visit profile
Cards (35)
What is the mnemonic for loading to the accumulator in LMC?
LDA
View source
What is the numerical/machine code for loading to the accumulator?
5
View source
What does the LOAD instruction do in LMC?
Loads
mailbox
contents
to the
accumulator
View source
What is the mnemonic for storing from the accumulator?
STA
View source
What is the numerical/machine code for storing from the accumulator?
3
View source
What does the STORE instruction do in LMC?
Stores
accumulator
contents
to a
mailbox
View source
What is the mnemonic for the ADD instruction?
ADD
View source
What is the numerical/machine code for the ADD instruction?
1
View source
What does the ADD instruction do in LMC?
Adds
mailbox
contents
to the
accumulator
View source
What happens if the ADD instruction results in a sum larger than 3 digits?
The
actions
of the
accumulator
are
undefined
View source
What is the mnemonic for the SUBTRACT instruction?
SUB
View source
What is the numerical/machine code for the SUBTRACT instruction?
2
View source
What does the SUBTRACT instruction do in LMC?
Subtracts
mailbox
contents
from the
accumulator
View source
What happens if the SUBTRACT instruction results in a negative result?
A
negative
flag
will be
set
View source
What is the mnemonic for the
INPUT
instruction
?
INP
View source
What is the numerical/machine code for the INPUT instruction?
901
View source
What does the INPUT instruction do in LMC?
Copies
value
from "
in
box
" to
accumulator
View source
What is the mnemonic for the OUTPUT instruction?
OUT
View source
What is the numerical/machine code for the OUTPUT instruction?
902
View source
What does the OUTPUT instruction do in LMC?
Copies
accumulator
value
to "
out
box
"
View source
What is the mnemonic for the END program instruction?
HLT
View source
What is the numerical/machine code for the END program instruction?
000
View source
What does the HLT instruction do in LMC?
Stops
executing
the
program
View source
What is the mnemonic for the BRANCH IF ZERO instruction?
BRZ
View source
What is the numerical/machine code for the BRANCH IF ZERO instruction?
7
View source
What does the BRZ instruction do in LMC?
Branches
if
accumulator
is
zero
View source
What is the mnemonic for the BRANCH IF ZERO OR POSITIVE instruction?
BRP
View source
What is the numerical/machine code for the BRANCH IF ZERO OR POSITIVE instruction?
8
View source
What does the BRP instruction do in LMC?
Branches
if
accumulator
is
zero or
positive
View source
What is the mnemonic for the BRANCH ALWAYS instruction?
BRA
View source
What is the numerical/machine code for the BRANCH ALWAYS instruction?
6
View source
What does the BRA instruction do in LMC?
Branches
to the
given
address
View source
What is the mnemonic for the DATA LOCATION instruction?
DAT
View source
What does the DAT instruction do in LMC?
Reserves
the
next
mailbox
for
data
storage
View source
What is the summary of LMC instructions and their codes?
Load:
LDA
,
5xx
Store:
STA,
3xx
Add:
ADD
,
1xx
Subtract:
SUB,
2xx
Input:
INP,
901
Output:
OUT,
902
End:
HLT
,
000
Branch if zero:
BRZ,
7xx
Branch if zero or positive:
BRP
,
8xx
Branch always:
BRA,
6xx
Data storage:
DAT
View source