马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
;实现四位数的输出
DATAS SEGMENT
sum dw ? ,';此处输入数据段代码
DATAS ENDS
STACKS SEGMENT
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
mov cx,9999
again:
inc sum
loop again
mov si,0
mov ax,sum[si]
MOV BH,100
MOV BL,10
DIV BH
MOV CL,AH
MOV AH,0H
DIV BL
ADD AH,30H
ADD AL,30H
MOV CH,AH
MOV AH,02H
MOV DL,AL
INT 21H
MOV AH,02H
MOV DL,CH
INT 21H
MOV AL,CL
MOV AH,0H
DIV BL
ADD AH,30H
ADD AL,30H
MOV CH,AH
MOV AH,02H
MOV DL,AL
INT 21H
MOV AH,02H
MOV DL,CH
INT 21H
;此处输入代码段代码
MOV AH,4CH
INT 21H
CODES ENDS
END START
|