LMC_Flashcards
(33 cards)
What does LMC stand for?
Little Man Computer
What is the purpose of the LMC?
To demonstrate basic computer architecture and machine language concepts.
What is the maximum number of mailboxes in LMC?
100 mailboxes, with addresses ranging from 00 to 99.
What is stored in an LMC mailbox?
A 3-digit decimal number representing data or instructions.
What is the role of the calculator in the LMC?
To perform operations with values up to 3 digits.
What does the location counter in the LMC do?
It holds the address of the next instruction to execute.
What do the ‘IN’ and ‘OUT’ trays in LMC represent?
Input and output interfaces for user interaction.
How is assembly language related to machine language?
Each assembly language instruction corresponds directly to a machine language instruction.
What is a mnemonic in assembly language?
A short character sequence representing an instruction (e.g., ADD, SUB).
What does the opcode ‘1xx’ represent in LMC?
ADD - Adds the value from a specified mailbox to the calculator.
What does the opcode ‘2xx’ represent in LMC?
SUB - Subtracts the value from a specified mailbox from the calculator.
What does ‘3xx’ represent in LMC instructions?
STA - Stores the value in the calculator to a specified mailbox.
What is the opcode ‘5xx’ used for in LMC?
LDA - Loads a value from a specified mailbox into the calculator.
What is the purpose of opcode ‘901’?
INP - Takes user input and loads it into the calculator.
What does ‘902’ do in LMC?
OUT - Outputs the current value in the calculator.
What does the LMC instruction ‘000’ represent?
COB or HALT - Stops the program execution.
What is the purpose of the ‘DAT’ directive in LMC assembly language?
To declare variables and store initial data values in mailboxes.
What is an LMC program’s ‘fetch-execute cycle’?
The cycle where the LMC retrieves and executes each instruction in sequence.
What is the ‘Von Neumann architecture’?
A computer architecture with stored programs and memory addressed by location number.
What is the function of the BRA instruction?
Branches unconditionally to a specified mailbox address.
What is the function of the BRZ instruction?
Branches if the value in the calculator is zero.
What does BRP do in LMC?
Branches if the value in the calculator is positive.
Describe a simple program in LMC to add two numbers.
Input two numbers, store them, add them, output the result, and halt.
What would the instruction ‘LDA 10’ do?
Load the value in mailbox 10 into the calculator.