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 :
list"+chr$(l3)
This sets the smaller
[ENTER]
key to clear and restore the text to visible colours should you get
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
30 PAPER #n,n+4
40 CLS #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
W I N D O W S W A P
command, add in line 55:
5 5 I F n = 3 THEN WINDOW SWAP 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.
Содержание CPC464
Страница 1: ......
Страница 32: ...or you can type 3e1 1e1 ENTER 300 2 3000x1000 Type 3e3 1e3 ENTER 3000000 3 3000x0 001 Type 3e3 1e 3 ENTER 3 ...
Страница 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Страница 118: ...TO DO DRAW THIS PAGE ...
Страница 219: ...actual value may be made to vary during the execution of a program ...
Страница 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Страница 241: ......
Страница 245: ...Sound envelope Music planner sheet ...