Click to See Complete Forum and Search --> : what is wrong with this?
Mordeth
04-06-2001, 08:04 PM
I am making a simple bootstrap in NASM and in almost all the tutorials I see, it declares a word-sized variable that holds the bootstrap signature but with no label. For example, it declares "dw AA55h" instead of something like "bootsig dw AA55h". Anyway, I did exactly as the tutorial explained and put a plain "dw AA55h" at the end but when I assemble it, it gives me an error saying "undefined symbol 'AA55h'". Can anyone help me with this problem? I am kinda new to assembly. Thanks!
Qubit
04-07-2001, 05:11 AM
AA55 is the magic number for the Bios. Did you make sure it's at byte 510? Also, remember that bootsectors don't have a header. (It can be a mess to get the compiler to compile it as a header-less file, so I suppose you better strip the headers and the unneeded sections and manually insert a 'AA55' at 510 with a hex editor)
Mordeth
04-07-2001, 01:38 PM
nevermind I got it. Thanks for replying though :)
Qubit
04-07-2001, 04:26 PM
NP at all, now that I looked again, I noticed that nasm also compiles plain binary files, which I didn't know :)