Read data from port 0 if bit 3 of port 0 is 1 then write


Microprocessor Interfacing & Programming

Q. Write program code in 8051 assembly language for the following conditions

a. Read data from Port 0 if bit 3 of Port 0 is ‘1' then write same data to Port 1 otherwise exit.

b. Read data from Port 0 if bit 3 of Port 0 is ‘1' then write same data to Port 1 and exit else write same data to Port 2 and exit

c. Read data from Port 0 if bit 3 of Port 0 is'1' then write same data to Port 1 and Port 2 otherwise exit.

d. Read data from Port 0 if bit 3 of Port 0 is'1' then write same data to Port 1 and Port 2 and exit else write same data to Port 3 and exit.

e. Read data from Port 0 if bit 3 and bit 6 of Port 0 are both ‘1' then write same data to Port 1 otherwise exit.

f. Read data from Port 0 if bit 3 and bit 6 of Port 0 are both ‘1' then write same data to Port 1 and exit

g. Read data from Port 0 if bit 3 or bit 6 of Port 0 is ‘1' then write same data to Port 1 otherwise exit.

h. Read data from Port 0 if bit 3 or bit 6 of Port 0 is ‘1' then write same data to Port 1 and exit else write same data to Port 2 and exit.

Solution Preview :

Prepared by a verified Expert
Other Engineering: Read data from port 0 if bit 3 of port 0 is 1 then write
Reference No:- TGS02354701

Now Priced at $15 (50% Discount)

Recommended (99%)

Rated (4.3/5)