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 >
Text File  |  2009-12-11  |  56KB  |  1,848 lines

  1. DRLRMA.WS4      (= "Dr. Logo Reference Manual", Appendix A)
  2. ----------
  3.  
  4. (Retyped by Emmanuel ROCHE. Posted to comp.os.cpm.amethyst by
  5. Roche on 08 Apr 2005.)
  6.  
  7. ROCHE> The DRLRM6.WS4 file, when printed on A4 (12") paper
  8. is 175 pages long... So, since some persons complain about long
  9. messages, I sent it, instead, to the comp.os.cpm.amethyst
  10. Newsgroup, that nobody read anymore. With this publication,
  11. the full "Dr. Logo Reference Manual" is now available. I hope
  12. that this will encourage CP/M fans to publish interesting
  13. Dr. Logo programs for CP/M-86 (Plus)... (Amstrad 8-bit and
  14. Atari 520ST fans will also be interested in this documentation.)
  15.  
  16. Appendix A: Dr. Logo error messages
  17. -----------------------------------
  18.  
  19. Table A-1. Dr. Logo error messages
  20.  
  21. Number  Message
  22. ------  -------
  23.    2    Number too big
  24.    6    (symbol) is a primitive
  25.    7    Can't find lable (symbol)
  26.    8    Can't (symbol) from the editor
  27.    9    (symbol) is undefined
  28.   11    I'm having trouble with the disk
  29.   12    Disk full
  30.   13    Can't divide by zero
  31.   15    File already exists
  32.   17    File not found
  33.   21    Can't find catch for (symbol)
  34.   23    Out of space
  35.   25    (symbol) is not true or false
  36.   29    Not enough inputs to (procedure)
  37.   30    Too many inputs to (procedure)
  38.   32    Too few items in (list)
  39.   34    Turtle out of bonds
  40.   35    I don't know how to (symbol)
  41.   36    (symbol) has no value
  42.   37    ) without (
  43.   38    I don't know what to do with (symbol)
  44.   40    Disk is write protected
  45.   41    (procedure) doesn't like (symbol) as input
  46.   42    (procedure) didn't output
  47.   43    I don't know how to do that yet
  48.   44    !! Dr. Logo system bug !!
  49.         (Should not occur. Please write to Digital Research if it does.)
  50.   45    The word is too long
  51.   46    I don't have enough buffer space
  52.   47    If wants [ ]'s around instruction list
  53.   48    (varies according to disk error)
  54.   49    (symbol) isn't a parameter
  55.   50    I can't (symbol) while loading
  56.   51    The file is write protected
  57.   52    I can't find the disk drive
  58.  
  59.  
  60. EOF
  61.  
  62.  
  63. DRLRMB.WS4      (= "Dr. Logo Reference Manual", Appendix B)
  64. ----------
  65.  
  66. (Retyped by Emmanuel ROCHE.)
  67.  
  68.  
  69. Appendix B: Dr. Logo control and escape character commands
  70. ----------------------------------------------------------
  71.  
  72. Table B-1. Dr. Logo control and escape character commands
  73.  
  74. Format: Character
  75.         Effect
  76.  
  77. (* indicates the character is valid within screen editor only.)
  78.  
  79. Ctrl-A
  80. Moves the cursor to the beginning of the line.
  81.  
  82. Ctrl-B
  83. Moves the cursor [B]ack one character; that is to say, it  moves
  84. the cursor one position to the left.
  85.  
  86. Ctrl-C *
  87. Exits  the  screen  editor; updates Dr.  Logo's  workspace  with
  88. definitions  of  all procedures and variables  from  the  screen
  89. editor's buffer.
  90.  
  91. Ctrl-D
  92. [D]eletes the character indicated by the cursor.
  93.  
  94. Ctrl-E
  95. Moves the cursor to the [E]nd of the line.
  96.  
  97. Ctrl-F
  98. Moves  the  cursor [F]orward one character; that is to  say,  it
  99. moves the cursor one position to the right.
  100.  
  101. Ctrl-G
  102. Outside  the  screen  editor,  it  immediately  terminates   the
  103. currently  executing  procedure. Inside the  screen  editor,  it
  104. exits  the screen editor without updating Dr. Logo's  workspace,
  105. discarding any changes made during the screen editing session.
  106.  
  107. Ctrl-H
  108. Deletes the character to the left of the cursor.
  109.  
  110. Ctrl-I
  111. [I]nserts a tab (three spaces).
  112.  
  113. Ctrl-J
  114. (No effect.)
  115.  
  116. Ctrl-K
  117. [K]ills  the  remaining  line; that is to say,  it  deletes  all
  118. characters  right of the cursor to the end of the line.  Deleted
  119. characters are stored in buffer.
  120.  
  121. Ctrl-L
  122. Outside screen editor, displays a full graphic screen,  devoting
  123. the monitor to graphics. Inside screen editor, it readjusts  the
  124. display  so that the line currently indicated by the  cursor  is
  125. positioned  at the center of the screen. If the cursor  is  less
  126. than  12  lines  from the beginning of the  buffer,  the  screen
  127. editor simply beeps when Ctrl-L is pressed.
  128.  
  129. Ctrl-M
  130. Generates a Carriage Return.
  131.  
  132. Ctrl-N
  133. Moves  the cursor to the [N]ext line; in the screen editor,  the
  134. cursor moves down one line towards the end of the buffer.
  135.  
  136. Ctrl-O
  137. [O]pens  a new line. In the screen editor, it is  equivalent  to
  138. pressing Enter followed by Ctrl-B.
  139.  
  140. Ctrl-P
  141. Moves the cursor to the [P]revious line; the cursor moves up one
  142. line towards the beginning of the buffer.
  143.  
  144. Ctrl-Q
  145. Generates  the  [Q]uoting character ("\") that  makes  Dr.  Logo
  146. treat  a delimiter character as a literal  character.  Delimiter
  147. characters are [ ] ( ) " : ; = < > + / ^
  148.  
  149. Ctrl-R
  150. (No effect.)
  151.  
  152. Ctrl-S
  153. Displays  a  [S]plitscreen; opens a text window on  the  graphic
  154. screen.
  155.  
  156. Ctrl-T
  157. Displays a full [T]ext screen, devoting the monitor to text.
  158.  
  159. Ctrl-U
  160. (No effect.)
  161.  
  162. Ctrl-V *
  163. Displays  the  next screen full of text in the  screen  editor's
  164. buffer, the next 24 lines towards the bottom of the buffer.
  165.  
  166. Ctrl-W
  167. Interrupts  the scrolling of a text display; [W]aits  until  the
  168. next keystroke to continue scrolling the display.
  169.  
  170. Ctrl-X
  171. (No effect.)
  172.  
  173. Ctrl-Y
  174. [Y]anks text from the buffer; that is to say, it redisplays  the
  175. line most recently stored in the buffer by an Enter or a  Ctrl-K
  176. keystroke.
  177.  
  178. Ctrl-Z
  179. Interrupts  the currently executing procedure; displays a  pause
  180. prompt  to allow interactive debugging. Enter "co"  to  continue
  181. the execution of the interrupted procedure.
  182.  
  183. ESC-V *
  184. Displays the previous screen full of text in the screen editor's
  185. buffer,  the  previous  24 lines towards the  beginning  of  the
  186. buffer.
  187.  
  188. ESC-< *
  189. Positions  the  cursor at the beginning of the  screen  editor's
  190. buffer.
  191.  
  192. ESC-> *
  193. Positions the cursor at the end of the screen editor's buffer.
  194.  
  195.  
  196. EOF
  197.  
  198.  
  199. DRLRMC.WS4      (= "Dr. Logo Reference Manual", Appendix C)
  200. ----------
  201.  
  202. (Retyped by Emmanuel ROCHE.)
  203.  
  204.  
  205. Appendix C: Functional command list
  206. -----------------------------------
  207.  
  208. Word and list processing
  209. ------------------------
  210.  
  211. ascii word
  212. butfirst, bf object
  213. butlast, bl object
  214. char n
  215. count object
  216. emptyp object
  217. equalp object object
  218. first object
  219. fput object object
  220. item n object
  221. last object
  222. list object object (...)
  223. listp object
  224. lowercase, lc word
  225. lput object object
  226. memberp object object
  227. numberp object
  228. piece n object
  229. proclist
  230. quote object
  231. sentence, se object object (...)
  232. shuffle list
  233. uppercase, uc word
  234. where
  235. word word word (...)
  236. wordp object
  237.  
  238.  
  239. Arithmetic operations
  240. ---------------------
  241.  
  242. abs n
  243. arctan n
  244. cos degrees_n
  245. degrees radians_n
  246. exp n
  247. int n
  248. log n
  249. log10 n
  250. pi
  251. product n n (...)
  252. quotient n n
  253. radians degrees_n
  254. random n
  255. remainder n n
  256. rerandom
  257. round n
  258. sin degrees_n
  259. sqrt n
  260. sum n n (...)
  261. tan degrees_n
  262. + a b
  263. - a b
  264. * a b
  265. / a b
  266. ^ a b
  267.  
  268.  
  269. Logical operations
  270. ------------------
  271.  
  272. and pred_exp pred_exp (...)
  273. not pred_exp
  274. or pred_exp pred_exp (...)
  275. = a b
  276. < a b
  277. > a b
  278.  
  279.  
  280. Variables
  281. ---------
  282.  
  283. local varname (...)
  284. make varname object
  285. name object varname
  286. namep word
  287. thing varname
  288.  
  289.  
  290. Defining procedures
  291. -------------------
  292.  
  293. copydef new_procname old_procname
  294. defined procname defin_list
  295. definedp object
  296. end
  297. primitivep object
  298. text procname
  299. to procname <inputs>
  300.  
  301.  
  302. Editing
  303. -------
  304.  
  305. edall <pkgname | pkgname_list>
  306. edit, ed <name | name_list>
  307. edns <pkgname | pkgname_list>
  308. edps <pkgname | pkgname_list>
  309.  
  310.  
  311. Text screen
  312. -----------
  313.  
  314. cleartext, ct
  315. cursor
  316. print, pr object (...)
  317. setcursor coord_list
  318. show object
  319. textbg n
  320. textfg n
  321. textscreen
  322. twoscreen
  323. type object (...)
  324.  
  325.  
  326. Graphic screen
  327. --------------
  328.  
  329. background, bg
  330. clean
  331. clearscreen, cs
  332. dot coord_list
  333. fence
  334. fullscreen
  335. pen
  336. pencolor, pc
  337. pendown, pd
  338. penerase, pe
  339. penreverse, px
  340. penup, pu
  341. setbg n
  342. setpc n
  343. setpen list
  344. setsplit n
  345. splitscreen
  346. turtletext, tt object (...)
  347. window
  348. wrap
  349.  
  350.  
  351. Graphic movement
  352. ----------------
  353.  
  354. back, bk distance_n
  355. forward, fd distance_n
  356. heading
  357. hideturtle, ht
  358. home
  359. left, lt degrees_n
  360. pos
  361. right, rt degrees_n
  362. setheading, seth degrees_n
  363. setpos coord_list
  364. setx n
  365. sety n
  366. shownp
  367. showturtle, st
  368. towards coord_list
  369. xcor
  370. ycor
  371.  
  372.  
  373. Workspace management
  374. --------------------
  375.  
  376. bury pkgname | pkgname_list
  377. erall <pkgname | pkgname_list>
  378. erase procname | procname_list
  379. ern varname | varname_list
  380. erns <pkgname | pkgname_list>
  381. erps <pkgname | pkgname_list>
  382. follow procname procname
  383. nodes
  384. noformat
  385. noprim
  386. package pkgname name | name_list
  387. pkgall pkgname
  388. po procname | procname_list
  389. poall <pkgname | pkgname_list>
  390. pons <pkgname | pkgname_list>
  391. popkg
  392. poprim
  393. pops <pkgname | pkgname_list>
  394. potl
  395. pots <pkgname | pkgname_list>
  396. recycle
  397. unbury pkgname
  398.  
  399.  
  400. Property lists
  401. --------------
  402.  
  403. glist prop <pkgname | pkgname_list>
  404. gprop name prop
  405. plist name
  406. pprop name prop object
  407. pps <pkgname | pkgname_list>
  408. remprop name prop
  409.  
  410.  
  411. Disks
  412. -----
  413.  
  414. copyd dest_d: source_d:
  415. defaultd
  416. initd d: n
  417. resetd <d:>
  418. setd d:
  419. spaced <d:>
  420.  
  421.  
  422. Files
  423. -----
  424.  
  425. changef new_fname old_fname
  426. copyf dest_fname source_fname
  427. erf fname
  428. getfs <d:>
  429. load fname
  430. save fname <pkgname | pkgname_list>
  431.  
  432.  
  433. Keyboard
  434. --------
  435.  
  436. fkey n instr_word
  437. keyp
  438. readchar, rc
  439. readlist, rl
  440. readquote, rq
  441.  
  442.  
  443. Printer
  444. -------
  445.  
  446. copyoff
  447. copyon
  448. printscreen
  449.  
  450.  
  451. Sound, lightpen and joystick
  452. ----------------------------
  453.  
  454. tones note_list
  455. lpen
  456. lpenp
  457. buttonp paddle_n
  458. paddle n
  459.  
  460.  
  461. Conditionals and flow of control
  462. --------------------------------
  463.  
  464. bye
  465. co <object>
  466. go word
  467. if pred_exp instr_list <instr_list>
  468. iffalse, iff instr_list
  469. iftrue, ift instr_list
  470. label word
  471. output, op object
  472. repeat n instr_list
  473. run instr_list
  474. stop
  475. test pred_exp
  476. wait n
  477.  
  478.  
  479. Error handling and debugging
  480. ----------------------------
  481.  
  482. catch name instr_list
  483. debug
  484. error
  485. nodebug
  486. notrace <procname | procname_list>
  487. nowatch <procname | procname_list>
  488. pause
  489. throw name
  490. trace <procname | procname_list>
  491. watch <procname | procname_list>
  492.  
  493.  
  494. EOF
  495.  
  496.  
  497. DRLRMD.WS4      (= "Dr. Logo Reference Manual", Appendix D)
  498. ----------
  499.  
  500. (Retyped by Emmanuel ROCHE.)
  501.  
  502.  
  503. Appendix D: Glossary
  504. --------------------
  505.  
  506. address
  507. Location in memory.
  508.  
  509. ambiguous file name
  510. File  name  containing a wildcard character. In  Dr.  Logo,  the
  511. wildcard  character is a question mark ("?"). An ambiguous  file
  512. name is used to access one or more files. For example, getfs "z?
  513. displays  all file names that begin with the letter z.  You  can
  514. put  the  ?  after  any number of  characters  or  as  the  only
  515. character, but the ? must be the last character in a file  name.
  516. A  file  name  cannot contain more than  eight  characters.  See
  517. wildcard character.
  518.  
  519. artificial intelligence
  520. Imitation  of human-like information processing performed  by  a
  521. computer.
  522.  
  523. ASCII
  524. Acronym for American Standard Code for Information  Interchange.
  525. ASCII is a standard code for the computer representation of  the
  526. numbers, letters, and symbols that appear on most keyboards.
  527.  
  528. assembly language
  529. Human readable form of machine language. See machine language.
  530.  
  531. backup or back-up
  532. Duplicate copy of data to be used in case the original is  lost,
  533. destroyed, or accidentally altered. The process of duplicating a
  534. disk or file.
  535.  
  536. BASIC
  537. Programming  language  that  is widely  used  in  microcomputers
  538. because of its English-like structure and ease of use. BASIC  is
  539. an acronym for Beginner's All-purpose Symbolic Instruction Code.
  540.  
  541. bit
  542. Fundamental  unit  of information that a  computer  understands.
  543. Abbreviated from Binary digIT. A bit can have one of two values,
  544. 0 or 1, meaning off or on, respectively. See byte.
  545.  
  546. boot
  547. Act of starting up a computer system.
  548.  
  549. buffer
  550. Area  of memory that temporarily stores information  during  the
  551. transfer of information.
  552.  
  553. bug
  554. Error in a procedure that prevents the procedure from  executing
  555. as expected.
  556.  
  557. byte
  558. Unit of memory or disk storage that usually contains eight bits.
  559. In ASCII code, each character is represented by one byte.
  560.  
  561. cathode ray tube, CRT
  562. Picture tube that shows information being entered or output from
  563. the  computer;  functionally similar to those used  in  standard
  564. televisions.  Commonly abbreviated CRT; also referred to as  the
  565. monitor.
  566.  
  567. cell
  568. See character cell.
  569.  
  570. central processing unit, CPU
  571. Brain  of  the  computer, commonly  abbreviated  CPU.  Your  IBM
  572. Personal  Computer  contains an Intel 8088  CPU,  an  integrated
  573. circuit that contains an arithmetic/logic unit that controls and
  574. manipulates the flow of information and its storage in memory.
  575.  
  576. character
  577. Single  letter,  number, symbol, space, or punctuation  mark.  A
  578. character  is  usually  stored in one  byte  of  the  computer's
  579. memory, or on disk.
  580.  
  581. character cell
  582. Unit of space on the monitor that can hold one character. A cell
  583. is  located at the intersection of each horizontal row and  each
  584. vertical  column. There are 1,000 character cells on  a  graphic
  585. display,  and 2,000 character cells on a text display. Dr.  Logo
  586. lets  you control the background color and foreground  color  of
  587. each character cell on the graphic and text display.
  588.  
  589. code
  590. Sequence  of expressions written in a programming language  that
  591. instructs the computer to perform a task.
  592.  
  593. color monitor
  594. Output  device that allows you to see the visual field  of  both
  595. the graphic screen and the text screen.
  596.  
  597. command
  598. Instruction that makes Dr. Logo initiate an action.
  599.  
  600. comments
  601. Remarks  or  explanatory  notes  set off  from  the  rest  of  a
  602. procedure's definition by a semicolon (";").
  603.  
  604. compiler
  605. Language  translator  that interprets the text of  a  high-level
  606. language,  like  BASIC, into machine language code (1s  and  0s)
  607. understandable to the computer.
  608.  
  609. concatenation
  610. Joining  of  two  or  more objects together,  end  to  end.  For
  611. example,  the  primitive word outputs a single word made  up  of
  612. multiple inputs, as in word "sun "shine outputs "sunshine".
  613.  
  614. constant
  615. Object, word, number, or list with a value that does not  change
  616. when a procedure runs.
  617.  
  618. control character
  619. Non-printing  character combination that sends a simple  command
  620. to Dr. Logo. To enter a control character, hold down the control
  621. (Ctrl) key, and press the specified character key.
  622.  
  623. CP/M
  624. Operating  system  controlling the operation of Dr.  Logo.  CP/M
  625. stands for Control Program for Microcomputers.
  626.  
  627. CPU
  628. See Central Processing Unit.
  629.  
  630. crash
  631. Severe  hardware  or  software malfunction. A  head  crash,  for
  632. example, generally causes an irretrievable loss of the data on a
  633. disk.
  634.  
  635. CRT
  636. See Cathode Ray Tube.
  637.  
  638. cursor
  639. Blinking  underline  symbol  on the  text  display.  The  cursor
  640. designates the position where the next keystroke at the keybaord
  641. has  an effect. As you type, the cursor automatically  advances.
  642. You  can  also move the position of the cursor with  the  cursor
  643. control  keys located on the numeric key pad, the tab  key  ("--
  644. >|"), and the backspace key ("<--"). On the graphic display, the
  645. turtle designates the point of action.
  646.  
  647. data
  648. Information that is created, changed, or stored by the computer.
  649.  
  650. debug
  651. Process of locating and correcting errors in a procedure.
  652.  
  653. default
  654. Value  supplied in the absence of user input. For example,  when
  655. you  start your computer system, drive A: is the default  drive.
  656. Dr.  Logo  looks  for files on the disk in  the  default  drive,
  657. unless you specify another drive.
  658.  
  659. delimiter
  660. Blank  space  or  any of these special characters  used  to  set
  661. another character, word, or number off from the next: [ ] ( )  ;
  662. < > + - * / ^.
  663.  
  664. directory
  665. List  of  the contents of the disk. Use the getfs  primitive  to
  666. display a list of all the Dr. Logo file names on a data disk.
  667.  
  668. disk
  669. Magnetic  media  used  to store  information.  Sometimes  called
  670. diskette. Programs and information are stored and retrieved like
  671. music  on a record. The term diskette usually refers  to  floppy
  672. disks 5 1/4 or 8 inches in diameter. The term disk can refer  to
  673. a diskette, a removable cartridge disk, or a fixed hard disk.
  674.  
  675. disk drive
  676. Peripheral  device  that  stores and  retrieves  information  on
  677. disks.
  678.  
  679. display
  680. Visual field of a screen, or to show the contents of the  screen
  681. on the monitor.
  682.  
  683. double sided
  684. Disk format that stores information on both sides; a disk  drive
  685. that can read and write on both sides of a double-sided disk.
  686.  
  687. Dr. Logo
  688. Digital Research's version of Logo, a programming language  with
  689. extensions  that  make it suitable for commercial  and  academic
  690. applications.
  691.  
  692. edit
  693. Process of adding, modifying, or deleting text in the definition
  694. of a user-defined procedure.
  695.  
  696. editor
  697. Utility  program  that  allows you to  add,  modify,  or  delete
  698. information from a text screen. See also line editor,  procedure
  699. editor, and screen editor.
  700.  
  701. element
  702. Single piece of an object. For example, a numeral is an  element
  703. of a number, a character is an element of a word, and a word  is
  704. an element of a list.
  705.  
  706. end
  707. Special  word  that indicates the conclusion  of  a  procedure's
  708. definition. The word "end" must stand alone on the last line  of
  709. a procedure.
  710.  
  711. enter
  712. Act  of transmitting information to the computer.  The  computer
  713. does  not  recognize  or process any information  typed  at  the
  714. keyboard  since the last prompt, until you press the  Enter  key
  715. ("<--+").  The  Enter  key on an IBM Personal  Computer  is  the
  716. equivalent  to  a  Carriage  Return  ("RETURN")  on  a  standard
  717. typewriter keyboard.
  718.  
  719. evaluate
  720. Process Dr. Logo goes through to execute an expression.
  721.  
  722. executing a procedure
  723. See running a procedure.
  724.  
  725. expression
  726. In  Dr. Logo, an expresion is a procedure name followed  by  its
  727. inputs.
  728.  
  729. file
  730. Collection of information on a disk.
  731.  
  732. file name
  733. Name  you assign to a file. The file name can consist of  up  to
  734. eight alphabetic or numeric characters. The first character in a
  735. file name must be alphabetic.
  736.  
  737. floating point
  738. Method  Dr. Logo uses internally to express numbers that have  a
  739. decimal point that can shift to the left or right.
  740.  
  741. floppy disk
  742. Flexible magnetic disk used to store information. A floppy  disk
  743. is  a thin piece of mylar, coated with magnetic  particles.  The
  744. disk  drive  causes the floppy disk to rotate inside  its  paper
  745. jacket.  Floppy disks come in two sizes: 5 1/4 and 8  inches  in
  746. diameter.
  747.  
  748. flowchart
  749. Graphic diagram that uses special symbols to indicate the input,
  750. processing, output, and flow of a procedure.
  751.  
  752. function
  753. Operation  or  specific  task  that is  called  into  action  by
  754. referencing  the procedure by name. The result of a function  is
  755. always a single value. See operation.
  756.  
  757. function keys
  758. Ten  multiple-purpose  keys located along the left side  of  the
  759. keyboard, labeled F1 through F10, that you can program to recall
  760. command  lines  of up to 16 characters. Press the Enter  key  to
  761. execute the recalled command line.
  762.  
  763. graphic displays
  764. Visual   representations   that   illustrate,   map,   or   plot
  765. mathematical  curves,  diagrams,  graphs, or  charts.  Dr.  Logo
  766. allows you to draw graphic designs with the turtle.
  767.  
  768. graphic screen
  769. Construct in memory where graphic data is stored that can extend
  770. beyond  the  range of your monitor. You can display  the  visual
  771. field of the graphic screen on a color monitor. Dr. Logo  allows
  772. you  to  draw  graphic designs on the graphic  screen  with  the
  773. turtle.
  774.  
  775. graphic window
  776. Visual  display of the graphic screen on a color  monitor;  that
  777. portion  of  the monitor dedicated to the  graphic  screen.  Dr.
  778. Logo's  splitscreen primitive allows you to have both  text  and
  779. graphic windows on the same color monitor.
  780.  
  781. hardware
  782. Physical   components  of  a  computer,  such  as  the   central
  783. processing  unit,  random access memory, disk  storage  devices,
  784. monitor, keyboard, printer, lightpen, paddle, or joystick.
  785.  
  786. high-level language
  787. Computer  language  written in procedural form  that  is  easily
  788. comprehensible by humans. Many machine language instructions are
  789. generated  for each high-level expression. Dr. Logo is  a  high-
  790. level language.
  791.  
  792. infix operation
  793. Operations where the primitive name or identifier is  positioned
  794. between its inputs, as in a + b.
  795.  
  796. initialize
  797. Act  of  preparing or formatting a disk, in order  to  read  and
  798. write information on it.
  799.  
  800. input
  801. Object   that  a  procedure  requires  to  complete  its   task;
  802. information  entered into the computer by an operator typing  at
  803. the  terminal  or by a procedure reading from the  disk,  or  to
  804. enter such information.
  805.  
  806. input device
  807. Mechanism  that accepts information from the outside  world  and
  808. converts that information into a form that the computer can use.
  809. A keyboard is an input device.
  810.  
  811. input/output devices
  812. Combination  of input and output devices.  Commonly  abbreviated
  813. I/O devices.
  814.  
  815. integer
  816. Positive or negative whole number with no decimal point.
  817.  
  818. interface
  819. Object  that allows two independent systems to communicate  with
  820. each  other, as an interface between hardware and software in  a
  821. microcomputer.
  822.  
  823. interpreter
  824. Computer program that evaluates each line as it is typed at  the
  825. keyboard, and each line of a procedure every time it is run. Dr.
  826. Logo is an interpreted computer programming language.
  827.  
  828. interpreter prompt
  829. Question  mark ("?") signaing that Dr. Logo is expecting you  to
  830. type something at your keyboard; the interpreter is waiting  for
  831. input.
  832.  
  833. I/O
  834. Abbreviation  for  input/output. This term  commonly  refers  to
  835. combinations of input and output devices.
  836.  
  837. jacket
  838. Stiff paper container that holds a floppy disk.
  839.  
  840. joystick
  841. See paddle.
  842.  
  843. kilobyte
  844. 1024 bytes, commonly denoted as 1K.
  845.  
  846. language
  847. System  of  words  and  symbols  used  to  write  programs  that
  848. communicate with a computer.
  849.  
  850. level number
  851. Number  enclosed in square brackets ("[" and "]") that  precedes
  852. each  line  displayed  by the trace and  watch  primitives.  The
  853. number indicates the position of the procedure on the stack. See
  854. stack.
  855.  
  856. lightpen
  857. Input  device  that  allows you to interact  with  the  computer
  858. without  the keyboard. The lightpen sends a screen  location  to
  859. the computer when you touch the screen's surface with the tip of
  860. the lightpen.
  861.  
  862. line editor
  863. Dr.  Logo  interpreter's utility that allows you to  modify  the
  864. current  line  of text without erasing and retyping  the  entire
  865. line.  Dr. Logo allows you to use certain control characters  or
  866. function keys to move the cursor left and right over the current
  867. line  of text to make modifications before you press  the  Enter
  868. key.
  869.  
  870. LISP
  871. Programming  language  derived from the words  LISt  Processing.
  872. LISP  dominates artificial intelligence programming  because  of
  873. its  powerful  symbolic and list processing  capabilities.  Logo
  874. evolved from LISP.
  875.  
  876. list
  877. Type  of object used as input to a Dr. Logo procedure. A  series
  878. of  objects (words, numbers, or lists) separated by  spaces  and
  879. enclosed in square brackets ("[" and "]").
  880.  
  881. load
  882. To move procedures or information from permanent storage on  the
  883. disk into the computer's memory buffer or workspace.
  884.  
  885. logical operator
  886. Mathematical symbols representing equals ("="), less-than ("<"),
  887. or  greater-then (">") as well as the primitives  "and",  "not",
  888. and  "or"  that are used in predicate  expressions;  expressions
  889. that evaluate to either TRUE of FALSE.
  890.  
  891. Logo
  892. Name  of  a  programming language derived drom  the  Greek  word
  893. logos,  which  means  word. Logo is  a  computer  language  that
  894. evolved  from LISP and is designed to teach the fundamentals  of
  895. computer programming.
  896.  
  897. machine language
  898. Sequence of instructions to the machine, written in terms of  1s
  899. and 0s, and generally not understandable by humans. See bit.
  900.  
  901. megabyte
  902.  
  903. One million bytes, or 1024K bytes. See kilobyte.
  904.  
  905. memory
  906. That   part  of  a  computer  system  that  temporarily   stores
  907. information.  Also called random access memory (RAM) or  working
  908. storage. Dr. Logo automatically loads into memory when you start
  909. up  your system. Once Dr. Logo is loaded, it allocates  part  of
  910. memory for your workspace.
  911.  
  912. microprocessor
  913. Miniaturized  integrated circuit usually on a silicon chip  that
  914. is the brain of the microcomputer.
  915.  
  916. monitor
  917. Output device that displays the visual field of your graphic  or
  918. text  screen.  A color monitor displays both  graphic  and  text
  919. screens; a monochrome monitor displays only text.
  920.  
  921. monochrome monitor
  922. Output device that displays the text screen.
  923.  
  924. name
  925. Type of object used as input to a Dr. Logo procedure. A  special
  926. word that identifies a procedure, a variable, a package, a file,
  927. or a disk.
  928.  
  929. number
  930. Type  of  object used as input to a Dr. Logo procedure.  In  Dr.
  931. Logo,  a number is a kind of word and can be used as a  variable
  932. name  if it is preceded by a quotation mark, as in "8. A  number
  933. cannot  be  used as the first or only character in  a  procedure
  934. name.  In  arithmetic  operations, you  can  input  negative  or
  935. positive decimals numbers with up to 15 significant digits.
  936.  
  937. numeric constant
  938. Real  or integer quantity that does not change as the  procedure
  939. is run.
  940.  
  941. numeric pad
  942. Separate  set  of keys, arranged like a 10-key  adding  machine,
  943. located  on  the right of the IBM  Personal  COmputer  keyboard.
  944. Provided  because they are useful for entering large amounts  of
  945. numeric  information. Press the NUM LOCK key, located above  the
  946. numeric pad, to make the keys function as cursor control keys.
  947.  
  948. object
  949. Type  of input to a Dr. Logo procedure. A Logo object can  be  a
  950. word,  a  number, a list, or anything that is  not  a  procedure
  951. name. Variables can represent objects.
  952.  
  953. operation
  954. Procedure that outputs an object, or a mathematical process such
  955. as  addition, multiplication, subtraction, or division.  In  Dr.
  956. Logo, an operation is equivalent to a function.
  957.  
  958. operating system
  959. Master program that supervises the execution of other  programs,
  960. and manages the computer system's resources. An operating system
  961. provides   an  orderly  input/output  environment  between   the
  962. computer  and  its peripheral devices. Dr. Logo runs  under  the
  963. CP/M  operating system, which is compatible with many  different
  964. computer systems.
  965.  
  966. optional input
  967. Inputs that are not required. In the primitive expression syntax
  968. descriptions,  optional  inputs are enclosed in  angle  brackets
  969. ("<" and ">").
  970.  
  971. output
  972. Object  returned  to the caller by a procedure;  data  that  the
  973. processor   sends  to  the  console,  printer,  or  disk   after
  974. processing  is  complete. To send information  to  the  console,
  975. printer,  or disk. The computer outputs the requested object  or
  976. data.
  977.  
  978. output device
  979. Mechanism  by which a computer transfers its information to  the
  980. outside world. The printer is an output device.
  981.  
  982. package
  983. Group  of related procedures or variables. Packaging  helps  you
  984. manage  your  workspace. When you organize your  procedures  and
  985. variables into packages, you can display, edit, save, or erase a
  986. whole  group without affecting other procedures or variables  in
  987. the workspace.
  988.  
  989. paddle
  990. Input  device  that  allows you to interact  with  the  computer
  991. without  the keyboard. Common on electronic computer  games  and
  992. also called a joystick. The coordinate scale that the paddle  or
  993. joystick sends to the computer depends on the kind of device you
  994. purchase. Dr. Logo supports up to two paddles or joysticks, each
  995. with two buttons.
  996.  
  997. peripheral device
  998. Mechanisms  that  are external to the CPU.  Terminals  printers,
  999. disk  drives,  paddle (joystick), and  lightpen  are  peripheral
  1000. devices.
  1001.  
  1002. permanent storage
  1003. Location  outside  of the computer's memory where  data  can  be
  1004. stored,  usually  on disk. When you save a file,  you  copy  the
  1005. information from the workspace onto the disk.
  1006.  
  1007. pixel
  1008. Smallest  element  of  a monitor's display;  a  point  within  a
  1009. character cell. Also referred to as a dot. A turtle step, as  in
  1010. the command forward 1, is equivalent to one pixel.
  1011.  
  1012. precedence
  1013. Order in which Dr. Logo processes arithmetic operations.
  1014.  
  1015. predicate expression
  1016. Expression  that contains a logical operator and outputs  either
  1017. TRUE or FALSE. A predicate expression can be a type of input  to
  1018. a Dr. Logo procedure.
  1019.  
  1020. prefix operation
  1021. Operations  where the primitive name or identifier precedes  the
  1022. inputs, as in - a b, or print [Hi there!].
  1023.  
  1024. primitives
  1025. Procedures,  operations, or commands that make up Dr. Logo;  the
  1026. built-in procedures.
  1027.  
  1028. printer
  1029. Peripheral device used to put computer information on paper.
  1030.  
  1031. printout
  1032. Printed material or listing produced by the printer.
  1033.  
  1034. procedure
  1035. A  series  of expressions that tell Dr. Logo how  to  perform  a
  1036. task.
  1037.  
  1038. procedure editor
  1039. Dr. Logo interpreter's utility that allows you to teach Dr. Logo
  1040. a  new  task,  that is to say, to define a  new  procedure.  The
  1041. procedure editor is identified by the greater-than sign (">"), a
  1042. prompt  that  appears  when  you enter  the  word  "to"  at  the
  1043. interpreter's question mark prompt ("?"). All the line  editor's
  1044. control character commands function within the procedure editor.
  1045.  
  1046. procedure editor prompt
  1047. Greater-than sign (">") that tells you Dr. Logo is expecting you
  1048. to  enter  a  procedure  definition  line.  Dr.  Logo  does  not
  1049. immediately evaluate the expressions typed at the > prompt.
  1050.  
  1051. program
  1052. Complete  set of instructions designed to tell the  computer  to
  1053. perform a specific task. To define a Dr. Logo procedure.
  1054.  
  1055. prompt
  1056. Cue  displayed on the monitor telling the user that Dr. Logo  is
  1057. expecting  input. A prompt can be a symbol, such as ?, >, or  !.
  1058. Or  a  prompt can be a message, such as "Is this what  you  want
  1059. (y/n)?".  All  prompts  expect a response  from  the  user.  For
  1060. example,  when  you see the ! prompt, you are extremely  low  on
  1061. free  nodes in your workspace. Your response should be to  enter
  1062. the  primitive  "recycle"  to call the  garbage  collector.  See
  1063. interpreter prompt and procedure editor prompt.
  1064.  
  1065. property
  1066. Quality or attribute of an object, procedure, or package.
  1067.  
  1068. property list
  1069. List   of  property  pairs  that  represent  the  qualities   or
  1070. attributes connected with an object, procedure, or package.  Use
  1071. the  pprop  primitive  to  assign  both  the  Dr.  Logo   system
  1072. properties  and  your own non-system properties. Use  the  plist
  1073. primitive to display a property list.
  1074.  
  1075. property name
  1076. First  member  of a property pair; the  label  representing  the
  1077. quality  or attribute of an object, procedure, or  package.  For
  1078. example,  the  .BUR property name in a package  name's  property
  1079. list signifies that the package is buried.
  1080.  
  1081. property pair
  1082. Two parts of a property. The first element of a property pair is
  1083. the property name; the second element is its value. For example,
  1084. in a procedure's property list is a property pair consisting  of
  1085. the  property  name  .DEF  and the  value  of .DEF,  the  actual
  1086. definition of the procedure.
  1087.  
  1088. property value
  1089. Second member of a property pair; the qualities of or attributes
  1090. connected  with an object, procedure, or package.  For  example,
  1091. the  information  following a .PAK property name in  a  property
  1092. list  is  the property value, the name of the package  to  which
  1093. this object belongs.
  1094.  
  1095. RAM
  1096. See random access memory.
  1097.  
  1098. random access
  1099. Process of reading or writing informaion in memory or on a  disk
  1100. in any order.
  1101.  
  1102. random access memory
  1103. Temporary memory location inside a computer. Also called working
  1104. storage. Commonly abbreviated as RAM. Size of RAM is measured in
  1105. kilobytes.
  1106.  
  1107. random number
  1108. Number  selected  by chance from a set of  numbers.  The  random
  1109. primitive returns a random number in Dr. Logo.
  1110.  
  1111. read
  1112. Process  of  transferring prestored information from  a  storage
  1113. device, such as a floppy disk, into the computer's memory.
  1114.  
  1115. Read-Only
  1116. Attribute of a disk or a disk drive that allows you to read  but
  1117. not write to the disk or disk drive.
  1118.  
  1119. Read-Only disk
  1120. Attribute  assigned to a disk that allows you to read from  that
  1121. disk, but not change it. To assign the Read-Only attribute to  a
  1122. 5  1/4  inch floppy disk, disable the Read-Write  notch  on  the
  1123. upper left side of the disk by placing a sticker over it.
  1124.  
  1125. Read-Only disk drive
  1126. Attribute  assigned to a disk drive that allows you to read  any
  1127. file  on  the  disk but prevents you from  adding  a  new  file,
  1128. erasing a file, changing a file, or renaming a file. A drive has
  1129. the  Read-Only  attribute when a new disk is inserted.  Use  the
  1130. primitive resetd to give the drive a Read-Write capability.
  1131.  
  1132. Read-Write
  1133. Attribute of a disk or a disk drive that allows you to read from
  1134. and  write  to the disk or the disk drive. A 5 1/4  inch  floppy
  1135. disk  can  be set to Read-Write by cutting  out  the  Read-Write
  1136. notch  on the upper left corner of the disk. A drive can be  set
  1137. to  Read-Write by entering the resetd command after inserting  a
  1138. new disk.
  1139.  
  1140. real number
  1141. Numeric  value  specified  with  a  decimal  point,   internally
  1142. represented in floating point notation.
  1143.  
  1144. reserved word
  1145. Keyword  that  has  specific  meaning to  a  given  language  or
  1146. operating system. In Logo, the keywords are called "primitives".
  1147. A reserved word cannot be used as a procedure or variable  name,
  1148. unless you have set the system variable REDEFP to TRUE.
  1149.  
  1150. running a procedure
  1151. Process of Dr. Logo evaluating and performing the expressions in
  1152. a procedure.
  1153.  
  1154. save
  1155. To transfer information from random access memory into permanent
  1156. storage on the disk.
  1157.  
  1158. screen
  1159. Construct  in memory where text or graphic data is  stored.  Dr.
  1160. Logo supports two kinds of screens: a text screen and a  graphic
  1161. screen. A color monitor can display both kinds of screens, and a
  1162. monochrome monitor can display only the text screen.
  1163.  
  1164. screen editor
  1165. Dr. Logo utility that allows you to define a procedure or modify
  1166. a  procedure  without retyping the complete definition.  In  the
  1167. screen  editor,  you  can use  special  screen  editing  control
  1168. characters  that  enable  you to move from line  to  line  in  a
  1169. procedure, as well as all of the line editor's control character
  1170. commands. You can start the screen editor by typing the commands
  1171. ed, edall, edps, or edns at Dr. Logo's ? prompt.
  1172.  
  1173. single-sided
  1174. Disk  format  that stores information on only one side;  a  disk
  1175. drive that can read or write on only one side of a  single-sided
  1176. disk.
  1177.  
  1178. sixteen-bit computer
  1179. Computer  system  that  is  capable  of  processing  information
  1180. sixteen  bits at a time, potentially twice as fast as an  eight-
  1181. bit system. Sixteen-bit systems can usually accomodate more  RAM
  1182. than eight-bit systems, making some applications more efficient.
  1183.  
  1184. software
  1185. Set  of instructions that tells the hardware how to  complete  a
  1186. particular task. Unlike hardware, software is not an  electronic
  1187. product,  and does not perform any physical work. Software is  a
  1188. communication  tool  that  allows  you  to  interact  with   the
  1189. hardware.
  1190.  
  1191. splitscreen
  1192. Display where a text window is opened on the graphic screen of a
  1193. color monitor.
  1194.  
  1195. stack
  1196. Area  in memory used by the interpreter to keep track  of  which
  1197. procedure is currently running.
  1198.  
  1199. store
  1200. To save information. See save.
  1201.  
  1202. superprocedure
  1203. Procedure that is never called by any other procedure. You  call
  1204. a  superprocedure into action by entering the procedure name  at
  1205. Dr. Logo's ? prompt. Use the potl primitive to display the names
  1206. of superprocedures.
  1207.  
  1208. syntax
  1209. Format for entering an expression.
  1210.  
  1211. syntax error
  1212. Error  that  results from entering an expression that  does  not
  1213. conform to the syntax rules.
  1214.  
  1215. temporary storage
  1216. See random access memory.
  1217.  
  1218. terminal
  1219. Input/output device consisting of a monitor and a keyboard.
  1220.  
  1221. text screen
  1222. Area  in memory where text data is stored. You can  display  the
  1223. visual field of the text screen on either a monochrome or  color
  1224. monitor.
  1225.  
  1226. text window
  1227. Visual display of the text screen on either a color monitor or a
  1228. monochrome monitor; that portion of the display dedicated to the
  1229. text screen. Dr. Logo's splitscreen primitive allows you to have
  1230. both text and graphic windows on the same color monitor.
  1231.  
  1232. toplevel
  1233. Interpreter's  prompt.  When Dr. Logo displays a  question  mark
  1234. ("?"),  there  are  no procedures on the stack,  and  the  level
  1235. number is 0.
  1236.  
  1237. trace
  1238. Option  used for debugging a procedure while it is running.  The
  1239. trace  option  displays  the name of each  procedure  as  it  is
  1240. called,  and  the  name  and value of each  variable  as  it  is
  1241. defined.  Trace  allows  you  to  observe  the  details  of  the
  1242. procedure's execution without interruption.
  1243.  
  1244. turtle
  1245. Graphic  symbol that functions as a cursor appearing on the  Dr.
  1246. Logo graphic screen.
  1247.  
  1248. turtle graphics
  1249. Dr. Logo's graphics environment. The Logo language allows you to
  1250. draw  on the graphic screen by directing the turtle's  movement.
  1251. As  the  turtle  moves, it leaves a trace of  its  path  on  the
  1252. screen.
  1253.  
  1254. turtle step
  1255. One pixel or dot on the IBM Personal Computer.
  1256.  
  1257. user
  1258. Person who operates a computer.
  1259.  
  1260. user-friendly
  1261. Quality  of  a piece of software that makes it  simple  for  the
  1262. inexperienced person to use.
  1263.  
  1264. utility program
  1265. Software   tool  that  enables  the  user  to  perform   certain
  1266. operations.  For example, the editor is a utility  program  that
  1267. enables  you  to  add, change, and delete text  in  a  Dr.  Logo
  1268. procedure.
  1269.  
  1270. value
  1271. Quantity  expressed  by an integer or real  number;  the  object
  1272. assigned to a variable or property name.
  1273.  
  1274. variable
  1275. Name  to  which  Dr. Logo can assign an object  as  a  value.  A
  1276. variable can be thought of as a container that can hold a value.
  1277.  
  1278. visual field
  1279. Portion of the screen displayed on the monitor.
  1280.  
  1281. watch
  1282. Option  used for debugging a procedure while it is running.  The
  1283. watch  option displays the procedure's name and  the  expression
  1284. that the interpreter will evaluate next, one line at a time.  It
  1285. waits  for  you to press the Enter key before it  executes  that
  1286. line.  This feature allows you to interact with the  interpreter
  1287. or edito during the execution of a procedure.
  1288.  
  1289. wildcard character
  1290. Question  mark ("?") character that gives Dr. Logo a pattern  to
  1291. match  when searching in a disk directory for a file name.  A  ?
  1292. placed  in  a  file name creates an  ambiguous  file  name.  See
  1293. ambiguous file name.
  1294.  
  1295. window
  1296. Visual  portion  of  the screen. See  graphic  window  and  text
  1297. window.
  1298.  
  1299. word
  1300. Type of object used as input to a Dr. Logo procedure. A group of
  1301. one   or  more  consecutive  characters  separated  from   other
  1302. characters on the line by a delimiter.
  1303.  
  1304. working storage
  1305. See random access memory.
  1306.  
  1307. workspace
  1308. Dr. Logo's temporary storage area for information, such as  your
  1309. procedures, variables, and property lists.
  1310.  
  1311.  
  1312. EOF
  1313.  
  1314.  
  1315. DRLRME.WS4      (= "Dr. Logo Reference Manual", Appendix E)
  1316. ----------
  1317.  
  1318. (Retyped by Emmanuel ROCHE.)
  1319.  
  1320.  
  1321. Appendix E: Getting Started
  1322. ---------------------------
  1323.  
  1324. This  section quickly leads you through a complete session  with
  1325. Dr. Logo. It shows how to start up and shut off Dr. Logo, how to
  1326. initialize  a disk, define a Dr. Logo procedure, save  and  load
  1327. files, specify the default drive, and back up your data disk and
  1328. files.
  1329.  
  1330. The beginning of this book explain why you must enter  quotation
  1331. marks  and other punctuation; to keep this  introduction  brief,
  1332. the  explanations  are  not  repeated  here.  To  complete  this
  1333. session,  simply  type  each of the examples exactly  as  it  is
  1334. shown,  and  then press the Enter key ("<--+"). If  you  make  a
  1335. typing  error, use the backspace key ("<--") to correct  it,  or
  1336. retype the line. Do not worry about mistakes; you can't hurt Dr.
  1337. Logo or your computer with typing errors.
  1338.  
  1339. If, while reading this section, you find a computer-related term
  1340. you  do not understand, you can find its definition in  Appendix
  1341. D, the glossary.
  1342.  
  1343.  
  1344. E.1 Starting up Dr. Logo
  1345. ------------------------
  1346.  
  1347. Your computer automatically loads Dr. Logo into memory when  you
  1348. turn  on your computer. You can start up Dr. Logo in one of  two
  1349. ways, depending on whether your computer is powered OFF or ON.
  1350.  
  1351.  
  1352. If the power is OFF
  1353. -------------------
  1354.  
  1355.      1.  Open  the door of drive A: by lifting  the  load  latch
  1356. outwards.
  1357.  
  1358.      2.  Insert the Dr. Logo system disk with the label face  up
  1359. and  the  disk jacket seams underneath. Hold the label  in  your
  1360. hand as you slide the disk into the slot. See Figure E-1.
  1361.  
  1362.         Figure E-1. Inserting a disk  (not shown)
  1363.  
  1364.      3.  Close  the disk drive door by pulling  the  load  latch
  1365. down.
  1366.  
  1367.      4. Turn ON the printer, if you have one, the color  monitor
  1368. and monochrome monitor if you have one, and finally the computer
  1369. system unit. (If you have just powered off, but want to use your
  1370. computer  again, you must count slowly to five before you  power
  1371. ON.)
  1372.  
  1373.  
  1374. If the power is ON
  1375. ------------------
  1376.  
  1377.      1. Insert the Dr. Logo system disk into drive A: and  close
  1378. the door.
  1379.  
  1380.      2. Hold down the Ctrl and Alt keys, and press the Del  key.
  1381. Then,  release  all three keys. This sequence is  called  system
  1382. reset. See Figure E-2.
  1383.  
  1384.         Figure E-2. System keyboard  (not shown)
  1385.  
  1386. In  either start sequence, wait a moment while the  system  does
  1387. some self-testing. Watch for the red light on drive A: to flash,
  1388. and  listen for the drive to read Dr. Logo from the system  disk
  1389. into your computer's memory. While Dr. Logo is being loaded,  it
  1390. displays the following message on your monitor:
  1391.  
  1392.         +---------------------------------------+
  1393.         |   Welcome to Dr. Logo, Version V.V    |
  1394.         | Copyright (C) 1983, Digital Research  |
  1395.         |       Pacific Grove, California       |
  1396.         |                                       |
  1397.         |               Please Wait             |
  1398.         |                                       |
  1399.         |                                       |
  1400.         |                                       |
  1401.         |                                       |
  1402.         +---------------------------------------+
  1403.  
  1404.         Figure E-3. Dr. Logo banner
  1405.  
  1406. The  version  number, represented above by V.V,  tells  you  the
  1407. major and minor revision level of the Dr. Logo version that  you
  1408. own.  After  this  greeting disappears, a  question  mark  ("?")
  1409. prompt  and  the flashing underline ("_") display on  your  text
  1410. screen. The question mark tells you that Dr. Logo is waiting for
  1411. you to type something at your keyboard. The underline tells  you
  1412. where the next character you type will appear.
  1413.  
  1414. Once  in  memory, Dr. Logo allocates a part of memory  for  your
  1415. workspace.  When  you start Dr. Logo, the  workspace  is  empty,
  1416. ready for you to type in new procedures or load previously saved
  1417. procedures from a disk.
  1418.  
  1419.  
  1420. E.2 Defining Dr. Logo procedures
  1421. --------------------------------
  1422.  
  1423. A procedure is a list of instructions that tells Dr. Logo how to
  1424. do  a  task.  Dr.  Logo performs the task  when  you  enter  the
  1425. procedure's name. The list of instructions is the definition  of
  1426. the   procedure.  You  use  primitives  and   previously-defined
  1427. procedures  to define a new procedure. For example, here is  how
  1428. to  enter a procedure that makes Dr. Logo draw a square  on  the
  1429. graphic screen with the turtle. Type the following:
  1430.  
  1431.         ?to square
  1432.         >repeat 4 [forward 60 right 90]
  1433.         >end
  1434.         square defined
  1435.         ?
  1436.  
  1437. When you type the statement "to square", Dr. Logo responded with
  1438. a  > prompt on the next line. The special word "to"  signals  to
  1439. Dr.  Logo that you are starting to define a new  procedure.  The
  1440. greater-than  sign (">") indicates that Dr. Logo is  remembering
  1441. your instructions as a procedure definition.
  1442.  
  1443. After  you define the procedure, you can make Dr.  Logo  perform
  1444. the new task by typing the procedure name at Dr. Logo's ? prompt
  1445. and pressing the Enter key. For example, type
  1446.  
  1447.         ?square
  1448.         ?
  1449.  
  1450. cs  stands  for  clearscreen, and erases  the  square  from  the
  1451. screen. You can teach Dr. Logo to draw a triangle as follows:
  1452.  
  1453.         ?cs
  1454.         ?to triangle
  1455.         >right 45 forward 35
  1456.         >right 90 forward 35
  1457.         >left 225 forward 50
  1458.         >end
  1459.         triangle defined
  1460.         ?triangle
  1461.         ?
  1462.  
  1463. Now,  you can use the triangle and the square procedures in  the
  1464. definition of another procedure. For example,
  1465.  
  1466.         ?cs
  1467.         ?to draw.house
  1468.         >square
  1469.         >forward 50
  1470.         >triangle
  1471.         >end
  1472.         draw.house defined
  1473.         ?draw.house
  1474.         ?
  1475.  
  1476. You can look at the names of the procedures you have defined  by
  1477. asking Dr. Logo to print out titles, pots in short:
  1478.  
  1479.         ?pots
  1480.         to square
  1481.         to triangle
  1482.         to draw.house
  1483.         ?
  1484.  
  1485. When  you turn off your computer, everything in  your  workspace
  1486. disappears.  If  you were to turn off your computer  now,  these
  1487. procedures would be lost. To be able to use them later, you must
  1488. save them on a disk.
  1489.  
  1490. But, before you try to save your procedures, remember that  your
  1491. Dr. Logo system disk is write-protected. That means you can only
  1492. read Dr. Logo from it, and cannot save procedures on it. You can
  1493. take  your Dr. Logo system disk out of the A: drive as  soon  as
  1494. Dr. Logo is loaded. Store your system disk in a safe place, away
  1495. from  heat  and magnetic devices such as telephones  and  vacuum
  1496. cleaners.
  1497.  
  1498. Before  you can save procedures, you must create a data disk,  a
  1499. disk  that  can store procedures in files, and insert  it  in  a
  1500. drive.  A disk fresh from the box is not ready to  store  files;
  1501. you  must initialize (format) a new disk before you can read  or
  1502. write any data on it.
  1503.  
  1504.  
  1505. E.3 Initializing a disk
  1506. -----------------------
  1507.  
  1508. You must always initialize a disk that is fresh from the box. If
  1509. you have an old disk that you want to reuse, you can  initialize
  1510. the disk to remove all the old data on the disk and reformat it,
  1511. as if it were new.
  1512.  
  1513.  
  1514. Before you begin
  1515. ----------------
  1516.  
  1517.      1.  Make sure that the read/write notch is cut out  of  the
  1518. upper left edge of the disk jacket.
  1519.  
  1520.      2.  Check to see if you have single- or  double-sided  disk
  1521. drives.   If  you  have  single-sided  disk  drives,  you   must
  1522. initialize  your  disks to single-sided format.  A  double-sided
  1523. drive can handle either single- or double-sided disks.
  1524.  
  1525. You  will need to initialize two new disks, one to be your  data
  1526. disk and the other to be your back-up disk.
  1527.  
  1528.  
  1529. If you have a one-drive system
  1530. ------------------------------
  1531.  
  1532.      1.  If you have not already done so, remove your  Dr.  Logo
  1533. system  disk, and store it in a safe place, away from  heat  and
  1534. magnetic devices, such as telephones and vacuum cleaners. Insert
  1535. the disk to be formatted in drive A: and close the door.
  1536.  
  1537.      2.  If you have a single-sided drive, you  must  initialize
  1538. the disk to single-sided. Type
  1539.  
  1540.                 ?initd "a: 1
  1541.  
  1542.         Dr. Logo displays the following prompt:
  1543.  
  1544.                 I will erase the diskette in drive A
  1545.                 and will make it single-sided.
  1546.                 Is this what you want (y/n)?
  1547.  
  1548.         If you have a double-sided drive, you can initialize the
  1549. disk to double-sided. Type
  1550.  
  1551.                 ?initd "a: 2
  1552.  
  1553.         Dr. Logo displays the following prompt:
  1554.  
  1555.                 I will erase the diskette in drive A
  1556.                 and will make it double-sided.
  1557.                 Is this what you want (y/n)?
  1558.  
  1559.      3. Type y (yes) to format the disk. Type n (no) if you have
  1560. not removed the Dr. Logo system disk or, for some other  reason,
  1561. wish  to return to Dr. Logo's ? prompt. After you type y,  watch
  1562. for  the  drive's  red light to flash, and listen  as  Dr.  Logo
  1563. formats the disk. When the formatting is complete, Dr. Logo's  ?
  1564. reappears.
  1565.  
  1566.      4. Format a second disk, repeating steps 1 through 3, for a
  1567. back-up disk.
  1568.  
  1569.  
  1570. If you have a two-drive system
  1571. ------------------------------
  1572.  
  1573.      1.  You  can leave your Dr. Logo system disk in  drive  A:.
  1574. Insert the disk to be formatted in drive B: and close the door.
  1575.  
  1576.      2. If you have single-sided drives, you must initialize the
  1577. disk to single-sided. Type
  1578.  
  1579.                 ?initd "b: 1
  1580.  
  1581.         Dr. Logo displays the following prompt:
  1582.  
  1583.                 I will erase the diskette in drive B
  1584.                 and will make it single-sided.
  1585.                 Is this what you want (y/n)?
  1586.  
  1587.         If you have double-sided drives, you can initialize  the
  1588. disk to double-sided. Type
  1589.  
  1590.                 ?initd "b: 2
  1591.  
  1592.         Dr. Logo displays the following prompt:
  1593.  
  1594.                 I will erase the diskette in drive B
  1595.                 and will make it double-sided.
  1596.                 Is this what you want (y/n)?
  1597.  
  1598.      3. Type y (yes) to format the disk. Type n (no) if you wish
  1599. to  return to Dr. Logo's ? prompt. After you type y,  watch  for
  1600. the  B:  drive's  red light to flash, and  listen  as  Dr.  Logo
  1601. formats the disk. When the formatting is complete, Dr. Logo's  ?
  1602. reappears.
  1603.  
  1604.      4. Format a second disk, repeating steps 1 through 3, for a
  1605. back-up disk.
  1606.  
  1607.  
  1608. E.4 Saving Dr. Logo files
  1609. -------------------------
  1610.  
  1611. Saving  a file means copying the contents of your  workspace  to
  1612. permanent storage on the disk.
  1613.  
  1614.      1.  If you have a single drive system with a data  disk  in
  1615. drive A:, type the following command to save the contents of the
  1616. workspace in a disk file.
  1617.  
  1618.                 ?save "home
  1619.  
  1620.         If you have a two-drive system with a data disk in drive
  1621. B:, type
  1622.  
  1623.                 ?save "b:home
  1624.  
  1625.         You  have  now  made a copy  of  your  three  procedures
  1626. square,  triangle, and draw.house in a file named "home" on  the
  1627. disk  in either drive A: or drive B:. Your procedures are  still
  1628. in Dr. Logo's workspace, as you can see with a pots command.
  1629.  
  1630.                 ?pots
  1631.                 to square
  1632.                 to triangle
  1633.                 to draw.house
  1634.                 ?
  1635.  
  1636.      2.  To verify that Dr. Logo has saved your procedures,  ask
  1637. it to show you the names of Dr. Logo files on the disk.
  1638.  
  1639.                 ?getfs
  1640.                 [HOME]
  1641.  
  1642.         Or, if you saved the file on drive B:, type
  1643.  
  1644.                 ?getfs "b:
  1645.                 [HOME]
  1646.  
  1647.      3.  Now that you have saved your procedures, you can  erase
  1648. them  from your workspace with confidence they can be  restored.
  1649. Type
  1650.  
  1651.                 ?erall
  1652.  
  1653.         Now,  to verify that the workspace has been erased,  ask
  1654. Dr. Logo to print out the titles of procedures in the  workspace
  1655. by typing
  1656.  
  1657.                 ?pots
  1658.                 ?
  1659.  
  1660.         Dr. Logo displays only the ? prompt, because nothing  is
  1661. in the workspace.
  1662.  
  1663.  
  1664. E.5 Loading Dr. Logo files
  1665. --------------------------
  1666.  
  1667. To load a file means to move the procedures or other information
  1668. from permanent storage on the disk into the Dr. Logo  workspace.
  1669. To load a file, you must have saved it on the disk, and be  able
  1670. to see its name with a getfs command.
  1671.  
  1672.      1. To load the file you just saved, type
  1673.  
  1674.                 ?load "home
  1675.  
  1676.         Or, if you saved the file on drive B:, type
  1677.  
  1678.                 ?load "b:home
  1679.  
  1680.         Listen ad Dr. Logo moves the procedures in the file from
  1681. the disk into the workspace, and displays the following list  on
  1682. your screen:
  1683.  
  1684.                 square defined
  1685.                 triangle defined
  1686.                 draw.house defined
  1687.  
  1688.      2.  Verify  that the procedures are in  your  workspace  by
  1689. executing them, or by using pots to print out their titles.
  1690.  
  1691.                 ?draw.house
  1692.                 ?pots
  1693.                 to square
  1694.                 to triangle
  1695.                 to draw.house
  1696.                 ?
  1697.  
  1698.  
  1699. E.6 Specifying the default drive
  1700. --------------------------------
  1701.  
  1702. When  you  do not specify a drive in a disk command  like  save,
  1703. load,  or  getfs,  Dr. Logo automatically looks  for  files,  or
  1704. writes  files, on the disk in the default drive. When you  start
  1705. Dr.  Logo,  A:  is the default drive. If you  have  a  one-drive
  1706. system,  you  only have drive A:, and do not need to  specify  a
  1707. drive  name in any of your commands. If you have two drives  and
  1708. leave your system disk in drive A:, enter the following commands
  1709. to change yor default drive to B:.
  1710.  
  1711.      1. Determine which drive is the default drive by typing
  1712.  
  1713.                 ?defaultd
  1714.                 A:
  1715.  
  1716.      2. Change the default drive to drive B: by typing
  1717.  
  1718.                 ?setd "b:
  1719.                 ?defaultd
  1720.                 B:
  1721.  
  1722.      3. To verify that Dr. Logo now looks on drive B: for files,
  1723. type
  1724.  
  1725.                 ?getfs
  1726.                 [HOME]
  1727.  
  1728.  
  1729. E.7 Backing up a disk
  1730. ---------------------
  1731.  
  1732. To  back  up  a  disk means to make  a  duplicate  copy  of  its
  1733. contents.  Professional  programmers avoid  losing  programs  by
  1734. making copies of valuable disks and files. If your working  copy
  1735. is  accidentally damaged or erased, you can restore it from  the
  1736. back-up copy.
  1737.  
  1738. The frequency of making copies varies with each programmer,  but
  1739. as a general rule make a copy when it would take 10 to 20  times
  1740. longer to re-enter the information than to make the copy.
  1741.  
  1742. To  make  a back-up disk, you need an initialized  or  formatted
  1743. disk on which to write. Make sure your data disk and your  back-
  1744. up disk are the same format: double-sided or single-sided.
  1745.  
  1746.  
  1747. If you have a one-drive system
  1748. ------------------------------
  1749.  
  1750.      1.  Start with the data disk that you plan to copy  in  the
  1751. drive. This is your source disk.
  1752.  
  1753.      2. To start the copying process, type
  1754.  
  1755.                 ?copyd "a: "a:
  1756.  
  1757.         Figure E-4. System unit with one drive  (not shown)
  1758.  
  1759.  
  1760. If you have a two-drive system
  1761. ------------------------------
  1762.  
  1763.      1. Insert the back-up disk into drive B: and the data  disk
  1764. into drive A:.
  1765.  
  1766.      2.  To  make an exact, track-to-track copy of the  disk  in
  1767. drive A: onto the disk in drive B:, type
  1768.  
  1769.                 ?copyd "b: "a:
  1770.  
  1771.         Dr. Logo displays the following message before it begins
  1772. to copy:
  1773.  
  1774.                 I will copy from the diskette in drive A
  1775.                 to the diskette in drive B, erasing any
  1776.                 existing data on the diskette in drive B.
  1777.                 Is this what you want (y/n)?
  1778.  
  1779.      3.  Type  y (yes) to copy the data disk  onto  the  back-up
  1780. disk.  Type  n  (no) to return to Dr. Logo's  ?  prompt  without
  1781. making  the  copy. If you type y, watch for the  red  lights  to
  1782. flash  back and forth from drive A: to drive B:, and  listen  as
  1783. the data is transferred from one disk to the other.
  1784.  
  1785.         Figure E-5. System with two drives  (not shown)
  1786.  
  1787.  
  1788. E.8 Copying a file
  1789. ------------------
  1790.  
  1791. Another  way  to back up a file is to make a copy of  just  that
  1792. file, without making a copy of the entire disk.
  1793.  
  1794.  
  1795. If you have a one-drive system
  1796. ------------------------------
  1797.  
  1798.      1. Start with the data disk containing the original file in
  1799. the drive. This is called your source disk.
  1800.  
  1801.      2. To copy the file, type
  1802.  
  1803.                 ?copyf "home "home
  1804.  
  1805.      3.  After  Dr. Logo displays a message, remove  the  source
  1806. data disk, and insert your back-up data disk into the drive.
  1807.  
  1808.  
  1809. If you have a two-drive system
  1810. ------------------------------
  1811.  
  1812.      1.  To  copy a file from the data disk in drive A:  to  the
  1813. back-up disk in drive B:, type
  1814.  
  1815.                 ?copyf "b:home "a:home
  1816.  
  1817.      2.  Verify  that  the file has been  copied  with  a  getfs
  1818. command.
  1819.  
  1820.                 ?getfs "b:
  1821.                 [HOME]
  1822.  
  1823.  
  1824. E.9 Shutting off Dr. Logo
  1825. -------------------------
  1826.  
  1827. Before you turn off the power to your computer, be sure to check
  1828. that you have performed the following steps:
  1829.  
  1830.      1. Save the contents of your workspace on disk, so that you
  1831. can load it later.
  1832.  
  1833.      2. Make back-up copies of your files on a back-up disk.
  1834.  
  1835.      3.  Take your disks out of the drives. NEVER turn off  your
  1836. system with the disk engaged in the drive; this can  permanently
  1837. damage your disk.
  1838.  
  1839.      4.  Turn the power switches on your monitor,  printer,  and
  1840. system unit to OFF.
  1841.  
  1842.  
  1843. EOF
  1844.  
  1845.  
  1846.  
  1847.  
  1848.