Zero Compiler
| Zero Project | |
| Image:Xeno-logo-0.1 - glow.png | |
| Author: | Damian J. Suess |
|---|---|
| Developer: | Xeno Innovations, Inc. |
| Initial release: | 2008 |
| Latest release: | Zero (pre-α) v0.1.5 / Oct 2007 |
| Preview release: | Zero (β) v0.5 / 2008 |
| Programming language(s): | C++ |
| OS: | Microsoft Windows, Linux, MAC |
| Platform: | x86 and x64 |
| Available language(s): | English |
| Status: | Active |
| Genre: | Compiler |
| License: | Open Source |
| Website: | XenoInc.org |
Zero is a new 32-Bit & 64-Bit object-oriented programming
language by Xeno Innovations, Inc. (formerly
Static Industries). Source code to the project is under a Private-Source license, meaning you can only obtain it via request.
Introduction
The project's initial designs loosely began back in 2001-2002 by Damian J. Suess, CEO of Xeno Innovations, Inc. and ground finally broke in late 2006 as a demand for a quick, reliable & bare-bones language was needed. Language specifications emphasize on keeping close to Assembly roots as much as possible for quick-executing code & small output file size ~1KB for EXEs. Though the roots are Assembly, the language still provides the software engineer and hobbyist alike with an easy, fast and customizable language.
The Zero Compiler's main goal is to target major Operating Systems such as Windows, MAC and Linux. The initial design of the compiler will output to the Portable Executable (PE) format and will soon extend to Objects: ELF or COFF (classic or MS) and Executables: MZ, ELF or PE format.
The main idea behind Zero is to allow for multiple languages to be inside of one, similar to .NET. However it currently only supports 2 formats: Zero & ASM (Intel-Native).
Zero's basis is open source, not just for the compiler project but the keywords used when compiling a project. The reason behind allowing the programmer to modify the keyword code is to allow them to target the architecture on the machine which they are deploying the project on.
Code Structure
Zero allows the Software Engineer fully use all aspects of High and Low Level Programming. Most common usage will be the Ideal Zero coding style for it's quick C/BASIC style of programming. As Zero matures, future plans are set to push away from the C-style coding and more towards a coding structure what past VB and newer C# programmers are use to. Which means rather than all Window Procedures being under one call-back function, event functions will be under their own. I.E. Button1_Click()
Ideal Zero v0.1
Early code examples (v0.1 below) is very similar to a C++ and VB hybrid. As the language matures, you will see the full advantage of the OOP Language as well as the easy to use IDE for creating Windows-based projects.
#Option compile_type = EXE:GUI:PE; // EXE, DLL (axDLL,axOCX,TLB) : GUI,CUI : PE,COEFF,MZ
#Option output_name = "hello.exe"; // Project output name w/o extension
Import dword MessageBoxA (dword hWnd, str lpText, str lpCaption, dword uType) lib "user32.dll";
Import void ExitProcess (dword uExitCode ) lib "kernel32.dll";
const MB_OK = 0x00000000&;
redefine MessageBoxA MsgBox; // Used to redefine API & Constants
// ========================================================================
// Note: 'win_main()' is the default entry-point for EXE:GUI:PE
// ========================================================================
void win_main(){
MsgBox( 0, "Zer0 0.1 Test Message", "Test Message", MB_OK);
ExitProcess( 0 );
}
Assembly Injection
Below is and example of v0.1 (pre-alpha) Assembly Coding. The Assembly Coding style is adopted from Flat Assembler v1.x, which is slightly different from Ideal TASM code.
#Option compile_type = "EXE:GUI:PE"; // EXE, DLL (axDLL,axOCX,TLB) : GUI,CUI : PE,COEFF,MZ
#Option output_name = "hello.exe"; // Project output name w/o extension
#Option zero_ver = 0.1; // Compiler Coding Style (for legacy support)
#Option base_address = 0x400000; // Force Memory Address
#Option entry = "win_main"; // Program entry point
Import dword MessageBoxA () alt "MsgBox" lib "user32.dll";
Import void ExitProcess () lib "kernel32.dll";
const MB_OK = 0x00000000&; // the & sign forces the hex to be DWORD;
asm(".data", readable + writable){
flags dd ?
caption db "Zero Win32 Assembly Program" & 0x0
message db "Hello World!" & 0x0
}
asm(".code", readable + executable){
win_main:
mov [flags], MB_OK
push [flags]
push caption
push message
push 0
call [MsgBox]
push 0
call [ExitProcess]
}
External Links
You can watch or help the open source project grow:
- Zero - Zero Project on SourceForge.net
- Xeno Innovations' - Website (contact us to program software for you)
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)



