2021-06-22 13:05:09 +00:00
|
|
|
|
EttinOS
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
|
|
EttinOS is a minimalist 16-bit DOS-like hobbyist operating system for
|
2021-06-24 15:34:41 +00:00
|
|
|
|
the IBM Personal Computer and compatible machines. Its git repository
|
|
|
|
|
can be found at https://ahti.space/git/crazyettin/EttinOS.
|
2021-06-22 13:05:09 +00:00
|
|
|
|
|
|
|
|
|
System requirements
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
* An Intel 8086 or compatible CPU
|
|
|
|
|
* BIOS, or UEFI in legacy mode
|
|
|
|
|
* 64 KiB of RAM
|
2021-06-27 19:19:18 +00:00
|
|
|
|
* 1-4 floppy disk drives
|
2021-06-22 13:05:09 +00:00
|
|
|
|
|
|
|
|
|
Building
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
Build dependencies:
|
|
|
|
|
* A Unix-like operating system
|
|
|
|
|
* coreutils
|
|
|
|
|
* dosfstools
|
|
|
|
|
* mtools
|
|
|
|
|
* nasm
|
2021-06-25 17:24:38 +00:00
|
|
|
|
* rw (optional)
|
2021-06-22 13:05:09 +00:00
|
|
|
|
|
|
|
|
|
Running make.sh will build EttinOS and create a bootable 360 KiB 5.25"
|
2021-06-26 15:55:47 +00:00
|
|
|
|
floppy disk image named EttinOS.img and a source image of the same
|
|
|
|
|
format named EttinOS-src.img. To get 1.44 MB 3.5" images instead use the
|
2021-06-27 16:22:58 +00:00
|
|
|
|
argument -1440. If you want to use another format you will have to build
|
|
|
|
|
the system manually. Hard disk drives are not supported.
|
2021-06-22 13:05:09 +00:00
|
|
|
|
|
2021-06-27 16:22:58 +00:00
|
|
|
|
Usage
|
2021-06-22 13:05:09 +00:00
|
|
|
|
-----
|
|
|
|
|
|
2021-06-27 16:22:58 +00:00
|
|
|
|
The input system is inspired by typewriters. Typing a character
|
2021-06-22 13:05:09 +00:00
|
|
|
|
overwrites the cursor location and the erase (=tab) key erases it. The
|
|
|
|
|
space and backspace keys move the cursor.
|
|
|
|
|
|
2021-06-28 17:00:22 +00:00
|
|
|
|
EttinOS uses the FAT12 file system, and as a result file names (and thus
|
|
|
|
|
also commands) are case-insensitive and follow the DOS-like 8.3 format.
|
|
|
|
|
EBPB and file attributes (and thus also labels and subdirectories) are
|
2021-06-28 19:13:54 +00:00
|
|
|
|
not supported and are ignored if present. A file specification is of the
|
|
|
|
|
format ([A-D]:)FILENAME.EXT, where the drive letter is optional in case
|
|
|
|
|
of the current drive. Text files use DOS-like newlines (CR+LF) and end
|
|
|
|
|
in a null.
|
2021-06-28 17:00:22 +00:00
|
|
|
|
|
2021-06-28 19:13:54 +00:00
|
|
|
|
Commands consist of the command itself followed by a tail separated with
|
|
|
|
|
a space. Extra spaces, be they leading, trailing, or between a command
|
|
|
|
|
and its tail, are ignored. What the tail contains and how it should be
|
|
|
|
|
formatted depends on the command. All commands except for changing the
|
|
|
|
|
drive are stored as external programs: a command for a program is its
|
|
|
|
|
file specification without the extension.
|
2021-06-28 17:00:22 +00:00
|
|
|
|
|
2021-06-27 16:22:58 +00:00
|
|
|
|
Commands included in EttinOS:
|
|
|
|
|
* [A-D]:: Change the drive.
|
2021-06-28 17:00:22 +00:00
|
|
|
|
* ECHO: Echo the tail.
|
2021-06-27 16:22:58 +00:00
|
|
|
|
* HELLO: Print "Hello world!".
|
2021-06-28 17:00:22 +00:00
|
|
|
|
* LIST: List the files on the drive specified in the tail.
|
2021-06-29 17:05:14 +00:00
|
|
|
|
* PRINT: Print the contents of a text file specified in the tail.
|
2021-06-25 17:24:38 +00:00
|
|
|
|
|
2021-06-22 13:05:09 +00:00
|
|
|
|
Programming
|
|
|
|
|
-----------
|
|
|
|
|
|
|
|
|
|
EttinOS has a flat address space of 64 KiB. The data, stack, and
|
|
|
|
|
extra segments are set at the beginning of the RAM and the system stack
|
2021-06-28 21:09:38 +00:00
|
|
|
|
at the end of the address space. Programs are loaded at address 0x3000,
|
2021-06-27 19:19:18 +00:00
|
|
|
|
the drive number is loaded in DL, and SI is pointed at the command tail
|
|
|
|
|
(a string ending in a null) when the program is executed. The stack is
|
|
|
|
|
reset back to the end of the address space after a program has finished
|
|
|
|
|
running.
|
2021-06-22 13:05:09 +00:00
|
|
|
|
|
|
|
|
|
System calls:
|
|
|
|
|
* Interrupt 0x20: Return to the shell.
|
|
|
|
|
* Interrupt 0x21: Input and output:
|
|
|
|
|
* AH = 0x0: Print a string ending in a null from SI.
|
|
|
|
|
* AH = 0x1: Read a string ending in a null of at most AL
|
|
|
|
|
characters to DI until a return.
|
|
|
|
|
* AH = 0x2: Print a string ending in a null from SI followed by a
|
|
|
|
|
CRLF.
|
|
|
|
|
* AH = 0x3: Read a string ending in a null of at most AL
|
|
|
|
|
characters to DI until a return and print a CRLF.
|
|
|
|
|
* Interrupt 0x22: Disk operations:
|
|
|
|
|
* AH = 0x0: Load a file named in SI as a string ending in a null
|
2021-07-01 13:50:43 +00:00
|
|
|
|
to the offset BX and store the error codes in AL:
|
|
|
|
|
* AL = 0x0: Succesful load
|
|
|
|
|
* AL = 0x1: Drive not found
|
|
|
|
|
* AL = 0x2: Unable to read disk
|
|
|
|
|
* AL = 0x4: File or command not found
|
|
|
|
|
* AL = 0x8: Not enough memory
|
2021-06-22 13:05:09 +00:00
|
|
|
|
* AH = 0x1: Save a file (under construction).
|
2021-06-29 17:05:14 +00:00
|
|
|
|
|
|
|
|
|
Known bugs
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
Trying to access a disk of different format than the current one can
|
|
|
|
|
crash the system.
|
2021-06-26 15:55:47 +00:00
|
|
|
|
|