# Update build.h ./newbuildnum echo "#define VERSION \"0.1\"" >> build.h echo "#define BUILDDATE \"Sat Nov 10 16:19:12 EST 2001\"" >> build.h cc -g -pedantic -c ascorbic.c -o ascorbic.o cc -g -pedantic -c assembly.c -o assembly.o cc -g -pedantic -c file.c -o file.o cc -g -pedantic -c parse.c -o parse.o cc -g -pedantic -c particle.c -o particle.o cc -g -pedantic -c tokenize.c -o tokenize.o cc -g -pedantic -o ascorbic ascorbic.o assembly.o file.o parse.o particle.o tokenize.o rm -f out.sasm ./ascorbic test.asc out.sasm - tokenlist at 0 - endline at 43 - subkeyword at 62 - main at 66 - colonsymbol at 70 - endline at 71 - intkeyword at 73 - a at 77 - assignsymbol at 79 - integer 1 at 82 - subtractsymbol at 84 - subtractsymbol at 86 - integer 1 at 87 - endline at 88 - returnkeyword at 90 - endline at 96 - semicolonsymbol at 98 - endline at 99 - vitaminc at 0 - subkeyword at 62 - main at 66 - statementblock at 70 - intkeyword at 73 - a at 77 - subtract at 82 - integer 1 at 82 - subtract at 86 - integer 0 at 86 - integer 1 at 87 - returnkeyword at 90 Assembly_Write() successful rm -f out.seb `echo ~/bin`/sa out.sasm out.seb `echo ~/bin`/svm out.seb PUSH 0x00000002; // frame[0] = 0x00000002 PUSH 0x00000003; // frame[1] = 0x00000003 JUMP 1; // defn 3 POP; // frameheight = 1 PUSH 0x00000001; // frame[1] = 0x00000001 PUSH 0x00000000; // frame[2] = 0x00000000 PUSH 0x00000001; // frame[3] = 0x00000001 SUBTRACT 2 3; // frame[4] = 0 - 1 == -1 ASSIGN 4 2; // frame[2] = -1 POP; // frameheight = 4 POP; // frameheight = 3 SUBTRACT 1 2; // frame[3] = 1 - -1 == 2 ASSIGN 3 1; // frame[1] = 2 POP; // frameheight = 3 POP; // frameheight = 2 POP; // frameheight = 1 JUMP 0; // defn 2 POP; // frameheight = 0 HALT; 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00