问题 多项选择题

请编制程序,其功能是:求I×J矩阵的转置矩阵(矩阵中元素为字节型),并计算转置矩阵的每一行元素之和,然后存放在每一行最后一个字单元中。
例如:
内存中有04H,05H,06H,(第一行)01H,02H,03H(第二行)
结果为 04H,01H,05H,00H,05H,02H,07H,00H,06H,03H,09H,00H
部分程序已给出,其中原始数据由过程LOAD从文件1NPUT1.DAT中读入SOURCE开始的内存单元中。运算结果要求从RESULT开始存放,由过程SAVE保存到文件OUTPUT1.DAT中。
请填空BEGIN和END之间已经给出的一段源程序使其完整,需填空处已经用横线标出,每个空白一般只需要填一条指令或指令的一部分(指令助记符或操作数),也可以填入功能相当的多条指令,或删去BEGIN和END之间原有的代码并自行编程来完成所要求的功能。对程序必须进行汇编,并与IO.OBJ链接产生可执行文件,最终运行程序产生结果。调试中若发现整个程序中存在错误之处,请加以修改。
试题程序:

答案

参考答案:(A)ADCCH,0
(B)CMPDX,I
(C)ADDDI,B
(D)INC BX
(E)LPJ

解析:
此程序要实现的功能是:先求I×J矩阵的转置矩阵(矩阵中元素为字节型),再计算转置矩阵的每一行元素之和,然后存放在每一行最后一个字单元中。
先给N赋值为30,I赋值为3,J赋值为10。
程序的数据段中定义了四个字节型变量:原始数据区SOURCE、结果数据区RESULT、原始数据文件名NAME0、结果数据文件名NAME1;一个字型变量:SRC。数据段下面是堆栈段。堆栈段定义了一个256个字节的堆栈区。最后是代码段,告诉汇编程序,代码段、数据段和堆栈段分别属于段寄存器CS、 DS、SS。
将原始数据的偏移地址装入到SI中,结果数据存放的偏移地址装入到DI中。BX赋值为1,表示第一列。
LPJ段,先给累加和CX赋初值为0,DX赋值为1,表示第一行。
LPI段是要完成矩阵的转置,并且求和的功能。先将SI中内容即原始数据送AL中。再将CL与AL相加,加法结果可能产生进位,即CF=1,将进位放在DH中。所以第(1)空填写"ADCCH,0"。接着用STOS指令将第一行第一列的元素AL存入到DI中。SI地址加10,准备取第二行的元素。同时DX加1,将DX与I做比较,若DX小于等于I,则说明还有若干行的元素没处理完,转向LPI段;否则DX大于I时,说明I行所有的元素都已经处理完毕了。所以第(3)空填写"CMP DX,I"。接着将DI地址加2。因为除了将第一列的所有元素存放到DI中外,还存放了这些元素之和,并且和是占一个字的,即两个字节。所以第(3)空填写"ADD DI,2"。然后将表示列的BX加1,再将BX与J做比较,若BX小于等于J,说明还有若干列的元素没处理完,转向LPJ段;否则,BX大于J时,说明J列所有的元素都已经处理完毕了。所以,第(4)空填写"INCBX",空第(5)空填写"LPJ"。这样就完成了矩阵的转置和每一行元素的求和的功能。

阅读理解

要想成为最有吸引力的人,要注意生活中一些简单的细节。阅读下面六个有关如何成为最有吸引力的人的方法的描写,选出符合题中五个标题的选项,并在答题卡上将相应的选项的标号涂黑。选项中有一项多余选项。

_____1 Ask lots of questions

_____ 2. Great posture

_____ 3. Stay busy

_____ 4. Show your pearly whites ( or just smile)

_____5. Be interested in other persons

A.Don’t talk about yourself … remove attention from yourself. If you are interested in other persons, it will be helpful. And if you want to talk about yourself, you'll find that putting the other person first actually opens him up to return the favor and ask you questions. See how fun this is?

B.In other words, be humble. If you are a know-it-all (even if you really do know it all!), it really pushes people away. Rather, asking lots and lots of questions makes people feel like you care, you can be trusted, and you are... humble.

C.Walk like you know where you're going, and do so with good posture. Walk like you'll run over anyone who even attempts to hassle you. If you walk like this, you'll be spotted from a mile away.

D.Smile more, no matter how ugly your teeth are. I'm not kidding about this one. It's not all about the teeth. If you are smiling genuinely, you can draw everyone for 100 meters around to you.E. Perhaps you have seen someone who perhaps could be quite ugly but they have great posture and so suddenly they are really attractive? It's true. Your posture says a lot about you -- it says whether you have confidence, or simply if you really care. Talking physically, it is one of the most important physical characteristics you need !

F. Do you really know the power of this? We're told to stay busy to break away from  depression and feelings of anxiety. But did you know you should also stay busy to be really attractive? It's true. Always have something to do. Have you ever seen someone just sitting around, doing nothing? How unattractive. Always be busy with something, even if for some reason you have to make something up.

单项选择题