EL21C Class Test #1-- 19th October 2004 [1 hour]

Attempt ALL questions

 

1.         What is the status of the Flag bits, after the following instructions, assuming

 A = 11H, B = 22H, C = A7H, H = CCH, L = 00H, and all Flag bits are reset

before each instruction:

 

                        ( a )      ADD   L                                                                                  [1]

                        ( b )      ORA   B                                                                                 [1]

                        ( c )      MOV  H, L                                                                             [1]

                        ( d )      XRA    B                                                                                 [1]

                        ( e )      DCX    C                                                                                                     [1]

 

2.         Write a short Assembly Language routine that ADD the contents of memory

            locations 0023H & FF00H, then store the result in 2000H.                               [4]

 

3.         How would you determine where the Stack is located ?                         [1]

 

4.         The subroutine DLAY, is shown below. Determine exactly the time this routine

takes if it is entered with DE=0010h. What registers are destroyed ?

(Use Internal Clock Frequency = 3 MHz)                                                         [5]

DLAY: DCX  D                       [ 6 states  ]

MOV   A,D                  [ 4 states  ]

ORA    E                      [ 4 states  ]

JNZ     DLAY              [7/10 states]

RET                             [10 states  ]

 

5.         Figure 1 shows a 3:8 Decoder. What address ranges would enable outputs Y0

and Y7 ?                                        [5]

                           Figure 1

6.   What address does the 8085 CPU go to when it executes

the RST 4 instruction ?                         [1]

7.   How many Ports can the 8085 CPU address ?       [1]

 

8.                                                         MVI    A,22

                                                            OUT    2

What would these two instructions accomplish on the SDK-85 lab kit ? [2]

 

9.         Write Assembly Language code to:

            (a)        Setup (initialise) Ports                                                                           [2]

            (b)        Read Port 21H switches & display status on LEDs. Which LEDs

would be ON ?                                                                                    [4]

           

10.       What are the contents of the PC register on the 8085 ?                          [1]

 

11.       If the 8085 CPU was performing a Write operation to memory

(eg: MOV  M, D ), which Control Bus signals would be active ?                        [2]

 

12.       How many Data pins does the 8085-A CPU contain ?                          [1]

 

13.       How many Address pins does the 8085-B CPU contain ?                                 [1]

 

Bonus: The Department of Computer Science, Mathematics & Physics has a new

sign on the outside face (eastern side) of the office building. The lettering is

White, what is the background colour  ???

 

Maximum mark is 35.