Skip to content

About

Zero programming language for the x86 Architecture. The original "Zero" compiler project has been around since 2001

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

91 Commits

Folders and files

Repository files navigation

Zero Compiler

logo

The Zero programming language and compiler project (AKA: Null Compiler). Zero is a simple, fast, and efficient programming language for the x86-64 architecture.

The compiler supports PE (portable exectuable) file formats for GUI, CLI, and library binaries. Future expansions will include ELF formats and ARM architecture.

About

Zero has its inceptions in 2001 and matured 2006 as a simple, fast, and efficient programming language created by Damian Suess (Xeno Innovations, inc.). At the time, C/C++ and Visual Basic were the key programmang languages (besides Java or Pascal) for creating a compiled business/hobby application. Zero has the heart of assembly language giving it that bare-metal kick.

Zero Next-Generation

This is the next generation of the Zero Compiler Project, being rewritting from the ground up.

Yes, the heart language and engine are being rewritten for a more modern approach. Offering the capabilities of writing low-level Assembly (ZASM) and Zero's C-like style (ZSRC). The object-oriented functionality is also coming down the pipeline, to give developers the added boost.

Supported Architectures

Supported Target Architecture Executable format Platform conventions
✅ Windows x86 x86 PE32 Windows APIs and calling conventions
☐ Windows ARM64 ARM64 PE32+ Windows ARM64 ABI
☐ Linux x64 x86-64 ELF64 Linux ABI and system calls
☐ Linux ARM64 ARM64 ELF64 Linux ARM64 ABI

References:

Project layout

The solution keeps the compiler library, command-line application, and tests in three projects. The library groups existing implementation files by responsibility:

source/
  Zero/
    Assembly/       Assembler, parsed lines, directives, and import requests
    Core/           Shared utility functions
    Diagnostics/    Error codes and assembler exceptions
    Parsing/        Quote-aware operand and string parsing
    Formats/
      Pe/           PE writer, layout, imports, and binary structures
    Targets/
      X86/          x86 mnemonic and opcode definitions
    Zero.cs         Public compiler entry point
  Zero.Cli/         Arguments, console output, and program execution
  Zero.Tests/       Compiler and CLI tests

Public namespaces remain unchanged for compatibility. This is an organizational step: Assembler still coordinates parsing, x86 encoding, and PE output. Future work can extract shared parsing and target-specific encoding into separate components. New formats and architectures can be added under Formats and Targets when their implementations begin.

Contributing

Console assembly sample

From a PowerShell terminal in the repository root, build the compiler, compile the Windows x86 assembly sample, and run the resulting executable:

# Compile Zero Assembly (ZASM)
./build.bat

# From the publish folder:
./zcc.exe run samples/hello-console.zasm

Use zcc run <source> [output.exe] to compile and execute, or omit run to compile only. The generated executable defaults to the source path with an .exe extension. The run command waits for the program and returns its exit code. The build publishes both zcc.exe and zero.exe; either name accepts the same commands, for example zero run samples/hello-console.zasm.

File Types

The following file extensions are suggested for source code.

Ext Description
.zsrc, .z, .zero Zero source code file
.zasm Zero assembly code file
.zinc Include definitions (alt: zh)
.zproj Project files

About

Zero programming language for the x86 Architecture. The original "Zero" compiler project has been around since 2001

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages