?? 1111.asm.bak
字號:
data segment
logo1 db 'Type in the num you want to do :$'
logo2 db 'Type in three letters you want to query:$'
words db 10 dup('$')
count dw ?
num dw ?
data ends
code segment
assume ds:data,cs:code
start:
mov ax,data
mov ds,ax
mov ah,09h
mov dx,offset logo1
int 21h
mov ah,01h
int 21h
sub al,30h
mov ah,0
mov count,ax
mov ah,02h
mov dl,0dh
int 21h
mov dl,0ah
int 21h
mov ah,09h
mov dx,offset logo2
int 21h
mov dx,count
mov num,dx
mov cx,dx
mov si,0
mov ah,01h
l1:
int 21h
mov words[si],al
inc si
loop l1
mov ah,02h
mov dl,0dh
int 21h
mov dl,0ah
int 21h
mov bx,num
dec bx
mov num,bx
mov cx,bx
mov si,0
l2:
push cx
mov cx,bx
mov di,si
add di,1
l5:
cmp di,num
ja l3
mov dl,words[di]
cmp words[si],dl
jb l4
xchg words[si],dl
xchg words[di],dl
l4:
inc di
loop l5
l3:
inc si
dec bx
pop cx
loop l2
mov dx,offset words
mov ah,09h
int 21h
mov ah,4ch
int 21h
code ends
end start
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -