home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
DRI-archive
/
manuals
/
drlogo_ref_app.txt
< prev
next >
Wrap
Text File
|
2007-01-24
|
56KB
|
1,848 lines
DRLRMA.WS4 (= "Dr. Logo Reference Manual", Appendix A)
----------
(Retyped by Emmanuel ROCHE. Posted to comp.os.cpm.amethyst by
Roche on 08 Apr 2005.)
ROCHE> The DRLRM6.WS4 file, when printed on A4 (12") paper
is 175 pages long... So, since some persons complain about long
messages, I sent it, instead, to the comp.os.cpm.amethyst
Newsgroup, that nobody read anymore. With this publication,
the full "Dr. Logo Reference Manual" is now available. I hope
that this will encourage CP/M fans to publish interesting
Dr. Logo programs for CP/M-86 (Plus)... (Amstrad 8-bit and
Atari 520ST fans will also be interested in this documentation.)
Appendix A: Dr. Logo error messages
-----------------------------------
Table A-1. Dr. Logo error messages
Number Message
------ -------
2 Number too big
6 (symbol) is a primitive
7 Can't find lable (symbol)
8 Can't (symbol) from the editor
9 (symbol) is undefined
11 I'm having trouble with the disk
12 Disk full
13 Can't divide by zero
15 File already exists
17 File not found
21 Can't find catch for (symbol)
23 Out of space
25 (symbol) is not true or false
29 Not enough inputs to (procedure)
30 Too many inputs to (procedure)
32 Too few items in (list)
34 Turtle out of bonds
35 I don't know how to (symbol)
36 (symbol) has no value
37 ) without (
38 I don't know what to do with (symbol)
40 Disk is write protected
41 (procedure) doesn't like (symbol) as input
42 (procedure) didn't output
43 I don't know how to do that yet
44 !! Dr. Logo system bug !!
(Should not occur. Please write to Digital Research if it does.)
45 The word is too long
46 I don't have enough buffer space
47 If wants [ ]'s around instruction list
48 (varies according to disk error)
49 (symbol) isn't a parameter
50 I can't (symbol) while loading
51 The file is write protected
52 I can't find the disk drive
EOF
DRLRMB.WS4 (= "Dr. Logo Reference Manual", Appendix B)
----------
(Retyped by Emmanuel ROCHE.)
Appendix B: Dr. Logo control and escape character commands
----------------------------------------------------------
Table B-1. Dr. Logo control and escape character commands
Format: Character
Effect
(* indicates the character is valid within screen editor only.)
Ctrl-A
Moves the cursor to the beginning of the line.
Ctrl-B
Moves the cursor [B]ack one character; that is to say, it moves
the cursor one position to the left.
Ctrl-C *
Exits the screen editor; updates Dr. Logo's workspace with
definitions of all procedures and variables from the screen
editor's buffer.
Ctrl-D
[D]eletes the character indicated by the cursor.
Ctrl-E
Moves the cursor to the [E]nd of the line.
Ctrl-F
Moves the cursor [F]orward one character; that is to say, it
moves the cursor one position to the right.
Ctrl-G
Outside the screen editor, it immediately terminates the
currently executing procedure. Inside the screen editor, it
exits the screen editor without updating Dr. Logo's workspace,
discarding any changes made during the screen editing session.
Ctrl-H
Deletes the character to the left of the cursor.
Ctrl-I
[I]nserts a tab (three spaces).
Ctrl-J
(No effect.)
Ctrl-K
[K]ills the remaining line; that is to say, it deletes all
characters right of the cursor to the end of the line. Deleted
characters are stored in buffer.
Ctrl-L
Outside screen editor, displays a full graphic screen, devoting
the monitor to graphics. Inside screen editor, it readjusts the
display so that the line currently indicated by the cursor is
positioned at the center of the screen. If the cursor is less
than 12 lines from the beginning of the buffer, the screen
editor simply beeps when Ctrl-L is pressed.
Ctrl-M
Generates a Carriage Return.
Ctrl-N
Moves the cursor to the [N]ext line; in the screen editor, the
cursor moves down one line towards the end of the buffer.
Ctrl-O
[O]pens a new line. In the screen editor, it is equivalent to
pressing Enter followed by Ctrl-B.
Ctrl-P
Moves the cursor to the [P]revious line; the cursor moves up one
line towards the beginning of the buffer.
Ctrl-Q
Generates the [Q]uoting character ("\") that makes Dr. Logo
treat a delimiter character as a literal character. Delimiter
characters are [ ] ( ) " : ; = < > + / ^
Ctrl-R
(No effect.)
Ctrl-S
Displays a [S]plitscreen; opens a text window on the graphic
screen.
Ctrl-T
Displays a full [T]ext screen, devoting the monitor to text.
Ctrl-U
(No effect.)
Ctrl-V *
Displays the next screen full of text in the screen editor's
buffer, the next 24 lines towards the bottom of the buffer.
Ctrl-W
Interrupts the scrolling of a text display; [W]aits until the
next keystroke to continue scrolling the display.
Ctrl-X
(No effect.)
Ctrl-Y
[Y]anks text from the buffer; that is to say, it redisplays the
line most recently stored in the buffer by an Enter or a Ctrl-K
keystroke.
Ctrl-Z
Interrupts the currently executing procedure; displays a pause
prompt to allow interactive debugging. Enter "co" to continue
the execution of the interrupted procedure.
ESC-V *
Displays the previous screen full of text in the screen editor's
buffer, the previous 24 lines towards the beginning of the
buffer.
ESC-< *
Positions the cursor at the beginning of the screen editor's
buffer.
ESC-> *
Positions the cursor at the end of the screen editor's buffer.
EOF
DRLRMC.WS4 (= "Dr. Logo Reference Manual", Appendix C)
----------
(Retyped by Emmanuel ROCHE.)
Appendix C: Functional command list
-----------------------------------
Word and list processing
------------------------
ascii word
butfirst, bf object
butlast, bl object
char n
count object
emptyp object
equalp object object
first object
fput object object
item n object
last object
list object object (...)
listp object
lowercase, lc word
lput object object
memberp object object
numberp object
piece n object
proclist
quote object
sentence, se object object (...)
shuffle list
uppercase, uc word
where
word word word (...)
wordp object
Arithmetic operations
---------------------
abs n
arctan n
cos degrees_n
degrees radians_n
exp n
int n
log n
log10 n
pi
product n n (...)
quotient n n
radians degrees_n
random n
remainder n n
rerandom
round n
sin degrees_n
sqrt n
sum n n (...)
tan degrees_n
+ a b
- a b
* a b
/ a b
^ a b
Logical operations
------------------
and pred_exp pred_exp (...)
not pred_exp
or pred_exp pred_exp (...)
= a b
< a b
> a b
Variables
---------
local varname (...)
make varname object
name object varname
namep word
thing varname
Defining procedures
-------------------
copydef new_procname old_procname
defined procname defin_list
definedp object
end
primitivep object
text procname
to procname <inputs>
Editing
-------
edall <pkgname | pkgname_list>
edit, ed <name | name_list>
edns <pkgname | pkgname_list>
edps <pkgname | pkgname_list>
Text screen
-----------
cleartext, ct
cursor
print, pr object (...)
setcursor coord_list
show object
textbg n
textfg n
textscreen
twoscreen
type object (...)
Graphic screen
--------------
background, bg
clean
clearscreen, cs
dot coord_list
fence
fullscreen
pen
pencolor, pc
pendown, pd
penerase, pe
penreverse, px
penup, pu
setbg n
setpc n
setpen list
setsplit n
splitscreen
turtletext, tt object (...)
window
wrap
Graphic movement
----------------
back, bk distance_n
forward, fd distance_n
heading
hideturtle, ht
home
left, lt degrees_n
pos
right, rt degrees_n
setheading, seth degrees_n
setpos coord_list
setx n
sety n
shownp
showturtle, st
towards coord_list
xcor
ycor
Workspace management
--------------------
bury pkgname | pkgname_list
erall <pkgname | pkgname_list>
erase procname | procname_list
ern varname | varname_list
erns <pkgname | pkgname_list>
erps <pkgname | pkgname_list>
follow procname procname
nodes
noformat
noprim
package pkgname name | name_list
pkgall pkgname
po procname | procname_list
poall <pkgname | pkgname_list>
pons <pkgname | pkgname_list>
popkg
poprim
pops <pkgname | pkgname_list>
potl
pots <pkgname | pkgname_list>
recycle
unbury pkgname
Property lists
--------------
glist prop <pkgname | pkgname_list>
gprop name prop
plist name
pprop name prop object
pps <pkgname | pkgname_list>
remprop name prop
Disks
-----
copyd dest_d: source_d:
defaultd
initd d: n
resetd <d:>
setd d:
spaced <d:>
Files
-----
changef new_fname old_fname
copyf dest_fname source_fname
erf fname
getfs <d:>
load fname
save fname <pkgname | pkgname_list>
Keyboard
--------
fkey n instr_word
keyp
readchar, rc
readlist, rl
readquote, rq
Printer
-------
copyoff
copyon
printscreen
Sound, lightpen and joystick
----------------------------
tones note_list
lpen
lpenp
buttonp paddle_n
paddle n
Conditionals and flow of control
--------------------------------
bye
co <object>
go word
if pred_exp instr_list <instr_list>
iffalse, iff instr_list
iftrue, ift instr_list
label word
output, op object
repeat n instr_list
run instr_list
stop
test pred_exp
wait n
Error handling and debugging
----------------------------
catch name instr_list
debug
error
nodebug
notrace <procname | procname_list>
nowatch <procname | procname_list>
pause
throw name
trace <procname | procname_list>
watch <procname | procname_list>
EOF
DRLRMD.WS4 (= "Dr. Logo Reference Manual", Appendix D)
----------
(Retyped by Emmanuel ROCHE.)
Appendix D: Glossary
--------------------
address
Location in memory.
ambiguous file name
File name containing a wildcard character. In Dr. Logo, the
wildcard character is a question mark ("?"). An ambiguous file
name is used to access one or more files. For example, getfs "z?
displays all file names that begin with the letter z. You can
put the ? after any number of characters or as the only
character, but the ? must be the last character in a file name.
A file name cannot contain more than eight characters. See
wildcard character.
artificial intelligence
Imitation of human-like information processing performed by a
computer.
ASCII
Acronym for American Standard Code for Information Interchange.
ASCII is a standard code for the computer representation of the
numbers, letters, and symbols that appear on most keyboards.
assembly language
Human readable form of machine language. See machine language.
backup or back-up
Duplicate copy of data to be used in case the original is lost,
destroyed, or accidentally altered. The process of duplicating a
disk or file.
BASIC
Programming language that is widely used in microcomputers
because of its English-like structure and ease of use. BASIC is
an acronym for Beginner's All-purpose Symbolic Instruction Code.
bit
Fundamental unit of information that a computer understands.
Abbreviated from Binary digIT. A bit can have one of two values,
0 or 1, meaning off or on, respectively. See byte.
boot
Act of starting up a computer system.
buffer
Area of memory that temporarily stores information during the
transfer of information.
bug
Error in a procedure that prevents the procedure from executing
as expected.
byte
Unit of memory or disk storage that usually contains eight bits.
In ASCII code, each character is represented by one byte.
cathode ray tube, CRT
Picture tube that shows information being entered or output from
the computer; functionally similar to those used in standard
televisions. Commonly abbreviated CRT; also referred to as the
monitor.
cell
See character cell.
central processing unit, CPU
Brain of the computer, commonly abbreviated CPU. Your IBM
Personal Computer contains an Intel 8088 CPU, an integrated
circuit that contains an arithmetic/logic unit that controls and
manipulates the flow of information and its storage in memory.
character
Single letter, number, symbol, space, or punctuation mark. A
character is usually stored in one byte of the computer's
memory, or on disk.
character cell
Unit of space on the monitor that can hold one character. A cell
is located at the intersection of each horizontal row and each
vertical column. There are 1,000 character cells on a graphic
display, and 2,000 character cells on a text display. Dr. Logo
lets you control the background color and foreground color of
each character cell on the graphic and text display.
code
Sequence of expressions written in a programming language that
instructs the computer to perform a task.
color monitor
Output device that allows you to see the visual field of both
the graphic screen and the text screen.
command
Instruction that makes Dr. Logo initiate an action.
comments
Remarks or explanatory notes set off from the rest of a
procedure's definition by a semicolon (";").
compiler
Language translator that interprets the text of a high-level
language, like BASIC, into machine language code (1s and 0s)
understandable to the computer.
concatenation
Joining of two or more objects together, end to end. For
example, the primitive word outputs a single word made up of
multiple inputs, as in word "sun "shine outputs "sunshine".
constant
Object, word, number, or list with a value that does not change
when a procedure runs.
control character
Non-printing character combination that sends a simple command
to Dr. Logo. To enter a control character, hold down the control
(Ctrl) key, and press the specified character key.
CP/M
Operating system controlling the operation of Dr. Logo. CP/M
stands for Control Program for Microcomputers.
CPU
See Central Processing Unit.
crash
Severe hardware or software malfunction. A head crash, for
example, generally causes an irretrievable loss of the data on a
disk.
CRT
See Cathode Ray Tube.
cursor
Blinking underline symbol on the text display. The cursor
designates the position where the next keystroke at the keybaord
has an effect. As you type, the cursor automatically advances.
You can also move the position of the cursor with the cursor
control keys located on the numeric key pad, the tab key ("--
>|"), and the backspace key ("<--"). On the graphic display, the
turtle designates the point of action.
data
Information that is created, changed, or stored by the computer.
debug
Process of locating and correcting errors in a procedure.
default
Value supplied in the absence of user input. For example, when
you start your computer system, drive A: is the default drive.
Dr. Logo looks for files on the disk in the default drive,
unless you specify another drive.
delimiter
Blank space or any of these special characters used to set
another character, word, or number off from the next: [ ] ( ) ;
< > + - * / ^.
directory
List of the contents of the disk. Use the getfs primitive to
display a list of all the Dr. Logo file names on a data disk.
disk
Magnetic media used to store information. Sometimes called
diskette. Programs and information are stored and retrieved like
music on a record. The term diskette usually refers to floppy
disks 5 1/4 or 8 inches in diameter. The term disk can refer to
a diskette, a removable cartridge disk, or a fixed hard disk.
disk drive
Peripheral device that stores and retrieves information on
disks.
display
Visual field of a screen, or to show the contents of the screen
on the monitor.
double sided
Disk format that stores information on both sides; a disk drive
that can read and write on both sides of a double-sided disk.
Dr. Logo
Digital Research's version of Logo, a programming language with
extensions that make it suitable for commercial and academic
applications.
edit
Process of adding, modifying, or deleting text in the definition
of a user-defined procedure.
editor
Utility program that allows you to add, modify, or delete
information from a text screen. See also line editor, procedure
editor, and screen editor.
element
Single piece of an object. For example, a numeral is an element
of a number, a character is an element of a word, and a word is
an element of a list.
end
Special word that indicates the conclusion of a procedure's
definition. The word "end" must stand alone on the last line of
a procedure.
enter
Act of transmitting information to the computer. The computer
does not recognize or process any information typed at the
keyboard since the last prompt, until you press the Enter key
("<--+"). The Enter key on an IBM Personal Computer is the
equivalent to a Carriage Return ("RETURN") on a standard
typewriter keyboard.
evaluate
Process Dr. Logo goes through to execute an expression.
executing a procedure
See running a procedure.
expression
In Dr. Logo, an expresion is a procedure name followed by its
inputs.
file
Collection of information on a disk.
file name
Name you assign to a file. The file name can consist of up to
eight alphabetic or numeric characters. The first character in a
file name must be alphabetic.
floating point
Method Dr. Logo uses internally to express numbers that have a
decimal point that can shift to the left or right.
floppy disk
Flexible magnetic disk used to store information. A floppy disk
is a thin piece of mylar, coated with magnetic particles. The
disk drive causes the floppy disk to rotate inside its paper
jacket. Floppy disks come in two sizes: 5 1/4 and 8 inches in
diameter.
flowchart
Graphic diagram that uses special symbols to indicate the input,
processing, output, and flow of a procedure.
function
Operation or specific task that is called into action by
referencing the procedure by name. The result of a function is
always a single value. See operation.
function keys
Ten multiple-purpose keys located along the left side of the
keyboard, labeled F1 through F10, that you can program to recall
command lines of up to 16 characters. Press the Enter key to
execute the recalled command line.
graphic displays
Visual representations that illustrate, map, or plot
mathematical curves, diagrams, graphs, or charts. Dr. Logo
allows you to draw graphic designs with the turtle.
graphic screen
Construct in memory where graphic data is stored that can extend
beyond the range of your monitor. You can display the visual
field of the graphic screen on a color monitor. Dr. Logo allows
you to draw graphic designs on the graphic screen with the
turtle.
graphic window
Visual display of the graphic screen on a color monitor; that
portion of the monitor dedicated to the graphic screen. Dr.
Logo's splitscreen primitive allows you to have both text and
graphic windows on the same color monitor.
hardware
Physical components of a computer, such as the central
processing unit, random access memory, disk storage devices,
monitor, keyboard, printer, lightpen, paddle, or joystick.
high-level language
Computer language written in procedural form that is easily
comprehensible by humans. Many machine language instructions are
generated for each high-level expression. Dr. Logo is a high-
level language.
infix operation
Operations where the primitive name or identifier is positioned
between its inputs, as in a + b.
initialize
Act of preparing or formatting a disk, in order to read and
write information on it.
input
Object that a procedure requires to complete its task;
information entered into the computer by an operator typing at
the terminal or by a procedure reading from the disk, or to
enter such information.
input device
Mechanism that accepts information from the outside world and
converts that information into a form that the computer can use.
A keyboard is an input device.
input/output devices
Combination of input and output devices. Commonly abbreviated
I/O devices.
integer
Positive or negative whole number with no decimal point.
interface
Object that allows two independent systems to communicate with
each other, as an interface between hardware and software in a
microcomputer.
interpreter
Computer program that evaluates each line as it is typed at the
keyboard, and each line of a procedure every time it is run. Dr.
Logo is an interpreted computer programming language.
interpreter prompt
Question mark ("?") signaing that Dr. Logo is expecting you to
type something at your keyboard; the interpreter is waiting for
input.
I/O
Abbreviation for input/output. This term commonly refers to
combinations of input and output devices.
jacket
Stiff paper container that holds a floppy disk.
joystick
See paddle.
kilobyte
1024 bytes, commonly denoted as 1K.
language
System of words and symbols used to write programs that
communicate with a computer.
level number
Number enclosed in square brackets ("[" and "]") that precedes
each line displayed by the trace and watch primitives. The
number indicates the position of the procedure on the stack. See
stack.
lightpen
Input device that allows you to interact with the computer
without the keyboard. The lightpen sends a screen location to
the computer when you touch the screen's surface with the tip of
the lightpen.
line editor
Dr. Logo interpreter's utility that allows you to modify the
current line of text without erasing and retyping the entire
line. Dr. Logo allows you to use certain control characters or
function keys to move the cursor left and right over the current
line of text to make modifications before you press the Enter
key.
LISP
Programming language derived from the words LISt Processing.
LISP dominates artificial intelligence programming because of
its powerful symbolic and list processing capabilities. Logo
evolved from LISP.
list
Type of object used as input to a Dr. Logo procedure. A series
of objects (words, numbers, or lists) separated by spaces and
enclosed in square brackets ("[" and "]").
load
To move procedures or information from permanent storage on the
disk into the computer's memory buffer or workspace.
logical operator
Mathematical symbols representing equals ("="), less-than ("<"),
or greater-then (">") as well as the primitives "and", "not",
and "or" that are used in predicate expressions; expressions
that evaluate to either TRUE of FALSE.
Logo
Name of a programming language derived drom the Greek word
logos, which means word. Logo is a computer language that
evolved from LISP and is designed to teach the fundamentals of
computer programming.
machine language
Sequence of instructions to the machine, written in terms of 1s
and 0s, and generally not understandable by humans. See bit.
megabyte
One million bytes, or 1024K bytes. See kilobyte.
memory
That part of a computer system that temporarily stores
information. Also called random access memory (RAM) or working
storage. Dr. Logo automatically loads into memory when you start
up your system. Once Dr. Logo is loaded, it allocates part of
memory for your workspace.
microprocessor
Miniaturized integrated circuit usually on a silicon chip that
is the brain of the microcomputer.
monitor
Output device that displays the visual field of your graphic or
text screen. A color monitor displays both graphic and text
screens; a monochrome monitor displays only text.
monochrome monitor
Output device that displays the text screen.
name
Type of object used as input to a Dr. Logo procedure. A special
word that identifies a procedure, a variable, a package, a file,
or a disk.
number
Type of object used as input to a Dr. Logo procedure. In Dr.
Logo, a number is a kind of word and can be used as a variable
name if it is preceded by a quotation mark, as in "8. A number
cannot be used as the first or only character in a procedure
name. In arithmetic operations, you can input negative or
positive decimals numbers with up to 15 significant digits.
numeric constant
Real or integer quantity that does not change as the procedure
is run.
numeric pad
Separate set of keys, arranged like a 10-key adding machine,
located on the right of the IBM Personal COmputer keyboard.
Provided because they are useful for entering large amounts of
numeric information. Press the NUM LOCK key, located above the
numeric pad, to make the keys function as cursor control keys.
object
Type of input to a Dr. Logo procedure. A Logo object can be a
word, a number, a list, or anything that is not a procedure
name. Variables can represent objects.
operation
Procedure that outputs an object, or a mathematical process such
as addition, multiplication, subtraction, or division. In Dr.
Logo, an operation is equivalent to a function.
operating system
Master program that supervises the execution of other programs,
and manages the computer system's resources. An operating system
provides an orderly input/output environment between the
computer and its peripheral devices. Dr. Logo runs under the
CP/M operating system, which is compatible with many different
computer systems.
optional input
Inputs that are not required. In the primitive expression syntax
descriptions, optional inputs are enclosed in angle brackets
("<" and ">").
output
Object returned to the caller by a procedure; data that the
processor sends to the console, printer, or disk after
processing is complete. To send information to the console,
printer, or disk. The computer outputs the requested object or
data.
output device
Mechanism by which a computer transfers its information to the
outside world. The printer is an output device.
package
Group of related procedures or variables. Packaging helps you
manage your workspace. When you organize your procedures and
variables into packages, you can display, edit, save, or erase a
whole group without affecting other procedures or variables in
the workspace.
paddle
Input device that allows you to interact with the computer
without the keyboard. Common on electronic computer games and
also called a joystick. The coordinate scale that the paddle or
joystick sends to the computer depends on the kind of device you
purchase. Dr. Logo supports up to two paddles or joysticks, each
with two buttons.
peripheral device
Mechanisms that are external to the CPU. Terminals printers,
disk drives, paddle (joystick), and lightpen are peripheral
devices.
permanent storage
Location outside of the computer's memory where data can be
stored, usually on disk. When you save a file, you copy the
information from the workspace onto the disk.
pixel
Smallest element of a monitor's display; a point within a
character cell. Also referred to as a dot. A turtle step, as in
the command forward 1, is equivalent to one pixel.
precedence
Order in which Dr. Logo processes arithmetic operations.
predicate expression
Expression that contains a logical operator and outputs either
TRUE or FALSE. A predicate expression can be a type of input to
a Dr. Logo procedure.
prefix operation
Operations where the primitive name or identifier precedes the
inputs, as in - a b, or print [Hi there!].
primitives
Procedures, operations, or commands that make up Dr. Logo; the
built-in procedures.
printer
Peripheral device used to put computer information on paper.
printout
Printed material or listing produced by the printer.
procedure
A series of expressions that tell Dr. Logo how to perform a
task.
procedure editor
Dr. Logo interpreter's utility that allows you to teach Dr. Logo
a new task, that is to say, to define a new procedure. The
procedure editor is identified by the greater-than sign (">"), a
prompt that appears when you enter the word "to" at the
interpreter's question mark prompt ("?"). All the line editor's
control character commands function within the procedure editor.
procedure editor prompt
Greater-than sign (">") that tells you Dr. Logo is expecting you
to enter a procedure definition line. Dr. Logo does not
immediately evaluate the expressions typed at the > prompt.
program
Complete set of instructions designed to tell the computer to
perform a specific task. To define a Dr. Logo procedure.
prompt
Cue displayed on the monitor telling the user that Dr. Logo is
expecting input. A prompt can be a symbol, such as ?, >, or !.
Or a prompt can be a message, such as "Is this what you want
(y/n)?". All prompts expect a response from the user. For
example, when you see the ! prompt, you are extremely low on
free nodes in your workspace. Your response should be to enter
the primitive "recycle" to call the garbage collector. See
interpreter prompt and procedure editor prompt.
property
Quality or attribute of an object, procedure, or package.
property list
List of property pairs that represent the qualities or
attributes connected with an object, procedure, or package. Use
the pprop primitive to assign both the Dr. Logo system
properties and your own non-system properties. Use the plist
primitive to display a property list.
property name
First member of a property pair; the label representing the
quality or attribute of an object, procedure, or package. For
example, the .BUR property name in a package name's property
list signifies that the package is buried.
property pair
Two parts of a property. The first element of a property pair is
the property name; the second element is its value. For example,
in a procedure's property list is a property pair consisting of
the property name .DEF and the value of .DEF, the actual
definition of the procedure.
property value
Second member of a property pair; the qualities of or attributes
connected with an object, procedure, or package. For example,
the information following a .PAK property name in a property
list is the property value, the name of the package to which
this object belongs.
RAM
See random access memory.
random access
Process of reading or writing informaion in memory or on a disk
in any order.
random access memory
Temporary memory location inside a computer. Also called working
storage. Commonly abbreviated as RAM. Size of RAM is measured in
kilobytes.
random number
Number selected by chance from a set of numbers. The random
primitive returns a random number in Dr. Logo.
read
Process of transferring prestored information from a storage
device, such as a floppy disk, into the computer's memory.
Read-Only
Attribute of a disk or a disk drive that allows you to read but
not write to the disk or disk drive.
Read-Only disk
Attribute assigned to a disk that allows you to read from that
disk, but not change it. To assign the Read-Only attribute to a
5 1/4 inch floppy disk, disable the Read-Write notch on the
upper left side of the disk by placing a sticker over it.
Read-Only disk drive
Attribute assigned to a disk drive that allows you to read any
file on the disk but prevents you from adding a new file,
erasing a file, changing a file, or renaming a file. A drive has
the Read-Only attribute when a new disk is inserted. Use the
primitive resetd to give the drive a Read-Write capability.
Read-Write
Attribute of a disk or a disk drive that allows you to read from
and write to the disk or the disk drive. A 5 1/4 inch floppy
disk can be set to Read-Write by cutting out the Read-Write
notch on the upper left corner of the disk. A drive can be set
to Read-Write by entering the resetd command after inserting a
new disk.
real number
Numeric value specified with a decimal point, internally
represented in floating point notation.
reserved word
Keyword that has specific meaning to a given language or
operating system. In Logo, the keywords are called "primitives".
A reserved word cannot be used as a procedure or variable name,
unless you have set the system variable REDEFP to TRUE.
running a procedure
Process of Dr. Logo evaluating and performing the expressions in
a procedure.
save
To transfer information from random access memory into permanent
storage on the disk.
screen
Construct in memory where text or graphic data is stored. Dr.
Logo supports two kinds of screens: a text screen and a graphic
screen. A color monitor can display both kinds of screens, and a
monochrome monitor can display only the text screen.
screen editor
Dr. Logo utility that allows you to define a procedure or modify
a procedure without retyping the complete definition. In the
screen editor, you can use special screen editing control
characters that enable you to move from line to line in a
procedure, as well as all of the line editor's control character
commands. You can start the screen editor by typing the commands
ed, edall, edps, or edns at Dr. Logo's ? prompt.
single-sided
Disk format that stores information on only one side; a disk
drive that can read or write on only one side of a single-sided
disk.
sixteen-bit computer
Computer system that is capable of processing information
sixteen bits at a time, potentially twice as fast as an eight-
bit system. Sixteen-bit systems can usually accomodate more RAM
than eight-bit systems, making some applications more efficient.
software
Set of instructions that tells the hardware how to complete a
particular task. Unlike hardware, software is not an electronic
product, and does not perform any physical work. Software is a
communication tool that allows you to interact with the
hardware.
splitscreen
Display where a text window is opened on the graphic screen of a
color monitor.
stack
Area in memory used by the interpreter to keep track of which
procedure is currently running.
store
To save information. See save.
superprocedure
Procedure that is never called by any other procedure. You call
a superprocedure into action by entering the procedure name at
Dr. Logo's ? prompt. Use the potl primitive to display the names
of superprocedures.
syntax
Format for entering an expression.
syntax error
Error that results from entering an expression that does not
conform to the syntax rules.
temporary storage
See random access memory.
terminal
Input/output device consisting of a monitor and a keyboard.
text screen
Area in memory where text data is stored. You can display the
visual field of the text screen on either a monochrome or color
monitor.
text window
Visual display of the text screen on either a color monitor or a
monochrome monitor; that portion of the display dedicated to the
text screen. Dr. Logo's splitscreen primitive allows you to have
both text and graphic windows on the same color monitor.
toplevel
Interpreter's prompt. When Dr. Logo displays a question mark
("?"), there are no procedures on the stack, and the level
number is 0.
trace
Option used for debugging a procedure while it is running. The
trace option displays the name of each procedure as it is
called, and the name and value of each variable as it is
defined. Trace allows you to observe the details of the
procedure's execution without interruption.
turtle
Graphic symbol that functions as a cursor appearing on the Dr.
Logo graphic screen.
turtle graphics
Dr. Logo's graphics environment. The Logo language allows you to
draw on the graphic screen by directing the turtle's movement.
As the turtle moves, it leaves a trace of its path on the
screen.
turtle step
One pixel or dot on the IBM Personal Computer.
user
Person who operates a computer.
user-friendly
Quality of a piece of software that makes it simple for the
inexperienced person to use.
utility program
Software tool that enables the user to perform certain
operations. For example, the editor is a utility program that
enables you to add, change, and delete text in a Dr. Logo
procedure.
value
Quantity expressed by an integer or real number; the object
assigned to a variable or property name.
variable
Name to which Dr. Logo can assign an object as a value. A
variable can be thought of as a container that can hold a value.
visual field
Portion of the screen displayed on the monitor.
watch
Option used for debugging a procedure while it is running. The
watch option displays the procedure's name and the expression
that the interpreter will evaluate next, one line at a time. It
waits for you to press the Enter key before it executes that
line. This feature allows you to interact with the interpreter
or edito during the execution of a procedure.
wildcard character
Question mark ("?") character that gives Dr. Logo a pattern to
match when searching in a disk directory for a file name. A ?
placed in a file name creates an ambiguous file name. See
ambiguous file name.
window
Visual portion of the screen. See graphic window and text
window.
word
Type of object used as input to a Dr. Logo procedure. A group of
one or more consecutive characters separated from other
characters on the line by a delimiter.
working storage
See random access memory.
workspace
Dr. Logo's temporary storage area for information, such as your
procedures, variables, and property lists.
EOF
DRLRME.WS4 (= "Dr. Logo Reference Manual", Appendix E)
----------
(Retyped by Emmanuel ROCHE.)
Appendix E: Getting Started
---------------------------
This section quickly leads you through a complete session with
Dr. Logo. It shows how to start up and shut off Dr. Logo, how to
initialize a disk, define a Dr. Logo procedure, save and load
files, specify the default drive, and back up your data disk and
files.
The beginning of this book explain why you must enter quotation
marks and other punctuation; to keep this introduction brief,
the explanations are not repeated here. To complete this
session, simply type each of the examples exactly as it is
shown, and then press the Enter key ("<--+"). If you make a
typing error, use the backspace key ("<--") to correct it, or
retype the line. Do not worry about mistakes; you can't hurt Dr.
Logo or your computer with typing errors.
If, while reading this section, you find a computer-related term
you do not understand, you can find its definition in Appendix
D, the glossary.
E.1 Starting up Dr. Logo
------------------------
Your computer automatically loads Dr. Logo into memory when you
turn on your computer. You can start up Dr. Logo in one of two
ways, depending on whether your computer is powered OFF or ON.
If the power is OFF
-------------------
1. Open the door of drive A: by lifting the load latch
outwards.
2. Insert the Dr. Logo system disk with the label face up
and the disk jacket seams underneath. Hold the label in your
hand as you slide the disk into the slot. See Figure E-1.
Figure E-1. Inserting a disk (not shown)
3. Close the disk drive door by pulling the load latch
down.
4. Turn ON the printer, if you have one, the color monitor
and monochrome monitor if you have one, and finally the computer
system unit. (If you have just powered off, but want to use your
computer again, you must count slowly to five before you power
ON.)
If the power is ON
------------------
1. Insert the Dr. Logo system disk into drive A: and close
the door.
2. Hold down the Ctrl and Alt keys, and press the Del key.
Then, release all three keys. This sequence is called system
reset. See Figure E-2.
Figure E-2. System keyboard (not shown)
In either start sequence, wait a moment while the system does
some self-testing. Watch for the red light on drive A: to flash,
and listen for the drive to read Dr. Logo from the system disk
into your computer's memory. While Dr. Logo is being loaded, it
displays the following message on your monitor:
+---------------------------------------+
| Welcome to Dr. Logo, Version V.V |
| Copyright (C) 1983, Digital Research |
| Pacific Grove, California |
| |
| Please Wait |
| |
| |
| |
| |
+---------------------------------------+
Figure E-3. Dr. Logo banner
The version number, represented above by V.V, tells you the
major and minor revision level of the Dr. Logo version that you
own. After this greeting disappears, a question mark ("?")
prompt and the flashing underline ("_") display on your text
screen. The question mark tells you that Dr. Logo is waiting for
you to type something at your keyboard. The underline tells you
where the next character you type will appear.
Once in memory, Dr. Logo allocates a part of memory for your
workspace. When you start Dr. Logo, the workspace is empty,
ready for you to type in new procedures or load previously saved
procedures from a disk.
E.2 Defining Dr. Logo procedures
--------------------------------
A procedure is a list of instructions that tells Dr. Logo how to
do a task. Dr. Logo performs the task when you enter the
procedure's name. The list of instructions is the definition of
the procedure. You use primitives and previously-defined
procedures to define a new procedure. For example, here is how
to enter a procedure that makes Dr. Logo draw a square on the
graphic screen with the turtle. Type the following:
?to square
>repeat 4 [forward 60 right 90]
>end
square defined
?
When you type the statement "to square", Dr. Logo responded with
a > prompt on the next line. The special word "to" signals to
Dr. Logo that you are starting to define a new procedure. The
greater-than sign (">") indicates that Dr. Logo is remembering
your instructions as a procedure definition.
After you define the procedure, you can make Dr. Logo perform
the new task by typing the procedure name at Dr. Logo's ? prompt
and pressing the Enter key. For example, type
?square
?
cs stands for clearscreen, and erases the square from the
screen. You can teach Dr. Logo to draw a triangle as follows:
?cs
?to triangle
>right 45 forward 35
>right 90 forward 35
>left 225 forward 50
>end
triangle defined
?triangle
?
Now, you can use the triangle and the square procedures in the
definition of another procedure. For example,
?cs
?to draw.house
>square
>forward 50
>triangle
>end
draw.house defined
?draw.house
?
You can look at the names of the procedures you have defined by
asking Dr. Logo to print out titles, pots in short:
?pots
to square
to triangle
to draw.house
?
When you turn off your computer, everything in your workspace
disappears. If you were to turn off your computer now, these
procedures would be lost. To be able to use them later, you must
save them on a disk.
But, before you try to save your procedures, remember that your
Dr. Logo system disk is write-protected. That means you can only
read Dr. Logo from it, and cannot save procedures on it. You can
take your Dr. Logo system disk out of the A: drive as soon as
Dr. Logo is loaded. Store your system disk in a safe place, away
from heat and magnetic devices such as telephones and vacuum
cleaners.
Before you can save procedures, you must create a data disk, a
disk that can store procedures in files, and insert it in a
drive. A disk fresh from the box is not ready to store files;
you must initialize (format) a new disk before you can read or
write any data on it.
E.3 Initializing a disk
-----------------------
You must always initialize a disk that is fresh from the box. If
you have an old disk that you want to reuse, you can initialize
the disk to remove all the old data on the disk and reformat it,
as if it were new.
Before you begin
----------------
1. Make sure that the read/write notch is cut out of the
upper left edge of the disk jacket.
2. Check to see if you have single- or double-sided disk
drives. If you have single-sided disk drives, you must
initialize your disks to single-sided format. A double-sided
drive can handle either single- or double-sided disks.
You will need to initialize two new disks, one to be your data
disk and the other to be your back-up disk.
If you have a one-drive system
------------------------------
1. If you have not already done so, remove your Dr. Logo
system disk, and store it in a safe place, away from heat and
magnetic devices, such as telephones and vacuum cleaners. Insert
the disk to be formatted in drive A: and close the door.
2. If you have a single-sided drive, you must initialize
the disk to single-sided. Type
?initd "a: 1
Dr. Logo displays the following prompt:
I will erase the diskette in drive A
and will make it single-sided.
Is this what you want (y/n)?
If you have a double-sided drive, you can initialize the
disk to double-sided. Type
?initd "a: 2
Dr. Logo displays the following prompt:
I will erase the diskette in drive A
and will make it double-sided.
Is this what you want (y/n)?
3. Type y (yes) to format the disk. Type n (no) if you have
not removed the Dr. Logo system disk or, for some other reason,
wish to return to Dr. Logo's ? prompt. After you type y, watch
for the drive's red light to flash, and listen as Dr. Logo
formats the disk. When the formatting is complete, Dr. Logo's ?
reappears.
4. Format a second disk, repeating steps 1 through 3, for a
back-up disk.
If you have a two-drive system
------------------------------
1. You can leave your Dr. Logo system disk in drive A:.
Insert the disk to be formatted in drive B: and close the door.
2. If you have single-sided drives, you must initialize the
disk to single-sided. Type
?initd "b: 1
Dr. Logo displays the following prompt:
I will erase the diskette in drive B
and will make it single-sided.
Is this what you want (y/n)?
If you have double-sided drives, you can initialize the
disk to double-sided. Type
?initd "b: 2
Dr. Logo displays the following prompt:
I will erase the diskette in drive B
and will make it double-sided.
Is this what you want (y/n)?
3. Type y (yes) to format the disk. Type n (no) if you wish
to return to Dr. Logo's ? prompt. After you type y, watch for
the B: drive's red light to flash, and listen as Dr. Logo
formats the disk. When the formatting is complete, Dr. Logo's ?
reappears.
4. Format a second disk, repeating steps 1 through 3, for a
back-up disk.
E.4 Saving Dr. Logo files
-------------------------
Saving a file means copying the contents of your workspace to
permanent storage on the disk.
1. If you have a single drive system with a data disk in
drive A:, type the following command to save the contents of the
workspace in a disk file.
?save "home
If you have a two-drive system with a data disk in drive
B:, type
?save "b:home
You have now made a copy of your three procedures
square, triangle, and draw.house in a file named "home" on the
disk in either drive A: or drive B:. Your procedures are still
in Dr. Logo's workspace, as you can see with a pots command.
?pots
to square
to triangle
to draw.house
?
2. To verify that Dr. Logo has saved your procedures, ask
it to show you the names of Dr. Logo files on the disk.
?getfs
[HOME]
Or, if you saved the file on drive B:, type
?getfs "b:
[HOME]
3. Now that you have saved your procedures, you can erase
them from your workspace with confidence they can be restored.
Type
?erall
Now, to verify that the workspace has been erased, ask
Dr. Logo to print out the titles of procedures in the workspace
by typing
?pots
?
Dr. Logo displays only the ? prompt, because nothing is
in the workspace.
E.5 Loading Dr. Logo files
--------------------------
To load a file means to move the procedures or other information
from permanent storage on the disk into the Dr. Logo workspace.
To load a file, you must have saved it on the disk, and be able
to see its name with a getfs command.
1. To load the file you just saved, type
?load "home
Or, if you saved the file on drive B:, type
?load "b:home
Listen ad Dr. Logo moves the procedures in the file from
the disk into the workspace, and displays the following list on
your screen:
square defined
triangle defined
draw.house defined
2. Verify that the procedures are in your workspace by
executing them, or by using pots to print out their titles.
?draw.house
?pots
to square
to triangle
to draw.house
?
E.6 Specifying the default drive
--------------------------------
When you do not specify a drive in a disk command like save,
load, or getfs, Dr. Logo automatically looks for files, or
writes files, on the disk in the default drive. When you start
Dr. Logo, A: is the default drive. If you have a one-drive
system, you only have drive A:, and do not need to specify a
drive name in any of your commands. If you have two drives and
leave your system disk in drive A:, enter the following commands
to change yor default drive to B:.
1. Determine which drive is the default drive by typing
?defaultd
A:
2. Change the default drive to drive B: by typing
?setd "b:
?defaultd
B:
3. To verify that Dr. Logo now looks on drive B: for files,
type
?getfs
[HOME]
E.7 Backing up a disk
---------------------
To back up a disk means to make a duplicate copy of its
contents. Professional programmers avoid losing programs by
making copies of valuable disks and files. If your working copy
is accidentally damaged or erased, you can restore it from the
back-up copy.
The frequency of making copies varies with each programmer, but
as a general rule make a copy when it would take 10 to 20 times
longer to re-enter the information than to make the copy.
To make a back-up disk, you need an initialized or formatted
disk on which to write. Make sure your data disk and your back-
up disk are the same format: double-sided or single-sided.
If you have a one-drive system
------------------------------
1. Start with the data disk that you plan to copy in the
drive. This is your source disk.
2. To start the copying process, type
?copyd "a: "a:
Figure E-4. System unit with one drive (not shown)
If you have a two-drive system
------------------------------
1. Insert the back-up disk into drive B: and the data disk
into drive A:.
2. To make an exact, track-to-track copy of the disk in
drive A: onto the disk in drive B:, type
?copyd "b: "a:
Dr. Logo displays the following message before it begins
to copy:
I will copy from the diskette in drive A
to the diskette in drive B, erasing any
existing data on the diskette in drive B.
Is this what you want (y/n)?
3. Type y (yes) to copy the data disk onto the back-up
disk. Type n (no) to return to Dr. Logo's ? prompt without
making the copy. If you type y, watch for the red lights to
flash back and forth from drive A: to drive B:, and listen as
the data is transferred from one disk to the other.
Figure E-5. System with two drives (not shown)
E.8 Copying a file
------------------
Another way to back up a file is to make a copy of just that
file, without making a copy of the entire disk.
If you have a one-drive system
------------------------------
1. Start with the data disk containing the original file in
the drive. This is called your source disk.
2. To copy the file, type
?copyf "home "home
3. After Dr. Logo displays a message, remove the source
data disk, and insert your back-up data disk into the drive.
If you have a two-drive system
------------------------------
1. To copy a file from the data disk in drive A: to the
back-up disk in drive B:, type
?copyf "b:home "a:home
2. Verify that the file has been copied with a getfs
command.
?getfs "b:
[HOME]
E.9 Shutting off Dr. Logo
-------------------------
Before you turn off the power to your computer, be sure to check
that you have performed the following steps:
1. Save the contents of your workspace on disk, so that you
can load it later.
2. Make back-up copies of your files on a back-up disk.
3. Take your disks out of the drives. NEVER turn off your
system with the disk engaged in the drive; this can permanently
damage your disk.
4. Turn the power switches on your monitor, printer, and
system unit to OFF.
EOF