★ CODING ★ LISTINGS ★ Scroll Demo ★ |
Graphic - Scroll Demo (The Amstrad User) | Coding Listings |
A mirrored scroll, a rally drive and a program to test you the morning after. Yes, another one, but with a difference. It incorporates Nick "Cribbage" Herrick's extra special bi-directional horizontal pseudo-scroll (BHP for short). Line 20- interrupt and sound effects. Line 30 - selects correct address for SYMBOL 32 when downloading from ROM (this varies according to machine). Line50 - Downloads ASCII characters from ROM to RAM. Lines 90 to 150- creates mirror images of CHR$(32) to CHR$(127) at 132-227 ASCII, by peeking each bit and producing reversed binary number which is used for symbol definition. Line 160- creates"starry sky"background. Line 170 - clears input and starts loop which will continue demo until a key is pressed. Lines 180 to 230 - reads DATA message, adds spaces, prints 20 left characters and prints to left half of screen. Also creates a string of reversed characters and prints to the right half of the screen, then every five cycles scrolls the background vertically. Lines 240 to 250 - scrolls top and bottom halves of the screen, adding extra "stars" in the centre. Line 260 - background sound effects. Lines 270 to end - message in data statements. You can have any length of string data statements up to about 200 characters long, as long as the last line is "$$$$" (without the inverted commas). Nick apologises that some lines are long and multi-statement, but this is to get it to run at a reasonable speed from Basic.
TAU
|