COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
LOAD r1, LOAD r2, ADD r1, DIV r1, #2
A
Machine Code
B
High Level
C
Assembly Language
D
None of the above
Explanation: 

Detailed explanation-1: -Add R1, R2 (means:R1<—R1+R2) i.e. Adds the values of both … The instruction, Add R1, R2 does A. a Adds the value of R1 to RO and stores in the temp register B. Adds the value of R2 to the address of R1 C. Adds the values of both R1 and R2 and stores it in R1 D.

Detailed explanation-2: -Types of instruction format include: Zero(0) Address Instruction format. One(1) Address Instruction format. Two(2) Address Instruction format.

Detailed explanation-3: -Transfer the contents of register PC to register MAR. Issue a Read command to memory. Transfer the instruction from MDR into IR and decode it. Transfer contents of R1 and R2 to the ALU. More items •18-Feb-2020

There is 1 question to complete.