CPU Simulator
    Preparing search index...
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Constructs a new assembler object with the given processing width.

      Parameters

      • pathToLanguageDefinition: string

        The path to the language definition file of the assembly language used by this assembler.

      Returns Assembler

    Properties

    languageDefinition: AssemblyLanguageDefinition
    translations: Map<string, DoubleWord[]>

    Methods

    • This method compiles a given computer program written in assembly language into its binary representation. The instructions will be encoded using the opcodes defined in the language definition. The order in which the instructions appear in the input program is preserved during the compilation process.

      Parameters

      • s: string

        File contents of an .asm file containing a computer program written in assembly language.

      Returns DoubleWord[]

      An array of strings representing the binary encoded instructions of the given computer program.