word works with negative numbers now.

symbols moved to head of machine code.
This commit is contained in:
Simon Forman
2019-11-10 10:53:55 -08:00
parent 4a39d82c75
commit 2e301fa6c3
4 changed files with 83 additions and 47 deletions
+17
View File
@@ -295,6 +295,23 @@ useful for appending lists to other lists.
Yeah, I think that's the way to go...
---------------------------------------------
There's soething fishey with the symbols now that they are in the header
of the machine code. Each symbol's pointer field points to the next cell,
which seems really redundant. We need some symbol record to
differentiate from lists and ints. Maybe if more information was in the
header? Like the name of the function? It would make more sense?
Right now I'm assuming that the eventual parser would be looking up
symbols at parse-time and reusing the header symbols rather than
allocating cells for new ones. If the symbols were kept apart from the
machine code then it makes sense for them to have pointers?
Maybe I can dispense with symbol records by modifying the
is-this-a-symbol code to just check if the address is below the end of
the library code.
PC == 0