data segment
var db 12,17,22,76,33,24,90
buf db 4 dup(?)
data ends
code segment
assume cs:code ds:data
start:
mov ax,data
mov ds,ax
mov bx,0
mov cx,sizeof var
dec cx
loop1:
mov di,cx
mov si,1
mov al,var
loop2:
mov dl,var
cmp al,dl
jle next
xchg al,var
mov var,al
next:
inc si
pusha
call show
call clears
call timer
popa
loop loop2
inc bx
mov ah,4ch
int 21h
code ends
end start
;88888888888888888888888888888888888888888888888888888888888888888
show proc near
start:
mov bx,0
mov di,2
mov cl,10
again:
mov ah,0
mov al,var
lop:
div cl
add ah,30h
mov buf,ah
dec di
cmp al,0
je net
mov ah,0
jmp lop
net:
mov ,2ch
mov di,0
net1:
mov dl,buf
inc di
mov ah,2
int 21h
cmp di,3
jle net1
inc bx
cmp bx,7
jnz next
next:
mov di,2
jmp again
show endp
;888888888888888888888888888888888888888888888888888888888888
;************************************************************
timer proc near
mov bx,100
wait:
mov cx,55afh
del1ms:
loop del1ms
dec bx
jnz wait
timer endp
;************************************************************
;////////////////////////////////////////////////////////////
clears proc near
mov ax,0600h
mov dh,71h
mov cx,0000h
mov dx,184fh
int 10h
mov ah,02h
mov bh,00
mov dh,00
mov dl,15
int 10h
clears endp
;////////////////////////////////////////////////////////////
Posted on 2003-09-25 06:53:50 by tomorrow
You're not going back to loop1 anywhere.
Posted on 2003-09-25 07:07:49 by Sephiroth3