Question: Code generator. The task is to create a program that manages to translate the syntactic / semantic parse tree into a target code. which in
Code generator. The task is to create a program that manages to translate the syntacticsemantic parse tree into a target code. which in this case, will be a pseudo assembler that contains the following instructions:
Moves a value from one memory location to another or between registers.
Perform a sum between two registers or a memory location and a register.
Perform a remainder between two registers or a memory location and a register.
Perform a multiplication between two registers or a memory location and a register.
Perform a split between two registers or a memory location and a register.
Increments the value of a register or memory location by
Decrements the value of a register or memory location by
Compares two values without modifying the result.
Perform an unconditional jump to a specific memory address.
Jumps to a memory address if the values are equal.
Jumps to a memory address if the values are not equal.
Jumps to a memory address if the value is greater than another.
Jumps to a memory address if the value is less than another.
Jumps to a memory address if the value is greater than or equal to another.
Jumps to a memory address if the value is less than or equal to another.
Perform a logical AND operation between two registers or a memory location and a register.
Perform a logical OR operation between two registers or a memory location and a register.
Perform a logical XOR operation between two registers or a memory location and a register.
Perform a logical NOT operation on a record.: Perform a left shift on a record.
Shift right on a record.
Pushes a value onto the stack.
Pops a value from the stack: Makes a call to a subroutine or function.
Returns from a subroutine.
Does not perform any operation: Stops the execution of the program.
Load the effective address into a record.
Moves a value to a zeroextended register.
Moves a value to a register with a sign extension.
Loop as long as a counter is not zero.
Generates an interrupt to perform a specific system operation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
