Soln To Assignment Up 8086
Soln To Assignment Up 8086
:
V SEM ICE SECTION II
Q2. Find the state of the flags CF, ZF and OF after the following instructions are executed:
a. OR AH, BH
b. AND BL, CL
Given AX=008CH, BX=345EH, CX=67EBH
Soln.
2. a. AH=00; BH=34; RESULT = 34;
CF=0; ZF=0; OF=0;
b. BL=5E; CL=EB; RESULT=4A;
CF=0; ZF=0; OF=0;
Q3. Find the contents of AX and CL after the following program is executed:
STC
MOV AX, 5485
RCR AL, 1
MOV CL, 03
RCL AX, CL
Soln. STEP 1: CF=1
3. STEP 2: AX=5485; AH=54; AL=85
STEP 3: AL=C2 (AFTER ROTATE RIGHT THROUGH CARRY);CF=1
STEP 4: CL=3
STEP 5: AX=1010 0110 0001 0101; CF=0
AX=A615
CL=03
Q4. What is the duration of the bus-cycle in an 8086 based microcomputer, if the clock frequency is 12MHz
and three wait states are inserted?
Soln. CLOCK FREQUENCY =12MHZ
4. T-state = 1/12MHZ=83ns
One bus cycle + 3 Wait states = 4T +3T = 7T
Total time = 7*83ns
= 581 ns
Q5. Initialize 8255 in mode 0, with Port B and Port C upper as input ports and Port A and Port C lower as
output ports. Write a program to read the status of switches from Port B and Port C upper and display
the status on Port B and Port C lower.
Soln. Control word = 1000 1010 = 8AH
5. Assume addresses PA = FO; PB=F1; PC = F2; CWR = F3; (Arbitrarily chosen)
Q6. Draw a diagram using memory banks for a 16KX16 RAM. Draw only the decoding circuit and
addressing to the even and odd banks.
DATE: ICC15 ASSIGNMENT ROLL NO.:
V SEM ICE SECTION II
Soln.
6
Q8. What is the purpose of using 8259? Can the 8086 work without this device?
Soln. (i) The PIC manages eight levels of requests and has built-in features for expandability to other
8 PIC (up to 64 levels).
(ii) It is programmed by system software as an I/O peripheral.
(iii) The priority modes can be changed or reconfigured dynamically at any time during main
program operation.
Q9. Draw the display section for a 8-bit display interfaced to 8279.
Soln.
9.