Logic - AMSTRAD cpc 6128 User Instruction

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

Advertisement

These 'user defined characters' can be made up using any combination of 0 to 64 dots,
arranged in any order - so the 'complete' character set that uses all possible
combinations of this matrix would comprise many more different characters. Add to
this the fact that you can group blocks of characters together to form larger block
characters, and the possibilities for user-defined graphics are limited only by your
time and ingenuity.
Logic ....
A major difference between a calculator and computer is the computer's ability to
handle logical operations in applications like the conditional 1FT HEN sequence.
To do this, the logical operators treat the values to which they are applied as bit
patterns (bit-wise), and operate on the individual bits. The description and use is
entirely, well .... er logical - but it is notoriously difficult to describe logic in simple
terms without the precision of concise definitions.
The two halves of the logical expression are known as the arguments. A logical
expression comprises:
< argument> [ <logical operator> <argument> ]
where:
<argument>
is: NOT <argument>
or: <numeric expression>
or: <relational expression>
or: «logical expression»
Both the arguments for a logical operator are forced to integer representation, and
ERR or 6 results if an argument will not fit into the integer range.
The logical operators, in order of precedence, and their effect on each bit are:
AND Result is 0 unless both argument bits are 1
o
R Result is 1 unless both argument bits are 0
X 0 R Result is 1 unless both argument bits are the same
AND is the most commonly employed logical operator, and does NOT mean 'add'.
PRINT 10 AND 10
Results in
1 0
PRINT 10 AND 12
Results in 8.
Chapter 9 Page 18
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents

Save PDF