Skip to navigation


Market: TT167

[Elite-A, Flight]

Name: TT167 [Show more] Type: Subroutine Category: Market Summary: Show the Market Price screen (red key f7)
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TT102 calls TT167
.TT167 LDA #16 \ Clear the top part of the screen, draw a white border, JSR TT66 \ and set the current view type in QQ11 to 16 (Market \ Price screen) LDA #5 \ Move the text cursor to column 5 STA XC LDA #167 \ Print recursive token 7 ("{current system name} MARKET JSR NLIN3 \ PRICES") and draw a horizontal line at pixel row 19 \ to box in the title LDA #3 \ Move the text cursor to row 3 STA YC JSR TT163 \ Print the column headers for the prices table LDA #0 \ We're going to loop through all the available market STA QQ29 \ items, so we set up a counter in QQ29 to denote the \ current item and start it at 0 .TT168 \ --- Mod: Code removed for Elite-A: ------------------> \LDX #%10000000 \ Set bit 7 of QQ17 to switch to Sentence Case, with the \STX QQ17 \ next letter in capitals \ --- And replaced by: --------------------------------> JSR vdu_80 \ Call vdu_80 to switch to Sentence Case, with the next \ letter in capitals \ --- End of replacement ------------------------------> JSR TT151 \ Call TT151 to print the item name, market price and \ availability of the current item, and set QQ24 to the \ item's price / 4, QQ25 to the quantity available and \ QQ19+1 to byte #1 from the market prices table for \ this item INC YC \ Move the text cursor down one row INC QQ29 \ Increment QQ29 to point to the next item LDA QQ29 \ If QQ29 >= 17 then jump to TT168 as we have done the CMP #17 \ last item BCC TT168 RTS \ Return from the subroutine