How rusty-jar/neo8085 works
Main Components
• User Interface (UI) / IDE: This is the front end that users interact with. It includes the assembly code editor (with syntax highlighting, breakpoint handling, etc.), menu controls for file operations, and display panels for registers, flags, and memory.
• Assembler Module: Located in src/assembler.py, it handles parsing and converting 8085 assembly language into machine instructions. It deals with symbolic resolution, directive processing (like EQU and DS), and error reporting.
• Processor/Simulator Module: Found in src/processor.py, this module simulates the 8085 microprocessor’s operations, including register/flag updates and memory manipulations during step-by-step or continuous execution.
• Application Entry Point: The src/main.py file serves as the glue that initializes the UI, ties together the assembler and processor components, and manages overall application flow.
• External Dependencies: Emphasize that the project relies on PySide6 (Qt for Python) for the GUI and that its operations use Python’s runtime environment.
Relationships and Interactions
• The UI sends user-written 8085 assembly code to the Assembler Module when the "Assemble" action is triggered.
• The Assembler Module processes the code (e.g., resolving directives and labels) and returns either assembled machine code or error messages.
• On successful assembly, the machine code is passed to the Processor Module, which simulates the microprocessor’s execution.
• As the Processor Module executes instructions (either step-by-step or continuously), it communicates updated register states, flag statuses, and memory changes back to the UI for real-time visualization.
• The main application (main.py) coordinates these interactions, ensuring a smooth flow from code input to simulation output.
Architectural Patterns and Design Principles
• Modular Design: Each module (assembler, processor, and main UI) is independently developed and maintained. This modularity allows for potential extension or replacement of components without affecting the rest of the system.
• Event-Driven Interaction: The UI primarily functions as an event handler (button clicks, key presses) that triggers operations in the assembler and processor modules.