The dictionary
The dictionary is just a linked list of key-value pairs. The start of the linked list is kept in the variable LATEST. Each entry has a LINK field that keeps the address of the previous entry. The last entry has address NULL (0x0000) here.
NULL
▲
┌──┴───┬───────┬────────---
│ LINK │ (key) | (value)
└──▲───┴───────┴────────---
│
:
┌──┴───┬───────┬────────---
│ LINK │ (key) | (value)
└──▲───┴───────┴────────---
│
LATEST
When looking for a definition we run through this loop (in pseudo code):
# We are looking for an entry with key KEY
item := LATEST
while item <> NULL:
if item.key == KEY: return value
else: item := item.LINK
# item not found
KEY is a memory address with a string for what we are looking for.
There are several comparisons in this code that we have decompose into assembly language. So far our machine does not have any conditionals so this will need to change soon.