-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvm
60 lines (55 loc) · 888 Bytes
/
svm
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
0 nop 5 push 10 ret 15 fetch 20 div 25 zret
1 lit 6 pop 11 eq 16 store 21 and 26 end
2 dup 7 jump 12 neq 17 add 22 or 27 ienum
3 drop 8 call 13 lt 18 sub 23 xor 28 iquery
4 swap 9 ccall 14 gt 19 mul 24 shift 29 iinvoke
0 word ;
1 if
2 call
3 -if
6 ;
8 @
9 @+
a n
b @r
c !
d
e !+
f !r
10 2*
11 2/
12 -
14 and
15 or
16 +
17 *+
18 push
19 a
1a dup
1b over
1c pop
1d a!
1e drop
1f nop
nip
swap
+!
*
*/
https://colorforth.github.io/inst.htm
00 . 08 -if 10 iq 18 or
01 ; 09 @+ 11 ii 19 drop
02 ex 0a @ 12 +* 1a dup
03 jump 0b @p 13 2* 1b over
04 call 0c !+ 14 2/ 1c a
05 unext 0d ! 15 - 1d a!
06 next 0e !p 16 + 1e push
07 if 0f ie 17 and 1f pop
00 .. 08 -i 10 iq 18 or
01 ;; 09 @+ 11 ii 19 dr
02 ex 0a @a 12 +* 1a du
03 ju 0b @p 13 2* 1b ov
04 ca 0c !+ 14 2/ 1c a@
05 un 0d !a 15 -- 1d a!
06 nx 0e !p 16 ++ 1e pu
07 if 0f ie 17 an 1f po