ForthMinus
From OpenSimulator
(Difference between revisions)
(New page: LibCore {| border=1 style="border-collapse:collapse;th background-color:#666;width:100%;text-align:center;" ! style="background-color:#D2ECD2;" | Word ! style="background-color:#D2ECD2;" |...) |
|||
| Line 5: | Line 5: | ||
! style="background-color:#D2ECD2;" | Description | ! style="background-color:#D2ECD2;" | Description | ||
|- | |- | ||
| − | | dup | + | | dup |
| ( n -- n n ) | | ( n -- n n ) | ||
| Duplicates the top item of the stack | | Duplicates the top item of the stack | ||
|- | |- | ||
| − | | . | + | | . * |
| ( n -- ) | | ( n -- ) | ||
| Prints the top item of the stack in console | | Prints the top item of the stack in console | ||
|- | |- | ||
| − | | dump | + | | dump * |
| ( -- ) | | ( -- ) | ||
| Dumps the VM's current status in console | | Dumps the VM's current status in console | ||
| Line 21: | Line 21: | ||
| Swaps the order of the top two items in the stack | | Swaps the order of the top two items in the stack | ||
|- | |- | ||
| + | | savestate * | ||
| + | | ( n -- ) | ||
| + | | Saves the VM's state to file n.fmo | ||
| + | |- | ||
| + | | words * | ||
| + | | ( -- ) | ||
| + | | Lists the primitive words loaded to console | ||
| + | |- | ||
| + | | loadlib | ||
| + | | ( n -- ) | ||
| + | | Loads the words in n.dll | ||
| + | |- | ||
| + | | : | ||
| + | | Special | ||
| + | | Define a user word. The first word following the : in the estack is the name. All words following until ; is the definition of the word | ||
| + | |- | ||
| + | |||
|} | |} | ||
Revision as of 10:22, 20 January 2008
LibCore
| Word | Stack | Description |
|---|---|---|
| dup | ( n -- n n ) | Duplicates the top item of the stack |
| . * | ( n -- ) | Prints the top item of the stack in console |
| dump * | ( -- ) | Dumps the VM's current status in console |
| swap | ( n1 n2 -- n2 n1) | Swaps the order of the top two items in the stack |
| savestate * | ( n -- ) | Saves the VM's state to file n.fmo |
| words * | ( -- ) | Lists the primitive words loaded to console |
| loadlib | ( n -- ) | Loads the words in n.dll |
| : | Special | Define a user word. The first word following the : in the estack is the name. All words following until ; is the definition of the word |