This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: DELAY Type: Subroutine Category: Utility routines
Arguments:
This variation is blank in the Disc (flight), Disc (docked), 6502 Second Processor and Master versions.
Tap on a block to expand it, and tap it again to revert.
In the BBC versions, delays are implemented by waiting for a specified number of vertical syncs. The Electron's video system is different, so it has its own dedicated delay routine that isn't based around the screen refresh, but instead wastes time using a convoluted loop-within-loop structure.
See below for more variations related to this code.
This variation is blank in the Disc (flight), Disc (docked), 6502 Second Processor and Master versions.
Tap on a block to expand it, and tap it again to revert.
.DELAY
Code variation 6 of 7
See variation 5 above for details.
This variation is blank in the Electron version.
JSR WSCAN \ Call WSCAN to wait for the vertical sync, so the whole \ screen gets drawn
DEY \ Decrement the counter in Y
RTS \ Return from the subroutine