← Go back

Ziron Programming Language


Posted on October 17, 2017 at 02:17 (GMT +00:00) by Colin

"Ziron" (pronounced "zi ron") is a x86 / x86-64 programming language for Microsoft Windows. Ziron mixes a low and high level syntax containing assembly instructions and high block code statements such as if, while and repeat. The Ziron assembler is developed and maintained by Colin J.D. Stewart and has been under development since early 2011.



The concept of the Ziron language is to increase popularity of programming with assembly with the benefits of mixing high and low level code.

Ziron is the first assembler with an inbuilt plugin system, allowing for advanced modifications and extensions to the assembler and the base language.

== Features ==
* Classes / Object Oriented Programming (OOP).
* Enum, Structs, Typedef, Union, If, While, Repeat statements are among some of the high level features.
* Inline macro system, providing a way to extend the assembler/language.
* Easy to learn syntax similar to c, pascal and plain assembly.
* Plugin System and API.
* stdcall, cdecl, fastcall and zircall calling conventions.

== Samples ==
The following sample is a simple "Hello world program" - a full functioning console application.


program WIN32CUI 'Hello World';

//included files
#include 'console.zir';

//show the hello world message and wait for a keypress
wait_key('Hello World!');

//exit the program gracefully.
ExitProcess(0);


Sample function in Ziron:

function getFileExt(char* path) {
  eax = path;
  ecx = xor;
  while (char[eax] != 0) {
    if (char[eax] == ".") {
      ecx = eax;
    }
    eax++;
  }
  
  if (ecx) {
    eax = ecx;
    eax++;
  }
}


Optimised version of getFileExt:

function getFileExt(char* path) {
  edx = path;
  al = [edx];
  
  if (al != 0) {
    ecx = edx;
    al = [edx+1];
    edx += 2;

    repeat {
      cmp al, "."
      cmovz ecx, edx

      al = [edx];
      edx += 1;
    } until (al == 0);

    return ecx;
  }

  eax = edx;
}


Official Sites
* CodeZiron.com