-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKnownBugs
More file actions
68 lines (46 loc) · 1.97 KB
/
Copy pathKnownBugs
File metadata and controls
68 lines (46 loc) · 1.97 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
67
68
The s16 VM:
Functions and return
Functions called from main work if we end with a
ret (return) instruction:
function blah
ret 1;
end
But won't return properly if we omit the ret.
So long as we put a ret statement at the end of
every function it's fine, if we don't the program
terminates when it reaches the end of the function
code - needs attention.
-- UPDATE - seem to have got this issue fixed,
still testing but functions now return to the
caller whether there's a ret instruction or not.
Endianess
Maybe I'm misunderstanding something - you can use
the --byte-order option with the linker to tell
it what byte-order to write the executable file in.
I'm using the ArrayBuffer to allocate RAM segments
and passing a boolean (global.little_endian) which
is set to true if --byte-order 'little-endian' is
specified at the command line.
Now the weird thing is, JavaScript writes ArrayBuffer
in big-endian by default, we specify little-endian
by passing the boolean true which seems to working
just fine.
I can assemble and link an exe and it will be in
little-endian byte-ordering, and the s16 VM seems
happy with this.
Yet for some reason when I use big-endian - the
native read/write mode...it doesn't work!
Needs addressing.
The s16a assembler and linker
There are a few little bugs, to be honest I'm probably
going to re-write both of these once the VM is stable,
for now they just exist so that I can build and test
executables in s16.
The assembler doesn't like file names and paths because
I'm running pre-processor directives through a bunch of
filters.
In all fairness this should have probably been done
later during linking, it'd make more sense.
There are other small bugs but I'm not too fussed, as
long as I can assemble and run code I'm happy enough
for now...will update as things progress.