Skip to navigation

BBC Micro Elite

Universe: GINF

Name: GINF [View in context] Type: Subroutine Category: Universe Summary: Fetch the address of a ship's data block into INF
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
.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 subroutine