1
0
Fork 0
forked from crazyettin/EttinOS
An operating system
Find a file
2021-06-22 18:21:53 +00:00
src Change the line endings of the text files from Unix to DOS style. 2021-06-22 16:05:09 +03:00
LICENSE.MD Change the line endings of the text files from Unix to DOS style. 2021-06-22 16:05:09 +03:00
make.sh Upgrade to Sortix build environment. 2021-06-22 18:21:53 +00:00
README.MD Change the line endings of the text files from Unix to DOS style. 2021-06-22 16:05:09 +03:00

EttinOS

EttinOS is a minimalist 16-bit DOS-like hobbyist operating system for the IBM PC and compatible computers. Its git repository can be found at https://ahti.space/git/crazyettin/EttinOS.

System requirements

  • An Intel 8086 or compatible CPU
  • BIOS, or UEFI in legacy mode
  • 64 KiB of RAM
  • A floppy disk drive

Building

Build dependencies:

  • A Unix-like operating system
  • bash
  • coreutils
  • dosfstools
  • mtools
  • nasm

Running make.sh will build EttinOS and create a bootable 360 KiB 5.25" floppy disk image named EttinOS.img. To get a 1.44 MB 3.5" one instead use the argument -1440. If you want to use another floppy disk format you will have to adjust the bootloader disk description tables and install the system manually. Hard disk drives are not supported.

Input

The EttinOS input system is inspired by typewriters. Typing a character overwrites the cursor location and the erase (=tab) key erases it. The space and backspace keys move the cursor.

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 at the end of the address space. Programs are loaded at address 0x2000. The stack is reset back to the end of the address space after a program has finished running.

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 to the offset BX and set AL to 0x0 if the load was succesfull and 0x1 if there was an error.
    • AH = 0x1: Save a file (under construction).