HOW CAN I GENERATE ASSEMBLER CODE GIVEN A PROGRAMMING STATEMENT?
A.: Use the Module 6 PIPPIN assembly language generator to get you started. You need to recognize and implement all three phases – scanning, parsing, and code generation. In Module 6.5 Exercise 16, for example, we are asked to describe the process of getting from a programming statement to code generation. Scanning: Normally we could start with parsing immediately from a formula. However Exer. 16.1 is not in a form recognized by PIPPIN – the token “+=” is not recognized even though it is a valid JavaScript operator. So we must recall the meaning of “+=” assignment operater in JavaScript. In words, we take the plus “+” first. This represents adding the value on the left of the operator to the value on the right. The equal sign “=” portion of the operator is the typical assignment operator – take the portion on the right of the operator (now increased by the value on the left) and assign it to the value on the left. (See also information on JavaScript operator += , “Add by value”.) For e