if 2 16bit operands multiplied the result will be

Size: px
Start display at page:

Download "if 2 16bit operands multiplied the result will be"

Transcription

1 how many operands in ADC? ans:3 how 32 bit word is defined? ans define double if 2 16bit operands multiplied the result will be ans 32bit if div by ero occurs then?? ans div by zero int for software int we write ans INT CS40 1 Computer Architecture and Assembly Language Programming Solved Objective Midterm Papers For Preparation of Midterm Exam Question No:1 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 (Page 19)

2 0x1000 0x0000 Question No:2 ( Marks: 1 ) - Please choose one The execution of the instruction mov word *ES : 0+, 0x0741 will print character A on screen, background color of the screen will be Black (Page 81) White Red Blue Question No:3 ( Marks: 1 ) - Please choose one The iapx888 architecture consists of register (Page 15) 18 Question No:4 ( Marks: 1 ) - Please choose one The execution of the instruction mov word *ES: 0+, 0x0741 will print A on the screen, color of the character will be Black White (Page 81) Red Virtualians Social Network

3 Prepared by: Irfan Khan Blue Question No:5 ( Marks: 1 ) - Please choose one One screen location corresponds to a Byte Word (Page 80) Double byte Double word Question No:6 ( Marks: 1 ) - Please choose one is When an item is pushed on the decrementing stack, the top of the stack First decremented and then element copied on to the stack (Page 68) First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack Question No:7 ( Marks: 1 ) - Please choose one Each screen location corresponds to a word, the lower byte of this word contains

4 The character code (Page 81) The attribute byte The parameters The dimensions Question No:8 ( Marks: 1 ) - Please choose one if ax contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX,JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken Question No:9 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Virtualians Social Network Prepared by: Irfan Khan

5 Question No:10 ( Marks: 1 ) - Please choose one When two 16bit numbers are added the answer can be 17 bits long, this extra bit that won t fit in the target register is placed in the where it can be used and tested carry flag (Page 16) Parity Flag Auxiliary Carry Zero Flag Question No: 11 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string (Page 29) word indirect stack Question No:12 ( Marks: 1 ) - Please choose one in When a 16 bit number is divided by an 8 bit number, the quotient will be AL (Page 85) AX

6 AH DX Question No:13 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? (Page 81) Question No:14 ( Marks: 1 ) - Please choose one C is a example of Shl sar Shr (Page 52) Sal Question No:15 ( Marks: 1 ) - Please choose one allow changing specific processor behaviors and are used to play with it. Special Instructions (Page 14) Data Movement Instructions Program Control Instructions Arithmetic and Logic Instructions Virtualians Social Network

7 Prepared by: Irfan Khan Question No:16 ( Marks: 1 ) - Please choose one 8088 is a 16bit processor with its accumulator and all registers of. 32 bits 6 bits 16 bits (Page 14) 64 bits Question No:17 ( Marks: 1 ) - Please choose one decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack PUSH (Page 71) POP CALL RET

8 MIDTERM 2011 CS401 Assembly Language 1. In instruction ADC the operands can be o Two register only o Two register and one memory location o CF and two other operands (Page 57) o ZF and two other operands 2. After the execution of instruction RET o SP is incremented by 2 (Page 66) o SP is decremented by 2 o SP is incremented by 1 o SP is decremented by 1 3. The extended ASCII has o 64 characters

9 o 128 characters (Page 79) o 256 characters o 502 characters Virtualians Social Network Prepared by: Irfan Khan 4. The second byte in the word designated for screen location holds o The dimension of the screen o Character position on the screen o Character color on the screen (Page 81) o ACSII code of the character 5. REP will always o Incremented CX by 1

10 o Incremented CX by 2 o Decremented CX by 1 (Page 92) o Decremented CX by 2 6. The routine that executes in response to an INT instruction is called o ISR (Page 103) o IRS o ISP o IRT 7. The iapx888 architecture consists of register. o 12 o 14 o 16 (Page 15) Rep o In the instruction CMP AX,BX the contents of o AX are changed o BX are changed o CX are changed o Flag register are changed (Page 39) 9. All the addressing mechanisms iniapx88 return a number called address.

11 o Effective (Page 33) o faulty o indirect o direct 10. The execution of the instruction mov word [ES: DI], 0x0720 o will clear next character on screen (Page 82) o will print 20 at top left of the screen o will print 20 at top right of the screen o will move DI at location 0720 on the screen Virtualians Social Network Prepared by: Irfan Khan 11. mov byte [num1],5 is instruction. o legal (Page 30) o illegal o stack based

12 o memory indirect 12. MOV instruction transfers a byte or word from which of the following source location. o DS:DI o ES:SI o ES:DI o DS:SI (Page 92) 13. The execution of the instruction mov word [ES: 0], 0x0741 will print A on the screen, color of the character will be o Black o White (Page 81) rep o Red o Blue 14. If AX contains FFFFh, then after execution of instruction SAL ax, 3, the result will be o -3 o +3 o -8 o If the decimal number 35 is shifted by two bit to left, the new value will be o 35 o 70 o 140 ( = 35, =140) o While using STOBS, if DF=1 then

13 o The value of SI will be incremented by one o The value of SI will be incremented by two o The value of SI will be decremented by one click here for detail o The value of SI will be decremented by two 17. After the execution of STOSW, the CX will be o Decremented by 1 o Decremented by 2 (Page 92) o Incremented by 1 o Incremented by 2 Virtualians Social Network Prepared by: Irfan Khan 18. The memory address always move from o processor to memory o memory to processor o memory to peripheral o peripheral to processor

14 19. An offset alone is not complete without o Segment (Page 34) o code label o index register o data label 20. Code Segment is associated to register by default. o IP (Page 34) o SS o BP o CX MIDTERM SPRING 2011 CS401 Assembly Language Question No:1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction: MSB remain as it is MSB Will change MSB move to left

15 (Page 52) No change will occur. Question No:2 ( Marks: 1 ) - Please choose one ASCII stands for. The screen is two dimensional space having: 25 Rows and 25 Columns 25 Rows and 80 Columns 80 Rows and 80 Columns 80 Rows and 25 Columns (Page 80) Virtualians Social Network Prepared by: Irfan Khan Question No:3 ( Marks: 1 ) - Please choose one In the Rotate Right Operation every bit moves one position to right and the bit dropped from the right is inserted at the left and: Dropped in CF (Page 53) moves to AL

16 Don t go anywhere. Question No:4 ( Marks: 1 ) - Please choose one of the following flags will be affected by MOVSB? DF Click here for detail ZF PF No effect on flags. Question No:5 ( Marks: 1 ) - Please choose one The iapx88 processor supports modes of memory access (Page 35) 8 Midterm Spring 2010 CS401 Assembly Language

17 Question No:1 ( Marks: 1 ) - Please choose one Stack is a that behaves in a first in last out manner. Program data structure (Page 67) Heap None of the Given Question No:2 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SI combination SS:SP combination (Page 68) ES:BP combination ES:SP combination Virtualians Social Network Prepared by: Irfan Khan Question No:3 ( Marks: 1 ) - Please choose one

18 Foreground and background parameter will be 32bits 16bits 8bits 4bits Question No:4 ( Marks: 1 ) - Please choose one The clear screen operation initialize whole block of memory , 0720 (Page 91) Question No:5 ( Marks: 1 ) - Please choose one In STOSB instruction, when DF is Set, SI is Incremented by 1 Incremented by 2 Decremented by 1 Click here for detail Decremented by 2 Question No:6 ( Marks: 1 ) - Please choose one Assembly language is: Low-level programming language Click here for detail High-level programming language Also known as machine language Not considered closer to the computer

19 Question No:7 ( Marks: 1 ) - Please choose one A 32 Bit processor has accumulator of bit 16 bit 32 bit (Page 12) 64 bit Question No:8 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments (Page 72) (Not sure) No arguments Virtualians Social Network Prepared by: Irfan Khan Question No:9 ( Marks: 1 ) - Please choose one

20 RET is executed, it recovers the values from Register Stack (Page 71) Data segment Code segment Question No:10 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit (Page 80) Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No:11 ( Marks: 1 ) - Please choose one by the The prevalent convention in most high level languages is stack clearing Caller Callee (Page 74) RET Stack Question No:12 ( Marks: 1 ) - Please choose one After execution of JCXZ instruction CX will changed with flag affect. CF OF DF

21 None of Above (Page 43) Question No:13 ( Marks: 1 ) - Please choose one Execution of the instruction mov word *ES : 0+, 0x0741 will print A appear on the top left of screen (Page 81) A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen Question No:14 ( Marks: 1 ) - Please choose one if contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken Virtualians Social Network Prepared by: Irfan Khan Zero flag will set ZF will contain value -4

22 Jump will not be taken Question No:15 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No:16 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Question No:17 ( Marks: 1 ) - Please choose one Execution of the instruction mov word *ES : 0+, 0x1230 will print the character color will Green White Red

23 Black MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction The msb is replaced by a 0 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF (Page 52) Virtualians Social Network Prepared by: Irfan Khan Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP

24 (Page 69) SP SI Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR (Page 103) rep IRS ISP IRT Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 (Page 19) rep 0x1000 0x0000 Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute (Page 46)

25 Temporary indirect Question No: 6 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string (Page 29) rep word indirect stack Question No: 7 ( Marks: 1 ) - Please choose one After the execution of instruction RET 2 SP is incremented by 2 SP is decremented by 2 Virtualians Social Network Prepared by: Irfan Khan

26 SP is incremented by 4 (Page 66) SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has Two forms (Page 85) Three forms Four forms Five forms Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits (Page 85) 16 bits 32 bits 64 bits Question No: 10 ( Marks: 1 ) - Please choose one After the execution of MOVS instruction which of the following registers are updated SI only DI only

27 SI and DI only (Page 92) SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 (Page 68) SP is decremented by 3 SP is decremented by 4 Question No: 12 ( Marks: 1 ) - Please choose one When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called Divide logical error Virtualians Social Network Prepared by: Irfan Khan

28 Divide overflow error (Page 85) Divide syntax error An illegal instruction Question No: 13 ( Marks: 1 ) - Please choose one In the word designated for one screen location, the higher address contains The character code The attribute byte (Page 81) The parameters The dimensions Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX

29 Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes (Page 80) Four bytes Eight bytes Question No: 16 ( Marks: 1 ) - Please choose one The execution of the instruction mov word *ES : 0+, 0x0741 will print character A on screen, background color of the screen will be Black (Page 81) rep White Red Blue Virtualians Social Network Prepared by: Irfan Khan MIDTERM Fall 2011 CS401 Assembly Language

30 Question No:1 ( Marks: 1 ) - Please choose one One screen location corresponds to a Byte Word (Page 80) rep Double byte Double word Question No:2 ( Marks: 1 ) - Please choose one After the execution of PUSH AX statement AX register will reside on the stack A copy of AX will go on the stack (Page 69) The value of AX disappear after moving on stack Stack will send an acceptance message Question No:3 ( Marks: 1 ) - Please choose one physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination (Page 68) rep ES:BP combination ES:SP combination Question No:4 ( Marks: 1 ) - Please choose one If the address of memory location Num1 is 0117 and its content is 0005 then after execution of the instruction

31 mov bx, Num1 bx will contain (Page 30) Num Question No:5 ( Marks: 1 ) - Please choose one In STOS instruction, the implied source will always be in AL or AX registers (Page 92) DL or DX registers BL or BX registers CL or CX registers Virtualians Social Network Prepared by: Irfan Khan Question No:6 ( Marks: 1 ) - Please choose one The shift logical right operation inserts

32 A zero at right A zero at left (Page 52) A one at right A one at right Question No:7 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 (Page 92) rep Decrement CX by 2 Question No:8 ( Marks: 1 ) - Please choose one is When an item is pushed on the decrementing stack, the top of the stack First decremented and then element copied on to the stack (Page 68) rep First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack Question No:9 ( Marks: 1 ) - Please choose one assembly the CX register is used normally as a register. source counter (Page 32)

33 index pointer Which is the unidirectional bus? (I) ontrol Bus (II) ata Bus (III) Address Bus I only II only III only (Page 9) I and II only Question No:10 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) Scan Virtualians Social Network Prepared by: Irfan Khan

34 Sort Move data Question No:11 ( Marks: 1 ) - Please choose one register holds the address of next instruction is to be executed Base pointer Code segment Source index Program counter (Page 13) Question No:12 ( Marks: 1 ) - Please choose one JC and JNC test the flag. carry (Page 41) parity zero sign Question No:13 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected

35 (Page 93) Question No:14 ( Marks: 1 ) - Please choose one In string manipulation whenever an instruction needs a memory source, which of the following will hold the pointer to it? ES: DI ES: BP DS:BP DS:SI (Page 91) Question No:15 ( Marks: 1 ) - Please choose one which bit sets the character "blinking" on the screen? (Page 7) 8 Virtualians Social Network Prepared by: Irfan Khan

36 Question No:16 ( Marks: 1 ) - Please choose one If we want to divide a signed number by 2, this operation can better be accomplished by SHR SAR (Page 52) SHL SAL Question No:17 ( Marks: 1 ) - Please choose one After the execution of STOSB,the CX wil be.. Incremented by 1 Incremented by 2 Decremented by 1 (Page 92) Decremented by 2 Question No:18 ( Marks: 1 ) - Please choose one Each screen location corresponds to a word, the lower byte of this word contains The character code (Page 81) rep The attribute byte The parameters The dimensions Question No:19 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to

37 One byte Two bytes (Page 86) Four bytes Eight bytes MIDTERM EXAMINATION Spring 2010 Question No:1 ( Marks: 1 ) - Please choose one Execution of the instruction mov word *ES : 0+, 0x0741 will print A appear on the top left of screen (Page 81) rep A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen Virtualians Social Network Prepared by: Irfan Khan

38 Question No:2 ( Marks: 1 ) - Please choose one After the execution of PUSH AX statement AX register will reside on the stack (Page 69) rep A copy of AX will go on the stack The value of AX disappear after moving on stack Stack will send an acceptance message Question No:3 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Question No:4 ( Marks: 1 ) - Please choose one is When an item is pushed on the decrementing stack, the top of the stack First decremented and then element copied on to the stack (Page 68) rep First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack Question No:5 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF

39 OF DF No flags will be affected (Page 93) rep Question No:6 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes (Page 66) Four bytes Eight bytes Question No:7 ( Marks: 1 ) - Please choose one shifting the -15 two bit sar Virtualians Social Network Prepared by: Irfan Khan

40 Question No:8 ( Marks: 1 ) - Please choose one mov ax,5 has 1 operand 2 opeand (Page 25) 3 operand 4 opeand MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination (Page 68) rep ES:BP combination ES:SP combination

41 Question No: 2 ( Marks: 1 ) - Please choose one After the execution of instruction RET SP is incremented by 2 SP is incremented by 2 (Page 66) rep SP is decremented by 2 SP is incremented by 1 SP is decremented by 1 Question No: 3 ( Marks: 1 ) - Please choose one The second byte in the word designated for one screen location holds Character color on the screen The dimensions of the screen Character position on the screen Character color on the screen (Page 81) rep ASCII code of the character Virtualians Social Network Prepared by: Irfan Khan

42 Question No: 4 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 (Page 92) Decrement CX by 2 Question No: 5 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) rep Scan Sort Move data Question No: 6 ( Marks: 1 ) - Please choose one Index registers are used to store Data Intermediate result

43 Address (Page 16) Both data and addresses Question No: 7 ( Marks: 1 ) - Please choose one The bits of the work independently and individually index register base register flags register (Page 12) accumulator Question No: 8 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit (Page 80) rep Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Virtualians Social Network Prepared by: Irfan Khan

44 Question No: 9 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient is of 32 bits 16 bits (Page 85) 8 bits 4 bits Question No: 10 ( Marks: 1 ) - Please choose one in When a 16 bit number is divided by an 8 bit number, the quotient will be AX AL (Page 85) rep AH DX Question No: 11 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction

45 Division Multiplication Addition Subtraction (Page 92) Question No: 12 ( Marks: 1 ) - Please choose one If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken Question No: 13 ( Marks: 1 ) - Please choose one The execution of the instruction mov word *ES : 160+, 0x1230 will print a character 0 on the screen at Second column of first row First column of second row (Page 81) Second column of second row First column of third row Virtualians Social Network Prepared by: Irfan Khan

46 Question No: 14 ( Marks: 1 ) - Please choose one If the direction of the processing of a string is from higher addresses towards lower addresses then ZF is cleared DF is cleared ZF is set DF is set (Page 91) Question No: 15 ( Marks: 1 ) - Please choose one The instruction ADC has Operand(s) (Page 56) Question No: 16 ( Marks: 1 ) - Please choose one

47 Which bit of the attributes byte represents the red component of background color? (Page 81) MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please choose one Suppose AL contains 5 decimal then after two left shifts produces the value as Question No: 2 ( Marks: 1 ) - Please choose one

48 In STOS instruction, the implied source will always be in AL or AX registers (Page 92) rep Virtualians Social Network Prepared by: Irfan Khan

49 DL or DX registers BL or BX registers CL or CX registers Question No: 3 ( Marks: 1 ) - Please choose one After the execution of STOSW the CX will be Decremented by 1 Decremented by 2 (Page 92) rep Incremented by 1 Incremented by 2 Question No: 4 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) rep Scan Sort Move data Question No: 5 ( Marks: 1 ) - Please choose one Which is the unidirectional bus? (I) ontrol Bus (II) ata Bus (III) Address Bus I only

50 II only III only (Page 9) rep I and II only Question No: 6 ( Marks: 1 ) - Please choose one The operation of CMP is to Subtract Source from Destination (Page 39) Subtract Destination to from Source Add 1 to the Destination Add Source and Destination Question No: 7 ( Marks: 1 ) - Please choose one The registers IP, SP, BP, SI, DI, and BX all can contain a offset. 8-bit 16-bit (Page 21) 32-bit 64-bit Virtualians Social Network Prepared by: Irfan Khan

51 Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter (Page 92) index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective (Page 33) faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of foreground color

52 (Page 81) Question No: 11 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient will be stored in AX (Page 85) BX CX DX Question No: 12 ( Marks: 1 ) - Please choose one mov byte *num1+, 5 is instruction. legal (Page 30) rep illegal stack based memory indirect Question No: 13 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX Virtualians Social Network

53 Prepared by: Irfan Khan mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 14 ( Marks: 1 ) - Please choose one The execution of the instruction mov word *ES : 0+, 0x0741 will print character A on screen, color of the character will be Black White (Page 81) rep Red Blue Question No: 15 ( Marks: 1 ) - Please choose one

54 Which of the following flags will be affected by MOVSW? DF PF ZF No effect on flags Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of background color? 3 4 (Page 81) 5 6 MIDTERM EXAMINATION Spring 2009 Question No: 1 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments (Page 72) rep No arguments Virtualians Social Network Prepared by: Irfan Khan

55 Question No: 2 ( Marks: 1 ) - Please choose one In STOSB instruction SI is decremented or incremented by 4 1 (Page 92) SI and DI both are Index registers 2 3 Question No: 3 ( Marks: 1 ) - Please choose one CMPS instruction subtracts the source location to the destination location. Destination location always lies in DS:SI DS:DI ES:SI ES:DI (Page 93) Question No: 4 ( Marks: 1 ) - Please choose one Regarding assembler, which statement is true: Assembler converts mnemonics to the corresponding OPCODE (Page 13)

56 Assembler converts OPCODE to the corresponding mnemonics Assembler executes the assembly code all at once Assembler executes the assembly code step by step Question No: 5 ( Marks: 1 ) - Please choose one If BB is the OPCODE of the instruction which states to move a constant value to AX register, the hexadecimal representation (Using little Endian notation) of the instruction Mov AX,336 ( 150 in hexadecimal number system) will be: 0xBB0150 0x5001BB 0x01BB50 0xBB5001 (Page 19) Question No: 6 ( Marks: 1 ) - Please choose one In the instruction MOV AX, 5 the number of operands are 1 2 (Page 25) rep 3 4 Question No: 7 ( Marks: 1 ) - Please choose one The maximum parameters a subroutine can receive (with the help of registers) are 6 7 (Page 72)

57 8 Virtualians Social Network Prepared by: Irfan Khan 9 Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter (Page 92) rep index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective

58 (Page 33) rep faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one in When a 16 bit number is divided by an 8 bit number, the dividend will be AX (Page 85) BX CX DX Question No: 11 ( Marks: 1 ) - Please choose one in Left-Shift-Operation the left most bit will drop will go into CF (Page 52) Will come to the right most will be always 1 Question No: 12 ( Marks: 1 ) - Please choose one Suppose the decimal number "35" after shifting its binary two bits to left, the new value becomes 35

59 Virtualians Social Network Prepared by: Irfan Khan Question No: 13 ( Marks: 1 ) - Please choose one When divide overflow occurs processor will be interrupted this type of interrupt is called Hardware interrupt Click here for detail Software interrupt Processor exception Logical interrupts Question No: 14 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication Addition

60 Subtraction (Page 92) rep Question No: 15 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) rep Question No: 16 ( Marks: 1 ) - Please choose one is one of the reasons due to which string instructions are used in 8088 Efficiency and accuracy Reduction in code size and accuracy Reduction in code size and speed (Page 91) Reduction in code size and efficiency Virtualians Social Network Prepared by: Irfan Khan

61

62 after push instruction SP gets??? incremented by 2 decremented by 2 SP is associated by default with??? CS DS SS ES which math function used in cmp addition muktiply subtract division 1.If D is 35 is shift to left 2 bits the new value REP will always o Incremented CX by 1 o Incremented CX by 2 o Decremented CX by 1 (Page 92) o Decremented CX by 2 3. The instruction ADC has Operand(s)

63 0 1 2 (Page 56) 3 4.Which bit of the attributes byte represents the blue component of foreground color When a 32 bit number is divided by a 16 bit number, the quotient will be stored in AX (Page 85) BX CX DX he second byte in the word designated for screen location holds o The dimension of the screen o Character position on the screen o Character color on the screen o ACSII code of the character The extended ASCII code are

64 o 64 characters o 128 characters o 256 characters o 502 characters The execution of the instruction mov word [ES: 0], 0x0741 will print A on the screen, color of the character will be Black White Red Blue Code Segment is associated to register by default. o IP o SS o BP o CX The physical address of the stack is obtained by SS:SI combination SS:SP combination ES:BP combination ES:SP combination In 8088 architecture, whenever an element is pushed on the stack

65 SP is decremented by 1 SP is decremented by 2 SP is decremented by 3 SP is decremented by 4 After the execution of STOSB,the CX wil be.. Incremented by 1 Incremented by 2 Decremented by 1 Decremented by 2 Which bit of the attributes byte represents the red component of foreground color Destination location always lies in DS:SI DS:DI ES:SI ES:DI 1. Immediate operands of Push are called:- a. Source Operands b. Destination Operands c. Data Operands

66 d. Stack Operands 2. Extended ASCII has how many characters:- a. 64 b. 128 c. 256 d The video attribute byte of Red component of foreground color is:- a. 2 b. 3 c. 4 d Process of sending signals bak & forth is called:- a. Programming b. Activity c. Interruption d. Communication Bit Processor has an accumulator of :- a. 8 Bits b. 16 Bits c. 32 Bits d. 64 Bits 6. When a relative address is stored in 16 Bits then the jump is known as:- a. Near b. Short c. Far d. Close 7. In order to convert digit into ASCII value following is added:- a. 0x20 b. 0x30 c. 0x40 d. 0x100 Suppose AL contains 5 decimal then after two left shifts produces the value as Question No: 2 ( Marks: 1 ) - Please choose one In STOS instruction, the implied source will always be in AL or AX registers DL or DX registers BL or BX registers CL or CX registers

67 Question No: 3 ( Marks: 1 ) - Please choose one After the execution of STOSW the CX will be Decremented by 1 Decremented by 2 Incremented by 1 Incremented by 2 Question No: 4 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare Scan Sort Move data Question No: 5 ( Marks: 1 ) - Please choose one Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus I only II only III only I and II only Question No: 6 ( Marks: 1 ) - Please choose one The operation of CMP is to Subtract Source from Destination Subtract Destination to from Source Add 1 to the Destination Add Source and Destination Question No: 7 ( Marks: 1 ) - Please choose one

68 The registers IP, SP, BP, SI, DI, and BX all can contain a offset. 8 -bit 16 -bit 32 -bit 64 -bit Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of foreground color Question No: 11 ( Marks: 1 ) - Please choose one

69 When a 32 bit number is divided by a 16 bit number, the quotient will be stored in AX BX CX DX Question No: 12 ( Marks: 1 ) - Please choose one mov byte [num1], 5 is instruction. legal illegal stack based memory indirect Question No: 13 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 14 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, color of the character will be

70 Black White Red Blue Question No: 15 ( Marks: 1 ) - Please choose one Which of the following flags will be affected by MOVSW? DF PF ZF No effect on flags Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of background color? Suppose AL contains 5 decimal then after two left shifts produces the value as 5

71 In STOS instruction, the implied source will always be in AL or AX registers DL or DX registers BL or BX registers CL or CX registers After the execution of STOSW the CX will be Decremented by 1 Decremented by 2 Incremented by 1 Incremented by 2 The basic function of SCAS instruction is to Compare Scan Sort Move data Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus I only II only III only

72 I and II only The operation of CMP is to Subtract Source from Destination Subtract Destination to from Source Add 1 to the Destination Add Source and Destination Question No: 7 ( Marks: 1 ) - Please choose one The registers IP, SP, BP, SI, DI, and BX all can contain a offset. 8 -bit 16 -bit 32 -bit 64 -bit Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective faulty indirect

73 direct Question No: 10 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of foreground color Question No: 11 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient will be stored in AX BX CX DX Question No: 12 ( Marks: 1 ) - Please choose one mov byte [num1], 5 is instruction. legal illegal stack based memory indirect Question No: 13 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008

74 mov ES, AX mov AX, 0xb800 mov ES, AX mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 14 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, color of the character will be Black White Red Blue Question No: 15 ( Marks: 1 ) - Please choose one Which of the following flags will be affected by MOVSW? DF PF ZF No effect on flags Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of background color? 3 4

75 5 6 Question No: 1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction The msb is replaced by a 0 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP SP SI Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR IRS ISP IRT Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010

76 0x0100 0x1000 0x0000 Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute temporary indirect Question No: 6 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string word indirect stack Question No: 7 ( Marks: 1 ) - Please choose one After the execution of instruction RET 2 SP is incremented by 2 SP is decremented by 2 SP is incremented by 4 SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has

77 Two forms Three forms Four forms Five forms Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits 16 bits 32 bits 64 bits Question No: 10 (Marks: 1) - Please choose one After the execution of MOVS instruction which of the following registers are updated SI only DI only SI and DI only SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 SP is decremented by 3 SP is decremented by 4 Question No: 12 ( Marks: 1 ) - Please choose one

78 When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called Divide logical error Divide overflow error Divide syntax error An illegal instruction Question No: 13 ( Marks: 1 ) - Please choose one In the word designated for one screen location, the higher address contains The character code The attribute byte The parameters The dimensions Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to

79 One byte Two bytes Four bytes Eight bytes Question No: 16 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be Black White Red Blue Question No: 1 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SI combination SS:SP combination ES:BP combination ES:SP combination Question No: 2 ( Marks: 1 ) - Please choose one After the execution of instruction RET SP is incremented by 2 SP is decremented by 2 SP is incremented by 1

80 SP is decremented by 1 Question No: 3 ( Marks: 1 ) - Please choose one The second byte in the word designated for one screen location holds The dimensions of the screen Character position on the screen Character color on the screen ASCII code of the character Question No: 4 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 Decrement CX by 2 Question No: 5 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare Scan Sort Move data Question No: 6 ( Marks: 1 ) - Please choose one

81 Index registers are used to store Data Intermediate result Address Both data addresses and Question No: 7 ( Marks: 1 ) - Please choose one The bits of the work independently and individually index register base register flags register accumulator Question No: 8 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No: 9 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient is of 32 bits 16 bits 8 bits 4 bits Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the quotient will be in

82 AX AL AH DX Question No: 11 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication Addition Subtraction Question No: 12 ( Marks: 1 ) - Please choose one If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken Question No: 13 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 160], 0x1230 will print a character 0 on the screen at Second column of first row First column of second row Second column of second row

83 First column of third row Question No: 14 ( Marks: 1 ) - Please choose one If the direction of the processing of a string is from higher addresses towards lower addresses then ZF is cleared DF is cleared ZF is set DF is set Question No: 15 ( Marks: 1 ) - Please choose one The instruction ADC has Operand(s) Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? Stack is a that behaves in a first in last out manner. Program

84 data structure Heap None of the Given The physical address of the stack is obtained by SS:SI combination SS:SP combination ES:BP combination ES:SP combination CS401- Computer Architecture and Assembly Language Quiz No.4 FEB 14, 2013 A 32-bit address register can access up to of memory. 2 MB 2 GB 4 MB 4 GB Operating system Organize data in the form of Folder Batch file File None of the above The 'program segment prefix' for com files is of size: Select correct option: 64 bytes

85 128 bytes 256 bytes 512 bytes COM1 is connected with IRQ2 IRQ3 IRQ4 IRQ5 INT13 BIOS disk services generally uses which register to return the error flag? Select correct option: CF DL AH AL In case of COM file, first command line parameter is stored at offset of program segment prefix On executing INT 0 21 service 0x3D, if file is successfully opened then

86 CF will contain 1 CF will contain 0 ZF will contain 1 ZF will contain 0 Which register is generally used to specify the service number of an interrupt? AX BX CX The lower 16-bits of EAX register are labeled as: EAL AL AH AX Device drivers can be divided into major categories: None In programmable interrupt controller which of the following ports is referred as a interrupt mask register?

87 Select correct option: Which of the following BIOS INT provides serial port services INT 21 INT 14 INT 10 INT 08 In 9pin DB 9 connector, which pin is assigned to RD (Received Data)? In 9pin DB 9 connector, which pin is assigned to Signal Ground? Device drivers can be divided into major

88 categories: The INT 0x13 service 0x03 is use to Select correct option: Get drive parameter Reset disk sector Write disk sector Read disk sector Hard disk MBR( Master Boot Record ) is of size. Select correct option: 446 bytes 350 bytes 512 bytes 256 bytes COM2 is connected with Select correct option: IRQ 2 IRQ 3 IRQ 4 IRQ 5 On executing INT 0x21--service 0x3D, if file can't

89 be opened then Select correct option: CF will contain 1 CF will contain 0 ZF will contain 1 ZF will contain 0 "INT13 --BIOS disk services" generally uses which register to return the 'error code'? correct option: CF DL AH AL BPB stands for Basic parameter block Bios precise block Basic precise block Bios parameter block "INT13 --BIOS disk services" generally uses which register to return the 'error flag'? CF DL AH AL

90 The maximum length of DOS command line parameters is 64 bits 127 bits 256 bits 512 bits Which of the following BIOS INT provides serial port services Select correct option: INT 21 INT 14 INT 10 INT 08 In case of COM file, maximum length of parameters passed through command line can be Select correct option: 63 bytes 127 bytes 255 bytes 511 bytes In case of COM file, first command line parameter is stored at offset of 'program segment prefix'

91 Select correct option: 0x80 0x82 0x84 0x86 The 'program segment prefix' is used to store: Select correct option: DOS information Command tail DOS information and Command tail None of the given options The INT 0x13 service 0x03 is use to Select correct option: Read disk sector Write disk sector Reset disk sector Get drive parameter On executing INT 0x21--service 0x3D, if file can't be opened then Select correct option: CF will contain 1 CF will contain 0 ZF will contain 1 ZF will contain 0

92 Operating system Organize data in the form of Select correct option: Folder Batch file File None of the above We can access all the DOS services using Select correct option: INT 0x21 INT 0x13 INT 0x10 INT 0x08 In 9pin DB 9 connector, which pin is assigned to RD (Received Data)? Select correct option: Device drivers can be divided into major categories: Select correct option:

93 The higher 16-bits of EAX register are labeled as: Select correct option: AX EAH AH None of the given options Solved new Quizz cs Dec, 2012 SOLVED BY KAAAMI For Group study Contact kamran.kaaami.hero2008@gmail.com Dated MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 46 sec(s) Question # 1 of 10 ( Start time: 05:43:12 PM ) Total Marks: 1 Stack is a data structure that behaves manner. Select correct option: LIFO FIFO Both LIFO and FIFO None of the given Stack is a data structure that behaves in a first in last out manner. 4 MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 33 sec(s) Question # 2 of 10 ( Start time: 05:44:22 PM ) Total Marks: 1

94 We use to access the parameters that are stay on the stack with out popping them. Select correct option: POP DS PUSH not sure BP Did 2 The purpose of MOVS instruction is to move a memory location to register Select correct option: True False 2 MOVS is the instruction that allows memory to memory moves, as was discussed in the exceptions to the memory to memory movement rules. MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 88 sec(s) Question # 4 of 10 ( Start time: 05:46:22 PM ) Total Marks: 1 function decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack now pointed to by SP. Select correct option: POP PUSH RET ADD PUSH decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack now pointed to by SP 2 MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 90

95 sec(s) Question # 5 of 10 ( Start time: 05:47:18 PM ) Total Marks: 1 Extended ASCII has 256 characters with assigned numbers from Select correct option: 1 to to to to 256 Standard ASCII has 128 characters with numbers assigned from 0 to 127. When IBM PC was introduced, they extended the standard ASCII and defined 128 more characters. Thus extending the total number of symbols from 128 to 256 numbered from 0 to 255 fitting in an 8-bit byte. 3 MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 89 sec(s) Question # 6 of 10 ( Start time: 05:47:55 PM ) Total Marks: 1 The operations of placing items on the stack and removing them from there are called push and ret. Select correct option: True False The operations of placing items on the stack and removing them from there are called push and pop 2 MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 88 sec(s)

96 Question # 7 of 10 ( Start time: 05:49:21 PM ) Total Marks: 1 While dealing with a stack, can a stack pointer cross the origin of the stack. Select correct option: Yes not sure No 1 MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 88 sec(s) Question # 8 of 10 ( Start time: 05:50:47 PM ) Total Marks: 1 ASCII table is the contiguous arrangement of the uppercase alphabets (41-5A), the lowercase alphabets (61-7A), and the numbers Select correct option: The important thing to observe in the ASCII table is the contiguous arrangement of the uppercase alphabets (41-5A), the lowercase alphabets (61-7A), and the numbers (30-39) MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 38 sec(s) Question # 9 of 10 ( Start time: 05:51:24 PM ) Total Marks: 1 PUSH increments SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack now pointed to by SP. Select correct option: True

97 False PUSH decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack now pointed to by SP. 2 MC : Muhammad Kamran Quiz Start Time: 05:43 PM Time Left 90 sec(s) Question # 10 of 10 ( Start time: 05:52:28 PM ) Total Marks: 1 Which bit of the attributes byte represents the blue component of foreground color? Select correct option: Blue component of foreground color 1 CS401 Computer Architecture and Assembly Language Question # 1Instruction Pointer holds the address of the Previous instruction to be executed Current instruction

98 Next instruction to be executed None of the given Question # 2 Register whose each bit specify a different meaning is Accumulator Register Pointer Register Index register Flag register Question # 3 By default CS is associated with SS BP CX IP Question # 4 Memory to Memory operation is allowed True False Question # 5 Size Mismatch Error is a syntax error False True Question # 6 unconditional jump can be near short far all of the given

99 Question # 7 Register are storage cell Outside the processor Both inside and outside the processor Inside the processor None of the given Question # 8 Register to Register Operation is not allowed True False Q9. The operation of CMP is to subtract source from destination True False Q10.Size Mismatch Error is a syntax error False True Q11.Unconditional jump Execute in every condition whether true or false If the condition is true If the condition is false None of the given Q12.Which type of Rotation it is "Every bit moves one position to the right and the bit dropped from the right is inserted at the eft. This bit is also copied into the carry flag." ROL RCR RCL None of the given

100 Q13.Assembly language is not a low level language. True False Q14.In JA jump is not taken after a CMP if the unsigned destination is larger than the unsigned source. True False Q15.Group of bits processor uses to inform memory which element to read/write is collectively known as Control bus Data bus Address bus RAM Q16.Memory to Memory operation is allowed True False Q17.90 is the op-code of Do nothing Add Subtract Multiplication Q18.we cannot add two base register i.e. (bx+bp) or can t use in an instruction True False

101 Q19.Intel follow Littel endian Big endian Both littel endian and big endian None of the given Q20.SHL and SAL are same True False Q21.The first 16-bit processor produced by "Intel" was 8085 True False Q22.The first 16-bit processor produced by "Intel" was 8085 True False Q23.The extension of assembly language file is.doc.com.lst.asm Q24.When a large number is subtracted from a smaller number, a borrow is needed; in this case which flag will be set ZF CF SF OF

102 Q25.All the addressing mechanisms in iapx88 return a number called address. Effective address Physical address Direct address None of the given Q26.Which type of shifting is "Inserts a zero from the left and moves every bit one position to the right and copies the rightmost bit in the carry flag." SHL SAL SAR None of the given Q27.mov [1234], ax is an example of Direct addressing Base register indirect Base+index None of the given Q28.Registers are also called scratch pad ram True False Q29.The basic function of register is to? Hold the operand Hold the operator Hold both the operator and operand None of the given

103 Q30.The jump is taken if the last arithmetic operation changed the sign unexpectedly. JO JNO JNZ JZ Q31.In JA jump is not taken after a CMP if the unsigned destination is larger than the unsigned source. True False Q32.which type of rotation it is "The carry flag is inserted from the left, every bit moves one position to the right, and the right most bit is dropped in the carry flag. " RCR ROL RCL ROR Q33.which type of rotation it is "The carry flag is inserted from the left, every bit moves one position to the right, and the right most bit is dropped in the carry flag. " RCR ROL RCL ROR Q34.This jump is taken if the last arithmetic operation produced a number in its destination that has even parity, which jump is taken JP

104 JPE JNP Both JP and JPE Q35.In direct addressing the memory address given in the instruction is When a large number is subtracted from a smaller number, a borrow is needed; in this case which flag will be set ZF CF SF OF Q36.SHL and SAL are same True False Q37.we cannot Subtract index register from the base register ( bx-si )in assembly language vuzs True False Q38.Group of bits processor uses to inform memory which element to read/write is collectively known as Control bus Data bus Address bus RAM Q39.The execution of the instruction "mov word [ES: 160], 0x1230" will print a character on the screen at: First column of second row Second column of first row

105 Second column of second row First column of third row Q40.Which type of shif operation it is "The zero bit is inserted from the right and every bit moves one position to its left with the most significant bit dropping into the carry flag" shl sal sar both shl and sal Q41.In XOR operation the output is 1 if both inputs are same both inputs are different I and II none of the above Q42.Far jump is position relative. true false Q43.After the execution of STOSWB, the CX will be: Incremented by 1 Decremented by 1 Incremented by 2 Decremented by 2 Q44.In And the output only one if Both inputs are 0 One is 0 and other is 1 Both are 1 None of the given Q45.transfers the word at the current top of stack (pointed to by SP) to the destination operand and then increments SP by two to point to the new top of stack. push pop call none of given Q46.When the operand of DIV instruction is of 16-bits then implied dividend will be stored in AX register The concatenation of DX and AX The concatenation of ES and AX The concatenation of DS and BX

106 Q47.In near jump we jump anywhere within a segment. True false Q48.In string instructions, the mode is called auto-increment mode when: CX is set ZF is cleared DF is set DF is cleared Q49.How many characters standard ASCII has? Q50.Which of the following is the pair of register used to access memory in string instructions? DI and BP SI and BP DI and SI DS and SI Q51.RET do not pops the word at the top of the stack (pointed to by register SP) into the instruction pointer but increments SP by two. true false Q52.The operations of placing items on the stack and removing them from there are called push and ret. true false Q53.In a video memory, each screen location corresponds to: 8 byte 4 byte 2 byte 1 byte Q54.The Operation of Push is if "we push ax" then SP<-- SP+2 [SP]<-- AX true false Q55.The purpose of MOVS instruction is: Move register to register

107 Move register to a memory location Move a memory location to register Move memory to memory Q56.When the operand of DIV instruction is of 16 bits then implied dividend will be of 32 bit 64 bit 16 bit 8 bit Q57.Parameters clears from the stack by the caller callee caller and callee none of given Question No: 1 SP is associated with. By default SS page 26 DS CS ES Question No: 2 Which bit of the attributes byte represents the red component of foreground color page73 Question No: 3 An 8 x 16 font is stored in bytes page142 Question No: 4 In DOS input buffer, the number of characters actually read on return is stored in byte.

108 third fourth first second page 144 Question No: 5 Which of the following gives the more logical view of the storage medium BIOS DOS 153page Both None Question No: 6 In STOSW instructions, when DF is clear, SI is Incremented by 1 Incremented by 2 Decremented by 1 Decremented by 2 Question No: 7 Which of the following interrupts is Non makeable interrupt INT 2 PAGE 97 INT 3 INT 0 INT 1 Question No: 8 Which of the following IRQs is connected to serial port COM 2? IRQ 0 IRQ 1 IRQ 2 IRQ 3 PAGE 106 Question No: 9 The time interval between two timer ticks is? 40ms 45ms 50ms 55ms PAGE 114

109 Question No: 10The physical address of IDT( Interrupt Descriptor Table) is stored in GDTR IDTR PAGE 174 IVT Question No: 11 In NASM an imported symbol is declared with the... while and exported symbol is declared with the... Global directive, External directive External directive, Global directive PAGE 181 Home Directive, Foreign Directive Foreign Directive, Home Directive Question No: 12 In 68K processors there is a 32bit... that holds the address of currently executing instruction Program counter PAGE 184 Stack pointer Register Stack Question No: 13 Single step interrupt is Hardware interrupt Like divide by zero interrupt Like divide by 1 interrupt Software interrupt Question No: 14 Which of the following is NOT true about registers: Their operation is very much like memory Intermediate results may also be stored in registers They are also called scratch pad ram None of given options Question No: 15 Types of jump are: Short, near

110 short, near, far PAGE 37 Near, far short, far Question No: 16 MS DOS uses display mode. Character based page 72 Graphics based Numeric based Console based Question No: 17 Which of the following IRQs is derived by a timer device? IRQ 0 page 106 IRQ 1 IRQ 2 IRQ 3 Question No: 18 In programmable interrupt controller, which of the following ports is referred as a control port page Question No: 19 INT 21 service 01H is used to read character from standard input with echo. It returns the result in register. AL page 144 BL CL BH Question No: 20 In 9pin DB 9, which pin number is assigned to DSR (Dataset Ready)? page 146

111 7 Question No:21 In 9pin DB 9, which pin number is assigned to TD (Transmitted Data)? page Question No: 22 In 9pin DB 9, Signal ground is assigned on pin number 4 5 page Question No: is a bit processor page 6 32 bit processor 64 bit processor 128 bit processor Question No: 24The table index (TI) is set to to access the GDT (Global Descriptor Table). 1 0 page Question No: 25 VESA (Video Electronics Standards Association) organizes 16 color bits for every pixel in 5:5:5 formats 5:6:5 format page 172 6:5:6 formats 5:6:7 formats Question No: 26 Which flags are NOT used for mathematical operations?

112 Carry, Interrupt and Trap flag. Direction, Interrupt and Trap flag. Page 126 Direction, Overflow and Trap flag. Direction, Interrupt and Sign flag. Question No: 27 Suppose AL contains 5 decimal then after two left shifts produces the value as Question No: 28 In graphics mode a location in video memory corresponds to a on the screen. Line Dot page 142 Circle Rectangle Question No: 29 Creation of threads can be Static Dynamic page 133 Easy difficult Question No: 30 The thread registration code initializes the PCB and adds it to the linked list so that they will give it a turn. Assembler Scheduler page 133 Linker Debugger Question No:31 VESA VBE 2.0 is a standard for High resolution Mode page 172 Low resolution Mode Medium resolution Mode

113 Very High resolution Mode Question No: 32 Which of the following IRQs is derived by a key board? IRQ 0 IRQ 1 page106 IRQ 2 IRQ 3 Question No: 33 Which of the following IRQs is used for Floppy disk drive? IRQ 4 IRQ 5 IRQ 6 page 106 IRQ 7 Question No: 34 Which of the following pins of a parallel port connector are grounded? page Question No: 35The physical address of IDT( Interrupt Descriptor Table) is stored in GDTR IDTR 174page IVT IDTT Question No: 36In NASM an imported symbol is declared with the... while and exported symbol is declared with the... Global directive, External directive External directive, Global directive 181pages Home Directive, Foreign Directive Foreign Directive, Home Directive

114 Question No: 37 In 68K processors there is a... program counter (PC) that holds the address of currently executing instruction 16bit 32bit 183page 64bit Question No: 38 To reserve 8-bits in memory directive is used. db 17page dw dn dd For single byte we use db and for two bytes we use dw. Question No: 39In the mov ax, 5 5 is the operand. source destination Page 18 memory register Question No: 40RETF will pop the segment address in the CS register page 61 DS register SS register ES register Question No: 41For the execution of the instruction DIV BL, the implied dividend will be stored in AX BX CX DX Question No: 42When a number is divided by zero A Division by 0 interrupt is generated. Which instruction is used for this purpose INT 0 INT 1

115 INT 2 This interrupt is generated automatically Question No: 43 INT 21 service 01H is used to read character from standard input with echo. It returns the result in register. AL BL CL BH Question No: 44 BIOS sees the disks as Logical storage Raw storage page 148 In the form of sectors only In the form of tracks only Question No: 45 In 9pin DB 9, which pin number is assigned to CD (Carrier Detect)? Question No: 46In 9pin DB 9, Signal ground is assigned on pin number Question No: 47In 9pin DB 9, RI (Ring Indicator) is assigned on pin number Question No: 48Motorola 68K processors have... 23bit general purpose registers.

116 Question No: 49When two devices in the system want to use the same IRQ line then what will happen? An IRQ Collision An IRQ Conflict 106page An IRQ Crash An IRQ Blockage Question No: 50In the instruction MOV AX, 5 the number of operands are Question No: 51 Which flags are NOT used for mathematical operations? Carry, Interrupt and Trap flag. Direction, Interrupt and Trap flag. 125page Direction, Overflow and Trap flag. Direction, Interrupt and Sign flag. Question No: 52Suppose AL contains 5 decimal then after two left shifts produces the value as Question No: 53 VESA VBE 2.0 is a standard for High resolution Mode 172PAGE Low resolution Mode Medium resolution Mode

117 Very High resolution Mode Question No: 54 Which of the following IRQs is derived by a key board? IRQ 0 IRQ 1 106PAGE IRQ 2 IRQ 3 Question No: 55 In the mov ax, 5 5 is the operand. Source 16page Destination Memory Register Question No: 56 RETF will pop the segment address in the CS register DS register SS register ES register Question No: 57 For the execution of the instruction DIV BL, the implied dividend will be stored in AX BX CX DX Question No: 58 INT 21 service 01H is used to read character from standard input with echo. It returns the result in register. AL BL CL BH Question No: 59 In 9pin DB 9, which pin number is assigned to CD (Carrier Detect)? 1 104page

118 2 3 4 Question No: 60 In 9pin DB 9, Signal ground is assigned on pin number page 6 3 Question No: 61 In 9pin DB 9, RI (Ring Indicator) is assigned on pin number page Question No: 62 Motorola 68K processors have... 23bit general purpose registers page 32 Question No: 63In the instruction MOV AX, 5 the number of operands are Question No: 64 Which of the following is not true about registers: Their operation is very much like memory Intermediate results may also be stored in registers. They are alsocalled scratch pad ram None of given options.

119 Question No: 65 move [bp], al moves the one byte content of the AL register to the address contained in BP register in the current Stack segment27page Code segment Data segment Extra segment Question No: 66 In a rotate through carry right (RCR) instruction applied on a 16 bit word effectively there is 16 bits rotation 1 bit rotation 17 bits rotation 45page 8 bits rotation Question No: 67 The 8088 stack works on Word sized elements 60page Byte sized elements Double sized element Nibble sized element Question No: 68 An 8 x 16 font is stored in bytes page Question No: 69 INT 10 is used for services. RAM Disk BIOS video 141PAGE DOS video Question No: 70 Priority of IRQ 0 interrupt is

120 medium high highest 106PAGE low Question No: 71 Threads can have function calls, parameters and variables. global local 133PAGE legal illegal Question No: 72 How many prevalent calling conventions do exist PAGE 3 4 Two prevalent calling conventions are the C calling convention and the Pascal calling convention Question No: 73 In 9pin DB 9 DSR is assigned on pin number PAGE 7 Question No: 74 In 9pin DB 9 CTS is assigned on pin number PAGE 9 Question No: 75 In 9pin DB 9 CD is assigned on pin number 1 164PAGE 2

121 3 4 Question No: 76 In 9pin DB 9 RD is assigned on pin number PAGE 3 4 Question No: 77 in device attribute word which of the following bit decides whether it is a character device or a block device Bit 12 Bit 13 Bit 14 Bit PAGE Question No: 78 Video services are classified into broad categories 2 141PAGE Question No: 79 In STOSB instruction, when DF is clear, SI is Incremented by 1 Incremented by 2 Decremented by 1 Decremented by 2 Question No: 80The process of sending signals back and forth is called Activity Hand-shaking Interruption Time clicking

122 Question No: 81 Which of the following interrupts is used for Arithmetic overflow INT 1 INT 2 INT 3 INT 4 98page Question No:82 which of the following is a special type of interrupt that returns to the same instruction instead of the next instruction Divide overflow interrupt 99page Debug interrupt Arithmetic overflow interrupt Change of sign interrupt Question No: 83 Which of the following IRQs is derived by a timer device? IRQ 0 106page IRQ 1 IRQ 2 IRQ 3 Question No: 84 Which of the following IRQs is connected to serial port COM 2? IRQ 0 IRQ 1 IRQ 2 IRQ 3 106page Question No: 85 An End of Interrupt (EOI) signal is sent by Handler Processor IRQ PIC 106page Question No: 86 The source registers in OUT is AL or AX 107page BL or BX

123 CL or CX DL or DX Question No: 87 In programmable interrupt controller which of the following ports is used for selectively enabling or disabling interrupts page 22 Question No: 88 The number of pins in a parallel port connector are? page Question No: 89 Suppose a decimal number 35 when its binary is shifted to write two places the new number will become Question No: 90 A 32bit address register can access up to... of memory so Memory access has increased a lot. 2GB 4GB 168page 6GB 8GB Question No: 91 The physical address of the stack is obtained by SS:SI combination SS:SP combination

124 ES:BP combination ES:SP combination Question No: 92 Value of AH in the write Graphics pixel service is 0Ch 0Bh 1Ch 2Ch Question No: 93 Threads can have function calls, parameters and variables. Global Local Legal Illegal Question No: 94Creation of threads can be Static Dynamic Easy Difficult Question No: 95 How many prevalent calling conventions do exist Question No: 96 VESA VBE 2.0 is a standard for High resolution Mode Low resolution Mode Medium resolution Mode Very High resolution Mode Question No: 97 The serial port connection is a connector 9pin DB 9

125 8pin DB 9 3pin DB 9 9pin DB 5 Question No: 98 Which of the following gives the more logical view of the storage medium BIOS DOS Both None Question No: 99 In STOSB instructions, when DF is clear, SI is Incremented by 1 Incremented by 2 Decremented by 1 Decremented by 2 Question No: 100 After the execution of STOSW the CX will be Decremented by 1 Decremented by 2 Incremented by 1 Incremented by 2 Question No: 101 IRQ is referred to Eight input signals One output signal One input signals Eight output signals Question No: 102 Which of the following IRQs is derived by a key board? IRQ 0 IRQ 1 IRQ 2 IRQ 3

126 Question No: 103 Which of the following IRQs is connected to serial port COM 1? IRQ 4 IRQ 5 IRQ 6 IRQ 7 Question No: 104 The physical address of IDT (Interrupt Descriptor Table) is stored in GDTR IDTR IVT IDTT Question No: 105Assembly language is: Low-level programming language High-level programming language Also known as machine language Not considered closer to the computer Question No: 106 The number of bits required to access 1MB of memory are 16 bits 32 bits Depends on the processor architecture 20 bits Question No: 107 In STOSB instructions, SI is decremented or incremented by Question No: 108 In programmable interrupt controller, which of the following ports is referred as a control port. 19

127 Question No: 109 INT 21 service 01H is used to read character from standard input with echo. It returns the result in register. AL BL CL BH Question No: 110 In device attribute word, which of the following bit decides whether it is a character device or a block device Bit 12 Bit 13 Bit 14 Bit 15 Question No: 111 In 9pin DB 9, which pin number is assigned to CTS (Clear To Send)? Question No: 112 In 9pin DB 9, which pin number is assigned to RD (Received Data)? Question No: 113 VESA (Video Electronics Standards Association) organizes 16 color bits for every pixel in 5:5:5 formats 5:6:5 formats

128 6:5:6 formats 5:6:7 formats Question No: 114 Motorola 68K processors have... 23bit general purpose registers Question No: 115 Programmable Interrupt Controller (PIC) has One input signals and eight output signals One input signal and one output signal Eight input signals and one output signals Eight input signals and eight output signals Question No: 116 Video services are classified into... broad categories CS401 Current quizz Question # 1 of 10 ( Start time: 09:24:03 AM ) Total Marks: 1 Constant is never use as a Source

129 Destination Both are source None of the given Question # 2 of 10 ( Start time: 09:25:15 AM ) Total Marks: 1 The operation of CMP is to Subtract source from destination True Flase Data bus is uni - deirectional bi-directional non-directional none of given Quiz Start Time: 09:24 AM Time Left 87 sec(s) Question # 4 of 10 ( Start time: 09:27:17 AM ) Total Marks: 1 unconditional jump can be near short far

130 all of the given Quiz Start Time: 09:24 AM Time Left 88 sec(s) Question # 5 of 10 ( Start time: 09:28:34 AM ) Total Marks: 1 BP by default associated with CS IP SS SP Question # 6 of 10 ( Start time: 09:29:51 AM ) Total Marks: 1 Which type of shifting is "Inserts a zero from the left and moves every bit one position to the right and copies the rightmost bit in the carry flag." SHL SAL SAR None of the given Question 7 out 10 we can not Subtracter index register from the base register( bx-si )in assembly language True

131 Flase Question # 9 of 10 ( Start time: 09:32:58 AM ) Total Marks: 1 Address is alway go from Procesor to Memeory Memeory to Processor Memory to Memotu None of the given Question # 10 of 10 ( Start time: 09:33:59 AM ) Total Marks: 1 In direct addressing the memory address given in the instruction is Fixed Variable Registerd Empty CS401 Current quizz Question # 1 of 10 ( Start time: 09:24:03 AM ) Total Marks: 1 Constant is never use as a Source

132 Destination Both are source None of the given Question # 2 of 10 ( Start time: 09:25:15 AM ) Total Marks: 1 The operation of CMP is to Subtract source from destination True Flase Data bus is uni - deirectional bi-directional non-directional none of given Quiz Start Time: 09:24 AM Time Left 87 sec(s) Question # 4 of 10 ( Start time: 09:27:17 AM ) Total Marks: 1 unconditional jump can be near short far

133 all of the given Quiz Start Time: 09:24 AM Time Left 88 sec(s) Question # 5 of 10 ( Start time: 09:28:34 AM ) Total Marks: 1 BP by default associated with CS IP SS SP Question # 6 of 10 ( Start time: 09:29:51 AM ) Total Marks: 1 Which type of shifting is "Inserts a zero from the left and moves every bit one position to the right and copies the rightmost bit in the carry flag." SHL SAL SAR None of the given Question 7 out 10 we can not Subtracter index register from the base register( bx-si )in assembly language True

134 Flase Question # 9 of 10 ( Start time: 09:32:58 AM ) Total Marks: 1 Address is alway go from Procesor to Memeory Memeory to Processor Memory to Memotu None of the given Question # 10 of 10 ( Start time: 09:33:59 AM ) Total Marks: 1 In direct addressing the memory address given in the instruction is Fixed Variable Registerd Empty Explain AND, OR and XOR operations with truth tables. [ 5 marks ] Explain the complete operation of interrupt when it is generated. [ 5 marks ] Tell the formula to scroll up the screen. [ 3 marks ] Why we need to clear the stack? [ 3 marks ] Define implied operand. [ 2 marks ] Why is it necessary to provide the segment and offset address in case of FAR jump? [ 2 marks ]

135 From where lds si, *bp + 4+ will load SI and DS? * 2 marks + Which two registers are changed during CALL statement execution: 1. IP only 2. IP and SP only 3. SP only 4. BP and IP only Question No: 1 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SI combination SS:SP combination ES:BP combination ES:SP combination Question No: 2 ( Marks: 1 ) - Please choose one After the execution of instruction RET SP is incremented by 2 SP is decremented by 2 SP is incremented by 1 SP is decremented by 1 Question No: 3 ( Marks: 1 ) - Please choose one The second byte in the word designated for one screen location holds Character color on the screen The dimensions of the screen Character position on the screen Character color on the screen ASCII code of the character Question No: 4 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 Decrement CX by 2 Question No: 5 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare Scan Sort Move data Question No: 6 ( Marks: 1 ) - Please choose one Index registers are used to store Data Intermediate result Address Both data and addresses Question No: 7 ( Marks: 1 ) - Please choose one The bits of the work independently and individually index register

136 base register flags register accumulator Question No: 8 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No: 9 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient is of Ans 4 bits 32 bits 16 bits 8 bits 4 bits Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the quotient will be in Ans: AL AX AL AH DX Question No: 11 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Ans: Division Division Multiplication Addition Subtraction Question No: 12 ( Marks: 1 ) - Please choose one If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Ans: Zero flag will set Jump will be taken Zero flag will set

137 ZF will contain value -4 Jump will not be taken Question No: 13 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 160], 0x1230 will print a character 0 on the screen at Ans: First column of second row Second column of first row First column of second row Second column of second row First column of third row Question No: 14 ( Marks: 1 ) - Please choose one If the direction of the processing of a string is from higher addresses towards lower addresses then Ans: DF is cleared ZF is cleared DF is cleared ZF is set DF is set Question No: 15 ( Marks: 1 ) - Please choose one The instruction ADC has Operand(s) Ans: Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? Ans: Question No: 17 ( Marks: 2 ) What is difference between SHR and SAR instructions?

138 SHR The SHR inserts a zero from the left and moves every bit one position to the right and copy the rightmost bit in the carry flag. SAR The SAR shift every bit one place to the right with a copy of the most significant bit left at the most significant place. The bit dropped from the right is caught in the carry basket. The sign bit is retained in this operation. Question No: 18 ( Marks: 2 ) For what purpose "INT 1" is reserved? Question No: 19 ( Marks: 2 ) Define implied operand? It is always in a particular register say the accumulator. It needs to not be mentioned in the instruction. Question No: 20 ( Marks: 3 ) Describe the working of the CALL instruction with the reference of Stack. Question No: 21 ( Marks: 3 ) Tell the Formula to scroll up the screen rep movsw scroll up scrollup: push bp mov bp,sp push ax push cx push si push di push es push ds mov ax, 80 ; load chars per row in ax mul byte [bp+4] ; calculate source position mov si, ax ; load source position in si push si ; save position for later use shl si, 1 ; convert to byte offset mov cx, 2000 ; number of screen locations sub cx, ax ; count of words to move mov ax, 0xb800 mov es, ax ; point es to video base mov ds, ax ; point ds to video base xor di, di ; point di to top left column cld ; set auto increment mode rep movsw ; scroll up mov ax, 0x0720 ; space in normal attribute pop cx ; count of positions to clear

139 rep stosw ; clear the scrolled space pop ds pop es pop di pop si pop cx pop ax pop bp ret 2 Question No: 22 ( Marks: 5 ) What is the difference between LES and LDS instructions? The string instructions need source and destination in the form of a segment offset pair. LES and LDS load a segment register and a general purpose register from two consecutive memory locations. LES loads ES while LDS loads DS. Both instructions has two parameters, one is the general purpose register to be loaded and the other is the memory location from which to load these registers. The major application of these instructions is when a subroutine receives a segment offset pair as an argument and the pair is to be loaded in a segment and an offset register. Question No: 23 ( Marks: 5 ) Explain the process of ADC? Normal addition has two operands and the second operand is added to the first operand. However ADC has three operands. The third implied operand is the carry flag. The ADC instruction is specifically placed for extending the capability of ADD. Further more consider an instruction ADC AX, BX. Normal addition would have just added BX to AX, however ADC first adds the carry flag to AX and then adds BX to AX. Therefore the last carry is also included in the result. Add comment uestion No: 1 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument

140 3 arguments No arguments Question No: 2 ( Marks: 1 ) - Please choose one In STOSB instruction SI is decremented or incremented by Question No: 3 ( Marks: 1 ) - Please choose one CMPS instruction subtracts the source location to the destination location. Destination location always lies in DS:SI DS:DI ES:SI ES:DI Computer Architecture is the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance

141 and cost goals. Computer architecture is not about using computers to design buildings. OR The set of layers and protocols (including formats and standards that different hardware/software must comply with to achieve stated objectives) which define a computer system. Computer architecture features can be available to application programs and system programmers in several modes, including a protected mode. For example, the system-level features of computer architecture may include: (1) memory management, (2) protection, (3) multitasking, (4) input/output, (5) exceptions and multiprocessing, (6) initialization, (7) co processing and multiprocessing, (8) debugging, and (9) cache management What is offset? Answer: A distance from a given paragraph boundary in memory. The offset usually is given as a number of byte Question No: 4 ( Marks: 1 ) - Please choose one Regarding assembler, which statement is true: Assembler converts mnemonics to the corresponding OPCODE Assembler converts OPCODE to the corresponding mnemonics. Assembler executes the assembly code all at once Assembler executes the assembly code step by step Question No: 5 ( Marks: 1 ) - Please choose one Iof BB is the OPCODE of the instruction which states to move a constant value to AX register, the hexadecimal representation (Using little Endian notation) of the instruction Mov AX,336 ( 150 in hexadecimal number system) will be: 0xBB0150 0x5001BB 0x01BB50

142 0xBB5001 Question No: 6 ( Marks: 1 ) - Please choose one In the instruction MOV AX, 5 the number of operands are Question No: 7 ( Marks: 1 ) - Please choose one The maximum parameters a subroutine can receive (with the help of registers) are Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter index pointer

143 Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx 8 8 return a number called _ address. effective faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the dividend will be in AX BX CX DX Question No: 11 ( Marks: 1 ) - Please choose one in Left-Shift-Operation the left most bit will drop will go into CF Will come to the right most will be always 1 Question No: 12 ( Marks: 1 ) - Please choose one

144 Suppose the decimal number "35" after shifting its binary two bits to left, the new value becomes Question No: 13 ( Marks: 1 ) - Please choose one When divide overflow occurs processor will be interrupted this type of interrupt is called Hardware interrupt Software interrupt Processor exception Logical interrupts Question No: 14 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication

145 Addition Subtraction Question No: 15 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected Question No: 16 ( Marks: 1 ) - Please choose one is one of the reasons due to which string instructions are used in 8088 Efficiency and accuracy Reduction in code size and accuracy Reduction in code size and speed Reduction in code size and efficiency Question No: 17 ( Marks: 1 ) Write any two control instructions.

146 JMP Stop Reset Question No: 18 ( Marks: 1 ) RET instruction take how many arguments Question No: 19 ( Marks: 2 ) Explain the fuction of rotate right (ROR) instruction Question No: 20 ( Marks: 2 ) Describe the PUSH function The push operation copies its operand on the stack, while the pop operation makes a copy from the top of the stack into Question No: 21 ( Marks: 3 ) Write down the names of four segment registers? (CS, DS, SS, and ES) Question No: 22 ( Marks: 3 ) For what purpose "INT 4" is reserved? INT 4, Arithmetic Overflow, change of sign bit

147 Question No: 23 ( Marks: 5 ) Given that [BX+0x0100] BX=0x0100 Ds=0xFFF0 Calculate the physical address Question No: 1 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination ES:BP combination ES:SP combination

148 Question No: 2 ( Marks: 1 ) - Please choose one After the execution of instruction RET SP is incremented by 2 SP is incremented by 2 SP is decremented by 2 SP is incremented by 1 SP is decremented by 1 Question No: 3 ( Marks: 1 ) - Please choose one The second byte in the word designated for one screen location holds Character color on the screen The dimensions of the screen Character position on the screen Character color on the screen ASCII code of the character Question No: 4 ( Marks: 1 ) - Please choose one REP will always Decrement CX by 1

149 Increment CX by 1 Increment CX by 2 Decrement CX by 1 Decrement CX by 2 Question No: 5 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare Compare Scan Sort Move data Question No: 6 ( Marks: 1 ) - Please choose one Index registers are used to store Address Data Intermediate result Address Both data and addresses

150 Question No: 7 ( Marks: 1 ) - Please choose one The bits of the work independently and individually flags register index register base register flags register accumulator Question No: 8 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit Add 0x30 in the digit Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No: 9 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient is of 4 bits 32 bits 16 bits 8 bits 4 bits

151 Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the quotient will be in AL AX AL AH DX Question No: 11 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Division Multiplication Addition Subtraction Question No: 12 ( Marks: 1 ) - Please choose one If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Zero flag will set Jump will be taken Zero flag will set

152 ZF will contain value -4 Jump will not be taken Question No: 13 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 160], 0x1230 will print a character 0 on the screen at First column of second row Second column of first row First column of second row Second column of second row First column of third row Question No: 14 ( Marks: 1 ) - Please choose one If the direction of the processing of a string is from higher addresses towards lower addresses then DF is cleared ZF is cleared DF is cleared ZF is set DF is set Question No: 15 ( Marks: 1 ) - Please choose one

153 The instruction ADC has Operand(s) Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? Question No: 17 ( Marks: 2 ) What is difference between SHR and SAR instructions? SHR The SHR inserts a zero from the left and moves every bit one position to the right and copy the rightmost bit in the carry flag. SAR The SAR shift every bit one place to the right with a copy of the most significant bit left at the most significant place Question No: 18 ( Marks: 2 ) For what purpose "INT 1" is reserved? Question No: 19 ( Marks: 2 ) Define implied operand?

154 It is always in a particular register say the accumulator. It needs to not be mentioned in the instruction * 16 font is stored in bytes. 3. In DOS input buffer, number of characters actually read on return is stored in First byte Second byte Third byte Fourth byte 4. IRQ 0 has priority Low High Highest Medium 5. Thread registration code initialize PCB and add to linked list so that will give it turn. Assembler

155 Linker Scheduler Debugger 6. Traditional calling conventions are in number VESA VEB 2.0 is standard for High Resolution Mode Low Resolution Mode Very High Resolution Mode Medium Resolution Mode 8. To clear direction flag which instruction is used Cld Clrd Cl df Clr df 9. In STOSW instruction, When DI is cleared, SI is Incremented by 1 Incremented by 2 Decremented by 1

156 Decremented by Interrupt that is used in debugging with help of trap flag is INT 0 INT 1 INT 2 INT INT for arithmetic overflow is INT 1 INT 2 INT 3 INT IRQ referred as Eight Input signals One Input signal Eight Output signals One output signal 13. IRQ for keyboard is IRQ for sound card is IRQ for floppy disk is 6

157 16. IRQ with highest priority is Keyboard IRQ Timer IRQ Sound Card Floppy Disk 17. Pin for parallel port ground is The physical address of Interrupt Descriptor Table (IDT) is stored in GDTR IDTR IVT IDTT 19. Execution of RET 2 results in? 20. CX register is Count register Data register Index register Base register 21. OUT instruction uses AX as source register.

158 22. IN DB-9 connector the Data Set ready pin is at If two devices uses same IRQ then there is IRQ collision IRQ conflict IRQ drop 24. VESA organizes 16 bit color for every pixel in ratio 5:5:5 5:6:5 6:5:6 5:6:7 25. Division by zero is done by which interrupt. Interrupt 0. Question No: 1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction The msb is replaced by a 0

159 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP SP SI Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR IRS ISP IRT Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010

160 0x0100 0x1000 0x0000 Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute temporary indirect Question No: 6 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string word indirect stack Question No: 7 ( Marks: 1 ) - Please choose one After the execution of instruction RET 2 SP is incremented by 2 SP is decremented by 2 SP is incremented by 4

161 SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has Two forms Three forms Four forms Five forms Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits 16 bits 32 bits 64 bits Question No: 10 ( Marks: 1 ) - Please choose one After the execution of MOVS instruction which of the following registers are updated SI only

162 DI only SI and DI only SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 SP is decremented by 3 SP is decremented by 4 Question No: 12 ( Marks: 1 ) - Please choose one When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called Divide logical error Divide overflow error Divide syntax error An illegal instruction Question No: 13 ( Marks: 1 ) - Please choose one In the word designated for one screen location, the higher address contains

163 The character code The attribute byte The parameters The dimensions Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes Four bytes Eight bytes Question No: 16 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be Black

164 White Red Blue. Serial Port is also accessible via I/O ports, COM 1 is accessible via ports 3F8-3FF while COM 2 is accessible via 2F8-2FF. The first register at 3F8 is the Transmitter holding register if written to and the receiver buffer register if read from. Other register of our interest include 3F9 whose Bit 0 must be set to enable received data available interrupt and Bit 1 must be set to enable transmitter holding register empty interrupt. (Transmitter, COM 1, I/O ports, COM2. bit 0, Buffer, 3FA) ==================================================== Question # 1 There are three busses to communicate the processor and memory named as 1) : address bus.,data bus and data bus. 2) : addressing bus.,data bus and data bus. 3) : address bus.,datamove bus and data bus. 4) : address bus.,data bus and control bus.. Correct Option : 4 From : Lecture 1 Question # 2 The address bus is unidirectional and address always travels from processor to memory.

165 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 1 Question # 3 Data bus is bidirectional because 1) : To way 2) : Data moves from both, processor to memory and memory to processor, 3) : Data moves from both, processor to memory and memory to data Bus, 4) : None of the Given Correct Option : 3 From : Lecture 1 Question # 4 Control bus 1) : is Not Important. 2) : is Important. 3) : bidirectional. 4) : unidirectional. Correct Option : 3 From : Lecture 1 Question # 5 A memory cell is an n-bit location to store data, normally also called a byte 1) : 4-bit 2) : 8-bit 3) : 6-bit 4) : 80-bit Correct Option : 2 From : Lecture 1 Question # 6 The number of bits in a cell is called the cell width. define the memory completely. 1) : Cell width and number of cells, 2) : cell number and width of the cells, 3) : width 4) : Height Correct Option : 1 From : Lecture 1 Question # 7 for memory we define two dimensions. The first dimension defines how many bits are there in a single memory cell. 1) : parallel 2) : Vertical 3) : long 4) : short

166 Correct Option : 1 From : Lecture 1 Question # 8 operation requires the same size of data bus and memory cell width. 1) : Normal 2) : Best and simplest 3) : first 4) : None of the Given Correct Option : 2 From : Lecture 1 Question # 9 Control bus is only the mechanism. The responsibility of sending the appropriate signals on the control bus to the memory is of the. 1) : Data Bus 2) : processor 3) : Address Bus 4) : None of the Given Correct Option : 2 From : Lecture 1 Question # 10 In total: dw 0 Opcode total is a 1) : Literal 2) : Variable 3) : Label 4) : Starting point Correct Option : 3 From : Lecture 10 Question # C is a example of 1) : Shl 2) : sar 3) : Shr 4) : Sal Correct Option : 3 From : Lecture 10 Question # 12 C is a example of 1) : Shl 2) : sar 3) : Shr 4) : Sal Correct Option : 1 From : Lecture 10 Question # 13 ADC has operands. 1) : two 2) : three

167 3) : Five 4) : Zero Correct Option : 2 From : Lecture 10 Question # 14 The basic purpose of a computer is to perform operations, and operations need. 1) : order 2) : nothing 3) : operands 4) : bit Correct Option : 3 From : Lecture 2 Question # 15 Registers are like a scratch pad ram inside the processor and their operation is very much like normal. 1) : Number 2) : opreations 3) : memory cells 4) : None of the Given Correct Option : 3 From : Lecture 2 Question # 16 There is a central register in every processor called the and The word size of a processor is defined by the width of its. 1) : accumulator,accumulator 2) : data bus,accumulator 3) : accumulator, Address Bus 4) : accumulator,memory Correct Option : 1 From : Lecture 2 Question # 17 does not hold data but holds the address of data 1) : Pointer, Segment, or Base Register 2) : Pointer, Index, or Base Register 3) : General Registers 4) : Instruction Pointer Correct Option : 2 From : Lecture 2 Question # 18 The program counter holds the address of the next instruction to be 1) : executed. 2) : called 3) : deleted 4) : copy Correct Option : 1 From : Lecture 2 Question # 19

168 There are types of instruction groups 1) : 4 2) : 5 3) : 3 4) : 2 Correct Option : 1 From : Lecture 2 Question # 20 These instructions are used to move data from one place to another. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 2 Question # 21 mov instruction is related to the *****. 1) : Arithmetic and Logic Instructions 2) : Data Movement Instructions 3) : Program Control Instructions 4) : Special Instructions Correct Option : 2 From : Lecture 2 Question # 22 allow changing specific processor behaviors and are used to play with it. 1) : Special Instructions 2) : Data Movement Instructions 3) : Program Control Instructions 4) : Arithmetic and Logic Instructions Correct Option : 1 From : Lecture 2 Question # is a 16bit processor with its accumulator and all registers of. 1) : 32 bits 2) : 6 bits 3) : 16 bits 4) : 64 bits Correct Option : 3 From : Lecture 2 Question # 24 The of a processor means the organization and functionalities of the registers it contains and the instructions that are valid on the processor. 1) : Manufactures 2) : architecture 3) : Deal 4) : None of the Given

169 Correct Option : 2 From : Lecture 2 Question # 25 Intel IAPX88 Architecture is 1) : More then 25 old 2) : New 3) : Not Good 4) : None of the Given Correct Option : 1 From : Lecture 2 Question # 26 The iapx88 architecture consists of registers. 1) : 13 2) : 12 3) : 9 4) : 14 Correct Option : 4 From : Lecture 3 Question # 27 General Registers are 1) : AX, BX, CX, and DX 2) : XA, BX, CX, and DX 3) : SS,SI and DI 4) : 3 Correct Option : 1 From : Lecture 3 Question # 28 AX means we are referring to the extended 16bit A register. Its upper and lower byte are separately accessible as. 1) : AH and AL 2) : A Lower and A Upper 3) : AL, AU 4) : AX Correct Option : 1 From : Lecture 3 Question # 29 AX is General purpose Register where A stands for. 1) : Acadmic 2) : Ado 3) : Architecture 4) : Accumulator Correct Option : 4 From : Lecture 3 Question # 30 The B of BX stands for because of its role in memory addressing. 1) : Busy 2) : Base 3) : Better

170 4) : None of the Given Correct Option : 2 From : Lecture 3 Question # 31 The D of DX stands for Destination as it acts as the destination in. 1) : I/O operations 2) : operations 3) : memory cells 4) : Memory I/O operations Correct Option : 1 From : Lecture 3 Question # 32 The C of CX stands for Counter as there are certain instructions that work with an automatic count in the. 1) : DI register 2) : BX register 3) : CX register 4) : DX register Correct Option : 3 From : Lecture 3 Question # 33 are the index registers of the Intel architecture which hold address of data and used in memory access. 1) : SI and SS 2) : PI and DI 3) : SI and IP 4) : SI and DI Correct Option : 4 From : Lecture 3 Question # 34 In Intel IAPX88 architecture is the special register containing the address of the next instruction to be executed. 1) : AX 2) : PI 3) : IP 4) : SI Correct Option : 3 From : Lecture 3 Question # 35 SP is a memory pointer and is used indirectly by a set of. 1) : instructions 2) : Pointers 3) : Indexes 4) : Variables Correct Option : 1 From : Lecture 3 Question # 36

171 is also a memory pointer containing the address in a special area of memory called the stack. 1) : SP 2) : BP 3) : PB 4) : AC Correct Option : 2 From : Lecture 3 Question # 37 is bit wise significant and accordingly each bit is named separately. 1) : AX 2) : FS 3) : IP 4) : Flags Register Correct Option : 4 From : Lecture 3 Question # 38 When two 16bit numbers are added the answer can be 17 bits long, this extra bit that won t fit in the target register is placed in the where it can be used and tested 1) : carry flag 2) : Parity Flag 3) : Auxiliary Carry 4) : Zero Flag Correct Option : 1 From : Lecture 3 Question # 39 Program is an ordered set of instructions for the processor. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 3 Question # 40 For Intel Architecture operation destination, source is way of writing things. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 3 Question # 41 Operation code add ax, bx. 1) : Add the bx to ax and change the bx 2) : Add the ax to bx and change the ax 3) : Add the bx to ax and change the ax

172 4) : Add the bx to ax and change nothing Correct Option : 3 From : Lecture 3 Question # 42 The maximum memory iapx88 can access is. 1) : 1MB 2) : 2MB 3) : 3MB 4) : 128MB Correct Option : 1 From : Lecture 4 Question # 43 The maximum memory iapx88 can access is 1MB which can be accessed with. 1) : 18 bits 2) : 20 bits 3) : 16 bits 4) : 2 bits Correct Option : 2 From : Lecture 4 Question # 44 address of 1DED0 where the opcode B80500 is placed. 1) : physical memory 2) : memory 3) : efective 4) : None of the Given Correct Option : 1 From : Lecture 4 Question # bit of Segment and Offset Addresses can be converted to 20bit Address i.e Segment Address with lower four bits zero + Offset Address with four bits zero = 20bit Physical Address 1) : Middle 2) : lower 3) : Top 4) : upper Correct Option : 4 From : Lecture 4 Question # 46 When adding two 20bit Addresses a carry if generated is dropped without being stored anywhere and the phenomenon is called address. 1) : wraparound 2) : mode 3) : ping 4) : error Correct Option : 1 From : Lecture 4

173 Question # 47 segments can only be defined a 16byte boundaries called boundaries. 1) : segment 2) : paragraph 3) : Cell 4) : RAM Correct Option : 1 From : Lecture 4 Question # 48 in a Program CS, DS, SS, and ES all had the same value in them. This is called. 1) : equel memory 2) : overlapping segments 3) : segments hidding 4) : overlapping SI Correct Option : 2 From : Lecture 4 Question # 49 db num1 size of the memory is 1) : 1byte 2) : 4bit 3) : 16bit 4) : 2byte Correct Option : 1 From : Lecture 5 Question # [org 0x0100] mov ax, [num1] ; load first number in ax mov bx, [num2] ; load second number in bx add ax, bx int 0x num1: dw num2: dw 10 Comments for the 4 are : 1) : No comments Will be 2) : ; accumulate sum in add 3) : ; accumulate sum in ax 4) : ; accumulate sum in Bx Correct Option : 3 From : Lecture 5 Question # 51 In mov ax, bx is Addressing Modes. 1) : Immediate 2) : Indirect 3) : Direct

174 4) : Register Correct Option : 4 From : Lecture 5 Question # 52 In mov ax, [bx] is Addressing Modes 1) : Based Register Indirect 2) : Indirect 3) : Base Indirect 4) : Immediate Correct Option : 1 From : Lecture 5 Question # 53 In mov ax, 5 is Addressing Modes 1) : Immediate 2) : Indirect 3) : Indirect 4) : Register Correct Option : 1 From : Lecture 6 Question # 54 In mov ax, [num1+bx] is ADDRESSING 1) : OFFSET+ Indirect 2) : Register + Direct 3) : Indirect + Reference 4) : BASEd REGISTER + OFFSET Correct Option : 4 From : Lecture 7 Question # 55 base + offset addressing gives This number which came as the result of addition is called the. 1) : Address 2) : mode 3) : effective address 4) : Physical Address Correct Option : 3 From : Lecture 7 Question # 56 mov ax, [cs:bx] associates for this one instruction 1) : CS with BX 2) : BX with CS 3) : BX with AX 4) : None of the Given Correct Option : 2 From : Lecture 7 Question # 57 For example BX=0100 DS=FFF0 And Opcode are;

175 move [bx+0x0100], Ax now what is the effective memory address; 1) : ) : ) : ) : 0x02 Correct Option : 2 From : Lecture 7 Question # 59 In mov [1234], al is Addressing Modes. 1) : Immediate 2) : Indirect 3) : Direct 4) : Register Correct Option : 3 From : Lecture 8 Question # 60 In mov [SI], AX is Addressing Modes. 1) : Basef Register Indirect 2) : Indirect 3) : Indexed Register Indirect 4) : Immediate Correct Option : 3 From : Lecture 8 Question # 61 In mov ax, [bx - Si] is ADDRESSING 1) : Basef Register Indirect 2) : Indirect 3) : Direct 4) : illegal Correct Option : 4 From : Lecture 8 Question # 62 In mov ax, [BL] there is error i.e. 1) : Address must be 16bit 2) : Address must be 8bit 3) : Address must be 4bit 4) : 8 bit to 16 bit move illegal Correct Option : 4 From : Lecture 8 Question # 63 In mov ax, [SI+DI] there is error i.e. 1) : Two indexes can t use as Memory Address 2) : index can t use as Memory Address 3) : I don't Know 4) : None of the Given Correct Option : 1 From : Lecture 8

176 Question # 64 In JNE and JNZ there is difference for only ; 1) : Programmer or Logic 2) : Assembler 3) : Debugger 4) : IAPX88 Correct Option : 1 From : Lecture 9 Question # 65 JMP is Instruction that on executing take jump regardless of the state of all flags is called 1) : Jump 2) : Conditional jump 3) : Unconditional jump 4) : Stay Correct Option : 3 From : Lecture 9 Question # 66 When result of the source subtraction from the destination is zero, zero flag is set i.e. ZF=1 its mean that; 1) : DEST = SRC 2) : DEST!= SRC 3) : DEST < SRC 4) : DEST > SRC Correct Option : 1 From : Lecture 9 Question # 67 When an unsigned source is subtracted from an unsigned destination and the destination is smaller, borrow is needed which sets the. 1) : carry flag i.e CF = 0 2) : carry flag i.e CF = 1 3) : Carry Flag + ZF=1 4) : None of the Given Correct Option : 2 From : Lecture 9 Question # 68 In the case of unassigned source and destination when subtracting and in the result ZF =1 OR CR=1 then 1) : DEST = SRC 2) : DEST!= SRC 3) : UDEST? USRC 4) : DEST > SRC Correct Option : 3 From : Lecture 9 Question # 69 In the case of unassigned source and destination when subtracting and

177 in the result ZF =0 AND CR=0 then 1) : DEST = SRC 2) : DEST!= SRC 3) : UDEST < USRC 4) : UDEST > USRC Correct Option : 4 From : Lecture 9 Question # 70 In the case of unassigned source and destination when subtracting and in the result CR=0 then 1) : DEST = SRC 2) : DEST!= SRC 3) : UDEST < USRC 4) : UDEST? USRC Correct Option : 4 From : Lecture 9 Question # 71 This jump is taken if the last arithmetic operation produced a zero in its destination. After a CMP it is taken if both operands were equal. 1) : Jump if zero(jz)/jump if equal(je) 2) : Jump if equal(je) 3) : Jump if zero(jz) 4) : No Jump fot This Correct Option : 1 From : Lecture 9 Question # 72 This jump is taken after a CMP if the unsigned source is smaller than or equal to the unsigned destination. 1) : JBE(Jump if not below or equal) 2) : JNA(Jump if not above)/jbe(jump if not below or equal) 3) : JNA(Jump if not above) 4) : No Jump fot This Correct Option : 2 From : Lecture 9 Question # 1 Numbers of any size can be added using a proper combination of. 1) : ADD and ADC 2) : ABD and ADC 3) : ADC and ADC 4) : None of the Given Correct Option : 1 From : Lecture 11 Question # 2 Like addition with carry there is an instruction to subtract with borrows called. 1) : SwB 2) : SBB 3) : SBC 4) : SBBC

178 Correct Option : 2 From : Lecture 11 Question # 3 if and ax, bx instruction is given, There are operations as a result 1) : 16 AND 2) : 17 AND 3) : 32 AND 4) : 8 AND Correct Option : 1 From : Lecture 12 Question # 4 can be used to check whether particular bits of a number are set or not. 1) : AND 2) : OR 3) : XOR 4) : NOT Correct Option : 1 From : Lecture 12 Question # 5 can also be used as a masking operation to invert selective bits. 1) : AND 2) : OR 3) : XOR 4) : NOT Correct Option : 3 From : Lecture 12 Question # 6 Masking Operations are Selective Bit 1) : Clearing, XOR, Inversion and Testing 2) : Clearing, Setting, Inversion and Testing 3) : Clearing, XOR, AND and Testing 4) : None of the Given Correct Option : 2 From : Lecture 12 Question # 7 The instruction allows temporary diversion and therefore reusability of code. 1) : CALL 2) : RET 3) : AND 4) : XOR Correct Option : 1 From : Lecture 13 Question # 8 CALL takes a label as and execution starts from that label,

179 1) : argument 2) : Lable 3) : TXt 4) : Register Correct Option : 1 From : Lecture 13 Question # 9 When the instruction is encountered and it takes execution back to the instruction following the CALL. 1) : CALL 2) : RET 3) : AND 4) : XOR Correct Option : 2 From : Lecture 13 Question # 10 Both the instructions are commonly used as a pair, however technically they are independent in their operation. 1) : RET and ADC 2) : Cal and SSb 3) : CALL and RET 4) : ADC and SSB Correct Option : 3 From : Lecture 13 Question # 11 The CALL mechanism breaks the thread of execution and does not change registers, except. 1) : SI 2) : IP 3) : DI 4) : SP Correct Option : 2 From : Lecture 13 Question # 12 Stack is a that behaves in a first in last out manner. 1) : Program 2) : data structure 3) : Heap 4) : None of the Given Correct Option : 2 From : Lecture 14 Question # 13 If is not available, stack clearing by the callee is a complicated process. 1) : CALL 2) : SBB 3) : RET n 4) : None of the Given Correct Option : 3 From : Lecture 14

180 Question # 14 When the stack will eventually become full, SP will reach 0, and thereafter wraparound producing unexpected results. This is called stack 1) : Overflow 2) : Leakage 3) : Error 4) : Pointer Correct Option : 1 From : Lecture 14 Question # 15 The pop operation makes a copy from the top of the stack into its. 1) : Register 2) : operand 3) : RET n 4) : Pointer Correct Option : 2 From : Lecture 14 Question # 16 decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack 1) : PUSH 2) : POP 3) : CALL 4) : RET Correct Option : 1 From : Lecture 14 Question # 17 POP transfers the word at the current top of stack (pointed to by SP) to the destination operand and then SP by two to point to the new top of stack. 1) : increments 2) : dcrements 3) : ++ 4) : -- Correct Option : 1 From : Lecture 14 Question # 18 The trick is to use the and operations and save the callers value on the stack and recover it from there on return. 1) : POP, ADC 2) : CALL, RET 3) : CALL, RET n 4) : PUSH, POP Correct Option : 4 From : Lecture 14 Question # 19

181 To access the arguments from the stack, the immediate idea that strikes is to them off the stack. 1) : PUSH 2) : POP 3) : CALL 4) : Rrgister Correct Option : 2 From : Lecture 15 Question # 20 push bp we are 1) : sending bp copy to stack 2) : making bp copy from stack 3) : pushing bp on the stack 4) : doing nothing Correct Option : 3 From : Lecture 15 Question # 21 Local Variables means variables that are used within the 1) : Subroutine 2) : Program 3) : CALL 4) : Label Correct Option : 1 From : Lecture 15 Question # 22 Standard ASCII has 128 characters with assigned numbers from. 1) : 1to 129 2) : 0 to 127 3) : 0 to 128 4) : None of the Given Correct Option : 2 From : Lecture 16 Question # 23 When is sent to the VGA card, it will turn pixels on and off in such a way that a visual representation of A appears on the screen. 1) : 0x60 2) : 0x90 3) : 0x30 4) : 0x40 Correct Option : 4 From : Lecture 16 Question # 24 Which bit is refer to the Blinking of foreground character 1) : 6 2) : 7 3) : 5

182 4) : 3 Correct Option : 2 From : Lecture 16 Question # 25 Which bit is refer to the Intensity component of foreground color 1) : 4 2) : 5 3) : 3 4) : 7 Correct Option : 3 From : Lecture 16 Question # 26 Which bit is refer to the Green component of background color 1) : 1 2) : 5 3) : 3 4) : 7 Correct Option : 2 From : Lecture 16 Question # 27 Which bit is refer to the Green component of foreground color 1) : 1 2) : 5 3) : 3 4) : 7 Correct Option : 1 From : Lecture 16 Question # 28 String can be indicate bye given 1) : db 0x61, 0x61, 0x63 2) : db 'a', 'b', 'c' 3) : db 'abc' 4) : All of the above Correct Option : 4 From : Lecture 16 Question # 29 The first form divides a 32bit number in DX:AX by its 16bit operand and stores the quotient in AX 1) : 16bit 2) : 17bit 3) : 32bit 4) : 64bit Correct Option : 1 From : Lecture 17 Question # 30 The (division) used in the process is integer division and not floating point division. 1) : DIV instruction 2) : ADC instruction

183 3) : SSB instruction 4) : DIVI instruction Correct Option : 1 From : Lecture 17 Question # 31 (multiply) performs an unsigned multiplication of the source operand and the accumulator. 1) : Multi 2) : DIV 3) : MUL 4) : Move Correct Option : 3 From : Lecture 18 Question # 32 The desired location on the screen can be calculated with the following formulae. 1) : location = ( hypos * 80 + SP ) * 3 2) : location = ( hypos * 80 + slocation ) * 2 3) : location = ( hypos * 80 + epos ) * 2 4) : None of the Given Correct Option : 3 From : Lecture 18 Question # 33 To play with string there are 5 instructions that are 1) : STOS, LODS, CMPS, SCAS, and MOVS 2) : MUL, DIV, ADD, ADC and MOVE 3) : SSB, ADD, CMPS, ADC, and MOVS 4) : None of the Given Correct Option : 1 From : Lecture 18 Question # 34 transfers a byte or word from register AL or AX to the string element addressed by ES:DI and updates DI to point to the next location. 1) : LODS 2) : STOS 3) : SCAS 4) : MOVE Correct Option : 2 From : Lecture 18 Question # 35 transfers a byte or word from the source location DS:SI to AL or AX and updates SI to point to the next location. 1) : LODS 2) : STOS 3) : SCAS 4) : MOVE Correct Option : 1 From : Lecture 18

184 Question # 36 compares a source byte or word in register AL or AX with the destination string element addressed by ES: DI and updates the flags. 1) : LODS 2) : STOS 3) : SCAS 4) : MOVE Correct Option : 3 From : Lecture 18 Question # 37 repeat the following string instruction while the zero flag is set and REPNE or REPNZ repeat the following instruction while the zero flag is not set. 1) : REP or REPZ 2) : REPE or REPZ 3) : REPE or RPZ 4) : RPE or REPZ Correct Option : 2 From : Lecture 18 Question # 38 LES loads 1) : ES 2) : DS 3) : PS 4) : LS Correct Option : 1 From : Lecture 20 Question # 39 LDS loads. 1) : ES 2) : DS 3) : PS 4) : LS Correct Option : 2 From : Lecture 20 Question # 40 REP allows the instruction to be repeated times allowing blocks of memory to be copied. 1) : DX 2) : CX 3) : BX 4) : AX Correct Option : 2 From : Lecture 20 Question # 41 pops IP, then CS, and then FLAGS. 1) : Ret n 2) : REZA 3) : REPE

185 4) : IRET Correct Option : 4 From : Lecture 21 Question # 42, Trap, Single step Interrupt 1) : INT 0 2) : INT 1 3) : INT 3 4) : INT 0 Correct Option : 2 From : Lecture 21 Question # 43,NMI-Non Maskable Interrupt 1) : INT 0 2) : INT 1 3) : INT 3 4) : INT 0 Correct Option : 3 From : Lecture 21 Question # 44 To hook an interrupt we change the corresponding to that interrupt. 1) : SX 2) : vector 3) : AX 4) : BX Correct Option : 2 From : Lecture 22 Question # 1 pops IP, then CS, and then FLAGS. 1) : Ret n 2) : REZA 3) : REPE 4) : IRET Correct Option : 4 From : Lecture 21 Question # 2, Trap, Single step Interrupt 1) : INT 0 2) : INT 1 3) : INT 3 4) : INT 0 Correct Option : 2 From : Lecture 21 Question # 3,NMI-Non Maskable Interrupt 1) : INT 0 2) : INT 1

186 3) : INT 3 4) : INT 0 Correct Option : 3 From : Lecture 21 Question # 4 To hook an interrupt we change the corresponding to that interrupt. 1) : SX 2) : vector 3) : AX 4) : BX CS401 Quiz no 3 Solved With refernce by Cyberians. Question # 1 of 10 ( Start time: 02:24:57 PM ) Total Marks: 1 Memory address space is selected when which of the following instructions is given to the processor?s Select correct option: MOV DEC IN ADD Refernce:- Page no 115 When MOV is given the processor selects the memory address space,

187 Question # 2 of 10 ( Start time: 02:25:56 PM ) Total Marks: 1 PCB stands for? Select correct option: Process Control Block Process Clearing Block Programable Counter Block Programs Control Block Refernce:- Page no 140 The space where all registers of a task are stored is called the process control block or PCB. Question # 3 of 10 ( Start time: 02:26:41 PM ) Total Marks: 1 Creation of threads can be Select correct option: Static Dynamic Both None Refernce:- Page no 141 The creation of threads is now dynamic Question # 4 of 10 ( Start time: 02:27:46 PM ) Total Marks: 1 Threads can have function calls, parameters and variables. Select correct option: global local legal illegal Refernce:- page no 141 Now threads can have function calls, parameters and local variables etc. Which of the following is the highest priority interrupt

188 Int3 Int2 Int1 Int0 Refernce:- page no 139 IRQ 0 highest priority interrupt that is periodically coming to the processor The input frequency of the programmable interval timer (PIT) is Fixed Depends on processor clock Variable Depends on hardware attached Refernce:- page no 122 Another very important peripheral device is the Programmable Interval Timer (PIT), the chip numbered This chip has a precise input frequency of MHz. This frequency is fixed regardless of the processor clock. Programmable interrupt controller has two ports 20 and 21. Port 20 is the control port while port 21 is... The Interrupt mask register Interrupt port Output port Input port

189 Refernce:- page no 115 Port 21 is the interrupt mask register which can be used for selectively enabling or disabling interrupts The source registers in OUT is? AL or AX BL or BX CL or CX DL or DX Refernce:- page no 115 The source register in OUT and destination register in IN is AL or AX depending on which form is used. The time interval between two timer ticks is? 40ms 45ms 50ms 55ms Refernce:- page no 122 There is an interval of about 55ms between two timer ticks. Which of the following interrupts is used for saving and restoring the registers

190 INT6 Int7 Int8 Int0 Refernce:- page no 141 INT 08 that is saving and restoring the registers is called the scheduler and the whole event is called a context switch. In programmable interrupt controller which of the following ports is referred as a interrupt mask register? Refernce:- page no 115 Port 21 is the interrupt mask register which can be used for selectively enabling or disabling interrupts The thread registration code initializes the PCB and adds it to the linked list so that the will give it a turn. Assembler Scheduler Refernce:- page no 141 Linker Debugger Refernce:- page no 141 The thread registration code initializes the PCB, and adds it to

191 the linked list so that the scheduler will give it a turn. The programmable interval timer (PIT) has input frequency of 1.193MHZ 2.192MHZ 3.196MHZ 4.198MHZ Refernce:- page no 122 This chip has a precise input frequency of MHz. Peripheral address space is selected when which of the following instructions is given to the processor? MOv In Add Out Refernce:- page no 115 IN is given the processor selects the peripheral address space. Direction flag, the interrupt flag, and the trap flag are used for mathematical operations

192 not used for mathematical operations status flags not status flags Refernce:- page no 133 The three flags not used for mathematical operations are the direction flag, the interrupt flag and the trap flag. An End of Interrupt (EOI) signal is sent by Handler Processor IRQ PIC not so confirmed Refernce:- Page no 140 At the end of servicing the interrupt the handler should inform the PIC that it is completed so that lower priority interrupts can be sent from the PIC. This signal is called an End Of Interrupt (EOI) signal and is sent through the I/O ports of the interrupt controller. The space where all the registers of a task are stored is called the control block process control block stack memory

193 Refernce:- Page no 140 The space where all registers of a task are stored is called the process control block or PCB. Question # 1 of 10 ( Start time: 12:17:47 AM ) Total Marks: 1 Question # 3 of 10 ( Start time: 12:20:27 AM ) Total Marks: 1 The number of pins in a parallel port connector are? Select correct option: Refernce:- Page no 125 The parallel port connector is a 25pin connector called DB-25. Question # 4 of 10 ( Start time: 12:21:23 AM ) Total Marks: 1 Question # 5 of 10 ( Start time: 12:22:49 AM ) Total Marks: 1 Which of the following interrupt is of highest priority interrupt? Select correct

194 option: Key board interrupt Timer interrupt INT 2 INT 3 Refernce:- Page no 122 This is the highest priority interrupt and breaks whatever is executing. Time can be maintained with this interrupt as this frequency is very precise and is part of the IBM standard. The instruction used to read a character from the keyboard port is in al, 0x60 out al, 0x60 in al, 0x80 out al, 0x80 Refernce:- Page no 123 in al, 0x60 ; read char from keyboard port Each thread can have their own execution area

195 stack memory array Refernce:- Every thread its own stack (page no 141) All the registers & stack are saved in Multitasking multi-processing function call BIOS Question No:1 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 (Page 19) 0x1000 0x0000 Question No:2 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be Black (Page 81) White Red Blue Question No:3 ( Marks: 1 ) - Please choose one The iapx888 architecture consists of register. 12

196 14 16 (Page 15) 18 Question No:4 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES: 0], 0x0741 will print A on the screen, color of the character will be Black White (Page 81) Red Blue Question No:5 ( Marks: 1 ) - Please choose one One screen location corresponds to a Byte Word (Page 80) Double byte Double word Question No:6 ( Marks: 1 ) - Please choose one When an item is pushed on the decrementing stack, the top of the stack is First decremented and then element copied on to the stack (Page 68) First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack Question No:7 ( Marks: 1 ) - Please choose one Each screen location corresponds to a word, the lower byte of this word contains The character code (Page 81) The attribute byte The parameters

197 The dimensions Question No:8 ( Marks: 1 ) - Please choose one if ax contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX,JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken Question No:9 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Question No:10 ( Marks: 1 ) - Please choose one When two 16bit numbers are added the answer can be 17 bits long, this extra bit that won t fit in the target register is placed in the where it can be used and tested carry flag (Page 16) Parity Flag Auxiliary Carry Zero Flag Question No: 11 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string (Page 29) word indirect stack Question No:12 ( Marks: 1 ) - Please choose one

198 When a 16 bit number is divided by an 8 bit number, the quotient will be in AL (Page 85) AX AH DX Question No:13 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? (Page 81) Question No:14 ( Marks: 1 ) - Please choose one C is a example of Shl sar Shr (Page 52) Sal Question No:15 ( Marks: 1 ) - Please choose one allow changing specific processor behaviors and are used to play with it. Special Instructions (Page 14) Data Movement Instructions Program Control Instructions Arithmetic and Logic Instructions Question No:16 ( Marks: 1 ) - Please choose one 8088 is a 16bit processor with its accumulator and all registers of. 32 bits 6 bits 16 bits (Page 14) 64 bits

199 Question No:17 ( Marks: 1 ) - Please choose one decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack PUSH (Page 71) POP CALL RET 1. In instruction ADC the operands can be Two register only Two register and one memory location CF and two other operands (Page 57) ZF and two other operands 2. After the execution of instruction RET SP is incremented by 2 (Page 66) SP is decremented by 2 SP is incremented by 1 SP is decremented by 1 3. The extended ASCII has 64 characters 128 characters (Page 79) 256 characters 502 characters 4. The second byte in the word designated for screen location holds The dimension of the screen Character position on the screen Character color on the screen (Page 81) ACSII code of the character 5. REP will always Incremented CX by 1 Incremented CX by 2 Decremented CX by 1 (Page 92)

200 Decremented CX by 2 6. The routine that executes in response to an INT instruction is called ISR (Page 103) IRS ISP IRT 7. The iapx888 architecture consists of register (Page 15) Rep In the instruction CMP AX,BX the contents of AX are changed BX are changed CX are changed Flag register are changed (Page 39) 9. All the addressing mechanisms iniapx88 return a number called address. Effective (Page 33) faulty indirect direct 10. The execution of the instruction mov word [ES: DI], 0x0720 will clear next character on screen (Page 82) will print 20 at top left of the screen will print 20 at top right of the screen will move DI at location 0720 on the screen 11. mov byte [num1],5 is instruction. legal illegal (Page 30) stack based

201 memory indirect 12. MOV instruction transfers a byte or word from which of the following source location. DS:DI ES:SI ES:DI (Page 92) DS:SI 13. The execution of the instruction mov word [ES: 0], 0x0741 will print A on the screen, color of the character will be Black White (Page 81) rep Red Blue 14. If AX contains FFFFh, then after execution of instruction SAL ax, 3, the result will be If the decimal number 35 is shifted by two bit to left, the new value will be ( = 35, =140) While using STOBS, if DF=1 then The value of SI will be incremented by one The value of SI will be incremented by two The value of SI will be decremented by one detail click here for The value of SI will be decremented by two 17. After the execution of STOSW, the CX will be

202 Decremented by 1 Decremented by 2 (Page 92) Incremented by 1 Incremented by The memory address always move from processor to memory memory to processor memory to peripheral peripheral to processor 19. An offset alone is not complete without Segment (Page 34) code label index register data label 20. Code Segment is associated to register by default. IP (Page 34) SS BP CX After the execution of SAR instruction: MSB remain as it is MSB Will change MSB move to left (Page 52) No change will occur. ASCII stands for. The screen is two dimensional space having: 25 Rows and 25 Columns (Page 80) 25 Rows and 80 Columns 80 Rows and 80 Columns 80 Rows and 25 Columns Question No:3 ( Marks: 1 ) - Please choose one

203 In the Rotate Right Operation every bit moves one position to right and the bit dropped from the right is inserted at the left and: Dropped in CF (Page 53) moves to AL Don t go anywhere. of the following flags will be affected by MOVSB? DF Click here for Detail ZF PF No effect on flags. The iapx88 processor supports modes of memory access (Page 35) 8 Stack is a that behaves in a first in last out manner. Program data structure (Page 67) Heap None of the Given The physical address of the stack is obtained by SS:SI combination SS:SP combination (Page 68) ES:BP combination ES:SP combination Foreground and background parameter will be 32bits 16bits 8bits 4bits

204 Question No:4 ( Marks: 1 ) - Please choose one The clear screen operation initialize whole block of memory , 0720 (Page 91) In STOSB instruction, when DF is Set, SI is Incremented by 1 Incremented by 2 Decremented by 1 Click here for Detail Decremented by 2 Assembly language is: Low-level programming language Click here for detail High-level programming language Also known as machine language Not considered closer to the computer A 32 Bit processor has accumulator of bit 16 bit 32 bit (Page 12) 64 bit Question No:8 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments (Page 72) No arguments Question No:9 ( Marks: 1 ) - Please choose one RET is executed, it recovers the values from Register Stack (Page 71)

205 Data segment Code segment Question No:10 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit (Page 80) Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No:11 ( Marks: 1 ) - Please choose one The prevalent convention in most high level languages is stack clearing by the Caller Callee (Page 74) RET Stack Question No:12 ( Marks: 1 ) - Please choose one After execution of JCXZ instruction CX will changed with flag affect. CF OF DF None of Above (Page 43) Question No:13 ( Marks: 1 ) - Please choose one Execution of the instruction mov word [ES : 0], 0x0741 will print A appear on the top left of screen (Page 81) A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen Question No:14 ( Marks: 1 ) - Please choose one if contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX

206 JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken Question No:15 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No:16 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Question No:17 ( Marks: 1 ) - Please choose one Execution of the instruction mov word [ES : 0], 0x1230 will print the character color will Green White Red Black Question No: 1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction

207 The msb is replaced by a 0 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF (Page 52) Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP (Page 69) SP SI Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR (Page 103) rep IRS ISP IRT Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 (Page 19) rep 0x1000 0x0000 Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute (Page 46) Temporary indirect Question No: 6 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory.

208 string (Page 29) rep word indirect stack Question No: 7 ( Marks: 1 ) - Please choose one After the execution of instruction RET 2 SP is incremented by 2 SP is decremented by 2 (Page 66) rep SP is incremented by 4 SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has Two forms (Page 85) Three forms Four forms Five forms Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits (Page 85) 16 bits 32 bits 64 bits Question No: 10 ( Marks: 1 ) - Please choose one After the execution of MOVS instruction which of the following registers are updated SI only DI only SI and DI only (Page 92) SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one

209 In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 (Page 68) SP is decremented by 3 SP is decremented by 4 Question No: 12 ( Marks: 1 ) - Please choose one When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called Divide logical error Divide overflow error (Page 85) Divide syntax error An illegal instruction Question No: 13 ( Marks: 1 ) - Please choose one In the word designated for one screen location, the higher address contains The character code The attribute byte (Page 81) The parameters The dimensions Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds t

210 One byte Two bytes (Page 80) Four bytes Eight bytes Question No: 16 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be Black (Page 81) rep White Red Question No:1 ( Marks: 1 ) - Please choose one One screen location corresponds to a Byte Word (Page 80) rep Double byte Double word Question No:2 ( Marks: 1 ) - Please choose one After the execution of PUSH AX statement AX register will reside on the stack A copy of AX will go on the stack (Page 69) The value of AX disappear after moving on stack Stack will send an acceptance message Question No:3 ( Marks: 1 ) - Please choose one physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination (Page 68) rep ES:BP combination ES:SP combination Question No:4 ( Marks: 1 ) - Please choose one

211 If the address of memory location Num1 is 0117 and its content is 0005 then after execution of the instruction mov bx, Num1 bx will contain (Page 30) Num Question No:5 ( Marks: 1 ) - Please choose one In STOS instruction, the implied source will always be in AL or AX registers (Page 92) DL or DX registers BL or BX registers CL or CX registers Question No:6 ( Marks: 1 ) - Please choose one The shift logical right operation inserts A zero at right A zero at left (Page 52) A one at right A one at right Question No:7 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 (Page 92) rep Decrement CX by 2 Question No:8 ( Marks: 1 ) - Please choose one When an item is pushed on the decrementing stack, the top of the stack is First decremented and then element copied on to the stack (Page 68) rep First incremented and then element copied on to the stack Decremented after the element copied on to the stack

212 Incremented after the element copied on to the stack Question No:9 ( Marks: 1 ) - Please choose one assembly the CX register is used normally as a register. source counter (Page 32) index pointer Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus I only II only III only (Page 9) I and II only Question No:10 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) Scan Sort Move data Question No:11 ( Marks: 1 ) - Please choose one register holds the address of next instruction is to be executed Base pointer Code segment Source index Program counter (Page 13) Question No:12 ( Marks: 1 ) - Please choose one JC and JNC test the flag. carry (Page 41) parity

213 zero sign Question No:13 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) Question No:14 ( Marks: 1 ) - Please choose one In string manipulation whenever an instruction needs a memory source, which of the following will hold the pointer to it? ES: DI ES: BP DS:BP DS:SI (Page 91) Question No:15 ( Marks: 1 ) - Please choose one which bit sets the character "blinking" on the screen? (Page 7) 8 Question No:16 ( Marks: 1 ) - Please choose one If we want to divide a signed number by 2, this operation can better be accomplished by SHR SAR (Page 52) SHL SAL Question No:17 ( Marks: 1 ) - Please choose one

214 After the execution of STOSB,the CX wil be.. Incremented by 1 Incremented by 2 Decremented by 1 (Page 92) Decremented by 2 Question No:18 ( Marks: 1 ) - Please choose one Each screen location corresponds to a word, the lower byte of this word contains The character code (Page 81) rep The attribute byte The parameters The dimensions Question No:19 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds t One byte Two bytes (Page 86) Four bytes Eight bytes Question No:1 ( Marks: 1 ) - Please choose one Execution of the instruction mov word [ES : 0], 0x0741 will print A appear on the top left of screen (Page 81) rep A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen Question No:2 ( Marks: 1 ) - Please choose one After the execution of PUSH AX statement AX register will reside on the stack (Page 69) rep A copy of AX will go on the stack The value of AX disappear after moving on stack Stack will send an acceptance message Question No:3 ( Marks: 1 ) - Please choose one

215 If D is 35 is shift to left 2 bits the new value Question No:4 ( Marks: 1 ) - Please choose one When an item is pushed on the decrementing stack, the top of the stack is First decremented and then element copied on to (Page 68) rep First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack Question No:5 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) rep Question No:6 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes (Page 66) Four bytes Eight bytes Question No:7 ( Marks: 1 ) - Please choose one shifting the -15 two bit sar

216 Question No:8 ( Marks: 1 ) - Please choose one mov ax,5 has 1 operand 2 opeand (Page 25) 3 operand 4 opeand The physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination (Page 68) rep ES:BP combination ES:SP combination Question No: 2 ( Marks: 1 ) - Please choose one After the execution of instruction RET SP is incremented by 2 SP is incremented by 2 (Page 66) rep SP is decremented by 2 SP is incremented by 1 SP is decremented by 1 Question No: 3 ( Marks: 1 ) - Please choose one The second byte in the word designated for one screen location holds Character color on the screen The dimensions of the screen Character position on the screen Character color on the screen (Page 81) rep ASCII code of the character Question No: 4 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 (Page 92)

217 Decrement CX by 2 Question No: 5 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) rep Scan Sort Move data Question No: 6 ( Marks: 1 ) - Please choose one Index registers are used to store Data Intermediate result Address (Page 16) Both data and addresses Question No: 7 ( Marks: 1 ) - Please choose one The bits of the work independently and individually index register base register flags register (Page 12) accumulator Question No: 8 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit (Page 80) rep Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No: 12 ( Marks: 1 ) - Please choose one If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken

218 Zero flag will set ZF will contain value -4 Jump will not be taken Question No: 13 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 160], 0x1230 will print a character 0 on the screen at Second column of first row First column of second row (Page 81) Second column of second row First column of third row Question No: 14 ( Marks: 1 ) - Please choose one If the direction of the processing of a string is from higher addresses towards lower addresses then ZF is cleared DF is cleared (Page 91) ZF is set DF is set Question No: 15 ( Marks: 1 ) - Please choose one The instruction ADC has Operand(s) (Page 56) 3 Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? (Page 81) Question No: 1 ( Marks: 1 ) - Please choose one

219 Suppose AL contains 5 decimal then after two left shifts produces the value as Question No: 2 ( Marks: 1 ) - Please choose one In STOS instruction, the implied source will always be in AL or AX registers (Page 92) rep DL or DX registers BL or BX registers CL or CX registers Question No: 3 ( Marks: 1 ) - Please choose one After the execution of STOSW the CX will be Decremented by 1 Decremented by 2 (Page 92) rep Incremented by 1 Incremented by 2 Question No: 4 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) rep Scan Sort Move data Question No: 5 ( Marks: 1 ) - Please choose one Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus I only II only

220 III only (Page 9) rep I and II only Question No: 6 ( Marks: 1 ) - Please choose one The operation of CMP is t Subtract Source from Destination (Page 39) Subtract Destination to from Source Add 1 to the Destination Add Source and Destination Question No: 7 ( Marks: 1 ) - Please choose one The registers IP, SP, BP, SI, DI, and BX all can contain a offset. 8-bit 16-bit (Page 21) 32-bit 64-bit Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter (Page 92) index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective (Page 33) faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of foreground color 3

221 2 1 0 (Page 81) Question No: 11 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient will be stored in AX (Page 85) BX CX DX Question No: 12 ( Marks: 1 ) - Please choose one mov byte [num1], 5 is instruction. legal (Page 30) rep illegal stack based memory indirect Question No: 13 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 14 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, color of the character will be Black White (Page 81) rep

222 Red Blue Question No: 15 ( Marks: 1 ) - Please choose one Which of the following flags will be affected by MOVSW? DF PF ZF No effect on flags Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of background color? 3 4 (Page 81) 5 6 Question No: 1 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments (Page 72) rep No arguments Question No: 2 ( Marks: 1 ) - Please choose one In STOSB instruction SI is decremented or incremented by 4 1 (Page 92) 2 3 Question No: 3 ( Marks: 1 ) - Please choose one CMPS instruction subtracts the source location to the destination location.

223 Destination location always lies in DS:SI (Page 93) DS:DI ES:SI ES:DI Question No: 4 ( Marks: 1 ) - Please choose one Regarding assembler, which statement is true: Assembler converts mnemonics to the corresponding OPCODE (Page 13) Assembler converts OPCODE to the corresponding mnemonics Assembler executes the assembly code all at once Assembler executes the assembly code step by step Question No: 5 ( Marks: 1 ) - Please choose one If BB is the OPCODE of the instruction which states to move a constant value to AX register, the hexadecimal representation (Using little Endian notation) of the instruction Mov AX,336 ( 150 in hexadecimal number system) will be: 0xBB0150 0x5001BB 0x01BB50 0xBB5001 (Page 19) Question No: 6 ( Marks: 1 ) - Please choose one In the instruction MOV AX, 5 the number of operands are 1 2 (Page 25) rep 3 4 Question No: 7 ( Marks: 1 ) - Please choose one The maximum parameters a subroutine can receive (with the help of registers) are 6

224 7 (Page 72) 8 9 Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter (Page 92) rep index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective (Page 33) rep faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the dividend will be in AX (Page 85) BX CX DX Question No: 11 ( Marks: 1 ) - Please choose one in Left-Shift-Operation the left most bit will drop will go into CF (Page 52) Will come to the right most will be always 1 Question No: 12 ( Marks: 1 ) - Please choose one Suppose the decimal number "35" after shifting its binary two bits to left, the new

225 value becomes Question No: 13 ( Marks: 1 ) - Please choose one When divide overflow occurs processor will be interrupted this type of interrupt is called Hardware interrupt Software interrupt Processor exception Logical interrupts Question No: 14 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication Addition Subtraction (Page 92) rep Question No: 15 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) rep Question No: 16 ( Marks: 1 ) - Please choose one is one of the reasons due to which string instructions are used in 8088 Efficiency and accuracy Reduction in code size and accuracy

226 Reduction in code size and speed (Page 91) Reduction in code size and efficiency Cs401 3 rd quiz In programmable interrupt controller which of the following ports is referred as a control port? 22 (Page 115) In programmable interrupt controller which of the following ports is used for selectively enabling or disabling interrupts? (Page 115) 22 Which of the following is the highest priority interrupt Int3 Int2 Int1 Int0 (Page 139) The input frequency of the programmable interval timer (PIT) is Fixed (Page 112) Depends on processor clock

227 Variable Depends on hardware attached Programmable interrupt controller has two ports 20 and 21. Port 20 is the control port while port 21 is... The Interrupt mask register (Page 115) Interrupt port Output port Inpuit port The source registers in OUT is? AL or AX ( Page 115) BL or BX CL or CX DL or DX Creation of threads can be Static Dynamic (Page 141) Both None The time interval between two timer ticks is? 40ms 45ms 50ms 55ms (Page 122) Which of the following interrupts is used for saving and restoring the registers INT6

228 Int7 Int8 (Page 141) Int0 PCB stands for? Process Control Block (Page 140) Process Clearing Block Programable Counter Block Programs Control Block In programmable interrupt controller which of the following ports is referred as a interrupt mask register? (Page 115) 22 The thread registration code initializes the PCB and adds it to the linked list so that the will give it a turn. Assembler Scheduler (Page 141) Linker Debugger The programmable interval timer (PIT) has input frequency of 1.193MHZ (Page 122) 2.193MHZ 3.193MHZ 4.193MHZ

229 Threads can have function calls, parameters and variables. Global Local (Page 141) Legal Illegal Peripheral address space is selected when which of the following instructions is given to the processor? MOv (Page 115) In Add Out Direction flag, the interrupt flag, and the trap flag are used for mathematical operations not used for mathematical operations (Page 133) status flags not status flags An End of Interrupt (EOI) signal is sent by Handler Processor IRQ (Page 115) PIC The space where all the registers of a task are stored is called the control block process control block (Page 140) stack memory

230 The instruction used to read a character from the keyboard port is in al, 0x60 out al, 0x60 in al, 0x80 out al, 0x80 Which of the following pins of a parallel port connector are grounded? (Page 125) Each thread can have their own execution area stack (Page 141) memory array All the registers & stack are saved in Multitasking (page 139) multi-processing function call BIOS Question # 1 of 10 ( Start time: 02:58:14 PM ) Total Marks: 1 The instruction used to read a character from the keyboard port is Select correct option: in al, 0x60 out al, 0x60

231 in al, 0x80 out al, 0x80 Question # 2 of 10 ( Start time: 02:59:00 PM ) Total Marks: 1 Each thread can have their own Select correct option: execution area stack memory array Question # 3 of 10 ( Start time: 03:00:28 PM ) Total Marks: 1 There is no instruction to clear the Select correct option: Trap flag (page 133) Interrupt flag Direction flag None of the above Question # 4 of 10 ( Start time: 03:01:36 PM ) Total Marks: 1 PCB stands for? Select correct option: Process Control Block Process Clearing Block Programable Counter Block Programs Control Block Question # 5 of 10 ( Start time: 03:01:52 PM ) Total Marks: 1 From the following which is related to read a char from key board? Select correct option: out al, 0x60 in al, 0x60 out dx, al ou dx, 0x378 Question # 6 of 10 ( Start time: 03:02:09 PM ) Total Marks: 1 The input frequency of the programmable interval timer (PIT) is Select correct option: Fixed Depends on processor clock Variable Depends on hardware attached Question # 7 of 10 ( Start time: 03:02:23 PM ) Total Marks: 1 The thread registration code initializes the PCB and adds it to the linked list so that the will give it a turn. Select correct option:

232 Assembler Scheduler Linker Debugger Question # 8 of 10 ( Start time: 03:02:37 PM ) Total Marks: 1 The source registers in OUT is? Select correct option: AL or AX BL or BX CL or CX DL or DX Question # 9 of 10 ( Start time: 03:03:11 PM ) Total Marks: 1 The time interval between two timer ticks is? Select correct option: 40ms 45ms 50ms 55ms Question # 10 of 10 ( Start time: 03:03:31 PM ) Total Marks: 1 Creation of threads can be Select correct option: Static Dynamic Both None Question # 1 of 10 ( Start time: 02:24:57 PM ) Total Marks: 1 Memory address space is selected when which of the following instructions is given to the processor?s Select correct option: MOV DEC IN ADD Question # 2 of 10 ( Start time: 02:25:56 PM ) Total Marks: 1 PCB stands for?

233 Select correct option: Process Control Block Process Clearing Block Programable Counter Block Programs Control Block Question # 3 of 10 ( Start time: 02:26:41 PM ) Total Marks: 1 Creation of threads can be Select correct option: Static Dynamic Both None Question # 4 of 10 ( Start time: 02:27:46 PM ) Total Marks: 1 Threads can have function calls, parameters and variables. Select correct option: global local legal illegal Which of the following is the highest priority interrupt Int3 Int2 Int1 Int0 The input frequency of the programmable interval timer (PIT) is Fixed Depends on processor clock Variable Depends on hardware attached Programmable interrupt controller has two ports 20 and 21. Port 20 is the control port while port 21 is...

234 The Interrupt mask register Interrupt port Output port Input port The source registers in OUT is? AL or AX BL or BX CL or CX DL or DX The time interval between two timer ticks is? 40ms 45ms 50ms 55ms Which of the following interrupts is used for saving and restoring the registers INT6 Int7 Int8 Int0 In programmable interrupt controller which of the following ports is referred as a interrupt mask register?

235 The thread registration code initializes the PCB and adds it to the linked list so that the will give it a turn. Assembler Scheduler Linker Debugger The programmable interval timer (PIT) has input frequency of 1.193MHZ 2.192MHZ 3.196MHZ 4.198MHZ Peripheral address space is selected when which of the following instructions is given to the processor? MOv In Add Out Direction flag, the interrupt flag, and the trap flag are used for mathematical operations not used for mathematical operations status flags not status flags

236 An End of Interrupt (EOI) signal is sent by Handler Processor IRQ PIC The space where all the registers of a task are stored is called the control block process control block stack memory Question # 3 of 10 ( Start time: 12:20:27 AM ) Total Marks: 1 The number of pins in a parallel port connector are? Select correct option: (Page 125) Question # 5 of 10 ( Start time: 12:22:49 AM ) Total Marks: 1 Which of the following interrupt is of highest priority interrupt? Select correct option: Key board interrupt Timer interrupt (Page 122)

237 INT 2 INT 3 The instruction used to read a character from the keyboard port is in al, 0x60 out al, 0x60 in al, 0x80 out al, 0x80 Each thread can have their own execution area stack memory array Refernce:- Every thread its own stack (page no 141) All the registers & stack are saved in Multitasking multi-processing function call BIOS After the execution of SAR instruction The msb is replaced by a 0

238 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP SP SI Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR IRS ISP IRT Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset:

239 0x0010 0x0100 0x1000 0x0000 Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute temporary indirect Question No: 6 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string word indirect stack Question No: 7 ( Marks: 1 ) - Please choose one After the execution of instruction RET 2 SP is incremented by 2 SP is decremented by 2 SP is incremented by 4

240 SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has Two forms Three forms Four forms Five forms Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits 16 bits 32 bits 64 bits Question No: 10 ( Marks: 1 ) - Please choose one After the execution of MOVS instruction which of the following registers are updated SI only

241 DI only SI and DI only SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 SP is decremented by 3 SP is decremented by 4 Question No: 12 ( Marks: 1 ) - Please choose one When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called Divide logical error Divide overflow error Divide syntax error An illegal instruction Question No: 13 ( Marks: 1 ) - Please choose one

242 In the word designated for one screen location, the higher address contains The character code The attribute byte The parameters The dimensions Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes Four bytes Eight bytes Question No: 16 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be

243 Black White Red 04 May 2012

244

245 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR OBJECTIVE (MCQZ):- Question No: 1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction The msb is replaced by a 0 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP ref page :69 SP SI Reference: RETF will pop the offset in the instruction Pointer followed by popping the segment in the code segment register. Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR ref page no 103 IRS ISP IRT MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

246 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Reference:- The routine that executes in response to an INT instruction is called the interrupt service routine (ISR) or the interrupt handler. Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 ref page no :20 0x1000 0x0000 Ref:- The first instruction of a COM file must be at offset 0100 (decimal 255) as a requirement. Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute ref page no :46 temporary indirect Reference :- Far jump is not position relative but is absolute. Question No: 6 ( Marks: 1 ) - Please choose one Only _ instructions allow moving data from memory to memory. string ref page no: 29 word indirect stack Reference:- Only string instructions allow moving data from memory to memory Question No: 7 ( Marks: 1 ) - Please choose one MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

247 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR After the execution of instruction RET 2 SP is incremented by 2 SP is decremented by 2 SP is incremented by 4 SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has Two forms ref page no :85 Three forms Four forms Five forms Reference: There are two forms of the DIV instruction. The first form divides a 32bit number in DX:AX by its 16bit operand and stores the 16bit quotient in AX and the 16bit remainder in DX. Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits 16 bits 32 bits page no:85 64 bits For example DIV BL has an 8bit operand, so the implied dividend is 16bit and is stored in the AX register and DIV BX has a 16bit operand, so the implied dividend is 32bit Question No: 10 ( Marks: 1 ) - Please choose one After the execution of MOVS instruction which of the following registers are updated MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

248 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR SI only DI only SI and DI only Reference Page no: 98 SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 Page no :68 SP is decremented by 3 SP is decremented by 4 Reference: Whenever an element is pushed on the stack SP is decremented by two as the 8088 stack works on word sized elements. Question No: 12 ( Marks: 1 ) - Please choose one When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called Divide logical error Divide overflow error Page no:85 Divide syntax error An illegal instruction Reference: If a large number is divided by a very small number it is possible that the quotient is larger than the space provided for it in the implied destination. In this case an interrupt is automatically generated and the program is usually terminated as a result. This is called a divide overflow error. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

249 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question No: 13 ( Marks: 1 ) - Please choose one In the word designated for one screen location, the higher address contains holds the Foreground and background colors for the character The character code The attribute byte The parameters The dimensions page no:81 Reference:- The second byte in the word designated for one screen location holds the foreground and background colors for the character. This is called its video attribute or attribute byte. Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX page no : 85 and 86 mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Reference:- ES is initialized to video memory. AX holds the number to be printed. BX is the desired base, and can be loaded from a parameter. CX holds the number of digits pushed on the stack. This count is Initialized to zero, incremented with every digit pushed and is used when the digits are popped one by one MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

250 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes page no: 86 Four bytes Eight bytes Refernce:- The next screen location is two bytes ahead so DI is incremented by two. The process is repeated CX times which holds the number of digits pushed on the stack. Question No: 16 (Marks: 1) - Please choose one The execution of the instruction mov word [ES: 0], 0x0741 will print character A on screen, background color of the screen will be Black page no:81 White Red Blue Refernce:- Now the following instruction will print an A on the top left of the screen in white color on black background. mov word [es:0], 0x0741 Stack is a that behaves in a first in last out manner. Program data structure page no 67 Heap None of the Given Reference: Stack is a data structure that behaves in a first in last out manner. The physical address of the stack is obtained by MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

251 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR SS:SI combination SS:SP combination page no :68 ES:BP combination ES:SP combination Reference: The physical address of the stack is obtained by the SS:SP combination. Foreground and background parameter will be 32bits 16bits 8bits 4bits The clear screen operation initialize whole block of memory 0741 page no : Reference: The clear screen operation initializes this whole block to In STOSB instruction, when DF is Set, SI is Incremented by 1 Incremented by 2 Decremented by 1 page no :92 Decremented by 2 Reference: SI will be incremented by one or two depending of whether STOSB or STOSW is used. If DF is set SI will be decremented by one or two depending of whether STOSB or STOSW is used. Assembly language is: Low-level programming language High-level programming language MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

252 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Also known as machine language Not considered closer to the computer It is so easy A 32 Bit processor has accumulator of bit 16 bit 32 bit page no :12 64 bit Reference: The word size of a processor is defined by the width of its accumulator. A 32bit processor has an accumulator of 32 bits. To transfer control back the RET instruction take 1 argument 1 argument 3 arguments No arguments page no:64 Refernce: RET takes no arguments and transfers control back to the instruction following the CALL that took us in this subroutine. RET is executed, it recovers the values from Register Stack Data segment Code segment To convert any digit to its ASCII representation Add 0x30 in the digit page no :80 Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Reference:- For example converting the case of characters by adding or subtracting 0x20 from it. It also helps in converting a digit into its ASCII representation by adding 0x30 to it. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

253 04 May EXAMINATION CS401- All Mcqz and Subjective 2012 Solved With Reference -:: SOLVED BY:SaHeR The prevalent convention in most high level languages is stack clearing by the Caller Callee page no : 74 RET Stack Refernce:- Therefore the prevalent convention in most high level languages is stack clearing by the callee. After execution of JCXZ instruction CX will changed with flag affect. CF OF DF None of Above page no :43 Reference:- One jump is special that it is not dependant on any flag. It is JCXZ, jump if the CS register is zero. This is because of the special treatment of the CX register as a counter. This jump is regardless of the zero flag. There is no counterpart or not form of this instruction. Execution of the instruction mov word *ES: 0+, 0x0741 will print A appear on the top left of screen page no :81 A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen Reference:- Since the first word is written to, the character will appear at the top left of the screen. If contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

254 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Zero flag will set page no: 39 ZF will contain value -4 Jump will not be taken Reference:- For example a number 2 is represented in a word as 0002 while the number -2 is represented as FFFE. In a byte they would be represented as 02 and FE. Now both have the same magnitude however the different sign has caused very different representation in two s complement form. Now if the intent is to use FFFE or decimal then the same data would be placed in the word as in case of -2. In fact if -2 and are compared the processor will set the zero flag signaling that they are exactly equal. If D is 35 is shift to left 2 bits the new value page no Reference: The shift logical left operation is the exact opposite of shift logical right. In this operation the zero bit is inserted from the right and every bit moves one position to its left with the most significant bit dropping into the carry flag. Shift arithmetic left is just another name for shift logical left. Execution of the instruction mov word *ES: 160+, 0x1230 will print the character color will Green page no : 81 White Red Black Refernce:- This is displayed 80 words after the start and there are 80 characters in one screen row. Therefore this is displayed on the first column of the second line. The ASCII code used is 30, which represents a 0 while the attribute MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

255 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR byte is 12 meaning green color on black background. Question No: 1 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments No arguments Question No: 2 ( Marks: 1 ) - Please choose one In STOSB instruction SI is decremented or incremented by Page: 92 Reference:- SI will be Incremented by one or two depending of whether STOSB or STOSW is used. Question No: 3 ( Marks: 1 ) - Please choose one CMPS instruction subtracts the source location to the destination location. Destination location always lies in DS:SI DS:DI ES:SI MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

256 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR ES:DI page no:93 Reference:- CMPS subtracts the source location DS:SI from the destination location ES:DI. Question No: 4 ( Marks: 1 ) - Please choose one Regarding assembler, which statement is true: Assembler converts mnemonics to the corresponding OPCODE Assembler converts OPCODE to the corresponding mnemonics Assembler executes the assembly code all at once Assembler executes the assembly code step by step Question No: 5 ( Marks: 1 ) - Please choose one If BB is the OPCODE of the instruction which states to move a constant value to AX register, the hexadecimal representation (Using little Endian notation) of the instruction Mov AX,336 ( 150 in hexadecimal number system) will be: 0xBB0150 0x5001BB 0x01BB50 0xBB5001 Question No: 6 ( Marks: 1 ) - Please choose one In the instruction MOV AX, 5 the number of operands are 1 2 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

257 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 3 4 Question No: 7 ( Marks: 1 ) - Please choose one The maximum parameters a subroutine can receive (with the help of registers) are 6 7 page no Refernce:- The maximum parameters a subroutine can receive are seven when all the general registers are used. Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx 8 8 return a number called _ address. effective page no 33 faulty MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

258 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR indirect direct Reference:- All the addressing mechanisms in iapx88 return a number called effective address. Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the dividend will be in AX page no 85 BX CX DX Reference:- The implied dividend is 16bit and is stored in the AX register Question No: 11 ( Marks: 1 ) - Please choose one In Left-Shift-Operation the left most bit will drop will go into CF page no:52 Will come to the right most will be always 1 References:- MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

259 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR The shift logical left operation is the exact opposite of shift logical right. In this operation the zero bit is inserted from the right and every bit moves one position to its left with the most significant bit dropping into the carry flag. Question No: 12 ( Marks: 1 ) - Please choose one Suppose the decimal number "35" after shifting its binary two bits to left, the new value becomes page no:52 17 Reference:- The left shifting operation is basically multiplication by 2 while the right shifting operation is division by two. Question No: 14 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication Addition Subtraction not sure MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

260 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Q=1: Which bit of attributes byte represents the blue component of foreground color? Page no 81 0 Blue component of foreground color Q=2: The clear screen operation initializes the whole block of video memory to: Page no 91 For example the clear screen operation initializes this whole block to Q=3: When the operand of DIV instruction is of 16 bit then implied dividend will be of 64-bit 32-bits 16-bits 8--bits Q=4 Which of the following is the pair of register used to access memory in string instruction? DI and BP SI and BP DI and SI DS and Si Page no :91 DI and SI are used to access memory. SI and DI are called source index and destination index because of string instructions. Question No: 16 ( Marks: 1 ) - Please choose MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

261 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR one In STOSB instruction, when DF is clear, SI is 1. Incremented by 1 2. Incremented by 2 3. Decremented by 1 page no:92 4. Decremented by 2 References:- If DF is set SI will be decremented by one or two depending of whether STOSB or STOSW is used. NOTE:- The lecture number given before every mcq below is according to lms lecture schedule not the handouts. Question # 1 There are three busses to communicate the processor and memory named as 1) : address bus.,data bus and data bus. 2) : addressing bus.,data bus and data bus. 3) : address bus.,datamove bus and data bus. 4) : address bus.,data bus and control bus.. Correct Option : 4 From : Lecture 1 Question # 2 The address bus is unidirectional and address always travels from processor to memory. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 1 Question # 3 Data bus is bidirectional because 1) : To way 2) : Data moves from both, processor to memory and memory to processor, 3) : Data moves from both, processor to memory and memory to data Bus, 4) : None of the Given Correct Option : 3 From : Lecture 1 Question # 4 Control bus 1) : is Not Important. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

262 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 2) : is Important. 3) : bidirectional. 4) : unidirectional. Correct Option : 3 From : Lecture 1 Question # 5 A memory cell is an n-bit location to store data, normally also called a byte 1) : 4-bit 2) : 8-bit 3) : 6-bit 4) : 80-bit Correct Option : 2 From : Lecture 1 Question # 6 The number of bits in a cell is called the cell width. define the memory completely. 1) : Cell width and number of cells, 2) : cell number and width of the cells, 3) : width 4) : Height Correct Option : 1 From : Lecture 1 Question # 7 for memory we define two dimensions. The first dimension defines how many bits are there in a single memory cell. 1) : parallel 2) : Vertical 3) : long 4) : short Correct Option : 1 From : Lecture 1 Question # 8 operation requires the same size of data bus and memory cell width. 1) : Normal 2) : Best and simplest 3) : first 4) : None of the Given Correct Option : 2 From : Lecture 1 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

263 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question # 9 Control bus is only the mechanism. The responsibility of sending the appropriate signals on the control bus to the memory is of the. 1) : Data Bus 2) : processor 3) : Address Bus 4) : None of the Given Correct Option : 2 From : Lecture 1 Question # 10 In total: dw 0 Opcode total is a 1) : Literal 2) : Variable 3) : Label 4) : Starting point Correct Option : 3 From : Lecture 10 Question # 14 The basic purpose of a computer is to perform operations, and operations need. 1) : order 2) : nothing 3) : operands 4) : bit Correct Option : 3 From : Lecture 2 Question # 15 Registers are like a scratch pad ram inside the processor and their operation is very much like normal. 1) : Number 2) : opreations 3) : memory cells 4) : None of the Given Correct Option : 3 From : Lecture 2 Question # 16 There is a central register in every processor called the and The word size of a processor is defined by the width of its. 1) : accumulator,accumulator 2) : data bus,accumulator MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

264 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 3) : accumulator, Address Bus 4) : accumulator,memory Correct Option : 1 From : Lecture 2 Question # 17 does not hold data but holds the address of data 1) : Pointer, Segment, or Base Register 2) : Pointer, Index, or Base Register 3) : General Registers 4) : Instruction Pointer Correct Option : 2 From : Lecture 2 Question # 18 The program counter holds the address of the next instruction to be 1) : executed. 2) : called 3) : deleted 4) : copy Correct Option : 1 From : Lecture 2 Question # 19 There are types of instruction groups 1) : 4 2) : 5 3) : 3 4) : 2 Correct Option : 1 From : Lecture 2 Question # 20 These instructions are used to move data from one place to another. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 2 Question # 21 mov instruction is related to the *****. 1) : Arithmetic and Logic Instructions 2) : Data Movement Instructions MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

265 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 3) : Program Control Instructions 4) : Special Instructions Correct Option : 2 From : Lecture 2 Question # 22 allow changing specific processor behaviors and are used to play with it. 1) : Special Instructions 2) : Data Movement Instructions 3) : Program Control Instructions 4) : Arithmetic and Logic Instructions Correct Option : 1 From : Lecture 2 Question # is a 16bit processor with its accumulator and all registers of. 1) : 32 bits 2) : 6 bits 3) : 16 bits 4) : 64 bits Correct Option : 3 From : Lecture 2 Question # 24 The of a processor means the organization and functionalities of the registers it contains and the instructions that are valid on the processor. 1) : Manufactures 2) : architecture 3) : Deal 4) : None of the Given Correct Option : 2 From : Lecture 2 Question # 25 Intel IAPX88 Architecture is 1) : More then 25 old 2) : New 3) : Not Good 4) : None of the Given Correct Option : 1 From : Lecture 2 Question # 26 The iapx88 architecture consists of registers. 1) : 13 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

266 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 2) : 12 3) : 9 4) : 14 Correct Option : 4 From : Lecture 3 Question # 27 General Registers are 1) : AX, BX, CX, and DX 2) : XA, BX, CX, and DX 3) : SS,SI and DI 4) : 3 Correct Option : 1 From : Lecture 3 Question # 28 AX means we are referring to the extended 16bit A register. Its upper and lower byte are separately accessible as. 1) : AH and AL 2) : A Lower and A Upper 3) : AL, AU 4) : AX Correct Option : 1 From : Lecture 3 Question # 29 AX is General purpose Register where A stands for. 1) : Acadmic 2) : Ado 3) : Architecture 4) : Accumulator Correct Option : 4 From : Lecture 3 Question # 30 The B of BX stands for because of its role in memory addressing. 1) : Busy 2) : Base 3) : Better 4) : None of the Given Correct Option : 2 From : Lecture 3 Question # 31 The D of DX stands for Destination as it acts as the destination in. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

267 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 1) : I/O operations 2) : operations 3) : memory cells 4) : Memory I/O operations Correct Option : 1 From : Lecture 3 Question # 32 The C of CX stands for Counter as there are certain instructions that work with an automatic count in the. 1) : DI register 2) : BX register 3) : CX register 4) : DX register Correct Option : 3 From : Lecture 3 Question # 33 are the index registers of the Intel architecture which hold address of data and used in memory access. 1) : SI and SS 2) : PI and DI 3) : SI and IP 4) : SI and DI Correct Option : 4 From : Lecture 3 Question # 34 In Intel IAPX88 architecture is the special register containing the address of the next instruction to be executed. 1) : AX 2) : PI 3) : IP 4) : SI Correct Option : 3 From : Lecture 3 Question # 35 SP is a memory pointer and is used indirectly by a set of. 1) : instructions 2) : Pointers 3) : Indexes 4) : Variables Correct Option : 1 From : Lecture 3 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

268 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question # 36 is also a memory pointer containing the address in a special area of memory called the stack. 1) : SP 2) : BP 3) : PB 4) : AC Correct Option : 2 From : Lecture 3 Question # 37 is bit wise significant and accordingly each bit is named separately. 1) : AX 2) : FS 3) : IP 4) : Flags Register Correct Option : 4 From : Lecture 3 Question # 38 When two 16bit numbers are added the answer can be 17 bits long, this extra bit that won t fit in the target register is placed in the where it can be used and tested 1) : carry flag 2) : Parity Flag 3) : Auxiliary Carry 4) : Zero Flag Correct Option : 1 From : Lecture 3 Question # 39 Program is an ordered set of instructions for the processor. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 3 Question # 40 For Intel Architecture operation destination, source is way of writing things. 1) : TRUE 2) : FALSE 3) : MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

269 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 4) : Correct Option : 1 From : Lecture 3 Question # 41 Operation code add ax, bx. 1) : Add the bx to ax and change the bx 2) : Add the ax to bx and change the ax 3) : Add the bx to ax and change the ax 4) : Add the bx to ax and change nothing Correct Option : 3 From : Lecture 3 Question # 42 The maximum memory iapx88 can access is. 1) : 1MB 2) : 2MB 3) : 3MB 4) : 128MB Correct Option : 1 From : Lecture 4 Question # 43 The maximum memory iapx88 can access is 1MB which can be accessed with. 1) : 18 bits 2) : 20 bits 3) : 16 bits 4) : 2 bits Correct Option : 2 From : Lecture 4 Question # 44 address of 1DED0 where the opcode B80500 is placed. 1) : physical memory 2) : memory 3) : efective 4) : None of the Given Correct Option : 1 From : Lecture 4 Question # bit of Segment and Offset Addresses can be converted to 20bit Address i.e Segment Address with lower four bits zero + Offset Address with four bits zero = 20bit Physical Address 1) : Middle MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

270 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 2) : lower 3) : Top 4) : upper Correct Option : 4 From : Lecture 4 Question # 46 When adding two 20bit Addresses a carry if generated is dropped without being stored anywhere and the phenomenon is called address. 1) : wraparound 2) : mode 3) : ping 4) : error Correct Option : 1 From : Lecture 4 Question # 47 segments can only be defined a 16byte boundaries called boundaries. 1) : segment 2) : paragraph 3) : Cell 4) : RAM Correct Option : 1 From : Lecture 4 Question # 48 in a Program CS, DS, SS, and ES all had the same value in them. This is called. 1) : equel memory 2) : overlapping segments 3) : segments hidding 4) : overlapping SI Correct Option : 2 From : Lecture 4 Question # 49 db num1 size of the memory is 1) : 1byte 2) : 4bit 3) : 16bit 4) : 2byte Correct Option : 1 From : Lecture 5 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

271 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Comments for the 4 are : 1) : No comments Will be 2) : ; accumulate sum in add 3) : ; accumulate sum in ax 4) : ; accumulate sum in Bx Correct Option : 3 From : Lecture 5 Question # 51 In mov ax, bx is Addressing Modes. 1) : Immediate 2) : Indirect 3) : Direct 4) : Register Correct Option : 4 From : Lecture 5 Question # 52 In mov ax, [bx] is Addressing Modes 1) : Based Register Indirect 2) : Indirect 3) : Base Indirect 4) : Immediate Correct Option : 1 From : Lecture 5 Question # 53 In mov ax, 5 is Addressing Modes 1) : Immediate 2) : Indirect 3) : Indirect 4) : Register Correct Option : 1 From : Lecture 6 Question # 54 In mov ax, [num1+bx] is ADDRESSING 1) : OFFSET+ Indirect 2) : Register + Direct 3) : Indirect + Reference 4) : BASEd REGISTER + OFFSET Correct Option : 4 From : Lecture 7 Question # 55 base + offset addressing gives This number which came as the result of MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

272 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR addition is called the. 1) : Address 2) : mode 3) : effective address 4) : Physical Address Correct Option : Question # 56 mov ax, [cs:bx] associates for this one instruction 1) : CS with BX 2) : BX with CS 3) : BX with AX 4) : None of the Given Correct Option : 2 From : Lecture 7 Question # 57 For example BX=0100 DS=FFF0 And Opcode are; move [bx+0x0100], Ax now what is the effective memory address; 1) : ) : ) : ) : 0x02 Correct Option : 2 From : Lecture 7 Question # 58 For example BX=0100 DS=FFF0 And Opcode are; move [bx+0x0100], Ax now what is the physical memory address; 1) : ) : 0x0100 3) : 0x ) : 0x Correct Option : 2 From : Lecture 7 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

273 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question # 59 In mov [1234], al is Addressing Modes. 1) : Immediate 2) : Indirect 3) : Direct 4) : Register Correct Option : 3 From : Lecture 8 Question # 60 In mov [SI], AX is Addressing Modes. 1) : Basef Register Indirect 2) : Indirect 3) : Indexed Register Indirect 4) : Immediate Correct Option : 3 From : Lecture 8 Question # 61 In mov ax, [bx - Si] is ADDRESSING 1) : Basef Register Indirect 2) : Indirect 3) : Direct 4) : illegal Correct Option : 4 From : Lecture 8 Question # 62 In mov ax, [BL] there is error i.e. 1) : Address must be 16bit 2) : Address must be 8bit 3) : Address must be 4bit 4) : 8 bit to 16 bit move illegal Correct Option : 4 From : Lecture 8 Question # 63 In mov ax, [SI+DI] there is error i.e. 1) : Two indexes can t use as Memory Address 2) : index can t use as Memory Address 3) : I don't Know 4) : None of the Given Correct Option : 1 From : Lecture 8 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

274 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question # 24 The of a processor means the organization and functionalities of the registers it contains and the instructions that are valid on the processor. 1) : Manufactures 2) : architecture 3) : Deal 4) : None of the Given Correct Option : 2 From : Lecture 2 Question # 25 Intel IAPX88 Architecture is 1) : More then 25 old 2) : New 3) : Not Good 4) : None of the Given Correct Option : 1 From : Lecture 2 Question # 26 The iapx88 architecture consists of registers. 1) : 13 2) : 12 3) : 9 4) : 14 Correct Option : 4 From : Lectur Question # 27 General Registers are 1) : AX, BX, CX, and DX 2) : XA, BX, CX, and DX 3) : SS,SI and DI 4) : 3 Correct Option : 1 From : Lecture 3 Question # 28 AX means we are referring to the extended 16bit A register. Its upper and lower byte are separately accessible as. 1) : AH and AL 2) : A Lower and A Upper 3) : AL, AU 4) : AX Correct Option : 1 From : Lecture 3 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

275 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question # 29 AX is General purpose Register where A stands for. 1) : Acadmic 2) : Ado 3) : Architecture 4) : Accumulator Correct Option : 4 From : Lecture 3 Question # 30 The B of BX stands for because of its role in memory addressing. 1) : Busy 2) : Base 3) : Better 4) : None of the Given Correct Option : 2 From : Lecture 3 Question # 31 The D of DX stands for Destination as it acts as the destination in. 1) : I/O operations 2) : operations 3) : memory cells 4) : Memory I/O operations Correct Option : 1 From : Lecture 3 Question # 32 The C of CX stands for Counter as there are certain instructions that work with an automatic count in the. 1) : DI register 2) : BX register 3) : CX register 4) : DX register Correct Option : 3 From : Lecture 3 Question # 33 are the index registers of the Intel architecture which hold address of data and used in memory access. 1) : SI and SS 2) : PI and DI 3) : SI and IP 4) : SI and DI MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

276 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Correct Option : 4 From : Lecture 3 Question # 34 In Intel IAPX88 architecture is the special register containing the address of the next instruction to be executed. 1) : AX 2) : PI 3) : IP 4) : SI Correct Option : 3 From : Lecture 3 Question # 35 SP is a memory pointer and is used indirectly by a set of. 1) : instructions 2) : Pointers 3) : Indexes 4) : Variables Correct Option : 1 From : Lecture 3 Question # 36 is also a memory pointer containing the address in a special area of memory called the stack. 1) : SP 2) : BP 3) : PB 4) : AC Correct Option : 2 From : Lecture 3 Question # 37 is bit wise significant and accordingly each bit is named separately. 1) : AX 2) : FS 3) : IP 4) : Flags Register Correct Option : 4 From : Lecture 3 Question # 38 When two 16bit numbers are added the answer can be 17 bits long, this extra bit that won t fit in the target register is placed in the where it can be used and tested 1) : carry flag MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

277 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR 2) : Parity Flag 3) : Auxiliary Carry 4) : Zero Flag Correct Option : 1 From : Lecture 3 Question # 39 Program is an ordered set of instructions for the processor. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 3 Question # 40 For Intel Architecture operation destination, source is way of writing things. 1) : TRUE 2) : FALSE 3) : 4) : Correct Option : 1 From : Lecture 3 Question # 41 Operation code add ax, bx. 1) : Add the bx to ax and change the bx 2) : Add the ax to bx and change the ax 3) : Add the bx to ax and change the ax 4) : Add the bx to ax and change nothing Correct Option : 3 From : Lecture 3 Question # 42 The maximum memory iapx88 can access is. 1) : 1MB 2) : 2MB 3) : 3MB 4) : 128MB Correct Option : 1 From : Lecture 4 Question # 43 The maximum memory iapx88 can access is 1MB which can be accessed with. 1) : 18 bits 2) : 20 bits 3) : 16 bits 4) : 2 bits MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

278 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Correct Option : 2 From : Lecture 4 Question # 44 address of 1DED0 where the opcode B80500 is placed. 1) : physical memory 2) : memory 3) : efective 4) : None of the Given Correct Option : 1 From : Lecture 4 Question # bit of Segment and Offset Addresses can be converted to 20bit Address i.e Segment Address with lower four bits zero + Offset Address with four bits zero = 20bit Physical Address 1) : Middle 2) : lower 3) : Top 4) : upper Correct Option : 4 From : Lecture 4 Question # 46 When adding two 20bit Addresses a carry if generated is dropped without being stored anywhere and the phenomenon is called address. 1) : wraparound 2) : mode 3) : ping 4) : error Correct Option : 1 From : Lecture 4 Question # 47 segments can only be defined a 16byte boundaries called boundaries. 1) : segment 2) : paragraph 3) : Cell 4) : RAM Correct Option : 1 From : Lecture 4 Question # 48 in a Program CS, DS, SS, and ES all had the same value in them. This MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

279 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR is called. 1) : equel memory 2) : overlapping segments 3) : segments hidding 4) : overlapping SI Correct Option : 2 From : Lecture 4 One screen location corresponds to a Byte Word ref page no: 80 Double byte Double word Reference:- One screen location corresponds to a word in the video memory After the execution of PUSH AX statement AX register will reside on the stack A copy of AX will go on the stack The value of AX disappear after moving on stack Stack will send an acceptance message physical address of the stack is obtained by SS:SI combination SS:SP combination ES:BP combination ES:SP combination If the address of memory location Num1 is 0117 and its content is 0005 then after MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

280 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR execution of the instruction mov bx, Num1 bx will contain Num In STOS instruction, the implied source will always be in AL or AX registers page no :92 DL or DX registers BL or BX registers CL or CX registers Reference: The implied source will always be in AL or AX. The shift logical right operation inserts A zero at right A zero at left page no:52 A one at right A one at right Reference:- The shift logical right operation inserts a zero from the left REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 page no :92 Decrement CX by 2 Reference:- REP will always decrement CX like the LOOP instruction and this cannot be changed with the direction flag. When an item is pushed on the decrementing stack, the top of the stack is MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

281 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR First decremented and then element copied on to the stack First incremented and then element copied on to the stack Decremented after the element copied on to the stack page no :68 Incremented after the element copied on to the stack Reference:- When an item is pushed on a decrementing stack, the top of the stack is first decremented and the element is then copied into this space. Assembly the CX register is used normally as a register. source counter index pointer Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus I only II only III only I and II only The basic function of SCAS instruction is to Compare page no:92 Scan Sort Move data Reference:- SCAS compares a source byte or word in register AL or AX with the destination string element addressed by ES:DI and updates the flags. register holds the address of next instruction is to be executed Base pointer Code segment Source index Program counter MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

282 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR JC and JNC test the flag. carry parity zero sign Page no 41 This jump is taken if the last arithmetic operation generated a carry or required a borrow. After a CMP it is taken if the unsigned source is smaller than the unsigned destination. After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected page no:92 Reference:- REP will always decrement CX like the LOOP instruction and this cannot be changed with the direction flag. In string manipulation whenever an instruction needs a memory source, which of the following will hold the pointer to it? ES: DI ES: BP DS:BP DS:SI page no 91 Refernce:- MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

283 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR SI and DI are called source index and destination index because of string instructions. Whenever an instruction needs a memory source, DS:SI holds the pointer to it. An override is possible that can change the association from DS but the default is DS. Whenever a string instruction needs a memory destination, ES:DI holds the pointer to it. Which bit sets the character "blinking" on the screen? page no 81 8 Reference:- When bit 7 is set the character keeps on blinking on the screen. If we want to divide a signed number by 2, this operation can better be accomplished by SHR SAR SHL SAL Refernce:- However for signed numbers division by two can be accomplished by using shift arithmetic right and not shift logical right. After the execution of STOSWB,the CX wil be.. Incremented by 1 Incremented by 2 Decremented by 1 page no :92 Decremented by 2 Refernce:- It always decrements by one MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

284 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Each screen location corresponds to a word; the lower byte of this word contains The character code not sure The attribute byte The parameters The dimensions In a video memory, each screen location corresponds to One byte Two bytes Four bytes Eight bytes Reference:- DI is incremented twice since each screen location corresponds to two byte in video memory. :-SUBJECTIVE-: IF DF=0 what its represent and IF DF=1 what its represent? Page no:17 Specifically related to string instructions, this flag tells whether the current operation has to be done from bottom to top of the block (D=0) or from top to bottom of the block (D=1). IF=It tells whether the processor can be interrupted from outside or not. Q. Relation between RET and CALL is dependent or independent. Page no :64 The RET works regardless of the CALL and the CALL works regardless of the RET. If you CALL a subroutine it will not complain if there is no RET present and similarly if you RET without being called it won t complain. Q. Write all steps of algorithm for printing number 352. Page no 84 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

285 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR For example 253 will be printed as 352. The remainder after first division was 3, after second division was 5 and after the third division was 2. We have to somehow correct the order so that the actual number 253 is displayed, and the trick is to use the stack since the stack is a Last In First Out structure so if 3, 5, and 2 are pushed on it, 2, 5, and 3 will come out in this order. The steps of our algorithm are outlined below. Divide the number by base (10 in case of decimal) The remainder is its right most digit Convert the digit to its ASCII representation (Add 0x30 to the remainder in case of decimal) Save this digit on stack If the quotient is non-zero repeat the whole process to get the next digit, otherwise stop Pop digits one by one and print on screen left to right Q. When the instruction "push ax" is executed in decrementing stack how the value of SP will change Page no 69 Push ax will push the current value of the AX register on the stack. The operation of PUSH is shown below. SP _ SP 2 [SP] _ AX Q. Explain MUL instruction in both cases (i) if the source operand is byte (ii) if the source operand is a word? Page no 87 MUL (multiply) performs an unsigned multiplication of the source operand and the accumulator. If the source operand is a byte, then it is multiplied by MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

286 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR register AL and the double-length result is returned in AH and AL. If the source operand is a word, then it is multiplied by register AX, and the double-length result is returned in registers DX and AX. Q#21 Mark 2 What are the instructions used by assembly language for permanent and temporary diversions. The instructions for permanent diversion in 8088 are the jump instructions, while the instruction for temporary diversion is the CALL instruction. Q#22 Mark 2 Which instruction is used to determine zero bit in string. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

287 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Q#23 Mark 3 Explain the use of TEST instruction. Page no: 60 The test instruction is used for bit testing. BX holds the mask and in every next iteration it is shifting left, as our concerned bit is now the next bit. Q#24 Mark 3 Explain LES and LDS Page no: 97 The string instructions need source and destination in the form of a segment offset pair. LES and LDS load a segment register and a general purpose register from two consecutive memory locations. LES loads ES while LDS loads DS. Both instructions has two parameters, one is the general purpose register to be loaded and the other is the memory location from which to load these registers. The major application of these instructions is when a subroutine receives a segment offset pair as an argument and the pair is to be loaded in a segment and an offset register. Q#25 Mark 5 Describe local variables. Page no: 75 Another important role of the stack is in the creation of local variables that are only needed while the subroutine is in execution and not afterwards. They should not take permanent space like global variables. Local variables should be created when the subroutine is called and discarded afterwards. So that the spaced used by them can be reused for the local variables of another subroutine. They only have meaning inside the subroutine and no meaning outside it. The most convenient place to store these variables is the stack. We need some special manipulation of the stack for this task. We need to produce a gap in the stack for our variables. This is explained with the help of the swap flag in the bubble sort example. The swap flag we have declared as a word occupying space permanently is only needed by the bubble sort subroutine and should be a local variable. Actually the variable was introduced with the intent of making it a local variable at this time. The stack pointer will be decremented by an extra two bytes thereby producing a gap in which a word can reside. This gap will be used for our temporary, local, or automatic variable; however we name it. We can decrement it as much as we want producing the desired space, MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

288 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR however the decrement must be by an even number, as the unit of stack operation is a word. In our case we needed just one word. Also the most convenient position for this gap is immediately after saving the value of SP in BP. So that the same base pointer can be used to access the local variables as well; this time using negative offsets. The standard way to start a subroutine which needs to access parameters and has local variables is as under. push bp mov bp, sp sub sp, 2 The gap could have been created with a dummy push, but the subtraction makes it clear that the value pushed is not important and the gap will be used for our local variable. Also gap of any size can be created in a single instruction with subtraction. The parameters can still be accessed at bp+4 and bp+6 and the swapflag can be accessed at bp-2. The subtraction in SP was after taking the snapshot; therefore BP is above the parameters but below the local variables. The parameters are therefore accessed using positive offsets from BP and the local variables are accessed using negative offsets. Q#26 Mark 5 Describe MOVS and CMPS instructions Question No: 17 ( Marks: 2 ) Why is it necessary to provide the segment and offset address in case of FAR jump? Page no 46: Segment and offset must be given to a far jump. Because, sometimes we may need to go from one code segment to another, and near and short jumps cannot take us there. Far jump must be used and a two byte segment and a two byte offset are given to it. It loads CS with the segment part and IP with the offset part. Question No: 18 ( Marks: 2 ) What s your understanding about Incrementing and Decrementing Stack? MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

289 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Page no 68: Whenever an element is pushed on the stack SP is decremented by two and whenever an element is popped on the stack SP is incremented by two. A decrementing stack moves from higher addresses to lower addresses as elements are added in it while an incrementing stack moves from lower addresses to higher addresses as elements are added. As the 8088 stack works on word sized elements. Single bytes cannot be pushed or popped from the stack. Question No: 19 ( Marks: 2 ) Number2: IF DF=0 what its represent and IF DF=1 what its represent? Page no: 17 and Page no: 91 The direction of movement is controlled with the Direction Flag (DF) in the flags register. If this flag is cleared DF=0, the direction is from lower addresses towards higher addresses and if this flag is set DF=1, the direction is from higher addresses to lower addresses. If DF is cleared, DF = 0 this is called the auto increment mode of string instruction, and if DF is set, DF=1, this is called the auto decrement mode. There are two instructions to set and clear the direction flag. Question No: 20 ( Marks: 3 ) What is the Difference between CALL and RET Page no: 64 The CALL instruction allows temporary diversion and therefore reusability of code. The word return holds in its meaning that we are to return from where we came and need no explicit destination. Therefore RET takes no arguments and transfers control back to the instruction following the CALL that took us in this subroutine. Question No: 21 ( Marks: 3 ) Tell the Formula to scroll up the screen Page no :99 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

290 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR rep movsw scroll up scrollup: push bp mov bp,sp push ax push cx push si push di push es push ds mov ax, 80 ; load chars per row in ax mul byte [bp+4] ; calculate source position mov si, ax ; load source position in si push si ; save position for later use shl si, 1 ; convert to byte offset mov cx, 2000 ; number of screen locations sub cx, ax ; count of words to move mov ax, 0xb800 mov es, ax ; point es to video base mov ds, ax ; point ds to video base xor di, di ; point di to top left column cld ; set auto increment mode rep movsw ; scroll up mov ax, 0x0720 ; space in normal attribute pop cx ; count of positions to clear rep stosw ; clear the scrolled space pop ds pop es pop di pop si pop cx pop ax pop bp ret 2 Question No: 22 ( Marks: 5 ) Explain how extended shifting is performed Page no :56 Using our basic shifting and rotation instructions we can effectively shift a 32bit number in memory word by word. We cannot shift the whole number at once since MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

291 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR our architecture is limited to word operations. The algorithm we use consists of just two instructions and we name it extended shifting. num1: dd shl word [num1], 1 rcl word [num1+2], 1 The DD directive reserves a 32bit space in memory; however the value we placed there will fit in 16bits. So we can safely shift the number left 16 times. The least significant word is accessible at num1 and the most significant word is accessible at num1+2. The two instructions are carefully crafted such that the first one shifts the lower word towards the left and the most significant bit of that word is dropped in carry. With the next instruction we push that dropped bit into the least significant bit of the next word effectively joining the two 16bit words. The final carry after the second instruction will be the most significant bit of the higher word, which for this number will always be zero. Question No: 23 ( Marks: 5 ) Write a subroutine to calculate the string length. Page :97 subroutine to calculate the length of a string ; takes the segment and offset of a string as parameters strlen: push bp mov bp,sp push es push cx push di les di, [bp+4] ; point es:di to string mov cx, 0xffff ; load maximum number in cx xor al, al ; load a zero in al repne scasb ; find zero in the string mov ax, 0xffff ; load maximum number in ax sub ax, cx ; find change in cx dec ax ; exclude null from length pop di pop cx pop es pop bp ret 4 MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

292 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question No: 17 ( Marks: 1 ) Write any two control instructions. Page no :14 Examples are: cmp ax, 0 jne 1234 We are changing the program flow to the instruction at 1234 address if the condition that we checked becomes true Question No: 18 ( Marks: 1 ) RET instruction take how many arguments Page no 64 The RET instruction is used for this purpose. The word return holds in its meaning that we are to return from where we came and need no explicit destination. Therefore RET takes no arguments and transfers control back to the instruction following the CALL that took us in this subroutine Question No: 19 ( Marks: 2 ) Explain the fuction of rotate right (ROR) instruction Page no 53 Rotate Right (ROR) In the rotate right operation every bit moves one position to the right and the bit dropped from the right is inserted at the left. This bit is also copied into the carry flag. The operation can be understood by imagining that the pipe used for shifting has been molded such that both ends coincide. Now when the first ball is forced to move forward, every ball moves one step forward with the last ball entering the pipe from its other end occupying the first ball s old position. The carry basket takes a snapshot of this ball leaving one end of the pipe and entering from the other. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

293 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question No: 20 ( Marks: 2 ) Describe the PUSH function Page no 71 PUSH PUSH decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack now pointed to by SP. PUSH often is used to place parameters on the stack before calling a procedure; more generally, it is the basic means of storing temporary data on the stack. Question No: 21 ( Marks: 3 ) Write down the names of four segment registers? Page no: 17 SS ES DS CS Question No: 22 ( Marks: 3 ) For what purpose "INT 4" is reserved? Page no 106 INT 4, Arithmetic Overflow, change of sign bit Question No: 23 ( Marks: 5 ) Calculate physical address. CS=1E0F---segment IP= offset By converting into 20 bits we have 1E0F Physical address= 1E0F = =123229=1E15D MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

294 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR Question No: 17 ( Marks: 2 ) What is difference between SHR and SAR instructions? Page no 52 SHR The SHR inserts a zero from the left and moves every bit one position to the right and copy the rightmost bit in the carry flag. SAR The SAR shift every bit one place to the right with a copy of the most significant bit left at the most significant place. The bit dropped from the right is caught in the carry basket. The sign bit is retained in this operation. Question No: 18 ( Marks: 2 ) For what purpose "INT 1" is reserved? Page no 103 INT 1, Trap, Single step Interrupt This interrupt is used in debugging with the trap flag. If the trap flag is set the Single Step Interrupt is generated after every instruction. By hooking this interrupt a debugger can get control after every instruction and display the registers etc was the first processor that has this ability to support debugging. Question No: 19 ( Marks: 2 ) Define implied operand? Page no 18 It is always in a particular register say the accumulator. It needs to not be mentioned in the instruction. 1. Explain the fuction of rotate right (ROR) instruction The rotate right (ROR) and rotate through carry right (RCR) instructions shift all the bits toward less significant bit positions, except for the least-significant bit, which is rotated MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

295 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR to the most-significant bit location 2. Why REP prefix is generally not used with LODS instruction? The lods instruction is unique among the string instructions. We will never use a repeat prefix with this instruction. Because it copies the byte or word pointed at by ds:si into the al, ax, or eax register, after which it increments or decrements the si register by one, two, or four. Repeating this instruction via the repeat prefix would serve no purpose whatsoever since the accumulator register will be overwritten each time the lods instruction repeats. At the end of the repeat operation, the accumulator will contain the last value read from memory. 3. Write all steps of algorithm for printing number 352. In this technique the first digit printed is the right most one Divide the number by base (10 in case of decimal)..the remainder after first division was 3, after second division was 5 and after the third division was 2. The remainder is its right most digit Convert the digit to its ASCII representation Save this digit on stack If the quotient is non-zero repeat the whole process to get the next digit, otherwise stop. Pop digits one by one and print on screen left to right. Stack is a Last In First Out structure so if 3, 5, and 2 are pushed on it, 2, 5, and 3 will come out in this order. 24. What are the result after performing the instruction (each carry 1 marks ) 1. and ax,bx 2. or ax,bx 3. xor ax,bx Given that ax = and bx = Describe Local Variables? A local variable is valid within the statement block in which it is defined and within any nested statement blocks, unless you redefine the variable within the statement block. Local variables should be created when the subroutine is called and discarded MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

296 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR afterwards. So that the spaced used by them can be reused for the local variables of another subroutine. They only have meaning inside the subroutine and no meaning outside it. It is important role of the stack to create local variables that are only needed while the subroutine is in execution and not afterwards. They should not take permanent space like global variables. The most convenient place to store these variables is the stack. We need some special manipulation of the stack for this task. We need to produce a gap in the stack for our variables. Are valid only for the duration of the SPL routine Are reset to their initial values or to a value the user passes to the routine, each time the routine is executed Cannot have default values 26. Explain the complete operation of Interrupt when it is generated. Interrupt is the result of an INT instruction (software interrupt) or it is generated by an external hardware which passes the interrupt number by a different mechanism. The currently executing instruction is completed, the current value of FLAGS is pushed on the stack, then the current code segment is pushed, then the offset of the next instruction is pushed. After this it automatically clears the trap flag and the interrupt flag to disallow further interrupts until the current routine finishes. After this it loads the word at nx4 in IP and the word at nx4+2 in CS if interrupt n was generated. As soon as these values are loaded in CS and IP execution goes to the start of the interrupt handler. When the handler finishes its work it uses the IRET instruction to return to the caller. IRET pops IP, then CS, and then FLAGS. The original value of IF and TF is restored which re-enables further interrupts LES and LDS Instructions As Mention in the lecture that the string instructions need their source and destination in the form of a segment offset pair, there are two special instructions that load a segment register and a general purpose register from two consecutive memory locations. LES loads ES while LDS loads DS. These instructions have two parameters, one is the general purpose register to be loaded and the other is the memory location from which to load these registers. According to Intel rules of significance the word at higher address is loaded in the segment register while the word at lower address is loaded in the offset register. As parameters segment should be pushed first so that it ends up at a higher address and the offset should be pushed afterwards. When loading the lower address will be given. Big-endian and little-endian MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

297 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR are terms that describe the order in which a sequence of bytes are stored in computer memory. Big-endian is an order in which the "big end" (most significant value in the sequence) is stored first (at the lowest storage address). Littleendian is an order in which the "little end" (least significant value in the sequence) is stored first. For example, in a big-endian computer, the two bytes required for the hexadecimal number 4F52 would be stored as 4F52 in storage (if 4F is stored at storage address 1000, for example, 52 will be at address 1001). In a little-endian system, it would be stored as 524F (52 at address 1000, 4F at 1001). IBM's 370 computers, most RISC-based computers, and Motorola microprocessors use the big-endian approach.on the other hand, Intel processors (CPUs) and DEC Alphas and at least some programs that run on them are little-endian. Mnemonic A word, abbreviation, or acronym that replaces something too complex to remember or type easily. For example, ADC is the mnemonic for the 8086 s add-with-carry instruction. The assembler converts it into machine (binary) code, so it is not necessary to remember or calculate the binary form. Op-Code: An op-code (operation code) is the portion of a machine language instruction that specifies the operation to be performed. For every specific operation like add subtract or multiplication there is an op-code which processor understands. Like add we have 152 and subtract 153. Program Counter/ Instruction Pointer: A Program is an ordered set of instructions. Instruction executes one after the other. Program Counter / Instruction Pointer ensure that instructions are working in order also Program counter/instruction Pointer holds the address of the next instruction to be executed. Control Bus: It s the part of computer Bus. CPU communicates with other devices within the computer through control bus. Through control bus CPU assign different jobs to other parts (registers, memory, input output) to perform some functionality on data. For Example Read data from memor Write data on memory Move data in register. Control Lines: As CPU have to perform more than one control operations so control bus consist of more than one lines called control lines. The number and type of lines in a control bus varies but there are basic lines common to all microprocessors, Read Write Offset A distance from a given paragraph boundary in memory. The offset usually is given as a number of bytes. Segment Registers: In certain processors memory is segmented (or divided).its actually not physically segmented rather logically to store code, data, stack etc in different portions of memory. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

298 04 May 2012 EXAMINATION CS401- All Mcqz and Subjective Solved With Reference -:: SOLVED BY:SaHeR So there should be some way to specify the starting address of each such segment. That s way registers are used called segment registers. There are four types of these registers CS: Code Segment DS: Data Segment SS: Stack Segment ES: Extra Segment CS contains the segment of the current instruction (IP is the offset). DS is the segment used by default for most data operations or most memory references come from data segment. SS contains the stack segment (SP is the offset). ES as name shows extra segment register. String instructions(movs,stos) also use this register. Logical Address and Physical Address: The segment, offset pair is called a logical address, while the 20bit address is a physical address which is the real thing. Logical addressing is a mechanism to access the physical memory. Offset: A distance from a given paragraph boundary in memory. The offset usually is given as a number of bytes Word is unit of data, like (bit -1, nibble -4, byte-8, word-16, Dword-32, Qword-64) A word is of 2 bytes = 16bits Dword = 4 bytes Qword= 8 bytes Registers are like Scratch Pad Ram.What are the meaning of scratch pad ram. Scratchpad means a high-speed internal memory used for temporary storage of preliminary information. An 8-bit register, like AH, AL, BH, BL, can only store one data element at a time. And a 16-bit register can store multiple data element e.g. one in AH and other in AL. MIDTERM EXAMINATION CS401- Computer Architecture and Assembly Language Programming All Mcqz and Subjective Solved With Reference SOLVED BY: SaHeR For any help in studies contact my id Serious.sahar6@gmail.com

299 CS401 Assembly Language Solved MCQS From Midterm Papers May 02,2011 MC PSMD01(IEMS) Question No:1 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 (Page 19) 0x1000 0x0000 MIDTERM FALL 2011 CS401 Assembly Language Question No:2 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be Black (Page 81) White Red Blue Question No:3 ( Marks: 1 ) - Please choose one The iapx888 architecture consists of register (Page 15) 18 Question No:4 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES: 0], 0x0741 will print A on the screen, color of the character will be Black White (Page 81) Red Blue

300 Question No:5 ( Marks: 1 ) - Please choose one One screen location corresponds to a Byte Word (Page 80) Double byte Double word Question No:6 ( Marks: 1 ) - Please choose one When an item is pushed on the decrementing stack, the top of the stack is First decremented and then element copied on to the stack (Page 68) First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack Question No:7 ( Marks: 1 ) - Please choose one Each screen location corresponds to a word, the lower byte of this word contains The character code (Page 81) The attribute byte The parameters The dimensions Question No:8 ( Marks: 1 ) - Please choose one if ax contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX,JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken (rr) Question No:9 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value

301 Question No:10 ( Marks: 1 ) - Please choose one When two 16bit numbers are added the answer can be 17 bits long, this extra bit that won t fit in the target register is placed in the where it can be used and tested carry flag (Page 16) Parity Flag Auxiliary Carry Zero Flag Question No: 11 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string (Page 29) word indirect stack Question No:12 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the quotient will be in AL (Page 85) AX AH DX Question No:13 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? (Page 81) Question No:14 ( Marks: 1 ) - Please choose one C is a example of Shl sar Shr (Page 52) Sal Question No:15 ( Marks: 1 ) - Please choose one allow changing specific processor behaviors and are used to play with it. Special Instructions (Page 14) Data Movement Instructions Program Control Instructions Arithmetic and Logic Instructions

302 Question No:16 ( Marks: 1 ) - Please choose one 8088 is a 16bit processor with its accumulator and all registers of. 32 bits 6 bits 16 bits (Page 14) 64 bits Question No:17 ( Marks: 1 ) - Please choose one decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack PUSH (Page 71) POP CALL RET MIDTERM 2011 CS401 Assembly Language 1. In instruction ADC the operands can be o Two register only o Two register and one memory location o CF and two other operands (Page 57) o ZF and two other operands 2. After the execution of instruction RET o SP is incremented by 2 (Page 66) o SP is decremented by 2 o SP is incremented by 1 o SP is decremented by 1 3. The extended ASCII has o 64 characters o 128 characters (Page 79) o 256 characters o 502 characters

303 4. The second byte in the word designated for screen location holds o The dimension of the screen o Character position on the screen o Character color on the screen (Page 81) o ACSII code of the character 5. REP will always o Incremented CX by 1 o Incremented CX by 2 o Decremented CX by 1 (Page 92) o Decremented CX by 2 6. The routine that executes in response to an INT instruction is called o ISR (Page 103) o IRS o ISP o IRT 7. The iapx888 architecture consists of register. o 12 o 14 o 16 (Page 15) Rep o In the instruction CMP AX,BX the contents of o AX are changed o BX are changed o CX are changed o Flag register are changed (Page 39) 9. All the addressing mechanisms iniapx88 return a number called address. o Effective (Page 33) o faulty o indirect o direct 10. The execution of the instruction mov word [ES: DI], 0x0720 o will clear next character on screen (Page 82) o will print 20 at top left of the screen o will print 20 at top right of the screen o will move DI at location 0720 on the screen

304 11. mov byte [num1],5 is instruction. o legal o illegal (Page 30) o stack based o memory indirect 12. MOV instruction transfers a byte or word from which of the following source location. o DS:DI o ES:SI o ES:DI (Page 92) o DS:SI 13. The execution of the instruction mov word [ES: 0], 0x0741 will print A on the screen, color of the character will be o Black o White (Page 81) rep o Red o Blue 14. If AX contains FFFFh, then after execution of instruction SAL ax, 3, the result will be o -3 o +3 o -8 o If the decimal number 35 is shifted by two bit to left, the new value will be o 35 o 70 o 140 o While using STOBS, if DF=1 then o The value of SI will be incremented by one o The value of SI will be incremented by two o The value of SI will be decremented by one o The value of SI will be decremented by two click here for detail 17. After the execution of STOSW, the CX will be o Decremented by 1 o Decremented by 2 (Page 92) o Incremented by 1 o Incremented by 2

305 18. The memory address always move from o processor to memory o memory to processor o memory to peripheral o peripheral to processor 19. An offset alone is not complete without o Segment (Page 34) o code label o index register o data label Code Segment is associated to register by default. o IP (Page 34) o SS o BP o CX MIDTERM SPRING 2011 CS401 Assembly Language Question No:1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction: MSB remain as it is MSB Will change MSB move to left (Page 52) No change will occur. Question No:2 ( Marks: 1 ) - Please choose one ASCII stands for. The screen is two dimensional space having: 25 Rows and 25 Columns (Page 80) 25 Rows and 80 Columns 80 Rows and 80 Columns 80 Rows and 25 Columns

306 Question No:3 ( Marks: 1 ) - Please choose one In the Rotate Right Operation every bit moves one position to right and the bit dropped from the right is inserted at the left and: Dropped in CF (Page 53) moves to AL Don t go anywhere. Question No:4 ( Marks: 1 ) - Please choose one of the following flags will be affected by MOVSB? DF ZF PF No effect on flags. Question No:5 ( Marks: 1 ) - Please choose one The iapx88 processor supports modes of memory access (Page 35) 8 MIDTERM FALL 2010 Question No:1 ( Marks: 1 ) - Please choose one Stack is a that behaves in a first in last out manner. Program data structure (Page 67) Heap None of the Given Question No:2 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SI combination SS:SP combination (Page 68) ES:BP combination ES:SP combination

307 Question No:3 ( Marks: 1 ) - Please choose one Foreground and background parameter will be 32bits 16bits 8bits 4bits Question No:4 ( Marks: 1 ) - Please choose one The clear screen operation initialize whole block of memory , 0720 (Page 91) Question No:5 ( Marks: 1 ) - Please choose one In STOSB instruction, when DF is Set, SI is Incremented by 1 Incremented by 2 Decremented by 1 (Not confirmed) Decremented by 2 Question No:6 ( Marks: 1 ) - Please choose one Assembly language is: Low-level programming language Click here for detail High-level programming language Also known as machine language Not considered closer to the computer Question No:7 ( Marks: 1 ) - Please choose one A 32 Bit processor has accumulator of bit 16 bit 32 bit (Page 12) 64 bit Question No:8 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments (Page 72) No arguments

308 Question No:9 ( Marks: 1 ) - Please choose one RET is executed, it recovers the values from Register Stack (Page 71) Data segment Code segment Question No:10 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit (Page 80) Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit Question No:11 ( Marks: 1 ) - Please choose one The prevalent convention in most high level languages is stack clearing by the Caller Callee (Page 74) RET Stack Question No:12 ( Marks: 1 ) - Please choose one After execution of JCXZ instruction CX will changed with flag affect. CF OF DF None of Above (Page 43) Question No:13 ( Marks: 1 ) - Please choose one Execution of the instruction mov word [ES : 0], 0x0741 will print A appear on the top left of screen (Page 81) A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen Question No:14 ( Marks: 1 ) - Please choose one if contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken

309 Zero flag will set ZF will contain value -4 Jump will not be taken Question No:15 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No:16 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Question No:17 ( Marks: 1 ) - Please choose one Execution of the instruction mov word [ES : 0], 0x1230 will print the character color will Green White Red Black Question No: 1 ( Marks: 1 ) - Please choose one After the execution of SAR instruction The msb is replaced by a 0 The msb is replaced by 1 The msb retains its original value The msb is replaced by the value of CF MIDTERM EXAMINATION Spring 2010

310 Question No: 2 ( Marks: 1 ) - Please choose one RETF will pop the offset in the BP IP (Page 69) SP SI Question No: 3 ( Marks: 1 ) - Please choose one The routine that executes in response to an INT instruction is called ISR IRS ISP IRT (Page 103) rep Question No: 4 ( Marks: 1 ) - Please choose one The first instruction of COM file must be at offset: 0x0010 0x0100 (Page 19) rep 0x1000 0x0000 Question No: 5 ( Marks: 1 ) - Please choose one Far jump is not position relative but is memory dependent Absolute (Page 46) Temporary indirect Question No: 6 ( Marks: 1 ) - Please choose one Only instructions allow moving data from memory to memory. string word indirect stack (Page 29) rep Question No: 7 ( Marks: 1 ) - Please choose one After the execution of instruction RET 2 SP is incremented by 2

311 SP is decremented by 2 (Page 66) rep SP is incremented by 4 SP is decremented by 4 Question No: 8 ( Marks: 1 ) - Please choose one DIV instruction has Two forms (Page 85) Three forms Four forms Five forms Question No: 9 ( Marks: 1 ) - Please choose one When the operand of DIV instruction is of 16 bits then implied dividend will be of 8 bits (Page 85) 16 bits 32 bits 64 bits Question No: 10 ( Marks: 1 ) - Please choose one After the execution of MOVS instruction which of the following registers are updated SI only DI only SI and DI only (Page 92) SI, DI and BP only Question No: 11 ( Marks: 1 ) - Please choose one In 8088 architecture, whenever an element is pushed on the stack SP is decremented by 1 SP is decremented by 2 (Page 68) SP is decremented by 3 SP is decremented by 4 Question No: 12 ( Marks: 1 ) - Please choose one When a very large number is divided by very small number so that the quotient is larger than the space provided, this is called

312 Divide logical error Divide overflow error (Page 85) Divide syntax error An illegal instruction Question No: 13 ( Marks: 1 ) - Please choose one In the word designated for one screen location, the higher address contains The character code The attribute byte (Page 81) The parameters The dimensions Question No: 14 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX Question No: 15 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes Four bytes Eight bytes Question No: 16 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, background color of the screen will be Black White Red Blue (Page 81) rep

313 Question No:1 ( Marks: 1 ) - Please choose one One screen location corresponds to a Byte Word (Page 80) rep Double byte Double word CS401 MIDTERM FALL2010 Question No:2 ( Marks: 1 ) - Please choose one After the execution of PUSH AX statement AX register will reside on the stack A copy of AX will go on the stack (Page 69) The value of AX disappear after moving on stack Stack will send an acceptance message Question No:3 ( Marks: 1 ) - Please choose one physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination (Page 68) rep ES:BP combination ES:SP combination Question No:4 ( Marks: 1 ) - Please choose one If the address of memory location Num1 is 0117 and its content is 0005 then after execution of the instruction mov bx, Num1 bx will contain (Page 30) Num Question No:5 ( Marks: 1 ) - Please choose one In STOS instruction, the implied source will always be in AL or AX registers (Page 92) DL or DX registers BL or BX registers CL or CX registers

314 Question No:6 ( Marks: 1 ) - Please choose one The shift logical right operation inserts A zero at right A zero at left (Page 52) A one at right A one at right Question No:7 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2 Decrement CX by 1 (Page 92) rep Decrement CX by 2 Question No:8 ( Marks: 1 ) - Please choose one When an item is pushed on the decrementing stack, the top of the stack is First decremented and then element copied on to the stack First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack (Page 68) rep Question No:9 ( Marks: 1 ) - Please choose one assembly the CX register is used normally as a register. source counter (Page 32) index pointer Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus I only II only III only (Page 9) I and II only Question No:10 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare (Page 92) Scan Sort

315 Move data Question No:11 ( Marks: 1 ) - Please choose one register holds the address of next instruction is to be executed Base pointer Code segment Source index Program counter (Page 13) Question No:12 ( Marks: 1 ) - Please choose one JC and JNC test the flag. carry (Page 41) parity zero sign Question No:13 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) Question No:14 ( Marks: 1 ) - Please choose one In string manipulation whenever an instruction needs a memory source, which of the following will hold the pointer to it? ES: DI ES: BP DS:BP DS:SI (Page 91) Question No:15 ( Marks: 1 ) - Please choose one which bit sets the character "blinking" on the screen? (Page 7) 8

316 Question No:16 ( Marks: 1 ) - Please choose one If we want to divide a signed number by 2, this operation can better be accomplished by SHR SAR (Page 52) SHL SAL Question No:17 ( Marks: 1 ) - Please choose one After the execution of STOSB,the CX wil be.. Incremented by 1 Incremented by 2 Decremented by 1 Decremented by 2 Question No:18 ( Marks: 1 ) - Please choose one Each screen location corresponds to a word, the lower byte of this word contains The character code The attribute byte The parameters The dimensions (Page 81) rep Question No:19 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes (Page 86) Four bytes Eight bytes cs401 paper 02 dec,2010 Question No:1 ( Marks: 1 ) - Please choose one Execution of the instruction mov word [ES : 0], 0x0741 will print A appear on the top left of screen (Page 81) rep A appear on the top right of screen A appear on the center of screen A appear on the bottom left of screen

317 Question No:2 ( Marks: 1 ) - Please choose one After the execution of PUSH AX statement AX register will reside on the stack (Page 69) rep A copy of AX will go on the stack The value of AX disappear after moving on stack Stack will send an acceptance message Question No:3 ( Marks: 1 ) - Please choose one If D is 35 is shift to left 2 bits the new value Question No:4 ( Marks: 1 ) - Please choose one When an item is pushed on the decrementing stack, the top of the stack is First decremented and then element copied on to the stack First incremented and then element copied on to the stack Decremented after the element copied on to the stack Incremented after the element copied on to the stack (Page 68) rep Question No:5 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) rep Question No:6 ( Marks: 1 ) - Please choose one In a video memory, each screen location corresponds to One byte Two bytes (Page 66) Four bytes Eight bytes Question No:7 ( Marks: 1 ) - Please choose one shifting the -15 two bit sar

318 Question No:8 ( Marks: 1 ) - Please choose one mov ax,5 has 1 operand 2 opeand (Page 25) 3 operand 4 opeand MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please choose one The physical address of the stack is obtained by SS:SP combination SS:SI combination SS:SP combination (Page 68) rep ES:BP combination ES:SP combination Question No: 2 ( Marks: 1 ) - Please choose one After the execution of instruction RET SP is incremented by 2 SP is incremented by 2 (Page 66) rep SP is decremented by 2 SP is incremented by 1 SP is decremented by 1 Question No: 3 ( Marks: 1 ) - Please choose one The second byte in the word designated for one screen location holds Character color on the screen The dimensions of the screen Character position on the screen Character color on the screen (Page 81) rep ASCII code of the character Question No: 4 ( Marks: 1 ) - Please choose one REP will always Increment CX by 1 Increment CX by 2

319 Decrement CX by 1 (Page 92) Decrement CX by 2 Question No: 5 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare Scan Sort Move data (Page 92) rep Question No: 6 ( Marks: 1 ) - Please choose one Index registers are used to store Data Intermediate result Address (Page 16) Both data and addresses Question No: 7 ( Marks: 1 ) - Please choose one The bits of the work independently and individually index register base register flags register (Page 12) accumulator Question No: 8 ( Marks: 1 ) - Please choose one To convert any digit to its ASCII representation Add 0x30 in the digit Subtract 0x30 from the digit Add 0x61 in the digit Subtract 0x61 from the digit (Page 80) rep Question No: 9 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient is of 32 bits 16 bits (Page 85) 8 bits 4 bits

320 Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the quotient will be in AX AL AH DX (Page 85) rep Question No: 11 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication Addition Subtraction (Page 92) Question No: 12 ( Marks: 1 ) - Please choose one If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions: CMP AX, BX JA label Jump will be taken Zero flag will set ZF will contain value -4 Jump will not be taken Question No: 13 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 160], 0x1230 will print a character 0 on the screen at Second column of first row First column of second row (Page 81) Second column of second row First column of third row Question No: 14 ( Marks: 1 ) - Please choose one If the direction of the processing of a string is from higher addresses towards lower addresses then ZF is cleared DF is cleared (Page 91) ZF is set DF is set

321 Question No: 15 ( Marks: 1 ) - Please choose one The instruction ADC has Operand(s) (Page 56) 3 Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the red component of background color? (Page 81) MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please choose one Suppose AL contains 5 decimal then after two left shifts produces the value as Question No: 2 ( Marks: 1 ) - Please choose one In STOS instruction, the implied source will always be in AL or AX registers DL or DX registers BL or BX registers CL or CX registers (Page 92) rep Question No: 3 ( Marks: 1 ) - Please choose one After the execution of STOSW the CX will be Decremented by 1

322 Decremented by 2 Incremented by 1 Incremented by 2 (Page 92) rep Question No: 4 ( Marks: 1 ) - Please choose one The basic function of SCAS instruction is to Compare Scan Sort Move data (Page 92) rep Question No: 5 ( Marks: 1 ) - Please choose one Which is the unidirectional bus? (I) Control Bus (II) Data Bus (III) Address Bus ly I on II only III only (Page 9) rep I and II only Question No: 6 ( Marks: 1 ) - Please choose one The operation of CMP is to Subtract Source from Destination (Page 39) btract SuDestination to from Source Add 1 to the Destination Add Source and Destination Question No: 7 ( Marks: 1 ) - Please choose one The registers IP, SP, BP, SI, DI, and BX all can contain a offset. -bit 8 -bit16 (Page 21) -bit 32 -bit 64 Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter (Page 92) index pointer

323 Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective (Page 33) faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of foreground color (Page 81) Question No: 11 ( Marks: 1 ) - Please choose one When a 32 bit number is divided by a 16 bit number, the quotient will be stored in AX (Page 85) BX CX DX Question No: 12 ( Marks: 1 ) - Please choose one mov byte [num1], 5 is instruction. legal (Page 30) rep illegal stack based memory indirect Question No: 13 ( Marks: 1 ) - Please choose one Which of the following options contain the set of instructions to open a window to the video memory? mov AX, 0xb008 mov ES, AX mov AX, 0xb800 mov ES, AX (Page 81) rep mov AX, 0x8b00 mov ES, AX mov AX, 0x800b mov ES, AX

324 Question No: 14 ( Marks: 1 ) - Please choose one The execution of the instruction mov word [ES : 0], 0x0741 will print character A on screen, color of the character will be Black White Red Blue (Page 81) rep Question No: 15 ( Marks: 1 ) - Please choose one Which of the following flags will be affected by MOVSW? DF PF ZF No effect on flags Question No: 16 ( Marks: 1 ) - Please choose one Which bit of the attributes byte represents the blue component of background color? 3 4 (Page 81) 5 6 Question No: 1 ( Marks: 1 ) - Please choose one To transfer control back the RET instruction take 1 argument 1 argument 3 arguments (Page 72) rep No arguments MIDTERM EXAMINATION Spring 2009 Question No: 2 ( Marks: 1 ) - Please choose one In STOSB instruction SI is decremented or incremented by

325 Question No: 3 ( Marks: 1 ) - Please choose one CMPS instruction subtracts the source location to the destination location. Destination location always lies in DS:SI (Page 93) DS:DI ES:SI ES:DI Question No: 4 ( Marks: 1 ) - Please choose one Regarding assembler, which statement is true: Assembler converts mnemonics to the corresponding OPCODE (Page 13) Assembler converts OPCODE to the corresponding mnemonics Assembler executes the assembly code all at once Assembler executes the assembly code step by step Question No: 5 ( Marks: 1 ) - Please choose one If BB is the OPCODE of the instruction which states to move a constant value to AX register, the hexadecimal representation (Using little Endian notation) of the instruction Mov AX,336 ( 150 in hexadecimal number system) will be: 0xBB0150 0x5001BB 0x01BB50 0xBB5001 Question No: 6 ( Marks: 1 ) - Please choose one In the instruction MOV AX, 5 the number of operands are 1 2 (Page 25) rep 3 4 Question No: 7 ( Marks: 1 ) - Please choose one The maximum parameters a subroutine can receive (with the help of registers) are 6 7 (Page 72) 8 9

326 Question No: 8 ( Marks: 1 ) - Please choose one In assembly the CX register is used normally as a register. source counter (Page 92) rep index pointer Question No: 9 ( Marks: 1 ) - Please choose one All the addressing mechanisms in iapx88 return a number called address. effective (Page 33) rep faulty indirect direct Question No: 10 ( Marks: 1 ) - Please choose one When a 16 bit number is divided by an 8 bit number, the dividend will be in AX (Page 85) BX CX DX Question No: 11 ( Marks: 1 ) - Please choose one in Left-Shift-Operation the left most bit will drop will go into CF (Page 52) Will come to the right most will be always 1 Question No: 12 ( Marks: 1 ) - Please choose one Suppose the decimal number "35" after shifting its binary two bits to left, the new value becomes Question No: 13 ( Marks: 1 ) - Please choose one When divide overflow occurs processor will be interrupted this type of interrupt is called Hardware interrupt Software interrupt Processor exception Logical interrupts

327 Question No: 14 ( Marks: 1 ) - Please choose one Which mathematical operation is dominant during the execution of SCAS instruction Division Multiplication Addition Subtraction (Page 92) rep Question No: 15 ( Marks: 1 ) - Please choose one After the execution of REP instruction CX will be decremented then which of the following flags will be affected? CF OF DF No flags will be affected (Page 93) rep Question No: 16 ( Marks: 1 ) - Please choose one is one of the reasons due to which string instructions are used in 8088 Efficiency and accuracy Reduction in code size and accuracy Reduction in code size and speed (Page 91) Reduction in code size and efficiency

CS401 Assembly Language Solved MCQS From Midterm Papers

CS401 Assembly Language Solved MCQS From Midterm Papers CS401 Assembly Language Solved MCQS From Midterm Papers May 14,2011 MC100401285 Moaaz.pk@gmail.com MC100401285@gmail.com PSMD01(IEMS) Question No:1 ( Marks: 1 ) - Please choose one The first instruction

More information

Memory address space is selected when which of the following instructions is given to the processor MOV DEC IN ADD My Ok Page # 115

Memory address space is selected when which of the following instructions is given to the processor MOV DEC IN ADD My Ok Page # 115 Muhammad Rizwan Ashraf 0300-7487664 bits of the work independently and individually index register base register flags register accumulator Page # 12 Motorola 68K processors have 23bit general purpose

More information

CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers. MC

CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers. MC CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 MIDTERM FALL 2011 CS401 Assembly Language Q: Affected flag of AND operation

More information

Code segment Stack segment

Code segment Stack segment Registers Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1

More information

Intel 8086: Instruction Set

Intel 8086: Instruction Set IUST-EE (Chapter 6) Intel 8086: Instruction Set 1 Outline Instruction Set Data Transfer Instructions Arithmetic Instructions Bit Manipulation Instructions String Instructions Unconditional Transfer Instruction

More information

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI Note: PUSHF / POPF have no operands The figure below shows that if (SS) = 3000H, (SP) = 0042H, so the execution of POP CX loads CX by the word 4050H form the stack segment. The SP is incremented by 2.

More information

9/25/ Software & Hardware Architecture

9/25/ Software & Hardware Architecture 8086 Software & Hardware Architecture 1 INTRODUCTION It is a multipurpose programmable clock drive register based integrated electronic device, that reads binary instructions from a storage device called

More information

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY BACKGROUND 8086 CPU has 8 general purpose registers listed below: AX - the accumulator register (divided into AH / AL): 1. Generates shortest machine code 2. Arithmetic, logic and data transfer 3. One

More information

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

More information

Time Left. sec(s) Quiz Start Time: 12:13 AM. Question # 5 of 10 ( Start time: 12:18:29 AM ) Total Marks: 1

Time Left. sec(s) Quiz Start Time: 12:13 AM. Question # 5 of 10 ( Start time: 12:18:29 AM ) Total Marks: 1 64 Quiz Start Time: 12:13 AM Question # 5 of 10 ( Start time: 12:18:29 AM ) Total Marks: 1 The root directory of floppy contains fixed entries 64 256 128 512 77 Quiz Start Time: 12:13 AM Question # 6 of

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST 2 Date : 02/04/2018 Max Marks: 40 Subject & Code : Microprocessor (15CS44) Section : IV A and B Name of faculty: Deepti.C Time : 8:30 am-10:00 am Note: Note: Answer any five complete

More information

Intel 8086 MICROPROCESSOR ARCHITECTURE

Intel 8086 MICROPROCESSOR ARCHITECTURE Intel 8086 MICROPROCESSOR ARCHITECTURE 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14, 16

More information

Intel 8086 MICROPROCESSOR. By Y V S Murthy

Intel 8086 MICROPROCESSOR. By Y V S Murthy Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,

More information

Experiment N o 8. String Handling Instructions

Experiment N o 8. String Handling Instructions Experiment N o 8 String Handling Instructions Introduction: In this experiment you will deal with string handling instructions, such as reading a string, moving a string from one memory location to another,

More information

Come and join us at WebLyceum

Come and join us at WebLyceum Come and join us at WebLyceum For Past Papers, Quiz, Assignments, GDBs, Video Lectures etc Go to http://www.weblyceum.com and click Register In Case of any Problem Contact Administrators Rana Muhammad

More information

Chapter Four Instructions Set

Chapter Four Instructions Set Chapter Four Instructions set Instructions set 8086 has 117 instructions, these instructions divided into 6 groups: 1. Data transfer instructions 2. Arithmetic instructions 3. Logic instructions 4. Shift

More information

EEM336 Microprocessors I. Data Movement Instructions

EEM336 Microprocessors I. Data Movement Instructions EEM336 Microprocessors I Data Movement Instructions Introduction This chapter concentrates on common data movement instructions. 2 Chapter Objectives Upon completion of this chapter, you will be able to:

More information

ADVANCE MICROPROCESSOR & INTERFACING

ADVANCE MICROPROCESSOR & INTERFACING VENUS INTERNATIONAL COLLEGE OF TECHNOLOGY Gandhinagar Department of Computer Enggineering ADVANCE MICROPROCESSOR & INTERFACING Name : Enroll no. : Class Year : 2014-15 : 5 th SEM C.E. VENUS INTERNATIONAL

More information

3.1 DATA MOVEMENT INSTRUCTIONS 45

3.1 DATA MOVEMENT INSTRUCTIONS 45 3.1.1 General-Purpose Data Movement s 45 3.1.2 Stack Manipulation... 46 3.1.3 Type Conversion... 48 3.2.1 Addition and Subtraction... 51 3.1 DATA MOVEMENT INSTRUCTIONS 45 MOV (Move) transfers a byte, word,

More information

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM EXPERIMENT WRITE UP AIM: Assembly language program for 16 bit BCD addition LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM TOOLS/SOFTWARE

More information

CG2007 Microprocessor systems.

CG2007 Microprocessor systems. CG2007 Microprocessor systems Tutorial 1 Semester 2 AY 2011-12 Ganesh Iyer ganesh.vigneswara@gmail.com http://ganeshniyer.com About Me I have 3 years of Industry work experience in Bangalore, India. I

More information

CC411: Introduction To Microprocessors

CC411: Introduction To Microprocessors CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Describe the Intel family of microprocessors from 8085 to Pentium. In terms of bus size, physical memory & special

More information

Microprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017)

Microprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017) Microprocessor and Assembly Language Week-5 System Programming, BCS 6th, IBMS (2017) High Speed Memory Registers CPU store data temporarily in these location CPU process, store and transfer data from one

More information

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional

More information

8086 INTERNAL ARCHITECTURE

8086 INTERNAL ARCHITECTURE 8086 INTERNAL ARCHITECTURE Segment 2 Intel 8086 Microprocessor The 8086 CPU is divided into two independent functional parts: a) The Bus interface unit (BIU) b) Execution Unit (EU) Dividing the work between

More information

1. Introduction to Assembly Language

1. Introduction to Assembly Language www.vchowk.com 1. Introduction to Assembly Language Solved EXERCISE 1 Note: Dear fellows I tried my best to solve this exercise questions if there s any mistake or doubt in any question correct it and

More information

EC 333 Microprocessor and Interfacing Techniques (3+1)

EC 333 Microprocessor and Interfacing Techniques (3+1) EC 333 Microprocessor and Interfacing Techniques (3+1) Lecture 7 8086/88 Microprocessor Programming (Data Movement Instructions) Dr Hashim Ali Spring 2018 Department of Computer Science and Engineering

More information

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit 1 1. introduction The internal function of 8086 processor are partitioned logically into processing units,bus Interface Unit(BIU)

More information

Arithmetic and Logic Instructions And Programs

Arithmetic and Logic Instructions And Programs Dec Hex Bin 3 3 00000011 ORG ; FOUR Arithmetic and Logic Instructions And Programs OBJECTIVES this chapter enables the student to: Demonstrate how 8-bit and 16-bit unsigned numbers are added in the x86.

More information

Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil

Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil Microprocessor By Mrs. R.P.Chaudhari Mrs.P.S.Patil Chapter 1 Basics of Microprocessor CO-Draw Architecture Of 8085 Salient Features of 8085 It is a 8 bit microprocessor. It is manufactured with N-MOS technology.

More information

CS401 - Computer Architecture and Assembly Language Programming Glossary By

CS401 - Computer Architecture and Assembly Language Programming Glossary By CS401 - Computer Architecture and Assembly Language Programming Glossary By absolute address : A virtual (not physical) address within the process address space that is computed as an absolute number.

More information

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers. Lecture 5: Computer Organization Instruction Execution Computer Organization Addressing Buses Fetch-Execute Cycle Computer Organization CPU Control Unit U Input Output Memory Components Control Unit fetches

More information

EC-333 Microprocessor and Interfacing Techniques

EC-333 Microprocessor and Interfacing Techniques EC-333 Microprocessor and Interfacing Techniques Lecture 4 Addressing Modes Dr Hashim Ali Spring - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides taken from Computer

More information

icroprocessor istory of Microprocessor ntel 8086:

icroprocessor istory of Microprocessor ntel 8086: Microprocessor A microprocessor is an electronic device which computes on the given input similar to CPU of a computer. It is made by fabricating millions (or billions) of transistors on a single chip.

More information

Signed number Arithmetic. Negative number is represented as

Signed number Arithmetic. Negative number is represented as Signed number Arithmetic Signed and Unsigned Numbers An 8 bit number system can be used to create 256 combinations (from 0 to 255), and the first 128 combinations (0 to 127) represent positive numbers

More information

Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2

Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2 COS2621/103/3/2012 Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2 School of Computing Solutions to self tests Bar code 2 Self-test A Question 1 Alternative 1 Which one of the

More information

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN ROAD MAP SDK-86 Intel 8086 Features 8086 Block Diagram 8086 Architecture Bus Interface Unit Execution Unit 8086 Architecture 8086 Programmer s Model Flag Register

More information

UNIT 2 PROCESSORS ORGANIZATION CONT.

UNIT 2 PROCESSORS ORGANIZATION CONT. UNIT 2 PROCESSORS ORGANIZATION CONT. Types of Operand Addresses Numbers Integer/floating point Characters ASCII etc. Logical Data Bits or flags x86 Data Types Operands in 8 bit -Byte 16 bit- word 32 bit-

More information

x86 Assembly Tutorial COS 318: Fall 2017

x86 Assembly Tutorial COS 318: Fall 2017 x86 Assembly Tutorial COS 318: Fall 2017 Project 1 Schedule Design Review: Monday 9/25 Sign up for 10-min slot from 3:00pm to 7:00pm Complete set up and answer posted questions (Official) Precept: Monday

More information

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313) Philadelphia University Faculty of Engineering Marking Scheme Examination Paper Department of CE Module: Microprocessors (630313) Final Exam Second Semester Date: 02/06/2018 Section 1 Weighting 40% of

More information

Summer 2003 Lecture 4 06/14/03

Summer 2003 Lecture 4 06/14/03 Summer 2003 Lecture 4 06/14/03 LDS/LES/LSS General forms: lds reg,mem lseg reg,mem Load far pointer ~~ outside of current segment {E.g., load reg w/value @ mem, & seg w/mem+2 XCHG Exchange values General

More information

CS-202 Microprocessor and Assembly Language

CS-202 Microprocessor and Assembly Language CS-202 Microprocessor and Assembly Language Lecture 2 Introduction to 8086 Assembly Language Dr Hashim Ali Spring - 2019 Department of Computer Science and Engineering HITEC University Taxila!1 Lecture

More information

Arithmetic Instructions

Arithmetic Instructions Segment 3C Arithmetic Instructions This topic covers the following instructions: Addition (ADD, INC, ADC) Subtraction (SUB, DEC, SBB,CMP) Multiplication (MUL, IMUL) Division (DIV, IDIV) BCD Arithmetic

More information

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات 1) Input/output In computing, input/output or I/O, is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing

More information

EC 333 Microprocessor and Interfacing Techniques (3+1)

EC 333 Microprocessor and Interfacing Techniques (3+1) EC 333 Microprocessor and Interfacing Techniques (3+1) Lecture 6 8086/88 Microprocessor Programming (Arithmetic Instructions) Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC

More information

16-Bit Intel Processor Architecture

16-Bit Intel Processor Architecture IBM-PC Organization 16-Bit Intel Processor Architecture A-16 bit microprocessor can operate on 16 bits of data at a time. 8086/8088 have the simplest structure 8086/8088 have the same instruction set,

More information

EE2007 Microprocessor systems.

EE2007 Microprocessor systems. EE2007 Microprocessor systems Tutorial 1 Semester 1 AY 2010-11 Ganesh Iyer ganesh.vigneswara@gmail.com (facebook, gtalk) http://ganeshniyer.com About Me I have 3 years of Industry work experience in Bangalore,

More information

Computer Architecture and Assembly Language Programming CS401 Lecture No: 1 Address, Data, and Control Buses A computer system comprises of a

Computer Architecture and Assembly Language Programming CS401 Lecture No: 1 Address, Data, and Control Buses A computer system comprises of a Computer Architecture and Assembly Language Programming CS401 Lecture No: 1 Address, Data, and Control Buses A computer system comprises of a processor, memory, and I/O devices. I/O is used for interfacing

More information

Question Bank Part-A UNIT I- THE 8086 MICROPROCESSOR 1. What is microprocessor? A microprocessor is a multipurpose, programmable, clock-driven, register-based electronic device that reads binary information

More information

8086 INSTRUCTION SET

8086 INSTRUCTION SET 8086 INSTRUCTION SET Complete 8086 instruction set Quick reference: AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD CLI CMC CMP CMPSB CMPSW CWD DAA DAS DEC DIV HLT IDIV IMUL IN INC INT INTO I JA JAE JB JBE

More information

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans.

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans. INSTRUCTOR: ABDULMUTTALIB A H ALDOURI Conditional Jump Cond Unsigned Signed = JE : Jump Equal JE : Jump Equal ZF = 1 JZ : Jump Zero JZ : Jump Zero ZF = 1 JNZ : Jump Not Zero JNZ : Jump Not Zero ZF = 0

More information

US06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 3: Assembly Language Instructions II

US06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 3: Assembly Language Instructions II Unconditional & Conditional JUMP instructions: Conditional JUMP instructions: JA/JNBE Jump if above / Jump if not Below or Equal These two mnemonics represent the same instruction. The term above and below

More information

WINTER 12 EXAMINATION Subject Code : Model Answer Page No : / N. a) Describe the function of SID and SOD pins of 8085 microprocessor

WINTER 12 EXAMINATION Subject Code : Model Answer Page No : / N. a) Describe the function of SID and SOD pins of 8085 microprocessor Subject Code : Model Answer Page No : / N Q.1) SOLVE ANY FIVE : (20 MARKS) a) Describe the function of SID and SOD pins of 8085 microprocessor Ans: - SID: - (2 Mark) Serial Input Data SID pin is used to

More information

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy Digital Logic Design Ch1-1 8086 Microprocessor Features: The 8086 microprocessor is a 16 bit microprocessor. The term 16 bit means

More information

Ex : Write an ALP to evaluate x(y + z) where x = 10H, y = 20H and z = 30H and store the result in a memory location 54000H.

Ex : Write an ALP to evaluate x(y + z) where x = 10H, y = 20H and z = 30H and store the result in a memory location 54000H. Ex : Write an ALP to evaluate x(y + z) where x = 10H, y = 20H and z = 30H and store the result in a memory location 54000H. MOV AX, 5000H MOV DS, AX MOV AL, 20H MOV CL, 30H ADD AL, CL MOV CL, 10H MUL CL

More information

Week /8086 Microprocessor Programming I

Week /8086 Microprocessor Programming I Week 4 8088/8086 Microprocessor Programming I Example. The PC Typewriter Write an 80x86 program to input keystrokes from the PC s keyboard and display the characters on the system monitor. Pressing any

More information

complement) Multiply Unsigned: MUL (all operands are nonnegative) AX = BH * AL IMUL BH IMUL CX (DX,AX) = CX * AX Arithmetic MUL DWORD PTR [0x10]

complement) Multiply Unsigned: MUL (all operands are nonnegative) AX = BH * AL IMUL BH IMUL CX (DX,AX) = CX * AX Arithmetic MUL DWORD PTR [0x10] The following pages contain references for use during the exam: tables containing the x86 instruction set (covered so far) and condition codes. You do not need to submit these pages when you finish your

More information

EC-333 Microprocessor and Interfacing Techniques

EC-333 Microprocessor and Interfacing Techniques EC-333 Microprocessor and Interfacing Techniques Lecture 3 The Microprocessor and its Architecture Dr Hashim Ali Fall - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides

More information

Introduction to Microprocessor

Introduction to Microprocessor Introduction to Microprocessor The microprocessor is a general purpose programmable logic device. It is the brain of the computer and it performs all the computational tasks, calculations data processing

More information

Computer Architecture 1 ح 303

Computer Architecture 1 ح 303 Lecture 4 A. Addressing MODES 1. Introduction to assembly language programming: Program is a sequence of commands used to tell a microcomputer what to do. Each command in a program is an instruction Programs

More information

Computer Architecture and System Software Lecture 06: Assembly Language Programming

Computer Architecture and System Software Lecture 06: Assembly Language Programming Computer Architecture and System Software Lecture 06: Assembly Language Programming Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Assignment 3 due thursday Midterm

More information

Northern India Engineering College, Delhi (GGSIP University) PAPER I

Northern India Engineering College, Delhi (GGSIP University) PAPER I PAPER I Q1.Explain IVT? ANS. interrupt vector table is a memory space for storing starting addresses of all the interrupt service routine. It stores CS:IP PAIR corresponding to each ISR. An interrupt vector

More information

Basic Execution Environment

Basic Execution Environment Basic Execution Environment 3 CHAPTER 3 BASIC EXECUTION ENVIRONMENT This chapter describes the basic execution environment of an Intel Architecture processor as seen by assembly-language programmers.

More information

Assignment no:4 on chapter no :3 : Instruction set of 8086

Assignment no:4 on chapter no :3 : Instruction set of 8086 Assignment no:4 on chapter no :3 : Instruction set of 8086 1) Describe any two string operation instruction of 8086 with syntax & one example of each. 1] REP: REP is a prefix which is written before one

More information

Assembling, Linking and Executing 1) Assembling: .obj obj .obj.lst .crf Assembler Types: a) One pass assembler:

Assembling, Linking and Executing 1) Assembling: .obj obj .obj.lst .crf Assembler Types: a) One pass assembler: Assembling, Linking and Executing 1) Assembling: - Assembling converts source program into object program if syntactically correct and generates an intermediate.obj file or module. - It calculates the

More information

Internal architecture of 8086

Internal architecture of 8086 Case Study: Intel Processors Internal architecture of 8086 Slide 1 Case Study: Intel Processors FEATURES OF 8086 It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 220 memory locations (1

More information

Module 3 Instruction Set Architecture (ISA)

Module 3 Instruction Set Architecture (ISA) Module 3 Instruction Set Architecture (ISA) I S A L E V E L E L E M E N T S O F I N S T R U C T I O N S I N S T R U C T I O N S T Y P E S N U M B E R O F A D D R E S S E S R E G I S T E R S T Y P E S O

More information

Architecture and components of Computer System Execution of program instructions

Architecture and components of Computer System Execution of program instructions Execution of program instructions Microprocessor realizes each program instruction as the sequence of the following simple steps: 1. fetch next instruction or its part from memory and placing it in the

More information

FINALTERM EXAMINATION Fall 2012

FINALTERM EXAMINATION Fall 2012 CS401- Computer Architecture and Assembly Language Programming Final Term Papers Solved Subjective with reference by Virtualians Social Network CS401- Computer Architecture and Assembly Language Programming

More information

Q1: Multiple choice / 20 Q2: Protected mode memory accesses

Q1: Multiple choice / 20 Q2: Protected mode memory accesses 16.317: Microprocessor-Based Systems I Summer 2012 Exam 2 August 1, 2012 Name: ID #: For this exam, you may use a calculator and one 8.5 x 11 double-sided page of notes. All other electronic devices (e.g.,

More information

Section 001 & 002. Read this before starting!

Section 001 & 002. Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 3 for Spring Semester,

More information

Computer Organization & Assembly Language Programming. CSE 2312 Lecture 15 Addressing and Subroutine

Computer Organization & Assembly Language Programming. CSE 2312 Lecture 15 Addressing and Subroutine Computer Organization & Assembly Language Programming CSE 2312 Lecture 15 Addressing and Subroutine 1 Sections in 8088 Code TEXT section, for the processor instructions. DATA section for the initialization

More information

Read this before starting!

Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 3 for Fall Semester,

More information

Week /8086 Microprocessor Programming II

Week /8086 Microprocessor Programming II Week 5 8088/8086 Microprocessor Programming II Quick Review Shift & Rotate C Target register or memory SHL/SAL 0 C SHR 0 SAR C Sign Bit 2 Examples Examples Ex. Ex. Ex. SHL dest, 1; SHL dest,cl; SHL dest,

More information

Section 001. Read this before starting!

Section 001. Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 3 for Fall Semester,

More information

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI 8 Unsigned and Signed Integer Numbers 1. Unsigned integer numbers: each type of integer can be either byte-wide or word-wide. This data type can be used to represent decimal numbers in the range 0 through

More information

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU 5 Years Integrated M.Sc.(IT) Semester 4 060010402 System Programming Question Bank Unit 1: Introduction 1. Write the decimal equivalent for each integral power of 2 from 2! to 2!". 2. Convert the following

More information

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86 Lecture 15 Intel Manual, Vol. 1, Chapter 3 Hampden-Sydney College Fri, Mar 6, 2009 Outline 1 2 Overview See the reference IA-32 Intel Software Developer s Manual Volume 1: Basic, Chapter 3. Instructions

More information

UNIT III MICROPROCESSORS AND MICROCONTROLLERS MATERIAL OVERVIEW: Addressing Modes of Assembler Directives. Procedures and Macros

UNIT III MICROPROCESSORS AND MICROCONTROLLERS MATERIAL OVERVIEW: Addressing Modes of Assembler Directives. Procedures and Macros OVERVIEW: UNIT III Addressing Modes of 8086 Assembler Directives Procedures and Macros Instruction Set of 8086 Data Transfer Group Arithmetic Group Logical Instructions Rotate and Shift instructions Loop

More information

Assembly Language Lab # 9

Assembly Language Lab # 9 Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2011 Assembly Language Lab # 9 Stacks and Subroutines Eng. Doaa Abu Jabal Assembly Language Lab # 9 Stacks and Subroutines

More information

ORG ; TWO. Assembly Language Programming

ORG ; TWO. Assembly Language Programming Dec 2 Hex 2 Bin 00000010 ORG ; TWO Assembly Language Programming OBJECTIVES this chapter enables the student to: Explain the difference between Assembly language instructions and pseudo-instructions. Identify

More information

Computer Architecture and Assembly Language. Practical Session 3

Computer Architecture and Assembly Language. Practical Session 3 Computer Architecture and Assembly Language Practical Session 3 Advanced Instructions division DIV r/m - unsigned integer division IDIV r/m - signed integer division Dividend Divisor Quotient Remainder

More information

Introduction to IA-32. Jo, Heeseung

Introduction to IA-32. Jo, Heeseung Introduction to IA-32 Jo, Heeseung IA-32 Processors Evolutionary design Starting in 1978 with 8086 Added more features as time goes on Still support old features, although obsolete Totally dominate computer

More information

8088/8086 Programming Integer Instructions and Computations

8088/8086 Programming Integer Instructions and Computations Unit3 reference 2 8088/8086 Programming Integer Instructions and Computations Introduction Up to this point we have studied the software architecture of the 8088 and 8086 microprocessors, their instruction

More information

INTRODUCTION TO IA-32. Jo, Heeseung

INTRODUCTION TO IA-32. Jo, Heeseung INTRODUCTION TO IA-32 Jo, Heeseung IA-32 PROCESSORS Evolutionary design Starting in 1978 with 8086 Added more features as time goes on Still support old features, although obsolete Totally dominate computer

More information

String Processing. Chapter 9 S. Dandamudi

String Processing. Chapter 9 S. Dandamudi String Processing Chapter 9 S. Dandamudi Outline String representation Using string length Using a sentinel character String instructions Repetition prefixes Direction flag String move instructions String

More information

Chapter 3: Addressing Modes

Chapter 3: Addressing Modes Chapter 3: Addressing Modes Chapter 3 Addressing Modes Note: Adapted from (Author Slides) Instructor: Prof. Dr. Khalid A. Darabkh 2 Introduction Efficient software development for the microprocessor requires

More information

Computer Architecture and System Software Lecture 07: Assembly Language Programming

Computer Architecture and System Software Lecture 07: Assembly Language Programming Computer Architecture and System Software Lecture 07: Assembly Language Programming Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements New assembly examples uploaded to

More information

Chapter 4: Data Movement Instructions. 4 1 MOV Revisited

Chapter 4: Data Movement Instructions. 4 1 MOV Revisited Chapter 4: Data Movement Instructions 4 1 MOV Revisited In this chapter, the MOV instruction introduces machine language instructions available with various addressing modes and instructions. It may be

More information

Basic Assembly SYSC-3006

Basic Assembly SYSC-3006 Basic Assembly Program Development Problem: convert ideas into executing program (binary image in memory) Program Development Process: tools to provide people-friendly way to do it. Tool chain: 1. Programming

More information

Intel x86 Memory. Architecture. The x86 isn't all that complex it just doesn't make a lot of sense. Program Segments. x86 Data and Address Ranges

Intel x86 Memory. Architecture. The x86 isn't all that complex it just doesn't make a lot of sense. Program Segments. x86 Data and Address Ranges 1 2 Intel x86 Memory The x86 isn't all that complex it just doesn't make a lot of sense. Architecture Mike Johnson, Leader of 80x86 Design at AMD, Microprocessor Report (1994) 3 4 Program Segments x86

More information

INTRODUCTION TO MICROPROCESSORS

INTRODUCTION TO MICROPROCESSORS INTRODUCTION TO MICROPROCESSORS Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu January 7, 2016 Richa Upadhyay Prabhu (MPSTME) INTRODUCTION January 7, 2016 1 / 63 Course Design Prerequisite:

More information

Computer Architecture and System Programming Laboratory. TA Session 3

Computer Architecture and System Programming Laboratory. TA Session 3 Computer Architecture and System Programming Laboratory TA Session 3 Stack - LIFO word-size data structure STACK is temporary storage memory area register points on top of stack (by default, it is highest

More information

db "Please enter up to 256 characters (press Enter Key to finish): ",0dh,0ah,'$'

db Please enter up to 256 characters (press Enter Key to finish): ,0dh,0ah,'$' PA4 Sample Solution.model large.stack 100h.data msg1 db "This programs scans a string of up to 256 bytes and counts the repetitions of the number 4206 and sums them.",0dh,0ah,'$' msg2 db "Please enter

More information

It is possible to define a number using a character or multiple numbers (see instruction DB) by using a string.

It is possible to define a number using a character or multiple numbers (see instruction DB) by using a string. 1 od 5 17. 12. 2017 23:53 (https://github.com/schweigi/assembler-simulator) Introduction This simulator provides a simplified assembler syntax (based on NASM (http://www.nasm.us)) and is simulating a x86

More information

8086 programming Control Flow Instructions and Program Structures

8086 programming Control Flow Instructions and Program Structures 8086 programming Control Flow Instructions and Program Structures Example: write a procedure named Square that squares the contents of BL and places the result in BX. Square: PUSH AX MOV AL, BL MUL BL

More information

Addressing Modes on the x86

Addressing Modes on the x86 Addressing Modes on the x86 register addressing mode mov ax, ax, mov ax, bx mov ax, cx mov ax, dx constant addressing mode mov ax, 25 mov bx, 195 mov cx, 2056 mov dx, 1000 accessing data in memory There

More information

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. 8086 Microprocessor Microprocessor Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. It is used as CPU (Central Processing Unit) in computers.

More information

Lecture (08) x86 programming 7

Lecture (08) x86 programming 7 Lecture (08) x86 programming 7 By: Dr. Ahmed ElShafee 1 Conditional jump: Conditional jumps are executed only if the specified conditions are true. Usually the condition specified by a conditional jump

More information

Inline Assembler. Willi-Hans Steeb and Yorick Hardy. International School for Scientific Computing

Inline Assembler. Willi-Hans Steeb and Yorick Hardy. International School for Scientific Computing Inline Assembler Willi-Hans Steeb and Yorick Hardy International School for Scientific Computing e-mail: steebwilli@gmail.com Abstract We provide a collection of inline assembler programs. 1 Using the

More information