memory map of nut

how nut-in-nut uses memory

M[ nut.obj | nut.DS | token str |
                     ^ tok 
     global | symtab | symstr | target n-code ... ] 
                                 ^
                                heapFree

- nut.obj, nut.DS are loaded by loadobj() (around 3700 words).
- token str is 80 words.
- global, symtab, symstr  are used by nut.txt. 
- they are allocated by init() align on even address.
- target n-code is the generated code, during the compilation of source.

1. n-code allocates cells from heap by (new)
2. to assign globals and string constants, (init) gets one block (MEMMAX) as data segment, then each global and string can be allocated from this block.
3. symbol table gets the table (symtab) and the name string (symstr).
4. token string is copied to tok (tok has been allocated 80 words) by nsim.c tokenise() and copyToken().

7 July 2007
