[net.micro] etymology of peek and poke

dyer@wivax.UUCP (07/19/83)

The language EL/1 developed at Harvard in the mid-70's contained two
symbols called "peek" and "poke" which were used to determine the value
of several system parameters.  Since the use of EL/1 at Harvard coincides
roughly with the time Bill Gates developed his 8080 BASIC interpreter,
I wondered if anyone could verify that the inspiration came from EL/1
or contribute evidence to the contrary (i.e. earlier uses of peek/poke.)

Steve Dyer
decvax!wivax!dyer
sdyer@bbn-unix

hoffman@pitt.UUCP (07/20/83)

The Microsoft Basic interpreter that Bill Gates developed was
patterned after DEC's Basic-Plus.  I used Basic-Plus in 1974
on a PDP-11/40 running RSTS V4A and PEEK() was a built-in function.
The argument to peek was a 16-bit signed integer and it returned same.
To access the processor status word you could do a peek(-2).
Poke, however, was implemented via the SYS() function which used
a string as its argument.  The string contained pairs of bytes that
represented the address and the value for the poke.  Both of these
calls were privileged -- poke, for the obvious reason, and peek because
peeking at an odd address would cause a fatal crash.  BTW, RSTS V4
ran in 28K and didn't know about memory management, therefore no
protection.

This information comes from the RSTS-11 System Manager's Guide,
DEC-11-ORSMA-B-D, dated January 1973.  The copyright dates on
this manual are 1971, 1972, and 1973.  Maybe someone with an earlier
version can verify when PEEK appeared.

As an aside, the names PEEK and POKE appear in the DECsystem-10
Assembly Language Handbook from 1972.  They were privileged
monitor calls there.

	---Bob Hoffman, Pitt CS		pitt!hoffman
					hoffman.pitt@Udel-Relay

Smith@CMU-CS-C.ARPA (07/20/83)

From:  David Smith <Smith@CMU-CS-C.ARPA>


Peek and Poke are the names of system calls for the Pdp-10's Tops-10 operating
system.  They allow spying on the monitor's address space, and modifying
it (if the program has the rights to).  This goes back to the mid '60s.

nelson@avsdS.UUCP (07/20/83)

Interesting about peek and poke being in EL/1 from Harvard. Bill Gates
went to Harvard in the 70's for B school or some such thing.
So that probably is where the names come from.

	Glenn Nelson, Ampex, Redwood City, CA

bcase@uiuccsb.UUCP (07/22/83)

#R:wivax:-1845200:uiuccsb:4400003:000:90
uiuccsb!bcase    Jul 21 13:57:00 1983

Peek () and poke () were in DEC RSTS/E Basic+ long before the introduction
of 8080 Basic.

matt@ucla-locus@sri-unix.UUCP (07/22/83)

From:            Matthew J. Weinstein <matt@ucla-locus>

Peek was in V1 of RSTS (or was that V0?) which we used to run on an
11/20 with 24k of memory (or was that 20k?)... My recollection is that
SYS functions were not protected til version 3, and PEEK may not have 
been either...

TOPAZ:vmicro1@ucbvax.UUCP (07/29/83)

I was just glancing at an ancient (real seventies) PDP-10 assembly language
manual; I notice it has peek and poke UUO's. So, possible an MIT connection?
Project MAC, maybe, where all the inside DEC jokes are from?