Page 1 of 1

Socks v1

Posted: Wed Feb 18, 2009 10:12 pm
by Firestryke31
So, for the past week or so I decided to try my hand at writing a 512 byte OS. My restrictions were these:
Must be a FAT12 formatted floppy
Must still be recognized and writable by Windows
Must be able to accept user input for commands
Commands must be loaded from a certain directory and run
Must be able to run a certain program at startup

I wanted to also have a simple program signature check, but I'll do that if I can figure out how to further reduce the size of my code.

The CLI is very simple, and just rejects any input it doesn't recognize (Displayable ASCII, backspace, and enter), or input when the buffer is full.

A screenshot of Socks after the startup program has run (simply displays the text) and an echo command:
Image

The floppy image can be found here.

Socks has not yet been tested on RHW, due to lack of floppy drive.

Please post bugs here!

Re: Socks v1

Posted: Mon Feb 23, 2009 1:10 pm
by Firestryke31
So, I'm not entirely sure where to go with Socks now. With both the command line and the automatic program run on start up it makes a pretty good first stage boot loader, but what I have so far has so many cheats and shortcuts I'm not sure I could get it working on anything other than a FAT12 floppy, and maybe, possibly, a FAT16 hard drive. I also need to write some commands and whatnot to make it less useless, but that's not as fun as packing 2^64 features into 512 bytes. I also considered writing a game, but that's practically an OS in and of itself, especially on Socks with no support.

What should I do now? Try and make a FAT16 version? Something else?

Re: Socks v1

Posted: Mon Feb 23, 2009 11:01 pm
by 01000101
so your entire OS fits in 512 bytes?

it looks to me like you have about half of that in those text strings from your screenshot.

Re: Socks v1

Posted: Mon Feb 23, 2009 11:35 pm
by Firestryke31
Actually, that's the auto-loaded external program. I just wanted to demonstrate one of Socks' features. Socks will load and run "/SEF/SOCKS.SEF" if it can find it, and continue happily along if it can't. This is to let me use it as a first stage bootloader later.

The strings actually total to:

Code: Select all

"Socks   "
"SEF"
"Pgm"
"Dsk"
" Err" + '\n' + '\r'
The first two of which are very multi-purpose.

Re: Socks v1

Posted: Sat Mar 07, 2009 1:36 pm
by Troy Martin
So since the entire thing doesn't fit in 512 bytes, it's not really a 512-byte OS? Or can it run without the socks.sef?

Re: Socks v1

Posted: Sat Mar 07, 2009 4:33 pm
by Firestryke31
It is capable of running without socks.sef. The one included simply clears the screen, prints the message, and returns to Socks. Unfortunately, I could only get Socks running in Bochs. it fails with (I think) a sector not found error on RHW, or at least on the one computer that I have that has a floppy drive. That reminds me, I need to update the disk image there.

Sadly, future versions of Socks are probably not going to fit in 512 bytes, due to the number of cheats I had to use in order to get Socks working for the floppy image. I've tried a LBA FAT32 version, but I barely have room to load socks.sef, much less have the CLI too. But I'm still going to continue development because it's a pretty nice first stage bootloader if I can get it working on RHW...