.TT213 LDA #8 \ Clear the top part of the screen, draw a border box, JSR TT66 \ and set the current view type in QQ11 to 8 (Inventory \ screen) LDA #11 \ Move the text cursor to column 11 to print the screen STA XC \ 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 #14 \ Print recursive token 128 ("SPACE") followed by a JSR TT68 \ colon LDX new_hold \ Set X to the amount of free space in our current DEX \ ship's hold, minus 1 as new_hold contains the amount \ of free space plus 1 CLC \ Call pr2 to print the amount of free space as a JSR pr2 \ three-digit number without a decimal point (by \ clearing the C flag) JSR TT160 \ Print "t" (for tonne) and a space JMP TT210 \ Jump to TT210 to print the contents of our cargo bay \ and return from the subroutine using a tail callName: TT213 [Show more] Type: Subroutine Category: Market Summary: Show the Inventory screen (red key f9)Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TT102 calls TT213
[X]
Subroutine NLIN4 (category: Drawing lines)
Draw a horizontal line at pixel row 19 to box in a title
[X]
Subroutine TT160 (category: Market)
Print "t" (for tonne) and a space
[X]
Subroutine TT210 (category: Market)
Show a list of current cargo in our hold, optionally to sell
[X]
Subroutine TT60 (category: Text)
Print a text token and a paragraph break
[X]
Subroutine TT66 (category: Drawing the screen)
Clear the screen and set the current view type
[X]
Subroutine TT68 (category: Text)
Print a text token followed by a colon
[X]
Subroutine fwl (category: Status)
Print fuel and cash levels
[X]
Subroutine pr2 (category: Text)
Print an 8-bit number, left-padded to 3 digits, and optional point