diff --git a/2004/gavin/README.md b/2004/gavin/README.md index 63e04a8fc..9b6fc16b7 100644 --- a/2004/gavin/README.md +++ b/2004/gavin/README.md @@ -12,6 +12,7 @@ The current status of this entry is: ``` STATUS: compiled executable crashes - please help us fix STATUS: doesn't work with some platforms - please help us fix +STATUS: INABIAF - please **DO NOT** fix ``` For more detailed information see [2004 gavin in bugs.md](/bugs.md#2004-gavin). @@ -26,7 +27,9 @@ For more detailed information see [2004 gavin in bugs.md](/bugs.md#2004-gavin). ### Try: -To enjoy the results (on a Linux/x86 machine): +To enjoy the results (on a Linux/x86 machine) with a floppy drive (remember +those? We do!): + ```sh su @@ -72,28 +75,28 @@ Press and hold any key. ## Judges' remarks: -Over the years, we've seen a program that dumps core if executed on a "wrong" -architecture immediately ([1984/mullender](/1984/mullender/mullender.c)), or -after a while ([2001/bellard](/2001/bellard/bellard.c)). This entry will happily -compile and execute on most any architecture - the trick is that the result, to -be useful, must be produced (and can only be enjoyed) on a particular -architecture. We have not decided yet whether to disallow this for future -contests. +Over the years, we've seen a program that immediately dumps core if executed on +the "wrong" architectures ([1984/mullender](1984/mullender/README.md)) and a +program that dumps core after a while ([2001/bellard](/2001/bellard/bellard.c)). +This entry will happily compile and execute on most any architecture - the trick +is that the result, to be useful, must be produced (and can only be enjoyed) on +a particular architecture. We have not decided yet whether to disallow this for +future contests. -If you do not want to mess with a floppy and you use GRUB, see below -in the author's notes. +If you do not want to mess with a floppy and you use GRUB, see +[gavin.md](gavin.md). You can put additional text files in `fs.tar` for browsing with vi. If you do not want to bother rebooting your computer at all, see for QEMU ([Fabrice Bellard](/winners.html#Fabrice_Bellard) is an IOCCC 2001 winner), -but your experience will be limited (replace `-DK=0` with `-DK=1` in the +but your experience will be limited; replace `-DK=0` with `-DK=1` in the [Makefile](Makefile), and you will have to move the mouse to trigger the initial -screen update). +screen update. The judges were able to write a few more programs to run in this OS. What are the limitations for such programs? -What you can do and what you cannot do in such programs? +What can you do and what can you not do in such programs? The program called `prim`, written by the judges, computes and prints prime numbers. @@ -101,28 +104,26 @@ numbers. ## Author's remarks: -This is a 32-bit multitasking operating system for x86 computers, -with GUI and filesystem, support for loading and executing user -applications in elf binary format, with PS/2 mouse and keyboard drivers, -and vesa graphics. And a command shell. And an application - -a simple text-file viewer. +This is a 32-bit multitasking operating system for x86 computers, with GUI and +filesystem, support for loading and executing user applications in ELF binary +format, with PS/2 mouse and keyboard drivers, and VESA graphics. And a command +shell. And an application - a simple text-file viewer. -The OS has ended up as a traditional monolith with one entry point -for syscalls, with apps treated as cooperative-multitasking tasks -that can be sent different messages (e.g. 'initialize', 'key hit', -'render to buffer') through their main entry point, and which will -return control to the OS having performed the necessary work. -Applications are are passed a pointer to their task structure, -which is partially defined by the OS, and partially for -the application's own use. +The OS has ended up as a traditional monolith with one entry point for syscalls, +with apps treated as cooperative-multitasking tasks that can be sent different +messages (e.g. 'initialize', 'key hit', 'render to buffer') through their main +entry point, and which will return control to the OS after having performed the +necessary work. Applications are passed a pointer to their task structure, +which is partially defined by the OS, and partially for the application's own +use. The program compiles into a tool to build a kernel image, so having built the program, the [Makefile](Makefile) will run it, -piping the output into a file called `kernel`. +redirecting the output into a file called `kernel`. The Makefile will then proceed to build a root filesystem image. This involves rebuilding the program with different compiler flags, -then building a tar file containing the resulting programs -(the filesystem format supported by the OS is the tar-file format). +then building a tarball containing the resulting programs +(the filesystem format supported by the OS is the tarball format). For further usage information see [gavin.md](gavin.md). @@ -140,8 +141,9 @@ The file system is kinda optimistic about matching names, so, for example if you type the command `shell` into a command-line it will execute the program `sh` - close enough a match for it. -The ELF binaries are not loaded at the correct address, and their entry point -must be the start address of the text segment. +The [ELF binaries](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) +are not loaded at the correct address, and their entry point must be the start +address of the [text segment](https://en.wikipedia.org/wiki/Code_segment). The keyboard driver can cope with the basic alpha-numeric keys, but gets confused by fancy things like `shift` or `backspace`. diff --git a/2004/gavin/gavin.md b/2004/gavin/gavin.md index 710014fd6..4bc32e50a 100644 --- a/2004/gavin/gavin.md +++ b/2004/gavin/gavin.md @@ -8,17 +8,18 @@ targeting x86 Linux. In short, you need to build this on an x86 Linux machine. 2. Next, find a suitable machine to run the OS on. It should be perfectly safe, and since it does not directly attempt to access any hard disk drives (only a -ramdisk loaded by the bootloader) it should do no damage to your existing setup, -BUT I ACCEPT NO LIABILITY FOR ANY DAMAGE DONE BY THIS PROGRAM. Run it at your -own risk. The OS has been tested on half a dozen machines or so, and worked on -all but one. The failure came in the form of the machine rebooting itself -midway through loading the OS, with no nasty side-effects. +[RAM disk](https://en.wikipedia.org/wiki/RAM_drive) loaded by the bootloader) it +should do no damage to your existing setup, BUT I ACCEPT NO LIABILITY FOR ANY +DAMAGE DONE BY THIS PROGRAM. Run it at your own risk. The OS has been tested +on half a dozen machines or so, and worked on all but one. The failure came in +the form of the machine rebooting itself midway through loading the OS, with no +nasty side-effects. Hardware requirements - i386 or better processor, but the GUI is surprisingly power-hungry, so I would recommend a fast P3 or P4 processor (has been tested on P3/P4/Athlon machines). Minimum RAM is something like 32MB. PS/2 mouse & keyboard required - no USB I'm afraid, and the keyboard - map is for a UK keyboard. Uses Vesa VBE 3.0, so should work on any modern + map is for a UK keyboard. Uses VESA VBE 3.0, so should work on any modern graphics card (has been tested on NVIDIA, Matrox, and SiS cards). 3. Now you need to setup a bootloader to load the OS. If you have a system @@ -26,10 +27,10 @@ using a lilo bootloader you can simply add the OS to your boot menu. Just add appropriate `image=` and `initrd=` lines to your `/etc/lilo.conf`, pointing at `kernel` and `fs.tar` respectively (as built by make earlier), then run `lilo`. If you do not wish modify your lilo setup, one easy option is to get yourself a -grub boot disk image, and follow the instructions for grub below - Debian users -can simply run`apt-get install grub-disk` to get themselves a grub boot disk. +GRUB boot disk image, and follow the instructions for GRUB below - Debian users +can simply run`apt-get install grub-disk` to get themselves a GRUB boot disk. - If you run grub, then at the boot menu simply hit `c` to get a console, then + If you run GRUB, then at the boot menu simply hit `c` to get a console, then type `kernel=(hd0,0)//kernel` (substituting appropriate hard drive/partition numbers & path, or using `(fd0)` to load a kernel on the floppy), then `initrd=(hd0,0)//fs.tar`, and finally `boot`. @@ -37,7 +38,7 @@ can simply run`apt-get install grub-disk` to get themselves a grub boot disk. 4. Assuming the OS has booted, what can you do now? Well, start by trying `sh`, to open another shell. Then, try `vi gavin.c` to open up the OS source in a text file viewer (up/down or PgUp/PgDn to scroll). Note that the provided -applications, `sh` and `vi` both have windows of the same size, and that open in +applications, `sh` and `vi` both have windows of the same size, and both open in the top left corner of the screen, so you may need drag the windows around a bit to tell them apart. diff --git a/bugs.md b/bugs.md index e981d28f6..0cd419963 100644 --- a/bugs.md +++ b/bugs.md @@ -2131,6 +2131,12 @@ The current ([Makefile](2004/gavin/Makefile) was modified to try and fit into the current IOCCC build environment. +### STATUS: INABIAF - please **DO NOT** fix + +See [known features in the README.md](2004/gavin/README.md#known-features) for +things that are not bugs but documented (mis)features. + + ## 2004 jdalbec ### STATUS: INABIAF - please **DO NOT** fix