mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 19:18:06 +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.
10 lines
276 B
Plaintext
10 lines
276 B
Plaintext
: BEGIN H@ ; IMMEDIATE
|
|
: AGAIN COMPILE (br) H@ - _bchk , ; IMMEDIATE
|
|
: UNTIL COMPILE (?br) H@ - _bchk , ; IMMEDIATE
|
|
: [ INTERPRET ; IMMEDIATE
|
|
: ] R> DROP ;
|
|
: LIT< WORD 34 , SCPY 0 C, ; IMMEDIATE
|
|
: LITA 36 , , ;
|
|
: COMPILE ' LITA ['] , , ; IMMEDIATE
|
|
: [COMPILE] ' , ; IMMEDIATE
|