What is intermediate code?
At this point, you may be asking, what is intermediate code, and what will I need to generate it? We previously defined it as a sequence of machine-independent instructions, but what does that mean? A sequence can be represented by either an array or a linked list, or possibly something fancier; in Unicon, it will just be a list, while in Java, it will be an ArrayList. But what are the elements – these machine-independent instructions? Like a machine-dependent instruction, a machine-independent instruction has an opcode and zero or more data values used as operands. The difference is that instructions for a real machine have a very specific and precise binary layout in one or more bytes, using machine-specific registers and memory addressing modes. In contrast, machine-independent instructions refer to data values in a more abstract way, as values to be found at some location in memory.
The act of generating intermediate code produces enough information...