.386
.model flat
ExitProcess proto near32 stdcall,:dword
include io.h
.data
array byte 39h,38h,37h,36h,35h,34h,33h,32h,31h,30h
.code
_start:
mov ecx,10
dec ecx ;循环9次即可
AGN:
push ecx
xor edi,edi
AGN1:mov al,array[edi] ;此循环是把最大的数往后放
cmp al,array[edi+1]
jbe NEXT
xchg al,array[edi+1]
mov array[edi],al
NEXT:inc edi
loop AGN1
pop ecx
loop AGN
invoke ExitProcess,0
public _start
end