Skip to navigation

BBC Micro Elite

Maths (Arithmetic): SQUA

Name: SQUA [View in context] Type: Subroutine Category: Maths (Arithmetic) Summary: Clear bit 7 of A and calculate (A P) = A * A
Do the following multiplication of unsigned 8-bit numbers, after first clearing bit 7 of A: (A P) = A * A
.SQUA { AND #%01111111 \ Clear bit 7 of A and fall through into SQUA2 to set \ (A P) = A * A }