Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case AND_EXPR: temp = andCount++;
- codeGenExpr(t->children->data, classNumber, methodNumber);
- fprintf(fout, "lod 1 6 1 ;AND-START-load-e1\n");
- fprintf(fout, "mov 2 1 ;and-mov-1-into-r3\n");
- fprintf(fout, "blt 1 2 #ANDZERO%d ;and-check-1\n", temp);
- incSP();
- codeGenExpr(t->childrenTail->data, classNumber, methodNumber);
- fprintf(fout, "lod 1 6 1 ;AND-START-load-e1\n");
- fprintf(fout, "mov 2 1 ;and-mov-1-into-r3\n");
- fprintf(fout, "blt 1 2 #ANDZERO%d ;and-check-1\n", temp);
- fprintf(fout, "str 6 1 2 ;and-set-1\n");
- fprintf(fout, "jmp 0 #ANDEND%d ;and-jmp-end\n", temp);
- fprintf(fout, "#ANDZERO%d: str 6 1 0 ;and-set-zero\n", temp);
- fprintf(fout, "#ANDEND%d: mov 0 0 ;AND-END\n", temp);
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement