ELET2100 (EL21C) - MICROPROCESSORS I

                       COURSE TEST #1 - WEDNESDAY 18th OCTOBER 2006

                                                           Time: (3:00 - 4:00 )PM

 

( 1 )      Describe the effects on the Flags when the following instructions are executed.

Before each instruction, assuming all Flags = 0 (reset) and register contents are:

A = DAH; B = 06H; C = 9CH

 

                                                (i)   MOV        B, A

                                                (ii)  DCR         C

                                                (iii) ADD         B

                                                (iv)  IN            22H

                                                (v)   RAL                                                                                [5]

 

( 2 )      How many bytes of memory does the program below occupy ?

 

            STA     2000H

            OUT    15H

            MVI    A, 20H

            STA     2050H

            NOP

            IN        14H                                                                                                                 [2]

 

( 3 )      If the A-register = C7H and the instruction OUT 21H is executed, what is the

            binary status on the Address and Data busses ?                                                     [3]

 

( 4 )      List the hardware Interrupts on the 8085 in order of priority.                                [2]

 

( 5 )      Where does the RST 6 instruction jump ?                                                                [1]

 

( 6 )      In Figure 1 below, what address values (range) would enable the output of the

            OR-gate labeled “A” ?                                                                                              [3]

( 7 )      If registers BC = 52H, DE = FFH, HL = 4EH, what do they contain after the

            sequence of instructions below ?

            PUSH  B

            PUSH  H

            PUSH  D

            POP     B

            POP     D

            POP     H                                                                                                                     [3]  

 

( 8 )      Write an Assembly Language (AL) program that will load the value CCH in to

            memory location 2011H.                                                                                            [1]

 

( 9 )      Write an AL program that “sets bits 0, 4, & 5, and resets bits 2 & 7” of the

            memory location 2011H in question (8) above. What is the new contents of memory

            location 2011H ?                                                                                                        [4]

 

( 10 )    The 8155 IC contains 256-bytes of RAM, 3-I/O ports and a Timer/Counter. What

            is the maximum value that can be loaded into the Timer/Counter ?                       [1]

 

( 11 )    If the Timer/Counter is driven by a 100 KHz clock signal, how long will it take

            the Timer/Counter to reach its terminal count if it was pre-loaded with the

            value  1234H ?                                                                                                           [1]

 

( 12 )    The SDK-85 kit in the lab is equipped with:

            ( i )  8-LED’s on Port 00

            ( ii ) 8-switches on Port 01

 

The switches are set as: (msb) 00010101; [201F] = 3DH; [2020] = 06H; [2021] = FEH.

Assuming the ports are initialized and the program below is executed:

 

            IN        01H

            ANI     0FH

            STA     2020H

            RLC

            OUT    00H

            LXI     H,201FH

            AND   M

            STA     2021H

            HLT

 

( a )      What is stored in locations 201FH; 2020H; 2021H ?                                              [3]

( b )      Which LED’s are ON ?                                                                                             [1]

 

Bonus mark:

How many steps would you walk up from the ESL lab to the water-cooler ? (to ± 2 steps).

 

Maximum mark = 30