Z80 Assembly 82: Fixed-Point Arithmetic (Fast Fractions)

The Need for Fixed-Point Math As established (Part 30), Z80 floating-point math is extremely slow. Fixed-point arithmetic is the solution: it allows the Z80 to perform calculations involving fractions using only fast integer operations. The Principle: A fixed-point number is an integer where the position of the decimal point is implied and fixed by the programmer. The Q-Format (Standard Fixed-Point) We represent a fractional number (like 3.14) by scaling it up to make it an integer. This is often called a Q-format (e.g., Q16, Q8). ...

September 28, 2025