20 December 2004 Booting from hard disk STOP: THIS SOFTWARE IS DANGEROUS ![]() This software writes to the hard disk in such a way that it will destroy any operating systems installed on it. Therefore, if your machine has any software or data that you don't want to lose, then do not run this software on your machine. What I've been up to I've been puttering around over the past four months. One of the things I was doing was writing a Windows application using FASM. The application was a prototype for Karig. It would load precode (pre-parsed ColorForth source code) from a file and display it in the application window, and you could flip through the blocks by pressing the Page Up or Page Down key. While doing this, I made up my mind that Karig would not be an OS in itself. It would not have multitasking as Chuck Moore's version of ColorForth has. It would be a simple precode editor and interpreter. I'd use Karig to write an OS (or at least a simple kernel and some programs). My proposed setup is to have my laptop boot into a menu: Press 1 or 2: 1) Karig 2) Sys2 I'd press 1 to write and test code for my OS, or I'd press 2 to test-run the OS (which I'm calling "Sys2" because it will be the second system on the laptop). I like this idea because it means that I can take my laptop out somewhere and work on the OS, and if the OS can't run without triple-faulting and rebooting, I can always boot back into Karig to try to fix the problem. As things stand right now, I have to do all my coding on my main computer and then copy the assembled code to the laptop using floppies. Once Karig (the code editor and interpreter) is running on my laptop, I'll be able to code on my laptop. If I can take the laptop out somewhere, I can work on my OS away from home. So the first thing I have to do is make sure I can install the software to my laptop successfully. The demo The software has four parts:
The code I have supplied here is only a demo. When I boot Karig, I get a message proving that all of the sectors from the first track of the hard disk did indeed load: Press 1 or 2: 1) Karig 2) Sys2 Loading Karig ............................................................. 62 sectors loaded. Booting Sys2 displays a simpler message: Press 1 or 2: 1) Karig 2) Sys2 Sys2 up. The code should be pretty self-explanatory, but there are some subtleties.
Starting with this entry, I am no longer simply saving code to a floppy and running the floppy. Now, to test-run my code, I must install the code onto my laptop's hard disk, remove the floppy, and reboot the laptop. In future entries I'll be writing real code to replace the demo code in KARIG.ASM and SYS2.ASM. I'll probably keep working until I have a half-finished system on the hard disk before I post again. Check the index for other entries. |