ColdCPU is a custom-made fictional processor architecture and assembly language written in C++. It offers a comprehensive toolchain for compiling, cross-platform emulation, and disassembly.
- Turing Completeness: Supports arithmetic, floating-point and bitwise operations.
- Control Flow: Conditional branching for complex program logic.
- Memory Operations: Secure memory model with fast load/store instructions.
- Clean & Simple: ColdCPU provides an educational reference designed to explore low-level architecture concepts and enhance understanding of basic processor functionality.
- Examples: Several examples of programs written in the
cold
assembly language have been provided in the workdir folder of this repository.
Usage: coldasm --input PATH --output PATH
Usage: coldemu --path PATH [--memory VAR]
Optional arguments:
-m, --memory memory size in bytes [default: 1024]
Usage: colddsm --input PATH --output PATH
See the documentation for more detailed information about the processor and toolchain in the wiki.
This project is built upon the Premake5 metabuild system, meaning that it can compile using native build systems depending on the host. Currently, Windows and Linux are supported, and build systems for Visual Studio and GNU Make can be generated for each respectively by running the corresponding setup script found in the scripts
directory at the root of the repository.
- Clone the repository:
git clone https://github.com/cwielder/coldcpu.git
cd coldcpu
- Generate build files:
- Windows (Visual Studio):
Open the resulting
"./scripts/setupVS.bat"
coldcpu.sln
file in Visual Studio 2022+ - Linux (GNU Make):
"./scripts/setupMake" make
- Windows (Visual Studio):
All code in the coldcpu
repository has been made available under the MIT License.