Author Topic: Nasm for Linux Puppy Slacko  (Read 15148 times)

Offline fixit

  • Jr. Member
  • *
  • Posts: 23
Nasm for Linux Puppy Slacko
« on: May 03, 2014, 11:14:12 PM »
I installed Nasm in Puppy Slacko 5.60.

I previously programmed in assembly  for Windows XP.

Is Nasm a command line only program ?

Looking for and appreciate any help.

Thanks.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Nasm for Linux Puppy Slacko
« Reply #1 on: May 04, 2014, 02:01:05 AM »
Hi fixit,

Congratulations for "graduating"! Welcome to the forum.

Yeah, Nasm is a command line tool. Not necessarily "only" - it can be run from an IDE. The only one I've used is by Jeff Owens. I think there may be updates. This is what I've got:

http://home.myfairpoint.net/fbkotler/asmtools-0.9.69.tar.gz

I'm a "command line guy" and don't actually use an IDE (or his library, etc.). Jeff's "asmref" is excellent, and is worth the entire download (IMO). Available as "pop up help" from the IDE if you're using it. Jeff's become a little "hard to find" (linuxasmtools.net appears to be dead) but there's a google group, I think. I'll try to find out more if you're interested in this kind of thing.

If that's not what you had in mind, what kind of help were you looking for?

Best,
Frank


Offline fixit

  • Jr. Member
  • *
  • Posts: 23
Re: Nasm for Linux Puppy Slacko
« Reply #2 on: May 07, 2014, 02:16:25 AM »
Thanks Frank.

Good to hear from you.

I having looking for quite a while at the different programming languages available under Linux.

Nothing has really worked well.

I would like to write both console and GUI programs to run under Linux.

Thanks,
                Andy

Offline fixit

  • Jr. Member
  • *
  • Posts: 23
Re: Nasm for Linux Puppy Slacko
« Reply #3 on: May 07, 2014, 02:19:43 AM »
How do I install asmtools ?

Does it need to be compiled first ?

Andy

Offline Gunner

  • Jr. Member
  • *
  • Posts: 74
  • Country: us
    • Gunners Software
Re: Nasm for Linux Puppy Slacko
« Reply #4 on: May 09, 2014, 01:45:03 AM »
Andy, just download it and look at the archive!  Personally, I use Geany for my source/projects, and make files to Assemble/Link.

Writing console apps on Linux are a breeze using INT 80H (32 bit), syscall (64 bit) or the C Library.  GUI apps on the other hand are a different beast compared to Windows.  There is no OS supplied API (Well, you could always us the X Server).  For GUI apps with NASM, look into GTK+.  It is awesome and easy to use.

Just fire up PPM (I think that is puppys package manager) and install Geany, GTK+ and any other programming tools you find.

Offline fixit

  • Jr. Member
  • *
  • Posts: 23
Re: Nasm for Linux Puppy Slacko
« Reply #5 on: May 09, 2014, 02:15:21 AM »
Andy, just download it and look at the archive!  Personally, I use Geany for my source/projects, and make files to Assemble/Link.

Writing console apps on Linux are a breeze using INT 80H (32 bit), syscall (64 bit) or the C Library.  GUI apps on the other hand are a different beast compared to Windows.  There is no OS supplied API (Well, you could always us the X Server).  For GUI apps with NASM, look into GTK+.  It is awesome and easy to use.

Just fire up PPM (I think that is puppys package manager) and install Geany, GTK+ and any other programming tools you find.

Gunner,

Are you the same Gunner who used to use a machine gun as your avatar ?

Please keep in mind my Windows background. :-)

I looked at the archive.

I am used to Windows where you install with a few clicks and get programming.

I have Geany.

I will need some single stepping thru this for some of it.

Andy

Is there some way of  avoiding the Key Captcha ?

I am an old far* with diminishing abilities.

Offline Gunner

  • Jr. Member
  • *
  • Posts: 74
  • Country: us
    • Gunners Software
Re: Nasm for Linux Puppy Slacko
« Reply #6 on: May 09, 2014, 03:19:33 AM »
Quote
Are you the same Gunner who used to use a machine gun as your avatar ?
I hope so  ;)

Quote
I am used to Windows where you install with a few clicks and get programming.
You can still do the same in Linux.  Many distros come with a package manager

I find using Linux and NASM, much more liberating and powerful than using MASM and Windows.

Since you have Geany, all you need to do is create a project then, create a new file called makefile and save that to your project directory.  To Assemble and link your source into an exe, just press shift + F9 and that will run make on the makefile.

This is a simple makefile that I use:
Code: [Select]
APP=fslc

all: $(APP) clean

$(APP): $(APP).o
gcc -s  -o $(APP) $(APP).o `pkg-config --cflags --libs gtk+-3.0` -lcurl -export-dynamic

$(APP).o: $(APP).asm
nasm -f elf64 $(APP).asm -F dwarf

clean:
rm $(APP).o

I save that file as a read only file, and just add it to new projects and change the APP name.

Once you get over some syntax differences and usage of Linux, it is a breeze.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Nasm for Linux Puppy Slacko
« Reply #7 on: May 09, 2014, 06:16:30 AM »
Hi Andy,

You should be able to untar the archive, move into the top directory and just do "make install". However... I'm getting an error from tar. I'll try downloading it again, but my copy may be bad (how far did you get?). It should be available elsewhere. You may be better off with Geany, but that asmref is a gem. I'll look into it - remind me, if you need to.

Sorry to be so brief. Usually I enjoy chatting about asm, but I haven't been "in the mood" lately. I hope I'll get back into it, but that "old far* problem" is getting pretty bad for me. You have my sympathy on that.

Best,
Frank