Files
Construction-of-Compilers/Project-01/uap25-pro01-tram/tramcode/test.tram
Jan-Niclas Loosen b0974af092 Start with project
2025-10-23 13:45:02 +02:00

28 lines
310 B
Plaintext

GOTO L2
L1: LOAD 0 0
CONST 0
EQ
IFZERO L3
CONST 0
GOTO L4
L3: LOAD 0 0
CONST 1
EQ
IFZERO L5
CONST 1
GOTO L6
L5: LOAD 0 0
CONST 1
SUB
INVOKE 1 L1 1
LOAD 0 0
CONST 2
SUB
INVOKE 1 L1 1
ADD
L6: NOP
L4: NOP
RETURN
L2: CONST 6
INVOKE 1 L1 0
HALT