Lab 6.3
#6) For each of the following statements, determine-without using Rosetta!-the PIPPIN code that would be generated for it. Then luse Rosetta to verify your answeres.

A) Y=Z*3-X CODE GENERATION

Y=Z*3-X

Y=(Z*3)-X LOD Z

MUL 3

Y=( )-X

STO T1

Y= -X SUB X

Y= STO Y

Y=

ROSETTA says: Y=Z*3-X 3 X Y - = LOD Z ACC X MUL #3 Y - = Y ACC SUB X = = STO Y

AA) Y=Z*3-X PARSING Z 3 * X E--->E*E Y - E--->E-E = S--->E=E

B) X=(Y+5) / 2 X=(Y+5) / 2 LOD Y ADD #5 X=( ) / 2 STO T1 X= / 2 DIV 2 X= STO T1 - STO X

Bb) ROSETTA SAYS Y 5 LOD Y ADD #5 (ACC) ACC 2 DIV 2 X ACC STO X =

BB) PARSING Counter