The End Of The Beginning - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

The end of the beginning ....
So now we have written a program which fulfils the requirements that we set out to
achieve when we decided 'what the program has to do'. All that remains now, is to
improve the way that 'the results are presented' on the screen.
The beginning of the end ....
Let's add some instructions to tidy up the presentation of the program:
34 MODE 1
This establishes the screen mode, and clears the screen at the start of the program.
Now add:
36 WINDOW #1,13,30,10,14
Don't be put off by this seemingly complicated instruction. What we're doing here is
creating a small window on the screen to put the menu into. After the word WIN D 0 W,
we first specify which stream number this window is for, remember we can use 8
screen streams from
# 0
to
#
7. Now bearing in mind that all items printed on the
screen use stream
#
0
unless otherwise instructed, we won't use stream
#
0 for our
little window, otherwise everything that the program prints will be sent to it. Instead
we'll specify another stream between
#
1 and
#
7, and as you can see, we've chosen
#
1. The four numbers that follow
#
1, tell the computer what size the WIN D 0 W
should be, and it couldn't be easier; the numbers specify the left, right, top, and
bottom edges of the window, and refer to text column and row numbers (the same as
those used in the L 0 CAT E command). So in our example, after specifying that it's
stream
#
1 we're using, we say that the left edge of the window starts at column 13,
the right edge ends at column 30, the top edge starts at row 1 0, and the bottom edge
ends at row 14.
Now to make all our menu options print in stream (W I N D 0 W)
#
1 , we'll have to edit
lines 40 to 80 as follows:
40, PRINT # 1 , " 1 . enter info"
50 PRINT #1,"2. Lis t info"
60 PRINT #1,"3. search"
70 PRINT #1,"4. save info"
80 PRINT #1,"5. Load info"
Let's now add:
85
LOCATE
7,25
Beyond Foundations
Chapter 2 Page 11

Advertisement

Table of Contents
loading

Table of Contents