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
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