.SetRandomNumber LDX randomNumbers \ Fetch the pointer for the randomNumbers list LDA VIA+&64 \ Read the 6522 User VIA T1C-L timer 1 low-order \ counter (SHEILA &64), which decrements one million \ times a second and will therefore be pretty random STA randomNumbers+1,X \ Set the next item in the list to the random number we \ just fetched \ Fall through into NextRandomNumber to move the list \ pointer to point to the new number we just addedName: SetRandomNumber [Show more] Type: Subroutine Category: Utility routines Summary: Set the next item in the randomNumbers list to a new random number and update the pointer to point to it Deep dive: Random numbersContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MainLoop (Part 13 of 15) calls SetRandomNumber
[X]
Configuration variable VIA = &FE00
Memory-mapped space for accessing internal hardware, such as the video ULA, 6845 CRTC and 6522 VIAs (also known as SHEILA)
[X]
Variable randomNumbers (category: Utility routines)
A list for keeping a list of random numbers