Ziron Programming Language - Assembly Based

Started by OverHertz, September 20, 2011, 12:50:02 PM

Previous topic - Next topic

OverHertz

Hi there, sorry if this is the wrong category, I found it quite hard to locate a category that is best suited, I was recommended to check this forum out as I hear it has many great assembly coders.

Over the past year i have been working on a programming language (on and off) - Currently the language is semi low/high level language, alot of asm syntax, however many higher level code, the idea is to build a objective assembly alike language, it current has support for many features and it grows by the day, If anyone is interested in checking it out it would be great to hear some opinions since it is a language i am building to increase popularity of programming in ASM.

A small sample of the syntax


ZPtrList myIntList;
myIntList = new ZPtrList;
edi = myIntList as ZPtrList;


for (ecx = 1 to 1000) {
  edi.AddPointer(ecx);
}

edi.DeleteIndex(996);

for (ecx = 0 to 998) {
  eax = edi.GetDataByIndex(ecx);
  printd(eax);
}

edi.Deinit();

delete myIntList;


a few of the features listed:
Class support - OOP (Object Orientated Programming).
Extendable using inline function and procedure macro system.
Supports already alot of opcodes. Many things have been simplified such as assignment. e.g.

mov eax, ecx
eax = ecx;

xor ecx, ecx
ecx = xor;

push 0
call ExitProcess

ExitProcess(0);

and so on, i will not go further into detail since this is a MASM forum, however bare in mind some of my ideas have came from the MASM assembler. The website of the language is @ http://www.codeziron.com for anyone interested in providing ideas and feedback.

-OverHertz
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

dedndave


OverHertz

hi thanks for the welcome :) - Ii will take a look at MasmBasic for further ideas.

just to add onto my first post....i have stated ziron as a compiler, however in reality it is an assembler with high level functionality, such as block statements like if, while, repeat and so on.

I wanted also to ask the opinion of an ASM community, does anyone think it is a good/bad idea to have plug-in support for the compiler/assembler. i.e. to output custom file formats, to add extra functionality to the compiler/assembler and so on?

Thanks,
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

dedndave

there are many such formats already defined for other IDE's
i think it would be best if you could use the ones that are out there

take a look at a few IDE's, editors, and debuggers to get some ideas

OverHertz

not sure what you mean by "many such formats already defined"

Ziron already has its own syntax, already usable to create applications etc, has built in assembler, linker etc
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

dedndave

well - there are DEF files, DBG files, and so on

fearless

Looks interesting, have to download and play around with it. Could be an option to add it as a supported language in RadASM.
ƒearless

qWord

Quote from: OverHertz on September 20, 2011, 03:55:08 PMI wanted also to ask the opinion of an ASM community, does anyone think it is a good/bad idea to have plug-in support for the compiler/assembler. i.e. to output custom file formats, to add extra functionality to the compiler/assembler and so on?
If the interface is well-conceived, it would make your compiler very powerfull.

qWord
FPU in a trice: SmplMath
It's that simple!

OverHertz

Quote from: fearless on September 21, 2011, 09:03:49 AM
Looks interesting, have to download and play around with it. Could be an option to add it as a supported language in RadASM.

that would be good idea.

Quote from: qWord on September 21, 2011, 10:19:40 AM
If the interface is well-conceived, it would make your compiler very powerfull.

originally i started working on an editor, which i will again in time, specially for the language, however anytime i spend on this project is specifically on the compiler/assembler (just a console app)

I also still have alot of documentation to write, i have only wrote very little, need to add write how to insert resources, using classes, structs, and many other things (some of the things already have samples, but only in the forum - at some point i will get round to it.

Thanks for the interest.

-OverHertz
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

TmX

Interesting.
Is it written in asm, or HLL?
BTW, I see the source code is not available. Will it be available sometime in the future?

OverHertz

Hi TmX it is written in a high level lang (alot of inline tasm), i plan to rewrite parts of into Ziron once i believe the language is fully ready... the reason i wrote in a HLL is for a quick prototype and faster additions to the feature-set.

in regards to the source, i have not yet decided that yet, in the future once there is a larger community i may consider that further :)
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

Vortex

Hi OverHertz,

Does your compiler create MS COFF object modules?

OverHertz

it can output pe-coff (exe or dll), both gui or cui - no object support (yet - it could/would be possible for someone to implement coff obj file output via a plugin)
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

jj2007

Quote from: OverHertz on September 20, 2011, 03:55:08 PM
hi thanks for the welcome :) - Ii will take a look at MasmBasic for further ideas.

Hi OverHertz,

It seems Ziron is very close to C, as your example shows:

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


The same in MasmBasic would look like this (a complete Win32 console app, by the way :bg):

include \masm32\MasmBasic\MasmBasic.inc   ; download
   Init
   Let
esi="This is a filename.jpg.txt"
   Inkey Mid$(esi, Rinstr(esi,".")+1)
   Exit
end start

Output: txt

Under the hood, MasmBasic is simply a library. Code assembles with Masm or JWasm and can be freely mixed with the Masm32 package and other libraries.

I understand that Ziron is a compiler. How do you handle assembler instructions? You pass them 1:1 to Masm? Can you use Masm32 macros in Ziron code?

Welcome to the Forum,
Jochen

OverHertz

Ziron is not just a compiler, under the hood, Ziron is an assembler itself, it does not rely on other assemblers and so on, it literally assemblers the instructions itself. It also has its own linker. So actually in comparison to MasmBasic, it would be possible to put a set of libraries together that will do just the same without the complexity :)

function getFileExt(char* path) - this would be like a MasmBasic library function just it is exposed since it is assembled by Ziron and no masm is in no way related to Ziron, as before it is a whole new assembler/language, however i have implemented a basic macro system via the inline keyword, if you check the include folder there is samples of macros.

so to compare that sample from MasmBasic you posted, a whole program build with Ziron to do what you have wrote >


program WIN32CUI 'Sample';

#include 'console.zir';
#include 'zirutils.zir';

eax = getFileExt('This is a filename.jpg.txt');

//output to console
println(eax);

ExitProcess(0);


the language i have build up from suggestions from friends and personal preference, the language of course resembles assembly, c and pascal with bits of uniqness in there too.

and thanks for the welcome :)
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.