Question: 1. The following procedure evaluates the function z( x, y) where Z( x, y) = 27*x 14y+ (10*x + 17*y)* (19*x -3*y) procedure Evalz;

1. The following procedure evaluates the function z( x, y) where Z( x, y) = 27*x 14y+ (10*x + 17*y)* (19*x -3*y) procedure Evalz; var x, y, z: integer; begin write 'x? '; read x; write cr, lf, 'y? '; read y; Z := 27*x 14 y +(10*x + 17*y)* (19*x 3*y); write cr, lf, 'z( x, y) = ', z; end Evalz; Translate Evalz into X86 assembly language. Allocate words for the variables x, y, and z, and use GetInt and PutInt for integer 1/0. Use the Sethi-ullman algorithm to write optimal code for evaluating z.
Step by Step Solution
3.38 Rating (160 Votes )
There are 3 Steps involved in it
To translate the given procedure EvalZ into X86 assembly language lets start by allocating memory for the variables x y and z Well also use the SethiUllman algorithm to optimize the evaluation of z He... View full answer
Get step-by-step solutions from verified subject matter experts
