eight_bit_computer.operations.call_op module

CALL Operation

Push the current program counter (i.e. the next instruction to be executed) onto the stack, then set the program counter (i.e. jump) to the value in the given argument (module or constant).

eight_bit_computer.operations.call_op.generate_microcode_templates()[source]

Generate microcode for all the CALL instructions.

Returns:DataTemplates for all the CALL instructions.
Return type:list(DataTemplate)
eight_bit_computer.operations.call_op.generate_signatures()[source]

Generate all the argument signatures for the CALL operation.

Returns:All possible signatures, See get_arg_def_template() for more information on an argument definition dictionary.
Return type:list(list(dict))
eight_bit_computer.operations.call_op.generate_operation_templates(signature)[source]

Create the DataTemplates to define a CALL with the given signature.

Parameters:signature (list(dict)) – List of argument definitions that specify which particular CALL operation to generate templates for.
Returns:Datatemplates that define this CALL.
Return type:list(DataTemplate)
eight_bit_computer.operations.call_op.generate_instruction_byte_bitdefs(signature)[source]

Generate bitdefs to specify the instruction byte for this signature.

Parameters:signature (list(dict)) – List of argument definitions that specify which particular CALL operation to generate the instruction byte bitdefs for.
Returns:Bitdefs that make up the instruction_byte
Return type:list(str)
eight_bit_computer.operations.call_op.generate_control_steps(signature)[source]

Generate control steps for this signature.

Parameters:signature (list(dict)) – List of argument definitions that specify which particular CALL operation to generate the control steps for.
Returns:List of list of bitdefs that specify the control steps.
Return type:list(list(str))
eight_bit_computer.operations.call_op.parse_line(line)[source]

Parse a line of assembly code to create machine code byte templates.

If a line is not identifiably a CALL assembly line, return an empty list instead.

Parameters:line (str) – Assembly line to be parsed.
Returns:List of machine code byte template dictionaries or an empty list.
Return type:list(dict)