I. (30 points) Multiple Choice. For each problem, CIRCLE your selections clearly
ID: 2291508 • Letter: I
Question
I. (30 points) Multiple Choice. For each problem, CIRCLE your selections clearly Example: (( 1.1 To read a string from keyboard using int 21h under DOS, AH should be loaded with (a) 0lh (b) 02h (c) 09h (d) 0Ah 1.2 Which of the following does NOT belong to the basic p rogram structures (a) Sequence (b) Decision (c) Iteration (d) Recursion 1.3 If CS-135Ch, IP-0100h, after the instruction jz 0110h (with machine code 7403h) instruction, which one of the following is true? (a) IP-0100h (b) IP-0110h (c) IP-0100h or 0110h (d) IP-0100h, or 0110h, or something else 1.4 To form an iterative structure, a program has to include (a) unconditional jump (b) conditional jump (c) forward jump (d) backward jump 1.5 To reverse the upper four bits in AL, we can use (a) AND AL, OFh (b) AND AL, OF0h (b) XOR AL, OFOh (c) OR AL, OFOh II. (40 points) Short Answers 2.1 What is in AX after the following program? mov ax, Off00hExplanation / Answer
1.1 (d) 0Ah
Loading AH with 0Ah will input the string from the keyboard.
1.2 (d) Recursion
Sequence, selectrion/decision and loop/iteration are the three basic program structure which can help you build any program.
1.3 (b) IP = 0100h
IP increases automatically by the length of encoding of an instruction when an instruction is executed.
1.4 (b) Conditional Jump.
Iterative structures are meant to repeat some part of program as long as a condition holds true.
1.5 (d) AND AL, 0fh
2.1, AX is a 16 bit register. So, this register can accomodate only 16 bits of data. And that makes it to hold FF00h after MOV instruction. Note that 0FF00h equivalent to FF00h.