Scroll colour



Bill Longley,

Colchester,

Essex.



Most ZX-81 users will have a selection of machine-code

routines for inverting the display and scrolling in

different directions. Unhappily for those who upgrade to a

Spectrum, these are not compatible with the high-resolution

display file. But many of the principles remain the same

and here are three typical subroutines for the Spectrum.

  The first two are the up-and-down scrolling routines, but

here they scroll colour while the text remains still.

  The third is an ordinary screen invert routine. It will

exchange the ink dots for paper dots, and vice versa. This

probably only makes sense to Spectrum users.

  Three separate REMs are used to store the routines, so

one routine can be used on its own. If you make sure each

REM has 32 characters - remember a colour control code is

two - then each routine starts at an address which is 38

greater than the last; so the first starts at 23760, the

next at 23798, the third at 23836 and so on.

  One last point: it makes good sense to save each routine

on tape - with different line numbers - and MERGE them into

your program as you need them.

  [In fact, all three routines are relocatable, so you

don't have to load them into REMs at all. Loading them into

any other available part of memory should work fine.]