I am new to developing OSs and was looking for some help.
I have several asm files that have methods in them. I need to run these from another asm file.
I think I need an %include, but I have had no luck in getting it to work.
Any help is great!
Using more than one file?
Using more than one file?
Programming is like fishing, you must be very patient if you want to succeed.
Re: Using more than one file?
Linking.
Re: Using more than one file?
Got it! Thanks!
How would I go about running a file on a floppy in a bootloader?
(I have no interest in using GRUB)
How would I go about running a file on a floppy in a bootloader?
(I have no interest in using GRUB)
Programming is like fishing, you must be very patient if you want to succeed.
Re: Using more than one file?
One simple way is to not have a filesystem, and just treat the disk as a collection of sectors. Use a disk editor to write your file to a known location, then have your bootsector load it into memory and execute it. It's a quick way to get started, but it's also least flexible way.
An alternative route, which requires more work up front but makes things easier afterwards, is to write a bootsector that's capable of reading the root directory of a simple filesystem, locating a particular file, then doing the necessary work to load it into memory (however it may be laid out on the disk) before executing it. Assuming a simple FAT-formatted floppy, you can then just copy your file to it without resorting to special tools. And that file can be anything you want, from a simple "Hello, world!" test at first to a complete second stage bootloader capable of doing all the things you couldn't squeeze into your initial bootsector.
An alternative route, which requires more work up front but makes things easier afterwards, is to write a bootsector that's capable of reading the root directory of a simple filesystem, locating a particular file, then doing the necessary work to load it into memory (however it may be laid out on the disk) before executing it. Assuming a simple FAT-formatted floppy, you can then just copy your file to it without resorting to special tools. And that file can be anything you want, from a simple "Hello, world!" test at first to a complete second stage bootloader capable of doing all the things you couldn't squeeze into your initial bootsector.
Those who understand Unix are doomed to copy it, poorly.
Re: Using more than one file?
I got it working with your reading of the fat file system. Thanks!
Is reading off of a cd/dvd similar to a floppy?
Is reading off of a cd/dvd similar to a floppy?
Programming is like fishing, you must be very patient if you want to succeed.
Re: Using more than one file?
A quick forum search turned up this post, which sums things up rather well.
Those who understand Unix are doomed to copy it, poorly.
Re: Using more than one file?
Thanks!
Programming is like fishing, you must be very patient if you want to succeed.