Mo's Blog.

Intermediate Code Generator Operators

Pasted image 20241214144120.png

Backlinks

Code Generatorsimilar to Intermediate Code Generator Expressed as: Opr Arg1, Store/result No arg2 Use # for numbers If there is a while or if, add jmpf right away only do while uses jmpt only jmpf always come first ex: a = a \* a mov a, R0 mul a, R0 mov R0, a Intermediate Code Generator Operators Example Kenny Jingga Responsi 2024 (for) Screenshot 2024-12-28 at 2.36.55 PM.png 1. mov #0, a (int a = 0) 1. mov #0 i (i = 0) 1. move i, R0 (prep for operation, beginning of for loop) [R0 = i = 0] 1. lIntermediate Code GeneratorExpressed as quadruples: Opr Arg1, Arg2, Store/result If there is a while or if, add jmpf right away only do while uses jmpt only jmpf always come first Intermediate Code Generator Operators Example Alvina Aulia Intermediate Code Generator (while) x := 1; y := x + 10; while (x Final Exam](../compilation-techniques.md#final-exam) References
  • Portfolio
  • Resume
  • About Me
  • Reading
© 2025 Farih Muhammad. All rights reserved.