Answered step by step
Verified Expert Solution
Question
1 Approved Answer
7.1 Program Analysis 1. Analyze the following program. Examine the instructions one by one, inspecting the values from the AC and the memory to understand
7.1 Program Analysis 1. Analyze the following program. Examine the instructions one by one, inspecting the values from the AC and the memory to understand what the program does. Write a simple pseudo code to describe the program. Give the following names to the variables stored at the memory addresses A0 - A3 (hex): 2. Address A0 A1 Name of variable Counter Note that X, Y and Z are pointers. 3. 4. What does calculate this program? Why is practical to use in this program memory - reference instructions with indirect addressing in other words, instructions which use pointers)? % PROGRAM IS IN the RANGE Of ADDRESSES 00 TO 7F % 00:04; % LDA (direct) % 01: a0; % from address a0 % 02:42; CA % 03:08; % STA (direct) % 04: a0; % AC to address a0 % 05:20; % 1SZ (direct) % 06: a0; % counter stored at a0 % 07:10; % BUN (direct) % 08:20; % to address 20 % 09:60; HLT % 20:84; % LDA (indirect) % 21: a1; % the number pointed to by the memory location a1 % 22:82; % ADD (indirect) % 23: a2; % the number pointed to by the memory location a2 % 24:88; % STA (indirect) % 25: a3; to the memory location pointed to by a3 26:04; % LDA (direct) % 27: a1; % from the address a1 % 28:50; Inc % 29:08; % STA (direct) % 2a: a1; AC to the memory address al 2b : 50; Inc % 2c: 08; % STA (direct) % 2a: a2; % store AC to the memory address a2 % 7 % STA (direct) % % send AC to the memory address a3 % % BUN (direct) % % to the memory address 05 % % DATA ARE FOUND AT ADDRESSES 80 TO FF % 2f: 08; 30: a3; 31:10; 32:05; 80: 01; 81: 01 a0: 0a; a1: 80; a2: 81; a3: 82: loop counter, which will be done 10 times % pointer to the first number to be added % % pointer to the second number to be added % inter to memory location where result will be stored %
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started