EasyManua.ls Logo

AMSTRAD CPC464 - 5.2.3 MODE 2 is the high resolution mode.

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.2.3 MODE 2 is the high resolution mode.
MODE 2 allows two colours to be used simlutaneously, and is used primarily for its ability to
produce 80 text characters per line - which makes a program much easier to write, since you can see
so much more of the program at a glance.
MODE 2 provides 640 pixels per horizontal row, again with 200 in each vertical column.
5.2.4 Try this....
With the CPC464 fully reset using [CTRL][SHIFT][ESC], type in this program:
5 REM GRAPHICS EXAMPLE DEMONSTRATION
10 MODE 1
15 INK 2,0
16 INK 3,6: REM SETS THE COLOUR USED IN LINE 90
17 BORDER 1: REM DARK BLUE
20 CLG: REM CLEAN UP THE DISPLAY
30 b%=RND*5+1:REM SET UP PSEUDO
RANDOM INTEGER VARIABLES
40 c%=RND*5+1
50 ORIGIN 320,200 :REM FIX THE GRAPHICS ORIGIN
60 FOR a = 0 TO 1000 STEP PI/30
70 x%=100*COS(a)
80 MOVE x%,x%:REM MOVE THE GRAPHICS CURSOR
90 DRAW 200*COS(a/b%),200*SIN(a/c%),3
:REM DRAW THE LINE
91 IF INKEYS<>"" THEN 20
100 NEXT :REM BACK TO 60 UNLESS INTERRUPTED AT 91
110 GOTO 20
Now RUN the program. Hit any key on the keyboard, to get another pattern. This demonstrates
several important features of the CPC464s hardware and software: the CPC464 writes the screen
very smoothly without judder or tearing, and the software includes commands that permit very
sophisticated effects to be achieved with the minimum of effort. The REM statements (REMarks) are
simply there for your convenience, you dont need to include them for the program to work, it just
helps you (and particularly people who did not write the program in the first place) to understand
whats going on.
Note that several of the line numbers indicate afterthought entries - and whilst we could tidy the
listing by simply issuing a RENUM command, it will help you to follow the way in which programs
evolve and develop from their initial structures if we leave the original numbering.
SAVE this program on the cassette - eg:
SAVE "GRAPHICS 5.5.84"

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals