.TT167 LDA #16 ; Clear the top part of the screen, draw a border box, JSR TRADEMODE ; and set up a printable trading screen with a view type ; in QQ11 of 32 (Market Price screen) LDA #5 ; Move the text cursor to column 5 JSR DOXC 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 JSR DOYC JSR TT163 ; Print the column headers for the prices table LDA #6 ; Move the text cursor to row 6 JSR DOYC 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 JSR INCYC ; 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 screenContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TT102 calls TT167
[X]
Subroutine DOXC (category: Text)
Move the text cursor to a specific column
[X]
Subroutine DOYC (category: Text)
Move the text cursor to a specific row
[X]
Subroutine INCYC (category: Text)
Move the text cursor to the next row
[X]
Subroutine NLIN3 (category: Drawing lines)
Print a title and draw a horizontal line at row 19 to box it in
[X]
Subroutine TRADEMODE (category: Drawing the screen)
Clear the screen and set up a trading screen
[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