eight_bit_computer.operations.rot_left_op module¶
The ROT_LEFT operation.
Moves all the bits in the number one place to the left (most significant side). If the most significant bit was a 1, then after the rotation this is set back on the least significant side.
This operation will generate and store (clobber) ALU flags.
-
eight_bit_computer.operations.rot_left_op.
generate_microcode_templates
()[source]¶ Generate microcode for all the ROT_LEFT operations.
Returns: DataTemplates for all the ROT_LEFT microcode. Return type: list(DataTemplate)
-
eight_bit_computer.operations.rot_left_op.
generate_signatures
()[source]¶ 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))
-
eight_bit_computer.operations.rot_left_op.
generate_operation_templates
(signature)[source]¶ Create the DataTemplates to define a ROT_LEFT with the given args.
Parameters: signature (list(dict)) – List of argument definitions that specify which particular operation to generate templates for. Returns: Datatemplates that define this ROT_LEFT. Return type: list(DataTemplate)
-
eight_bit_computer.operations.rot_left_op.
generate_no_carry_datatemplates
(signature)[source]¶ Create DataTemplates to define a rottate left with no carry.
This is the case where the most significant bit was a zero.
Parameters: signature (list(dict)) – List of argument definitions that specify which particular operation to generate templates for. Returns: Datatemplates that define the “no carry half” of a ROT_LEFT operation. Return type: list(DataTemplate)
-
eight_bit_computer.operations.rot_left_op.
generate_instruction_byte_bitdefs
(signature)[source]¶ Generate bitdefs to specify the instruction byte for these args.
Parameters: signature (list(dict)) – List of argument definitions that specify which particular operation to generate the instruction byte bitdefs for. Returns: Bitdefs that make up the instruction_byte Return type: list(str)
-
eight_bit_computer.operations.rot_left_op.
generate_with_carry_datatemplates
(signature)[source]¶ Create DataTemplates to define a rottate left with a carry.
This is the case where the most significant bit was a one.
Parameters: signature (list(dict)) – List of argument definitions that specify which particular operation to generate templates for. Returns: Datatemplates that define the “carry half” of a ROT_LEFT operation. Return type: list(DataTemplate)
-
eight_bit_computer.operations.rot_left_op.
parse_line
(line)[source]¶ Parse a line of assembly code to create machine code byte templates.
If a line is not identifiably an ROT_LEFT 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)