module ecccpu.decode


function findSymbols

findSymbols(imem: list[str]) → dict[str, str]

Find the symbols in the instruction memory, e.g. main:

Args:

  • imem (list[str]): Instruction memory

Returns:

  • dict[str, int]: Dictionary of symbols corresponding with their line numbers

function decode

decode(pc: int, assembly: str, sym: dict[str, int]) → dict[str, str]

Decodes each instruction into a simpler format, replacing symbols, register aliases, and removing comments for the EccCPU ISA

Args:

  • pc (int): Program counter
  • assembly (str): Instruction to decode
  • sym (dict[str, int]): Symbol dictionary

Returns:

  • dict[str, str]: Decoded instruction

This file was automatically generated via lazydocs.