Part 4: Analysis of loop program structure and control of flow changes (1 pt eac
ID: 3583121 • Letter: P
Question
Part 4: Analysis of loop program structure and control of flow changes (1 pt each answer) 20 points Figure 4Conditional flow program (same program as Fig. 3). Mov AX, 2000 Nov SI, 0100 Mov DI,0120 cx, 010 (S11 REPEAT Mov DIl AH SI DI CX (a) cts 100 114 Instructio 1 1374:0100 B80020 Mov Ax, 2000 Instruction 2 1374:0103 BED8 D5 Instruction 3 1374:0105 BB0101 Mov BX, 0110 Instruction 4 1374 0108 8A27 Instruction 5 1374:010A 886740 Mov IBx 440 AH Instruction 6 1374:0100 43 INC BX. 0130 Instruction 7 1374:010E 81 FB3001 cMP ax, 0108 Instruction B 1374:0112 75F4 1374:0114 Instruction (b) The program in 4(a) in Lab Exercise 3 to observe its operation and then redesigned to meet an Fig was nun Fig. 4(b) performs essentially the same Block altermate set of requirements. The code sequence in it employs a different design, Move (Copy) as the program of and destination amays are located at different processes a different size array ofdata, and the source addresses. This problem involves the interpretation of operation of this altermate program and a comparison to the program in Fig40a) About the structure of the loop program in Fig 40b 1. Identify the range of logical addresses that comespond to the instructions that perform initialization prior to entry ofthe body ofthe loop. through 2 What is the number of the instruction the represents the entry point of the body of theloop? 3 Identify the range of logical addresses that correspond to the instructions that are repeated as part of the loop operation (the body of the loop). through Ans,Explanation / Answer
Ans.1. 0100 to 010A is the range of addresses. (Since all the moving of variables in memory happens in this range)
Ans.2. Instruction 4: because jump happens to this address after comapring the loop breaker (see instruction 8)
Ans.3. 0108 to 0112 contains the loop
Ans.4. Instruction 8 compares to come out of loop or not.