Skip to content

Commit a715c60

Browse files
committed
merge
2 parents 88680e6 + 9137bb3 commit a715c60

File tree

9 files changed

+1188
-29
lines changed

9 files changed

+1188
-29
lines changed

examples/arrays.cal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ include "std/io.cal"
33
include "std/array.cal"
44

55
let 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

examples/compare_strings.cal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

examples/literals.cal

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
include "cores/select.cal"
22
include "std/io.cal"
33

4-
func new_line begin
5-
13 printch 10 printch
6-
end
7-
84
# Hexadecimal - prints 16
95
0x10 printdec new_line
106

examples/variables.cal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let cell myGlobal
55
func myFunc begin
66
let cell myVar
77
'A' -> myVar
8-
myVa printch
8+
myVar printch
99
end
1010

1111
myFunc

examples/version.cal

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
include "cores/select.cal"
22
include "std/io.cal"
33

4-
# will execute on RM86 backend
4+
# Print a different message for each core
5+
56
version RM86
67
"Hello, RM86!\n" printstr
78
end
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
1220
end
1321

14-
# won't execute unless you set the Foo version
22+
# Specify arbitrary versions to use them as compile-time flags
1523
version Foo
16-
"Hello, Foo!\n" printstr
24+
"Foo is enabled :D\n" printstr
1725
end
1826

19-
# will execute because Foo isn't set
27+
# This one will run by default unless you set Foo
2028
version not Foo
21-
"Hello, not Foo!\n" printstr
29+
"Foo is not enabled :(\n" printstr
2230
end

examples/writeFile.cal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if &file @ -2 = then
1010
end
1111

1212
let Array str
13-
"meow\n" str a<
13+
"meow\n" &str a<
1414

1515
&file
1616
&str Array.elements + @

source/app.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import callisto.preprocessor;
1313
import callisto.backends.lua;
1414
import callisto.backends.uxn;
1515
import callisto.backends.rm86;
16+
import callisto.backends.arm64;
1617
import callisto.backends.x86_64;
1718

1819
const static string usage = "
@@ -45,6 +46,7 @@ Flags:
4546
Backends 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;

0 commit comments

Comments
 (0)