AMSTRAD CPC464 User Manual page 114

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

5.3 Windows
The user can select up to eight text windows into which characters are written, and also a graphics
window into which plotting may be performed. Windows are reset to defaults when the screen mode
is set. See the keyword description in Chapter 8.
NB: If the text window is equivalent to the entire screen (default), then rapid rolling is achieved by
hardware. If the text window is less than the available screen, then rolling is achieved by software,
which is correspondingly slower.
The WINDOW command specifies the left/right/top/bottom character cells of the specified screen
stream - windows may overlap one another, and provide a rapid means of drawing filled boxes.
Before starting to explore them, type:
K E Y 1 3 9 , " m o d e 2 : p a p e r 0 : i n k 1 , 0 : i n k 0 , 9 :
l i s t " + c h r $ ( l 3 )
This sets the smaller
key to clear and restore the text to visible colours should you get
[ENTER]
lost in some invisible combinations of PEN and PAPER. The following program draws a series of
windows across the screen, and illustrates two major points:
5 MODE 0
1 0 F O R n = 0 T O 7
2 0 W I N D O W # n , n + l , n + 6 , n + l , n + 6
3 0 P A P E R # n , n + 4
4 0 C L S # n
5 0 F O R c = l c = l T O 2 0 0 : N E X T T O 2 0 0 : N E X T
60 NEXT
The first point is that each new screen overwrites the one before, and the second is to emphasise that
the messages appear in stream #0 at all times (unless redirected). Before doing anything else, type:
LIST
And the program will be squeezed through stream 0. Try:
LIST #5
Then:
CLS #6
..illustrating the point that the most recently addressed screen stream will overwrite all else - and
that the system message Ready appears in stream 0, even when the listing was sent to stream 5.
Using the WINDOW SWAP command, add in line 55:
5 5 I F n = 3 T H E N W I N D O W S W A P 7 , 0
You may imagine that this will direct the Ready message at the end of the program execution to
stream 7. Run it and see. By developing this simple program, you will get an appreciation of the way
WINDOWs operate and interact.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents