Skip to navigation

Elite on the BBC Micro and NES

Version analysis of TT213

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: TT213 Type: Subroutine Category: Market

Code variation 1 of 3A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

Summary: Show the Inventory screen (red key f9)
Summary: Show the Inventory screen (FUNC-0)
.TT213

Code variation 2 of 3Related to the 6502SP version

In the 6502SP version, you can send the Inventory screen to the printer by pressing CTRL-f9.

Tap on a block to expand it, and tap it again to revert.

LDA #8 \ Clear the top part of the screen, draw a white border, JSR TT66 \ and set the current view type in QQ11 to 8 (Inventory \ screen)
LDA #8 \ Clear the top part of the screen, draw a white border, JSR TRADEMODE \ and set up a printable trading screen with a view type \ in QQ11 of 4 (Inventory screen)

Code variation 3 of 3Related to Elite's use of the Tube

Tap on a block to expand it, and tap it again to revert.

LDA #11 \ Move the text cursor to column 11 to print the screen STA XC \ title
LDA #11 \ Move the text cursor to column 11 to print the screen JSR DOXC \ title
 LDA #164               \ Print recursive token 4 ("INVENTORY{crlf}") followed
 JSR TT60               \ by a paragraph break and Sentence Case

 JSR NLIN4              \ Draw a horizontal line at pixel row 19 to box in the
                        \ title. The authors could have used a call to NLIN3
                        \ instead and saved the above call to TT60, but you
                        \ just can't optimise everything

 JSR fwl                \ Call fwl to print the fuel and cash levels on two
                        \ separate lines

 LDA CRGO               \ If our ship's cargo capacity is < 26 (i.e. we do not
 CMP #26                \ have a cargo bay extension), skip the following two
 BCC P%+7               \ instructions

 LDA #107               \ We do have a cargo bay extension, so print recursive
 JSR TT27               \ token 107 ("LARGE CARGO{sentence case} BAY")

 JMP TT210              \ Jump to TT210 to print the contents of our cargo bay
                        \ and return from the subroutine using a tail call