Skip to navigation


Market: TT213

[NES version, Bank 0]

Name: TT213 [Show more] Type: Subroutine Category: Market Summary: Show the Inventory screen
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * RedrawCurrentView calls TT213 * TT102 calls TT213 * TT167 calls TT213
.TT213 LDA #$97 ; Clear the screen and set the view type in QQ11 to $97 JSR SetNewViewType ; (Inventory) 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 on tile row 2 to box in the ; title 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), jump to inve1 to skip the BCC inve1 ; following LDA #12 ; Print a newline JSR TT27_b2 LDA #107 ; We do have a cargo bay extension, so print recursive JSR TT27_b2 ; 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 .inve1 JSR TT67 ; Print a newline JMP TT210 ; Jump to TT210 to print the contents of our cargo bay ; and return from the subroutine using a tail call