.stay_here LDX #&F4 \ It costs 50.0 Cr to refresh the station's market LDY #&01 \ prices, which is represented as a value of 500, so \ this sets (Y X) = &1F4 = 500 JSR LCASH \ Subtract (Y X) cash from the cash pot, but only if \ we have enough cash BCC stay_quit \ If the C flag is clear then we did not have enough \ cash for the transaction, so jump to stay_quit to \ return from the subroutine without refreshing the \ market prices JSR cour_dock \ Update the current special cargo delivery mission JSR DORND \ Set A and X to random numbers STA QQ26 \ Set QQ26 to the random byte that's used in the market \ calculations JSR GVL \ Calculate the availability for each market item in the \ new system .stay_quit JMP BAY \ Go to the docking bay (i.e. show the Status Mode \ screen)Name: stay_here [Show more] Type: Subroutine Category: Market Summary: Pay a docking fee and refresh the system's market pricesContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TT102 calls stay_here
[X]
Subroutine BAY (category: Status)
Go to the docking bay (i.e. show the Status Mode screen)
[X]
Subroutine DORND (category: Maths (Arithmetic))
Generate random numbers
[X]
Subroutine GVL (category: Universe)
Calculate the availability of market items
[X]
Subroutine LCASH (category: Maths (Arithmetic))
Subtract an amount of cash from the cash pot
[X]
Subroutine cour_dock (category: Missions)
Update the current special cargo delivery mission on docking
[X]
Label stay_quit is local to this routine