Temple Jump - Prepare To Fall Edition Mac OS

broken image


TempleOS is a public domain, open source (requires source code to boot) multitasking OS for amd64 processors without EFI support. It's fully cooperatively multitasked and all code runs in Ring 0. This means that system calls that normally require a context switch are just normal function calls. All ram is identity-mapped too, so sharing memory between tasks is as easy as passing a pointer. There's a locking intrinsyc too. It has full documentation (with graphical diagrams) embedded directly in source code.

Download the Mac OSX version; Install.dmg; Enable C/C plug-in in NetBeans (optional) Open NetBeans; Choose Tools-Plugins from the top menu; In the Available Plugins tab, search for C; Select C/C and click Install; Build; Prep and Build on Windows. Install Visual Studio 2017 Community Edition. Ensure C selected in Workloads tab. Fall of the Samurai: Win: 27 Capcom Digital Collection. Prepare to Die Edition: Win: 27 The World Ends with.

This is outsider art. The artist of this art, Terry A. Davis (1969-2018, RIP), had very poor mental health before he was struck by a train and died. I hope he is at peace.

However, in direct spite of this, I believe that TempleOS has immediately applicable lessons to teach about OS and compiler design. I want to use this blogpost series to break the genius down and separate it out from the insanity, bit by bit.

This is not intended to make fun of the mentally ill, disabled or otherwise incapacitated. This is not an endorsement of any of Davis' political views. This is intended to glorify and preserve his life's work that so few can currently really grasp the scope of.

If for some reason you are having issues downloading the TempleOS ISO, I have uploaded my copy of it here. Here is its SHA512 sum:

Choosing Hardware

TempleOS doesn't have support for very much hardware. This OS mostly relies on hard-coded IRQ numbers, VGA 640x480 graphics, the fury of the PC speaker, and standard IBM PC hardware like PS/2 keyboards and mice. If you choose actual hardware to run this on, your options are sadly very limited because hard disk controllers like to spray their IRQ's all over the place.

I have had the best luck with the following hardware:

  • Dell Inspiron 530 Core 2 Quad
  • 4 GB of DDR2 RAM
  • PS/2 Mouse
  • PS/2 Keyboard
  • 400 GB IDE HDD

Honestly you should probably run TempleOS in a VM because of how unstable it is when left alone for long periods of time.

VM Hypervisors

TempleOS works decently with VirtualBox and VMWare; however only VMWare supports PC speaker emulation, which may or may not be essential to properly enjoying TempleOS in its true form. This blogpost series will be using VirtualBox for practicality reasons.

Setting Up the VM

TempleOS is a 64 bit OS, so pick the type Other and the version Other/Unknown (64-bit). Name your VM whatever you want:

Then press Continue.

TempleOS requires 512 MB of ram to boot, so let's be safe and give it 2 gigs:

Then press Continue.

It will ask if you want to create a new hard disk. You do, so click Create:

We want a VirtualBox virtual hard drive, so click Continue:

Performance of the virtual hard disk is irrelevant for our usecases, so a dynamically expanding virtual hard disk is okay here. If you feel better choosing a fixed size allocation, that's okay too. Click Continue:

The ISO this OS comes from is 20 MB. So the default hard disk size of 2 GB is way more than enough. Click Continue:

Now the VM 'hardware' is set up.

Installation

TempleOS actually includes an installer on the live CD. Power up your hardware and stick the CD into it, then click Start:

Within a few seconds, the VM compiles the compiler, kernel and userland and then dumps you to this screen, which should look conceptually familiar:

We would like to install on the hard drive, so press y:

We're using VirtualBox, so press y again (if you aren't, be prepared to enter the IRQ's of your hard drive/s and CD drive/s):

Press any key and wait for the freeze to happen.

The installer will take over from here, copying the source code of the OS, Compiler and userland as well as compiling a bootstrap kernel:

After a few seconds, it will ask you if you want to reboot. You do, so press y one final time:

Make sure to remove the TempleOS live CD from your hardware or it will be booted instead of the new OS.

Usage

The TempleOS Bootloader presents a helpful menu to let you choose if you want to boot from a copy of the old boot record (preserved at install time), drive C or drive D. Press 1:

The first boot requires the dictionary to be uncompressed as well as other housekeeping chores, so let it do its thing:

Once it is done, you will see if the option to take the tour. I highly suggest going through this tour, but that is beyond the scope of this article, so we'll assume you pressed n:

Using the Compiler

The 'shell' is itself an interface to the HolyC (similar to C) compiler. There is no difference between a 'shell' REPL and a HolyC repl. This is stupidly powerful:

Temple Jump - Prepare To Fall Edition Mac Os 11

Let's make this into a 'program' and disassemble it. This is way easier than it sounds because TempleOS is a fully featured amd64 debugger as well.

Open a new file with Ed('HelloWorld.HC'); (the semicolon is important):

Now press Alt-Shift-a to kill autocomplete:

Fall

Click the X in the upper right-hand corner to close the other shell window:

Finally press drag the right side of the window to maximize the editor pane:

Let's put the hello word example into the program and press F5 to run it:

Neat! Close that shell window that just popped up. Let's put this hello world code into a function:

Now press F5 again:

Let's disassemble it:

The Uf function also works with anything else, including things like the editor:

All of the red underscored things that look like links actually are links to the source code of functions. While the HolyC compiler builds things, it internally keeps a sourcemap (much like webapp sourcemaps or how gcc relates errors at runtime to lines of code for the developer) of all of the functions it compiles. Let's look at the definition of Free():

And from here you can dig deeper into the kernel source code.

Next Steps

Temple Jump - Prepare To Fall Edition Mac Os 7

From here I suggest a few next steps:

  1. Go through the tour I told you to ignore. It teaches you a lot about the basics of using TempleOS.
  2. Figure out how to navigate the filesystem (Hint: Dir() and Cd work about as you'd expect).
  3. Start digging through documentation and system source code (Hint: they are one and the same).
  4. Look at the demos in C:/Demo. Future blogposts in this series will be breaking apart some of these.

I don't really know if I can suggest watching archived Terry Davis videos on youtube. His mental health issues start becoming really apparent and intrusive into the content. However, if you do decide to watch them, I suggest watching them as sober as possible. There will be up to three coherent trains of thought at once. You will need to spend time detangling them, but there's a bunch of gems on how to use TempleOS hidden in them there hills. Gems I hope to dig out for you in future blogposts.

Have fun and be well.

This article was posted on M05 20 2019. Facts and circumstances may have changed since publication. Please contact me before jumping to conclusions if something seems wrong or unclear.

Series: templeos

This post was not WebMentioned yet. You could be the first!

The art for Mara was drawn by Selicre.

The art for Cadey was drawn by ArtZora Studios.

Temple Jump - Prepare To Fall Edition Mac Os Catalina

Prepare

Click the X in the upper right-hand corner to close the other shell window:

Finally press drag the right side of the window to maximize the editor pane:

Let's put the hello word example into the program and press F5 to run it:

Neat! Close that shell window that just popped up. Let's put this hello world code into a function:

Now press F5 again:

Let's disassemble it:

The Uf function also works with anything else, including things like the editor:

All of the red underscored things that look like links actually are links to the source code of functions. While the HolyC compiler builds things, it internally keeps a sourcemap (much like webapp sourcemaps or how gcc relates errors at runtime to lines of code for the developer) of all of the functions it compiles. Let's look at the definition of Free():

And from here you can dig deeper into the kernel source code.

Next Steps

Temple Jump - Prepare To Fall Edition Mac Os 7

From here I suggest a few next steps:

  1. Go through the tour I told you to ignore. It teaches you a lot about the basics of using TempleOS.
  2. Figure out how to navigate the filesystem (Hint: Dir() and Cd work about as you'd expect).
  3. Start digging through documentation and system source code (Hint: they are one and the same).
  4. Look at the demos in C:/Demo. Future blogposts in this series will be breaking apart some of these.

I don't really know if I can suggest watching archived Terry Davis videos on youtube. His mental health issues start becoming really apparent and intrusive into the content. However, if you do decide to watch them, I suggest watching them as sober as possible. There will be up to three coherent trains of thought at once. You will need to spend time detangling them, but there's a bunch of gems on how to use TempleOS hidden in them there hills. Gems I hope to dig out for you in future blogposts.

Have fun and be well.

This article was posted on M05 20 2019. Facts and circumstances may have changed since publication. Please contact me before jumping to conclusions if something seems wrong or unclear.

Series: templeos

This post was not WebMentioned yet. You could be the first!

The art for Mara was drawn by Selicre.

The art for Cadey was drawn by ArtZora Studios.

Temple Jump - Prepare To Fall Edition Mac Os Catalina

Introducing the new iMac, iPad Pro,
iPhone 12 in purple, AirTag, and Apple TV 4K.

View recent Apple events

Apple Event November 10, 2020

Introducing the new MacBook Air, 13‑inch MacBook Pro, and Mac mini, all with the Apple M1 chip.

Learn more

Apple Event October 13, 2020

Introducing iPhone 12 and iPhone 12 Pro with 5G, MagSafe accessories, and HomePod mini.

Learn more

Apple Event September 15, 2020

Introducing Apple Watch Series 6, Apple Watch SE, Apple Fitness+, the new iPad Air and iPad, and Apple One — the all-new Apple services bundle.

WWDC June 22, 2020

Announcing our biggest updates ever to iOS, iPadOS, watchOS — and the entirely reimagined macOS Big Sur.

Temple Jump - Prepare To Fall Edition Mac Os Download

Apple Event September 10, 2019

Announcing the new iPhone 11 Pro, iPhone 11, Apple Watch Series 5, and iPad.

WWDC June 3, 2019

Temple Jump - Prepare To Fall Edition Mac Os 8

Announcing upgraded operating systems for iPhone, Apple Watch, and Mac — and a brand new one for iPad. And introducing the new Mac Pro and Pro Display XDR.





broken image