File tree Expand file tree Collapse file tree 9 files changed +1188
-29
lines changed Expand file tree Collapse file tree 9 files changed +1188
-29
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ include "std/io.cal"
33include "std/array.cal"
44
55let Array myArray
6- [u16 1 2 3 4 5] myArray a<
6+ [u16 1 2 3 4 5] & myArray a<
77
8- 0 myArray a@ printdec 10 printch
9- 1 myArray a@ printdec 10 printch
8+ 0 & myArray a@ printdec 10 printch
9+ 1 & myArray a@ printdec 10 printch
1010
11- 100 2 myArray a!
12- 2 myArray a@ printdec 10 printch
11+ 100 2 & myArray a!
12+ 2 & myArray a@ printdec 10 printch
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ let Array str2
1010
1111&str1 &str2 a= printdec new_line
1212
13- "Hi" str2 a<
13+ "Hi" & str2 a<
1414&str1 &str2 a= printdec new_line
1515
16- "Greetings" str1 a<
16+ "Greetings" & str1 a<
1717&str1 &str2 a= printdec new_line
1818
1919&str1 "Greetings" a= printdec new_line
Original file line number Diff line number Diff line change 11include "cores/select.cal"
22include "std/io.cal"
33
4- func new_line begin
5- 13 printch 10 printch
6- end
7-
84# Hexadecimal - prints 16
950x10 printdec new_line
106
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ let cell myGlobal
55func myFunc begin
66 let cell myVar
77 'A' -> myVar
8- myVa printch
8+ myVar printch
99end
1010
1111myFunc
Original file line number Diff line number Diff line change 11include "cores/select.cal"
22include "std/io.cal"
33
4- # will execute on RM86 backend
4+ # Print a different message for each core
5+
56version RM86
67 "Hello, RM86!\n" printstr
78end
89
9- # will execute on Linux86 backend
10- version Linux86
11- "Hello, Linux86!\n" printstr
10+ version x86_64
11+ "Hello, x86_64!\n" printstr
12+ end
13+
14+ version arm64
15+ "Hello, arm64!\n" printstr
16+ end
17+
18+ version UXN
19+ "Hello, Uxn!\n" printstr
1220end
1321
14- # won't execute unless you set the Foo version
22+ # Specify arbitrary versions to use them as compile-time flags
1523version Foo
16- "Hello, Foo! \n" printstr
24+ "Foo is enabled :D \n" printstr
1725end
1826
19- # will execute because Foo isn't set
27+ # This one will run by default unless you set Foo
2028version not Foo
21- "Hello, not Foo! \n" printstr
29+ "Foo is not enabled :( \n" printstr
2230end
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ if &file @ -2 = then
1010end
1111
1212let Array str
13- "meow\n" str a<
13+ "meow\n" & str a<
1414
1515&file
1616&str Array.elements + @
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import callisto.preprocessor;
1313import callisto.backends.lua;
1414import callisto.backends.uxn;
1515import callisto.backends.rm86;
16+ import callisto.backends.arm64;
1617import callisto.backends.x86_64;
1718
1819const static string usage = "
4546Backends and their operating systems:
4647 rm86 - Real mode x86, for bare-metal, dos
4748 x86_64 - 64-bit x86, for bare-metal, linux
49+ arm64 - 64-bit ARM, for linux
4850 uxn - Varvara/Uxn
4951 lua - Lua, uses subset CallistoScript
5052
@@ -162,6 +164,10 @@ int main(string[] args) {
162164 backend = new BackendX86_64();
163165 break ;
164166 }
167+ case " arm64" : {
168+ backend = new BackendARM64();
169+ break ;
170+ }
165171 case " uxn" : {
166172 backend = new BackendUXN();
167173 break ;
You can’t perform that action at this time.
0 commit comments