views:

41

answers:

1

I am beginning some experimentation in writing a kernel and having fun doing it. I have the basic boot-loader done and the following directives:

[BITS 16]
[ORG 0x0000]

In the kernel tutorial, however, it starts with:

[ORG 0x0000]
[BITS 16]

I was wondering if the order in which these directives are given makes a difference? I am using NASM version 2.06rc2, OpenSUSE 11.2

+1  A: 

The latest NASM is at version 2.08, and judging by the documentation on the BITS directive..

The order should not make a difference since they tell NASM to generate a file with certain conditions, such as using 16 bits and addressing start at zero. From it, NASM seems to be smart enough to know what kind of output it will generate.

tommieb75
Awesome. Thanks for the link to the docs and the update.
dboarman