Three Address Statement


Example Kenny Jingga Quiz

Screenshot 2024-12-30 at 12.32.32 PM.png

  1. mov C, , T1 (initializing array X)
  2. mul i, 8, T2 (declare the index with size of double)
  3. mov T1[T2], , T3 (X[i])
  4. param T3 (declare as paramater)
  5. add p, 1, T4 (p+1)
  6. param T4 (declare as paramater)
  7. mul q, 2, T5 (q*2)
  8. sub T5, 8, T6 (...-8)
  9. param T6 (declare as paramater)
  10. call f, 3, T7 (call function f with 3 parameters and store into T7)
  11. div T7, 2, T8 (.../2)
  12. mul 5, T8, T9 (5*...)
  13. mov T9, , C (C = ...)
  • ask micko n farrel for quiz answer

Status: #idea
Tags: compilation-techniques > Final ExamCompilation Techniques NotesMid Exam RE to DFA RE to E-NFA to DFA Context Free Grammar Top down parsing Final Exam Bottom Up Parsing Directed Acyclic Graph TAC, Triples, Quadriples Intermediate Code Generator Code Generator Annotated Parse Tree Three Address Statement resources: https://www.youtube.com/watch?v=6yRB6dszSUo&ab_channel=HIMTIBINUS * [x] watch all alvina aulia vids * [x] watch responsi (after OS) * [ ] try example questions from kenny * [ ] try example questions from others * [ ] practice weak


References