Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ask for improvement

Status
Not open for further replies.

popohoma

Programmer
Oct 20, 2002
5
0
0
US
Hi,

I wrote a assembly code that perform the compression of file. I want to ask if the following code can be improve or if you guys has a better algorithm. Please give me some advisement and improvement opinion.

thank you

Allen


Here is part of main code:


Filename db 20 dup (?)
Buffer db 20 dup (?)
command_line db 20 dup (?), '$'
compress_code db 4 dup (?)
Buffer db ?
tmpBuffer db ?
cCounter db 0
rCounter db 0
tmpCounter db 0
FHndl dw ?
out_handle dw ?


WriteCompressedCode:
push cx
lea di, compress_code
mov byte ptr [di], '*'
mov bl, rCounter
mov byte ptr [di+1], bl
mov bl, tmpBuffer
mov byte ptr [di+2], bl
mov ah, 40h
mov bx, out_handle
lea dx, compress_code
mov cx,3
int 21h
mov ah, 40h
mov cx, 1
lea dx, Buffer
int 21h
pop cx
jmp LP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top