Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: Expression to ASM

  1. #11
    @ VilleK my assembler/compiler already handles if, while, repeat and for statements, these are the simple things, they are just cmp and conditional jmp statements, check here to see documentation on control structure http://www.codeziron.com/index.php?page=documentation (all documentation is unfinished) if you mean multiple inline comparisons then yes it is a bit more complicated, i plan to add that next, it still is much more simple than maths expressions since you are not changing registers and so on (which is my main problem - since i dont want it to affect the users code) as for .NET - it is the destruction of programming......i would never advise anyone to even touch any language that is .NET (especially for games)

    as for checking it why, why dont you? it is available for download @ http://www.codeziron.com and of course it is faster than c since it is primarily assembly lol.....c is a nice language but it is still just a compiler and compilers can often struggle to generate optimised code, humans can optimise code far better than any compiler (if they know what they are doing of course)

    @ chronozphere, i do not use a seperate assembler, i am writing the assembler, that is what my project really is, it started as just a regular assembler, but now it is becoming its own language, with high level code etc... my compiler also has a built in linker, compile speeds are also very fast (but they will be much much faster once i fix all bugs etc) and machine code is actually quite easy once you get the hang of it

    here is a sample of ziron code for creating a dialog from resource (very simple sample)

    Code:
    program WIN32GUI 'Sample1';
    
    #resource 'dialog.RES';
                
    //the included RTL files    
    #include 'ziron32.zir';
    #include 'smm32.zir';
                    
    #include 'comctl32.zir';
    #include 'kernel32.zir';
    #include 'user32.zir';
    #include 'messages.zir';
                              
    function dlgFunc(DWord hDlg; DWord uMsg; DWord wParam; DWord lParam) {
      if (uMsg == WM_CLOSE) {
        EndDialog(hDlg, 0);
      } elseif (uMsg == WM_INITDIALOG) {
        ShowWindow(hDlg, SW_SHOWNORMAL);
      }
      return false;
    }
                    
    DWord hInstance = GetModuleHandle(nil);
    DialogBoxParam(hInstance, 1000, 0, @dlgFunc, 0);
    ExitProcess(0);
    anyways check it out.
    Last edited by Colin; 30-05-2011 at 06:18 PM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •