Skip to navigation


Version analysis of wW

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: wW Type: Subroutine Category: Flight Summary: Start a hyperspace countdown
Start the hyperspace countdown (for both inter-system hyperspace and the galactic hyperdrive).

Code variation 1 of 4A variation in the comments only

This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.

Other entry points: wW2 Start the hyperspace countdown, starting the countdown from the value in A
.wW LDA #15 \ The hyperspace countdown starts from 15, so set A to \ 15 so we can set the two hyperspace counters

Code variation 2 of 4A variation in the labels only

This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.

.wW2
 STA QQ22+1             \ Set the number in QQ22+1 to A, which is the number
                        \ that's shown on-screen during the hyperspace countdown

 STA QQ22               \ Set the number in QQ22 to 15, which is the internal
                        \ counter that counts down by 1 each iteration of the
                        \ main game loop, and each time it reaches zero, the
                        \ on-screen counter gets decremented, and QQ22 gets set
                        \ to 5, so setting QQ22 to 15 here makes the first tick
                        \ of the hyperspace counter longer than subsequent ticks

Code variation 3 of 4Minor and very low-impact

Tap on a block to expand it, and tap it again to revert.

TAX \ Print the 8-bit number in X (i.e. 15) at text location JMP ee3 \ (0, 1), padded to 5 digits, so it appears in the top \ left corner of the screen, and return from the \ subroutine using a tail call
IF _IB_SUPERIOR TAX \ Print the 8-bit number in X (i.e. 15) at text location JMP ee3 \ (0, 1), padded to 5 digits, so it appears in the top \ left corner of the screen, and return from the \ subroutine using a tail call ELIF _IB_ACORNSOFT TAX \ Print the 8-bit number in X (i.e. 15) at text location JSR ee3 \ (0, 1), padded to 5 digits, so it appears in the top \ left corner of the screen RTS \ Return from the subroutine ENDIF

Code variation 4 of 4A variation in the comments only

This variation is blank in the Disc (flight), Disc (docked), 6502 Second Processor, Master and Electron versions.

\.hy5 \ This instruction and the hy5 label are commented out \RTS \ in the original - they can actually be found at the \ end of the jmp routine below, so perhaps this is where \ they were originally, but the authors realised they \ could save a byte by using a tail call instead of an \ RTS?