EasyManua.ls Logo

AMSTRAD CPC464 - 5.3 Windows

AMSTRAD CPC464
249 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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:
KEY 139, "mode 2:paper 0:ink 1,0:ink 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
10 FOR n=0 TO 7
20 WINDOW #n,n+l,n+6,n+l,n+6
30 PAPER #n,n+4
40 CLS #n
50 FOR c=l c=l TO 200:NEXT TO 200:NEXT
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:
55 IF 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.

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals