.GINF TXA ; Set Y = X * 2 ASL A TAY LDA UNIV,Y ; Get the high byte of the address of the X-th ship STA INF ; from UNIV and store it in INF LDA UNIV+1,Y ; Get the low byte of the address of the X-th ship STA INF+1 ; from UNIV and store it in INF RTS ; Return from the subroutineName: GINF [Show more] Type: Subroutine Category: Universe Summary: Fetch the address of a ship's data block into INFContext: See this subroutine in context in the source code References: This subroutine is called as follows: * FRMIS calls GINF * Main flight loop (Part 4 of 16) calls GINF * NWSHP calls GINF * WPSHPS calls GINF * zonkscanners calls GINF
Get the address of the data block for ship slot X and store it in INF. This address is fetched from the UNIV table, which stores the addresses of the 13 ship data blocks in workspace K%.
Arguments: X The ship slot number for which we want the data block address
[X]
Variable UNIV (category: Universe)
Table of pointers to the local universe's ship data blocks