Skip to content

popper-lang/popper-cpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the PopperCPU project! This readme provides an overview of the project, its purpose, and how to get started.

Table of Contents

Introduction

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.

Project Goals

The main objectives of the PopperCPU project are:

  1. CPU Architecture: Design and implement a CPU architecture that can execute machine code generated by the PopperASM assembler.

  2. Efficiency: Optimize the CPU design and execution process to achieve high performance for PopperASM programs.

  3. Interpretation: Create an interpreter that can process PopperASM machine code and perform the specified operations.

  4. Integration: Seamlessly integrate with the PopperASM assembler to provide a complete development and execution environment.

  5. Documentation: Develop comprehensive documentation to guide users on writing PopperASM code, assembling it, and executing it on PopperCPU.

Features

  • 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.

Getting Started with PopperCPU

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.

PopperASM - Assembling for PopperCPU

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.

Usage

  1. Load the binary output from the PopperASM assembler onto the PopperCPU's memory.

  2. Initialize the CPU and start the execution of the loaded program.

  3. Monitor the CPU's execution to observe the program's behavior and output.

Contributing

Contributions to the PopperCPU project are highly appreciated! To contribute:

  1. Fork the repository and create a new branch.

  2. Implement your changes and enhancements to the CPU architecture or interpreter.

  3. Submit a pull request, providing details about your changes and their significance.

License

This project is licensed under the GNU License.

About

The CPU of Popper Assembler (the ir of the popper-lang)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages