ELET2100 (EL21C) COURSE TEST #1

                                               WEDNESDAY 19th OCTOBER 2005

                                                         MICROPROCESSORS I

                                                          Time: (12:00 - 1:00 )PM

 

( 1 )      How many bytes of memory does each instruction (below) occupy:

(a)        ANI     3FH

(b)        DCX    H

(c)        JNZ     789AH

(d)        LDA    1234H

(e)        XRA    A                                                                                                         [5]

 

( 2 )      If a CPU has 22-address pins, what is the last (highest) address that can be

generated  (show decimal or hex value) ?                                                                [1]

 

( 3 )      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 = 53H; B = 0FH; C = 12H

 

                                                (i)   XRA   B

                                                (ii)  CPI     45H

                                                (iii) MVI    A, 10H

                                                (iv)  DCX   B

                                                (v)   RAL                                                                                [5]

 

( 4 )      If the clock frequency of the 8085 CPU on your Lab kit is 3.15 MHz, how much

time is required to execute an instruction of 5 states ?                                           [2]

 

( 5 )      Figure 1 show two logic gates fed from signals of an 8085 CPU. Indicate which

output is active when an OUT statement is executed & which is active for an IN

statement.                                                                                                                   [2]

 

 

 

 

 

 

 

 

 

 

 

( 6 )      For Question 5, is the logic level for active, high or low ?                                       [1]

 

 

( 7 )      If registers A = 11H, B = 22H, C = 33H, D = 44H, E = 55H, and the SP = 20C2H,

at the start of the program code below, use tables ( or otherwise) to show the contents

of the Stack area and SP after each instruction:

 

                                    PUSH D

                                    PUSH B                                 

                                    POP   D

 

            What are the contents of the DE register pair?                                                       [4]

 

( 8 )      Figure 2 shows a (3:8) address decoder fed with signals from an 8085 CPU.

What two address ranges will cause outputs X0 and X4 to be activated,

respectively ?                                                                                                             [3]

 

 

 

 

 

 

 

 

 

 

           

                                                                                               

 

( 9 )      Write a commented AL program to turn ON the two LEDs at the extreme

ends of Port 00H of your SDK-85 lab kit. Show your initialization code for

the 8755 IC.                                                                                                                [3]

 

( 10 )    What is the function of the PC register in the 8086 CPU ?                         [1]

 

( 11 )    What is the maximum Memory and Port space the 8085 CPU can address ?       [2]

 

( 12 )    What value would you send to the Command Status Register (CSR ie: Port 20H)

on the 8155 I/O IC to program all three I/O ports as output ports ?                      [1]

 

( 13 )    Write a commented Assembly Language program to count the number of

set bits in Register B. Your result should be left in Register E.                              [5]

 

Bonus mark:

 

The SDK-85 kits in the Lab have a small green Keypad on the lower right of the kit.

How many keys make up the Keypad ?

 

Maximum mark = 35