无法在masm中查看输出

时间:2013-10-09 19:52:20

标签: masm masm32

嗨,我是masm的新手,并已编写此代码用于冒泡排序。问题是我不明白如何检查输出(最终结果)?我知道如何在指定地址时查看数据段的内容(使用DOS debug -d),但我不明白我在内存中创建的数组究竟在哪里?请帮我看看如何检查输出。

.model small

.data
arr db 5h,7h,6h,4h,10h,09h

len db $-arr

.code

start: mov ax,@data

     mov ds,ax
     mov cl,len

lp1: mov bx,cx
     lea si,arr

lp2: mov al,[si]
     inc si
     cmp [si],al
     jb lp3
     xchg [si],al
     mov [si-1],al

lp3: dec bx
     jnz lp2

     loop lp1

     mov ah,4ch
     int 21h

end start

0 个答案:

没有答案
相关问题