lokgotz
03-30-2003, 01:27 AM
hi guys...i hope u guys can help me in this.....
title Sort Program (Sort.asm)
; This program performs a bubble sorting
dosseg
.model small
.stack 1000h
.data
num dw 10 dup (?)
m dw ?
n dw ?
temp dw ?
inputkey db 3
db ?
db 3 dup (?)
message1 db 'Please enter 10 numbers : ', 0ah, 0dh, '$'
.code
main proc
mov ax, @data
mov ds, ax
mov ah, 9
mov dx, offset message1
int 21h
again1:
mov cx, 00ah
mov ah, 0ah
mov dx, offset inputkey
int 21h
LEA Si, num
LEA bx, inputkey
dec cx
jmp again1
inc bx
mov ch, 0
mov cl, [bx]
inc bx
AGAIN :
mov Al, [bx]
mov [SI] , AL
inc bx
inc SI
Loop AGAIN
main endp
end main
its causing an infinite loop.......can anyone try to debug this please....i have sleepless night doing this.....its my assignment and its due monday.....
title Sort Program (Sort.asm)
; This program performs a bubble sorting
dosseg
.model small
.stack 1000h
.data
num dw 10 dup (?)
m dw ?
n dw ?
temp dw ?
inputkey db 3
db ?
db 3 dup (?)
message1 db 'Please enter 10 numbers : ', 0ah, 0dh, '$'
.code
main proc
mov ax, @data
mov ds, ax
mov ah, 9
mov dx, offset message1
int 21h
again1:
mov cx, 00ah
mov ah, 0ah
mov dx, offset inputkey
int 21h
LEA Si, num
LEA bx, inputkey
dec cx
jmp again1
inc bx
mov ch, 0
mov cl, [bx]
inc bx
AGAIN :
mov Al, [bx]
mov [SI] , AL
inc bx
inc SI
Loop AGAIN
main endp
end main
its causing an infinite loop.......can anyone try to debug this please....i have sleepless night doing this.....its my assignment and its due monday.....