Skip to navigation

Utility routines: CopyPointToWork

Name: CopyPointToWork [Show more] Type: Subroutine Category: Utility routines Summary: Copy a point from the point tables to the variable workspace Deep dive: Multi-byte variables
Arguments: Y The ID of the point to copy from the point tables X The low byte of the x-coordinate of the 16-bit workspace point to update: * LO(xVelocityPLo) = (xVelocityP, yVelocityP, zVelocityP) * LO(dxVelocityLo) = (dxVelocity, dyVelocity, dzVelocity) * LO(dxRotationLo) = (dxRotation, dyRotation, dzRotation) * LO(xTemp2Lo) = (xTemp2, yTemp2, zTemp2)
.CopyPointToWork LDA xPointLo,Y \ Copy the Y-th point coordinate to the X-th coordinate STA xTurnHi,X \ in the variable workspace, starting with the low bytes LDA yPointLo,Y STA yTurnHi,X LDA zPointLo,Y STA zTurnHi,X LDA xPointHi,Y \ And then the high bytes STA xTurnTop,X LDA yPointHi,Y STA yTurnTop,X LDA zPointHi,Y STA zTurnTop,X RTS \ Return from the subroutine