mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 21:50:55 +11:00
ed2b91411a
I'm planning on going back to 8-bit branching. 16-bit br cells incur a non-negligible penalty and, while at first 64 words (128 bytes forward or backward) seemed a bit limiting, I now don't see why one would ever construct such a big branch. It would be un-forthy. Also, I looked at using BC instead of IY to hold IP and the transition would be a lot easier with 8-bit branching. In this commit, all I do is add overflow checks in IF. The mechanic below doesn't change. I'll give myself some time to think it over so that I avoid yet another back and forth.
12 lines
428 B
Plaintext
12 lines
428 B
Plaintext
Branching
|
|
|
|
Branching in Collapse OS is limited to 8-bit. This represents
|
|
64 word references forward or backward. While this might seem
|
|
a bit tight at first, having this limit saves us a non-
|
|
negligible amount of resource usage.
|
|
|
|
The reasoning behind this intentional limit is that huge
|
|
branches are generally a indicator that a logic ought to be
|
|
simplified. So here's one more constraint for you to help you
|
|
towards simplicity.
|