Page 1 of 1

NASM for Linux

Posted: Sun Feb 17, 2002 2:02 am
by Whatever5k
I decided to use an assembler file for startup and then call the main C-function (because of the problems I get, when I want to include my Multibootheader in C).
So I will use NASM. My questions:

1. Where can I get information on the syntax of NASM?
2. Where can I get a good tutorial for programming under Linux using NASM?

Re: NASM for Linux

Posted: Mon Feb 18, 2002 7:06 pm
by roswell
Hi,

You can try the official Website of Nasm for the syntax.
http://nasm.octium.net/

If you need a tutorial, I can send you my multiboot NASM Code.

Roswell

Re: NASM for Linux

Posted: Wed Feb 20, 2002 10:00 am
by K.J.
This is the Linux Assembly howto, it has a section on NASM:

http://www.linuxdoc.org/HOWTO/Assembly-HOWTO/index.html

K.J.

Re: NASM for Linux

Posted: Sat Feb 23, 2002 2:25 am
by Whatever5k
Hm, I saw some code that looked like that:

.
.
.
dw 'ab'
dw 'bc'

What does the dd mean? I think it stands for double word, but I always thought you have to declare a variable like this:

variable1 dw 'ab'
variable2 dw 'bc'

What's wrong?

Re: NASM for Linux

Posted: Sat Feb 23, 2002 4:09 am
by eidolon
"variable1" and "variable2" are actually nothing but memory references to the assembler progam.

There is probably a reference lurking nearby. If so, the address to this information is known because it's location is determined by the size of the surrounding data (or code).

It could also be some good old turkey stuffing. ;)

Re: NASM for Linux

Posted: Sat Feb 23, 2002 4:52 am
by Whatever5k
What is 'lurking'?
So you mean, that the memory is reserved without beeing pointed by a variable name? If yes, what is that good for?