Skip to content

Instantly share code, notes, and snippets.

@musgravejw
Created May 1, 2015 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musgravejw/8c4e939a9ac07a8d53f6 to your computer and use it in GitHub Desktop.
Save musgravejw/8c4e939a9ac07a8d53f6 to your computer and use it in GitHub Desktop.
test_program_minimal.src -
program test_program is
int a;
procedure f (int x in, int y out)
int b;
begin
b := 3;
y := b;
end procedure;
begin
a := 3;
f(3, a);
putInteger(a);
---------------------------------------
getBool:
scanf("%s", &R[1]);
getInteger:
scanf("%s", &R[1]);
getFloat:
scanf("%s", &R[1]);
getString:
scanf("%s", &R[1]);
putBool:
printf("%s", R[1]);
putInteger:
printf("%s", R[1]);
putFloat:
printf("%s", R[1]);
putString:
printf("%s", R[1]);
f:
MM[192] = 3
R[1] = MM[192];
MM[224] = R[1];
R[1] = MM[224];
R[1] = MM[224];
MM[256] = R[1];
MM[64] = 3
R[1] = MM[64];
MM[192] = R[1];
goto f;
R[1] = MM[192];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment