ELET2100 - MICROPROCESSORS I

                              COURSE TEST #1 - WEDNESDAY 17th OCTOBER 2007

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

 

( 1 )      Data byte 28H is stored in Register B and data byte 97H is stored in the

            Accumulator. Show the contents of registers B, C, and the Accumulator

            after the execution of the following two instructions:

                                               

                                                MOV  A, B

                                                MOV  C, A                                                                             [2]

 

( 2 )      Write Assembly Language (AL) code to add the following two Hex numbers.

            Both numbers should be saved for future use and the sum should be saved in

            the Accumulator.

 

                                                Numbers are: A2H and 18H                                     [3]

 

( 3 )      If the internal clock frequency of an 8085 CPU is 4 MHz, how much time is

            required to execute an instruction of 18 states ?                                                     [2]

 

( 4 )      If your CPU has an address bus consisting of 20 pins, what is the highest

            address in the memory system (in decimal) ?                                                          [1]

 

( 5 )      The 8085 CPU executes the following code:

                                                    .

                                                    .

                        09FD               LXI     SP, 20FFH

                        1000                MVI    A, 79H

                        1002                RAR

                        1003                CALL  Hello

                        1006                RST    5

                        1007                DCR   A

                                                    .

                                                    .

            ( a )  sketch a diagram showing the contents of the Stack                                       [2]

            ( b )  what is the value in the Stack Pointer (SP) after executing RST 5 ? [1]

            ( c )  where does the CPU go after executing RST  5 ?                                           [1]

 

( 6 )      Specify the output at PORT1 if the following code is executed:

 

                                                MVI B, 82H

                                                MOV A, B

                                                MOV C, A

                                                MVI D, 37H

                                                OUT PORTI

                                                HLT

[ Assume POTR1 is already initialized as an Output port ]                                     [3]

 

 

( 7 )      Specify the register contents and the status of the flags shown, after the following

            Instructions are executed:

                                                             A       C       S      Z      CY

                                                            XX    XX     0       0       0                    (initial values)

            MVI A, 5EH

            ADI A2H

            MOV C,A

            HLT                                                                                                                            [5]  

 

( 8 )      Indicate whether the following statements are (T) or (F)alse:

 

            ( a ) if the 8085 CPU is interrupted while executing a 3-byte instruction, it will

                   acknowledge the request immediately before completion of the instruction.

 

            ( b ) when the 8085 CPU is Reset, all interrupts are disabled, including TRAP.

 

            ( c ) RST 6.5 has a higher priority than INTR.

 

            ( d ) the instruction, EI, is necessary to enable the TRAP interrupt.

 

            ( e ) the execution of instructions MVI A, 10H, then SIM, will enable all three

                    Interrupts (7.5, 6.5, and 5.5).                                                                             [5]

 

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

 

            ( i )  8-LED’s on Port 00

 

            ( ii ) 8-switches on Port 01

 

            Write AL code, with comments, to initialize the ports, read the status of the switches,

            Count the number switches that were ON (set), turn ON that number of LED’s.  [5]

 

 

Bonus mark:

 

How many seats across are there in the first row of seats, in the SLT? (± 1 seat).

 

                             Maximum mark = 30