Nunuhara Cabbage
eb8c7b0fe6
Move heap management code into heap.c
2019-12-23 16:53:00 -08:00
Nunuhara Cabbage
ba6e6b33dd
Fix buffer overflows
2019-12-07 14:16:53 -08:00
Nunuhara Cabbage
4c4833197a
Implement STOI & FT_ASSIGNS instructions
2019-12-05 17:48:06 -08:00
Nunuhara Cabbage
f573614025
Implement SACT2.IntToHankaku + SACT2.IntToZenkaku
2019-12-01 14:08:44 -08:00
Nunuhara Cabbage
00c4e7bf1f
Fix bug in S_MOD
2019-11-18 21:53:51 -08:00
Nunuhara Cabbage
c370e3eeaf
Implement S_MOD (format strings)
...
Mostly relying on sprintf to do the work.
2019-11-10 13:44:01 -08:00
Nunuhara Cabbage
3ff406cb58
SR_POP, SR_ASSIGN, C_REF, C_ASSIGN
2019-10-29 19:58:26 -07:00
Nunuhara Cabbage
33ec7a34e1
Basic arrays implementation
...
Just .Alloc() and .Free() for now.
2019-10-22 17:33:26 -07:00
Nunuhara Cabbage
b3a660f8ec
strings: copy-on-write
...
Only copy strings when they are mutated. This avoids copying strings in
cases where neither the copy nor the original would be modified during
the lifetime of the copy, e.g. when passing strings by-value.
This is purely an optimization.
2019-10-20 21:26:51 -07:00
Nunuhara Cabbage
7fa8c28d9d
Fix string_find for shift-jis
2019-10-16 20:11:16 -07:00
Nunuhara Cabbage
12242c087f
strings: handle shift-jis
2019-10-14 18:09:00 -07:00
Nunuhara Cabbage
55f3991546
Implement more string instructions
...
Implement all of the string instructions that I could get the compiler
to generate code for. Still ASCII-only.
2019-10-14 14:18:09 -07:00
Nunuhara Cabbage
cc2a2c594a
Floating point instructions
2019-10-13 21:32:17 -07:00
Nunuhara Cabbage
8a40058c81
Overhaul VM design
...
Overhaul the VM design to more closely resemble System40.exe. See
system4.md for further details.
2019-10-13 17:51:22 -07:00
Nunuhara Cabbage
827e0a85d7
S_ASSIGN & fix SH_LOCALREF for strings
2019-10-10 21:26:41 -07:00
Nunuhara Cabbage
53dc8a7a44
strings: store size together with text in memory
2019-10-07 16:54:46 -07:00
Nunuhara Cabbage
84df756faf
Initial commit
...
An assortment of instructions have been implemented so far, mostly basic
stuff such as stack management. The following program can be executed:
int main(void)
{
hello(2);
for (;;) {
system.Peek();
system.Sleep(1);
}
return 0;
}
void hello(int n)
{
int i;
for (i = 0; i < n; i++) {
system.Output("Hello, world! " + string(i));
}
}
2019-10-06 19:35:36 -07:00