CS计算机代考程序代写 Java assembly Control Flow

Control Flow
Control flow is the path of execution in a program. Common control flow statements/structures include:
 _____________  _____________  _____________  _____________
Expanding the ISA
Can the current instructions in our ISA be used to implement the code shown above?
________________________________________________ ________________________________________________
Can the current instructions in our ISA be used to implement the sum of array elements in a dynamic array?
________________________________________________
________________________________________________
ISA for Static Control Flow
To be able to implement loops we need a new instruction that allow non-sequential control flow, need to be able to goto a different instruction if a condition is met
Differences in Jumps
Type of Jump
 Unconditional Jumps:
 Conditional Jumps:
Addressing Mode
 PC Relative Jumps:
 Absolute Addressing Jumps:
PC Relative vs. Absolute Addressing
PC Relative  Pro:
 Con:
 Use: Absolute Addressing
 Pro:  Con:  Use:
For loops
If-Else

What does the following piece of code do?
Static Procedure Calls
What is the difference between Java method and C procedure?
ISA for Static Procedure Flow
Write out the assembly code for the C code below. Assume that labels exist for a, b and c.
if (a == 0 && b > 0) { c = 1;
}
else {
c = 0; }
What is the C code for the assembly code shown below?
How does a procedure know the return address?
How does it jump to a dynamic address?
What is wrong with this piece of code?