I found this REALLY COOL article over at CodeProject:
Writing a Boot Loader in Assembly and C - Part 1 (http://www.codeproject.com/Articles/664165/Writing-a-boot-loader-in-Assembly-and-C-Part-1).
Hi Zen,
Thanks for the article. :t It demonstrates the usage of both of asm and C to code a bootloader.
he also did part 2
personally, i don't think a bootloader is any place for a compiler :P
in IBM-world, you get 512 bytes
speed is not really an issue
but, you better manage every byte carefully
Quote from: dedndave on November 07, 2013, 07:02:55 AM
he also did part 2
personally, i don't think a bootloader is any place for a compiler :P
in IBM-world, you get 512 bytes
speed is not really an issue
but, you better manage every byte carefully
512 bytes is only for the loader. Syslinux use the boot loader really to load a system files sized of 512kbytes each. Dont worry about 512-bytes, just make sure it can read the first 100 sector of the rewriteable media. The rest should be fine.
Once Im planning to make my own FAT format, but then, I cancel it, Im confused thinking about the compatibility. Im planning to take 10% of the total size as a FAT, and 4-bytes on each sector point to the next sector for read to form a file.
Zen,
thank you for the link. It's very instructive also for starters. But I'm amazed already: No one has criticized the fact that he uses AT&T syntax. Strange.
Gunther
Hi Gunther,
You are right about the AT&T syntax. It's ugly and hard to read.
Quote from: Vortex on November 08, 2013, 08:20:07 AM
It's ugly and hard to read.
Yes, potentially more compiler friendly, but ugly and harder to read and type. He could have easily used Intel syntax, also for the inline assembly AFAIK. For an article aimed at beginners Intel syntax would have been a better choice, IMO.
Michael,
Quote from: MichaelW on November 08, 2013, 03:15:28 PM
Yes, potentially more compiler friendly, but ugly and harder to read and type. He could have easily used Intel syntax, also for the inline assembly AFAIK. For an article aimed at beginners Intel syntax would have been a better choice, IMO.
you're definitely right. Intel syntax is more widespread. On the other hand, AT&T syntax can help one by programming in assembly language for the PowerPC.
Gunther