I am studying assembly language, I followed http://mikeos.berlios.de/write-your-own-os.html steps, for make a bootable graphic game, but I have a problem: I can't use more than 512 bytes of memory for my program.
How can I solve this problem?
I appreciate any help.
Here my code (still smaller than 512 bytes): http://pastebin.com/i6ehx8dT
Edit: I solve my problem, here a minimum example of floppy bootloader made in assembly language 16 bits: http://pastebin.com/x1SawyjN
Finally this link was very helpfully: http://www.nondot.org/sabre/os/files/Booting/nasmBoot.txt
This is not easiely done:
In fact the BIOS only loads the first 512 bytes of the disk into memory.
What you have to do then is load the rest of the data into memory. This is typically done using interrupt 13h (sub-functions AH=2 or AH=42h).
If you exactly know where on the disk the data is located this is quite easy. For this reason boot loaders like GRUB use well-known locations - unfortunately such locations are sometimes overwritten by other programs like copy-protection drivers.
If you need to load from a well-defined file system (e.g. FAT or NTFS) this is more tricky: You have only ~450 bytes of space (because ~60 of the 512 bytes are used by the file system internally) for code that interprets the data of the file system, finds the file containing the code and loads it into memory!