Operating Systems written in FPC

From Lazarus wiki
Jump to: navigation, search

There is a rich tradition of operating systems written in Pascal. The probably best-known example is classical Mac OS, a very influential historic operating system, that was nearly entirely written in Pascal (not to be confused with Mac OS X that is written in Objective C). Other operating systems written in Pascal include Lisa OS and the Lillith system software. The operating system for the famous Xerox Star was written in the Mesa programming language, a modular language of the Pascal family. Today there are several attempts to write a Pascal-based operating system from scratch. The following, probably incomplete, list contains some approaches to use Free Pascal for creating an OS.



An Operating System written from scratch with Free Pascal compiler.


StreamOS is 32-bit operating system written in Object Pascal using Free Pascal Compiler. It’s designed for:

  • scientific tasks such as long calculations;
  • finding the best architecture of mixed kernel;
  • academic interests.

The main advantages are:

  • 32-bit fast kernel;
  • no global kernel locks;
  • full parallel threading model;
  • easy API;
  • integrated Virtual Filesystem support called StreamFS;
  • Unix-likeness.

TORO Kernel

Toro is a kernel created in Pascal using FreePascal compiler. The project was started in the year 2003 by Matias E. Vara using a monolithic kernel.The whole kernel is included in a RTL compliant with FreePascal for i386 and AMD x86-64 processors. The user program is compiled within the kernel and is executed in kernel mode. The intrinsic OS design select strict model in data workflow and pipeline of execution in order to avoid concurrent execution on the same shared memory region. The kernel was optimized for Multicore system and that is the principal objective of the project ,fix the current problems of Modern O.S. in Multicore environment. The main features are:

  • Supports Multithreading with SMP(Symmetric MultiProcessing).
  • Simple interface with Lazarus IDE for programmers.
  • Supports AMD x86-64 and Intel EMT64 architecture.
  • Designed to optimize the use of AMD HyperTransport technology and Intel Quick Path Interconnect technology.
  • NUMA Memory Model (Non Uniform Memory Access).
  • Stack TCP-IP.
  • Virtual Filesystem.
  • Independent of architecture.


A realtime kernel for embedded development. Primarily developed for ARM devices. Written entirely in Pascal and inline assembler.

  • Preemptive multitasking
  • Synchronization primitives(Mutex, Critical section, spinlock, and signals)
  • Threadsafe queue and delays
  • Optional safety features: Deadlock detection, priority inheritance, etc

External links

Personal tools