16 lines
718 B
C
16 lines
718 B
C
|
|
#include <ground.h>
|
||
|
|
|
||
|
|
int main() {
|
||
|
|
GroundProgram program = Ground.New.Program();
|
||
|
|
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||
|
|
GroundState state = {NULL, NULL, NULL};
|
||
|
|
GroundInstruction instruction = Ground.New.Instruction(GroundInstruction_ADD);
|
||
|
|
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||
|
|
Ground.Instruction.append(&instruction, Ground.New.Arg.Value(Ground.New.Value.Int(2)));
|
||
|
|
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||
|
|
Ground.Instruction.append(&instruction, Ground.New.Arg.Value(Ground.New.Value.Int(2)));
|
||
|
|
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||
|
|
Ground.Program.execute(&program, &state);
|
||
|
|
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||
|
|
}
|