Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ruskaof committed Dec 17, 2023
1 parent 9e9139d commit 7a9a5fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions computer_simulator/machine/hardwire.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

WORD_SIZE: int = 64
WORD_MAX_VALUE: int = 2 ** (WORD_SIZE - 1) - 1
WORD_MIN_VALUE: int = -2 ** (WORD_SIZE - 1)
WORD_MIN_VALUE: int = -(2 ** (WORD_SIZE - 1))


class UnknownSignalError(Exception):
Expand Down Expand Up @@ -319,9 +319,9 @@ def _need_address_fetch(instruction: Instruction) -> bool:

def _need_operand_fetch(instruction: Instruction) -> bool:
return (
instruction.arg is not None
and instruction.arg.arg_type in (ArgType.STACK_OFFSET, ArgType.INDIRECT, ArgType.ADDRESS)
and instruction.opcode not in NO_FETCH_OPERAND_INSTR
instruction.arg is not None
and instruction.arg.arg_type in (ArgType.STACK_OFFSET, ArgType.INDIRECT, ArgType.ADDRESS)
and instruction.opcode not in NO_FETCH_OPERAND_INSTR
)


Expand Down

0 comments on commit 7a9a5fb

Please sign in to comment.