《汇编期末试卷08秋a-(含答案)090114v4》由会员分享,可在线阅读,更多相关《汇编期末试卷08秋a-(含答案)090114v4(11页珍藏版)》请在金锄头文库上搜索。
1、诚信考试 沉着应考 杜绝违纪浙江大学20082009学年 秋冬 学期汇编与接口课程期末考试试卷开课学院: 计算机学院 ,考试形式: 开 卷,允许带_1本书_入场考试时间: 09 年 1 月 11 日,所需时间: 120 分钟,任课教师 _考生姓名: _学号: 专业: _题序一二三四五六七总 分得分评卷人请把第15题的答案写在本页的答题纸上,第15题的评分以答题纸上的答案为准。一(10 points)Mark T for correct instruction or description, mark F foe incorrect instruction or description.(每题1
2、分)12345678910二(20 points) Please select your best choice for the following questions. (每题2分)12345678910三(10 points) The following program runs under 32-bit Visual C+ environment,Please choose the best answer. (每题5分)四(10 points) The following program is developed under 32-bit Visual C+ environment, e
3、ach integer takes 32 bits. The integer array “weight” holds many element (每题2分)(1)(2)(3)(4)(5)五(10 points) In protected mode, a Pentium 4 descriptor describes a segment, and the content of the descriptor is: 3CH, C0H, A2H, 6CH, 40H, 00H, 00H, 2FH(每题2分)(1)(2)(3)(4)(5)一. (10 points)Mark T for correct
4、instruction or description, mark F foe incorrect instruction or description.( )1. POP CS( )2. IMUL DH( )3. INSB( )4. MOV AX,ESIEDI( )5. MOV AX,SIDI( )6. JMP WORD PTR BP( )7. MOV EBX, ESI( )8. IMUL 125( )9. ADD CX,EAX( )10. In Mode 2, the 8254 usually generates a continuous square-wave.【答案】:(每题1分)(F)
5、1. POP CS(T)2. IMUL DH(T)3. INSB(T)4. MOV AX,ESIEDI(F)5. MOV AX,SIDI(T)6. JMP WORD PTR BP(F)7. MOV EBX, ESI(F)8. IMUL 125(T)9. ADD CX,EAX(F)10. In Mode 2, the 8254 usually generates a continuous square-wave.二. (20 points)Please select your best choice for the following questions. (每题2分)1. In real mo
6、de, according to the following memory data, the entry address of INT 13H should be (_).0000:0030 72 10 A7 00 7C 10 A7 00-4F 03 80 05 8A 03 80 050000:0040 AD 06 14 02 A4 F0 00 F0-37 05 14 02 11 6D 00 C0A:6D11:C000B:116D:00C0C:00C0:116DD:C000:6D11【答案】:D2. MOVEAX, 3A4C0002HMOVEBX, -2MULBL then AX= (_)A
7、:-4B:508C:-304HD:H【答案】:B3. MOVEAX,1007MOV EDX,100DIVDL then AX= (_)A:070AH B:-532HC:10D:7【答案】:A4. In real mode , variable X is defined in data segment, its segment address is 2345H, its offset is 2222H, then its 20-bit physical address will be _ .A:04567H B:45670HC:25672HD:23452H【答案】:C5. Which instr
8、uction will do “EBX - ECX + 8*EAX 400H” ? A:MOV ECX, ECX + 8*EAX 400H B:LEA ECX, ECX + 8*EAX 400HC:MOV EBX, OFFSET ECX + 8*EAX 400HD:ADD ECX , 8*EAX 400H【答案】: B6. CF and OF are always set to 0 after instruction.A:SUB B:ANDC:ADDD:MUL【答案】: B7. Suppose that DS=3200H, BX=0300H, SI=0240H, offset of myarr
9、ay=0120H, determine the physical address accessed by instruction: “MOV myarray SI, ECX” , assuming real mode operation.A:32240H B:32120HC:3560HD:32360H【答案】: D8. What is the purpose of interrupt vector type number 0?A:to detect and respond to divide eror. B:to report hardware errorC:to do a single-st
10、ep trapD:to process double fault【答案】: A9. Suppose that the 8254s control word is B, which description is correct?A:it sets counter 2 to read/write least-significant byte only. B:it sets counter 1 to read/write least-significant byte only.C:it sets counter 2 to read/write least-significant byte first
11、, followed by the most significant byte.D:it sets counter 2 to read/write least-significant byte only.【答案】: C10. Suppose that the 8254s control word is B, which description is correct?A:it selects mode 2. B:it selects BCD counting.C:it selects mode 3 and binary counting.D:it selects counter 1 and bi
12、nary counting.【答案】: C三. (10 points) The following program runs under 32-bit Visual C+ environment.#include stdafx.h#include stdio.hchar STRING512=27 hosts,120 disks and 3 printers#;int main(int argc, char* argv) _asm MOV DH,0XOR ECX,ECXLEA EBX,STRINGCONT:MOV DL,EBXCMP DL,#JE EXITINC EBXCMP DL,30HJB
13、CONTCMP DL,39HJA CONTINC ECXCMP DL,DHJBE CONTMOV DH,DLJMP CONTEXIT:return 0;Please choose the best answer.1. When this program runs to the label “EXIT”, the register CX= .A. 5B.6C. 7D.82. When this program runs to the label “EXIT”, the register DH= .A. 34HB.35HC.36HD.37H(每题5分)1.【答案】: B2.【答案】: D四. (10 points) The following program is developed under 32-bit Visual C+ environment, each integer takes 32 bits. The integer array “weight” holds many element, each element is the weight of an elephant; The integer “count” holds the total number of arr