Wiki
Alternative FORTH for RPC / List of the differences
##Critical changes:
ALLOT - Do not return address.
Use CREATE <NAME> <num> ALLOT instead of <num> ALLOT CONSTANT <NAME>
ISNUM and ISUNUM takes a string as a parameter.
FIND ( str --> str 0 | addr flag)
Returns str and 0 if the word is not found. Otherwise command address and flag.
flag = -1, if this is a common command.
flag = 1, if the command has a immediate flag.
##Renamed:
[ <--> ]
\ <--> MOD
,C --> C,
,S --> S,
RADIX --> BASE
##Removed:
NAME>
: NAME> DUP STRLEN + 6 + ;
" and (")
#!FORTH
: (")
R> DUP BEGIN
DUP C@ WHILE
1+ REPEAT 1+ >R ;
DECIMAL
: "
LITERAL (") 34 TIBSPLIT ,S ;
IMMEDIATE
##Added:
ARUN - variable that contains the address of the function that will be executed after the first boot.
R@ - copies number from the return stack to the stack.
RDROP - drops the value from the return stack.
TMR@ - reads the current value of the real-time clock. (32-bit)
2@ 2!
2CONSTANT
2VARIABLE
D+
DNEGATE
D<
D= - for 32-bit numbers. (thanks to _random)
--> - Used only when interpreting code from a floppy. Logically connects the current block to the next.
Small system of catching critical errors.
##Small changes:
ACCEPT ( addr <Len | -Len> [0] -- addr)
-Len - does not display the characters will overflow.
0 - displays stars instead of characters.
LOAD - requested block is loaded from a disk in any way.
WORD - The separator is defined as a value 32 (space) and less.
PAGE - after clearing the cursor moves to the 0 0 instead of 1 0.
TIMES - in the intermediate mode can properly perform operations on a stack. Like this: 1 10 TIMES DUP
TYPE - does not output the line if they start higher than the TOP (beyond the limit of available memory).
STRCMP - can be used for sorting.
Returns the following:
0 if the strings are identical. (as before)
1 if the first string is greater than the second. (differing by the code of character)
-1 If the second string more than the first.
Updated