Assembly Language Stack and Subroutines
1. Read the following program and answer the questions given below:
1 LXI SP, 0400H
2 LXI B, 2055H
3 LXI H, 22FFH
4 LXI D, 2090H
5 PUSH H
6 PUSH B
7 MOV A, L
20 POP H
a. What is stored in the stack pointer register after the execution of Line 1?
b. What is the memory location of the stack where the first byte is stored?
c. What is stored in memory location 03FEH when line 5 (PUSH H) is executed?
d. After the execution of line 6 (PUSH B), what is the address in the stack pointer
register, and what is stored in stack memory location 03FDH?
e. Specify the contents of register pair HL after the execution of line 20 (POP H).
2. Write a program to add the two Hex numbers 7A and 46 and to store the sum at
memory location XX98H and the flag status at location xx97H
3. Write a program to meet the following specifications:
a. Initialize the stack pointer register at XX99H
b. Clear the memory locations starting from XX90H to XX9FH
c. Load register pairs, B, D, and H with data 0237H, 1242H, and 4087H, respectively
d. Push the contents of the register pairs B, D, and H on the stack
e. Execute the program and verify the memory locations from XX90H to XX9FH
4. The following program has a subroutine located at location 2060H. Read the program
and answer the questions given at the end of the program
2000 LXI SP, 20CDH
2003 LXI H, 0008H
2006 MVI B, 0fH
2008 CALL 2060H
200B OUT 01H
2060 PUSH H
2061 PUSH B
MVI B, 05H
LXI H, count
a. When the execution of the CALL instruction located at 2008H-200AH is
completed, list the contents stored at 20CCH and 20CBH, the contents of the
program counter and the contents of the stack pointer register
b. List the stack locations and their contents after the execution of the instructions
PUSH H and PUSH B in the subroutine
c. List the contents of the stack pointer register after the execution of the PUSH B
located at 2061H
d. List the contents of the stack pointer register after the execution of the RET
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
PLACE THIS ORDER OR A SIMILAR ORDER WITH USA CUSTOM WRITINGS AND GET AN AMAZING DISCOUNT