diff --git a/msdos/ans-shim.fb b/msdos/ans-shim.fb index f04edc9..884cc8f 100644 --- a/msdos/ans-shim.fb +++ b/msdos/ans-shim.fb @@ -1 +1 @@ -\\ ANSI Forth Shim for VolksForth cas 25jun20 \ ANS Forth Shim cas 25jun20 : cells 2* ; : cell+ 2+ ; : cell 1 cells ; : aligned ; : char+ 1+ ; : chars ; : s" [compile] " compile count ; immediate : [char] [compile] ascii ; immediate : char [compile] ascii ; 1 3 +thru .( ANS Forth Shim loaded ... ) cr \ ANS Forth Shim cas 25jun20 : lshift 0 ?DO 2* LOOP ; : rshift 0 ?DO 2/ 32767 and LOOP ; : s>d extend ; : fm/mod m/mod ; : sm/rem dup >r 2dup xor >r m/mod over IF r> 0< IF 1+ swap r> - swap ELSE rdrop THEN ELSE rdrop rdrop THEN ; : postpone ' dup >name c@ $40 and IF , ELSE [compile] compile compile , THEN ; immediate \ ANS Forth Shim cas 25jun20 : recurse last @ name> , ; immediate : >number ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 ) BEGIN dup 0= IF exit THEN >r count digit? WHILE accumulate r> 1- REPEAT 1- r> ; : accept expect span @ ; \ No newline at end of file +\\ ANSI Forth Shim for VolksForth cas 25jun20 \ ANS Forth Shim cas 25jun20 : cells 2* ; : cell+ 2+ ; : cell 1 cells ; : aligned ; : char+ 1+ ; : chars ; : s" [compile] " compile count ; immediate : [char] [compile] ascii ; immediate : char [compile] ascii ; 1 3 +thru .( ANS Forth Shim loaded ... ) cr \ ANS Forth Shim cas 25jun20 : lshift 0 ?DO 2* LOOP ; : rshift 0 ?DO 2/ 32767 and LOOP ; : s>d extend ; : fm/mod m/mod ; : sm/rem dup >r 2dup xor >r m/mod over IF r> 0< IF 1+ swap r> - swap ELSE rdrop THEN ELSE rdrop rdrop THEN ; : postpone ' dup >name c@ $40 and IF , ELSE [compile] compile compile , THEN ; immediate ' endloop ALIAS unloop \ ANS Forth Shim cas 25jun20 : recurse last @ name> , ; immediate : >number ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 ) BEGIN dup 0= IF exit THEN >r count digit? WHILE accumulate r> 1- REPEAT 1- r> ; : accept expect span @ ; : invert not ; \ No newline at end of file