问题 问答题

请编制程序,其功能是:内存中连续存放着20个无符号字节数序列,请将它们排成升序(从小到大)。
例如:
内存中有:01H,04H,02H…(假设后17个字节均大于04H)
结果为: 01H,02H,04H…(后跟17个字节,按从小到大的顺序排列)
部分程序已给出,其中原始数据由过程LOAD从文件INPUT.DAT中读入SOURCE开始的内存单元中。运算结果要求从 RESULT开始存放,由过程SAVE保存到文件OUTPUT.DAT中。
请填空BEGIN和END之间已给出的源程序使其完整,空白已用横线标出,每个空白一般只需一条指令,但采用功能相当的多条指令亦可,或删除BEGIN和END之间原有的代码并自行编程来完成所要求的功能。
对程序必须进行汇编,并与IO.OBJ链接产生可执行文件,最终运行程序产生结果。调试中若发现整个程序中存在错误之处,请加以修改。
【试题程序】
EXTRN LOAD:FAR,SAVE:FAR
N EQU 20
STAC SEGMENT STACK
DB 128 DUP()
STAC ENDS
DATA SEGMENT
SOURCE DB N DUP()
RESULT DB N DUP(0)
NAME0 DB ’INPUT.DAT’,0
NAME1 DB ’OUTPUT.DAT’,0
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA, SS:STAC
START PROC FAR
PUSH DS
XOR AX,AX
PUSH AX
MOV AX,DATA
MOV DS,AX
LEA DX,SOURCE ; 数据区起始地址
LEA SI,NAME0 ; 原始数据文件名
MOV CX,N ; 字节数
CALL LOAD ; 从’INPUT.DAT’中读取数据
; ******** BEGIN ********
LEA SI,SOURCE
LEA DI,RESULT
MOVCX,N
NEXT0: MOV AL,[SI]
MOV [DI],AL
INC SI
(1)
LOOP (2)
CLD
MOV BX, (3)
NEXT1: LEA SI,RESULT
MOV CX,BX
NEXT2: LOD (4)
CMP [SI],AL
JAE (5)
XCHG [SI], (6)
MOV [SI-1],AL
NEXT3: LOOP (7)
DEC (8)
JNZ (9)
; ******** END ********
LEA DX,RESULT ; 结果数据区首址
LEA SI,NAME1 ; 结果文件名
MOV CX,N; 结果字节数
CALL SAVE; 保存结果到文件
RET
START ENDP
CODE ENDS
END START

答案

参考答案:(1) INC DI (2) NEXT0 (3) N-1 (4) SB
(5) NEXT3 (6) AL (7) NEXT2 (8) BX (9) NEXT1

解析:
本题考查的是冒泡排序法的相关知识,要用冒泡排序法实现含20个无符号数的升序排序功能,则应先找出排序的两个关键问题,即算法和技巧。
本题的算法过程是从第一个数据开始,逐次比较相邻两个数据的大小,若前一个数据小于等于后一个数据,则不做处理:若前一个数据大于后一个数据,则应将两个数据交换位置,当比较进行到最后一个数据时结束第一趟比较,下一趟比较从第二个元素开始进行同样的操作,如此反复,直到从倒数第二个数据开始的比较处理为止。
需要指出的是,这里所采用的技巧是用串处理指令LODSB完成从结果数据区读取数据到AL并自动修改结果数据区的偏移地址,再用数据传送指令XCHG完成数据交换。

阅读理解

A firm handshake is key to interview success. As any serious job-hunter knows, it helps to dress smartly and smile at that all-important interview. But research has showed that a firm handshake is what really matters when it comes to impressing potential employers.

The US research looked at 98 undergraduates taking part in mock (模拟) interviews with businesses. As each undergraduate was graded on their overall performance, five "handshake raters" also marked them on their grasp, strength, duration, vigor and eye contact.

Professor Greg Stewart, from the University of Iowa, who led the study, said those who scored highly with the handshake raters were also considered to be the most hirable by the interviewers. Students with " wimpy" shakes were judged to be more timid and less impressive.

The study also found women with a firm handshake were likely to be evaluated more favorably than their male counterparts.

Professor Stewart said: "We've always heard that interviewers make up their mind about a person in the first two or three minutes of an interview. But we found that the first impression begins with a handshake that sets the tone for the rest of the interview. We don't consciously remember a person's handshake but it is one of the first non-verbal clues we get about the person's overall personality, and that impression is what we remember."

Women were less likely to have a highly rated handshake, partly because traditionally they shake hands less than men. But when women did possess a firm handshake, they were likely to be evaluated more favorably than their male counterparts.

Body language experts warn, however, that the firmness needs to be just right, - as an over enthusiastic "bone crusher" handshake can indicate self-importance, a controlling personality and a lack of trustworthiness.

The handshake is thought to have originated in medieval Europe as a way for kings and knights to show that they did not intend to harm each other and possessed no hidden weapons.

小题1:The passage is probably intended for ______.

A.job-hunters

B.an undergraduate

C.employers

D.handshake raters小题2:From the first paragraph we know that in an interview ______.

A.dressing smartly is more important than a firm handshake

B.smile has no effect on impressing potential employers

C.a firm handshake is more important than dressing smartly, and smile

D.dressing smartly, smile and a firm handshake are of the same importance小题3:Which of the following statements is NOT true according to the passage?

A.The firmer your handshake is the better impression you leave.

B.The undergraduates without a firm handshake are thought to be less impressive.

C.Generally speaking, women shake hands less with others.

D.It's said that the handshake dates back to medieval Europe.小题4:What is the main idea of the passage?

A.Women with a firm handshake were likely to leave a better impression than men.

B.A successful job interview starts with a firm handshake.

C.Dressing, smile and a firm handshake are all important to a successful job interview.

D.Job interview success depends on interviewees' body language.

问答题 案例分析题

美国百货业是竞争非常激烈的行业,平常都通过电视广告、媒体广告、邮件广告(目录)等来作商业促销。(一)百年老店遇到新挑战

蒙哥马利贸易公司这家百年老店为扩大其营业额,成立有汽车俱乐部,由会员顾客以电话购买东西,由公司送货上门。该公司以其既有的使用卡的顾客为对象,配合直接邮件(DM)展开广告攻势,在三年内总共招收了一百多万会员,成绩喜人!然而,直接邮件广告的推销力逐渐减弱之后,该公司发现有一半的信用卡会员对直接邮件广告根本不予理睬、往往不经阅读就随手丢弃了,形成浪费,于是,该公司决定采用“电话营销”,希望让:

(1)未成为汽车俱乐部会员的信用卡顾客加入俱乐部;

(2)既有的汽车俱乐部会员能增加购买数量。

(二)有效的运用顾客资料

该公司在实施电话营销之后,一年之内就有了可观的成绩:

1、汽车俱乐部又增加了新会员十五万多人。

2、既有会员的购买量大幅回升。

3、未成为会员的顾客。会利用该公司直接邮寄广告——商品目录为其主要内容,以期其逛该百货公司之际,购买更多的商品。之所以会产生这么好的效果,是因为顾客感觉到蒙哥马利公司重视他们,时常打电话给他们。公司采用电话营销是非常正确的。该公司汽车俱乐部的负责人约翰·布莱克说:“俱乐部采用电话营销后获得了空前的成功”。与此停同时,该公司还采取了一些公共宣传手段来提升企业的知名度和美誉度,取得了较好的促销效果。

直复营销的方式主要有哪些?案例中该公司采用了哪种直复营销方式?