0% found this document useful (0 votes)
17 views2 pages

Tutorial Chapter 2-Practices and Questions

Microprocessor 8085A Question of programming tutorial with solution . 8085A 8 bit microprocessor

Uploaded by

monkeylifematter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Tutorial Chapter 2-Practices and Questions

Microprocessor 8085A Question of programming tutorial with solution . 8085A 8 bit microprocessor

Uploaded by

monkeylifematter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Tutorial Chapter-2

Practice Questions (Train yourself)


1. Write Instruction to load a two hexadecimal numbers 32H and 48H in registers A and B
respectively. Add the numbers and display the result at output port 00H.

2. WAP to load two bytes in B and C. Perform B-C. Store the result in 2000H if result is
negative else store the result in 2001H. Also store the absolute value of B-C in 2002H if
the result is negative.

3. Six bytes of data are stored in memory location starting at 2050H. Add all the data bytes
and use register B to save carries if any generated while adding bytes. Display the entire
sum at two output port PORT1 and PORT2. Also store the sum at two consecutive memory
location 2070H and 2071H.

4. A set of 10 readings are stored in location starting from 3060H. The readings are expected
to be in sign-magnitude form of number representation.
a) Check each reading to identify the sign. Count the numbers of negative numbers,
positive numbers and zeros in the set. Store these counts at 8040H, 8041H, and 8042H.
b) Add all positive numbers and output FFH anytime the sum exceeds 8-bit length,
otherwise display the sum as it is.

Additional exercises with old questions and book references


1. WAP for 8085 to count the numbers for which upper nibble is higher than the lower nibble;
store the count at the end of table having 50 bytes data from C050H.

2. Write an ALP in 8085 to transfer 20 bytes of data in a table to another table by


interchanging D1 and D4 bits of each byte.

3. There are two tables holding twenty data whose starting address is 9000H and 9020H
respectively. WAP to add the content of first table with the content of second table having
same array index. Store sum and carry into the third and fourth table indexing from 9040H
and 9060H respectively.

4. WAP program for 8085 to find the square of ten 8-bit numbers which are <= 0FH, stored
from memory location C090H. Store the result from the end of the source table.

5. WAP in 8085 to calculate the number of ones in the upper nibble of ten 8-bit numbers
stored in a table. Store the count of ones in a location just after the table.
6. WAP for 8085 to generate multiplication table of a number stored at 8230H and store the
generated table starting at 8231H. For example, if location 8230H has number 05H then
store 05H at 8231H, 0AH at 8232H and so on.

7. WAP for 8085 to add the upper and lower nibble of ten 8-bit words stored in a table that
starts from location 8B20H. Store the separate results in locations just after the table.

8. Write an ALP for 8085. Table1 contains 16 no. of 8-bit data, transfer data which have
number of 1s greater than, from table1 to table2, otherwise store FFH in table2.

9. WAP program for 8085 to exchange the bits D6 and D2 of every byte of a program.
Suppose there are 200bytes in the program starting from memory location 8090H.

10. Write an ALP in 8085 to divide a byte stored in memory location 9070H by byte stored in
9071H and store the remainder and quotient at 9072H and 9073H respectively.

11. Write a program to convert ten BCD numbers stored at 4350H to binary and store the result
at 4360H.

12. WAP in 8085 to transfer 8-bit number from one table to another by setting bit D5 if the
number is less than 80H else transfer the number by resetting bit D6.

You might also like