eight_bit_computer.operations.set_op module

The set operation.

Sets a module to a certain value.


Generate the definitions of all possible arguments passable.

Returns:All possible arguments. See get_arg_def_template() for more information.
Return type:list(list(dict))

Generate datatemplates for all the SET operations.

Returns:All the datatemplates that make up the SET operation.
Return type:list(DataTemplate)

Generate bitdefs to specify the instruction byte for these args.

Parameters:signature (list(dict)) – List of argument definitions that specify which particular set operation to generate the instruction byte bitdefs for.
Returns:Bitdefs that make up the instruction byte.
Return type:list(str)

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

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

Parameters:line (str) – Assembly line to be parsed.
Returns:List of instruction byte template dictionaries or an empty list.
Return type:list(dict)
Raises:OperationParsingError – If the line was identifiably a SET operation but incorrectly specified.