Skip to content

Commit 0147dcd

Browse files
committed
Add mnemonics from enums for Haskell
1 parent a3e9023 commit 0147dcd

File tree

10 files changed

+288
-29
lines changed

10 files changed

+288
-29
lines changed

assembly.md

+29-29
Large diffs are not rendered by default.

haskell/brainbush-tomato/project.json

+29
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,35 @@
1515
}
1616
],
1717
"whitespace": { "extension": "ws" },
18+
"assembly": {
19+
"mnemonics": {
20+
"push": "Push",
21+
"dup": "Dup",
22+
"copy": "Ref",
23+
"swap": "Swap",
24+
"drop": "Discard",
25+
"slide": "Slide",
26+
"add": "Infix Plus",
27+
"sub": "Infix Minus",
28+
"mul": "Infix Times",
29+
"div": "Infix Divide",
30+
"mod": "Infix Modulo",
31+
"store": "Store",
32+
"retrieve": "Retrieve",
33+
"label": "Label",
34+
"call": "Call",
35+
"jmp": "Jump",
36+
"jz": "If Zero",
37+
"jn": "If Negative",
38+
"ret": "Return",
39+
"end": "End",
40+
"printc": "OutputChar",
41+
"printi": "OutputNum",
42+
"readc": "ReadChar",
43+
"readi": "ReadNum"
44+
},
45+
"usage": ["enum"]
46+
},
1847
"mappings": [{ "space": "", "tab": "", "lf": "" }],
1948
"programs": [
2049
{ "path": "docs/tutorial.html", "polyglot": ["HTML"] },

haskell/edwinb-wspace-0.2/project.json

+27
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,33 @@
1515
"bounds": { "precision": "arbitrary" },
1616
"behavior": { "eof": "error" },
1717
"whitespace": { "extension": "ws" },
18+
"assembly": {
19+
"mnemonics": {
20+
"push": "Push",
21+
"dup": "Dup",
22+
"swap": "Swap",
23+
"drop": "Discard",
24+
"add": "Infix Plus",
25+
"sub": "Infix Minus",
26+
"mul": "Infix Times",
27+
"div": "Infix Divide",
28+
"mod": "Infix Modulo",
29+
"store": "Store",
30+
"retrieve": "Retrieve",
31+
"label": "Label",
32+
"call": "Call",
33+
"jmp": "Jump",
34+
"jz": "If Zero",
35+
"jn": "If Negative",
36+
"ret": "Return",
37+
"end": "End",
38+
"printc": "OutputChar",
39+
"printi": "OutputNum",
40+
"readc": "ReadChar",
41+
"readi": "ReadNum"
42+
},
43+
"usage": ["enum"]
44+
},
1845
"programs": [
1946
{ "path": "calc.ws", "spec_version": "0.2" },
2047
{ "path": "count.ws", "spec_version": "0.2" },

haskell/edwinb-wspace-0.3/project.json

+29
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@
1616
"bounds": { "precision": "arbitrary" },
1717
"behavior": { "eof": "error" },
1818
"whitespace": { "extension": "ws" },
19+
"assembly": {
20+
"mnemonics": {
21+
"push": "Push",
22+
"dup": "Dup",
23+
"copy": "Ref",
24+
"swap": "Swap",
25+
"drop": "Discard",
26+
"slide": "Slide",
27+
"add": "Infix Plus",
28+
"sub": "Infix Minus",
29+
"mul": "Infix Times",
30+
"div": "Infix Divide",
31+
"mod": "Infix Modulo",
32+
"store": "Store",
33+
"retrieve": "Retrieve",
34+
"label": "Label",
35+
"call": "Call",
36+
"jmp": "Jump",
37+
"jz": "If Zero",
38+
"jn": "If Negative",
39+
"ret": "Return",
40+
"end": "End",
41+
"printc": "OutputChar",
42+
"printi": "OutputNum",
43+
"readc": "ReadChar",
44+
"readi": "ReadNum"
45+
},
46+
"usage": ["enum"]
47+
},
1948
"programs": [
2049
{
2150
"path": "examples/hworld.ws",

haskell/ft-spaceman/project.json

+29
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,35 @@
1414
"https://news.ycombinator.com/item?id=24763312"
1515
],
1616
"submodules": [{ "path": "spaceman", "url": "https://gitlab.com/ft/spaceman.git" }],
17+
"assembly": {
18+
"mnemonics": {
19+
"push": "Push",
20+
"dup": "Duplicate",
21+
"copy": "Copy",
22+
"swap": "Swap",
23+
"drop": "Drop",
24+
"slide": "Slide",
25+
"add": "Add",
26+
"sub": "Subtract",
27+
"mul": "Multiply",
28+
"div": "Divide",
29+
"mod": "Modulo",
30+
"store": "Store",
31+
"retrieve": "Fetch",
32+
"label": "Tag",
33+
"call": "Call",
34+
"jmp": "Jump",
35+
"jz": "JumpIfZero",
36+
"jn": "JumpIfNegative",
37+
"ret": "Return",
38+
"end": "ExitFromProgram",
39+
"printc": "PrintCharacter",
40+
"printi": "PrintNumber",
41+
"readc": "ReadCharacter",
42+
"readi": "ReadNumber"
43+
},
44+
"usage": ["enum"]
45+
},
1746
"commands": [
1847
{
1948
"build": "cabal build",

haskell/haroldl-whitespace-nd/project.json

+30
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,36 @@
2222
],
2323
"relations": [{ "id": "haskell/edwinb-wspace-0.3", "type": "fork" }],
2424
"whitespace": { "nonstandard": [{ "name": "shuffle", "seq": "STTS" }], "extension": "ws" },
25+
"assembly": {
26+
"mnemonics": {
27+
"push": "Push",
28+
"dup": "Dup",
29+
"copy": "Ref",
30+
"swap": "Swap",
31+
"drop": "Discard",
32+
"slide": "Slide",
33+
"add": "Infix Plus",
34+
"sub": "Infix Minus",
35+
"mul": "Infix Times",
36+
"div": "Infix Divide",
37+
"mod": "Infix Modulo",
38+
"store": "Store",
39+
"retrieve": "Retrieve",
40+
"label": "Label",
41+
"call": "Call",
42+
"jmp": "Jump",
43+
"jz": "If Zero",
44+
"jn": "If Negative",
45+
"ret": "Return",
46+
"end": "End",
47+
"printc": "OutputChar",
48+
"printi": "OutputNum",
49+
"readc": "ReadChar",
50+
"readi": "ReadNum",
51+
"shuffle": "Shuffle"
52+
},
53+
"usage": ["enum"]
54+
},
2555
"programs": [
2656
{ "path": "docs/tutorial.html", "polyglot": ["HTML"] },
2757
{ "path": "examples/calc.ws" },

haskell/jhmcstanton-marginal/project.json

+27
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@
1010
"source": ["https://github.com/jhmcstanton/marginal"],
1111
"submodules": [{ "path": "marginal", "url": "https://github.com/jhmcstanton/marginal" }],
1212
"whitespace": { "extension": "ws" },
13+
"assembly": {
14+
"mnemonics": {
15+
"push": "Push",
16+
"dup": "Dup",
17+
"swap": "Swap",
18+
"drop": "Drop",
19+
"add": "Add",
20+
"sub": "Sub",
21+
"mul": "Mult",
22+
"div": "Div",
23+
"mod": "Mod",
24+
"store": "Store",
25+
"retrieve": "Retrieve",
26+
"label": "Mark",
27+
"call": "Func",
28+
"jmp": "Jump",
29+
"jz": "JumpZero",
30+
"jn": "JumpNeg",
31+
"ret": "Return",
32+
"end": "Exit",
33+
"printc": "PrintChar",
34+
"printi": "PrintNum",
35+
"readc": "ReadChar",
36+
"readi": "ReadNum"
37+
},
38+
"usage": ["enum"]
39+
},
1340
"programs": [
1441
{ "path": "examples/collatz.ws" },
1542
{ "path": "examples/hello_world_loop.ws" },

haskell/matsubara0507/project.json

+29
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@
1616
}
1717
],
1818
"whitespace": { "extension": "ws" },
19+
"assembly": {
20+
"mnemonics": {
21+
"push": "PUSH",
22+
"dup": "DUP",
23+
"copy": "COPY",
24+
"swap": "SWAP",
25+
"drop": "DISC",
26+
"slide": "SLIDE",
27+
"add": "ADD",
28+
"sub": "SUB",
29+
"mul": "MUL",
30+
"div": "DIV",
31+
"mod": "MOD",
32+
"store": "STORE",
33+
"retrieve": "RETRIEVE",
34+
"label": "MARK",
35+
"call": "CALL",
36+
"jmp": "JUMP",
37+
"jz": "JMPZERO",
38+
"jn": "JMPNEG",
39+
"ret": "RETURN",
40+
"end": "EXIT",
41+
"printc": "OUTCHR",
42+
"printi": "OUTNUM",
43+
"readc": "INCHR",
44+
"readi": "INNUM"
45+
},
46+
"usage": ["enum"]
47+
},
1948
"programs": [
2049
{ "path": "examples/calc.ws" },
2150
{ "path": "examples/fact.ws" },

haskell/soimort-grassmudhorse/project.json

+30
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,36 @@
1717
}
1818
],
1919
"whitespace": { "nonstandard": [{ "name": "shuffle", "seq": "STTS" }] },
20+
"assembly": {
21+
"mnemonics": {
22+
"push": "Push",
23+
"dup": "Dup",
24+
"copy": "Ref",
25+
"swap": "Swap",
26+
"drop": "Discard",
27+
"slide": "Slide",
28+
"add": "Infix Plus",
29+
"sub": "Infix Minus",
30+
"mul": "Infix Times",
31+
"div": "Infix Divide",
32+
"mod": "Infix Modulo",
33+
"store": "Store",
34+
"retrieve": "Retrieve",
35+
"label": "Label",
36+
"call": "Call",
37+
"jmp": "Jump",
38+
"jz": "If Zero",
39+
"jn": "If Negative",
40+
"ret": "Return",
41+
"end": "End",
42+
"printc": "OutputChar",
43+
"printi": "OutputNum",
44+
"readc": "ReadChar",
45+
"readi": "ReadNum",
46+
"shuffle": "Shuffle"
47+
},
48+
"usage": ["enum"]
49+
},
2050
"mappings": [{ "space": "", "tab": "", "lf": "", "extension": "gmh" }],
2151
"programs": [
2252
{ "path": "99-grass-mud-horses.gmh", "spec_version": "0.3" },

haskell/takatoh-hws/project.json

+29
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,35 @@
1010
"source": ["https://github.com/takatoh/hws"],
1111
"submodules": [{ "path": "hws", "url": "https://github.com/takatoh/hws" }],
1212
"whitespace": { "extension": "ws" },
13+
"assembly": {
14+
"mnemonics": {
15+
"push": "Push",
16+
"dup": "Dup",
17+
"copy": "Copy",
18+
"swap": "Swap",
19+
"drop": "Discard",
20+
"slide": "Slide",
21+
"add": "Add",
22+
"sub": "Sub",
23+
"mul": "Mul",
24+
"div": "Div",
25+
"mod": "Mod",
26+
"store": "HeapWrite",
27+
"retrieve": "HeapRead",
28+
"label": "Label",
29+
"call": "Call",
30+
"jmp": "Jump",
31+
"jz": "JumpZero",
32+
"jn": "JumpNega",
33+
"ret": "Return",
34+
"end": "Exit",
35+
"printc": "CharOut",
36+
"printi": "NumOut",
37+
"readc": "CharIn",
38+
"readi": "NumIn"
39+
},
40+
"usage": ["enum"]
41+
},
1342
"programs": [{ "path": "hello.ws" }, { "path": "hi.ws" }, { "path": "sample.ws" }],
1443
"commands": [
1544
{

0 commit comments

Comments
 (0)