Term
Instructions in the Little Manc Computer are three digits, divided into two parts. Show the fromat of an LMC instruction. |
|
Definition
3 | 25
Instruction | mail box address |
|
|
Term
Describe, step by step, what the LMC does to execute a store instruction. |
|
Definition
- Walks to the calcualtor and reads the number
- Puts the number in the specified mailbox
- The number in the calc is unchanged
- The number in the specified mailbox is replaced with the new value from the calculator
|
|
|
Term
Describe, step by step, what the Little Man does to execute an input instruction. |
|
Definition
- takes the input from the input basket; loads it into the calculator
- the in basket is now empty and the previous number in the calc is replaced by the new number from the in basket.
- if multiple inputs exist in the basket he picks them all up but the other input valuse must wait for subsequent INPUT instructions to be executed
|
|
|
Term
|
Definition
Copies the contents of the specified mailbox and puts int into the calculator. |
|
|
Term
Store (op code 3): STA or STO |
|
Definition
Places the contents of the calculator in to the specified mailbox. |
|
|
Term
|
Definition
Adds the contents of the specified mailbox to the current contents of the calculator; the result will stay in the calculator |
|
|
Term
Subtract (op code 2): SUB |
|
Definition
Subtracts the value of the specified mailbox from the current contents of the calculator; the result will remain in the calculator |
|
|
Term
Input (op code 9 address 01) INP |
|
Definition
Moves the value in the in basket to the calculator |
|
|
Term
Output (op code 9 address 02): OUT
|
|
Definition
Causes the value in the calculator to be written to the out basket. |
|
|
Term
Halt (op code 0): COB or HLT |
|
Definition
Causes the LMC to stop processing commands. |
|
|
Term
Branch unconditionally (op code 6): BRA |
|
Definition
Changes which instruction will be executed next by changing the program counter to the specified mailbox number. |
|
|
Term
Branch on Zero (op code 7): BRZ |
|
Definition
Changes which instruction will be executed next but ONLY if the value in the calculator is ZERO |
|
|
Term
Branch on Positive (op code 8): BRP |
|
Definition
Changes which instruction will be executed next BUT ONLY if the calculator contains a value that is ZERO OR GREATER. |
|
|
Term
What steps make up the instruction cycle in the LMC? |
|
Definition
- Fetch: occurs first; the little man finds out what instruction to execute.
- Execute: the little man performs teh task specified in the instruction
|
|
|