Skip to navigation

Aviator on the BBC Micro

Utility routines: CopyTempToPoint

Name: CopyTempToPoint [Show more] Type: Subroutine Category: Utility routines Summary: Set a specified point to (xTemp1, yTemp1, zTemp1)
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * FireGuns calls CopyTempToPoint

Arguments: X The ID of the point to set to (xTemp1, yTemp1, zTemp1)
.CopyTempToPoint LDA xTemp1Lo \ Set point X's x-coordinate to (xTemp1Hi xTemp1Lo) STA xPointLo,X LDA xTemp1Hi STA xPointHi,X LDA yTemp1Lo \ Set point X's y-coordinate to (yTemp1Hi yTemp1Lo) STA yPointLo,X LDA yTemp1Hi STA yPointHi,X LDA zTemp1Lo \ Set point X's z-coordinate to (zTemp1Hi zTemp1Lo) STA zPointLo,X LDA zTemp1Hi STA zPointHi,X RTS \ Return from the subroutine EQUB &00, &49, &60 \ These bytes appear to be unused, and simply repeat the \ last three bytes from above (i.e. the last two bytes \ of STA zPointHi,X and the RTS instruction)