The Temple Operating System

(* Global variable was allocated off of RIP not RSP, of course.)

(* Has a 64-Bit AOT/JIT compiler, not interpreter.)


TempleOS is an x86_64, multi-tasking, multi-cored, public domain, open source, 
ring-0-only, single-address-map (identity-mapped), non-networked, PC operating 
system for recreational programming.  It sticks to common, 64-bit hardware 
instead of distinct drivers because you must shoot-the-moon.  Also, redundancy 
and varied capabilities are unpleasant compared to everybody-has-the-same-thing.

Normally, "failure is not an option" applies.  Since TempleOS accompanies 
Windows or Linux, however, failure is an option.  There is no reason to 
duplicate all use cases -- browsing, multimedia, desktop publishing, etc.  
Instead, it's simple, fun, and beautiful.  I capped the lines of code at 
100,000, so it will never be an ugly monstrocity.  Currently, it is 80,543.  
Since God's temple must be perfect and we have 1,000 years in mind, I do not 
promise that anything is future-proof.

The main reason TempleOS is simple and beautiful is because it's ring-0-only and 
identity-mapped.  Linux wants to be a secure, multi-user mainframe.  That's the 
vision for Linux.  That's why it has file permissions.  The vision for TempleOS 
is a modern, 64-bit Commodore 64.  The C64 was a home computer mostly used for 
games.  It trained my generation how to program.  It was simple, open and 
hackable.  It was not networked.  The games were not multimedia works of art, 
but generated programmatically with innocent, programmer (non-artist) quality 
graphics.  It was simple and unsecure.  If you don't have malware and you don't 
have bugs, protection just slows things down and makes the code complicated.

A troll might ask, "Why not just use DOS?  It was ring-0-only and 
single-address-map."  Actually, they wouldn't because many people would say, 
"Cool idea!  I'm gonna dust-off DOS right now and have some fun!"  DOS is 16-bit 
with segmentation, though, which is awful.  TempleOS is 64-bit, flat, 
non-segmented and multi-cored.  It's like a modern, souped-up, multi-tasking, 
cross between DOS and a Commodore 64.  It has a C64-like shell with HolyC, a 
dialect of C/C++, instead of BASIC.  It was written from scratch, and not even 
ASCII was sacred -- it has 8-bit unsigned character source code to support 
European languages.  Also, the source code has graphics.

A troll might say, "But, it can crash!"  We all used DOS for years and loved it. 
Computers even had a reset switch!  Just think of the power of ring-0, muhahaha! 
Think of the speed and simplicity of ring-0-only and identity-mapping.  It's 
only 121,168 lines of code, including the compiler and can change tasks in half 
a microsecond because it doesn't mess with page tables or privilege levels.  
Inter-process communication is effortless because every task can access every 
other task's memory.

It's fun having access to everything.  When I was a teenager, I had a book, 
Mapping the Commodore 64, that told what every location in memory did.  I liked 
copying the ROM to RAM and poking around at the ROM BASIC's variables.  
Everybody directly poked the hardware ports.

TempleOS is simpler than Linux and you can have hours of fun tinkering because 
all memory and ports are accessible.  Memory is identity-mapped at all times, so 
you can modify any task's memory from any other task.  You can access all disk 
blocks, too.  I had a blast using a C64 disk block editor to modify directories 
to un-delete files, when I was a kid.  Maybe, you want to play with a raw-block 
database, or make your own file system?

I wrote all 121,168 lines of TempleOS over the last 11.3 years, full-time, 
including the 64-bit compiler.  It was called, at various times, "Hoppy", "
The J Operating System", "LoseThos" and "SparrowOS".  Here are my 
college transcripts.  I've been a professional operating system developer since 
1990 when I was hired to work on Ticketmaster's VAX OS.


Screen Shots

Tutorial Videos

Game Videos

5-Minute Random Code Walk-Thru Videos Episodes 01-10
5-Minute Random Code Walk-Thru Videos Episodes 11-20
5-Minute Random Code Walk-Thru Videos Episodes 21-30
5-Minute Random Code Walk-Thru Videos Episodes 31-40
5-Minute Random Code Walk-Thru Videos Episodes 41-50
5-Minute Random Code Walk-Thru Videos Episodes 51-60
5-Minute Random Code Walk-Thru Videos Episodes 61-70
5-Minute Random Code Walk-Thru Videos Episodes 71-80
5-Minute Random Code Walk-Thru Videos Episodes 81-83




TempleOS Help

Source Code By File

Source Code By Sym

Source Code By Address

Source Code (Raw)

Change Log

* "Commodore 64" was a trademark of Commodore Business Machines.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Windows" and "DOS" are trademark of MicroSoft Corp.