.TT167 LDA #16 \ Clear the top part of the screen, draw a border box, 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 LDX #%10000000 \ Set bit 7 of QQ17 to switch to Sentence Case, with the STX QQ17 \ next letter in capitals 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 subroutineName: 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 Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * TT102 calls TT167
[X]
Subroutine NLIN3 (category: Drawing lines)
Print a title and draw a horizontal line at row 19 to box it in
[X]
Subroutine TT151 (category: Market)
Print the name, price and availability of a market item
[X]
Subroutine TT163 (category: Market)
Print the headers for the table of market prices
[X]
Label TT168 is local to this routine
[X]
Subroutine TT66 (category: Drawing the screen)
Clear the screen and set the current view type