how to create EXEs with NASM...

Started by
23 comments, last by Crypter 16 years, 12 months ago
Quote:
thanks for the link! very helpful. though, someone said before that INT 16h isnt BIOS, but it is on here.

Actually, I dont see any IBM BIOS interrupts there.
Advertisement
Ok, keep in mind that this is hard - really hard

you might look at

http://developer.intel.com/products/processor/manuals/index.htm

That's the complete set of manuals for the IA-32 architecture.

Of particular interest to OS development are volumes 3A and 3B which
will tell you how to set up all the descriptor tables (Interrupt, Local and Global), switch to protected mode (if your bootloader doesn't already), and use the memory management stuff.

Also if you're doing OS development you should download a good emulator. Bochs is what people tend to use but I've always found it a bit obnoxious to set up and use. Qemu is another option that I prefer.
Quote:Original post by Crypter
This will do what you want it to do:

Hello.asm
*** Source Snippet Removed ***

Assemble as:
nasm -f bin Hello.asm -o Hello.bin

Copy Hello.bin to the bootsector of a floppy disk (or use an emulator),
and it will display "Hello, World!" -- without requiring any OS.

This should get you started[smile]


THANK YOU!!! I've been wondering how the heck a bootloader is made!
Quote:Original post by Crypter
Quote:
thanks for the link! very helpful. though, someone said before that INT 16h isnt BIOS, but it is on here.

Actually, I dont see any IBM BIOS interrupts there.


go to 'categories' and click BIOS. theres lots
Quote:
THANK YOU!!! I've been wondering how the heck a bootloader is made!

I should note that the code I posted isnt a "bootloader" in a sense,
it is "self booting". It is missing alot of details (ie, the actual
loading of the kernel ak, your EXE)

OSDev.org would be a great help here. Search for: GDT, pmode (Protected mode),
and kernel loading (EXE kernel).

I dont use EXE (I use ELF) so I cant help you with loading and executing EXEs.
OSDev.org is a great site[smile]

This topic is closed to new replies.

Advertisement