% -*- LaTeX -*-
% 10/16/91 Arthur Gleckler: document copying SRM boot disks
% 9/7/89 Arthur Gleckler: major modifications to entire document
% 2/3/90 Paula Ferguson: major additions and modifications 
\documentstyle[12pt]{report}

\newcommand{\idx}[1]{#1\index{#1}}

% \def\baselinestretch{1.5}
\addtolength{\oddsidemargin}{-.5\oddsidemargin}	% left margin
\addtolength{\evensidemargin}{-.5\evensidemargin}	% right
\addtolength{\textwidth}{.2\textwidth}

\title{The 6.001 Laboratory Assistant Manual}
% \\ PRELIMINARY
\author{Niki Pantelias, Michael Ernst, \\
John Buck, Luis Rodriguez, \\
Arthur Gleckler, and Paula Ferguson}

\makeindex

% This is the contents of the file index.tex, which is the working part of
% the index creation macros.
% \makeatletter
% \def\@wrindex#1#2{\let\thepage\relax
%    \xdef\@gtempa{\write#1{\string
%       #2:\thepage}}\endgroup\@gtempa
%    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
% \makeatother

\input{windex}

% Arthur Gleckler's boxing macros from the Don't Panic manual:
\newcommand{\key}[1]{\fbox{\sc #1}}
\newcommand{\ctrl}{\key{ctrl}--}
\newcommand{\shift}{\key{shift}--}
\newcommand{\meta}{\key{meta}--}
\newcommand{\run}{\key{run} \ }
\newcommand{\runkey}[1]{\run \key{#1}}
\newcommand{\extend}{\key{extend} \ }
\newcommand{\kkey}[1]{\key{k$_{#1}$}}

\begin{document}

\maketitle
\newpage
\tableofcontents
\newpage

\setlength{\parskip}{2ex}			% paragraph spacing

% \setcounter{page}{1}

% THINGS THAT NEED TO BE DONE:
% * Add a more complete bug logging section.
% * Some unfinished sections, usually with [] around them.
% * Help queue protocol
% * Standardize the use of the keystroke macro.

\chapter{About This Document}

% 12/15/88 Michael Ernst & Bret Harsham
% 1/6/89, 1/30/89 Michael Ernst

This manual describes features of the 6.001 Chipmunk computer system (hardware
and software) which are not described in the {\em Don't Panic}
manual\index{Don't Panic} and which may be useful to Lab Assistants (LAs).  In
addition, it describes administrative details of LA life (time cards, lab
hours, etc.).

Please expand and revise this manual so that it can be an up-to-date
compilation of the accumulated knowledge of generations of 6.001 Lab
Assistants.  The sources for this manual are currently on the Zurich file 
server
at the Artificial Intelligence Lab (zurich.ai.mit.edu) in the directory {\mbox
{\tt /scheme/documentation/6001labmanual}}.

Please maintain the style\index{style of this manual} in which this manual is
now written.  Don't delete large sections of text; rather, comment them out
(along with an explanation of why they were removed) using the \% character.
Sections of text in [square brackets] need revision.  A comment at the
beginning of the modified section should indicate the date of each significant
change, along with the name of the person who made the change.

\section{Formatting and \LaTeX}
\index{formatting[see text formatting]}\index{text formatting}\index{LaTeX{\LaTeX}}
% 1/8/89 Michael Ernst
% 2/27/89 Minor typos and style John Buck

Briefly: \verb|\index{stuff}| causes stuff to be put in the index.
\verb|\idx{stuff}| places stuff in the index and in the \LaTeX{} output; this
saves typing and replaces \verb|stuff\index{stuff}|.  \verb|{\em stuff}| {\em
emphasizes} stuff, \verb|{\bf stuff}| {\bf boldfaces} it, \verb|{\tt stuff}|
puts it in {\tt typeout} font, and \verb|{\sc stuff}| puts stuff in {\sc small
caps} (for names of buttons and knobs).  (Note the placement of the brackets.)
Use \verb|\key{stuff}| to put stuff in a \key{key box}.  Comments begin with
{\tt \%} and run to the end of the line.  Cross-references use
\verb|\label{name}| at the point of the text referenced with \verb|\ref{name}|
and \verb|\pageref{name}| at the point of the reference.

Run \LaTeX{} three times on the lab manual source file in order to guarantee a
sensible index and table of contents; see section~\ref{produce-dvi},
page~\pageref{produce-dvi} for more details on producing the index.  There are
examples of all these formatting commands in this document.

\section{Index}\index{index}
% 1/6/89 Michael Ernst

The index to this document was created using the \idx{windex program} (written
in C) and its associated macros, provided by Ron Rivest.\index{Rivest, Ronald}
Windex consists of four files, kept with the manual sources:

\begin{description}
\item[windex] executable file; analogous to bibtex program
\item[windex.c] source file for windex program
\item[windex.doc] documentation for using the package
\item[windex.tex] macro to include
\end{description}

To create an index, make sure that the lines 
\begin{verbatim}
\makeindex
\makeatletter
\def\@wrindex#1#2{\let\thepage\relax
   \xdef\@gtempa{\write#1{\string
      #2:\thepage}}\endgroup\@gtempa
   \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
\makeatother
\end{verbatim}

are in the preamble of the document (before the \verb|\begin{document}|).  Then
place \verb|\input{|{\it filename}\verb|.index}| where you want the index
(probably at the end of the file).  Windex is analogous to \idx{bibtex}: that
is, to guarantee correct output, run \LaTeX{}, then run windex, then run
\LaTeX{} twice more.\label{produce-dvi} In general, \LaTeX{} should be run
twice on any input file to ensure that cross-references are correct.  The
initial \LaTeX{} run and the windex run can be omitted if no new index entries
have been made and if no existing entries have changed pages.\index{new index
entries}\index{adding index entries}\index{index entries}\index{running \LaTeX}

\chapter{General}

% 2/3/90 Paula Ferguson: Added info about Athena

\section{Athena}
\index{Athena}

Every 6.001 Lab Assistant should have an account on Project Athena or some
other computer network at MIT.  All LAs should make sure that the head TA has
their correct \idx{e-mail} address, so that everyone can be included 
on the appropriate 6.001 \idx{mailing lists}.  LAs should get in the habit (if
you are not already addicted) of reading their e-mail at least every couple of
days.  Notices about LA meetings and problem set bugs, requests for
trading hours, and other important information is sent out via the
LA mailing list, so you need to read your mail to stay up-to-date.

The Athena workstations in the lab are very convenient for checking mail
and doing other small tasks while on duty.  However, you should be
careful not to get so engrossed in what you are doing on Athena that
you neglect your duties as a lab assistant.  Don't try to staff the lab
(especially if it is busy) and work on a paper or your 6.170 final
project at the same time -- you won't do a good job on either.
LAs should use only the two workstations that are in the 6.001 area (ie. 
don't use the ones on the 6.004 side while you are staffing the lab) so that
you are still accessible to students.  Make sure to put a Lab Assistant
sign on the computer you are using.
\index{LA sign}

% \section{Deep-Thought}
% \index{Deep-Thought}
% Slight change Luis Rodriguez 12/15/88

% Every 6.001 Lab Assistant is entitled to an account on Deep-Thought in the {\tt
% LS} subdirectory.\index{LS subdirectory{{\tt LS} subdirectory}} To get one,
% simply go to 38-344, sit down at one of the VT100s, type \ctrl{\key{c}} to get
% Deep-Thought's attention, type {\tt open} at the {\tt @} prompt, and follow the
% instructions.  After a while, the Head TA will approve the account and you can
% log in.  (You may want to remind the Head TA to approve your account in case he
% isn't automatically notified.)  Logging in from the Scheme lab is possible via
% Kermit; see section~\ref{kermit} on page~\pageref{kermit}.

% The \idx{wait command} is provided for 6.001 LAs; to use it, put the line \\
%  {\tt declare /noconfirm pcl <TA.6001>WAIT}
%  in your {\tt COMAND.CMD} or {\tt LOGIN.CMD} file.  Then typing
% {\tt wait} to the prompt will produce one of a number of ``This terminal is
% in use by a LA; don't touch.'' messages on your screen.  Further
% documentation of the wait command, along with its code, is in {\tt
% <TA.6001>WAIT.PCL}.

% If you wish to have \idx{chaosnet access}, send a message to the {\tt
% ACCOUNTS@Deep-Thought} mailing list saying so.  This will allow you to use ftp and
% telnet to access remote sites on the chaosnet.

\subsection{Mailing Lists}
\index{mailing lists}

There are a number of useful mailing lists set up on a machine in the AI lab.
To send mail to all of the people on one of the lists, send the mail message to
{\tt list-name@ai.mit.edu}.  The names of the different lists and who is 
included on each one are listed below.

{\tt 6001-lecture@ai.mit.edu} -- The lecturer(s).

{\tt 6001-secretary@ai.mit.edu} -- The course secretary.

{\tt 6001-recitation@ai.mit.edu} -- The recitation instructors.

{\tt 6001-head-ta@ai.mit.edu} -- The head TA.

{\tt 6001-ta@ai.mit.edu} -- All the TAs.

{\tt 6001-head-la@ai.mit.edu} -- The head Lab Assistant

{\tt 6001-la@ai.mit.edu} -- The Lab Assistants.

{\tt 6001-staff@ai.mit.edu} -- All of the above

% [All mailing lists and other 6.001 functions will be moved off DT prior
% to its imminent demise.  Where will the replacements for these be?  (Probably on
% Fenchurch.)
% I don't see why we need this section.  Aren't all mailing lists on Zermatt for 
% good?  John Buck

%\% There are also several useful mailing lists on Deep-Thought.

%\% {\tt Bug-Chipmunk} should be used to report hardware problems with the
%\% Chipmunks.

%\% {\tt Accounts} is for reporting problems with access to files, desires for
%\% \idx{chaosnet access}, and other Deep-Thought non-6.001 matters.
	 
\section{Administrivia}

%\% A list of all LAs and their \idx{phone numbers} exists in {\tt
%\% <TA.6001>LAB-TA-PHONES.TXT}.  You should make sure this file is accurate
%\% and update it when necessary.

%\% Lab coverage by LAs is detailed in the file {\tt
%\% DT:<TA.6001>SCHEDULE.\it term}.  If you change this file, be sure to
%\% let the head TA and head LA know.\index{schedules}

The head LA and/or head TA keep a list of all the LAs, their \idx{e-mail}
addresses, and their \idx{phone numbers}.  This list will be distributed to
all the lab assistants soon after the beginning of the term.  Copies of the
list will also be in the top drawer of the file cabinet.  You should 
make sure that the information on the list is accurate and let the
head TA and head LA know if there are any changes.

The head TA and head LA also keep a \idx{schedule} that details lab coverage.
Once the schedule is set at the beginning of the term, copies will be
posted in lab, placed in the top drawer of the file cabinet, and sent to 
everyone.  If you permanently trade hours with
someone else, you should let the head TA and head LA know, so that they
can update the schedule.

% 2/3/90 Paula Ferguson: Section added
\subsection{Hours}
\index{hours}

LAs sign up for lab hours at the beginning of the term.  The sign-ups are
done by seniority, based on the numbers of terms that you have been an LA.
LAs that have worked the same number of terms receive priority based on their
class year.  Once you sign up for hours, they are your responsibility 
for the rest of the term.  If you find that
you have a permanent \idx{schedule conflict}, try to find another LA who can
either take your hours or trade with you.  If no one is willing to take
the hours, talk to the head LA and head TA to work something out.

\index{missing a shift} If you cannot make a shift for some reason, it is
your responsibility to get a replacement.  The sooner that you start 
looking for a replacement, the better your chances of finding someone.
If you know that you have a Thursday night exam coming up in three weeks
that will prevent you from making your hours,
start looking for help now.  This means sending out e-mail
and even calling individual LAs if necessary.  The students are counting
on the lab being staffed!  If absolutely no one can take your hours, please
let the head LA {\em and} the head TA know at least one day in advance.
Canceling at the last moment is frowned upon, especially on days when the lab
is busy.

LAs should try to help each other resolve scheduling conflicts whenever
possible.  If someone needs a replacement and you can cover the shift,
help him or her out.  It may be {\em you} that needs the replacement the next 
time.

\subsection{Timecards}
% Modified by Luis Rodriguez  12/15/88
% 1/6/89 Michael Ernst
% 2/3/90 Paula Ferguson

Timecards\index{timecards}\index{pay} are picked up in the \idx{Course VI
administrative office}, 38-445.  They should be filled out and signed by the 
LA and dropped
off in a pendaflex folder in the upper drawer of the filing cabinet in the lab
by 12 noon on Friday.  The head TA will sign them and return them to the
administrative office by 10:00 the following Monday morning so that you can get
paid the following Friday.

You will need to go to the administrative office at the beginning of the term
to fill out some forms so that you are on the payroll and a timecard is printed
for you.

\index{working extra hours}\index{extra hours} If you worked extra hours either
because someone didn't show up or because the lab was {\em really} busy and you
decided to stay and help, you will, in general, get paid for those hours.  Make
sure you let the head TA and the head LA know about it, so she or he will know 
what the extra hours
on your timecard are for.  Please don't mis-interpret this as an OK to work
extra hours whenever you wish.  There is a fixed number of LA hours (and money)
allocated each term by the department.  

\index{missing hours}
If you miss some hours for whatever reason, you are on your honor not to
claim them on your time card.  Because no one is monitoring lab coverage
at all times, the head LA and head TA might not notice that you missed
a shift.  Then again, they might.  However, it is certain that the students
will notice.
  
LAs get paid for two additional hours every week for doing the \idx{problem
sets}.  Just fill in the two extra hours on your time card each week.
This means that you should do every problem set.  Some problem sets
will take more that two hours and some will take less, so it will balance out.

% 2/3/90 Paula Ferguson: sections added
\subsection{LA Meetings}
\index{LA meetings}\index{meetings}

LAs typically have a weekly meeting with the head TA, and sometimes one
of the lecturers.  The time and location of the meeting will be set at
the beginning of the term, hopefully so that it fits into eneryone's 
schedule.  LAs should make every attempt to attend all of the meetings.
If there is a conflict, you should let the head LA and the head TA know
why you won't be there.

The head TA will hand out upcoming \idx{problem sets} (and sometimes
solutions) at the meetings, as well as talk about what's currently being
covered in class.  The meetings provide a forum for questions about
a variety of things, including problem set bugs and mysterious Chipmunk
behavior.  They also allow LAs to get to know each other and work out
schedule conflicts.  Finally, the meetings are the LAs' main contact
with the rest of the 6.001 staff, which lets LAs know what's going on
with the course and also lets LAs offer feedback to the staff about
specific problems that students are having with the material.

\subsection{Course Handouts}
\index{handouts}\index{problem sets}

LAs will receive copies of relevant course handouts, such as problem sets
and lecture notes on subjects not covered by the book, at the weekly
LA meetings.  Sometimes the solutions for upcoming problem sets will also be
distributed.  If you miss getting important handouts, you should get them
in lecture (TR10 in 10-250) or pick them up in the 6.001 tutorial area
(36-115).  The copies in the tutorial area tend to disappear quickly, so
make sure you get one.  Additional copies of problem sets may also be
available in the top drawer of the \idx{file cabinet}, but don't count on it.

\section{What to do when you get to the lab}
% 2/5/90 Paula Ferguson: additions

When you get to the lab, make sure that all Chipmunks are running correctly.
Reboot or logout machines where necessary.  If a
machine is not working correctly,
report the problem to the \idx{instrument desk}, send mail to the LAs, and
put a sign on the Chipmunk with the problem, your name, and when the problem
was reported.  If a sign is up but does not have the time that the problem was
reported, report it again; the sign was probably put up by a student or by a LA
who didn't have time to report it.

Make sure that the spoolers are up on all of the SRMs and police the printer 
area, throwing old printouts into the recycling bin.

Put an \idx{LA sign} on the top of your computer so that students can see you.
Add your name to the list of ``LA On Duty'' on the \idx{blackboard} and erase
any names of LAs who are not on duty.  Read the ``Bugs and Hints'' section of
the board to see if there is anything new, and erase any outdated messages.
Start helping any students listed on the \idx{help queue}.  You can decide
whether or not you want to use the help queue by marking whether the queue is
``On'' or ``Off.''

When you are not helping a student, you can do small things Athena, like
read you mail, but don't get too involved.  Students need to feel like you
are there to help them.  If you are no using the help queue, it is a good idea
to walk around the room occasionally and see how people are doing.  Some
students may be reluctant to approach you for help, but they will ask you
a question if you wander by.

\index{helping students}
When you are helping a student, don't do his/her work for him/her.  Ask the 
student to show you the different pieces of code and to try running it for you.
Don't take over at the keyboard for her/him.  Although this may be frustrating
when the student is slow, it is how she/he learns to do things.  When a student
is off on the wrong track, try to guide him/her onto the right track, but
don't tell him/her how to solve the problem.  Try not to spend a lot of time
helping a single student, especially if the lab is busy.  Point the student
in the right direction and let her/him think about it some more.  Don't let
students badger you into telling them the answers -- that's not your job. 
Your job is to help students, not do their work for them.

One final note of advice -- helping students is not always easy and it can
be frustrating.  When you feel yourself getting frustrated, don't take it
out on the student, because it will only make the situation worse.  Take a
step back and try another approach, or if there is another LA on duty, see
if she/he can help.  Learning to help students effectively is a skill that
takes practice to develop, so don't get discouraged.

\subsection{Lab Protocol}
% 2/6/89 Michael Ernst
% Style and typos.  John Buck  2/27/89

\begin{itemize}

\item Don't get irritated at students; {\bf all} questions are good questions.

\item Never make a student feel stupid, or tell that a question is stupid.

\item If you're not helping someone, answer the lab phone.

\item If the room alarm starts whining, turn it off.

\item Always put a Lab Assistant sign on the top of your computer when you are on duty.

\item Always remove the Lab Assistant sign from your computer when you leave.

\item Always change the "LA On Duty" section on the blackboard when you arrive and when you leave.

\item Never refuse to help a student on the grounds that he is not in 6.001, particularly
if no 6.001 students need help.  It is okay to give 6.001 students priority.

\item Never refuse to do LA work while you're on duty.

\item If no one needs help, write additions and revisions for this manual.

\item Never justify ignorance because something isn't in this manual ---
especially if you haven't looked for it here!

\item Don't force off-duty LAs who happen to be in the lab to do your work for
you.

\item {\bf Don't punt your hours --- the lab must always be staffed.}

\item Don't ignore the help queue --- some students put their names on it
instead of directly approaching LAs.  If the queue is not in use, write a note
to that effect on the board.

\item If you find a commonly-encountered problem or question, put the answer on
the board in the helpful hints section to reduce the load on you and the other
LAs and to help students who use the lab during off-hours.

\item Never make a student wait while you finish something on your computer,
even for a moment.  If you do, students will get the idea that you don't want
to be bothered --- that shouldn't be true.  Don't do anything on your computer
which requires making a student wait for help.

\end{itemize}

% 2/3/90 Paula Ferguson: sections added
\subsection{Ethics}
\index{ethics}

One difficult aspect of being a 6.001 Lab Assistant is that you have to help
people who are your peers.  Although this situation does not have to be a 
problem, it can be especially difficult when a student is a neighbor in your
living group, a close friend, or a significant other.  As an LA, you have a
position of power and authority over the students.  It is your responsibility
not to abuse this power.  There is a fine line between giving a friend a little
extra help and doing his/her work for him/her.  Don't cross that line.  It
really won't help the student in the long run.

Most LAs don't have a problem with this issue, but occasionally a difficult
situation does arise.  If you have any questions about this subject or feel
like you may be in a difficult position, talk to the head TA or one of the
lecturers.  If you talk to someone and explain the situation, any problems
will most likely be resolved in your favor.  However, if the head TA or one
of the professors hears something through the grapevine, you will have a lot
of explaining to do.  The best advice is: use good judgement and you won't
have any problems.

\subsection{The Help Queue}
\index{help queue}

When you are staffing the lab, you need to decide whether or not you are going
to use the help queue.  Check the ``On'' or ``Off'' box on the \idx{blackboard}
to let students know how they should get help.  If the lab is busy, you should
probably use the queue because it will be less chaotic.  If the lab isn't
busy, handle the queue however feels most comfortable for you.

When you are using the queue, help students in the order that they have put
themselves on the queue.  At the beginning of the term, students will tend
to put their own name instead of their machine name on the queue.  When you
help these students, remind them to put their machine name on the queue.
Before you help someone on the queue, erase their machine name, so that
if there are any other LAs on duty, they can proceed to help the next person
on the queue.  If you are not using the queue, you should be aware that some
students will still put their name on the board.  If a student does this, 
help her/him and then explain that the queue is off and that she/he should
find an LA and ask for help when this is the case.

\subsection{Bug Reporting}
\index{bug logging}

If you find a dead Chipmunk in lab that cannot be revived by any of the
methods detailed later in this manual, you should report the problem.  The
process of reporting hardware bugs is: notify the instrument room that the
machine is dead and give them any relevant details that you can see, send
mail to the rest of the LAs so that everyone knows that the problem has
been reported, and put a sign on the machine saying that the problem
has been reported.  The sign should have the date and time of the 
bug report, as well as your name, on it.

If you discover what you think may be a bug in the course software or the
problem set code, you should notify the head LA and the head TA immediately.
The sooner that the problem is fixed, the better.  If there is a way that
students can fix the problem themselves, put a note on the ``Bugs and Hints''
section of the \idx{blackboard}.

\subsection{Problem Sets}
\index{problem sets}

The head LA is responsible for making sure that the current problem set code
is loaded on the Chipmunks.  The details on how to load problem set code are
explained in a later section.

All LAs are responsible for doing every problem set.  LAs are given the 
problem sets far enough in advance so that everyone should have done the
assignment before attempting to help students with it.  Although LAs are
sometimes given the solutions before the problem set is due, you should
not depend on getting solutions.  The best way to understand the problems
that students are having with the assignment is to have done the problem
set and possibly had the same problems yourself.  LAs get paid for two 
hours a week to do the problem sets, so do them!  If you find any bugs in
the problem set handout or code, report them to the head TA and head LA.

\subsection{The Sign-Up Sheets}
\index{sign-up sheets}
% 2/5/89 Michael Ernst
% 3/12/80 John Buck - New signup sheets courtesy of Tim Stellmach

% The new (current) way

%The old way

It is the responsibility of the head LA to make sure that the sign-up
sheets in the lab are current.  A new set of sheets should be posted on
the bulletin board every few days.  The procedure is documented here for
completeness.

The new signup sheet stuff is on Athena.  First login into Athena, 
then type:\\

{\tt attach swmpthng}\\
{\tt cd /mit/swmpthng/genericbin}\\
{\tt signup -s {\em day,\,  month\,  date}}\\
{\tt signup -s {\em day2,\,  month2\,  day2}}\\
$\vdots$\\
on Athena.  The sheets will be sent to the printer over in the 6.004 part of the 
lab.  There are a few different options for the {\tt signup} command which are
explained if you type {\tt signup -longhelp}.

%To make new sign-up sheets, type \\
% {\tt print <ta.6001>print\_em.txt} \\
%to Deep-Thought.  The printout can be picked up in the \idx{EECS terminal
%room} (38-344). The combination, which changes each term, is available from
%the head LA or the head TA.

%A new set of sheets should be posted on the bulletin board every few days.

% The problem with using the files in that directory named after days of
% the week is that your name will appear on each one; print\_em gives
% cleaner output.

%  I'm working on a PCL
%program to put the dates on as well and to allow for easy specification of
%just a few days of signup sheets.  Don't hold your breath waiting for this;
%for now, printing the entire file and using the sheets you need is the
%easiest thing to do.  (The problem with using the files in that directory
%named after days of the week is that your name will appear on each one;
%print\_em gives cleaner output.)  This program will probably never be
%written since Deep-Thought is going away soon and so the program (which
%would run only on Deep-Thought) is not worth the effort.
%Michael Ernst, early fall 1988

\subsection{Login Message}
\index{login file}\index{login message}
The head LA is responsible for creating and updating the login message on
the Chipmunks.  The message normally contains course-related information
and announcements about lab policy.  Details about changing the message
are explained in a later section.

\section{The Lab}

% 2/3/90 Paula Ferguson: sections added

\subsection{The Filing Cabinet}

There are two upright \idx{filing cabinet}s near the door to the lab; 6.001
uses the top three drawers of the left one.  Completed \idx{timecards} are
placed in a pendaflex folder in the top drawer of the filing cabinet, which
also contains copies of {\it Don't Panic}, the LA phone list and lab
schedule, current problem sets (sometimes), and other documentation.  LA
signs\index{LA sign/storage}, which are placed on top of on-duty LAs' 
computers, are stored on top of the filing cabinet; the \idx{lost and found}
is also there.  The filing cabinet should be kept locked when no LA is in the
lab; the key can be obtained from the \idx{instrument desk} on the fifth floor
of Building 38 or from the head LA.  Be prepared to work hard to convince the 
desk staff that you are actually an LA and should have a key; be persistent 
and you will win.

\subsection{The Blackboard}
\index{blackboard}

The blackboard at the back of the 6.001 lab is the home of the help queue, the
bugs and hints section, and the LA on Duty sign-in.  LAs should always sign
in on the board when starting a shift.  Read the bugs and hints section to
see if there is anything new about the current problem set and decide whether
or not you want to use the help queue.

\subsection{The Phone}
\index{phone}\index{telephone}

The telephone by the printers is connected to the MIT phone system.  The phone
number is 253-7976.  You
can use it to make calls anywhere on campus, but nowhere off campus.  If the
phone rings and you are not busy, answer it.  Sometimes a student will call
for another student, which is fine.  Don't make a habit of helping students
over the phone; they should come in to lab to get help.  Feel free to use the
phone when the lab isn't busy and no one needs help, but don't spend hours on
it, especially when the lab is busy.

\subsection{The Room Alarm}
% 1/6/89 Michael Ernst
% 2/27/89 Style & typos John Buck

\index{alarm} If the room door is held open for more than about ten seconds, a
high-pitched alarm will whine until you reset it.  To reset the alarm, wave
your hands in the air in front of the alarm box by the door.  Bonus points are
awarded for mysterious hand-waving that convinces the students the alarm is
actually magic.  In reality, the alarm is actually disabled by a motion sensor
which is mounted in the ceiling near the doors.

\subsection{Off-hours access}
\index{off-hours access to the lab}

The 6.001 lab is not open 24 hours per day; except during regularly scheduled
hours the combination lock is disabled.  If it is absolutely, positively
necessary that you get in to the Lab during off-hours, contact the Head TA or
one of the lecturers.  You can also call the Campus Police.  After waiting
for the CPs to show up, convincing them why you need to get into the lab and 
verifying that you are an MIT student, they may let you in.

\chapter{Hardware}

\section{Printers}

Extra \idx{paper} is in the printer cabinets and in boxes under the
tables holding the SRMs.  If there is no paper there, ask someone at 
the \idx{instrument
desk} for access to the closet where the boxes are stored,
and yell at the head LA.

To load paper,\index{loading paper} first make sure the printer is off-line
(the on-line button will toggle the printer on and off line).  Lift the hood of
the printer.  At the left-hand side of the carriage you will find the paper
release lever.  Pull it forward, then slide the paper up through the bottom of
the printer.  Align the paper with the $11\frac{1}{2}$ mark on the top of the
printer.  There are a pair of buttons under the hood (next to the {\sc reset}
button) which can be helpful in making fine adjustments.  Then press {\sc
reset}\index{reset button{{\sc reset} button}}\index{aligning paper} to reset
the \idx{top-of-form} to where the paper is now.  Finally, push the paper
release back into place, bring the printer back on line, and make sure that the
spooler is up.  (See below; taking the printer off line usually stops the
spooler.)

If the ribbon on a printer begins to go dry, get the head LA (or the
\idx{instrument desk} if you're desperate) to get a new ribbon out of the same
closet the paper is in.  A diagram explaining ribbon installation is printed on
the ribbon box.  Once the ribbon is installed, align the paper, press
{\sc reset}, bring the printer on line, and make sure that the spooler is up.

Once the printer is back on-line, you must explain this to the corresponding
SRM by bringing the spooler up: type {\tt sp 6 up}\label{sp6up} at the SRM
nearest the printer.  Printing should then resume at the beginning of the
interrupted job.  Everything that has been sent to the printer since it went
down will still be in the queue, so discourage students from sending multiple
copies of a file if the first one doesn't appear.  If the printer has been down
for a while, you should check and, if necessary, clear the print queue before you
let it start printing.  This is done with the Pascal Filer's Remove command,
which is described on page~\pageref{print-queue} in Section~\ref{print-queue}.
\index{printers}

Sometimes students will complain that the printer isn't working.  Normally this
means that the printing spooler has gone down for some mysterious reason.
Check to make sure that there is paper and the printer isn't jammed.  Typing
{\tt sp 6 up} at the SRM nearest the printer should fix the problem.

% 2/3/90 Paula Ferguson: section added
\section{Graphics Printers}
\index{graphics printers}

The graphics printers are attached to the two Chipmunks near the sign-up
sheets, Todd and Cycle.  When the current problem set requires students
to print out graphics, the head LA will reserve the machines for
``Graphics Printing Only.''  A special program is no longer used on these
machines to print out graphics.  The graphics-printing functions are use
instead.  LAs should note that many copies of {\em Don't Panic} 
incorrectly list the
printing function as {\tt print-graphics-file}.  The correct command is
{\tt print-picture-file}.

If the inkjet printer does not respond when a student tries to print
a picture file, try turning the printer off and then on again.  (The
switch is on the back right-hand side of the printer.)  You can also try
pushing the blue button, labelled with ``Aa'', on the printer.  If one of
the printer runs out of paper, go to the \idx{instrument desk} and ask
for more paper for the inkjet printers.  The printers take a special 
kind of paper; they won't print properly on the paper used by the
regular printers.  If the printer is printing very faintly, the ink
cartridge is either empty or clogged.  Remove the cartridge by lowering
the black lever that holds it in place and lifting it out.  See if there 
is ink in the cartridge.  If so, shake it up, wipe off the printing surface,
and replace it.  If not, get a new cartridge from the top drawer of the 
\idx{filing cabinet} or the instrument desk, and install it.

\section{Chipmunks}

Each Chipmunk is an independent microcomputer and is connected to an SRM
(Shared Resource Module) so it can share files (operating system, the Scheme
interpreter, login pictures, problem sets, etc.) with other Chipmunks.

Each machine has a main computer with a \idx{bus expander} on top, and these
two units have separate power switches.  If for some reason it is necessary to
power down a Chipmunk,\index{powering down chipmunks} {\bf always} use the
switch on the main unit (underneath the keyboard).  Be sure to leave the
Chipmunk powered down for about five seconds before turning the switch on
again; this allows the power supply capacitors to fully discharge.  Don't use
the green switch on the \idx{bus expander},\index{green
switch}\label{green-switch} as this is very likely to throw a circuit breaker.
Use of the green switch causes a power surge, which may trigger the chipmunk
power supply to cause an even bigger surge, which throws the circuit breaker.
This will disrupt service to the other three chipmunks which share the
multiplexor if the multiplexor was on a same power strip served by the blown
circuit breaker.  Aside from these nasty side effects, power-cycling the green
bus expander switch has the same effect as using the chipmunk power: the
computer is completely reset.

\index{circuit breakers} Each chipmunk is on a separate power strip, which is
plugged into its own outlet in the ceiling, which in turn has its own circuit
breaker.  The outlets are labeled with a box and switch number (e.g., 1.15
means box one, switch 15).  If the light on a power strip is out even though
the switch is on, check the circuit breaker.  (Box 1 is on our side near the
signup sheets, box 2 is on our side toward the back of the room, and box 4 is
on the 6.004 side opposite box 1.)  A tripped circuit breaker will have its
switch in the middle rather than to one side.  To reset the breaker, flip the
switch all the way to the off position and then back on.

There is an \idx{brightness} control on the back of each machine (it's almost
hidden by the metal bars that hold it to the table).

When examining seemingly \idx{dead screen}s, try pressing the \key{alpha}
key.\index{\key{alpha}} Also check the {\sc display output} plug\index{display
output plug} at the lower left of the rear of the Chipmunk.

\index{booting/chipmunk} Chipmunks are identified by an SRM name (the top name
on the label) and a machine name (on the bottom).  They are connected to their
SRM in groups of four via \idx{multiplexor}s under the table.  When a chipmunk
refuses to boot, the first thing to check is its connection to the multiplexor;
if this connection is loose (it may not look it, so give it a good shove) the
machine will not talk to its SRM.

Each multiplexor gets its power from one of the four machines to which it is
connected.  If this machine is powered down or its connection is loose, none of
the four will be able to talk to the SRM.  The way to tell which machine
provides power to the multiplexor is to look at the cables connecting them.
There should be three fat ones and one thin one; the thin cable is the one
carrying the \idx{multiplexor power}.

Be careful not to power cycle the machine powering the muliplexor when students
are working on any of the other machines to which it is connected, because 
they will
all lose their ability to talk to the SRM.  If you power cycle the Chipmunk
powering the muliplexor, you must reboot the other three Chipmunks to which it
is connected.

\index{booting/chipmunk} To reboot a chipmunk, type \key{reset} (\shift
\key{pause}); this will clear the screen and leave a little arrow
prompt.\index{prompt/arrow} At this point hitting \key{continue} will make the
Chipmunk continue running as if you hadn't pressed \key{reset}.  Typing {\tt
sb} (using the \key{shift} key to get lower case) and either \key{enter} or
\key{execute} will reboot the machine.

% You can boot to the \idx{games system} by hitting
% the space bar immediately after hitting \key{execute} and then typing
% {\tt 1G}.  

% How do you get there if the machine is already booted?
% How do you get back to the standard system once you're in the games
% system?

Booting one chipmunk takes about six minutes.  Unfortunately, the SRMs are very
slow at communicating with several Chipmunks simultaneously, so booting two
Chipmunks at once takes longer than booting them each one at a time (especially
if they are on the same multiplexor).  The more machines you boot at once, the
worse things get --- four at once on the same multiplexor will take about an
hour.  Booting them all at once, while it takes a long long time, does work.
If you can, boot Chipmunks one a time.  \index{booting/chipmunk}

\index{bug logging}\index{problem logging} If you discover a bug you can't fix,
send mail to {\tt 6.001-la} (so the other LAs know that the problem
was reported), report the problem to the \idx{instrument desk}, and hang a sign
on the machine whose problem was reported.

\index{bad disks}\index{disks/bad}\index{bad disk drives}\index{disk
drives/bad} If you suspect a Chipmunk disk drive is broken, test it by trying a
different disk in it; 6.001 disks seem to go bad at a much higher rate than
ordinary disks.  Formatting a blank disk is a good check of a Chipmunk disk
drive; if the drive is broken, there will probably be an error.  If the problem
turns out to be the disk itself, the files which are on it may be able to be
retrieved by using the Edwin dired\index{dired} feature: instead of using Find
File with the filename, do dired on the disk, move the cursor over the desired
file, and press F to load the file.  It may also be possible to repair the disk
(or at least work around the damage) by using the Pascal Filer Bad Blocks
feature.

\section{SRMs}
\index{SRM<}
% 1/6/89 Michael Ernst

SRM stands for Shared Resource Module\index{Shared Resource Module[see SRM]}.
SRMs look exactly like Chipmunks without Expander Boxes on top.  Students
should never touch the SRMs.  The SRM holds all the code for booting chipmunks
and logging in and out, problem set code, archives, and other randomness.  It
is also the only route to the printer.  If an SRM goes down, its twelve
Chipmunks will be unable to load problem sets, boot, send jobs to the printer,
or even log out!  This is obviously something to be avoided.  Unfortunately, it
is very easy for a random person to discover that typing {\tt system down} will
do exactly that.  Just typing {\tt system up} won't fix it --- once the system
is brought down and up, {\bf all twelve} machines must be rebooted before
things will work normally.  If the an SRM goes down, it must be brought up and
then each machine it serves must be rebooted.  This takes a good long time ---
so don't bring the system down and don't let anyone else do it either!

In addition to {\tt system down} and {\tt sp 6 up} (see Section~\ref{sp6up},
page~\pageref{sp6up}), there are various other not-too-useful commands the SRMs
understand.  You can use the ?~command to look at them ({\tt units} and {\tt users}
are mildly interesting), but don't do anything other than informational commands
without checking with someone who knows first.

On very rare occasions, the SRM itself will crash.  Symptoms of this situation
include complaints by booting machines that the SRM doesn't exist and repeated
communications error messages on the SRM display.  {\em Check with someone who
knows} (the head LA or a Scheme team person) before rebooting the SRM.  If you
must reboot an SRM,\index{booting/SRM} find a disk labeled ``SRM.'' Such a disk
lives in the right-hand drive of at least two of the SRMs, and usually all
four.  Power down the SRM, insert the disk in the right-hand drive, power it up
again, and answer questions about the date and time.  If the disk fails to spin
up the first time (the SRM will print a big warning message if this is the
case), type {\tt system up}.  If this fails to bring the SRM up, there is a
{\em real} problem --- notify the Head TA immediately!  Once the SRM has
recovered, all twelve of its Chipmunks must be rebooted as with {\tt system
down}.  This takes about an hour and a half if you do them all at once.
\index{SRM>}

\chapter{Software}

% I think that PSL has been removed from the new system.  I'm only
% 99 percent sure of this, so I won't change this for the time 
% being.      -Luis  12/15/88
% Luis was right.  PSL existed only to run NMode, though it had some
% pleasant side effects such as the maintenance of the ramdisk.  PSL
% is now gone.   -Michael Ernst 1/23/89

\section{General Software Setup}
% 1/30/89 Michael Ernst

The chipmunk system is built in several levels of interpretation.  At the
bottom level is an assembly-level debugger (also known as the monitor) written
in the machine code of whatever chip runs these things.  (This debugger, which
is not very useful, should not be confused with the Scheme debugger.)  On top
of this is a Pascal system, which seems to be complete and working and actually
useful, even if you don't know Pascal.  The Pascal system is an operating
system shell for manipulation of files and execution of programs.  Scheme runs
in this system.

Edwin (and much of scheme itself) is written in Scheme and runs in the global
environment.  The student environment, where you'll spend most of your time, is
a child of the global environment into which much (but not all; see section
\ref{glob-stud} on page \pageref{glob-stud}) of the global environment is
copied.  If you poke around Edwin or Scheme (with {\tt (debug)} or {\tt
(where)} or whatever), you will discover that most of it is written in Scheme.
Exceptions are primitive procedures and graphics routines, which are written in
Pascal and exist as compiled code; additionally, as much of Scheme (and Edwin)
as possible has been compiled to enhance performance.

% \section{What to do with it all}
% Modified  Luis Rodriguez  12/15/88
% 1/6/89, 1/23/89 Michael Ernst

Some of these various stacked systems are useful and some aren't.  We will
discuss the things you should know about them all, starting from the top:

\section{Scheme}
% 1/6/89, 1/23/89, 1/30/89, 2/15/89 Michael Ernst
% 2/28/89 John Buck

This section deals chiefly with the student version of Scheme.  For information
on the Scheme in which Edwin and other parts of the system are written, see
section~\ref{bare-scheme}, page~\pageref{bare-scheme}.

All LAs should know how to use the Scheme debugger!  As a LA you will spend the
majority of your time finding bugs in other people's code, so experiment with the
\idx{Scheme debugger}\index{debugger/scheme} --- use {\tt ?} to list its
commands and try them all.  Strongly encourage students to learn its use {\em
early} in the term --- it will make life survivable when they get to the later
problem sets.

% 2/5/90 Paula Ferguson: addition

For some inexplicable reason, the Chipmunks seem to crash more often when
a student uses the debugger.  When you are going to help someone using
the debugger, encourage her/him to save any work before entering the
debugger.  Although the Chipmunk may not crash, if it does the student
will be grateful that no work was lost.

The Scheme debugger started up by the {\tt (debug)}\footnote{To invoke the new
debugger, use the \idx{Browse Continuation} command from Edwin.  Another method
of invoking it is to evaluate the form {\tt ((access start-debugger
debugger-package edwin-package))}, which explicitly calls the start-debugger
function\index{start-debugger{{\tt start-debugger}}}, which isn't visible from
the student envrionment but must be accessed from the debugger environment,
which is itself in the edwin envrionment.  A \idx{package} is a private
envrionment whose symbols may or may not be exported (bound) outside the
package.}\index{access{{\tt access}}} command in Scheme is an older debugger
with basically the same functionality but a different (mostly poorer) user
interface.  One difference is that in the older one, {\tt
break}\index{break{{\tt break}}} works, and there is also a proceed option.

The \idx{stepper}\index{single-stepper} is currently in limbo but may be
restored at a future date.

% Other debugging tools at your disposal include a Scheme
% single-stepper, which is described in the ``Adventures In Debugging''
% attachment to Problem Set 1.  Unfortunately, the
% \idx{single-stepper}\idx{stepper} doesn't work with the current
% version of the Chipmunk software.  Breakpoints, another debugging
% feature, work only in the version of scheme which can be entered by
% executing {\tt (debug)}.

The {\tt trace}\index{trace{{\tt trace}}} procedure, a Scheme primitive, is
almost as useful. Also look up and experiment with {\tt
where},\index{where{{\tt where}}} the \idx{environment inspector}.

If you ever have questions about the debugging tools, please ask an experienced
LA.  The quicker you can locate and understand bugs, the more effective (and
less frustrated) you will be as a LA.  Experienced LAs will be more than happy
to help you.

Every now and then, Scheme will crash.  When this happens
 % (almost
 % always while attempting to go back and forth between Scheme and Edwin)
 the computer will say ``Scheme Microcode 5.12 / Band to Load:'' and sit
there quietly waiting for the magic word.  The magic word is {\tt
\#5:/SCHEME/BANDS/STUDENT}; the new system, however, knows which band
should be loaded, so you need only press the \key{enter} key.

That band is the student band, a file which contains the standard student
version of Scheme.  A band contains all the Scheme code for a particular Scheme
environment, but not the machine code for primitives.

Once the band is finished loading, a login picture (see
page~\pageref{login-pic} in Section~\ref{login-pic}) will appear on the screen.
The student's work will be lost and the machine will be in a fresh state.

% However, the student can log back in in the
% usual manner and all the Edwin buffers will still be perfectly intact.
% Since Scheme was reloaded, the environment will be totally fresh and
% all problem set code will need to be rezapped, but nothing will be
% lost.

If you need to straighten out a balking machine or clean up the Scheme
environment when things get confused, you can force the student band to be
reloaded.\index{band/reloading} At a Scheme prompt, do {\tt
(enable-language-features)} \key{enter}, then {\tt (disk-restore
"\#5:/scheme/bands/student")}.  Reload the student band if Scheme has become
confused but the operating system is fine, a complete reboot is not necessary
in thais case.  For instance, if someone reset {\tt car} to {\tt cdar} in the
global environment\footnote{One way of doing this would be to execute the form
{\tt (set! (access car '()) cdar)}; in an {\tt access} form, {\tt '()}
represents the global environment\index{access{{\tt access}}}} ({\em not} the
student environment --- changes to that are undone by executing the
\idx{Logout} command from Edwin), this would be appropriate.

% This is done by first executing
% {\tt (enable-language-features)}, then executing {\tt (logout)}.

\label{glob-stud}
\index{enable-language-features{\tt enable-language-features}}
\index{disable-language-features{\tt disable-language-features}}
The function {\tt enable-language-features} and its foil, {\tt
disable-language-features}, take an optional argument, a string which
will be used as the prompt while in that mode.  If someone decides to
change the prompt\index{scheme prompt}\index{prompt/scheme} on their
machine to something like {\tt 6001sucks>}, you should probably change
it back.  Basically, these functions erect and dismantle a block
between the student environment and the global environment; when
language features are enabled, functions in the global environment
that are normally not available to students can be called directly.

When language features are enabled, the Chipmunks run a version of
Scheme compatible with the R$^3$ Report\index{R3 Report{R$^3$
Report}}.  Among other features, in the R$^3$ mode the Chipmunks
recognize the backquote, comma, and atsign characters\index{backquote
reader macro}.  The {\tt call-with-current-continuation} function is
enabled as well.  The file {\tt \#5:/scheme/scm/studen.scm} contains a
list of the functions in the student environment: first those whose
names are different from the corresponding function in the
global environment, then those with the same name in both
environments.  Some functions have syntax differences in the two
environments as well.  There is no explicit list of the functions in
the \idx{global environment} which are not accessible in the
\idx{student environment}.  The student environment, which is a
limited copy of the global environment, is recreated each time someone
logs in (to prevent any student's modifications, which will almost
always be confined to the student environment, from affecting the next
student).  This works well unless the global environment is somehow
changed, in which case the band must be reloaded to completely
reconstruct the global environment.

The Scheme {\tt read}\index{read{{\tt read}}} function does not work properly
in the student version of scheme which is run under Edwin because the
underlying (`bare') scheme captures the read request, returning control to
Edwin after the user has entered an expression.  Since \idx{bare scheme}'s idea
of the current cursor position is different from Edwin's idea of the current
point, the evaluating a {\tt (read)} construct can cause the cursor to jump to
another location on the screen to read the input, causing confusion to the user
and perhaps a loss of displayed information.  Since the input was read by bare
scheme, Edwin does not know that its control of the screen was interrupted, and
so it does not refresh the screen.  Of course, no internal data 
is lost, but the
effect is disturbing.  The solution is to use the function {\tt
read-from-keyboard},\index{read-from-keyboard{{\tt read-from-keyboard}}} which
takes care to remain in Edwin and read from the current point.  There is a
subtlety here: the user may type anything he likes, and in fact edit buffers
normally, but as soon as the \key{execute} key is pressed, the preceeding form
is evaluated and used as the value of the {\tt (read-from-keyboard)} form.  The
result may thus come from a different buffer than the one in which the read was
executed.  If a student forgets that a read is in progress and attempts to
evaluate a form by pressing the \key{execute} key after it, the result may be
different than expected because the form has been sent to the function which
called {\tt read-from-keyboard}.  Neither \key{abort} nor \ctrl \key{g} will
abort this type of read.  Cancel {\tt read-from-keyboard}
by typing \key{a}\key{b}\key{o}\key{r}\key{t}\key{execute}; Edwin will return
to its top-level loop above the calling read-from-keyboard, and the call to
read-from-keyboard will never return.

\section{Edwin}
% Modified by Luis Rodriguez  12/15/88
% 1/26/89 Michael Ernst
% 2/28/89 John Buck

Edwin is a version of Emacs and almost all Emacs commands work in Edwin.  Most
LAs find it easier not to use the \idx{function keys} at the top of the
keyboard, but this may confuse students.  (Note, however, that now both the
function key and the equivalent ctrl or meta keystrokes are included in the
student manual.)  Many students don't realize that Edwin is a version of Emacs;
more sophisticated students can use this information to their advantage.  As an
example, there are four ways to invoke Save File: by pressing the meta
prefix\index{meta prefix key} (the \key{run} key) and X and then typing {\tt
Save File}, by pressing \key{extend} (which is equivalent to typing
\meta{\key{X}}) and then typing {\tt Save File}, by pressing \kkey{0},
or by typing \ctrl{\key{x}} \ctrl{\key{s}}.

As with Scheme, there are things in Edwin that it would be helpful to know that
you might not have picked up as a student in 6.001.  One such thing is the use
of the kill ring.  Observe how the delete and recall commands work; this is
probably the easiest way to move code within a buffer or back and forth between
buffers.  You should also teach students how to use the {\tt Select Buffer} and
{\tt Browse Buffer} commands; the earlier they learn this, the easier the term
will be for them and for you.

There are four ``hidden'' characters\index{hidden characters} on the
\idx{keyboard}; these are `, \verb/|/, \verb|\|, and \verb|~|.  They can be
obtained by pressing the shift key simultaneously with, respectively, the
\key{E}, \key{(}, \key{)}, and \verb|^| keys; these four keys are
found at the top of the chipmunk \idx{numeric keypad}.

`Named' Edwin commands (those which are specified in this manual with a
preceeding \key{run} \key{x}), are invoked by pressing the \key{meta} key
(labeled
\key{run}), then \key{x}, then typing the command name.  There are several
other ways to invoke them as well, particularly when the command is
also bound to a key.  For instance, Indent Region can be invoked by using the
\key{extend} or \meta \key{x} prefix keys and typing {\tt Indent Region}, or by \ctrl{\key{z}}
\verb|\|.  Typing \ctrl{\key{z}} simply sets the meta and ctrl prefixes for the next
character typed (that is, \ctrl{\key{z}} \key{{\it n}} is equivalent to
\meta{\ctrl{\key{{\it n}}}}), so \key{run} \ctrl{\verb|\|} would also work.

Useful commands include \ctrl{\key{l}}, which refreshes the screen and
repositions the text so that the line with the cursor is at a specific point on
the terminal screen.  \ctrl{\key{x}}~\key{p} (\idx{print buffer}) sends the
current buffer directly to the printer.  \ctrl{\key{x}}~\key{v} invokes the
\idx{reverse video} command.

The \idx{indentation} characters are very useful for debugging code.
\key{Tab}\index{tab} causes the line containing the cursor to be correctly
indented with respect to the previous line.  \meta \ctrl \key{q} runs
Lisp-Indent-Sexpr: it indents each line of the following form
(s-expression) and is extremely useful.  This command can be used in
place of Indent Region, which is missing from Edwin.  With some
practice, you will be able to tell whether parentheses are properly
matched just by looking at the indentation; in fact, this is by far
the fastest way to debug a student's code.

The region is the area between the cursor and the mark; \ctrl{\key{x}}~\ctrl{\key{x}}, the
exchange point (point is where the cursor is) and mark command, will
show you where the mark is, and \ctrl{\key{space}} will set it.

Edwin has lots and lots of on-line documentation; you are encouraged to use
it.  If you spend some time with Edwin using the \ctrl{\key{h}} commands (for
instance, \idx{Apropos} is \ctrl{\key{h}}~\key{a}), you will doubtless discover many
useful commands and learn the control keys that correspond to all those
ugly \idx{function keys} across the top.  (The \key{run} key corresponds to
the \key{esc} key on an ``ordinary'' keyboard -- this is 
the meta prefix key.  Better
keyboards have meta keys that act like ctrl or shift keys and are pressed
in conjunction with one or more other keys.)  Also try \ctrl{\key{\{}} and
\ctrl{\key{\}}}, the esc (not to be confused with the \key{run} key, which
is a meta prefix key) and lisp prefix characters.

Info\index{info} is also installed on the SRMs.  Use \ctrl{\key{h}}~\key{i} or M-X Info to invoke
it.  Be careful when loading it, as its files are large.  If you have too little
heap (for example, because you have too many large buffers), you may get into an
infinite garbage collection when you load an Info file.  This problem may be fixed
in the future, but just be careful for now.

You can recall the previously-evaluated s-expression \index{previous s-expression}
by doing \ctrl{\key{c}}~\ctrl{\key{y}}; this is very useful in interaction mode, and students often
try to simply use \ctrl{\key{y}} (or the \key{recall} key, \kkey{something})\index{recall
key{\key{recall} key}}
to perform this function.  \ctrl{\key{c}}~\ctrl{\key{r}} goes backward (the other direction) in the
s-expression ring. 

If you can't find an Edwin command you think does exist, try looking for it
with a name beginning with ``\^{}R~'', like ``\^{}R Indent Region''.  This is a
carry-over from early versions of Emacs, where commands which were usually
bound to keys were given names with that prefix so that, when you did
completion on the name of an Emacs command, those functions wouldn't show up
(since you probably weren't looking for them, since they're available
directly from keys).

% Arthur says:
%  I don't like that feature, and expect it to go away
% when Edwin comes up on our unix machines.  However, I'm not going to change
% that on the Chipmunks.

\key{run} (the meta prefix character) behaves as it does in Emacs.  Do \ctrl{\key{h}}~\key{m}
in Scheme mode to see some commands which use the \idx{Scheme prefix}.

\idx{Enable Dangerous Keys}\index{dangerous keys[see Enable Dangerous Keys]} also
lets you use \meta{\key{,}} to run the terminal program (if it is loaded already, which it
isn't on the machines in the 6.001 lab, to save memory) and \meta{\key{$+$}} runs an inferior
filer process (which also isn't loaded, to save memory).  These can also be invoked
from the Pascal Command Line, which is explained in the section on the
Pascal System. 

Around problem set two or three, you will be swamped with questions
from students who have loaded a problem set file from the SRM (these
files are identified by the {\tt \#5:} directory name), modified it
and then used Save File to try to save their work.  The problem is
that Save File tries to update the same file that was loaded in in the
first place, but the students obviously can't update the copy that's
on the SRM; instead they need to use Write File to save the file to
their own disk.

\index{open channel}\index{channel, open[see open channel]}
The big problem with all this is that the Chipmunk is not very smart about this sort
of thing.  It opens a channel to the SRM to make the update, discovers it can't, and
doesn't bother to close the channel.  If there are too many channels left open to
the SRM, nothing will work and the system has to be brought down.  So strongly
discourage students from making this mistake, and don't make it yourself either!
The number of open channels is displayed in the upper right corner of the
SRM's screen.

The maximum number of open channels on an SRM is 250. 
If the number of open channels is close to that number, do the
following to lower the number (so as to avoid nasty problems):
Go to an SRM and type in {\tt users}.\index{users command}  This gives a list of the
unit and node numbers of each machine.  Find a machine that is not being used
by anyone, and {\tt remove}\index{remove command} it from the system by typing 
{\tt remove <unit> <node>} at the appropriate SRM.  The number of
open files should go down.  There is no way to tell (as far as I know)
how many files a Chipmunk actually has open (the number displayed by
{\tt users} is NOT accurate).  Please note that the node number
shown by {\tt users} refers to the unit number on the actual
machine.
\index{open channel}

The open channel problem which resulted in too many open files (this was the problem
with printing which was caused by the nonexistence of a necessary file) on the SRMs
was supposedly fixed in November 1988.

% I haven't seen this happen in a long time now.  -Luis  12/15/88
% Commented out Michael Ernst 2/2/89

%    Every now and then, Edwin crashes too --- usually while going back and
% forth between Edwin and Scheme, or when trying to log out.  When Edwin
% crashes, you will get a message saying ``Edwin break loop'', sometimes
% something about a non-continuable error, and a prompt with a number in
% front of it.\index{prompt/number}

%    What this means is that Edwin has crashed and you have been dumped
% somewhere in the middle of PSL (Portable Standard Lisp), the
%language Edwin is written in.  Exit from PSL (see page~\pageref{psl} in
% Section~\ref{psl}) and after returning to Edwin have the student {\bf
% immediately} save his files.  This is because once you've hit a break loop,
% things are going to be unstable, and it might happen again.  Each time it
% happens (and it probably will happen again soon) the odds of getting out
% alive decrease.

\section{Bare Scheme}
\label{bare-scheme}
\index{bare scheme}\index{prompt/bare-scheme{bare-scheme}}\index{scheme/bare[see bare scheme]}

Edwin is itself written in scheme, except for some Edwin-specific primitives which
are written in assembly; scheme itself is written in the same style.  To get to the
scheme in which Edwin runs, do M-X \idx{Enable Dangerous Keys}, then press \ctrl{\key{x}}~\ctrl{\key{z}}.  Bare scheme is itself a 6.001 scheme, so all scheme features should work
in it.  It has a debugger without the full-screen user-interface,\index{debugger/no
full-screen interface} and in this
debugger breakpoints do work.  However, there is no editor interface for bare
scheme.  This version of scheme is so much less convenient that you probably will
never want to work in it.  To return to Edwin from bare
scheme, press the \key{edit} key\index{edit key{\key{edit} key}} in the upper right
corner of the keyboard.  The prompt displayed by bare scheme is \\ {\tt
Bare-Scheme:press-the-EDIT-key-to-return-to-Edwin==>}

% \section{Portable Standard Lisp or PSL}

% \label{psl}\index{Portable Standard Lisp}\idx{PSL} is utterly useless, at
% least as far as we know right now.  The only known way to get there on
% purpose is \key{lisp}-L from Edwin, and once you're there all there is to
% do is come back.  Since you are talking to a Lisp, albeit primitive and not
% at all like what you're used to, there are a couple of logical ways to get
% back to where you came from.  They are, as a matter of fact, {\tt (edit)}
% and {\tt (Edwin)}.  Type one of these and press \key{enter}.  If you're not
% in PSL on purpose, it's almost always bad.

%  The mere existence of this
% system is yet another unexplained mystery of the Scheme universe.
% I don't think PSL is used at all by the new system.  I think the
% links to it may just be there for some contorted idea of compatibility
% (with what, I don't know)  -Luis   12/15/88

\section{The Pascal System}
\index{Pascal System<}
% Put a bunch of stuff into {\tt} mode.  Replaced eXecute SCHEME with
% {\tt X SCHEME}  John Buck 2/27/89

\index{error/Pascal trap in Scheme}
The Pascal System, which runs everything discussed so far, is eminently useful.  It
ordinarily does not make itself known to students; occasionally, however, you may
get a Pascal error: \\ 
{\tt ~~~[Pascal trap in Scheme; \ldots ]} \\
{\tt ~~~Should a \idx{scheme abort} be attempted? (Y or N, default Y)} \\ 
If this happens, press Y.  The question is not whether the scheme program (run by
the Pascal system) should be aborted; rather, this message indicates a serious
problem and is asking whether control should be passed back to a potentially trashed
scheme system in the form of a scheme error.  This is precisely what you want.
Get out of the scheme debugger, save work where appropriate, and then reboot the
machine:
it is in an unstable state and is very likely to crash again.  A second Pascal trap
is even less likely to be recoverable than the first.

\subsection{How To Get There}
% modified by Luis Rodriguez  12/15/88
% Michael Ernst 1/8/89

There are several ways to get to the Pascal system; if you discover others,
please document them here.

\begin{enumerate}

% \item In Edwin, do M-X Enable Dangerous Keys, followed by M-X
% Invoke Pascal Filer.  This leaves you with just the filer rather than
% the whole system but the filer is by far the most useful part.  To get
% back, just use the filer command Q (Quit).

\item In Edwin, do M-X Enable Dangerous Keys, followed by
\ctrl{\key{x}}~\ctrl{\key{z}}, which is the Edwin exit-to-superior command.
This will give you the Command line of the Pascal system.  You can get to
the filer by typing {\tt F} (Filer); in the filer typing {\tt Q}
(Quit) will take you 
back to the command line.  (If typing {\tt F} doesn't get you the filer, but
instead gets you a message like {\tt SYSTEM93:FILER: file not
found},\index{error/file not found} the machine probably needs rebooting.)

To get back to Edwin from the command line (students will occasionally find
themselves stuck here somehow), type {\tt X} (eXecute), then when it
asks you what file to 
execute, just type {\tt scheme} and then \key{enter}.  The chipmunk should pop back
into Edwin faster than you can blink.  If it doesn't, but instead says something
disagreeable, like {\tt SCHEME.CODE: file not found}, then rebooting is
necessary.\index{error/file not found} If scheme.code isn't found, you can, instead
of rebooting, try \#5:/scheme/bands/student.  This is pretty futile, however, since
the student's work is lost and doing this seems to give you a brain-damaged version
of the system.

% it is very confused about who it is and what its purpose in life is, and
% needs some serious therapy and consciousness raising (rebooting generally
% works best; you can try a long heart-to-heart talk but its effectiveness
% may be limited).

\item Also from Edwin, do {\tt M-X Enable Dangerous Keys}, then \ctrl{\key{x}}~\ctrl{\key{c}} to exit
Edwin and get directly to the command line.

\item From the monitor (assembly-level debugger), which is described below, use
the \key{stop} key, more easily located as \shift{}\key{clr-i/o} --- the \key{clear-i/o} key is a function key at the very
top right of the keyboard, above the numeric keypad.  This will leave you
at the command line.  Doing {\tt X SCHEME} (see preceding paragraph) will put
you back into a hopefully thriving Edwin.  If you have used this method to
wake up a stuck machine, have the student {\em immediately} save his files
and move to another machine, because you can be fairly certain that next
time you try to leave Edwin, the machine will go away and not come back.  Now, this
method is anything but foolproof, and it may turn out that this whole section is a
lie as I haven't been able to get this trick to work recently.
\end{enumerate}

\subsection{The Command Line}
% I changed a lot of `eXecute PSL's to `eXecute SCHEME'  MDE 1/8/89
% Changing eXecute SCHEME to X SCHEME, with {\tt}  John Buck 2/27/89

The main point of going to the command line is to get back to Edwin via
{\tt X SCHEME}.  Unless you are into Pascal, most of the rest of the commands
are not much help.  Nevertheless, feel free to try them out.  If you get to
a prompt and you don't know what to say, entering a blank line will take
you out of it.

\subsection{The Pascal Filer}
\index{Pascal Filer<}
\index{filer[see Pascal Filer]}
%  Again, {\tt} where needed.  John Buck 2/27/89

{\tt M-X Pascal Filer} doesn't work because the inferior filer process isn't
loaded, to save memory. Instead, get to the filer by pressing {\tt F}
at the Pascal Command Line

The filer is by far the most useful part of the Pascal system.  You should
sit down and experiment with its commands yourself (they are listed across
the top of the screen; hit ? to see more of them and enter a blank line to
get out of any prompt you don't like); the most important
ones are listed here.

{\tt L} is for List directory.  In addition to listing the files in
whatever directory you specify, it tells you lots of other good things
like how big they are, when they were put there, and how much space is
left on the disk.  Edwin's Dired doesn't give you this sort of info --
the Pascal Filer is the only way to find out for sure if a disk is
full.

{\tt B} does a Bad sector check on a disk.  This takes a long time but is worthwhile if
you suspect a disk is bad.  A bad sector check is also a good way to test a
chipmunk's disk drives (if you know that your disk is good).  [If you discover a way
to abort this command let me know --- there probably is a way but I've forgotten.]

{\tt V} tells you the names of all the Volumes (directories)
on line, including the SRM and both floppies.  The SRM is usually
referred to as \#5: rather than by name.

{\tt K} stands for Krunch,\index{Krunch} which is very important.  Sometimes a
disk will have plenty of space but won't have enough of it in one place to
write a file.  Sometimes the disk will only THINK it doesn't have enough
space in one place to write a file.  Either way, Edwin will say that it is
``Unable to write file''.\index{error/Unable to write file}  When this happens, the disk
needs
to be crunched.  When it asks you for the name of a directory, be sure to put the
colon on the end of the disk name.

%   Sometimes, when a student attempts to go to Scheme from Edwin, the
%machine will beep and refuse to do it.  If you look closely, you will
%see that there is a message at the bottom of the screen that reads
%``Unable to write file: RAM:FROMEDIT.ZAP''.  This means, oddly enough,
%that the directory \idx{RAM:} needs to be Krunched.  (Yes, RAM: is a
%directory; see the V command, above.)  Do this and everything should
%happen smoothly after that.  This will also solve some cases of
%machines refusing to log out and dropping into the Edwin break loop
%instead.
%
% The new system doesn't have a ramdisk  -Luis  12/15/88

\label{print-queue}
 The {\tt R} command, for Remove, is what's used to clear the queue on the
printer\index{printer queue}\index{queue/printer} when it is backed up.
The \idx{printer queue} can be seen by doing List-directory {\tt \#5:/LPT}.
If the person using, shall we say, the machine named Maid has sent eight
copies of his file to the printer, you can remove them all by asking it to
remove the file {\tt \#5:/LPT/MAID-=}.  If the printer has been down for a
long time, so that many of the printouts are outdated or there are too many
of them, just remove the file {\tt \#5:/LPT/=}.  As you may have guessed, =
is a wildcard for this filer.

   Whatever you do, {\bf don't, don't, don't} accidentally remove {\tt
\#5:/LPT} rather than \\ {\tt \#5:/LPT/=}.  This will remove the directory
itself, rather than all the files in it, and if {\tt \#5:/LPT} is removed,
nothing can print through that SRM.  Unfortunately, while that particular
directory can be removed by anyone, it can only be put back by the head LA
or a Scheme wizard.  If you do make this mistake, call one of the above.
\index{Pascal Filer>} \index{Pascal System>}


\subsection{Kermit}\label{kermit}

%%% 12-15-88 Michael Ernst
%   2/27/89 John Buck {\tt } where needed
% 2/5/90 Paula Ferguson; new info abour Kermit

Kermit, when invoked on the specially-equipped LA machine Zebulon, 
allows for the
transfer of files between the Chipmunk and a computer network, like 
Athena.  The connection from the Chipmunk to the network is via MITEE-Mouse,
a terminal concentrator which, if working properly, will allow logins almost
anywhere on campus.

%Kermit, when invoked on the specially-equipped LA machines, allows for the
%transfer of files between the chipmunk and Deep-Thought (or whatever machine the
%chipmunk is attached to).  

From the Pascal System, do {\tt X \#5:/KERMIT} to execute the Kermit program.
When it is ready it will clear the screen.  Press Kermit's interrupt character,
\ctrl{\key{execute}}, to get to the {\tt Kermit-9000s200>} prompt.  
Type {\tt SET BAUD 4800} to set up Kermit (you must do this every time you restart Kermit 
from the Pascal Emulator, even if you already have an open connection).
To connect to MITEE-Mouse, type {\tt CON}.  The screen will clear once
again.  Type \key{enter} to get MITEE-Mouse's attention and you will get
a prompt.  Type {\tt connect machine-name} to connect to a remote machine.
To get back to Edwin, type \ctrl{\key{execute}}
to get to Kermit, enter {\tt Q} to get back to the Pascal System, and
execute scheme (that is, press {\tt X}, then type {\tt SCHEME}; you
shouldn't need to specify a volume name before the program name).
Alternately, you can use the \key{stop} key (which is also the
\shift{}\key{clr-i/o} key), to get to the Pascal System from Kermit.

To use Kermit to transfer files,\index{file transfer} start Kermit on the
Chipmunk, use MITEE-Mouse to connect to a remote machine, and execute the 
Kermit program on the remote machine.  You should execute Kermit
from the directory where you want to transfer files.  This Kermit is a separate
program which runs entirely on the remote host.  Type {\tt server} in 
response to the {\tt C-Kermit>} prompt.  Go back to the Chipmunk Kermit
prompt (using \ctrl{\key{execute}} and use {\tt send} or
{\tt get} to transfer files.  Both commands take two file names as 
arguments: the first file name is the name of the file on the remote
machine and the second is the name of the file on the Chipmunk.
When you are finished, type {\tt FINISH} or {\tt BYE} from the Chipmunk
Kermit to exit the server and then reconnect to the remote machine by typing
{\tt CON}.  You can then exit Kermit on the remote host and continue
working on the remote machine or logout and return to the Chipmunk.

%Finally connect to Deep-Thought again, press \ctrl{\key{c}} to get the {\tt Kermit-20>} prompt
%again, and quit out of Kermit.  You can also use the {\tt BYE} command from the
%chipmunk Kermit program; it shuts down the remote server and logs you out of
%Deep-Thought as well.

%The specially-equipped LA machines are Taurus and Maid, which are both connected to
%Deep-Thought, and Zebulon, which is connected to MITEE-Mouse, a terminal
%concentrator which, if working properly, will allow logins almost anywhere on
%campus.  [Describe how to use MITEE-Mouse.]
%  Is MITEE Mouse hooked up?  It has been a really long time since
%  I've seen it.  (like since Fall 86)  John Buck 

\section{The Monitor or Assembly-Level Debugger}
\index{assembly-level debugger}
% 1/27/89 Michael Ernst

To get to this debugger, press \shift{}\key{pause}, otherwise known as
\key{reset}.\index{reset{\key{reset}}}

The \key{continue} key will put you right back where you came from.
Another way to exit is to hit \shift{}\key{clr-i/o}, as described above;
this takes you to the Pascal command line.  And, there's soft rebooting
(type {\tt sb}, using \key{shift} to get lower-case letters).

Another monitor command that sometimes unwedges the Chipmunks
is {\tt EC 0}.\index{EC 0{{\tt EC 0}}}  I think EC stands for Escape Code.
This seems to work in some instances when the machine is hung and all that
can be done is to enter the assembly-level debugger; {\tt EC 0} is less
destructive than soft-booting and may put you back in a working version of
Edwin.  Be warned, however, that like some other fixes, this is not
guaranteed to work, and even if it does, the Chipmunk is likely to fail
again.  It is a good idea to use {\tt EC 0} to save one's work, then reboot
the chipmunk.

The main use of this debugger derives from the fact that the \key{reset}
key overrides everything else.  Even if the rest of the keyboard is
completely frozen and the machine is hung up in the middle of Scheme
never-never land and \ctrl{\key{g}} gives you nothing but a picture of a bell at
the bottom, \key{reset} may still get you a response.  Then you can go to
the Pascal command line, and from there to Edwin, and the files should be
saved.  However, you won't get away with this twice; have the student save
his/her work and move to another machine.

If per chance hitting \key{reset} doesn't get you a response, then everything is
hopeless and the machine must be powered down\index{powering down chipmunks} (use the lower
switch, not the upper one!) and back up.  Always wait five to ten seconds between
powering down and back up (to let capacitors completely discharge, etc.).  This
should take five to ten minutes.  If this doesn't work, report the problem to {\tt
6001-la} and the \idx{instrument desk} and put a sign on the machine.  
Be sure to warn students not to try
this themselves:  they may not allow enough time between powerdown and powerup, they
may press the wrong switch, and they also don't know enough about the system to save
themselves in a less extreme manner.  See section \ref{green-switch}, page
\pageref{green-switch} for a description of what may happen if the green swictch on the bus expander is
used.  (In short, don't.)

\section{Graphics}
\index{graphics printers}

A special program is no longer used on the \idx{graphics terminals} to print
out graphics.  The graphics-printing functions are used instead.  The graphics
commands are {\tt load-picture}, {\tt store-picture}, and 
{\tt print-picture-file}.  Note that {\tt print-picture-file} is what prints
the specified graphics file on the inkjet printer, not 
{\tt print-graphics-file}. 
The \key{print graphics}
key\index{print graphics key{\key{print graphics} key}} has been
disabled to prevent students from wedging the system by trying it on
machines without \idx{ink jet printer}s.\index{printer/ink jet} 

\subsection{Login Screen Pictures and Message}
% 1/27/89 Michael Ernst

\index{login screen}
\label{login-pic}
The login screen pictures are in {\tt \#5:/scheme/logscr}.  {\bf Don't
put non-picture files in that directory, as the login procedure
assumes that any file there is a picture file.} I don't know their
format, but they are generated with the procedure {\tt store-picture},
which writes the current graphics screen to the file given as
argument.  

%  Added  Luis Rodriguez 12/15/88

\index{login file}\index{login message}
The head LA is responsible for setting up the message that is printed on
login.  It is located in the file {\tt \#5:/scheme/greeting} and ususally
contains course-related information.  In order to change the file, it is
necessary to delete the old file and replace it with a new file.  Although
the login message is a good place to put announcements, students seldom 
read it.

\section{Problem Set Code}
%  Modified by Luis Rodriguez  12/15/88
%  Michael Ernst 1/13/89
%  John Buck 2/27/89   Minor typos

\index{problem set}
 The files loaded for each problem set are specified by the file {\tt
\#5:/scheme/probsets.scm}, which defines the scheme variable {\em
problem-sets}.  The format of {\em problem-sets} is (default-ps-name
ps-specs), where each ps-spec is of the form (ps-name mode-lists) and
each mode-list is of the form (mode filenames).  Each file specified
is used according to the related mode.  The valid modes are:

\begin{description}
\item[load] The file is loaded into scheme.  This mode can be used
with binary files.
\item[reference] The file is placed in an Edwin buffer.
\item[load\&reference]  The file is loaded into scheme and placed in
an Edwin buffer.
\item[copy] The file is to be copied onto the student's disk.  This
mode is usually used either for answer files or in conjunction with
the load mode.  The file is also placed in an editor buffer.
\item[select] A single {\em buffer} name follows this keyword; that buffer is the
one selected when the problem set is done loading.  The default is {\tt "*scheme*"}.
\end{description}

The modes may appear in any order.  Problem set names may be any
symbol or number.  A partial example follows:

\begin{verbatim}
(define problem-sets
  '(10a
     (1  (copy "ps1-debug.scm") (load&reference "ps1-debug.scm"))
     (picture (load "picture.bin"))
     (2  (copy "ps2-2.scm") (load "ps2-2.scm" "ps2-1.scm"))
...
\end{verbatim}

The problem set files themselves are in {\tt \#5:/psets} ({\em not}
{\tt \#5:/scheme/psets}).

The head LA is responsible for loading new problem sets onto the Chipmunks
throughout the term.  
To add a new problem set, simply add the problem set code files to 
{\tt \#5:/psets} and
modify  {\tt \#5:/scheme/probsets.scm} to include the new files.  To change
the file, you have to delete the old version and replace it with a new one.
Note that the files are loaded in right-to-left order.  The code must be 
loaded onto each of the four SRMs.

\section{Software Changes}

This section is for the use of LAs who may recall the days when the system
was different (and LAs were called Lab TAs).

The Edwin prompt is now {\tt ==>}.\index{prompt/=={{\tt ==>}}}\index{prompt/Edwin}

Load Problem Set loads into the correct environment.  This should
eliminate some of the variable-shadowing problems students had with the
last problem set.

\key{enter} is now bound to newline-and-indent, \key{execute} to
evaluate-previous-sexp.  This brings usage in Edwin's scheme and interaction
modes into line.

\index{graphics key{\key{graphics} key}}\index{alpha key{\key{alpha} key}}
\key{graphics} and \key{alpha} work the old way.  The screen are three modes:  graphics,
graphics/alpha, and alpha.  Pressing \key{graphics} moves the screen mode toward the
graphics end of the spectrum and pressing \key{alpha} does the reverse.  Thus,
pressing \key{alpha} twice is certain to put the screen in text-only mode.  The
advantage of this (over the use of the keys as toggles) is that the screen cannot be
in the (useless) non-alpha non-graphics mode.

The \idx{cursor positioning wheel}\index{wheel/cursor positioning} is no
longer enabled; Edwin can't keep up with the characters it sends, so it is
less than useless.  Students should be encouraged to use the editing commands
which permit movement by a word, s-expression, or line at a time.

Auto-repeat\index{auto-repeat} is disabled for all practical purposes, for
the same reason.  There is a quarter-second wait before first repeat,
quarter-second wait between repeats.

{\tt backup-floppy}\index{backup-floppy{{\tt backup-floppy}}} is now
implemented (see manual).

Both the Emacs (e.g., \ctrl{\key{f}}) and Edwin (e.g., \key{right-arrow}
key) [replace this with the graphic] commands are now included in the 6.001
student manual.

\ctrl{\key{?}} no longer works; instead, use \ctrl{\key{h}} for Edwin help.


\section{Updating the SRMs}
% Added by Arthur Gleckler 21 Feb 1989
% Formatted by John Buck 2/27/89

This section is primarily for the head LA, who is the one that does these
kinds of things.

\subsection{Syntaxing Scheme source files}

Make sure there is an up to date EDWIN band {\tt \#5:/SCHEME/BANDS/EDWIN}.  If there
isn't, follow the instructions for generating an EDWIN band
in~\ref{student-band}.

Load the \idx{EDWIN band}, since there isn't enough room for the syntaxer when the
\idx{STUDENT band} is loaded: \\
\hspace*{0.5in} {\tt (disk-restore "\#5:/SCHEME/BANDS/EDWIN")}

Load the syntaxer: \\
\hspace*{0.5in} {\tt (load "bin:beta")}

Syntax the file.  If it's in the {\tt \#5:/SCHEME/SCM} directory, do: \\
\hspace*{0.5in} {\tt (sf "\#5:/SCHEME/SCM/filename" "\#5:/SCHEME/BIN<password>/")} \\
If the file is in the {\tt \#5:/EDWIN/SCM} directory, do: \\
\hspace*{0.5in} {\tt (sf "\#5:/EDWIN/SCM/filename" "\#5:/EDWIN/BIN<password>/")}

\subsection{Generating a new 6.001 band}
\label{student-band}
\index{band/new}

Keep a copy of the old STUDENT band: \\
\hspace*{0.5in} Get to the Pascal "Command:" prompt. \\
\hspace*{0.5in}{\tt  F \\
\hspace*{0.5in} C \#5:/SCHEME/BANDS<password>/STUDENT, OLDSTUDENT \\
\hspace*{0.5in} X SCHEME} 

Do {\tt DIRED} on {\tt \#5:/SCHEME/BANDS}.  Look for three bands in
particular: \\
\hspace*{0.5in} BARE, the bare Scheme band without Edwin or the 6.001 stuff \\
\hspace*{0.5in} EDWIN, BARE with Edwin \\
\hspace*{0.5in} STUDENT, EDWIN with 6.001 stuff 

If EDWIN exists and has the same date as STUDENT, assume it is up to
date: \\
\hspace*{0.5in} {\tt (disk-restore "\#5:/SCHEME/BANDS/EDWIN")} \\
\hspace*{0.5in}  Skip to step STUDENT. 

If EDWIN doesn't exist or has a different date than STUDENT, assume that it is
not up to date and must be regenerated. 

If BARE exists and has the same date as STUDENT, assume it is up to
date: \\
\hspace*{0.5in} {\tt (disk-restore "\#5:/SCHEME/BANDS/BARE")} \\
\hspace*{0.5in} Skip to step EDWIN. 

If BARE doesn't exist or has a different date than STUDENT, assume that it is
not up to date and must be regenerated.  

Change the current directory to \#5:/SCHEME/BIN as follows: \\
\hspace*{0.5in} Get to the Pascal "Command:" prompt. \\
\hspace*{0.5in}{\tt  W D \#5:/SCHEME/BIN<password>}	; May require closing "/" 

If BARE band exists, delete it: \\
\hspace*{0.5in}{\tt  F \\
\hspace*{0.5in} R \#5:/SCHEME/BANDS<password>/BARE \\
\hspace*{0.5in} Q} 

Start Scheme from scratch: \\
\hspace*{0.5in}{\tt  X *MARK \\
\hspace*{0.5in} P *MARK \\
\hspace*{0.5in} P \#5:/SCHEME/CODE/SCHEME \\
\hspace*{0.5in} X SCHEME \\
\hspace*{0.5in} COLDMD.BIN}		; to the "Band to load?" prompt \\
\hspace*{0.5in}{\tt   ((access finish-load runtime-system))}

Save new BARE band: \\
\hspace*{0.5in}{\tt   (disk-save "\#5:/SCHEME/BANDS/BARE")} 

EDWIN: Start here if BARE band was up to date but EDWIN band wasn't. 

If EDWIN band exists, delete it: \\
\hspace*{0.5in}{\tt   (delete-file "\#5:/SCHEME/BANDS<password>/EDWIN")} 

Load Edwin: \\
\hspace*{0.5in}{\tt   (load "\#5:/EDWIN/SCM/EDWIN")} 

Save new EDWIN band: \\
\hspace*{0.5in}{\tt   (disk-save "\#5:/SCHEME/BANDS/EDWIN")}

STUDENT: Start here if EDWIN band was up to date. 

Delete existing STUDENT band: \\
\hspace*{0.5in}{\tt   (delete-file "\#5:/SCHEME/BANDS<password>/STUDENT")} 

Load pathname translation software (only if creating band for SRM, not
7945): \\
\hspace*{0.5in}{\tt   (load "\#5:/SCHEME/SCM/PATHTRANS" '())} 

Load 6.001 stuff: \\
\hspace*{0.5in}{\tt   (load "\#5:/SCHEME/SCM/SBUILD")} 

Save new STUDENT band: \\
\hspace*{0.5in}{\tt   ((access student-band 6001-package edwin-package))} 

Now, reboot the machine and test the band before distributing the new system to
the other SRMs.  Remember, if anything goes wrong, you can always fall back on
the OLDSTUDENT band you saved above.

\subsection{Copying SRMs}
\index{SRM/Copying}

It is best to do the copying of SRMs when there are no students in the 6.001
lab, as you have to bring down two SRMs (source and destination) for each copy.

Find the COPIER: disk in the filing cabinet (there should be two copies).

Choose an SRM to do the copying.  It is easiest to use the SRM which is
connected to the source disk, because you'll have to move one less cable.

Disconnect the printer from the SRM; it's attached at the bottom center of the
back of the SRM display/keyboard unit.  Connect the destination SRM disk where
the printer cable was before.

If the source disk is not already connected to the SRM, remove the SRM disk cable
from the top right of the back of the SRM display/keyboard unit and replace it
with the cable to the source SRM disk.

Power on the SRM with the COPIER: disk in the right drive and wait for the
copier software to boot.

At the prompt, check the cables once again before pressing a key to start the
copy.  Unfortunately, the copier program doesn't give any error messages, so
the only way to tell if a copy is successful is to check the contents of the
destination disk.

Once the copier program announces that it is finished, replace the
cables on both SRMs and boot them from their SRM disks.  If there is
no SRM boot disk in one SRM, you can use the disk from another SRM;
they are interchangeable.

Once the destination SRM boots (and you've given it the date and time, if it
asks for it), you must change the name of its disk back to its original name,
because it now has the same name as the source disk: \\
\hspace*{0.5in}{\tt  SYSTEM DOWN \\
\hspace*{0.5in} RENAME "source-srm<srm-password>" "destination-srm<srm-password>" \\
\hspace*{0.5in} SYSTEM UP} \\

\subsection{Copying SRM Boot Disks}
\index{SRM/Copying Boot Disks}

To copy the SRM boot disk (the floppy that must be in the right drive
of an SRM to boot it), login as ``guest'' (no password) to a 6.004
machine.  Write-protect an existing SRM boot disk an place it in the left
disk drive of the 6.004 machine.  Place a blank disk in the right
drive.  Type:

\hspace*{0.5in} {\tt dd if=/dev/fd.1 of=/dev/fd.0 bs=256} \key{return}

Once the copying is finished, the right drive contains the new SRM
boot disk.  Make sure that you remove both disks and that you log out
from the 6.004 machine (by typing {\tt bye}\key{return}).

Keep only one SRM boot disk out (in one of th SRM's right drives) at a
time; keep the rest of the SRM boot disks locked in the filing cabinet
for safekeeping.  Label the disks!  Always make sure there are four
disks available.

% This line reads the index file created by windex; when I scribe this on
% theory.lcs.mit.edu, I call it labmanual.tex for brevity.
\input{labmanual.index}

\end{document}

