Little Minion Computer Flashcards
How does the Little Minion Computer carry out the Fetch/Execute cycle?
Reads the current address from the counter
Increments the counter by 1
Goes to the mailbox at that address and reads the instruction
What are mailboxes?
Memory locations with 2-digit addresses, which can hold a 3-digit number
Describe the calculator
Operates on 3-digit numbers, can add/subtract and has a negative flag
Describe the counter
A 2-digit counter with 2 buttons
The first button increments it and is operated by the minion
The second button resets it to 00 and is operated by us
What are input/output trays?
The user can put slips of paper with 3 digits on in the input tray, to beread when the little minion next looks at its in tray.Likewise, the little minion can write 3-digit notes and put them in the out tray, to be read by the user
LDA (LOAD) - 5XX
(MAILBOX XX => CALCULATOR)
Load the number from mailbox XX into the calculator
STO (STORE) - 3XX
(CALCULATOR => MAILBOX XX)
Inverse of LOAD, stores the number from the calculator in mailbox XX
ADD (1XX)
(ADD MAILBOX TO CALCULATOR)
Add the number from mailbox XX to the number currently in the calculator (calc number changes)
[SUB]TRACT (2XX)
(SUBTRACT MAILBOX FROM CALCULATOR)
Subtract the number from mailbox XX from the number currently in the calculator (calc number changes and a negative flag might be added)
[IN]PUT/READ (901)
(IN TRAY => CALCULATOR)
Go to the IN tray, read the 3-digit number there, then go to the calculator and enter that number in
The slip of paper in the IN tray with the 3-digits is removed. If there are several slips in the IN tray, the little minion takes the first one put there only, the other remain for future visits
BREAK (000)
End the program
OUTPUT/PRINT (902)
(CALCULATOR => OUT TRAY)
Go to the calculator, read the 3-digit number there, then go to the OUT tray and leave a slip of paper with that number on it.
BRANCH (6XX)
(JUMP TO SPECIFIC POINT)
Set the counter to the two digits XX, and start fetching the instruction
BRANCH ON ZERO (7XX)
(JUMP TO POINT IF CALCULATOR VALUE IS ZERO)
Go to the calculator and read the 3-digit number. If it is zero, set the counter to the 2-digits specified in the address, and start fetch of instruction, otherwise continue with the next instruction as normal.
BRANCH ON POSITIVE (8XX)
(JUMP TO POINT IF CALCULATOR VALUE IS NEGATIVE)
Go to the calculator and read the 3-digit number. If it has a negative flag, set the counter to the 2-digits specified in the address, and start fetch of instruction, otherwise continue with the next instruction as normal.