Text preview for : 19790306_NoteTaker_Smalltalk_Conventions.pdf part of xerox 19790306 NoteTaker Smalltalk Conventions xerox notetaker memos 19790306_NoteTaker_Smalltalk_Conventions.pdf



Back to : 19790306_NoteTaker_Smallt | Home

NotcTakcr Smalltalk Conventions

rn1is is a working document. Send protests to: Ted Kaehler
Filed on: [IVY] NoteTakcLConventions
This is version 5 on March 6, 1979
(Changes are underlined)


Object Pointer Space

A pointer to an object is called an OOP (ordinary object pointer). The 16 bits of an oop are
apportioned as follows:

oop = xxxx xxxx xxx x xxOO lbe' oop is a pointer to an object. The oop is the actual
displacement in the OT of the entry of this object. The first oop is 0 and the last actual oop
may be as big as OEFFC hex.

oop = xxxx xxxx xxxx xxxI TIlis is the oop of an integer. The value of the integer is
oop/2.

oop = xxx x xxxx xxxx xxIO (Not yet specified)


Physical Memory

The bottom few K of physical memory are local to the processor. lbe entire space is divided as
follows (all addresses are byte addresses in hex):

00000 (CS points here)
Local memory for interpreter, storage management,
interrupt vector.
02000 (Local memory ends at 02000 assuming 8K bytes of it).
OT is lip to 15K entries of 4 bytes apiece.
10000
Data area. (actual smalltalk objects reside here).
3FFFF (end of physical memory 256K bytes).
FFFFO
Bootstrap locations for 8086
FFFFF (end of virtual memory 1M bytes).


Object Table (OT)

The object table contains a two word entry for each object and is indexed by the oop (plus
OTbase) off the code segment register. 'The bit fonnat follows (Note that I am showing the bits as
high:low but in memory the bytes are reversed):
rrrr rrrr uuut tttv (bytes 1,0)
ssss ssss ssss ssss (bytes 3,2)
where r is REF the reference count, u are unused bits (possibly for garbage collector status), t is
TOFF the core address off.~et, v is CLL (core longer than length, for intlated allocation), and s is
TSEG the core address segment origin. ';'/e will use the LDS instruction to load the first OT word
into register SI and the second word into segment register DS. Subsequent MOV instructions used
to access the data fields of the object compute U1e effective address as DS*16 + SI. Notice that the
v bit is anded out to give a zero bit Ulcre. Thus the TOPr' field overlaps the TSEa field by one
bit. TOFt<' and TSEG are normalized so that negative offsets of up to 8 bytes are allowed on
SI.DS. After anding out the REF, u. and v fields of SI, the core address of tile field ends up being
ssss ssss ssss ssss 0000 + t tttO + offset.
2


Nonnalization applies to both objects and free blocks, thus the norma1ized core address in an OT
entry will survive many allocations and frces. A nonnalization is only done during an allocation
which must carve the core off a big block (this is also when a ncw OT cntry filled in). Objects are
renormalizcd during compaction.

TIle OT must lie below the data space.