forked from sayon/forthress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.frt
More file actions
67 lines (53 loc) · 1.06 KB
/
documentation.frt
File metadata and controls
67 lines (53 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
' dup g"
( a - a a )
Duplicate the cell on top of the stack.
" doc-word
' drop g"
( a -- )
Drop the topmost element of the stack
" doc-word
' swap g"
( a b -- b a )
Swap two topmost elements of the stack
" doc-word
' rot g"
( a b c -- b c a )
Shuffles top 3 elements of the stack
" doc-word
' IMMEDIATE g"
Marks the last word as immediate
" doc-word
' interpret g"
Forthress interpreter/compiler. Uses in_fd internally to know what to interpret.
" doc-word
' interpret-fd g"
(fd -- )
Interpret everything read from file descriptor fd.
" doc-word
' ; g"
End the current word definition
" doc-word
' create g"
( flags name -- )
Create an entry in the dictionary name is the new name. Only immediate flag is implemented ATM.
" doc-word
' c, g"
( c -- )
Add a single byte to the word being defined.
" doc-word
' , g"
( x -- )
Add x to the word being defined.
" doc-word
' c@ g"
( addr -- char )
Read one byte starting at addr.
" doc-word
' c! g"
( char addr -- )
Store one byte by address.
" doc-word
' ! g"
( val addr -- )
Store value by address.
" doc-word