Skip to navigation

Elite on the BBC Micro and NES

Maths (Arithmetic): MULT12

[NES version, Bank 7]

Name: MULT12 [Show more] Type: Subroutine Category: Maths (Arithmetic) Summary: Calculate (S R) = Q * A
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TAS3 calls MULT12 * TAS4 calls MULT12 * TIDY calls MULT12 * TIS3 calls MULT12

Calculate: (S R) = Q * A
.MULT12 JSR MULT1 ; Set (A P) = Q * A STA S ; Set (S P) = (A P) ; = Q * A SETUP_PPU_FOR_ICON_BAR ; If the PPU has started drawing the icon bar, configure ; the PPU to use nametable 0 and pattern table 0 LDA P ; Set (S R) = (S P) STA R ; = Q * A RTS ; Return from the subroutine