Lesson 6 XOR Tricks and Looping in Assembly and analysis of Factorial Function in HolyC

3 years ago

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.

Loading comments...