主题:求高手帮设计一汇编程序,找10个有符号数中最大数,要有用户键盘输入,屏幕显示输出功能
木叶忍者
[专家分:0] 发布于 2006-01-13 17:36:00
谢谢各位高手了先~
回复列表 (共1个回复)
沙发
小笨 [专家分:0] 发布于 2006-01-17 22:46:00
data segment
str db 10 dup(?)
mess db'please input numbers'
data ends
stack segment para stack'stack'
dw dup 100 dup(?)
stack ends
code segment
assume cs:code,ds:data,ss:stack
start:mov ax,data
mov ds,ax
lea dx,mess
mov ah,09h
int 21h
mov cx,10
input: mov si,offset str
mov ah,01h
int 21h
mov byte ptr[si],al
inc si
loop input
select: mov cx,10
lea si str
mov al,byte ptr[si]
compare:inc si
cmp al,byte ptr[si]
jle next
mov al,byte ptr[si]
next: loop compare
mov dl,al
mov ah,02h
int 21h
code ends
end start
我来回复