easier68k.assembler package¶
The assembler modules are responsible for parsing and converting instructions into machine code.
Submodules¶
easier68k.assembler.assembler module¶
-
easier68k.assembler.assembler.
find_labels
(text: str) -> (<class 'dict'>, <class 'dict'>, <class 'list'>)[source]¶ Finds all labels from a file :param text: The text to search through for labels :return: In order, labels (dict of label to line index + label contents), equates (dict of label to contents), and
issues (list of message + severity)
-
easier68k.assembler.assembler.
for_line_opcode_parse
(full_text: str)[source]¶ Yields the label (if it exists), opcode, and opcode contents for every line in a file :param full_text: The file text to parse :return: Yields the label (or None), opcode, and opcode contents (returns nothing)
-
easier68k.assembler.assembler.
parse
(text: str) -> (<class 'easier68k.core.models.list_file.ListFile'>, <class 'list'>)[source]¶ Parses an assembly file and returns a list file, along with errors/warnings from the parsing process. :param text: The assembly file text to parse :return: The parsed list file
-
easier68k.assembler.assembler.
replace_label_addresses
(contents: str, label_addresses: dict) → str[source]¶
-
easier68k.assembler.assembler.
replace_labels_with_temps
(contents: str, labels: dict) → str[source]¶ Replaces all labels that we don’t know the location for with temporary addresses ($00000000) :param contents: The string to replace labels :param labels: The labels :return: The string with labels replaced