Skip to navigation


Universe: SetCurrentSystem

[NES version, Bank 0]

Name: SetCurrentSystem [Show more] Type: Subroutine Category: Universe Summary: Set the seeds for the selected system to the system that we last snapped the crosshairs to
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * SetSelectedSystem calls SetCurrentSystem * SetSelectionFlags calls via RTS6

Other entry points: RTS6 Contains an RTS
.SetCurrentSystem LDX #5 ; Set up a counter in X to copy six bytes (for three ; 16-bit numbers) .ssys1 LDA selectedSystem,X ; Copy the X-th byte in selectedSystem to the X-th byte STA QQ15,X ; in QQ15, to set the selected system to the previous ; system that we snapped the crosshairs to DEX ; Decrement the counter BPL ssys1 ; Loop back until we have copied all six seeds .RTS6 RTS ; Return from the subroutine