Welcome to the PopperCPU project! This readme provides an overview of the project, its purpose, and how to get started.
- Introduction
- Project Goals
- Features
- Getting Started with PopperCPU
- PopperASM - Assembling for PopperCPU
- Usage
- Contributing
- License
PopperCPU is a Rust-based project focused on creating a CPU architecture designed to execute programs written in PopperASM, an assembly language derived from the Popper-lang programming language. This project aims to provide a capable CPU architecture for interpreting and executing PopperASM programs efficiently.
The main objectives of the PopperCPU project are:
-
CPU Architecture: Design and implement a CPU architecture that can execute machine code generated by the PopperASM assembler.
-
Efficiency: Optimize the CPU design and execution process to achieve high performance for PopperASM programs.
-
Interpretation: Create an interpreter that can process PopperASM machine code and perform the specified operations.
-
Integration: Seamlessly integrate with the PopperASM assembler to provide a complete development and execution environment.
-
Documentation: Develop comprehensive documentation to guide users on writing PopperASM code, assembling it, and executing it on PopperCPU.
-
Rust Implementation: PopperCPU is implemented in Rust, taking advantage of the language's features to deliver a reliable and performant CPU architecture.
-
Efficient Execution: The CPU design focuses on efficient execution of PopperASM programs, balancing speed and resource usage.
-
Instruction Set: Define a suitable instruction set that covers the operations supported by PopperASM.
-
Memory Management: Implement memory management features to support loading and executing PopperASM programs.
-
Integration with PopperASM: PopperCPU is designed to work seamlessly with PopperASM, interpreting the machine code generated by the assembler.
To start using the PopperCPU project:
Clone the project repository: git clone https://github.com/popper-lang/PopperCPU.git
Make sure you have Rust installed on your system along with the necessary dependencies.
Review the documentation in the docs directory to understand the CPU architecture and how to use the interpreter.
Before you can run programs on PopperCPU, you need to write code in PopperASM, an assembly language derived from Popper-lang. To assemble PopperASM code:
Write your PopperASM code in a .popasm
file using your preferred text editor.
Open a terminal and navigate to the directory containing popperasm.rs.
Build and run the assembler on your PopperASM code: cargo run input.popasm output.bin
The assembler processes the input code and generates a binary output file ready for execution on PopperCPU.
-
Load the binary output from the PopperASM assembler onto the PopperCPU's memory.
-
Initialize the CPU and start the execution of the loaded program.
-
Monitor the CPU's execution to observe the program's behavior and output.
Contributions to the PopperCPU project are highly appreciated! To contribute:
-
Fork the repository and create a new branch.
-
Implement your changes and enhancements to the CPU architecture or interpreter.
-
Submit a pull request, providing details about your changes and their significance.
This project is licensed under the GNU License.