You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both in general, and specifically when assembling v80, which uses roughly 25KB of heap space. This would make assembling v80 a major squeeze on even a 48K system, if even possible. v80 is 8KB + 256B buffers, + 256B stack. v80's heap usage whilst assembling itself needs to be reduced to at least 20KB. There are general strategies, such as just using less labels, but this issue will focus on code changes that can help.
Do not store the first char of symbols (consts & labels). Since there's specific routines for accessing constants and labels, we can assume the first char and reconstruct it where necessary. Saves 1 byte for every symbol
When a deferred expression is a relative jump, store the virtual program-counter in the expr-byte code so that it doesn't need to be included in the record of every deferred expression
Store the parameter & rel-flag byte in the first reserved byte in the code-segment, rather than in the deferred record. Saves 1 byte every record
Store numbers that fit into 1 byte in a special 1-byte number token. This complicates the parser / evaluator a little more, but is an easy way to save bytes
The text was updated successfully, but these errors were encountered:
Not heap related, but I don't have a good place to put this idea yet -- there's a lot of once-off initialisation routines we could move into the code-segment, so that they get overwritten when assembly begins. Things like parameter parsing, the no-parameters help message. The most difficult part is simply deciding how best to split the files and include them in such a way that's going to scale for multiple supported platforms/OSes besides just CP/M.
The switch to v2-ISA-parser has massively reduced heap usage by doing away with all the forward references in the ISA definition. Heap usage has halved to just 12KB!
Both in general, and specifically when assembling v80, which uses roughly 25KB of heap space. This would make assembling v80 a major squeeze on even a 48K system, if even possible. v80 is 8KB + 256B buffers, + 256B stack. v80's heap usage whilst assembling itself needs to be reduced to at least 20KB. There are general strategies, such as just using less labels, but this issue will focus on code changes that can help.
The text was updated successfully, but these errors were encountered: