Author Topic: NASMX v1.0 BETA Officially underway  (Read 6499 times)

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
NASMX v1.0 BETA Officially underway
« on: August 05, 2010, 03:19:45 AM »
I'm pleased to announce that NASMX v1.0 BETA is now officially underway! Basic Unicode support and nested structures are officially supported. Please note that the file available for download from SourceForge contains win32 code only. Official Linux/BSD/OSX support will become available "real soon now", however you can use the win32 demos 1 - 7 to see how Unicode and nested structures will eventually work on those environments.

The NASMX SourceForge SVN /trunk now contains this code. You can check out at:
Code: [Select]
svn co https://nasmx.svn.sourceforge.net/svnroot/nasmx/trunk

Win32 Demos 1 - 7 are all fully Unicode aware and show examples of how to use the new NASMX typedef interface. Simply -dUNICODE on the command line or within the Makefile and you'll get Unicode output.

Please be advised that although I've officially released this code it is NOT production ready. This is still considered BETA and I need testers to verify that it works as advertised. There is still much to do so expect a few more beta releases this month. The file contains everything you need to build on win32. It is not an installer but rather a simple .zip file.

Get the file at http://sourceforge.net/projects/nasmx/

Requirements:
 Nasm v2.09rc5 (included in download)
 GoLink/GoRC   (included in download)

SET PATH=YOURNASMXINSTALLPATH\bin;%PATH%

Known Issues:
* 64-bit proc/invoke are not yet supported.
  The foundation has been laid to support 64-bit development and this will become a reality shortly after the official release of Nasm v2.09

Please download the release, test demos 1 - 7, and play around with the code. Provide feedback here in this thread so that we can all be on the same page.

Thank you for your time and effort!

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: NASMX v1.0 BETA Officially underway
« Reply #1 on: August 06, 2010, 03:52:27 AM »

**** Updated ****

It's easier to download the software now.
To get the complete package for win32 development click the following link:

http://sourceforge.net/projects/nasmx/

Click the big green download button and you'll get a nicely pre-packaged .zip file that you can download, extract, and play around with.

If you need a zip unpacker get 7-Zip: http://sourceforge.net/projects/sevenzip/

Win32 developers - make sure you: SET PATH=YOURNASMXINSTALLPATH\bin;%PATH%

All 13 demos are now fully Unicode aware and NASMX v1.0b2 provides full support of nested structures and unions.
Demo 13 currently shows a nice example of how you can put this in your source code although the syntax "may" change slightly as I feel it is a bit "wordy".

The compile time is rather slow due to the way Nasm itself performs preprocessing. The preprocessor IS being worked on and hopefully we'll see it in the next "official" Nasm v2.09 release.

Linux developers - This package also includes the full beta source to make it easier for the Linux users to obtain and examine the code as well. Note that currently you will need to replace the binaries contained in the nasmx/bin/ directory with the Linux version of Nasm v2.09rc5 (required to compile successfully).
The code in the nasmx/demos/linux and nasmx/inc/linux is still from the original NASMX 2009-01-12 release.

I would like to continue the NASMX tradition of separating out the differences between Windows/Linux and will eventually create download packages for each environment. However, for the immediate future expect to see one all inclusive download.

The one major change from the prior version is that the typedef and struc macros you should use now begin with NASMX_. For example, the NX_PTR is now NASMX_PTR. This makes it more consistent as to what code your own source files should contain. The macros contained within NASMX.INC that start with NX_ are used internally and should not be called from your own source (unless you understand what their purpose is).

Four macros that you CAN use are the sizeof(), typeof(), reserve(), and declare(). You can see examples of their use in the win32 demos directory.

Again, please download, extract, and test. Your feedback is invaluable.  Thank you.

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: NASMX v1.0 BETA Officially underway
« Reply #2 on: August 11, 2010, 12:23:39 AM »
Make it work, then make it work better, stronger, faster...

The latest beta update is now NASMX v1.0b3.

http://sourceforge.net/projects/nasmx/

This version includes the following:

Fixed

* Nested unions were not properly calculating offsets from root structure.

New

* Nasm v2.09rc6 is now included in this release (along with GoLink/GoRC) in the /bin directory.

* Nameless nested structures and unions
This feature allows the creation of complex structures without requiring a predefined structure definition.
nasmx/demos/win32/demo13 shows how powerful and easy this is now.

* NASMX_ALIGN
This macro permits the developer to properly align structure field variables when using NASMX.
You can already see this in action in the new /inc/win32/dde.inc file which also makes use of nested unions.
The argument to this macro should be a power of 2, ie: 2, 4, 8, 16, 32, 64 and will align the next field or end of structure on that boundary.

Speed Ups
* Macro to macro calls performed within the nasmx.inc file are now inlined to speed preprocessing. This reduced compile time of the win32 demos by 2 seconds each.  The 4-5 second compile time is due to the preprocessing which occurs on the currently huge (soon to be put on a diet) windows.inc file.

Todo

The following represent major time involvement to bring NASMX up to date:

* Separation of windows.inc into individual files will help preprocessing tremendously. It should also make it easier to manage since the goal is to more closely follow the Microsoft SDK header structure where it makes sense to do so. For example, the very first file separated is /inc/win32/dde.inc

* Fix the various windows structure definitions. Many of the old NASMX-2009-01-12 windows structures are invalid. For example, compare the old NASMX-2009-01-12 windows.inc DDEDATA structure to the new NASMX v1.0b3 dde.inc DDEDATA structure for why this is.

* Bitfields - How to (should we?) generalize and integrate:
struct {
   unsigned short fVar1:8,
                  fVar2:4,
                 unused:4;
}

* 64-bit support
Now that the structure/union and typedef system appear to be more stabilized 64-bit support will gain greater importance. We'll have another future beta release once the 64-bit support code has been merged in and tested.

There is plenty here to chew on, so please download and test. Thank you!

Offline Borneq

  • Jr. Member
  • *
  • Posts: 26
Re: NASMX v1.0 BETA Officially underway
« Reply #3 on: August 11, 2010, 02:31:31 PM »
Thanks, it is that I search. I beginner and I compiled demo1.asm and link with GoLink.exe. Debugger Gdb did not recognize exe format. I try to link with ALink but unresolved _MessageBoxA@16 and _ExitProcess@4 which are from DLL. What about name _ExitProcess@4 - in kernel32.dll  is ExitProcess without mangling

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: NASMX v1.0 BETA Officially underway
« Reply #4 on: August 11, 2010, 04:26:11 PM »
Use the linker provided with the download package (GoLink.exe) which provides proper resolution of DLL import names under Windows. GoLink also has 64-bit support which, as indicated above, will be fully supported in a near future beta release of NASMX.

Offline Borneq

  • Jr. Member
  • *
  • Posts: 26
Re: NASMX v1.0 BETA Officially underway
« Reply #5 on: August 11, 2010, 06:18:22 PM »
I can't debug with GDB. GoBug.Exe is demo version but OK.
How insert debug informations in file?

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: NASMX v1.0 BETA Officially underway
« Reply #6 on: August 12, 2010, 06:06:07 AM »
ahhh...debugging...
one of the win32/64 Nasm coder's sore spots.  The best I can help you with here is that when using GoLink add
"/debug coff" to the command line and become very familiar with WinDbg/CDB. Especially helpful is the symbols tables needed to trace over ntkernel calls.

check out this excellent link regarding CDB:
http://www.codeproject.com/KB/debug/cdbntsd.aspx

Hope this helps!  ;)

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: NASMX v1.0 BETA Officially underway
« Reply #7 on: August 18, 2010, 04:11:38 AM »

Now available for your documentation viewing pleasure is a compiled Windows Help File for Nasm called NASMDOC.CHM which is available at:

http://nasmx.svn.sourceforge.net/viewvc/nasmx/trunk/

This file includes the most recent Nasm v2.09rc6 documentation updates. I will be incorporating this file into the next beta release download of NASMX (v1.0b4) but thought you may want to look at it before hand. Simply click on the filename and on the next page click on the download link to get a copy.

Enjoy.  :D