.ResetVariable LDA #0 \ Zero the X-th byte from xTurnHi STA xTurnHi,X STA xTurnTop,X \ Zero the X-th byte from xTurnTop RTS \ Return from the subroutineName: ResetVariable [Show more] Type: Subroutine Category: Utility routines Summary: Set a 16-bit in the variable workspace to 0Context: See this subroutine in context in the source code References: This subroutine is called as follows: * ApplyFlightModel (Part 5 of 7) calls ResetVariable * ProcessLanding (Part 2 of 7) calls ResetVariable * ProcessLanding (Part 3 of 7) calls ResetVariable * ProcessLanding (Part 4 of 7) calls ResetVariable * ProcessLanding (Part 7 of 7) calls ResetVariable
Arguments: X The offset from xTurnHi of the low byte of the variable to zero: * &00 = xTurn(Top Hi) * &02 = zTurn(Top Hi) * &80 = dxTurn(Top Hi) * &82 = dzTurn(Top Hi) * &8A = yVelocity(Top Hi) * &EA = xRotation(Hi Lo) * &EC = zRotation(Hi Lo) * &EE = yPlane(Hi Lo) In the case of the two 24-bit variables, X is the offset of the high byte, and we have to zero the low byte manually after the routine call
Returns: A A is set to 0
[X]
Variable xTurnHi in workspace Main variable workspace
Turn rate around the x-axis (high byte)
[X]
Variable xTurnTop in workspace Main variable workspace
Turn rate around the x-axis (top byte)