Miscellaneous > Programming & Networking
Operating System Development
Stryker:
Well what I was thinking of doing was something like...
Make a .com file that doesn't use dos interrupts.
Make a small assembly program that will go to a certain byte on a disk and start executing there.
use debug to put it on the floppy disk
add the signature with e 2fe aa 55
write the assembly goodie to the disk, use debug to move the .com file to the place i specified in the assembly program.
But the thing is I don't know how to compile a .com file that doesn't use dos interrupts. I'll be back in a while, going to check out those links.
voidmain:
Believe it or not, it's not as hard as you are making it. If you make the right kind of COM file in assembly all you have to do is write it to the floppy starting at the first sector (the hardware automatically loads and executes the first sector on disk). You can write your program to raw floppy using debug, but it's easier to use "dd" or "rawrite".
Now since it only automatically loads and executes the first sector of the floppy (512 bytes) if your program is bigger than that you may have to call a BIOS interrupt to load the 2nd through ?? sectors into memory and jump to that memory location to continue execution. But I can't remember if the programs I used to write were small enough to fit entirely on the first sector. The helloworld.asm example on that linuxassembly site I linked to you was only around 400 bytes when assembled.
And by the way, you don't "compile" a *.com file. You compile source into object code using a compiler (could be C, C++, Pascal, etc). You "assemble" assembly code into object code. And in both cases you use the linker to create the executable file from the object code (weather it be *.COM, *.EXE, a.out, elf, etc). But you probably already know this....
Stryker:
quote:Originally posted by void main:
Believe it or not, it's not as hard as you are making it. If you make the right kind of COM file in assembly all you have to do is write it to the floppy starting at the first sector (the hardware automatically loads and executes the first sector on disk). You can write your program to raw floppy using debug, but it's easier to use "dd" or "rawrite".
Now since it only automatically loads and executes the first sector of the floppy (512 bytes) if your program is bigger than that you may have to call a BIOS interrupt to load the 2nd through ?? sectors into memory and jump to that memory location to continue execution. But I can't remember if the programs I used to write were small enough to fit entirely on the first sector. The helloworld.asm example on that linuxassembly site I linked to you was only around 400 bytes when assembled.
And by the way, you don't "compile" a *.com file. You compile source into object code using a compiler (could be C, C++, Pascal, etc). You "assemble" assembly code into object code. And in both cases you use the linker to create the executable file from the object code (weather it be *.COM, *.EXE, a.out, elf, etc). But you probably already know this....
--- End quote ---
Well I wasn't going for vocabulary, i just try to get my point across. i used to make programs with quickbasic (is it the good old days, or is it the undeducated days?) to make those .com files, anyone know if it uses dos interrupts? i made some pretty cool graphics programs, there would be an interesting operating system. i'll give it a shot.
Kintaro:
You could just make a bootable MS-DOS and have your program start in autoexec and use a Hex editor so it says "Starting StrykerOS" instead of "Starting Windows 95" or whatever it used to say!
Stryker:
quote:Originally posted by Ex Eleven / b0b 2.1:
You could just make a bootable MS-DOS and have your program start in autoexec and use a Hex editor so it says "Starting StrykerOS" instead of "Starting Windows 95" or whatever it used to say!
--- End quote ---
What? and live with the guilt of using microsoft products? i suppose i could, i've done it before, it's just that... isn't that basicly what microsoft did. bought dos from some guys and changed the banner?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version