.TRADEMODE PHA \ Store the view type on the stack so we can restore it \ after the call to CTRL JSR CTRL \ Scan the keyboard to see if CTRL is currently pressed STA printflag \ Store the result in printflag, which will have bit 7 \ set (and will therefore enable printing) if CTRL is \ being pressed PLA \ Restore the view type from the stack JSR TT66 \ Clear the top part of the screen, draw a border box, \ and set the current view type in QQ11 to A JSR FLKB \ Call FLKB to flush the keyboard buffer LDA #48 \ Send a #SETVDU19 48 command to the I/O processor to JSR DOVDU19 \ switch to the mode 1 palette for trading screens, \ which is yellow (colour 1), magenta (colour 2) and \ white (colour 3) LDA #CYAN \ Send a #SETCOL CYAN command to the I/O processor to JMP DOCOL \ switch to colour 3, which is white in the trade view, \ and return from the subroutine using a tail callName: TRADEMODE [Show more] Type: Subroutine Category: Drawing the screen Summary: Clear the screen and set up a printable trading screenContext: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * EQSHP calls TRADEMODE * STATUS calls TRADEMODE * TT167 calls TRADEMODE * TT208 calls TRADEMODE * TT213 calls TRADEMODE * TT219 calls TRADEMODE * TT25 calls TRADEMODE
Clear the top part of the screen, draw a border box, set the print flag if CTRL is being pressed, set the palette for trading screens, and set the current view type in QQ11 to A.
Arguments: A The type of the new current view (see QQ11 for a list of view types)
[X]
Subroutine CTRL (category: Keyboard)
Scan the keyboard to see if CTRL is currently pressed
[X]
Configuration variable CYAN = %11111111
Four mode 1 pixels of colour 3 (cyan or white)
[X]
Subroutine DOCOL (category: Text)
Set the text colour by sending a #SETCOL command to the I/O processor
[X]
Subroutine DOVDU19 (category: Drawing the screen)
Change the mode 1 palette by sending a #SETVDU19 command to the I/O processor
[X]
Subroutine FLKB (category: Keyboard)
Flush the keyboard buffer
[X]
Subroutine TT66 (category: Drawing the screen)
Clear the screen and set the current view type
[X]
Variable printflag (category: Text)
A flag that determines whether to send text output to the printer as well as the screen