mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-02 11:58:05 +03:00
Random note: The SDK compiler generates some pretty strange code for
'n++' when 'n' is a reference:
instruction state of stack after instruction
----------- --------------------------------
PUSHLOCALPAGE ; P(ref n)
PUSH <variable index of n> ; P(ref n),V(ref n)
REFREF ; P(n),V(n)
DUP2 ; P(n),V(n),P(n),V(n)
REF ; P(n),V(n),n
DUP_X2 ; n,P(n),V(n),n
POP ; n,P(n),V(n)
INC ; n
POP ;
This would seem to be completely equivalent to the following:
PUSHLOCALPAGE
PUSH <variable index of n>
REFREF
INC
5 lines
205 B
Meson
5 lines
205 B
Meson
project('system4', 'c', default_options : ['c_std=c11'])
|
|
system4 = ['system4.c', 'ain.c', 'instructions.c', 'vm.c', 'string.c']
|
|
zdep = dependency('zlib')
|
|
executable('system4', system4, dependencies: zdep)
|