Z80 Assembly 02: Arithmetic, Flags, and Control Flow

Arithmetic and the Flags Register Operations like ADD and SUB affect the Flags Register (F), which is essential for conditional execution. Key Flags: Z (Zero): Set if the result of an operation is zero. C (Carry): Set if there is a carry-out from the most significant bit. Instruction Description ADD A, R Adds the 8-bit contents of R to A. Only A can be the destination. ADD HL, DE Adds the 16-bit contents of DE to HL. Controlling Execution with Jumps Jumps (changing the Program Counter) allow programs to make decisions and repeat blocks of code. ...

September 27, 2025