DSEG SEGMENTD1 DB -1,5,2,6,-7,4CNT EQU $-D1RS DWDSEG ENDSSSEG SEGMENT STACKDB 256DUP(0)SSEG ENDSCSEG SEGMENTASSUM CS: CSEG,DS:DSEG, SS:SSEGSTART PROC FARPUSH DSXOR AX,AXPUSH AXMOV AX, DSEGMOV DS,AXMOV BX,OFFSETF D1MOV CX, CNTMOV DX, 0LP: MOV AL,[BX]CMP AL,0JGE CONTINC DXCONT :INC BXDEC CXJNZ LPMOV RS,DXRETSTART ______CSEG ENDSEND START程序中的PUSH DS、XOR AX,AX、PUSH AX三条指令的作用是______。

DSEG SEGMENT

D1 DB -1,5,2,6,-7,4

CNT EQU $-D1

RS DW

DSEG ENDS

SSEG SEGMENT STACK

DB 256DUP(0)

SSEG ENDS

CSEG SEGMENT

ASSUM CS: CSEG,DS:DSEG, SS:SSEG

START PROC FAR

PUSH DS

XOR AX,AX

PUSH AX

MOV AX, DSEG

MOV DS,AX

MOV BX,OFFSETF D1

MOV CX, CNT

MOV DX, 0

LP: MOV AL,[BX]

CMP AL,0

JGE CONT

INC DX

CONT :INC BX

DEC CX

JNZ LP

MOV RS,DX

RET

START ______

CSEG ENDS

END START

程序中的PUSH DS、XOR AX,AX、PUSH AX三条指令的作用是______。


相关考题:

下面的汇编语言源程序经汇编后,发现TEST [BX], 01H指令有语法错误,试问该指令的正确形式应该是 。 DSEG SEGMENT DAT DB 5,13,4,-2,6,23,44,-1,29,-3 CNT DW $-DAT DSEG ENDS SSEG SEGMENT STACK DB 256 DUP(0) SSEG ENDS CSEG SEGMENT ASSUME DS:DSEG,SS:SSEG,CS:CSEG START PROC FAR PUSH DS XOR AX,AX PUSH AX MOV AX,DSEG MOV DS,AX XOR AX,AX MOV BX,OFFSET DAT MOV CX,CNT LP: TEST [BX],01H JZ NEXT INC AH ADD AL,[BX] NEXT: INC BX LOOP LP SET START ENDP CSEG ENDS END START

根据下面的汇编语言源程序,其运行结果是在屏幕上显示 。 DSEG SEGMENT DAT DB 0FFH N EQU 3 BUF DB 3 DUP(‘?’) DB ‘$’ DSEG ENDS SSEG SEGMENT STACK DB 256 DUP(0) SSEG ENDS CSEG SEGMENT ASSUME DS:DSEG,SS:SSEG,CS:CSEG START: MOV AX,DSEG MOV DS,AX MOV BX,OFFSET BUF MOV SI,N MOV AL,DAT MOV AH,0 MOV CX,10 NEXT: XOR DX,DX DIV CX ADD DL,30H ;形成ASCII码 DEC SI MOV [BX+SI],DL OR SI,SI JNE NEXT LEA DX,BUF MOV AH,9 INT 21H MOV AH,4CH INT 21H CSEG ENDS END START

下面程序的功能是利用逻辑尺对BUF变量中的数据进行变换,执行该程序后,以RESULT为首地址的前两个字节单元中的数据依次为【 】。DSEG SEGMENTBUF DB 1,5,4,0,7,9,2,6L EQU 00111001B ;用做逻辑尺RESULT DB 10 DUP(?)DSEG ENDSSSEG SEGMENT STACKDB 256 DUP(0)SSEG ENDSCSEG SEGMENTASSUME DS:DSEG,SS:SSEG,CS:CSEGSTART PROC FARPUSH DSXOR AX,AXPUSH AXMOV AX,DSEGMOV DS,AXMOV SI,0MOV CX,8MOV DL,LGOON: SHR DL,1JC FILLMOV AL,BUF[SI]JMP NEXTFILL: MOV AL,OFFHNEXT: MOV RESULT[SI],ALINC SILOOP GOONRETSTART ENDPCSEG ENDSEND START

下面程序的功能是利用逻辑尺对BUF变量中的数据进行变换,执行该程序后,以RESULT为首地址的前2个字节单元中的数据,依次为______。DSEG SEGMENTBUF DB 1, 5, 4, 0, 7, 9, 2, 6L EQU 00111001B ; 用作逻辑尺RESULT DB 10 DUP(?)DSEG ENDSSSEG SEGMENT STACKDB 256 DUP(0)SSEG ENDSCSEG SEGMENTASSUME DS:DSEG, SS:SSEG, CS:CSEGSTART PROC FARPUSH DSXOR AX, AXPUSH AXMOV AX, DSEGMOV DS, AXMOV SI, 0MOV CX, 8MOV DL, LGOON: SHR DL, 1JC FILLMOV AL, BUF[SI]JMP NEXTFILL: MOV AL, OFFHNEXT: MOV RESULT [SI] , ALINC SILOOP GOONRETSTART ENDPCSEG ENDSEND START

运行下面的汇编语言程序:DSEG SEGMENTDAT DB 5,13,4,-2,-6,23,3,1,9,0CNT EQU $—DAT—1NUM DB ?DSEG ENDSSSEG SEGMENT STACKDB 256DUP(0)SSEG ENDSCSEG SEGMENTASSUME DS:DSEG,SS:SSEG,CS:CSEGSTART: MOV AX,DSEGMOV DS,AXMOV SI,OFFSETDATMOV CX,CNTXOR BL,BLLP: MOV AL,[SI]XOR AL,[SI+1]TEST AL,80HJNE NEXTINC BLNEXT: INC SILOOP LPMOV NUM,BLMOV AH,4CHINT 21HCSEG ENDSEND START在NUM内存单元中得到的结果是______。

下面的8086/8088 汇编语言程序中,主程序通过堆栈将有关信息传送给子程序 STRLEN。在主程序的【 】处填空,使程序能正常运行。DSEG SEGMENTARRAY DB 'Computer$',NUM DW 0DSEG ENDSSSEG SEGMENT STACKDB 256DUP(0)SSEG ENDSCSEGl SEGMENTASSUME DS:DSEG,SS:SSEG,CS:CSEGlSTART: MOV AX,DSEGMOV DS,AXMOV AX,OFFSETARRAYPUSH AXCALL【 】MOV NUM,AXMOV AH,4CHINT 21HCSEG l ENDSCSEG2 SEGMENTASSUME DS:DSEG,SS:SSEG,CS:CSEG2STRLEN PROC FARPUSH BPMOV BP,SPPUSH SIMOV SI,[BP+6]NEXT: CMP BYTE PTR[SI],'$'JZ DONE ;串尾吗?INC SIJMP NEXTDONE: MOV AX,SISUB AX,[BP+6]POP SIPOP BPRET 2STRLEN ENDPCSEG2 ENDSEND START

在下面的汇编语言程序横线处填空,使语句完整,保证程序正确执行。DSEG SEGMENTD1 DB -1,5,2,6,-7,4CNT EQU $-D1RS DWDSEG ENDSSSEG SEGMENT STACKDB 256DUP(0)SSEG ENDSCSEG SEGMENTASSUM CS: CSEG,DS:DSEG, SS:SSEGSTART PROC FARPUSH DSXOR AX,AXPUSH AXMOV AX, DSEGMOV DS,AXMOV BX,OFFSETF D1MOV CX, CNTMOV DX, 0LP: MOV AL,[BX]CMP AL,0JGE CONTINC DXCONT :INC BXDEC CXJNZ LPMOV RS,DXRETSTART ______CSEG ENDSEND START

执行下列指令后: STR1 DW ‘AB’ STR2 DB 16 DUP(?) CNT EQU $ -STR1 MOV CX,CNT (CL)= ( )A.10HB.12HC.OEHD.0FH

执行下列指令后,(CL)=______。 STR1 DW 'AB' STR2 DB 16DUP(?) CNT EQU $-STR1 MOV CX,CNT MOV AX,STR1 HLTA.10HB.0EHC.12HD.0FH