EasyManua.ls Logo

AMSTRAD CPC464 - Page 41

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...
In mode 0, there are only 20 columns, but the same 25 lines. If you now type in:
mode 0
run
You will see that the man now appears at the top right corner of the screen. This happens because
the x co-ordinate 20, is the last column in mode 0.
In mode 2, there are 80 columns and 25 lines. Using the same program, you will probably be able to
guess where the man will appear. Type in:
mode 2
run
return to mode 1 by typing in:
mode 1
Now experiment for yourself, modifying the locate and chr$( ) numbers to position various characters
anywhere on the screen. Just for example, type in:
Locate 20,12:print chr$(240)
You will see an arrow in the centre of the screen. Note that in this instruction
20 was the horizontal (x) co-ordinate (in the range 1 to 40)
12 was the vertical (y) co-ordinate (in the range 1 to 25)
240 was the character symbol number (in the range 32 to 255)
To get the character symbol 250 to be repeated across the screen, type in the following program:
5 cls
10 for x = 1 to 39
20 Locate x,20
40 print chr$(250)
50 next x
60 goto 5
run
Press [ESC] key twice to break
In order to remove the previous character from the screen before printing the next character, type in:
40 print " "; chr$(250)
(This new line 40 automatically replaces the line previously typed as line 40.)

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals