Ziron Programming Language - Assembly Based

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

Previous topic - Next topic

OverHertz

sorry i do not understand, and the samples are not meant to be full programs written for you, they are just samples of the language syntax etc. But if you explain more in detail what you mean, maybe i can make some changes/additions  :U

i think you still do not understand it is a console that displays nothing, it is not supposed to show anything - so maybe you did not understand the readme.txt, you need to connect to it with telnet via (cmd.exe)

as for usability, it is just like any other compiler, it has an executable that assembled a file, it is possible to drag and drop a .zir file onto the exe and it will startup and assemble it (creating the exe in the same dir as the .zir file)
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

OverHertz

just to mention i have released an update today (version 1.1.20.2) containing 7 samples.

string sample - creating/using strings.
using classes - how to use a class.
remote app - example showing opening another process.
loadfs - how to use internal macro "loadfs".
simple message server - a simple winsock hello world message server.
using directives - how to use some of the directives.
api window - creating a GUI window using the win api.

if anyone has suggestions for more simple samples or would like to contribute some sample, please let me know :)
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

OverHertz

thought i would post to show about some updates i have been working on, primarily for interfaces and improving classes (inheritance etc)

a directx9 sample application that can be compiled with the upcoming release


program WIN32GUI 'DX9Sample';

#include 'user32.zir';
#include 'kernel32.zir';
#include 'messages.zir';
#include 'colors.zir';

#include 'directx/direct3d9.zir';

//////////////////////////////

//directx globals
D3DPRESENT_PARAMETERS presParams;
/////////

//other variables
tagWndClassA wndClass;
tagMsg msg;
DWord hInstance = GetModuleHandleA(nil);
//

//handles
DWord hMainFRM;
//

//////////////////////////////


function WindowProc(DWord hWnd; DWord uMsg; DWord wParam; DWord lParam) {
if (uMsg == WM_COMMAND) {
eax = DefWindowProcA(hWnd, uMsg, wParam, lParam);
ret
} elseif (uMsg == WM_DESTROY) {
PostQuitMessage(0);
} else {
eax = DefWindowProcA(hWnd, uMsg, wParam, lParam);
}
}


const className = 'ZMainFRM';


wndClass.hbrBackground = COLOR_BACKGROUND;
wndClass.hInstance = hInstance;
wndClass.lpszClassName = className;
wndClass.lpfnWndProc = @WindowProc;

RegisterClassA(@wndClass);
hMainFRM = CreateWindowExA(0, className, 'Ziron DirectX9 Demo', WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 1024, 768, 0, 0, hInstance, nil);
ShowWindow(hMainFRM, SW_SHOWNORMAL);

presParams.hDeviceWindow = hMainFRM;
presParams.Windowed = True;
presParams.BackBufferWidth = 1024;
presParams.BackBufferHeight = 768;
presParams.BackBufferCount = 1;
presParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
presParams.AutoDepthStencilFormat = D3DFMT_D24X8;
presParams.EnableAutoDepthStencil = True;

IDirect3DDevice9 dx_device;
IDirect3D9 dx_object = Direct3DCreate9(D3D_SDK_VERSION);

edi = dx_object;
eax = edi.CreateDevice(0, D3DDEVTYPE_HAL, hMainFRM, 64, @presParams, @dx_device);

//edi as nothing;

edi = dx_device;
push esi;
esi = 0xFF000000;

// Set up message loop
while (eax <> WM_QUIT) {
edi.clear(0, nil, 3, esi, 1.0, 0);
edi.BeginScene;
//
 
//render something here :)
 
//
edi.EndScene;
edi.Present(nil, nil, 0, nil);
 
add esi, 0x512

eax = PeekMessage(@msg, 0, 0, 0, 1);
if (eax) {
TranslateMessage(@msg);
DispatchMessageA(@msg);

eax = msg.message;
}
}

edi as nothing;
pop esi

ExitProcess(0);


creates window, inits directx9 and changes window colour, assembles as a 3kb exe :)
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

OverHertz

today just now i released the new version of the assembler, along with 2 new samples (now 9 in total) - the macro system is becoming more advanced and much more useful, macro variables can be assigned complex expressions such as


$var = (5+4* 4 shl 3-1 xor 5)*4-2+(5*5 shr $anothervar+5*5+(2+4*2))*5 % 5 or $yetanothervar and SomeMacroFunc();
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

Emil_halim


Nice work OverHertz.

when will Ziron be solid?

how to include COFF files which output from another language with Ziron code?

Twister

Not to bash you, but getFileExt('This is a filename.jpg.txt'); is bad - very, very bad.

OverHertz

#36
Quote from: Emil_halim on October 21, 2011, 07:15:08 PM

Nice work OverHertz.

when will Ziron be solid?

how to include COFF files which output from another language with Ziron code?


Thanks, Ziron will be constantly improved and updated dependant on requests, it will also be possible for others to improve the assembler via plugins with a further release, as for included COFF files, once i am satisfied that the language has enough support and a good user base i will begin adding support for including lib/coff files and other misc things :)

Quote from: Horton on October 22, 2011, 03:30:30 AM
Not to bash you, but getFileExt('This is a filename.jpg.txt'); is bad - very, very bad.

and why is that? :)

ps: the only thing i see "bad - very, very bad" is your comment, along with other useless, unhelpful comments... lol
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.

OverHertz

thought I'd mention to anyone interested... about a new release of Ziron that finally supports the new plugin system.. it is pretty basic for now but it has a supplied sample plugin with it too along with the basic documentation.

for those interested, you can check it out here
Download the Ziron Assembler
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.