Files
nunuhara_xsystem4/meson.build
T
Nunuhara Cabbage 92710dc06a INC/DEC and DUP* instructions
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
2019-10-07 19:32:56 -07:00

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)