org 100h
jmp inisial
data1 dw 3,1,7,2,5,6,4,8,9
org 115h
inisial: mov cx,8
mov dx,0
mov si,0
tukar: mov ax,data1[si]
cmp ax,data1[si+2]
jle ulang
mov bx,data1[si+2]
mov data1[si],bx
mov data1[si+2],ax
mov dx,01h
ulang: inc si
inc si
loop tukar
cmp dx,0
jg inisial
mov cx,9
mov di,103h
simpan: mov bx,[di]
push bx
inc di
inc di
loop simpan
int 20h
Rabu, 13 Mei 2009
Assemble Pengurutan
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar