Litos8
Litos8 is an experimental operating system to familiarize with area of creating operating systems. It is not sufficiently equipped and tested for practial use and should not be used!
Litos8 should be examined only in emulator or in PC where no data corruption of the disk impends!
Litos8 is a kind of operating system similar to CP/M. It uses 16-bit instruction set of 8086 processor, but it is limited to 64 KB od RAM memory. It is programmed in assembler (NASM compiler). Due to limitations in the first 64 KB area of RAM memory it does not use segment registers. A program is loaded into memory from address 0000:1000h and it has 27 KB memory at its disposal. It communicates with core of the system using jump table (there is an extensive library of approximately 440 system functions).
Litos8 supports floppy disks with standard format of diskettes (eg. 1.44 MB diskette with FAT12 format in 1.44 MB drive) and IDE hard drives with LBA extension. A partition can be in FAT12 or FAT16 format (with max. size 2 GB). System disks can be labeled A: to P:, drive P: is reserved for a RAM disk using remaining unused RAM memory (typically 580 KB). Physical devices (disks, COM and LPT ports, display) can be opened and used alike as files.
Litos8 system development was closed in the state as it is, any following errors will not be corrected.
Litos8 system memory image
0000h .. 03FFh: table of INT vectors
0400h .. 05FFh: internal data of BIOS
0600h .. 0BFFh: stack
0C00h .. 0FFFh: table of addresses of system functions
1000h .. 74FFh: user program and data
7500h .. FFFFh: system core
Compilation and testing
Download Litos8 system (3 MB). Windows and FAR program (file manager - it has console output, unlike the others similar programs) recommended. Expand the system to the C:\Litos8 folder (in case of other folder you should select disk image in VirtualBox setup). The system is already compiled in the package, you can recompile it using C.BAT (NASM compiler is part of the package). Compilation can be cleaned using D.BAT. System can be run in the Bochs emulator (bundled) using E.BAT or in the VirtualBox emulator (installation needed) using EE.BAT.
The system can be stored to the 1.44 MB disk (in A: drive) using INSTFLOP.COM program. Boot CD can be created e.g. by Nero (choose LITOS8.IMA as boot image, with 1.44 MB floppy disk emulation).
When running Litos8 in real computer, disconnect all hard drives containing important data! The system is not debugged and it is very likely to contain errors (expecially in file service) that can damage data on the disks. It is therefore recommended to test it only in the emulator. There is possibly a protective compilation switch PROTECT (in KERNEL.ASM), which prohibits writing to the hard disk, but it will not prevent unpredictable errors in the crash.
Known undebugged error: There is an error in the VirtualBox emulator while running multiple programs in a row (larger than 512 bytes) manifested as if the image of old program (up to 512 B) remains in memory, but testing just before start (program head and CRC test) shows that there resides new program, a sort of indeterminacy of loading a sector from floppy disk. New loading of the system did not help. This error does not occur in real PC nor Bochs emulator.
Control
Litos8 supports Czech national character set KEYBCS2 (Kamenickych) - reason for the choice of this code are fully compatible characters to display table frames. Switching of keyboard and display between Czech and English version is possible via Scroll Lock key (Scroll Lock lights in case if Czech is on) - you can try it after display character table with ASCII program.
Litos8 is controlled via the command line. There are several built-in commands:
VER - display system version.
DIR [mask] - display directory content. Full or short path can be entered, file mask can be used with * (=any characters follow) and ? (=any one character) characters.
CD [path] - display or change current directory. You can specify full or short path (according to DOS conventions). Command CD.. goes one level up. Each disk has not its own current directory in Litos8 (as it was in DOS), but there is one global current directory. Therefore, a disk change selects root directory at the same time (e.g. "CD C:" has the same meaning as "CD C:\" or "C:").
MD name - create directory.
RD name - delete empty directory.
DEL name - delete file.
REN old new - rename file or directory.
MOVE old new - move file or directory. It differs from REN by that instead of changing the name in the directory entry it creates a new directory entry and moves content into it, i.e. changes the order of entries in the directory.
FREE - display free and used space of current disk.
TYPE file - display content of text file.
X: - change current disk (A: to P:). Disk change selects root directory of the disk at the same time ("C:" has the same meaning as "CD C:\").
program - run program in Litos8 format, uses L8X extension automatically.
Sample programs and screenshots
Litos8 after start and entering DIR command:
ASCII - display character table. You can switch display and keyboard between IBM (English) and KEYBCS2 (Kamenickych Czech) using Scroll Lock. In graphical mode you must run program again to see code changes.
CALC - calculator. Calculations are performed with a fixed decimal point, with an accuracy of 74 digits for the integer part and 74 digits for the fractional part. The display shows up to 30 digits. There are 4 basic operations, square root, reciprocal value and memory register. Selectable number of displayed decimal places and thousand separator. The current state is kept to the configuration file at the termination.
CLOCK - clock. Displays current date and time. Date and time can be changed. Warning - when setting to too high date (year 2106 and more) in real PC, Windows system may become unrunnable until correcting date to usual values.
COMINFO - display information about COM and LPT ports.
CPUINFO - display CPU information. Litos8 has nicely accurate measurement of processor speed.
DISKINFO - display information about physical and logical disks.
MEMINFO - display information about memory, system core semgents, free memory.
VGAPAL - display VGA standard palettes. Litos8 can use integrated uniform VGA palette table with distribution: 16 standard EGA colors, 16 shades of gray, 8 contrast RGB colors and 216 uniform colors, where each RGB component has 6 levels (i.e. uniform palette = 40 + B*6/256 + G*6/256*6 + R*6/256*6*6).
VMODE number - set videomode (number 0 to 19). Litos8 supports 20 basic BIOS video modes - set and detect parameters, display text, frames, scrolling. Integrated fonts 8 x 8 pixels in IBM or KEYBCS2 (selectable by Scroll Lock) will be used in graphics modes. Videomode 3 is choosen when starting the system.
0 - text 40 x 25 gray
1 - text 40 x 25 color
2 - text 80 x 25 gray
3 - text 80 x 25 color
4 - graphics 320 x 200, 4 colors
5 - graphics 320 x 200, 4 gray
6 - graphics 640 x 200, 2
7 - text 80 x 25, black&white
13 - graphics 320 x 200, 16 colors
14 - graphics 640 x 200, 16 colors
15 - graphics 640 x 350, black&white
16 - graphics 640 x 350, 16 colors
17 - graphics 640 x 480, 2 colors
18 - graphics 640 x 480, 16 colors
19 - graphics 320 x 200, 256 colors
Program interface
Programs in Litos8 system are loaded from address 1000h (CS segment=0). They are written in 8086 assembler (NASM compiler). By entering %include "APPS.INC" at the beginning of the program, system function and structure definitions are imported and 16-byte program header will be created. Program starts immediately after the header. ExtEnd: label must be entered at the end of the program, the label is used by the header to determine the size of the program. The program has about 27 KB of memory to use, but it need to request the system to allocate memory (MemAlloc function).
When calling system functions, it is necessary to observe that CS=DS=ES=0 and direction flag must be cleared CLD. If program changes these settings, it must return them back.
Application interface (system and library functions):
BIOSDISK - physical disk BIOS
CMOS - CMOS memory
COM - serial ports COM
CPU - processor info
DEV - system devices
DISP - display driver
DISPCON - console display driver
DISPFRAM - display frames
FILE - files
FLOAT - floating-point arithmetics
INTNUM - integer number arithmetics
KEY - keyboard driver
LPT - parallel ports LPT
MEMORY - memory manager
RANDOM - random generator
SYSDISK - logical (system) disks
SYSTEM - system functions
TEXT - text strings
TIME - date and time
TIMER - system timer
You are visitor of these pages.