This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
.TT105 LDA QQ9 \ Set A = QQ9 - QQ0, the horizontal distance between the SEC \ crosshairs (QQ9) and the current system (QQ0) SBC QQ0Name: TT105 Type: Subroutine Category: Charts Summary: Draw crosshairs on the Short-range Chart, with clipping
Check whether the crosshairs are close enough to the current system to appear on the Short-range Chart, and if so, draw them.
In most versions the Short-range Chart crosshairs can be moved to the right edge of the screen, but in the Master version they disappear before they get to the edge.
This variation is blank in the Master version.
CMP #38 \ If the horizontal distance in A < 38, then the BCC TT179 \ crosshairs are close enough to the current system to \ appear in the Short-range Chart, so jump to TT179 to \ check the vertical distance CMP #230 \ If the horizontal distance in A < -26, then the BCC TT180 \ crosshairs are too far from the current system to \ appear in the Short-range Chart, so jump to TT180 to \ return from the subroutine (as TT180 contains an RTS)
.TT179
The Master version contains code to scale the chart views, though it has no effect in this version. The code is left over from the non-BBC versions, which needed to be able to scale the charts to fit their different-sized screens.
See below for more variations related to this code.
Tap on a block to expand it, and tap it again to revert.
LDA QQ10 \ Set A = QQ10 - QQ1, the vertical distance between the SEC \ crosshairs (QQ10) and the current system (QQ1) SBC QQ1
In most versions the Short-range Chart crosshairs can be moved close to the bottom edge of the screen, but in the Master version they disappear before they get quite as far.
This variation is blank in the Master version.
CMP #38 \ If the vertical distance in A is < 38, then the BCC P%+6 \ crosshairs are close enough to the current system to \ appear in the Short-range Chart, so skip the next two \ instructions CMP #220 \ If the horizontal distance in A is < -36, then the BCC TT180 \ crosshairs are too far from the current system to \ appear in the Short-range Chart, so jump to TT180 to \ return from the subroutine (as TT180 contains an RTS)
Code variation 4 of 5
See variation 2 above for details.
Tap on a block to expand it, and tap it again to revert.
LDA #8 \ Set QQ19+2 to 8 denote crosshairs of size 8 STA QQ19+2
The moveable chart crosshairs in the Master version are drawn with white/yellow vertical stripes (with the exception of the static crosshairs on the Long-range Chart, which are white). All crosshairs are white in the other versions.
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
LDA #GREEN \ Switch to stripe 3-1-3-1, which is white/yellow in the STA COL \ chart view
JMP TT15 \ Jump to TT15 to draw crosshairs of size 8 at the \ crosshairs coordinates, returning from the subroutine \ using a tail call