-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Should SOP update FLAGS, or this is by design not touching FLAGS?
mtmc/src/main/java/mtmc/emulator/MonTanaMiniComputer.java
Lines 357 to 367 in 301477a
| case 0b0111 -> { | |
| // sop | |
| short aluOpCode = getBits(8, 4, instruction); | |
| switch (aluOpCode) { | |
| case 0b0000 -> { | |
| short currentTop = fetchWordFromMemory(getRegisterValue(stackReg)); | |
| short nextDown = fetchWordFromMemory(getRegisterValue(stackReg) + WORD_SIZE); | |
| setRegisterValue(stackReg, getRegisterValue(stackReg) + WORD_SIZE); | |
| int value = nextDown + currentTop; | |
| writeWordToMemory(getRegisterValue(stackReg), value); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels