Skip to navigation

Aviator on the BBC Micro

Utility routines: randomNumbers

Name: randomNumbers [Show more] Type: Variable Category: Utility routines Summary: A list for keeping a list of random numbers Deep dive: Random numbers
Context: See this variable in context in the source code References: This variable is used as follows: * ApplyFlightModel (Part 3 of 7) calls randomNumbers * ExplodeAlien calls randomNumbers * NextRandomNumber calls randomNumbers * ResetVariables calls randomNumbers * SetRandomNumber calls randomNumbers

This list contains a pointer to the current position in the first byte. This is stored as an offset in the range 0 to 10, and is incremented every time we stash a new random number in the list, wrapping round to the start when it reaches the end. The pointer gets zeroed in the ResetVariables routine.
.randomNumbers EQUB &FB, &FD, &FF, &F9, &FB, &F8, &FB, &FA EQUB &53, &52, &FF, &FE, &01, &41, &58, &0D