Skip to navigation

Elite on the BBC Micro

Maths (Arithmetic): GC2 (6502SP version)

Name: GC2 [View in context] Type: Subroutine Category: Maths (Arithmetic) Summary: Calculate (Y X) = (A P) * 4
Calculate the following multiplication of unsigned 16-bit numbers: (Y X) = (A P) * 4
.GC2 ASL P \ Set (A P) = (A P) * 4 ROL A ASL P ROL A TAY \ Set (Y X) = (A P) LDX P RTS \ Return from the subroutine