exam1_solution - {5’3 King Fahd University of Petroleum...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: {5’3 King Fahd University of Petroleum & Minerals Electrical Engineering Department EE-390' Exam-1 061 ' 5‘" November 200 Answer the followin 6kg /’————'N uestions in 1.30 hour Name : Section : ID. I( a). Write a program that will affect AL register in the following manner: (i) Set the LSB and (ii) Reset the content of bit 3 and bit 6, (iii) Invert the content of bit 5 and the M83. Don’t . change the other bit contents of AL register and don’t assume any value for AL. AL=lBit7 Bit6 Bits Bit4 Bit3 Bit2 Bitl BitO (Maximum4 linesotcade) 1(b) Write a program segment (without Title, Model ....) to: (i) “Subtract” the double~word CX,DX=67895734H from the double-word BX,AX=77862945H and store the resulted double-word in CX,AX (Maximum 5 lines at cor/e) ; Line 1: W w W 2(a). If AL=06H, write a program to perform: ‘-3H’ x ‘AL’ and store the result in BX (Maximum 3 lines) coco 0°” troy; CL! FD” 1: “It Iloi D May [3] no” Kg 4K Also write the value of BX after program execution: BX: FFEEH 2(b). 1fthe physical address ofthe last storage location in the Data-segment ofthe main memory is 2233FH; then write a program that will load the contents of AL register into this memory location using Based-addressing mode. The given value for Displacement = 0F“. 0 [13‘] 0 Nov AX, (Maximum3lines) 7? @r) : II? W New I)! ,er [7.51 We WWW] flL 2(0) in data segment, a double word of“3456AF45H” is store in a memory location of DS:SI. Use “Load Data Segment” instruction to load registers: DS = “AF45H” and S[ = “3456"” (Maximum 4 lines) LD5 41/ [Ni [1.911 3“ Z); (I 3—] (10.1 Dr 41 3(a) Write a program to exchange the contents of most-significant-nibble with the content ofleast—significant-nibble of AX register, without affecting the remaining data bits of AX. (Maximum 10 lines) AK N3 i/VL m Mm! (L2 AL W A, M M, \M 4/ M; I M 0 7 3(b). Write a program using “Shift instruction” to perform: CC" + 043 (Maximum 3 lines) may CL, 1 ...
View Full Document

This note was uploaded on 05/17/2010 for the course EE EE390 taught by Professor Mohandes during the Spring '10 term at King Fahd University of Petroleum & Minerals.

Page1 / 3

exam1_solution - {5’3 King Fahd University of Petroleum...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online