NAS (Not A Standard) Processor Emulator is a software project aimed at simulating the behavior of a theoretical processor named the NAS processor. The project consists of various components including an interpreter, processor modules, utility functions, and an example NAS processor assembly language.
- Interpretation and execution of NAS assembly language instructions.
- Processor modules including registers, ALU (Arithmetic Logic Unit), and clock cycle control.
- Error handling for invalid instructions or syntax errors.
- Support for label-based program execution.
- Interpreter: Interprets the NAS assembly language code, performs lexical analysis, parsing, and execution of instructions.
- Processor Modules:
- Registers: AX, BX, CX, and DX 4 bit registers with corresponding operations like storing, loading, and clearing.
- ALU (Arithmetic Logic Unit): Performs arithmetic operations like addition and subtraction.
- Clock Cycle Control: Controls the execution flow based on the clock cycle.
- Utilities: Utility functions for error handling, data conversion, and code splitting.
- Example Assembly Language: An example assembly language file demonstrating various NAS instructions and program structure.
To run the NAS Processor Emulator, follow these steps:
- Clone the repository:
git clone https://github.com/N2MGAMING/NAS-Processor.git
- Navigate to the project directory:
cd NAS-Processor
- Execute the main script:
python emulator.py
- Follow the prompts to load and execute NAS assembly language programs.
- Help Command: Use the
help
command to display available commands and usage information. - Configuration: Use the
config
command to change configuration settings such as enabling verbose mode. - Execution: Load and execute NAS assembly language programs using the
run
command.
An example of a NAS assembly language source file is present in the code.nas file.
This project is licensed under the MIT License.