Microprocessor Practical Questions
Microprocessor Practical Questions
Logical Operations
1. Write a program to AND the content of reg B and content of memory at 9030. Assume
the content of 9030 as 34 and reg B as 92.
2. Write a program that will check whether D4 bit of data at address 9030 is zero. Just check
the result after the operation.
3. The content of the memory is shown in the figure along side. Write 9024 A2
a program to OR the content of memory location 9024 with the 9025 79
memory location 9025 and store the result at 9026. 9026
4. Write a program to XOR the content of 9027 with the location 9028 9027 4B
and store the content at 9029. 9028 C4
9029
5. Logical instructions can also be used to mask certain bits of a word. Write a program to
complement bit D6 of data at memory location 9025. Assume data as shown in the above
figure.
6. We can complement the accumulator content by using instruction other than CMA How
is that possible? Write a program to illustrate this.
7. Write a program to compare the content of the memory location
8081 36
8081 and 8082. Subtract the memory content at 8082 from 8081
and see whether the flag content is same as the compare instruction 8082 A4
or not. 8083
8. Write a program to check the bit D5 of the content of memory at 9025. Display 1 at port
A if the bit is 1 else displays nothing. Use the rotating instructions after masking. Use the
rotating instruction which uses less no of instructions.
9. Change the program in assignment 8 to display 80H if the bit is 1 else nothing.
The Branching and stack operations
1. Write a program to set zero and parity flags and reset other flags.
2. Write a program to set auxiliary flag and reset parity flag without affecting other flags.
3. Write a program to count the no of bits that are 1 in register A.
4. Write a program to add nos. from one to fifty and display the 16 bit result at port A & B.
5. Write a program that will count up from 00 to FF at port A. Be sure to use PCHL
command.
6. Write a program to transfer the data at 8020 to 8030 if the data is greater than 127. You
can assume data yourself.
7. Write a program to rotate the data 3C in port A. Call a delay subroutine for the delaying.
8. Write a program that will check whether the bit D6 of a number stored at 8123 is 0 and
its bit D3 is 1. If the condition satisfies display the number.
9. Write a program that will check whether the number in reg. B is even or not. If the
number is even display it in port A.