Contents
Introduction
Chapter 1
SETTING UP THE ACE
Chapter 2
TYPING AT THE KEYBOARD
Chapter 3
LOADING PROGRAMS FROM TAPE
Chapter 4
DEFINING NEW WORDS
Chapter 5
SIMPLE ARITHMETIC
Chapter 6
DEFINING NEW ARITHMETIC WORDS
Chapter 7
ALTERING WORD DEFINITIONS
Chapter 8
WORDS THAT ARE REALLY NUMBERS
Chapter 9
MAKING DECISIONS
Chapter 10
REPEATING
Chapter 11
SOUND
Chapter 12
THE CHARACTER SET
Chapter 13
PLOTTING GRAPHS
Chapter 14
SAVING PROGRAMS ON TAPE
Chapter 15
FRACTIONS AND DECIMAL POINTS
Chapter 16
READING THE KEYBOARD
Chapter 17
OTHER WAYS OF COUNTING
Chapter 18
BOOLEAN OPERATIONS
Chapter 19
MORE ADVANCED ARITHMETIC
Chapter 20
INSIDE THE DICTIONARY
Chapter 21
STRINGS AND ARRAYS
Chapter 22
VOCABULARIES
Chapter 23
INSIDE COLON DEFINITIONS
Chapter 24
HOW THE MEMORY IS LAID OUT
Chapter 25
MACHINE CODE
Chapter 26
EXTENDING THE ACE
Appendix A
QUICK GUIDE FOR 'FORTH' ENTHUSIASTS
Appendix B
ERRORS
Appendix C
THE JUPITER ACE - FOR REFERENCE
Appendix D
QUICK GUIDE FOR 'FORTH' ENTHUSIASTS
INDEX
|
Chapter 2
TYPING AT THE KEYBOARD
If you've never used a computer before, you're probably feeling a bit overawed,
wondering what it's going to do. The answer is nothing, until you tell it by typing in
your instructions at the keyboard. Try some random typing just to see what happens.
If you get in a mess, remember that you can always clear the computer out by
momentarily disconnecting it from its power supply.
The first thing you'll notice is that the characters (i.e. letters, digits, punctuation
marks, symbols or anything else) you type appear at the bottom of the television
screen. This area is called the input buffer and is where the computer will look for
your instructions. If you type in enough to fill up a whole line (this is easily done by
holding a key down for a few seconds, because it starts repeating itself), the line will
move up to make some extra space beneath it: thus the input buffer has the power
of expanding upwards if necessary.
Letters usually come up as lower case (small) letters, but, as on an ordinary
typewriter, you can get capitals by using the SHIFT key (bottom left-hand corner). If
you have this held down when you press a letter key, the letter will come out as a
capital (try it).
There is another shift key called SYMBOL SHIFT (near the bottom right-hand
corner, next to SPACE) that is used for typing in the symbols - full stop, comma, +,
-, brackets and so on - that you can see in the corners of many of the keys. This
works in the same way as the other, capitals, shift; you keep it held down while you
press another key. For instance, to get '+' you hold down SYMBOL SHIFT, press the
K key, and then let up both the keys.
Beware! Computers are very fussy that you should distinguish between the
digit nought and the letter O. To make it absolutely clear, nought appears on
the keyboard and television as 0, with a slash through it. It will be printed like
that in the manual too.
You also need to distinguish between the digit one (1), the capital letter I, and
the small letter L (I). On an ordinary typewriter you'd quite probably type a
capital letter 0 for a nought and a small L for a one, but you mustn't do this with
a computer. All ten digits are on the top row of the keyboard.
You may well be wondering by this stage why the computer isn't taking any notice
of all this rubbish you've typed in. The reason is not that it's already noticed it's
rubbish, but simply that it hasn't looked yet. It won't take any notice until you press
what is just about the most important key on the keyboard, the one marked ENTER
(on the right-hand side, one row up). Just pressing this means, 'OK computer, I've
typed in your orders. Now go and obey them.'
If you press ENTER now, the most likely effect is that
a ? ? will appear at the
beginning. ? means, 'Do you want to change any of this?', which in your case is a
tactful way of telling you it doesn't understand a word you're saying. Clear the
computer out by momentarily disconnecting the power, to give yourself a chance to
type in orders that it does understand.
If you now press ENTER, the computer will print 'OK' on the television screen near
the top — it has happily obeyed everything you typed in (i.e. nothing) and come back
for more.
The first thing to remember is that, like us, the computer understands words-- not
English words, however, but FORTH words. To make the distinction, we shall print
FORTH words in BOLD type - not because you need somehow to type them into the
computer in BOLD, but just so that you know whether we're using a word in a
FORTH sense or an English sense.
Here's a FORTH word:
VLIST
It stands for 'vocabulary list'. If, with the computer clear, you type in VLIST (it
doesn't matter whether you use lower case letters or capitals or a mixture) and then
press ENTER, you will see this (written in white on black):
VLIST
FORTH UFLOAT
INT
FNEGATE
F/
F*
F
+
F-
LOAD
BVERIFY
VERIFY
BLOAD
B
SAVE
SAVE
LIST
EDIT
FORGET
REDEF
INE
EXIT
.
'
(
[
+LOOP
LOOP
DO
UN
TIL
REPEAT
BEGIN
THEN
ELSE
WHILE
IF
]
LEAVE
J
I'
I
DEFINITIONS
V
OCABULARY
IMMEDIATE
RUNS>
DOES>
COMPILER
CALL
DEFINER
ASCII
LITE
RAL
CONSTANT
VARIABLE
ALLOT
C,
,
CREATE
:
DECIMAL
MIN
MAX
XOR
AN
D
OR
2—
1—
2+
1+
D+
—
+
DNEGATE
NEGATE
U/MOD
*/
*
MOD
/
*/MOD
/M
OD
U*
D<
U>
<
>
=
0<
0<
0=
ABS
O
UT
IN
INKEY
BEEP
PLOT
AT
F.
EMIT
CR
SPACES
SPACE
HOLD
CLS
#
#S
U
.
.
SIGN
#>
<#
TYPE
ROLL
PICK
OVER ROT ?DUP R> >R ! @ C! C@ SWAP
DROP
DUP
SLOW
FAST
INVIS
VIS
CO
NVERT
NUMBER
EXECUTE
FIND
VLIST
WORD
RETYPE
QUERY
LINE
PAD
BAS
E
CURRENT
CONTEXT
HERE
ABORT QUIT OK
◾
This is a complete list of all the words that the Ace understands when you first turn
it on (its dictionary). You can see that some of them are the same as English words,
some are abbreviations, some are mathematical, and some are strange combinations
of symbols. Near the bottom you can see VLIST itself. (The VLIST at the top is just
what you typed in, copied up as a record of your typing.) The 'OK' right at the end is
not a FORTH word, but just what the computer says when it's finished your orders.
You can type in more than one word at once, like
VLIST VLIST
(The computer copies up the first VLIST, executes by it listing the dictionary, does
the same with the second VLIST, and then prints OK.)
It is important to put spaces in between the words. If I suddenly flip and start
running allmywordstogether or spli ttingt he mup then you still know what I'm trying
to say, but the computer isn't so clever. It relies very much on having spaces in
between words, and no spaces in the middle of a single word. On the other hand, a
word can spill over from one line to the next, like
VLI
ST
with twenty eight spaces before the V, because the computer is hardly even aware of
the separate lines within the input buffer.
To summarise,
● Typing from the keyboard goes to the input buffer at the bottom of the screen.
● Letters are usually in lower case, but you can get capitals by keeping the key
marked SHIFT held down while you press the letter key.
● In the same way, you get punctuation marks and other symbols by using the
SYMBOL SHIFT key.
● The computer has a built-in dictionary of 142 FORTH words that it understands,
and you can type them in using lower case or capitals, as you wish.
If you type more than one word into the input buffer, they must be separated by
spaces.
● The computer doesn't start looking at what you've typed until you press ENTER.
Then it takes the words from the input buffer one by one, copying each one up to the
top for the record and then executing it.
● VLIST is a FORTH word. It tells the computer to write a list on the television of all
the FORTH words in the dictionary.
● If the computer finds a word that it doesn't understand in the input buffer, it puts
in a ? at the beginning. ? means, 'Do you want to change any of this?'
What if you make a typing mistake?
So far the only cure you know is to disconnect the power supply, but there are
much cleverer ways which rely on the cursor - the little white square that moves
along as you type. This shows where the next character that you type will appear, so
if you could somehow move it back to the middle of the line you could get characters
to appear in the middle.
You do this using the cursor control keys, the ones marked ⇦, ⇧, ⇩ and ⇨
Although these are normally just the keys for 5, 6, 7 and 8, if you shift one - just as
you would for capital letters, by holding SHIFT down - it will move the cursor in the
direction of the arrow. Thus ↑ is shifted 5, is shifted 6 and so on. (There is another
up arrow, the ↑ that is symbols shifted H. This is not the same as ⇧, and just gives a
character looking like ↑ .)
Afterwards, when you type in more visible characters, they will be inserted just to
the left of the cursor.
Another key you will find useful is shifted 0 (DELETE) which deletes the character
immediately to the left of the cursor.
As an example, suppose that you type
vlost◾
by mistake. If you press ⇦ (shifted 5) twice the cursor moves back two characters:
vlo◾ st
Next, DELETE (shifted 0) rubs out the 'o'
vl◾ st
and finally you type 'i' to get
vli◾ st
which is what you wanted. When you press ENTER, the computer doesn't mind the
fact that the cursor is still in the middle.
The 'cursor up' key (⇧, shifted 6) can work in two different ways. Bearing in mind
that the input buffer may have spread over several lines, Q will normally just move
the cursor vertically up one line. But if it is already on the top line of the input buffer
(or if you'd only typed in one line anyway), ⇧ sends it to the beginning of that line.
Similarly, ⇩ (shifted 7) moves the cursor either down one line or to the end of the line.
Type in several lines of characters and try these two out.
Most of the other digit keys also have special meanings when shifted:
DELETE LINE (shifted 1) deletes the entire input buffer.
CAPS LOCK (shifted 2) makes subsequent letters automatically come out as capitals
(like the shift lock on an ordinary typewriter). It changes the cursor to C to show that
it's doing this. It doesn't automatically shift the digits to give cursor movements and
so on; you still need SHIFT for these.
To get back to the usual system, press shifted 2 a second time.
INVERSE VIDEO (shifted 4) makes whatever you type come out in reverse colours -
i.e. black on white instead of white on black. Again, to get back to the usual way
round you press INVERSE VIDEO again.
GRAPHICS (shifted 9) changes the cursor to a G
and allows you to type in the
graphics characters (the black and white patterns on the digit keys). Press GRAPHICS
again for normal characters.
CAPS LOCK, INVERSE VIDEO and GRAPHICS can all be turned on and off
independently of each other. For instance,
Press CAPS LOCK - now letters will be capitals.
Press INVERSE VIDEO - letters will be inverse capitals.
Press CAPS LOCK again to turn it off - letters will still be inverse, but lower case.
Press GRAPHICS - digits will give the graphics characters, but inverted.
Press INVERSE VIDEO again to turn it off - digits will give graphics characters
exactly as on the keyboard.
Press GRAPHICS again - now everything is back to normal.
[Top] | [Back] | [Next]
|