Skip to content

change behaviour of direct writes to instruction register #5

Description

@itsyigid

in isa.py

if opcode in BRANCHING:
    if opcode == "jmp":
        cpu.instruction_pointer = new_location
        cpu.just_jumped = True
    else
        pass

in cpu.py:

opcode, args = self.fetch()
self.decode_and_execute(opcode, args)
if not self.just_jumped:
    # advance pointer 1 bit to read the next address
    self.instruction_pointer += data_types.Word(1)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions