Well, I haven't written an x86 boot loader since about 1986 or 1987... Since there isn't anything at line 29, the assembler has probably skipped over the empty lines, meaning that the error is really at (just a guess) line 34 or 35 in your code. However, I see that you are using the 32bit eax and similar registers. Standard BIOS's boot in 16-bit mode (still, AFAIK), which means you have ax, bx, cx, and dx 16-bit registers at boot, so even if it compiles (assembles), it may not work as a boot loader. I am right now looking at my Intel 8086 User's Manual from October 1979... :-) In any case, once you load the boot code from disc, you can switch to 32-bit mode (setting up the GDT and such as I see you are doing) on todays' computers and go from there. The general operation as I recall it was simply to call the disc load bios interrupt (13h) which will load the sector read (512 bytes) into memory at a specific location, which you then jump to + the current offset, and continue executing the instructions found there. As I said, I haven't done this for about 25 years so 1) things change, and 2) I don't remember all of the details, though somewhere in my boxes of old floppies I have the original code. Less the partition table on a HD, it is amazing how much you can do in 512 bytes of pure machine code! :-)
Anyway, unless your professor has explicitly forbidden it, you should disassemble the boot code on a modern computer to see what they are doing, assuming you haven't done that already. There are systems with 32-bit bioses, but they are not compatible with older operating systems (MS-DOS for example), so they also have to support the old 16-bit mode as well.
Finally, FWIW, here is a link to a good Wikipedia article on x86 bootloaders: http://en.wikibooks.org/wiki/X86_Assembly/Bootloaders
rubberman
Posting Maven
2,676 posts since Mar 2010
Reputation Points: 378
Solved Threads: 316
Skill Endorsements: 53