Skip to main content
getInstructionType(instruction): string | number | BigInt
Defined in: src/parsing/parser.ts:622 Gets the instruction type code for a given instruction string. This function centralizes the mapping from string instructions to their numeric equivalents used in the instruction set processing.

Parameters

ParameterTypeDescription
instructionstring | number | BigIntThe instruction string to convert (e.g., ‘N’, ‘PLH’, ’+’, ‘AND’).

Returns

string | number | BigInt The numeric instruction type code, or the original instruction if not a string operation.