Author Topic: Announcing NASMX v1.0rc1  (Read 18896 times)

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Announcing NASMX v1.0rc1
« on: March 28, 2011, 12:36:59 AM »

The NASMX v1.0rc1 release candidate is now available for download.

You can now choose the appropriate download for your distribution:

The main difference between the two packages is that the Windows version includes pre-built tool-chain executables as well as a compiled nasm help file while the Linux package does not.

Linux 32-bit support is official once again.  Linux 64-bit support will come eventually.
Additional Linux demos have been added with more to come.
Many thanks to Bryant for allowing me to modify his examples for this release!

Please download your platform's package and give it whirl.
The macro framework is stable with some non-GUI examples being able to easily cross-compile.
Enjoy!  :)

Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Announcing NASMX v1.0rc1
« Reply #1 on: March 29, 2011, 10:00:20 AM »
I took a glance over the Linux edition and I had a suggestion. If you are going to be using Makefile's anyway, why not set the include path there? Have the user define an environment variable NASMX_DIR then use -I$(NASMX_DIR)/inc in your ASFLAGS.

Code: (makefile) [Select]
##### Makefile #####
NAME=example
AS=nasm
ASFLAGS=-f elf32 -I$(NASMX_DIR)/inc
LD=gcc
LDFLAGS =-Wall -s
LIBS =-lc

# [ Suffixes ]
# Change the suffixes to match your system environment
O           = .o
ASM         = .asm
INC         = .inc
LST         = .lst

OBJS = $(NAME)$(O)

all: $(NAME)

demo2: $(OBJS)
$(LD) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)

$(NAME)$(O): $(NAME)$(ASM)
$(AS) $(ASFLAGS) $(NAME)$(ASM) -o $(NAME)$(O)

clean:
rm *$(O) ./demo2

##### End Makefile #####

That way, the code doesn't have to use relative includes, it can use:

Code: [Select]
%include "nasmx.inc"
%include "linux/libc.inc"

You might need to provide a setpath.sh in the base directory of the NASMX package, but that wouldn't really be much different than the old setpath.bat in Windows :)

About Bryant Keller
bkeller@about.me

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Re: Announcing NASMX v1.0rc1
« Reply #2 on: March 29, 2011, 11:48:47 AM »

Do you think it also makes sense at this point to add in:

./configure
make
make install

as is normally done with other packages even though technically we're only interested in installing the include files?

Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Announcing NASMX v1.0rc1
« Reply #3 on: April 01, 2011, 10:17:52 AM »
Not really. I only suggested the makefile change because I never have liked the practice of using ../ to specify the include files, it just looks a little lazy. When setpath was first added to the project, I thought about doing the same thing for linux (setup.bat & setup.sh) to where it also configures NASMENV to contain the include settings for NASMX (ie running export NASMENV=-I$(cwd)/include/ while in the NASMX base directory for linux).

About Bryant Keller
bkeller@about.me