This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: TT167 Type: Subroutine Category: Market
.TT167
In the 6502SP version, you can send the Market Price screen to the printer by pressing CTRL-f7.
Tap on a block to expand it, and tap it again to revert.
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
JSR TT163 \ Print the column headers for the prices table
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
Tap on a block to expand it, and tap it again to revert.
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 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