Skip to navigation

Elite on the BBC Micro and NES

Charts: TT103

[BBC Master version]

Name: TT103 [Show more] Type: Subroutine Category: Charts Summary: Draw a small set of crosshairs on a chart
Context: 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: * hm calls TT103 * HME2 calls TT103 * TT102 calls TT103 * TT16 calls TT103 * TT23 calls TT103

Draw a small set of crosshairs on a galactic chart at the coordinates in (QQ9, QQ10).
.TT103 LDA #GREEN \ Switch to stripe 3-1-3-1, which is white/yellow in the STA COL \ chart view LDA QQ11 \ Fetch the current view type into A BMI TT105 \ If this is the Short-range Chart screen, jump to TT105 LDA QQ9 \ Store the crosshairs x-coordinate in QQ19 JSR SCALEX \ STA QQ19 \ The call to SCALEX has no effect as it only contains \ an RTS, but having this call instruction here would \ enable different scaling to be applied by altering \ the SCALE routines. This code is left over from the \ conversion to other platforms, where the scale factor \ might need to be different LDA QQ10 \ Halve the crosshairs y-coordinate and store it in QQ19 JSR SCALEY \ (we halve it because the Long-range Chart is half as STA QQ19+1 \ high as it is wide) \ \ The call to SCALEY simply does an LSR A, but having \ this call instruction here would enable different \ scaling to be applied by altering the SCALE routines. \ This code is left over from the conversion to other \ platforms, where the scale factor might need to be \ different LDA #4 \ Set QQ19+2 to 4 denote crosshairs of size 4 STA QQ19+2 JMP TT15 \ Jump to TT15 to draw crosshairs of size 4 at the \ crosshairs coordinates, returning from the subroutine \ using a tail call