Update bugs of 2004/gavin + format/typo checks
There are also documented features that are now in bugs.md as features, not bugs, but just linking back to the section provided by the author. The README.md file has been format and typo checked. The gavin.md file has been format and typo checked.
This commit is contained in:
1 parent
05b41b922e
commit
7cbb11e1db
3 files changed
+50
-41
No files matched your search
+33
-31
@@ -12,6 +12,7 @@ The current status of this entry is:
|
|||||||
```
|
```
|
||||||
STATUS: compiled executable crashes - please help us fix
|
STATUS: compiled executable crashes - please help us fix
|
||||||
STATUS: doesn't work with some platforms - 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).
|
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:
|
### 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
|
```sh
|
||||||
su
|
su
|
||||||
@@ -72,28 +75,28 @@ Press and hold any key.
|
|||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
Over the years, we've seen a program that dumps core if executed on a "wrong"
|
Over the years, we've seen a program that immediately dumps core if executed on
|
||||||
architecture immediately ([1984/mullender](/1984/mullender/mullender.c)), or
|
the "wrong" architectures ([1984/mullender](1984/mullender/README.md)) and a
|
||||||
after a while ([2001/bellard](/2001/bellard/bellard.c)). This entry will happily
|
program that dumps core after a while ([2001/bellard](/2001/bellard/bellard.c)).
|
||||||
compile and execute on most any architecture - the trick is that the result, to
|
This entry will happily compile and execute on most any architecture - the trick
|
||||||
be useful, must be produced (and can only be enjoyed) on a particular
|
is that the result, to be useful, must be produced (and can only be enjoyed) on
|
||||||
architecture. We have not decided yet whether to disallow this for future
|
a particular architecture. We have not decided yet whether to disallow this for
|
||||||
contests.
|
future contests.
|
||||||
|
|
||||||
If you do not want to mess with a floppy and you use GRUB, see below
|
If you do not want to mess with a floppy and you use GRUB, see
|
||||||
in the author's notes.
|
[gavin.md](gavin.md).
|
||||||
|
|
||||||
You can put additional text files in `fs.tar` for browsing with vi. If you do
|
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 <http://bellard.org> for
|
not want to bother rebooting your computer at all, see <http://bellard.org> for
|
||||||
QEMU ([Fabrice Bellard](/winners.html#Fabrice_Bellard) is an IOCCC 2001 winner),
|
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
|
[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.
|
The judges were able to write a few more programs to run in this OS.
|
||||||
What are the limitations for such programs?
|
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
|
The program called `prim`, written by the judges, computes and prints prime
|
||||||
numbers.
|
numbers.
|
||||||
@@ -101,28 +104,26 @@ numbers.
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
This is a 32-bit multitasking operating system for x86 computers,
|
This is a 32-bit multitasking operating system for x86 computers, with GUI and
|
||||||
with GUI and filesystem, support for loading and executing user
|
filesystem, support for loading and executing user applications in ELF binary
|
||||||
applications in elf binary format, with PS/2 mouse and keyboard drivers,
|
format, with PS/2 mouse and keyboard drivers, and VESA graphics. And a command
|
||||||
and vesa graphics. And a command shell. And an application -
|
shell. And an application - a simple text-file viewer.
|
||||||
a simple text-file viewer.
|
|
||||||
|
|
||||||
The OS has ended up as a traditional monolith with one entry point
|
The OS has ended up as a traditional monolith with one entry point for syscalls,
|
||||||
for syscalls, with apps treated as cooperative-multitasking tasks
|
with apps treated as cooperative-multitasking tasks that can be sent different
|
||||||
that can be sent different messages (e.g. 'initialize', 'key hit',
|
messages (e.g. 'initialize', 'key hit', 'render to buffer') through their main
|
||||||
'render to buffer') through their main entry point, and which will
|
entry point, and which will return control to the OS after having performed the
|
||||||
return control to the OS having performed the necessary work.
|
necessary work. Applications are passed a pointer to their task structure,
|
||||||
Applications are are passed a pointer to their task structure,
|
which is partially defined by the OS, and partially for the application's own
|
||||||
which is partially defined by the OS, and partially for
|
use.
|
||||||
the application's own use.
|
|
||||||
|
|
||||||
The program compiles into a tool to build a kernel image,
|
The program compiles into a tool to build a kernel image,
|
||||||
so having built the program, the [Makefile](Makefile) will run it,
|
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.
|
The Makefile will then proceed to build a root filesystem image.
|
||||||
This involves rebuilding the program with different compiler flags,
|
This involves rebuilding the program with different compiler flags,
|
||||||
then building a tar file containing the resulting programs
|
then building a tarball containing the resulting programs
|
||||||
(the filesystem format supported by the OS is the tar-file format).
|
(the filesystem format supported by the OS is the tarball format).
|
||||||
|
|
||||||
For further usage information see [gavin.md](gavin.md).
|
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
|
for example if you type the command `shell` into a command-line
|
||||||
it will execute the program `sh` - close enough a match for it.
|
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
|
The [ELF binaries](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format)
|
||||||
must be the start address of the text segment.
|
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,
|
The keyboard driver can cope with the basic alpha-numeric keys,
|
||||||
but gets confused by fancy things like `shift` or `backspace`.
|
but gets confused by fancy things like `shift` or `backspace`.
|
||||||
|
|||||||
+11
-10
@@ -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,
|
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
|
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,
|
[RAM disk](https://en.wikipedia.org/wiki/RAM_drive) loaded by the bootloader) it
|
||||||
BUT I ACCEPT NO LIABILITY FOR ANY DAMAGE DONE BY THIS PROGRAM. Run it at your
|
should do no damage to your existing setup, BUT I ACCEPT NO LIABILITY FOR ANY
|
||||||
own risk. The OS has been tested on half a dozen machines or so, and worked on
|
DAMAGE DONE BY THIS PROGRAM. Run it at your own risk. The OS has been tested
|
||||||
all but one. The failure came in the form of the machine rebooting itself
|
on half a dozen machines or so, and worked on all but one. The failure came in
|
||||||
midway through loading the OS, with no nasty side-effects.
|
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
|
Hardware requirements - i386 or better processor, but the GUI is
|
||||||
surprisingly power-hungry, so I would recommend a fast P3 or P4 processor
|
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
|
(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
|
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).
|
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
|
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
|
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`.
|
`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
|
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
|
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.
|
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)/<PATH>/kernel` (substituting appropriate hard
|
type `kernel=(hd0,0)/<PATH>/kernel` (substituting appropriate hard
|
||||||
drive/partition numbers & path, or using `(fd0)` to load a kernel on the
|
drive/partition numbers & path, or using `(fd0)` to load a kernel on the
|
||||||
floppy), then `initrd=(hd0,0)/<PATH>/fs.tar`, and finally `boot`.
|
floppy), then `initrd=(hd0,0)/<PATH>/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`,
|
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
|
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
|
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
|
the top left corner of the screen, so you may need drag the windows around a bit
|
||||||
to tell them apart.
|
to tell them apart.
|
||||||
|
|
||||||
|
|||||||
@@ -2131,6 +2131,12 @@ The current ([Makefile](2004/gavin/Makefile) was modified to try and
|
|||||||
fit into the current IOCCC build environment.
|
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
|
## 2004 jdalbec
|
||||||
|
|
||||||
### STATUS: INABIAF - please **DO NOT** fix
|
### STATUS: INABIAF - please **DO NOT** fix
|
||||||
|
|||||||
Reference in new issue
Block a user