Download Doc/Hash.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Doc/Hash.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Doc/Hash.txt
-
curl -L -o Hash.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Doc/Hash.txt
1.04 kB
| /* Graphics Not Rendered in HTML */ | |
| There is a symbol (hash) table for each task. When a sym is not found, the | |
| parent task's sym table is checked. All tasks chain back to the Adam task. | |
| TempleOS sym tables are implemented with an array of linked-lists. A num is | |
| generated from a string by HashStr() to index into the array of linked-lists. | |
| Multiple strings can generate the same num, so linked-lists are built. Newer | |
| entries overshadow older ones. | |
| There are various types of entries. See Hash Entry Types. | |
| Symbol Look-up (Used many places including the JIT Compiler and Loader.) | |
| 1) Symbol name is hashed by adding and shifting the ASCII of all chars. | |
| 2) hash table->body[] array is indexed. | |
| 3) Linked-lst is traversed until match of text and type of entry. | |
| 4) If not found, hash table->next table is searched. | |
| Duplicate entries are allowed -- they overshadow old entries. | |
| Address-to-Symbol Look-up (Slow because not important. We could use trees.) | |
| 1) FunSeg Cache is scanned. | |
| 2) Hash Tables are scanned. | |