Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Run the program. Examine the how the computer stored the data starting at addres

ID: 3836760 • Letter: R

Question

Run the program. Examine the how the computer stored the data starting at address 900H. In Results Section, you are to analyze/explain what was observed Write (or find) an assembly language program with all the "over head" to include setting up the stack segment and the data segment (SS) registers. Then include the below set of instructions. Unassemble the program and note code for the JNZ and the JMP instructions. Show the calculations for the displacement part of the instructions, HERE: MOV CX, 9 MOV AL, 0 MOV BL, 2 ADD AL, BL INC BL DEC CX JNZ HERE JMP THERE MOV AL, DL MOV AH, DH THERE: INT 20 Results: Provide an analysis of the calculated results of each of the above programs.

Explanation / Answer

/* * Java Program to Evaluate an Expression using Stacks */ import java.util.*; public class EvaluateExpressionUsingStacks { public static void main(String[] args) { Scanner scan = new Scanner(System.in); /* Create stacks for operators and operands */ Stack op = new Stack(); Stack val = new Stack(); /* Create temporary stacks for operators and operands */ Stack optmp = new Stack(); Stack valtmp = new Stack(); /* Accept expression */ System.out.println("Evaluation Of Arithmetic Expression Using Stacks Test "); System.out.println("Enter expression "); String input = scan.next(); input = "0" + input; input = input.replaceAll("-","+-"); /* Store operands and operators in respective stacks */ String temp = ""; for (int i = 0;i