If I May Interrupt - AMSTRAD cpc 6128 User Instruction

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

Advertisement

.... and you will see that the 4th window is still in the same position - the new coloured
block having obscured those beneath it as one would expect. As a matter of interest,
observe the differences when you type:
LIST
LIST #4
LIST #3
A further feature of the WIN D 0 W command, demonstrated by the final program in
this section, is that it does not matter if you specify the left and right window
dimensions in reverse order. This means that if the value of the first parameter is
greater than the second, BASIC will automatically sort the dimensions into the
correct order. This also applies to the top and bottom window dimensions.
HI
MODE
0
20 a=1+RND*19:b=1+RND*19
30 c=1+RND*24:d=1+RND*24
40 e=RND*15
50 WINDOW a,b,c,d
60 PAPER e:CLS
70 GO TO 20
If I may interrupt ....
If you haven't already noticed, a major innovation in the software of the AMSTRAD
range of computers is their unique ability to handle interrupts from BASIC - which
means that AMSTRAD BASIC is capable of performing a number of simultaneous
but separate operations within a program. Such a facility is sometimes referred to as
'multi-tasking', and it is implemented by the application of the commands AFT E R
and EVERY.
This facility is also clearly demonstrated in the way in which sound may be handled
through facilities such as queues and rendezvous.
Every aspect of timing is referred to the master system clock, which is a quartz
controlled timing system within the computer that looks after the timing and
synchronisation of events that happen in the computer - things like the scanning of
the display and clocking the processor. Where a function in the hardware is related to
time, this can be traced back to the quartz master clock.
The software implementation is the AFT E Rand EVE R Y command, which in keeping
with the user-friendly approach of AMSTRAD BASIC, do precisely what they say; i.e.
AFT E R the time that you have preset in the command, the program will divert to the
designated sub-routine and perform the task defined therein.
At your leisure ....
Chapter 9 Page 29

Advertisement

Table of Contents
loading

Table of Contents