THE UNIVERSITY OF TRINIDAD & TOBAGO

THE UNIVERSITY OF TRINIDAD & TOBAGO FINAL ASSESSMENT/EXAMINATIONS DECEMBER 2013 Course Code and Title: MCRO2002 - Microprocessor Systems Programme: D...
Author: Guest
18 downloads 1 Views 426KB Size
THE UNIVERSITY OF TRINIDAD & TOBAGO FINAL ASSESSMENT/EXAMINATIONS DECEMBER 2013

Course Code and Title: MCRO2002 - Microprocessor Systems Programme: Diploma in Computer, Network and Telecommunication Engineering Date and Time: 17 December 2013 (1:00 pm – 4:00 pm)

Duration: 3HRS

PLEASE READ ALL INSTRUCTIONS CAREFULLY BEFORE YOU BEGIN THIS EXAMINATION

Instructions to Candidates 1. This paper has 12 pages and FOUR sections. 2. You are required to answer ALL questions in Section A, Section B, Section C. 3. You are required to answer ANY TWO questions in Section D.

Key Examination Protocol 1. Students please note that academic dishonesty (or cheating) includes but is not limited to plagiarism, collusion, falsification, replication, taking unauthorised notes or devices into an examination, obtaining an unauthorised copy of the examination paper, communicating or trying to communicate with another candidate during the examination, and being a party to impersonation in relation to an examination. 2. The above mentioned and any other actions which compromise the integrity of the academic evaluation process will be fully investigated and addressed in accordance with UTT’s academic regulations. 3. Please be reminded that speaking without the Invigilator’s permission is NOT allowed.

© The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

Page 1 of 12

Section B: QI: Fill in the Blanks [10 Marks] 1. The memory in 8086/88 is divided into _____ segments each with ______size. 2. To store a 64 bit data in 8088 memory (RAM) we need _____ memory locations. 3. During a 16 bit data fetch, 8088 uses __________ number of memory read cycles. 4. Each peripheral device on the 8088 system is given a ______size memory address. 5. The 8088 CPU is capable of operating on ________ size or ________ size operands. 6. The logical address consists of ________ and _____________. 7. Retrieving the data from the Stack segment is called______________. 8. The flag register indicator PE means ________. 9. JNZ opcode means____________________. 10. In unsigned multiplication of AX with BX, the product is placed in register(s) ___________.

QII: Determine if the following MOV statements are legal, if not, explain why: [10 Marks]

a) MOV CX,BX b) MOV [0200],AL c) MOV AX,BL d) MOV AH,5B6F e) MOV DX,10 f) MOV 300,AX g) MOV AL,200 h) MOV [02A0],[0200]

© The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

Page 6 of 12

i) MOV DS,3000 j) MOV DS,AX

QIII: Match the following ADDRESSING MODES to their examples and write the matching number. [7 Marks]

Address Mode

Example

1. Register

MOV AH,[BP][SI]+29

2. Immediate

MOV CX, [BP] +20

3. Direct

MOV ES, AX

4. Register Indirect

MOV CL, [DI]+10

5. Based Relative

MOV CX,655

6. Indexed Relative

MOV BX, [0500]

7. Based Indexed Relative

MOV CL,[SI]

© The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

Matching Number

Page 7 of 12

Section C: QI: What will be the hexadecimal value of the destination operand after each of the statements in Table 1.0 has executed? (If any instruction is illegal, write the word ILLEGAL as the answer.) [13 marks] Instruction

Before

After

MOV AX,BX

AX=0023 BX=00A5

AX=

MOV AH,3

AX=06AF

AX=

MOV BL,AX

BX=00A5, AX=4000

BL=

MOV DI,100

DI=06E9

DI=

MOV DS,CX MOV [0025],BX

DS=OFB2, CX=0020 BX=A000

MOV CX, [0400] ADD AX,BX

DS:0400=AB DS:0401=12 AX= 2244, BX = 2222

DS= DS:0025= DS:0026= CX =

INC BL ADD DI,100 DEC CX

BX=FFFF, AX=4000 DI=06E9 CX=0000

ADD [0025],BX

BX=A000

SUB [400],[500]

© The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

AX= BX= BX= DI= CX= 0025= 0026= 0400= 0401=

Page 8 of 12

QII: ANSWER THE FOLLOWING QUESTIONS [ 20 marks] [5 marks each] (i)

What are the final values in the AX and BX registers for the following program? MOV MOV MOV ADD INT 20

(ii)

AX,ABCD BL,AL BH,AH BX,4321

What are the final values stored in memory locations 0200 and 0201 for the following program? MOV [ 0200],25 MOV [ 0201],26 MOV SI,0200 MOV AX,1213 ADD [SI],AX INT 20

(iii)

What will AX equal after the following instructions have executed? 107C:0200 10 20 107C:0300 30 40 MOV AX, [200] INC AX ADD AH,5 SUB AX, [200] INT 20

(iv)

Assume that SP = FFFEH ,AX = 3291 H, BX = F43CH AND CX =09. Find the content of the stack and the stack pointer after the execution of each of the following instructions. PUSH AX PUSH BX PUSH CX

© The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

Page 9 of 12

Section D: [20 Marks] Answer Any TWO [10 marks each]:

1. Assume that the registers have the following values (all in hex ) and CS = 1000, DS=2000, SS=3000,SI=4000,DI = 5000, BX = 6080, BP = 7000 ,AX =25FF , CX=8791, and DX = 1299. Calculate the physical address of the memory where the operand is stored and the contents of the memory locations in each of the following addressing examples.

(a) MOV [SI], AL (b) MOV [3600], AX (c) MOV [BX], CX (d) MOV [SI] +50 , AH

2. Determine the output of the following program: What will be contents of memory locations DS:300 to DS:30F given the following input data from DS:200 to 20F. © The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

Page 10 of 12

0E9E:0200 01 02 03 04 05 06 07 08-09 10 11 12 13 14 15 16

0E9E:0100 BE0002 0E9E:0103 BF0003 0E9E:0106 B90900 0E9E:0109 8A04 0E9E:010B 2405 0E9E:010D 7405 0E9E:010F 8A04 0E9E:0111 8805 0E9E:0113 47 0E9E:0114 46 0E9E:0115 49 0E9E:0116 75F1 0E9E:0118 CD20

MOV MOV MOV MOV AND JZ MOV MOV INC INC DEC JNZ INT

SI,0200 DI,0300 CX,0009 AL,[SI] AL,10 0114 AL,[SI] [DI],AL DI SI CX 0109 20

3. For each of the subsequent 8088 instructions, write down the following information: (i) How long (how many bytes) is the machine code (object code)? (ii) How many operands (0,1 or 2)? © The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

Page 11 of 12

(iii)

Which is the source operand? Destination operand? If operand is in memory, where?

(iv) Name the addressing mode used for each operand.

(v) Is the operation being performed on BYTE -sized or WORD-sized operands? -u 100 128 0E97:0100 89D8

MOV

AX,BX

0E97:0102 88CC

MOV

AH,CL

0E97:0104 01CA

ADD

DX,CX

0E97:0106 46

INC

SI

0E97:0107 343E

XOR

AL,3E

0E97:0109 B83412

MOV

AX,1234

0E97:010C 223C

AND

BH,[SI]

0E97:010E 0B05

OR

AX,[DI]

0E97:0110 F8

CLC

0E97:0111 8A260002

MOV

© The University of Trinidad & Tobago December 2013 Final Examinations MCRO2002

AH,[0200]

Page 12 of 12

Suggest Documents