Author Topic: what to do  (Read 16270 times)

nobody

  • Guest
what to do
« on: August 16, 2009, 03:28:28 PM »
I have made my first program, and I have downloaded NASM, and I was wondering how to compile the program. I am running Windows

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: what to do
« Reply #1 on: August 16, 2009, 05:18:07 PM »
Depends of which output format your first program is designed for. Nasm will make a dos .com file all by itself (will make a PE all by itself, too, but you probably don't want to). You will probably want to assemble your program using Nasm, and link it into an executable with a linker - possibly using a C compiler to call the linker for you. What other tools have you got?

Take a look at the nearby "who can compile it?" and other threads to get some ideas. If that doesn't help, give us a better idea what you're trying to do.

Best,
Frank

nobody

  • Guest
Re: what to do
« Reply #2 on: August 16, 2009, 05:29:00 PM »
but how do i get to that assemble step? linking comes second, I just want a window to come up that says hello world, I don't care yet about linking it and turning it into an executable

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: what to do
« Reply #3 on: August 16, 2009, 05:46:00 PM »
nasm -f win32 myprog.asm

But if you want a window to come up and say "hello world", you're going to have to turn it into an executable some way. Nasm will do this in one step "nasm -f bin -o myfile.exe myfile.asm"... *if* you've got the proper code to create the header, etc. I doubt if you do, but we really don't know what your "first program" is.

Best,
Frank