.DORND LDA RAND+1 \ r1Â´ = r1 + r3 + C TAX \ r3Â´ = r1 ADC RAND+3 STA RAND+1 STX RAND+3 LDA RAND \ X = r2Â´ = r0 TAX \ A = r0Â´ = r0 + r2 ADC RAND+2 STA RAND STX RAND+2 RTS \ Return from the subroutineName: DORND [Show more] Type: Subroutine Category: Utility routines Summary: Generate random numbers Deep dive: Generating random numbers Fixing ship positionsContext: See this subroutine in context in the source code References: This subroutine is called as follows: * PLL1 calls DORND

Set A and X to random numbers (though note that X is set to the random number that was returned in A the last time DORND was called). The C and V flags are also set randomly. This is a simplified version of the DORND routine in the main game code. It swaps the two calculations around and omits the ROL A instruction, but is otherwise very similar. See the DORND routine in the main game code for more details.

[X]

Variable RAND in subroutine Elite loader (Part 4 of 6)

The random number seed used for drawing Saturn