Computer Science Logo Style vol 1 Appendix A: Running Berkeley Logo Computer Science Logo Style volume 1: Symbolic Computing 2/e Copyright (C) 1997 MIT

Running Berkeley Logo

cover photo
Brian Harvey
University of California, Berkeley

Download PDF version
Back to Table of Contents
BACK chapter thread NEXT
MIT Press web page for Computer Science Logo Style

(This HTML version of this appendix has been updated since the book was published, so it's a little different from the PDF, which is identical to the paper books. But you might also want to read the announcement file for the most recent release, which will have the most up-to-date information on downloading and installing UCBLogo.)

One of my reasons for writing a second edition of these books was that all of the Logo interpreters described in the first edition are now obsolete. Current commercial Logo implementations are quite different in their user interface from those traditional versions. Those differences make newer Logo implementations more immediately accessible to children who want to produce animated graphics, but in many cases the changes have made the kind of programming I do in these books harder.

My solution has been to produce, along with some of my students, a Logo interpreter that is available free of charge for most popular computers. The design goal of Berkeley Logo has been that a program written for one kind of computer should run entirely unchanged on any other kind. Still, there are slight differences in the user interface and in the installation process, and this appendix discusses those differences. Since Berkeley Logo is distributed with source files, I hope that as new computers and operating systems come along, some enthusiast will make Berkeley Logo available for them even if I don't catch them all.

Still, people who are using some other version of Logo for other purposes might well want to use these books to help them learn more advanced Logo ideas. The programs in this first volume can be adapted to current commercial Logo dialects with some effort. In the later volumes I rely more heavily on features that are available only in Berkeley Logo.

Getting Berkeley Logo

Berkeley Logo is available over the Internet. Make an anonymous FTP connection to and look in the directory pub/ucblogo, or just follow the links here:

blogo.exe    Self-extracting archive for DOS.
ucbwlogosetup.exe    Installer for Windows.
ucblogo.sea.hqx    BinHex self-extracting archive for classic Macintosh.
ucblogo.tar.Z    Compressed tar archive for Unix and Mac OS X.

If you use FTP, the files should be transferred in binary (image) mode.

The DOS, Windows, and Mac versions include a source subdirectory containing the C source files used to compile Berkeley Logo. If you don't want to play with the code, you can delete this directory and all its contents. You can also delete some or all of the contents of the docs directory, which has the user manual in various formats (Postscript, PDF, HTML, INFO, TEXI). The HTML files are particularly huge, if you're looking for something to delete. (In the Unix version, the source files are in the top-level directory of the distribution.)

In the source directory, the file plm is a Program Logic Manual that documents some of the inner mysteries of this interpreter. You should read Structure and Interpretation of Computer Programs before you read plm. Also included is, a beautiful one-page simplified flowchart of the evaluator to admire while reading plm.

In the Unix version, if you want to save space, you can delete the entire ucblogo directory created by tar once you've done "make install".

Berkeley Logo for Unix

Since there are so many different versions of Unix, Berkeley Logo is distributed in source form, and must be compiled for your particular machine. A Gnu Autoconf configuration file is provided, so the compilation process should be reasonably automatic. The X11 library is required for turtle graphics.

The Unix version is a compressed tar file. To install it, copy to your machine, then say

uncompress ucblogo.tar
tar -xf ucblogo.tar
cd ucblogo
Then, from an account with root privileges, make install to install the Logo files in /usr/local.

If you have gunzip, you can instead get ucblogo.tar.gz (better compression).

Logo uses your system's interrupt character for stop, and your system's quit character for pause.

For the edit command, Logo uses whatever program is specified in your EDITOR environment variable. If your editor exits with nonzero status (indicating an error) then Logo will not carry out the changes indicated in the edited file. If you have Mac OS X, and you have the X Window System installed, then you can follow these instructions to install Unix UCBLogo. Alternatively, you can run the Mac Classic version described next.

Berkeley Logo for the Macintosh

There are two ways to run Logo on the Mac. There is a Mac-specific version for Classic Macs (which will also run in the Classic Environment under OS X). Alternatively, you can run the Unix version under OS X, provided that you've installed the X Window System. This section describes the Classic version; the previous section describes the Unix version.

Your Web browser probably knows how to expand and install the archive by itself; if not, you need something like StuffIt to do the job. The result of the expansion will be a folder containing the ucblogo executable along with needed library files. You can move this folder to anyplace convenient.

Command-period means stop; command-comma means pause.

On the Mac, Berkeley Logo includes a very simple-minded editor built into Logo itself. It works in the usual Macintosh way; when you have finished editing, you can select "accept editor changes" or "cancel editor changes" from the Edit menu.

Macintosh users will find the Berkeley Logo user interface disconcerting, because it was designed to be Logo-like rather than Macintosh-like. For example, you should use the Logo commands splitscreen, fullscreen, and textscreen to rearrange Logo's text and graphics windows, rather than trying to resize them with the mouse, although the latter will work, too.

Berkeley Logo for Windows

The Windows version of Berkeley Logo is called ucbwlogo.exe. The file you download is an installer that should be self-explanatory. Like the DOS version, it uses a separate editor of your choice. The default editor is jove, which is included in the distribution.

There is an offshoot of Berkeley Logo called MSWLogo, written by George Mills, specifically for Windows. It has a more point-and-click style interface, and doesn't work well with those projects that make heavy use of reading from the keyboard or controlling the position of text on the screen; the Solitaire and Cryptographer's Helper projects in Volume 2 and the finite state machine simulator in Volume 3 are most problematic. But for general use, MSWLogo is a good option for Windows users.

Berkeley Logo for DOS

The DOS version is in the form of a self-extracting pkzip archive. Run blogo.exe ; it will create two files, install.bat and installu.exe. Then run install to create a c:\ucblogo directory with the complete distribution. If you want to install Logo somewhere other than c:\ucblogo, you can say

installu -d d:\foo\

to put it in d:\foo\ucblogo. Don't forget the -d part!

Berkeley Logo is provided in two executable versions:
ucblogo.exe runs on 286-and-up processors, and uses extended memory if you have it, so you can run large Logo programs.
bl.exe runs on any PC, but is limited to 640K. That's not big enough for some of the larger projects in the later volumes.

In order to run ucblogo.exe you must have the file zpm.exe (which is provided) in your DOS path. Zpm has to figure out what kind of extended memory interface you have, and in some cases it needs help. You must use the DOS command

set DOS16M=1    for NEC 98-series
set DOS16M=5    for Fujitsu FMR-60 or 70
set DOS16M=6    for AT&T 6300 Plus
set DOS16M=7    for old Phoenix BIOS versions
set DOS16M=13    for Zenith Z-24X with old BIOS
set DOS16M=INBOARD    for 386 with Intel Inboard

Even if UCBLOGO runs correctly for you without any of these settings (which will be the case for most machines) you might try set DOS16M=10 for faster performance on some systems but slower on others -- experiment.

Ucblogo and bl also usually figure out correctly what kind of graphics board you have. But for some obscure clones with nonstandard graphics you might have to tell it which graphics mode to use. This is also done with a DOS command:

set FG_DISPLAY=xxxx

where xxxx is the board type and mode, one of the following:


I don't know anything about any of these except that TOSHIBA is for a T3100 and doesn't work on my T1200XE. I use VGA12 on my generic clone.

There are some graphics modes that will work with bl but not with ucblogo, including VESA1 for 256 colors of 640x480.

Finally, note that Logo writes directly to the screen and is therefore incompatible with "screen accelerator" TSRs. (For example, my PC comes with one called pckscrn and I had to turn it off before running Logo.) The file ucl.bat is a sample batch file that I use to disable the screen accelerator, run Logo, then re-enable it. If you have a different screen accelerator you'll need different commands, of course, but the idea is the same.

Ctrl-break or ctrl-Q means stop, ctrl-W means pause.

The Logo edit command runs a separate editor, starting that editor with a file containing your selected procedures. Logo will use whatever editor you want, if there is an EDITOR variable in your DOS environment. By default, Logo uses Jove, a version of EMACS, which is provided with Logo. This version of Jove is set up so that typing ctrl-C will save the file and return to Logo. You need to put


in your autoexec.bat or something so that Jove will start up right. Cmds.doc is the Jove reference manual, used for its online help.

You also need


(yes, ending with backslash) in your autoexec.bat so that Logo can find its library files.

(back to Table of Contents)

BACK chapter thread NEXT

Brian Harvey,