data segment
a db 13,10,'please input first number:','$'
b db 13,10,'please input second number:','$'
c1 db 13,10,'its yuanma shows:','$'
x db ?
y db ?
data ends
code segment
assume cs:code,ds:data
start:mov ax,data
mov ds,ax
mov ah,09h
mov dx,offset a
int 21h
mov ah,01h
int 21h
sub al,30h
mov X,al
mov ah,09h
mov dx,offset b
int 21h
mov ah,01h
int 21h
sub al,30h
mov y,al
lea dx,c1
mov ah,09h
int 21h
mov dl,y
mov bl,x
cmp bl,dl
mov al,y ;暂设y 大
jb l1
mov al,x
l1:
MOV BL,AL
;以下输出bl
MOV AX,8
KK2:
PUSH AX
MOV CX,1
MOV DL,31H
RCL BL,CL
JC DISP
MOV DL,30H
DISP:
mov ah,02h
INT 21H
POP AX
DEC AX
JNZ KK2
MOV AH,4CH
INT 21H
CODE ENDS
END START
标签:汇编语言,试题