5个回答
展开全部
所述DATAS段DB 0
; ------------------------------ -
代码段
假设CS:代码,,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX
I0:MOV AH, 1
INT 21H
CMP AL,0DH
JZ L1
CMP AL,'0'
JB I0
CMP AL,'9'
> JA I0
SUB AL,30H
MOV X,AL
I1:MOV AH,1
INT 21H
CMP AL,0DH
JZ L1 BR /> CMP AL,'0'
JB I1
CMP AL,'9'
JA I1
SUB AL,30H
MOV BH,AL
> MOV AL,X
MOV BL,10
MUL BL
ADD AL,BH
MOV X,AL
---------- ----------
L1:
MOV AH,MOV DL,2
INT 21H
MOV DL,13
INT 21H
--------------------
MOV AL,X
MOV BL MOV AH,, 16
DIV BL
地址AL,30H
MOV DL,AL
<br PUSH AX MOV AH,2
INT 21H POP AX
BR /> CMP AH,10
JB L3
地址啊,07H
L3:
添加啊,
30H MOV DL,AH
MOV AH, 2
INT 21H退出
MOV AH,4CH
INT 21H
码ENDS
完START
; ====== =============================
上面的程序,我能。
; ------------------------------ -
代码段
假设CS:代码,,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX
I0:MOV AH, 1
INT 21H
CMP AL,0DH
JZ L1
CMP AL,'0'
JB I0
CMP AL,'9'
> JA I0
SUB AL,30H
MOV X,AL
I1:MOV AH,1
INT 21H
CMP AL,0DH
JZ L1 BR /> CMP AL,'0'
JB I1
CMP AL,'9'
JA I1
SUB AL,30H
MOV BH,AL
> MOV AL,X
MOV BL,10
MUL BL
ADD AL,BH
MOV X,AL
---------- ----------
L1:
MOV AH,MOV DL,2
INT 21H
MOV DL,13
INT 21H
--------------------
MOV AL,X
MOV BL MOV AH,, 16
DIV BL
地址AL,30H
MOV DL,AL
<br PUSH AX MOV AH,2
INT 21H POP AX
BR /> CMP AH,10
JB L3
地址啊,07H
L3:
添加啊,
30H MOV DL,AH
MOV AH, 2
INT 21H退出
MOV AH,4CH
INT 21H
码ENDS
完START
; ====== =============================
上面的程序,我能。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
DSEG SEGMENT
INPUT DB 'INPUT A NUMBER:','$'
OUTPUT DB 32,'RESULT IS:','$'
NUMBER DB 3
DB ?
db 3 DUP(0)
DSEG ENDS
CSEG SEGMENT
assume cs:CSEG, ds:DSEG
MAIN PROC FAR
mov ax, dseg
mov ds, ax
lea dx,INPUT
mov ah,9
int 21h
lea dx,NUMBER
mov ah,0ah
int 21h
lea dx,OUTPUT
mov ah,9
int 21h
mov bl,NUMBER+2
sub bl,30h
cmp NUMBER+1,1
jz jp0
mov al,10
mul bl
add al,NUMBER+3
sub al,30h
mov bl,al
jp0:mov ah,2
mov cx,8
jp1:shl bl,1
mov dl,'1'
jc out1
dec dl
out1:int 21h
loop jp1
mov ah,1 ;按任意键退出
int 21h
mov ax, 4c00h
int 21h
MAIN ENDP
CSEG ENDS
END MAIN
0~99都有效 欢迎追问 求满意
INPUT DB 'INPUT A NUMBER:','$'
OUTPUT DB 32,'RESULT IS:','$'
NUMBER DB 3
DB ?
db 3 DUP(0)
DSEG ENDS
CSEG SEGMENT
assume cs:CSEG, ds:DSEG
MAIN PROC FAR
mov ax, dseg
mov ds, ax
lea dx,INPUT
mov ah,9
int 21h
lea dx,NUMBER
mov ah,0ah
int 21h
lea dx,OUTPUT
mov ah,9
int 21h
mov bl,NUMBER+2
sub bl,30h
cmp NUMBER+1,1
jz jp0
mov al,10
mul bl
add al,NUMBER+3
sub al,30h
mov bl,al
jp0:mov ah,2
mov cx,8
jp1:shl bl,1
mov dl,'1'
jc out1
dec dl
out1:int 21h
loop jp1
mov ah,1 ;按任意键退出
int 21h
mov ax, 4c00h
int 21h
MAIN ENDP
CSEG ENDS
END MAIN
0~99都有效 欢迎追问 求满意
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
DATASEGMENT
DATAENDS
CODESEGMENT
ASSUMECS:CODE,DS:DATA
START:MOVAX,DATA
MOVDS,AX
AGAIN:MOVAH,1
INT21H
CMPAL,'0'
JBAGAIN
CMPAL,'9'
JBEA
CMPAL,'A'
JBAGAIN
CMPAL,'F'
JBEB
CMPAL,'a'
JBAGAIN
CMPAL,'f'
JBEC
JMPAGAIN
A:SUBAL,30H
JMPOK
B:SUBAL,37H
JMPOK
C:SUBAL,57H
JMPOK
OK:XORAH,AH
AAM
MOVDH,AL
MOVDL,AH
ADDDL,30H
MOVAH,2
INT21H
MOVDL,DH
ADDDL,30H
INT21H
MOVAH,4CH
INT21H
CODEENDS
ENDSTART
DATAENDS
CODESEGMENT
ASSUMECS:CODE,DS:DATA
START:MOVAX,DATA
MOVDS,AX
AGAIN:MOVAH,1
INT21H
CMPAL,'0'
JBAGAIN
CMPAL,'9'
JBEA
CMPAL,'A'
JBAGAIN
CMPAL,'F'
JBEB
CMPAL,'a'
JBAGAIN
CMPAL,'f'
JBEC
JMPAGAIN
A:SUBAL,30H
JMPOK
B:SUBAL,37H
JMPOK
C:SUBAL,57H
JMPOK
OK:XORAH,AH
AAM
MOVDH,AL
MOVDL,AH
ADDDL,30H
MOVAH,2
INT21H
MOVDL,DH
ADDDL,30H
INT21H
MOVAH,4CH
INT21H
CODEENDS
ENDSTART
追问
你这个程序怎么回事啊??
追答
格式有点问题,但程序是没错的,文本文档直接拷过来的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
DSEG SEGMENT
输入DB'输入一个数字:','$'
输出DB 32,“结果是:','$'
NUMBER DB 3
DB?
DB 3 DUP(0)
DSEG ENDS
的CSEG分类
假设CS:DS:CSEG,DSEG
MAIN PROC FAR
MOV AX,DSEG
MOV DS,AX
LEA DX,输入
MOV AH,9
INT 21H
LEA DX,NUMBER
MOV AH,0AH BR /> INT 21H
LEA DX,输出
MOV AH,9
INT 21H
数+2
子BL,30H MOV BL,
CMP NUMBER + 1,1
JZ jp0
MOV AL,10
MUL BL
添加人,数+3
子人,30H
MOV BL, AL 器JP 0:MOV AH,2
到mov cx,8
JP1:SHL BL,1
MOV DL,'1'
JC OUT1
十二月DL OUT1:INT 21H
循环JP1
MOV AH,1,按任意键退出
INT 21H
MOV AX,4c00h />诠释21H的
MAIN ENDP
CSEG ENDS
END主要
099欢迎,有效地询问满意度
输入DB'输入一个数字:','$'
输出DB 32,“结果是:','$'
NUMBER DB 3
DB?
DB 3 DUP(0)
DSEG ENDS
的CSEG分类
假设CS:DS:CSEG,DSEG
MAIN PROC FAR
MOV AX,DSEG
MOV DS,AX
LEA DX,输入
MOV AH,9
INT 21H
LEA DX,NUMBER
MOV AH,0AH BR /> INT 21H
LEA DX,输出
MOV AH,9
INT 21H
数+2
子BL,30H MOV BL,
CMP NUMBER + 1,1
JZ jp0
MOV AL,10
MUL BL
添加人,数+3
子人,30H
MOV BL, AL 器JP 0:MOV AH,2
到mov cx,8
JP1:SHL BL,1
MOV DL,'1'
JC OUT1
十二月DL OUT1:INT 21H
循环JP1
MOV AH,1,按任意键退出
INT 21H
MOV AX,4c00h />诠释21H的
MAIN ENDP
CSEG ENDS
END主要
099欢迎,有效地询问满意度
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
DATAS SEGMENT
X DB 0
DATAS ENDS
;--------------------------------
CODES SEGMENT
ASSUME CS:CODES, DS:DATAS
START:
MOV AX, DATAS
MOV DS, AX
I0: MOV AH, 1
INT 21H
CMP AL, 0DH
JZ L1
CMP AL, '0'
JB I0
CMP AL, '9'
JA I0
SUB AL, 30H
MOV X, AL
I1: MOV AH, 1
INT 21H
CMP AL, 0DH
JZ L1
CMP AL, '0'
JB I1
CMP AL, '9'
JA I1
SUB AL, 30H
MOV BH, AL
MOV AL, X
MOV BL, 10
MUL BL
ADD AL, BH
MOV X, AL
;--------------------
L1:
MOV DL, 10
MOV AH, 2
INT 21H
MOV DL, 13
INT 21H
;--------------------
MOV AL, X
MOV AH, 0
MOV BL, 16
DIV BL
ADD AL, 30H
MOV DL, AL
PUSH AX
MOV AH, 2
INT 21H
POP AX
CMP AH, 10
JB L3
ADD AH, 07H
L3:
ADD AH, 30H
MOV DL, AH
MOV AH, 2
INT 21H
EXIT:
MOV AH, 4CH
INT 21H
CODES ENDS
END START
;===================================
上述程序,可以的。
X DB 0
DATAS ENDS
;--------------------------------
CODES SEGMENT
ASSUME CS:CODES, DS:DATAS
START:
MOV AX, DATAS
MOV DS, AX
I0: MOV AH, 1
INT 21H
CMP AL, 0DH
JZ L1
CMP AL, '0'
JB I0
CMP AL, '9'
JA I0
SUB AL, 30H
MOV X, AL
I1: MOV AH, 1
INT 21H
CMP AL, 0DH
JZ L1
CMP AL, '0'
JB I1
CMP AL, '9'
JA I1
SUB AL, 30H
MOV BH, AL
MOV AL, X
MOV BL, 10
MUL BL
ADD AL, BH
MOV X, AL
;--------------------
L1:
MOV DL, 10
MOV AH, 2
INT 21H
MOV DL, 13
INT 21H
;--------------------
MOV AL, X
MOV AH, 0
MOV BL, 16
DIV BL
ADD AL, 30H
MOV DL, AL
PUSH AX
MOV AH, 2
INT 21H
POP AX
CMP AH, 10
JB L3
ADD AH, 07H
L3:
ADD AH, 30H
MOV DL, AH
MOV AH, 2
INT 21H
EXIT:
MOV AH, 4CH
INT 21H
CODES ENDS
END START
;===================================
上述程序,可以的。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询