Write a program to get input from an input device with address 30H and check the type of the
number: odd or even, prime or composite and negative or positive. Assume that the output port
40H has 8 pins with 8 LEDs. Pin D0 for prime, pin D1 for composite, D2 for odd, D3 for even,
D4 for positive and D5 for negative. Pins D6 and D7 are left unconnected. Turn on respective
three LEDs depending upon the number.
Comments
Post a Comment