home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
educ
/
pc_cai.zip
/
CAI.DOC
< prev
next >
Wrap
Text File
|
1989-01-06
|
98KB
|
2,423 lines
PC-CAI 1.0
(c)Copyright Alan C. Elliott, 1984-1989
TexaSoft
P.O. Box 1169
Cedar Hill, Texas 75104
(214)-291-2115
Version 1.0, January 1989
All Rights Reserved
The PC-CAI distribution diskette, containing a copy of this
manual, may be freely copied and shared, but printed copies
of this manual may not be copied in any way without written
permission from the author. All files on diskettes must
remain unaltered. Thank You. A registration fee of $35 is
requested if this program is useful to you, and if you would
like to encourage future enhancements. See Appendix on use
of the PC-CAI runtime module for commercial distribution.
No patent liability is assumed with respect to the use of
the information contained herein. While every precaution has
been taken in the preparation of this publication, the
publisher assumed no responsibility for errors or omissions.
Neither is any liability assumed for damages resulting from
the use of the information herein.
Since this is a first version of the program, there may be
bugs discovered. If you find problems, please notify us with
the bug report form. All persons registering will receive
the newest copy of the program, with known bugs corrected.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
1
PC-CAI 1.0
__________________________________________________________
ORDER FORM/REGISTRATION FORM
PC-CAI, Computer Aided Instruction language $___________
for the IBM PC $35. Latest version.
KWIKSTAT, statistical analysis program & graphics $___________
(t-test, ANOVA, regression, and more) $35
Sub-Total $___________
Texas Residents add 7% Tax $___________
Postage & Handling $ 4.00
Rush, P.O. or COD add additional $4
Overseas, add additional $6 $___________
TOTAL ENCLOSED $
============
Payment method:check one
_____ Check or M.O. _____ VISA _____ Master Card
------------------------------------------------------------
IF CREDIT CARD:
Name on Card:_____________________________________________
Type Card is __________________ Exp Date is:_____________
Card Number is:___________________________________________
Authorized Signature:_____________________________________
-----------------------------------------------------------
Mail order to:____________________________________________
Address:__________________________________________________
City:___________________ St_______ ZIP ___________________
Phone ( )______________________________________________
-----------------------------------------------------------
Please mail to:TexaSoft, P.O. Box 1169, Cedar Hill, Texas 75104.
Thanks. Phone orders call 214-291-2115. Have MC or VISA ready.
MAIL TODAY!
__________________________________________________________
Please become a registered PC-CAI user -- see order form
2
PC-CAI 1.0
__________________________________________________________
CONTENTS
Getting Started...........................4
Requirements to run.......................4
What is PC-CAI............................4
Setup defaults............................5
PC-CAI Tutorials on disk..................6
How to use the Editor.....................7
Editor Function Keys..................8
Editor Control Commands...............9
Editor Tutorials.....................11
The PC-CAI Program.......................18
"AT" (@) commands........................20
"DOT" (.) commands.......................27
Example tutorials........................32
Graphics commands........................35
Appendices
-----------
Ballot for new features..................41
Bug Report...............................42
Error codes..............................43
Distributing PC-CAI program..............44
Registration/Order Form..................45
__________________________________________________________
Please become a registered PC-CAI user -- see order form
3
PC-CAI 1.0
__________________________________________________________
----------------------------------------------------------
GETTING STARTED WITH PC-CAI
----------------------------------------------------------
PC-CAI may be used on floppy disks or hard disk. This manual
will assume that you are using it on a hard disk, and will
often use the "C>" prompt. If you are using PC-CAI on a
floppy system think "A>" when you see "C>".
To load PC-CAI on the hard disk create a CAI subdirectory:
C>MD \CAI
then switch to that directory
C>CD \CAI
Copy all files from the PC-CAI diskette (in disk A)
C>COPY A:*.*
MAKE SURE the printer is on, the paper is set at top of
form, and you have plenty of paper (about 40 pages). TO
PRINT THE PC-CAI MANUAL, use the command:
A>COPY CAI.DOC LPT1:
----------------------------------------------------------
REQUIREMENTS TO RUN PC-CAI 1.0
----------------------------------------------------------
1. An IBM PC, XT, AT or compatible computer.
2. DOS 2.0 or higher.
3. At least 320K of memory.
4. Any monitor, hard disk or floppy. NOTE:Color graphics
monitors are preferred, and the DEMO program assumes you
have a graphics monitor. Hercules graphics are not
supported at this time, however, text programs can be run on
a Hercules type monitor.
----------------------------------------------------------
WHAT IS PC-CAI?
----------------------------------------------------------
PC-CAI is a computer language specifically designed to allow
you to create computer driven tutorials, tests, and demos.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
4
PC-CAI 1.0
__________________________________________________________
WHERE PC-CAI FITS IN
PC-CAI is a CAI (Computer Assisted Instruction) language
based on the C.A.L.L. (Computer Assisted Learning Language)
command set. It which works much like a word processor. You
enter your information into a word processing like editor,
along with some simple commands and the language does the
rest.
THE PC-CAI LANGUAGE (RUN MODULE)
The central module of the system is CAI.EXE. This is the
program which "runs" the tutorials. It also contains an
editor that may be used to create the tutorials. Actually,
any editor or word processor that creates standard ASCII
files may be used.
THE UTILITIES PROGRAM, CAI-UTIL
This program allows you to "initialize" certain modules,
selecting storage disks, editor specifications, and color.
It contains the IMAGE module, which allows you to create
pictures that may be used in the tutorial.
SUGGESTED LEARNING SCHEME
1) First, go through the PC-CAI tutorials provided on disk.
2) Learn to use the EDITOR.
3) Learn to use the "dot" commands as described in the
COMMANDS section. (Study the tutorials on disk)
4) Learn the "@" AT commands.
5) Learn to integrate images into your tutorial.
------------------------------------------------------
SETUP DEFAULT PARAMETERS FOR PC-CAI
------------------------------------------------------
Run the utilities program to set up program defaults. Enter
the command
C>CAI-UTIL
SET UP DEFAULTS FOR CAI
First, choose to set up defaults for the editor program.
You will be asked for the name of the disk drive where the
programs will reside. The normal default values will be in
parentheses, and you may simply press enter to accept
these values. Normally, you will use these values for hard
__________________________________________________________
Please become a registered PC-CAI user -- see order form
5
PC-CAI 1.0
__________________________________________________________
disk operation:
DISK DRIVE : C
SCREEN WIDTH : 79
TAB SETTINGS : 5;10;20;30;40;50
Notice that when you are asked for tab settings, you must
place a semicolon (;) between each number, and the numbers
must be in ascending numerical order.
Finally, you will be asked for color settings. Choose
those you like. You may change ANY of these settings at
any time.
------------------------------------------------------
PC-CAI TUTORIALS ON DISK
------------------------------------------------------
Begin the PC-CAI DEMO with the command:
C>CAI DEMO
This program will demonstrate some of the things you can
do in PC-CAI. There is also a tutorial named CREATE that
explains the CREATE program.
------------------------------------------------------
THE PC-CAI EDITOR
------------------------------------------------------
The PC-CAI Editor (A version of Alan's Edit or AE for short)
is a standard ASCII text editor. This means that it creates
standard text files. You can use any ASCII text editor to
write PC-CAI programs, but AE allows you to easily go back
and forth from the editor to the run module for program
creation and editing. The editor is a built in part of
CAI.EXE. To begin PC-CAI in editor mode, enter
C>CAI
Examine the screen. The phrase: "F7 is HELP" is at the upper
left. Directly underneath the "F" in F7 notice the blinking
cursor. This cursor indicates the location at which text can
be entered. The number 1,1 appears next to the HELP,
indicating the position of the cursor, line 1, column 1.
Also notice the message "CTRL-G to begin program". Once you
have a CAI program in the editor, you cen begin it
__________________________________________________________
Please become a registered PC-CAI user -- see order form
6
PC-CAI 1.0
__________________________________________________________
immediately by entering CTRL-G.
A vertical mark at the top of the screen indicates the
screen line length. This line length is usually initially
set at 79 columns. You may enter text onto this blank screen
in much the same way as you would with a typewriter.
NUMERIC/CURSOR KEYPAD COMMANDS
The keypad is located on the right side of the IBM PC
keyboard. During the operation of AE, the keypad is in
"cursor mode". If a number is to be entered, use the keys on
the top row of the keyboard.
Home - Put cursor in the upper left hand corner.
Arrow Keys (right, left, up, down) - Moves the cursor.
End - Moves the cursor to the end of the current line.
PgUp (Page Up) - Moves 11 lines up.
PgDn (Page Down) - Moves 11 lines down.
Del - Deletes one character.
Ins - Turns on insert mode. Characters typed in will be
entered directly preceding the cursor location.
Pressing the "Ins" key again or pressing the ENTER
key will turn off insert mode.
Tab -->| - Moves the cursor to the next tab position.
Pressing CTRL-K several times will eventually display
these tab settings. Temporary tabs are set with
CTRL-T command.
Esc - End: End the editor WITHOUT saving file.
----------------------------------------------------------
FUNCTION KEYS
----------------------------------------------------------
F1 - Save: Save file to disk.
F2 - Get: Get a file, or append to current file.
F3 - Top: Moves to top of current workspace.
F4 - Bottom: Cursor moves to the last line of the workspace.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
7
PC-CAI 1.0
__________________________________________________________
F5 - Delete: Deletes lines, 0 to 999.
F6 - Insert: Inserts 1 to 10 blank line(s) above the cursor.
F7 - Help: HELP screens, delete files, directory.
F8 - Clear: Clears current workspace. Copy info in buffer is
retained.
F9 - Mark: Mark text for copy. Move cursor to the upper left
corner of the rectangular block to be copied, press F9.
Move the cursor to the last line of the text to be
copied, and then move it to the right at least as far
as the length of the longest line to be copied. The
copy block will be highlighted. Note:Copy block is
retained when F8 is given. This provides a method of
transferring blocks of text from one file to another.
Marks must be made on ONE screen. The maximum size of a
copy buffer is one screen (22 lines).
F10- Copy: Copy a marked block. Move cursor to the position
where you wish to insert the text previously marked
using the F9 command. Press F10. This will insert the
text in the desired position by first inserting enough
blank lines for it to fit. A copy which does not insert
before copying is CTRL C, explained later.
----------------------------------------------------------
CONTROL COMMANDS (CTRL)
----------------------------------------------------------
Control commands are issued by holding the CTRL down, and
then simultaneously pressing a single command key.
CTRL A - Capitalizes letters
CTRL C - Is similar to F10. Instead of first inserting blank
lines before making a copy, CTRL C will place the
copied text in the position specified by the
cursor, directly over any text that may happen to
exist there.
CTRL D - Deletes characters to the right of cursor.
CTRL F - Fills text from the current line to next blank
line, dot "." command or "@" command.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
8
PC-CAI 1.0
__________________________________________________________
CTRL G - Begins the CAI program in memory.
CTRL J - Justifies that line to the right margin.
CTRL K - Changes the line help at bottom of screen.
Successively pressing CTRL K will display the
function key commands, CTRL commands, and tab
settings.
CTRL L - Reset the line length specifications.
CTRL P - Places text in center of screen.
CTRL R - Replace text. After pressing CTRL R, you will be
prompted to enter "Old/New:". Enter the string of
characters to be replaced , followed by a "/", and
the new string of characters. For example,
responding to the request with wrong/right would
result in the replacement of the word "wrong" with
"right". Each "wrong" will be highlighted on the
screen, and you will be able to replace, skip, end
the replace procedure, or select the replacement of
all further occurrences of "wrong" with "right"
without any more prompting. After checking the
first screen for matches, you will be prompted to
indicate if you want the replace to continue. Enter
Y or N.
CTRL S - Search for a specified text. Each time this text is
matched, it will be highlighted. Search is
conducted from the beginning of the document to the
end.
CTRL T - Reset the tab settings. Enter tabs from smallest to
largest, separated by semicolons.
CTRL W - Deletes to the next blank (word delete).
CTRL X - Splits line at position of the cursor. This should
be used for inserts of more than several
characters.
CTRL Y - Delete a line.
CTRL Z - Makes letters lower case.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
9
PC-CAI 1.0
__________________________________________________________
Text Scrolling
AE displays 22 lines of text at a time. The PgUp and PgDn
keys allow you to page up and down a document. AE was
designed to be able to have a document of about 64000
characters in memory at one time. If your tutorial becomes
too long, you will have to make use of the "USE" command, as
explained later, to bring in information from other files.
BE CAUTIOUS . . . PLEASE!
Text is stored in memory until the F1 "Save" command is
issued. A power failure or error could cause you to lose
this information. Issue the F1 "Save" command periodically
(ie every 15 minutes or so) to protect your work.
----------------------------------------------------------
TUTORIAL LESSONS
----------------------------------------------------------
LESSON 1
Enter the PC-CAI editor with the command:
C>CAI
Enter the follow text, exactly as it appears here. Do not
type the borders.
---------------------------------------------------------
| Lesson One |
|This text will help you learn about Alan's Edit. |
|We will learn how to use most of the functn keys. |
| |
|These two lines will be copied to other locations |
|within this file using the F10 and CTRL C commands. |
| |
|We will learn how to delete this line. |
| |
|When text is copied using the F10 command, text at the |
|location to which it is being copied is not destroyed. |
|However, when CTRL C is used to copy a block of text to |
|a new location, it replaces the text there. |
| |
---------------------------------------------------------
__________________________________________________________
Please become a registered PC-CAI user -- see order form
10
PC-CAI 1.0
__________________________________________________________
Ending AE - Esc
Press the Esc key. Notice the prompt:
(NONSAVE) (R)eturn (Q)uit
Answer the request by typing an "R" -- do not press the
ENTER key. "Q" would have returned you to the DOS system.
Deleting lines (F5)
The F5 key deletes lines of text. Move the cursor to the
"W" in "We..." in the fourth sentence of the text on the
screen. Press the F5 key. You will be asked how many lines
to delete. Enter 1. The line is deleted. (See also CTRL D).
Inserting characters (Ins)
Notice that the word "function" is misspelled. This can be
corrected by moving the cursor to the second "n" in "functn"
and pressing the "Ins" key. Notice the blinking message at
the top of the screen. Insert the missing "i" and then the
"o". Pressing the "Ins" key again will turn off the insert
mode. The insert mode is meant for SMALL insertions of one
or several characters. Otherwise, use the F6 key to insert
blank lines before adding text or the CTRL X command to
split a line at the point new text is to be added.
INSERTING LINES (F6)
Insert blank lines by using the F6 function key. Move the
cursor to the beginning of the second line. Press F6. The
following prompt will appear:
Insert how many lines (1-10):_
Type a "2" and press the ENTER key. You may type additional
text into these blank lines.
MARKING TEXT FOR COPY (F9)
Copying text is a two step process. Mark the text you wish
to copy. Then specify the copy location. Move the cursor to
the "T" in "These" in the third sentence. Press F9. The "T"
will be displayed in reverse video. Move the cursor to the
period at the end of the sentence and press F9 again. The
block of text is highlighted. The text in the highlighted
rectangular box is now in the copy buffer and can be copied
to other locations using the F10 and CTRL C commands. It
__________________________________________________________
Please become a registered PC-CAI user -- see order form
11
PC-CAI 1.0
__________________________________________________________
will remain there until pressing the F9 key again starts a
new pair of marks, or until you "End" editing. Copy blocks
are always rectangular. The largest possible block is 22
lines long.
Moving Text
To move text, simply perform a copy, and then delete the old
text.
Copying text (F10 and CTRL C)
Move the cursor to the line that begins with "When text..."
and press the F10 function key. This copies the contents of
the copy buffer to the location specified by the current
position of the cursor. Notice that the text at the location
where the text is being copied is not destroyed. Now, move
the cursor to the "H" in "However,..." and enter CTRL C. The
two lines of text which formerly occupied this position in
the file have been replaced by the text in the copy buffer.
Notice, however, that characters in these lines which extend
beyond the rectangular copy block, still remain. These may
be deleted by using, for example, the "Del" key discussed in
Lesson 2.
LESSON 2
Enter the text exactly as it appears below:
---------------------------------------------------------
| Lesson Two |
| |
|In this lesson, we will learn about saving a document for|
|future use, the "Help" key, the character ddelete, and |
|about the Home key. |
---------------------------------------------------------
CHARACTER DELETE (DEL)
There is an extra "d" in the word "delete". Move the cursor
(using the arrow keys) to the first "d" in "ddelete". Press
the "Del" key once, and the extra "d" has been deleted.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
12
PC-CAI 1.0
__________________________________________________________
SAVING A DOCUMENT (F1)
After creating or correcting a document, it MUST BE SAVED to
disk. Press F1 once. Enter a name of the document to be
saved -- in this case name the file LESS2.TMP. The following
prompt appears:
(R)eturn (Q)uit
Enter "R" to return you to the editor so that you may
continue working on the current document.
Clearing the Workspace (F8)
The F8 key lets you clear the current working document from
the workspace. BE CAREFUL in choosing to clear your space --
if you have not saved your text with the F1 key, it will be
lost. Press the function key F8 once. Answer Y at the
prompt: "Are you sure?". Press the F2 key, and get the
document "LESS2.TMP". This is the file you saved earlier.
Help (F7)
Press the F7 key, and you will see:
----------------------------------------------------------
|To change key at bottom of screen, press CTRL-K in Edit |
| |
|Please Choose: |
| |
| (R)eturn to screen (S)how files |
| (E)dit help (A)pplications Help |
| (D)elete a file |
| |
| |
|Choice:_ |
----------------------------------------------------------
Press "E" to request that the AE help screens be displayed.
These screens display an summary of AE's commands. After
looking that these, return to help mode.
----------------------------------------------------------
NOTE:HELP FOR PC-CAI COMMANDS IS AVAILABLE BY PRESSING THE
"A" KEY.
----------------------------------------------------------
Enter "D" to which the computer will respond:
Enter name of file to delete:
__________________________________________________________
Please become a registered PC-CAI user -- see order form
13
PC-CAI 1.0
__________________________________________________________
Delete LESS2.TMP which was stored a minute ago. Choosing "S"
will display the names of the documents which are currently
saved on disk.
LESSON 3
Enter AE as before or clear the workspace with F8. Before
entering text onto the screen. Enter CTRL-L Notice the
message at the bottom of the screen:
Line length is ## reset at column :
This message tells you what the current line length is, i.e.
how many characters can be written on a line, and allows you
to change it if you wish. Right now, we want the line length
to be 60, so respond to this request by typing the number
60. Notice that if the current line length is already 60,
there is no need to retype it, just press enter. The line
length must be at least 20 and no more than 79.
CTRL T
You may notice some capital T's on the highlighted bar. If
not, press CTRL-K until a mostly blank line appears with a
vertical mark toward the right of the screen. The "T's"
indicate the current location of the tab stops. CTRL T can
be used to reset these tabs. When you press CTRL T, you will
see the following prompt at the bottom of the screen:
Indicate tab stops, separate with semicolons:
Enter up to 20 column numbers to which you want the cursor
to jump when the -->| Tab key is depressed. These column
numbers must be separated by semicolons, and should be
specified from smallest to largest. Set the tabs at columns
5,10, and 50 by entering 5;10;50. With the cursor at the far
left of the screen, press the Tab key and notice that the
cursor jumps to the next Tab setting.
ENTER THE TEXT
Type in the following text, exactly as it appears below. The
automatic word wrap feature using the Enter key unnecessary
in many cases. As you are typing in the first sentence,
continue to type without pressing ENTER. Notice that during
the entry of the word "commands" it is moved to the next.
You will find this to be very useful, and the first 5 lines
can be typed without ever pressing ENTER. After typing
"happens." at the end of the fifth line, pressing ENTER will
take you to the beginning of the next line. In order to
__________________________________________________________
Please become a registered PC-CAI user -- see order form
14
PC-CAI 1.0
__________________________________________________________
leave a blank line either press ENTER again or move to the
beginning of the next line with the downarrow key.
-----------------------------------------------------------
|In this lesson you will learn how several of the control |
|commands work. I am going to spell this word wrogn. I am |
|going to correct correct this line using CTRL W. I |
|recognize the fact that I actually spelled it wrogn again. |
|We will split this line with CTRL X, to see what happens. |
| |
|This is the last sentence in Lesson 3. |
-----------------------------------------------------------
CTRL R
The word "wrong" is spelled incorrectly twice. In order to
correct this, press CTRL-R. Now answer the request at the
bottom of the screen with:
Enter OLD/NEW:ogn/ong
and press the ENTER key. The phrase "ogn" will light up,
and you will be given several options. Choose the "R"
option, and the phrase will be replaced with the correct
spelling. Notice now that the "ogn" in "recognize" is now
highlighted. However, "ogn" appears correctly in this case
and we should not change it. So, we respond with "S" that we
want to skip this occurrence of the phrase. The cursor then
moves to the second occurrence of the misspelling "wrogn".
Respond with "R" to replace this text with the correct
spelling. Two other options are available to you: you can
select "(N)o more prompting" or "(E)nd". Responding with an
"N" will cause all further occurrences of the old phrase to
be replaced by the new phrase. This example points out,
however, that you should be careful about choosing this
option. Sometimes the old phrase will unexpectedly occur as
a correct part of other words. Choosing "E" simply ends the
replace request with no further changes being made to the
text. If your file is longer, AE will ask of you wish to
replace on subsequent screens.
CTRL S
The CTRL S command can be used to SEARCH for a particular
phrase. Press CTRL S and notice the prompt at the bottom of
the screen:
Enter search string :
__________________________________________________________
Please become a registered PC-CAI user -- see order form
15
PC-CAI 1.0
__________________________________________________________
Search for the string "spell". Notice that the first
occurrence of "spell" is highlighted. You may choose to
continue to search. or you may choose to stop searching.
CTRL W
Move the cursor to the space before the first "correct" in
the third line. Press CTRL W. The word (to the next blank)
will be erased, and the remaining text will be moved over to
the left.
CTRL X
Move the cursor to the line beginning "We will split..." and
then place it in the space after "X,". Now enter CTRL X and
the line will be split. You may now insert text after "X,".
For this example, enter " so that you will be able". Of
course, this insertion could have been made using the "Ins"
key, but for longer insertions, we recommend using the
CTRL X (split) or F6-Insert (insert lines) commands.
CTRL F
Notice that as a result of the manipulations we just went
through, the text looks pretty unorganized. In order to make
it look nicer, move the cursor to the first line and enter
CTRL F. The text now looks better since each line has been
"filled" with as many words as possible. Filling takes place
from the current line to the next blank line "dot" or "@"
command.
CTRL P
Type in the word "hello" on a blank line. Press CTRL P and
notice that this places "hello" in the center of the line.
LIMITATIONS TO AE
1. Maximum length of any line is 79 characters. Files read
into AE whose lines are longer than 79 characters in length
may be truncated.
2. Maximum length of file is about 64000 characters, or 1600
lines.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
16
PC-CAI 1.0
__________________________________________________________
PRINTING FILES YOU HAVE CREATED
To print files you have created, you may use the DOS PRINT
command (See DOS manual). Or use this command to print the
file (say TUTOR.CAI)
C>COPY TUTOR.CAI LPT1:
-----------------------------------------------------------
PC-CAI PROGRAM ORGANIZATION
-----------------------------------------------------------
A PC-CAI program consists of text, which is output literally
from the program file, and commands which are acted upon
according to their meanings. Each command begins with either
an "at" sign (@) or a dot (.). These command markers must
appear in the first column of a program line for the command
to be acted upon.
In general, "@" commands are restricted in where they may
appear within a program. Dot "." commands may appear on any
line of a PC-CAI program stream.
AT "@" Commands
@BEGIN QUESTION @OPTION
@END QUESTION @READ
@ESCAPE @RIGHT
@GOTO @SHELL
@GOBACK @STOP
@IF @SYSTEM
@LABEL @TRIES
@MENU @WRONG
DOT "." Commands
.ANIMATE .GET .PLAY
.BLANK .INFORMATION .PSET
.CENTER .LOCATE .PUT
.CIRCLE .MOVE .REM
.CLS or .CLEAR .PAINT .SKIP
.COLOR .PALETTE .USE
.DRAW .PAUSE .WAIT
For instance, the command @RIGHT indicates a correct answer
to a question. The correct answer to the question "Who was
the first president of the USA?" may be indicated in the
following manner...
__________________________________________________________
Please become a registered PC-CAI user -- see order form
17
PC-CAI 1.0
__________________________________________________________
@RIGHT (*WASHINGTON*)
Notice that when text is used as a parameter to a command it
must be preceded by "(*" and ended with "*)". The @RIGHT
command has other additional parameters which may be
included to specify other information about a correct
answer.
General Outline of a PC-CAI Program
I. Begin with a title screen and instructional material, one
screen at a time. The textual commands ".PAUSE" and ".CLS"
may be used to pause after each screen is presented, and to
then clear the screen to present the next screen.
II. Question and Answer sections may be interspersed
throughout the program. Each Question section begins with an
"@BEGIN QUESTION" command and ends with the "@END QUESTION"
command. For example, a simple Question section would be...
@BEGIN QUESTION
Many patriots of the American Revolution served in the
government of the new republic. Who was the first president
of the United States?
@READ (*Enter your answer here :*)
@RIGHT (*Washington*)
Very Good! George Washington is correct!
@END QUESTION
III. The program may be terminated with the "@STOP" command.
----------------------------------------------------------
AT COMMAND DEFINITIONS (@ Commands)
----------------------------------------------------------
As commands are defined in the following discussion, it will
be indicated when a command is required within a Question
section. If a command is not required, it is optional.
Parameters in commands which appear in brackets "[]" are
optional. For instance the form of the @RIGHT command is
@RIGHT (*ANSWER*) [KEYWORD,EXACT,EXACT NOCASE,DECIMAL,LIST,
SOUNDEX,FORCE,FORCE NOCASE]
The text in (* *) is a required parameter to the @RIGHT
command, but the additional parameters such as KEYWORD,
EXACT, and EXACT NOCASE are optional. If one of the optional
__________________________________________________________
Please become a registered PC-CAI user -- see order form
18
PC-CAI 1.0
__________________________________________________________
parameters is assumed (default) that parameter will be
mentioned as such. For the @RIGHT command, if none of the
optional parameters is given, KEYWORD is assumed.
Only the first three letters of an "at" or "dot" command are
required. Therefore, the @RIGHT command may be abbreviated
"@RIG". However, words which appear as parameters must be
spelled out in full.
@BEGIN QUESTION and
@END QUESTION
Format :@BEGIN QUESTION [NOCOUNT] and @END QUESTION
Purpose: To signal the beginning and ending of a question
section. These commands are a required part of the QUESTION
section.
Remarks: The option parameter NOCOUNT indicates that this
question should not be counted in any grading that is
requested. This is helpful when a question is used to
perform branching.
@ESCAPE
This command instructs PC-CAI what do do if the user presses
the ESC key during a tutorial. Two options are SYSTEM and
MENU. The default is MENU. Thus, to cause the program to go
to the CAI menu, place the command
@ESC MENU
at the beginning of the tutorial. If you want the program
to return to the DOS system, use the command
@ESC SYSTEM
@GOTO and @GOBACK
Format: @GOTO:label, @GOBACK:label
Purpose: The purpose of the GOTO command is to skip a
portion of PC-CAI code, and to go FORWARD in the program to
a designated label (see @LABEL)
The purpose of the GOBACK command is to branch BACKWARDS to
the top of the document to search for the code to a
designated label.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
19
PC-CAI 1.0
__________________________________________________________
An @GOTO or @GOBACK statement may appear only OUTSIDE of a
QUESTION SECTION.
@IF
Format: @IF (RIGHT, WRONG) [then] :label
Purpose: To provide FORWARD branching in response to the
result of the last Question section.
Remarks: @IF may appear only OUTSIDE a Question section. The
IF statement may be used to cause backward branching by
going to a label which is then followed by a GOBACK
statement. When grading is being performed, it would
probably be advisable to use the NOCOUNT option of the
@BEGIN statement in the question used for branching.
@LABEL
Format: @LABEL:label
Purpose: To provide a location for the GOTO, GOBACK, or IF
statements to restart program flow. Labels may appear only
OUTSIDE a Question section. A label may be of any length.
However good programming practice would advise that it be
kept to something short.
Format: @LABEL:label
@MENU
Purpose:Displays a menu of .CAI program on the default disk,
and gives the user the opportunity to select from the menu
any program to run.
Format: @MENU
@OPTIONS
Purpose:Select options that describe certain details of how
the program will run. Specify what to do when the ESCAPE key
is pressed.
Format: @OPTIONS [ESCAPE, NOESCAPE]
If ESCAPE is set, the program will watch for the ESCAPE key
to be pressed. If the ESC is pressed, the program will
display the menu of .CAI programs. This is the default. If
__________________________________________________________
Please become a registered PC-CAI user -- see order form
20
PC-CAI 1.0
__________________________________________________________
NOESCAPE is set, the program will ignore the pressing of the
ESC key during a tutorial.
@READ
Format:@READ [(*prompt*)]
Purpose: To allow the user to input an answer to a question.
This command is a required part of a QUESTION section. May
appear only within a Question section.
Example: The statement
@READ (*ENTER THE ANSWER HERE: *)
will produce the following prompt on the screen...
ENTER THE ANSWER HERE:
And the program will wait for a response from the user.
@RIGHT
Format:
@RIGHT (*answer*) [KEYWORD,EXACT,EXACT NOCASE,DECIMAL,LIST,
SOUNDEX,FORCE,FORCE NOCASE]
Purpose: To define the correct answer to the question.
Remarks: Text lines which follow the @RIGHT command are
displayed if the user's answer properly matches the
designated right answer. At least one @RIGHT statement must
appear in a Question section.
The KEYWORD parameter indicates that the user's answer must
be a word or phrase which is contained in the indicated
right answer. KEYWORD is the default condition.
The EXACT parameter indicates that the user's answer must
match exactly, including case (upper and lower case).
The EXACT NOCASE indicates that the user's answer must match
exactly, where case does not matter.
The LIST parameter allows the answer to be a list of words
separated by commas such as (*wheat,barley,oats*). Case is
not checked.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
21
PC-CAI 1.0
__________________________________________________________
The DECIMAL parameter allows the answer to be a number or
range of numbers such as (*10.5*) for a single number or
(*10;20*) for a range of numbers from 10 to 20.
The SOUNDEX parameter allows the answer to match even if
spelling is slightly wrong. For instance, the words SMITH,
SMYTH, and SMYTHE would all match the correct answer SMITH.
Case is not checked in SOUNDEX answers.
The FORCE parameter forces the student to enter the correct
answer. No other entry is accepted. If FORCE NOCASE is used,
case is not checked.
EXAMPLES OF @RIGHT COMMAND:
@RIGHT (*WASHINGTON*) would allow "G WASHINGTON" or "GEORGE
WASHINGTON" or "FRED Washington" as correct answers.
(KEYWORD match)
@RIGHT (*C*) EXACT would allow "C" only as a correct answer,
"c" would be considered incorrect.
@RIGHT (*C*) EXACT NOCASE would allow both "C" and "c" as
correct answers.
@RIGHT (*WASHINGTON*)
George Washington is correct!
In the above example, if the user answers the question
correctly, the text "George Washington is correct!" is
displayed. The text following @RIGHT may contain any dot
command. All text up to the next "@" command will be
displayed.
@SHELL
Format: @SHELL (*DOSCOMMAND*)
Returns control to DOS temporarily if not option is
specified. Return to the program with the EXIT command.
For example:
C>EXIT
If information is included in the (*DOSCOMMAND*) option,
the text in (* *) will be sent to the system. After the
command is completed, the program will return to PC-CAI at
the point just after the SHELL command. For example, to
cause a DOS Directory command to be executed, enter the
__________________________________________________________
Please become a registered PC-CAI user -- see order form
22
PC-CAI 1.0
__________________________________________________________
command
@SHELL (*DIR*)
@STOP
Format: @STOP [MENU,SYSTEM,[REVIEW TEXT],
[GRADE [SCREEN,FILE=filename,PRINTER]]
Purpose: Ends the PC-CAI program, and either (by optional
specifications) returns to the PC-CAI menu, grades the
tutorial, goes to system, or (when no optional parameter is
specified) will prompt the user...
Please choose 1) End PC-CAI or 2) Begin PC-CAI again.
When the GRADE option is chosen, one or more of the
sub-options SCREEN, FILE, or PRINTER may also be chosen.
This specifies where the grading will be printed.
When the REVIEW option is chosen, the TEXT sub-option
specifies that the text preceding the question which was
missed should be displayed. REVIEW and GRADE options are
exclusive, and both may not be used in the same @STOP
command.
@TRIES
Format: @TRIES [N]
Purpose: To specify how many wrong answers to allow the user
before moving to the next question. The default number of is
one. @Tries only has meaning within a Question section.
Example: @TRIES 3 allows three tries to get right answer.
@WRONG
Format:
@WRONG [(*answer*) [KEYWORD,EXACT,EXACT NOCASE,DECIMAL,LIST,
SOUNDEX,FORCE,FORCE
NOCASE] [FINAL]
Purpose:To define text to display when a wrong answer is
given. The parameters KEYWORD through FORCE NOCASE indicate
that type of match to a specific wrong answer, and have the
same meanings as in @RIGHT. An @WRONG statement which has no
answer indicated is called a "general wrong answer". When a
user's answer does not match any right answers or any
__________________________________________________________
Please become a registered PC-CAI user -- see order form
23
PC-CAI 1.0
__________________________________________________________
specific wrong answers, then the text following the general
wrong answer is displayed. FINAL indicates that the text
following the @WRONG statement will be displayed when all
tries are exhausted, and no right answer has been given.
Example:The command...
@WRONG (*LINCOLN*)
Lincoln was a president during the civil war.
would cause the text about Lincoln to be displayed if
LINCOLN was given as an answer to the question. As many
@WRONG statements as are needed may appear. If no matching
text is given and no match is found for those @WRONG
statements which have an answer, then the text following the
@WRONG without an answer is displayed.
Once the text for the @WRONG statement is displayed, the
question is displayed again, beginning with any text
following the @BEGIN. Therefore, it may be necessary to use
the textual command
.pause (*Please press ENTER to continue*)
To allow the user to read the reply to the wrong answer
before trying the same question again, or going on to the
next question.
When @WRONG FINAL is indicated, the text following is
displayed when all tries are exhausted, and no right answer
has been given. This can be used to give the student a
reference to find the right answer, or to indicate what
correct answer had been expected.
EXAMPLE QUESTION SECTION
@BEGIN QUESTION
@TRIES 3
Many patriots of the American Revolution served in the
government of the new republic. Who was the first president
of the United States?
A)Paul Revere
B)George Washington
C)Thomas Jefferson
D)Benjamin Franklin
@READ (*Enter the letter of the correct answer :*)
@RIGHT (*b*) EXACT NOCASE
__________________________________________________________
Please become a registered PC-CAI user -- see order form
24
PC-CAI 1.0
__________________________________________________________
Very Good! George Washington was the first president of the
United States.
@WRONG (*c*) EXACT NOCASE
No. He wrote the Declaration of Independence.
@WRONG
You must answer either A, B, C, or D.
@WRONG FINAL
The answer was C, George Washington.
@END QUESTION
----------------------------------------------------------
DOT Commands (.)
----------------------------------------------------------
The following is an explanation of the "dot" commands.
Unlike the @ (at) commands which are restricted in where
they may be placed, dot commands may appear anywhere in the
PC-CAI program flow.
.BLANK
Format :.BLANK ##
Purpose: Specifies that ## (a number) blank lines are to be
printed. This may be used to erase specific lines on the
screen, while leaving others intact. For example, if lines 5
to 10 are to be blanked out, the following commands would
perform that task:
.LOCATE 5,1
.BLANK 6
A skip command skips lines on the screen, but does not erase
them.
.CENTER
Format :.CENTER (*text*)
Purpose: To center the "text" on the output line.
.CLS or .CLEAR
Format :.CLS or .CLEAR
__________________________________________________________
Please become a registered PC-CAI user -- see order form
25
PC-CAI 1.0
__________________________________________________________
Purpose: Clears the monitor screen.
.COLOR
Format :.COLOR [foreground[,background] [NORMAL,REVERSE]
Purpose: To specify color changes, underlining or blinking
text. Foreground and background refer to designations
described below.
Remarks: The designation may be a number from 0 to 31, or
the words NORMAL or REVERSE. NORMAL causes the monitor to be
in normal color mode. Reverse causes the monitor to be in
reverse video. The other color designations, which are
specified by number, cause the text to be printed in various
colors.
If you are using a monochrome monitor, those color
designations are as follows:
0, 2-6 White on black (normal)
1 Underlined
7 Invisible
8,10-15 High Intensity, White on Black
9 High Intensity, Underlined
16,18-23 Blinking
17 Blinking, Underlined
24,26-31 High Intensity, Blinking
25 Blinking, Underlined, High Intensity
If you have the Color/Graphics Monitor, the following colors
are displayed:
0 Black 8 Gray
1 Blue 9 Light Blue
2 Green 10 Light Green
3 Cyan 11 Light Cyan
4 Red 12 Light Red
5 Magenta 13 Light Magenta
6 Brown 14 Yellow
7 White 15 High Intensity White
To creating a blinking color, add 16 to these colors. That
is, 4+16=20 will create blinking red.
The command ".COLOR 9" will cause text to be displayed as
light blue, with a black (default) background. The command
".color 25,4" would cause text to be blinking blue on a red
background.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
26
PC-CAI 1.0
__________________________________________________________
.INFORMATION
Format: .INFORMATION ## (*text*) [CONDITIONAL]
Purpose: To prompt for, and read information about the user
that may be used for documentation purposes. As many as 10
.INF statements may appear. ## may be 1 to 10.
Remarks: This information is useful when documentation of a
student's performance on a tutorial or test is needed. The
information may be sent to a line printer at the end of the
session, or may be stored in a file for future evaluation.
See the @STOP command. The ## may consist of the numbers 1
to 10. Once an information field is established, it may be
used in text by embedding (.inf ##) in the text. That is, a
"(.inf" plus the number of the information, followed by a
")".
For example, suppose you wished to use the student's first
name within a tutorial, you would find it out with the
command
.INF 1 (*Please enter your first name :*)
and then you could use it in text to personalize the
tutorial...
Very good, (.inf 1), that was the right answer!
The optional CONDITIONAL statement tells PC-CAI to skip the
information question if information for the information
number is already been established. This is useful when you
may be going from tutorial to tutorial, and do not want to
require that the student re-enter information they have
entered before.
.LOCATE
Format:.LOCATE y,x
Purpose: To locate the cursor on the display in preparation
for printing.
Remark: y may range from 1 to 25, and designates horizontal
row. x may range from 1 to 80 and designates vertical
column.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
27
PC-CAI 1.0
__________________________________________________________
.PAUSE
Format:.PAUSE (*text*)
Purpose: To cause output to be suspended until any key is
pressed.
Example: The most common use for PAUSE will be with the text
(*Please press ENTER to continue*).
.PLAY
Format:.PLAY (*designation*)
Purpose: To create sound effects.
Remarks:The designation contains a string of characters
which specify note to be played. These designations are as
follows:
A to G with optional # or + to designate sharp, and - to
designate flat.
Ln sets the length of each note where n ranges from 1 to 64.
L2 indicates a half note, and L8 an eighth note, etc.
MF designates music foreground. Program halts until music is
finished playing.
MB designates music background. Music plays while execution
of program continues.
MN music normal. Each note is played 7/8 of the time
specified by L n.
ML music legato. Music play a full period.
MS music stacato. Each note plays 3/4 of time.
Nn Play note n where n may range from 0 to 84. n=0 means
rest. Note 1 is the lowest octave C.
On Octave n where n may range from 0 to 7.
Pn Pause, where n is as in L n.
Tn Tempo, where n ranges from 32 to 255, and may be used to
casue music to speed up or slow down.
Example:.PLAY (*T120O1L8CDEF2G#ABO2C*)
__________________________________________________________
Please become a registered PC-CAI user -- see order form
28
PC-CAI 1.0
__________________________________________________________
NOTE:The play commands is much the same as the IBM PC BASIC
PLAY command. Additional examples of its use may be found in
your BASIC manual.
.SKIP
Format :.SKIP ##
Purpose: Causes ## (a number) lines to be skipped on the
screen.
.USE
Format: .USE PROG=programname
Purpose: This command allows you to temporary bring in a
series of commands (like a subroutine) which is stored in a
separate file. The .USE commands will turn over the program
stream to the indicated USE file until the end of that file
is reached, at which time the program stream will return to
the main program.
Example:Suppose you often used a certain paragraph, or a
character graphics picture which you have stored in a file
B:OFTEN.CAI. The command to insert that bit of program code
within another program is:
.USE PROG=B:OFTEN.CAI
.WAIT
Format: .WAIT #
Purpose: This command causes the program to wait # seconds
before continuing. This is handy for producing rolling
demos, where you want to time pauses between screens.
----------------------------------------------------------
EXAMPLE TUTORIAL
USES NO BRANCHING COMMANDS
----------------------------------------------------------
.CLS
.SKIP 10
My Very First Tutorial
by
Ima Writer
.SKIP 9
.PAUSE (*Please press ENTER to continue*)
__________________________________________________________
Please become a registered PC-CAI user -- see order form
29
PC-CAI 1.0
__________________________________________________________
.CLS
During the American Revolution, a young General by the name of
George Washington lead the rag-tag Contintial Army against the
British troops. His popularity was so strong that some wanted
to name him King. Washington would not hear of it, but did accept
the position as the first president of the new republic.
.PAUSE (*Please press ENTER to continue*)
.CLS
@BEGIN QUESTION
@TRIES 3
There are many famous men associated with the American Revolution.
Thomas Jefferson, Benjamin Franklin, George Washington, and Paul Revere
are a few well known patriots.
@READ (*Who was the first President of the USA ? *)
@RIGHT (*Washington*) KEYWORD
That is correct, George Washington was the first president of the USA.
@WRONG (*Jefferson*) KEYWORD
He wrote the Declaration of Independence.
@WRONG
Hint:
The Capitol was named after him.
@WRONG FINAL
The answer is George Washington.
@END QUESTION
.PAUSE (*Please press ENTER*)
@STOP MENU
EXAMPLES OF BRANCHING
.SKIP 10
.CENTER(*This is an example of Branching in CALL*)
.SKIP 2
.USE PROG=USEFIL
.SKIP 1
.PAUSE (*Please press ENTER*)
@GOTO:ROBIN
This will not be printed, since we skipped it.
@LABEL:BATMAN
This is text which follows the BATMAN label, which is only printed when I go
BACK to it using a GOBACK command.
.pause (*Please press ENTER*)
@LABEL:ROBIN
@BEGIN QUESTION
.CLS
__________________________________________________________
Please become a registered PC-CAI user -- see order form
30
PC-CAI 1.0
__________________________________________________________
Now we are in a Question section. The question for the day is... Did the SUN
rise this morning?
HINT:The correct answer is Yes. However, to test out the branching, you might
want to see what happens when you answer NO.
@READ(*ENTER YOUR ANSWER:*)
@RIGHT (*Yes*) KEYWORD
.play (*mfo2l16cdefgabo3c*)
@END
@IF RIGHT then GOTO:RIGHTANSWER
.SKIP 2
This question is only asked if you answered the SUN question WRONG.
It is a very special day in which the SUN does not come up. In fact, when that
happens, there won't be a day at all, will there? Of course, it could be 3
o'clock in the morning, or there could be a cloud cover, which would make it
seem like there was no sun rise.
@BEGIN QUESTION
Did the SUN rise yesterday morning? The answer is YES whether you like it or
not!
@READ (*Enter your answer here:*)
@RIGHT(*YES*) FORCE NOCASE
.play (*mfo2l16cdefgabo3c*)
@END QUESTION
@GOTO :SKIP
@LABEL:RIGHTANSWER
This part of the program is performed if the first SUN question is answered
CORRECTLY.
@LABEL:skip
@BEGIN QUESTION NOCOUNT
DO YOU WANT TO STOP THIS NONSENSE?
@READ(*ENTER Y or N :*)
@RIGHT (*Y*) EXACT NOCASE
@END QUESTION
@IF RIGHT then GOTO:END
Okay, then , I'm going back...
@GOBACK:BATMAN
@LABEL:END
.PAUSE (*This is the END!!! Press Enter *)
__________________________________________________________
Please become a registered PC-CAI user -- see order form
31
PC-CAI 1.0
__________________________________________________________
@STOP MENU
THIS IS THE "USE" FILE USED IN THE EXAMPLE ABOVE:
==========================================================
.PLAY(*mbo1l4cdefgabo2c*)
This text was brought into the stream of the program by a USE command. This
program takes you through some exercises in branching, which will help you
understanding what may be performed with the commands:
@GOTO
@GOBACK
@IF
@LABEL
.SKIP 3
==========================================================
----------------------------------------------------------
GRAPHICS COMMANDS FOR PC-CAI
----------------------------------------------------------
In order to use graphics commands in PC-CAI, you must be using
a monitor which will support graphics. There are two
CGA graphics modes, low resolution and high resolution.
Monitors supporting this are composite graphics, CGA, EGA,
PGA, and VGA. Hercules graphic monitors are not currently
supported. Most of these commands are similar to the BASIC
commands of the same name. For more information on these
commands, see the BASIC manual. The first command which you
must use to enter graphics mode is the SCREEN command.
.SCREEN n
where n is 0,1 or 2.
0 - selects the monochrome screen (non graphics, 80 columns)
1 - selects low resolution graphics, 40 columns, 4 colors
2 - selects high resolution graphics, 80 columns, no colors
Of course, colors are only supported on a color monitor, and
will be supported in the SCREEN 0 setting. Low resolution
graphics gives you a screen in which you may access points
on the screen (called pixels) 320 from left to right, and
200 from top to bottom.
High resolution gives you 640 pixels from left to right and
__________________________________________________________
Please become a registered PC-CAI user -- see order form
32
PC-CAI 1.0
__________________________________________________________
200 from top to bottom.
Thus, in the following commands, points on the screen will
often be referenced by two numbers, the first being the
horizonal location (left to right), and the second being the
vertical location (up and down). The "home" position (0,0)
is the upper left corner of the screen. For example, the
location 100,200 would mean the location 100 pixels down the
screen, and 200 pixels right of the left border of the
screen. This is different from the normal Cartesian point
system which you may be familiar, in which the 0,0 position
is at the bottom left.
When a color monitor is used, and SCREEN 1 is selected, a
palette of colors is selectable. The command to do this is
.PALETTE n
where n is 0, 1 or 2, which selects the palette of colors.
Only four colors at a time can be used, the background color
plus three selectable colors, according to which palette is
being used.
The next command locates the graphics "pointer" somewhere on
the screen. You may wish to place the pointer on the screen
just prior to drawing an picture.
.PSET x,y
where x is the number of pixels from the left border, and y
is the number of pixels from the top border.
The DRAW command allows you to draw a picture.
.DRAW (*information*)
Where the information is a series of commands which indicate
how to draw the picture. The commands are as follows the "n"
in each commands represents the distance of the move. This
distance is n times the scaling factor set by the S command.
Un Move Up n pixels
Dn Move Down n pixels
Ln Move Left n pixels
Rn Move Right n pixels
En Move Diagonally up and right
Fn Move diagonally down and right
Gn Move diagonally down and left
Hn Move diagonally up and left
M x,y Move absolute or relative. If x has
__________________________________________________________
Please become a registered PC-CAI user -- see order form
33
PC-CAI 1.0
__________________________________________________________
a plus sign(+) or a minus sign (-) in front,
it is relative, otherwise it is absolute.
B Move but do not plot points
N Move but return to original position
An Set angle n where n may range from 0 to 3,
where 0 is 0 degrees, 1 is 90 degrees, 2 is 180,
and 3 is 270. Figures rotated 90 or 270 degrees
are scaled so that they appear to be the same
with 0 or 180 degrees on a display with standard
aspect of 4/3
Cn Set color n, where n may range from 0 to 3 in
medium resolution and 0 to 1 in high.
Sn Set scale factor n where n may range from 1 to
255. n divided by 4 is the scale factor.
Example: .DRAW (*U10L20R30D50*)
The CIRCLE command allows you to draw circles or portions
of circles.
.CIR CENTER=(x,y) RADIUS=n
where x and y is the location for the center of the
circle, and n is the radius.
Optional commands are
COLOR=n n=0,1,2 according to palette
START=a STOP=b where a and b are in radians
ASPECT=n n is numerator of n/12, where 10/12
is normal aspect for medium resolution
and 5/12 is normal for high resolution.
(See your BASIC manual for a more
complete explanation of aspect)
Example:.CIR CENTER=(100,100) RADIUS=30 ASPECT=6 COLOR=2
.PAINT CENTER=(x,y) COLOR=n1 BOUND=n2
where x and y are location within an object,
n1 is the color to paint
n2 is the color of the boundary.
Painting will fill from the "center" to the boundary in all
directions. Thus, if the boundary is not solid, the entire
screen will be painted.
USING A SINGLE IMAGE AT A TIME
Images, or pictures may be stored on disk and used by
__________________________________________________________
Please become a registered PC-CAI user -- see order form
34
PC-CAI 1.0
__________________________________________________________
PC-CAI. The IMAGE program is in the Utilities module. To
begin the IMAGE program enter the command:
C>CAI-UTIL
Request the "IMAGE" option from the menu. Images may be of
width 2 to 40 and height from 2 to 30. Within the IMAGE
program, you may move the cursor around the image grid
selecting colors by pressing 1,2,or 3. Once an image is
saved, it may be used in a tutorial.
.GET filename
To bring an image into PC-CAI so it can be used, you must
first GET it. The filename is the name under which the image
is saved.
EXAMPLE: .GET PC.IMG
.PUT x,y
Puts the image on the screen at the specified location. The
x,y specifies where to put the upper left corner of the
image. If the image is placed in a position where it will
not all fit on the screen, and error will occur. To erase an
image which is already on the screen, you PUT the same image
on top of the one to be erased.
.MOVE (x,y)-(x,y) STEPS=n
Instructs PC-CAI to move the image from one location to
another. Steps specifies how many steps to take. A small
number or steps causes a fast move, and a large number of
steps causes a slow move.
USING GRAPHIC ANIMATION
Prepare your animation sequence by building up to four
images in the CAI-UTIL Image option. An example on disk is
RUNNER1.IMG, RUNNER2.IMG, RUNNER3.IMG and RUNNER4.IMG. To
load in up to four images (.IMG files), use the command
.LOAD file1,file2,file3,file4
Be sure they are specified in the order that they are to
appear in the animation.
To animate the sequence, use the command:
__________________________________________________________
Please become a registered PC-CAI user -- see order form
35
PC-CAI 1.0
__________________________________________________________
.ANIMATE (X1,Y1)-(X2,X2) [STEPX=#] [STEPy=#] [PAUSE=#]
X1,Y1 and X2,Y2 are the beginning and ending points for the
animation. Be careful that these points allow the entire
image to appear on the screen. Otherwise, you could get an
error. The options SETPX, STEPY and PAUSE have to do with
how fast the image will go. STEPX is horizontal movement,
STEPY is vertical movement and PAUSE is how much to pause
between images.
The defaults are STEPX=5, STEPY=5 and PAUSE = .1.
A simple example is given in the following statements:
.SCREEN 1
.LOAD RUNNER1,RUNNER2,RUNNER3,RUNNER4
.ANIMATE (1,100)-(100,100) STEPX=2 STEPY=0 PAUSE=0.1
HINTS FOR USING GRAPHICS
Since graphics portions of PC-CAI code may be time consuming
to create, edit, and perfect, it is a good idea to create
bits of graphic code in small programs, and then to include
these portions in a larger tutorial.
It may also be advisable to create your own library of
images and pictures, which you may draw upon to use over and
over.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
36
PC-CAI 1.0
__________________________________________________________
APPENDIX I
USER'S BALLOT
Please indicate your preference for improvements in
PC-CAI. On a scale of 0 to 10
0 = Very Low priority for this change
10 = Very High priority for this change
Your
Vote Proposed item of change
---- ----------------------------------------------
____ Provide a "question bank" from which to store
and select questions at random or from a list.
____ Support output/control of VCR devices.
____ Support calculation ability in program.
____ Support encryption of files to prevent them from
being read by users.
____ Make display to screen faster
____ Support mouse/joystick
____ Provide a "grading" program to summarize results of
tests given by the program.
____ Make the editor more like WordStar
____ Support subroutines in the language
____ _____________________________________________
____ _____________________________________________
____ _____________________________________________
____ _____________________________________________
____ _____________________________________________
____ _____________________________________________
____ _____________________________________________
Comments:
-----------------------------------------------------------
Mail to:TexaSoft, P.O. Box 1169, Cedar Hill, Texas 75104.
Thanks.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
37
PC-CAI 1.0
__________________________________________________________
APPENDIX II
Bug Report for PC-CAI
Please explain in detail the problem that occurred. If
possible, send a print out of the results or Print Screen,
or send copy of the PC-CAI code that caused problems.
---------------------------------------------------------
---------------------------------------------------------
Mail to:TexaSoft, P.O. Box 1169, Cedar Hill, Texas 75104.
Thanks.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
38
PC-CAI 1.0
__________________________________________________________
APPENDIX III
ERROR CODES
These are selected error codes. A complete selection can
be found in the IBM PC BASIC language manual.
7 - Out of memory
24 - Device timeout (ie printer)
25 - Device fault
27 - Out of paper
51 - Internal error
58 - File already exists
61 - Disk full
64 - Bad file name
67 - Too many files on disk
68 - Device unavailable (ie printer)
70 - Disk is write protected
71 - Disk not ready
72 - Disk Media error (hardware or media fault)
__________________________________________________________
Please become a registered PC-CAI user -- see order form
39
PC-CAI 1.0
__________________________________________________________
DISTRIBUTING PROGRAMS WRITTEN IN PC-CAI
You may distribute programs written in PC-CAI without
royalty under the following conditions. That is, you may
distribute the run-time program CAI.EXE with your commercial
or non-commercial programs. For a PC-CAI program to run, you
must also have the file BRUN30.EXE on disk. This is a
program from Microsoft that may be distributed free of
charge, as long as the appropriate copyright notice is
given.
1. Your copyright screen on your program should include the
phrases:
Portions (C)Copyright TexaSoft, Alan C. Elliott, 1985-1989
Portions (C)Copyright by Microsoft Corporation 1982-1987
2. You must be a registered PC-CAI user, having paid the
registration fee directly to TexaSoft.
If you give away or distribute the PC-CAI disk, include all
files, unaltered. Always mention that this is a shareware
product, and users are expected to register. You may not
photocopy and distribute the PC-CAI manual. Please help by
encouraging the registration of copyrighted shareware
programs so that these programs may be updated and improved
on a regular basis. Thanks.
__________________________________________________________
Please become a registered PC-CAI user -- see order form
40
PC-CAI 1.0
__________________________________________________________
ORDER FORM/REGISTRATION FORM FOR PC-CAI
PC-CAI, Computer Aided Instruction language $___________
for the IBM PC $35. Latest version.
KWIKSTAT, statistical analysis program & graphics $___________
(t-test, ANOVA, regression, and more) $35
Sub-Total $___________
Texas Residents add 7% Tax $___________
Postage & Handling $ 4.00
Rush, P.O. or COD add additional $4
Overseas, add additional $6 $___________
TOTAL ENCLOSED $
============
Payment method:check one
_____ Check or M.O. _____ VISA _____ Master Card
------------------------------------------------------------
IF CREDIT CARD:
Name on Card:_____________________________________________
Type Card is __________________ Exp Date is:_____________
Card Number is:___________________________________________
Authorized Signature:_____________________________________
-----------------------------------------------------------
Mail order to:____________________________________________
Address:__________________________________________________
City:___________________ St_______ ZIP ___________________
Phone ( )______________________________________________
-----------------------------------------------------------
Please mail to:TexaSoft, P.O. Box 1169, Cedar Hill, Texas 75104.
Thanks. Phone orders call 214-291-2115. Have MC or VISA ready.
MAIL TODAY!
41
or VISA ready.