Skip to content

SOP and FLAGS #14

@paiv

Description

@paiv

Should SOP update FLAGS, or this is by design not touching FLAGS?

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions