Skip to navigation

BBC Micro Elite

Maths (Arithmetic): MULTU

Name: MULTU [View in context] Type: Subroutine Category: Maths (Arithmetic) Summary: Calculate (A P) = P * Q
Do the following multiplication of unsigned 8-bit numbers: (A P) = P * Q
.MULTU LDX Q \ Set X = Q BEQ MU1 \ If X = Q = 0, jump to MU1 to copy X into P and A, \ clear the C flag and return from the subroutine using \ a tail call \ Otherwise fall through into MU11 to set (A P) = P * X