Design and Limitations of TempleOS
I go through the design and engineering decisions made by Terry A. Davis in creating TempleOS, and discuss some limitations, some which can be fixed, some which are endemic.
62
views
Gaming and some discussion on TempleOS Theory
Showing TempleOS on VMWare with sound! Some gaming with sound for a change, listen to the sounds of autism
Lesson 12 Powers of 2 Principle, Debugger Overview, FLAGS Register, PUSH and POP
Getting into the "Powers of 2 Principle" and how it permeates TempleOS.
Introducing F64 data type for HolyC, but holding back on Assembly FPU programming for now
Debugger caveats with R10andR15.HC.Z. Why does R10 always show 0's? (Unresolved mystery)
Working with the stack; everything is always at least 8 bytes pushed, even dealing with
single ASCII characters. Concept of memory alignment on 8 byte boundary.
Accessing Registers in Dbg with _RSP notation.
Peeking and Poking memory using HolyC notation.
Pushing some numbers onto the stack. Where the heck are they?
Trying to unassemble the debugger and running into Software Interrupt I_DBG mystery.
Introduce the D() Dump Function, and solve the mystery of where are my push'd numbers
Do a little program that compares 2 numbers, getting into the FLAGS register
Lesson 11 Scrapyard Story Diversion and Arithmetic in TOS
Revisiting NumTricks.HC.Z and the LEA insruction. What works and what doesn't?
MulDemo.HC.Z - revisiting the unsigned MUL instruction. What are the limitations of HolyC in regards to multiplying 2 large 64 bit numbers?
Why does C kind of suck compared to assembly?
Revisiting Fact20() to make use of some new multiplication tricks.
Lesson 10 Keyboard Shortcuts and Exploring TOS System Programs
Demonstrate getting around efficiently in TOS with the keyboard shortcuts.
Show some other things like TaskRep() and GrCircle(). Showing the hypertext
features of Unassemble function and getting around the TOS Source Code.
Making use of the Autocomplete window to search source code.
Zoom Feature
F1 Help Feature
MemRep
Discussion of Code Heap and Data Heap, how it's divided up in Memory.
Making use of F() function to find references in Kernel to R15, trying
to determine its significance
Lesson 9 Revisiting the Rotate Right Loop
Very short video
Rewriting it to use one less JMP. Importance of minimizing the number of JMPS in assembly. Using JNZ (Jump if Not Zero). Watch me learn in real time LOL.
Lesson 8 Revisiting the Sequencer, Running the basic Graphics Demos
Improving the code for the sequencer. Trying out the RawDr() function.
Graphics Demos:
Poles (changes palette from colors to grey)
Rotate Tank (sprites in source code!)
Extended ASCII Keyboard with Control-Alt-A
Saw() Function (Sawtooth wave)
tS Special variable that denotes time in seconds passed since booting of TOS
SunMoon
Shadow
Examining the "Autistic Shading Effect"
SpeedLine
SpriteText
Symmetry
Transform
WallPaperFish (Adam Include)
Lesson 7 Negative Integers, Sign Extention and the "Sequencer" in Assembly
Covering 2's complement negative integers and what sign extension is. What are the maximum and minimum positive and negative numbers you can represent with 64 bits?
Python 2.7.13 is used to help out with the big numbers.
How do you convert a negative 2's complement integer to positive and vice versa?
NOT, INC, and instructions are used (equivalent of NEG, which I later discovered).
Implement what I call a 'sequencer' based off some HolyC code Terry wrote, and the significance of powers of 2. Introduce concept of an AND mask.
Lesson 6 XOR Tricks and Looping in Assembly and analysis of Factorial Function in HolyC
Demonstrating XOR's ability to invert a register like NOT instruction.
Simple HolyC Factorial function that takes 1 I64 input and returns an I64 output, and how to run that function from the command line. Show how to do a for loop from the command line. Show what happens when a result overflows what you can store in an I64 register/variable. Show the unassembled version of the HolyC Factorial function giving clues for what assembly instructions to learn next.
Show how compiler interfaces a function to the run time environment.
Sometimes uses stack and sometimes uses registers in the Fact() function. Function arguments (also called parameters) are based on offsets from RBP, the Base Pointer.
Lesson 5 Generalized Operations on Registers
Introducing SHL (Shift Left), reviewing ADD, OR, XOR, INC (Increment), ROL (Rotate Left), ROR (Rotate Right). Make use of felixcloutier.com's x86 assembly language reference. Introducing looping using the RCX register and JZ (Jump if Zero). Comparing it to a C/HolyC for() loop.
Lesson 4 The Mystery of the R10 Register
Exploring mysterious behavior of the R10 Register in Dbg; debugger
Second x86_64 Assembly Language Lesson
Expanding upon the previous video, introducing LEA {Load Effective Address) and ADD. Make observations about the differing assembly and machine language to do the same thing 3 different ways.
Very Basic Assembly Language in TempleOS
One of my first streams, in which I talk a lot about a very simple assembly language program. Introduce the x86-64 registers, MOV, XOR, Labels, asm {} block, U0 function. Go through the Unassembled version, comparing machine language to assembly language. Assembly language IS a high level language! Hackers who "smash the stack" have to program in machine language, not assembly.
Demoing TempleOS Games on Real TempleOS PC Oct 13 2020
Video Quality really sucks, the weird metallic thing you're hearing is I put my webcam on a stand up fan! I'm encoding on an IBM ThinkCentre is why it gets all the weird artifacts, and the video is heavily out of sync with the audio for some reason (used OBS). Observations about the games in general and discuss desires to modify some of the games. In particular, I find Talons to be one of the weirdest games. Why does it draw sometimes and sometimes not? It looks so bad it's interesting in its own way!
Lesson 3 RDTSC x86_64 Instruction
Playing with RDTSC, Read Time Stamp Counter in an Emulated TempleOS. Kind of embarrassing to watch myself stumble around in this video (Pretty sure I was drinking). I discover the "R10 in Dbg" bug and am perplexed. Starts off with some GodSongs on my real TempleOS Computer (Dude, I got a Dell! From the Trashcan!)
TempleOS for Unix Users
I help Unix users get around TempleOS. It's not exactly comprehensive, but it's a start. Later on I found out about this guy who did a Lambda shell in TOS, but I haven't tried that yet.
Assembly Language Overview in TempleOS
I go over about 17 small assembly language programs written in x86-64 assembly language, using the TempleOS system, introducing the basics of assembly language, in clear and simple English
45
views