home *** CD-ROM | disk | FTP | other *** search
- ;;
- ;; aPLib compression library - the smaller the better :)
- ;;
- ;; TASM32/TLINK32 example, using aplib.dll
- ;;
- ;; Copyright (c) 1998-2000 by Joergen Ibsen / Jibz
- ;; All Rights Reserved
- ;;
-
- .386p
- .model flat
-
- locals
- jumps
-
- .data?
-
- dest db 128 dup (?)
- check db 128 dup (?)
- workmem db 640*1024 dup (?)
-
- .data
-
- src db 'This is just a simple little test, to see if aPLib works!!!',0
- srclen dd ($-src)
-
- capt db 'aPLib DLL Test',0
-
- .code
-
- extrn _aP_pack : near
- extrn _aP_depack_asm : near
- extrn _aP_depack_asm_fast : near
-
- extrn MessageBoxA : proc
- extrn ExitProcess : proc
-
- aplib_asm_test:
- ; compress src -> dest
- push 0 ; no callback, hence NULL
- push offset workmem ; 1mb of workmem
- push [srclen] ; length
- push offset dest ; destination
- push offset src ; source
- call _aP_pack ; compress
-
- ; decompress dest -> check
- push offset check ; destination
- push offset dest ; source
- call _aP_depack_asm_fast ; decompress
-
- ; print out check to verify
- push 0 ; uType
- push offset capt ; caption
- push offset check ; text
- push 0 ; master handle
- call MessageBoxA ; show message
-
- ; exit
- call ExitProcess
-
- END aplib_asm_test
-