NASM -fbin form of output creates a machine code binary file without any overhead of object file structures required for the various object file Loaders, such as ELF or COFF or PE or whatever. Those object file formats require a respective Loader to load those into memory, under the guidance of a respective Operating System. But here we explore -fbin and see to where it leads us.
Q. Hey, do you have an example of a floppy boot loader written in NASM?
A. Yes, see:http://www.vnutz.com/content/program_a_bootstrap_loader Although I recommend a few changes to that code. The Load point of 0050:0000h is better changed to 0100:0000h, and the stack is better placed at SS:0000h SP:7C00h, which is just below the RomBios load point of where it reads the floppy boot sector to. The location 0050:0000h actually holds a state flag for the [Print Screen] key, for one thing.
Q. Help, do you have a simple Hello World example to help me get started?
A. Yes, the lame 'HELLO.NSM'. I use the filetype .NSM to stand for Nasm .asm to distinguish from other asm syntaxes.
Q. Any tips on running NASM under Windows or XP?
A. Yes, here is a step by step on setting up a 'workspace enviornment' to run the dos version of NASM.EXE
BACK to main page