diff --git a/blk/414 b/blk/414 new file mode 100644 index 0000000..ad14ea9 --- /dev/null +++ b/blk/414 @@ -0,0 +1,5 @@ +: [IF] + IF EXIT THEN + LIT< [THEN] BEGIN DUP WORD S= UNTIL DROP ; +: [THEN] ; + diff --git a/blk/437 b/blk/437 index 361aab2..3c53782 100644 --- a/blk/437 +++ b/blk/437 @@ -3,7 +3,9 @@ : LOOP COMPILE (loop) H@ - , ; IMMEDIATE ( LEAVE is implemented in low xcomp ) : LITN 32 , , ( 32 == NUMBER ) ; -: _ ( : will get its name at the very end ) +( gets its name at the very end. can't comment afterwards ) +: _ BEGIN LIT< ) WORD S= UNTIL ; IMMEDIATE +: _ ( : will get its name almost at the very end ) (entry) [ 14 ( == compiledWord ) LITN ] C, BEGIN diff --git a/blk/438 b/blk/438 index cb829de..1296f6f 100644 --- a/blk/438 +++ b/blk/438 @@ -7,3 +7,4 @@ ; IMMEDIATE ';' XCURRENT @ 4 - C! ':' X' _ 4 - C! ( give : its name ) +'(' X' _ 4 - C! diff --git a/blk/439 b/blk/439 deleted file mode 100644 index b6e9c1c..0000000 --- a/blk/439 +++ /dev/null @@ -1,14 +0,0 @@ -XPACKed core - -Most of Collapse OS' core words are cross compiled (B390). -However, some of them are too dynamically referenced to be -cross-compiled without great pain, so we XPACK (B267) them, -that is, we put them in source form in the target's -initialization section (see B89). - -These words will be compiled into RAM at initialization, which -is a bit wasteful both in RAM and in boot time, so we will -typically relink (B120) that newly compiled binary and append -it to our existing binary for optimal resource usage. - -Load range: 440-446 diff --git a/blk/441 b/blk/441 deleted file mode 100644 index 7bd64ff..0000000 --- a/blk/441 +++ /dev/null @@ -1,13 +0,0 @@ -: _ BEGIN LIT< ) WORD S= UNTIL ; IMMEDIATE -40 CURRENT @ 4 - C! -( Hello, hello, krkrkrkr... do you hear me? - Ah, voice at last! Some lines above need comments - BTW: Forth lines limited to 64 cols because of default - input buffer size in Collapse OS - - 40 is ASCII for '('. We do this to simplify XPACK's task of - not mistakenly consider '(' definition as a comment. - LIT<: 34 == litWord - LITA: 36 == addrWord - COMPILE: Tough one. Get addr of caller word (example above - (br)) and then call LITA on it. ) diff --git a/blk/443 b/blk/443 index c80b968..5d02510 100644 --- a/blk/443 +++ b/blk/443 @@ -6,7 +6,3 @@ H@ 2- ( push a. -2 for allot offset ) ; IMMEDIATE -: [IF] - IF EXIT THEN - LIT< [THEN] BEGIN DUP WORD S= UNTIL DROP ; -: [THEN] ; diff --git a/emul/forth.bin b/emul/forth.bin index cdb3751..13e1e92 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ