Question

In: Computer Science

Give the address of R4, R6 in the following program.

 Give the address of R4, R6 in the following program.

 ORG 0H

 MOV A, #92H

 SETB PSW.4

 MOV R4,A

 SETB PSW.3.

 MOV R6,A

 END

 I. RAM ADDRESS OF R4 = 14H and R6=1EH

 

 II. RAM ADDRESS OF R4 = 0CH and R6=0AH

 

 III.RAM ADDRESS OF R4= 15H and R6=02H

 

 IV.RAM ADDRESS OF R4= 0CH and R6=0EH




Solutions

Expert Solution

We can switch to other banks by using of the PSW register

1. Bits D4 and D3 of the PSW are used to select the desired register bank
2. Use the bit-addressable instructions SETB and CLR to access PSW.4 and PSW.

SETB PSW.4; bank 2 is selected on condition that PSW.3 is 0 ie not set

When both the PSW.4 and PSW.3 is set then Bank 3 is considered.

When in R4, A is stored, only PSW.4 is set. So, bank 2 is selected.

Hence Ram address of R4 is 14H according to the bank address.

When in R6, A is stored, both PSW.3 and PSW.4 is set ie 1. Hence Bank 3 is selected.

So, Ram address of R6 is 1EH according to the bank address

Therefore, Option (I) is correct.


Related Solutions

Using Linux system, give the name (such as "eth0") and the MAC address (Ethernet Address) of...
Using Linux system, give the name (such as "eth0") and the MAC address (Ethernet Address) of each network interface on your computer. (Consider ‘netstat’ or ‘ifconfig’ or ‘ip’ command)
write a python program, please. Create a program that uses the Gettysburg Address as input and...
write a python program, please. Create a program that uses the Gettysburg Address as input and outputs a list of tuples for every two words. For example: [('Four', 'score'),('and', 'seven'), ...].
Show and classify all potential data hazards. Instructions 1. add R2, R5, R4 2. add R4,...
Show and classify all potential data hazards. Instructions 1. add R2, R5, R4 2. add R4, R2, R5 3. sw R5, 100(R2) 4 . add R5, R2, R4
Write an assembly language program that corresponds to the following C program ****Please give correct answer...
Write an assembly language program that corresponds to the following C program ****Please give correct answer using Pep/9 machine**** int num1; int num2; ;int main () { scanf("%d", &num1); num2 = -num1; printf("num1 = %d\n", num1); printf("num2 = %d\n", num2); return 0; }
Use the Gram-Schmidt process to transform the following vectors into an orthonormal basis of R4: u1=?(0...
Use the Gram-Schmidt process to transform the following vectors into an orthonormal basis of R4: u1=?(0 2 1 0)?, u2=(?1 −1 0 0) ,u3=?(1 2 0 −1?), u4=?(1 0 0 1?) can you do this in MATLAB with step by step on how to use the code
Design a C++ program An address book is a book or a database used for saving...
Design a C++ program An address book is a book or a database used for saving and storing contacts which may usually consists of a few standard fields (for example: first name, last name, company name, address, telephone number, e-mail address, fax number, mobile phone number). Design an online address book to keep track of the details of family members, close friends and certain business associates. Details which your designed address book will keep should be like names (first name,...
For the following program fragment, (1) give an analysis of the running time T(n) as a...
For the following program fragment, (1) give an analysis of the running time T(n) as a function of n and (2) give a big-O bound on the asymptotic running time (tight bounds for full credit). Sum = 0; for (i=0; i< n; i++)    for(j=0; j < i*i; j++) if(j % i == 0) for (k=0; k<j; k++) Sum = Sum + 1;
There are three vectors in R4 that are linearly independent but not orthogonal: u = (3,...
There are three vectors in R4 that are linearly independent but not orthogonal: u = (3, -1, 2, 4), v = (-2, 7, 3, 1), and w = (-3, 2, 4, 11). Let W = span {u, v, w}. In addition, vector b = (2, 1, 5, 4) is not in the span of the vectors. Compute the orthogonal projection bˆ of b onto the subspace W in two ways: (1) using the basis {u, v, w} for W, and...
For a direct mapped cache design with 32 bit address, the following bits of the address...
For a direct mapped cache design with 32 bit address, the following bits of the address are used to access the cache Tag Index Offset 31 - 8 7 - 4 3 - 0 What is the cache block size (in words)? How many entries does the cache have? What is the ratio between total bits required for such a cache implementation over the data storage bits? Starting from power on, the following byte-addressed cache references are recorded. Address 0...
How many bits are required to address the program memory of PIC16F887? What is PCLATH? For...
How many bits are required to address the program memory of PIC16F887? What is PCLATH? For PC absolute addressing, describe how to write assembly program to jump to code located in a different program memory page.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT