14 |
15 | |
16 |
17 |
22 |
23 | Acknowledgements
24 |
25 | Greetings and thanks to:
26 |
27 |
28 | - d'b for our continuous discussions of compression techniques :)
29 | - TAD for all the great ideas and the good discussions
30 | - The people who made the Epsilon Compression Page
31 | - Pasi 'Albert' Ojala for his info on PuCrunch
32 | - RIT Research Labs for making Dos Navigator .. it's the BEST!
33 | - LiuTaoTao for making TR .. one of the best debuggers around!
34 | - Eugene Suslikov (SEN) for making HIEW .. it ROCKS!
35 | - Oleg for his work on the TMT Pascal code
36 | - Veit Kannegieser for his work on the VPascal code
37 | - METALBRAIN for his work on the 16bit depackers
38 | - Gautier for his work on the Ada code
39 | - Alexey Solodovnikov for his work on the Delphi code
40 | - Steve Hutchesson for his work on the MASM32 code
41 | - Agner Fog for objconv and his great info on calling conventions
42 | - All other people who make good software freely available for
43 | non-commercial use!
44 |
45 |
46 | A special thanks to the beta-testers:
47 |
48 |
49 | - x-otic (thx mate ;)
50 | - Oleg Prokhorov (great optimisations and bug reports!)
51 | - Lawrence E. Boothby
52 | - METALBRAIN (believe in miracles, my friend ;)
53 | - eL PuSHeR
54 | - Elli
55 | - Veit Kannegieser
56 | - Gautier
57 |
58 |
59 |
60 |
61 |
66 |
67 | |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/tools/files/applib/doc/html/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
20 |
21 | << prev |
22 | home |
23 | next >>
24 |
25 |
26 | aPLib Compression Library
27 |
28 | Welcome to the aPLib documentation!
29 |
30 | aPLib is a compression library based on the algorithm used
31 | in aPACK (my 16-bit executable packer). aPLib is an easy-to-use alternative
32 | to many of the heavy-weight compression libraries available.
33 |
34 | The compression ratios achieved by aPLib combined with the speed and
35 | tiny footprint of the decompressors (as low as 169 bytes!) makes it the ideal
36 | choice for many products.
37 |
38 | The following topics are available:
39 |
40 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Copyright © 1998-2014 Jørgen Ibsen. All Rights Reserved.
61 | Products and company names mentioned may be the trademarks of their respective owners.
62 |
63 |
64 | |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/tools/files/applib/doc/html/license.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
14 |
15 | |
16 |
17 |
22 |
23 | License
24 |
25 | aPLib is free to use even for commercial use. If you use
26 | aPLib in a product, an acknowledgement would be appreciated, e.g. by adding
27 | something like the following to the documentation:
28 |
29 |
30 | This product uses the aPLib compression library,
31 | Copyright © 1998-2014 Jørgen Ibsen, All Rights Reserved.
32 | For more information, please visit: http://www.ibsensoftware.com/
33 |
34 |
35 | You may not distribute aPLib without all of the files.
36 |
37 | You may not edit or reverse engineer any of the files (except the header
38 | files and the decompression code, which you may edit as long as you do not
39 | remove the copyright notice).
40 |
41 | You may not sell aPLib, or any part of it, for money (except for
42 | charging for the media).
43 |
44 | #ifndef COMMON_SENSE
45 |
46 |
47 |
48 | |
49 | This software is provided "as is". In no event shall I, the author,
50 | be liable for any kind of loss or damage arising out of the use,
51 | abuse or the inability to use this software. USE IT ENTIRELY AT
52 | YOUR OWN RISK!
53 |
54 | This software comes without any kind of warranty, either expressed
55 | or implied, including, but not limited to the implied warranties of
56 | merchantability or fitness for any particular purpose.
57 |
58 | If you do not agree with these terms or if your jurisdiction does
59 | not allow the exclusion of warranty and liability as stated above
60 | you are NOT allowed to use this software at all.
61 | |
62 |
63 |
64 |
65 | #else
66 |
67 |
68 |
69 | |
70 | Bla bla bla .. the usual stuff - you know it anyway:
71 |
72 | If anything goes even remotely wrong - blame _yourself_, NOT me!
73 | |
74 |
75 |
76 |
77 | #endif
78 |
79 |
80 |
81 |
82 |
83 |
88 |
89 | |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/tools/files/applib/doc/html/mwcos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/doc/html/mwcos.png
--------------------------------------------------------------------------------
/tools/files/applib/doc/html/vcss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/doc/html/vcss.png
--------------------------------------------------------------------------------
/tools/files/applib/doc/html/xhtml10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/doc/html/xhtml10.png
--------------------------------------------------------------------------------
/tools/files/applib/example/appack.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/example/appack.exe
--------------------------------------------------------------------------------
/tools/files/applib/example/make_bcc.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | ECHO --- Building aPLib Borland C/C++ example ---
3 | ECHO.
4 |
5 | bcc32 -I..\lib\omf appack.c ..\lib\omf\aplib.lib -eappack.exe
6 |
--------------------------------------------------------------------------------
/tools/files/applib/example/make_dll.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | ECHO --- Building aPLib Visual C/C++ DLL example ---
3 | ECHO.
4 |
5 | cl /nologo /O2 /I..\lib\dll /DAP_DLL appack.c ..\lib\dll\aplib.lib
6 |
7 | ECHO.
8 | ECHO Remember to copy APLIB.DLL here before running.
9 |
--------------------------------------------------------------------------------
/tools/files/applib/example/make_pc.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | ECHO --- Building aPLib Pelles C example ---
3 | ECHO.
4 |
5 | cc /Ot /I..\lib\coff appack.c ..\lib\coff\aplib.lib
6 |
--------------------------------------------------------------------------------
/tools/files/applib/example/make_vc.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | ECHO --- Building aPLib Visual C/C++ example ---
3 | ECHO.
4 |
5 | cl /nologo /O2 /I..\lib\coff appack.c ..\lib\coff\aplib.lib
6 |
--------------------------------------------------------------------------------
/tools/files/applib/example/make_wat.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | ECHO --- Building aPLib Watcom C/C++ example ---
3 | ECHO.
4 |
5 | wcl386 /oneax /oe /oh /5r /zc -zld /i=..\lib\omf appack.c /"library ..\lib\omf\aplib"
6 |
--------------------------------------------------------------------------------
/tools/files/applib/example/makefile.cyg:
--------------------------------------------------------------------------------
1 | ##
2 | ## aPLib compression library - the smaller the better :)
3 | ##
4 | ## Cygwin GCC makefile
5 | ##
6 | ## Copyright (c) 1998-2014 Joergen Ibsen
7 | ## All Rights Reserved
8 | ##
9 |
10 | target = appack.exe
11 | objects = appack.o
12 |
13 | cflags = -Wall -O2 -s -mno-cygwin
14 | ldflags = $(cflags)
15 | incdir = ../lib/coff
16 | libs = $(incdir)/aplib.lib
17 |
18 | .PHONY: all clean
19 |
20 | all: $(target)
21 |
22 | $(target): $(objects)
23 | gcc $(ldflags) -o $@ $^ $(libs)
24 |
25 | %.o : %.c
26 | gcc -c -I$(incdir) $(cflags) -o $@ $<
27 |
28 | clean:
29 | $(RM) $(objects) $(target)
30 |
--------------------------------------------------------------------------------
/tools/files/applib/example/makefile.elf:
--------------------------------------------------------------------------------
1 | ##
2 | ## aPLib compression library - the smaller the better :)
3 | ##
4 | ## GCC makefile (Linux, FreeBSD, BeOS and QNX)
5 | ##
6 | ## Copyright (c) 1998-2014 Joergen Ibsen
7 | ## All Rights Reserved
8 | ##
9 |
10 | target = appack
11 | objects = appack.o
12 |
13 | cflags = -Wall -O2 -s
14 | ldflags = $(cflags)
15 |
16 | LBITS := $(shell getconf LONG_BIT)
17 | ifeq ($(LBITS), 64)
18 | incdir = ../lib/elf64
19 | else
20 | incdir = ../lib/elf
21 | endif
22 |
23 | libs = $(incdir)/aplib.a
24 |
25 | .PHONY: all clean
26 |
27 | all: $(target)
28 |
29 | $(target): $(objects)
30 | gcc $(ldflags) -o $@ $^ $(libs)
31 |
32 | %.o : %.c
33 | gcc -c -I$(incdir) $(cflags) -o $@ $<
34 |
35 | clean:
36 | $(RM) $(objects) $(target)
37 |
--------------------------------------------------------------------------------
/tools/files/applib/example/makefile.mgw:
--------------------------------------------------------------------------------
1 | ##
2 | ## aPLib compression library - the smaller the better :)
3 | ##
4 | ## MinGW GCC makefile
5 | ##
6 | ## Copyright (c) 1998-2014 Joergen Ibsen
7 | ## All Rights Reserved
8 | ##
9 |
10 | target = appack.exe
11 | objects = appack.o
12 |
13 | cflags = -Wall -O2 -s
14 | ldflags = $(cflags)
15 | incdir = ../lib/coff
16 | libs = $(incdir)/aplib.lib
17 |
18 | .PHONY: all clean
19 |
20 | all: $(target)
21 |
22 | $(target): $(objects)
23 | gcc $(ldflags) -o $@ $^ $(libs)
24 |
25 | %.o : %.c
26 | gcc -c -I$(incdir) $(cflags) -o $@ $<
27 |
28 | clean:
29 | $(RM) $(objects) $(target)
30 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/coff/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * COFF format header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | unsigned int __cdecl aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (__cdecl *callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | unsigned int __cdecl aP_workmem_size(unsigned int inputsize);
31 |
32 | unsigned int __cdecl aP_max_packed_size(unsigned int inputsize);
33 |
34 | unsigned int __cdecl aP_depack_asm(const void *source, void *destination);
35 |
36 | unsigned int __cdecl aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | unsigned int __cdecl aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | unsigned int __cdecl aP_crc32(const void *source, unsigned int length);
44 |
45 | unsigned int __cdecl aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (__cdecl *callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | unsigned int __cdecl aPsafe_check(const void *source);
53 |
54 | unsigned int __cdecl aPsafe_get_orig_size(const void *source);
55 |
56 | unsigned int __cdecl aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/coff/aplib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/coff/aplib.lib
--------------------------------------------------------------------------------
/tools/files/applib/lib/coff64/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * COFF 64-bit format header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | unsigned int aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | unsigned int aP_workmem_size(unsigned int inputsize);
31 |
32 | unsigned int aP_max_packed_size(unsigned int inputsize);
33 |
34 | unsigned int aP_depack_asm(const void *source, void *destination);
35 |
36 | unsigned int aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | unsigned int aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | unsigned int aP_crc32(const void *source, unsigned int length);
44 |
45 | unsigned int aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | unsigned int aPsafe_check(const void *source);
53 |
54 | unsigned int aPsafe_get_orig_size(const void *source);
55 |
56 | unsigned int aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/coff64/aplib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/coff64/aplib.lib
--------------------------------------------------------------------------------
/tools/files/applib/lib/dll/aplib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/dll/aplib.dll
--------------------------------------------------------------------------------
/tools/files/applib/lib/dll/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * DLL header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | __declspec(dllimport) unsigned int __stdcall aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (__stdcall *callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | __declspec(dllimport) unsigned int __stdcall aP_workmem_size(unsigned int inputsize);
31 |
32 | __declspec(dllimport) unsigned int __stdcall aP_max_packed_size(unsigned int inputsize);
33 |
34 | __declspec(dllimport) unsigned int __stdcall aP_depack_asm(const void *source, void *destination);
35 |
36 | __declspec(dllimport) unsigned int __stdcall aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | __declspec(dllimport) unsigned int __stdcall aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | __declspec(dllimport) unsigned int __stdcall aP_crc32(const void *source, unsigned int length);
44 |
45 | __declspec(dllimport) unsigned int __stdcall aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (__stdcall *callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | __declspec(dllimport) unsigned int __stdcall aPsafe_check(const void *source);
53 |
54 | __declspec(dllimport) unsigned int __stdcall aPsafe_get_orig_size(const void *source);
55 |
56 | __declspec(dllimport) unsigned int __stdcall aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/dll/aplib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/dll/aplib.lib
--------------------------------------------------------------------------------
/tools/files/applib/lib/dll64/aplib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/dll64/aplib.dll
--------------------------------------------------------------------------------
/tools/files/applib/lib/dll64/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * DLL 64-bit header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | __declspec(dllimport) unsigned int aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | __declspec(dllimport) unsigned int aP_workmem_size(unsigned int inputsize);
31 |
32 | __declspec(dllimport) unsigned int aP_max_packed_size(unsigned int inputsize);
33 |
34 | __declspec(dllimport) unsigned int aP_depack_asm(const void *source, void *destination);
35 |
36 | __declspec(dllimport) unsigned int aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | __declspec(dllimport) unsigned int aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | __declspec(dllimport) unsigned int aP_crc32(const void *source, unsigned int length);
44 |
45 | __declspec(dllimport) unsigned int aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | __declspec(dllimport) unsigned int aPsafe_check(const void *source);
53 |
54 | __declspec(dllimport) unsigned int aPsafe_get_orig_size(const void *source);
55 |
56 | __declspec(dllimport) unsigned int aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/dll64/aplib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/dll64/aplib.lib
--------------------------------------------------------------------------------
/tools/files/applib/lib/elf/aplib.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/elf/aplib.a
--------------------------------------------------------------------------------
/tools/files/applib/lib/elf/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * ELF format header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | unsigned int aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | unsigned int aP_workmem_size(unsigned int inputsize);
31 |
32 | unsigned int aP_max_packed_size(unsigned int inputsize);
33 |
34 | unsigned int aP_depack_asm(const void *source, void *destination);
35 |
36 | unsigned int aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | unsigned int aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | unsigned int aP_crc32(const void *source, unsigned int length);
44 |
45 | unsigned int aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | unsigned int aPsafe_check(const void *source);
53 |
54 | unsigned int aPsafe_get_orig_size(const void *source);
55 |
56 | unsigned int aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/elf64/aplib.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/elf64/aplib.a
--------------------------------------------------------------------------------
/tools/files/applib/lib/elf64/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * ELF 64-bit format header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | unsigned int aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | unsigned int aP_workmem_size(unsigned int inputsize);
31 |
32 | unsigned int aP_max_packed_size(unsigned int inputsize);
33 |
34 | unsigned int aP_depack_asm(const void *source, void *destination);
35 |
36 | unsigned int aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | unsigned int aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | unsigned int aP_crc32(const void *source, unsigned int length);
44 |
45 | unsigned int aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (*callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | unsigned int aPsafe_check(const void *source);
53 |
54 | unsigned int aPsafe_get_orig_size(const void *source);
55 |
56 | unsigned int aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/omf/aplib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * OMF format header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef APLIB_H_INCLUDED
13 | #define APLIB_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | unsigned int __cdecl aP_pack(const void *source,
24 | void *destination,
25 | unsigned int length,
26 | void *workmem,
27 | int (__cdecl *callback)(unsigned int, unsigned int, unsigned int, void *),
28 | void *cbparam);
29 |
30 | unsigned int __cdecl aP_workmem_size(unsigned int inputsize);
31 |
32 | unsigned int __cdecl aP_max_packed_size(unsigned int inputsize);
33 |
34 | unsigned int __cdecl aP_depack_asm(const void *source, void *destination);
35 |
36 | unsigned int __cdecl aP_depack_asm_fast(const void *source, void *destination);
37 |
38 | unsigned int __cdecl aP_depack_asm_safe(const void *source,
39 | unsigned int srclen,
40 | void *destination,
41 | unsigned int dstlen);
42 |
43 | unsigned int __cdecl aP_crc32(const void *source, unsigned int length);
44 |
45 | unsigned int __cdecl aPsafe_pack(const void *source,
46 | void *destination,
47 | unsigned int length,
48 | void *workmem,
49 | int (__cdecl *callback)(unsigned int, unsigned int, unsigned int, void *),
50 | void *cbparam);
51 |
52 | unsigned int __cdecl aPsafe_check(const void *source);
53 |
54 | unsigned int __cdecl aPsafe_get_orig_size(const void *source);
55 |
56 | unsigned int __cdecl aPsafe_depack(const void *source,
57 | unsigned int srclen,
58 | void *destination,
59 | unsigned int dstlen);
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /* APLIB_H_INCLUDED */
66 |
--------------------------------------------------------------------------------
/tools/files/applib/lib/omf/aplib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/applib/lib/omf/aplib.lib
--------------------------------------------------------------------------------
/tools/files/applib/readme.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | ______ ______ ____ ______ ____
4 | _\__ /_ _\ /_ _\ /___ _\____/ _\ /___
5 | / // / // / // /___ / /
6 | / / // / // / // / // / /
7 | /_ / //_ ___//_ / //_ / //_ / /
8 | /______\ /___\ /______\ /______\ /______\
9 | -= t h e s m a l l e r t h e b e t t e r =-
10 |
11 | Copyright (c) 1998-2014 Joergen Ibsen, All Rights Reserved
12 |
13 | http://www.ibsensoftware.com/
14 |
15 |
16 |
17 | About
18 | -----
19 |
20 | aPLib is a compression library based on the algorithm used in aPACK (my
21 | 16-bit executable packer). aPLib is an easy-to-use alternative to many of the
22 | heavy-weight compression libraries available.
23 |
24 | The compression ratios achieved by aPLib combined with the speed and tiny
25 | footprint of the depackers (as low as 169 bytes!) makes it the ideal choice
26 | for many products.
27 |
28 | Please read the documentation file 'doc/aPLib-1.1.0.chm' or
29 | 'doc/html/index.html'.
30 |
31 |
32 |
33 | License
34 | -------
35 |
36 | aPLib is freeware. If you use aPLib in a product, an acknowledgement would be
37 | appreciated, e.g. by adding something like the following to the documentation:
38 |
39 | This product uses the aPLib compression library,
40 | Copyright (c) 1998-2014 Joergen Ibsen, All Rights Reserved.
41 | For more information, please visit: http://www.ibsensoftware.com/
42 |
43 | You may not distribute aPLib without all of the files.
44 |
45 | You may not edit or reverse engineer any of the files (except the header files
46 | and the decompression code, which you may edit as long as you do not remove
47 | the copyright notice).
48 |
49 | You may not sell aPLib, or any part of it, for money (except for charging for
50 | the media).
51 |
52 | #ifndef COMMON_SENSE
53 |
54 | This software is provided "as is". In no event shall I, the author, be
55 | liable for any kind of loss or damage arising out of the use, abuse or
56 | the inability to use this software. USE IT ENTIRELY AT YOUR OWN RISK!
57 |
58 | This software comes without any kind of warranty, either expressed or
59 | implied, including, but not limited to the implied warranties of
60 | merchantability or fitness for any particular purpose.
61 |
62 | If you do not agree with these terms or if your jurisdiction does not
63 | allow the exclusion of warranty and liability as stated above you are
64 | NOT allowed to use this software at all.
65 |
66 | #else
67 |
68 | Bla bla bla .. the usual stuff - you know it anyway:
69 |
70 | If anything goes even remotely wrong - blame _yourself_, NOT me!
71 |
72 | #endif
73 |
--------------------------------------------------------------------------------
/tools/files/applib/src/32bit/depack.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm assembler depacker
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | format MS COFF
13 |
14 | public aP_depack_asm as '_aP_depack_asm'
15 |
16 | ; =============================================================
17 |
18 | section '.text' code readable executable
19 |
20 | aP_depack_asm:
21 | ; aP_depack_asm(const void *source, void *destination)
22 |
23 | _ret$ equ 7*4
24 | _src$ equ 8*4 + 4
25 | _dst$ equ 8*4 + 8
26 |
27 | pushad
28 |
29 | mov esi, [esp + _src$] ; C calling convention
30 | mov edi, [esp + _dst$]
31 |
32 | cld
33 | mov dl, 80h
34 | xor ebx,ebx
35 |
36 | literal:
37 | movsb
38 | mov bl, 2
39 | nexttag:
40 | call getbit
41 | jnc literal
42 |
43 | xor ecx, ecx
44 | call getbit
45 | jnc codepair
46 | xor eax, eax
47 | call getbit
48 | jnc shortmatch
49 | mov bl, 2
50 | inc ecx
51 | mov al, 10h
52 | .getmorebits:
53 | call getbit
54 | adc al, al
55 | jnc .getmorebits
56 | jnz domatch
57 | stosb
58 | jmp nexttag
59 | codepair:
60 | call getgamma_no_ecx
61 | sub ecx, ebx
62 | jnz normalcodepair
63 | call getgamma
64 | jmp domatch_lastpos
65 |
66 | shortmatch:
67 | lodsb
68 | shr eax, 1
69 | jz donedepacking
70 | adc ecx, ecx
71 | jmp domatch_with_2inc
72 |
73 | normalcodepair:
74 | xchg eax, ecx
75 | dec eax
76 | shl eax, 8
77 | lodsb
78 | call getgamma
79 |
80 | cmp eax, 32000
81 | jae domatch_with_2inc
82 | cmp ah, 5
83 | jae domatch_with_inc
84 | cmp eax, 7fh
85 | ja domatch_new_lastpos
86 |
87 | domatch_with_2inc:
88 | inc ecx
89 |
90 | domatch_with_inc:
91 | inc ecx
92 |
93 | domatch_new_lastpos:
94 | xchg eax, ebp
95 | domatch_lastpos:
96 | mov eax, ebp
97 |
98 | mov bl, 1
99 |
100 | domatch:
101 | push esi
102 | mov esi, edi
103 | sub esi, eax
104 | rep movsb
105 | pop esi
106 | jmp nexttag
107 |
108 | getbit:
109 | add dl, dl
110 | jnz .stillbitsleft
111 | mov dl, [esi]
112 | inc esi
113 | adc dl, dl
114 | .stillbitsleft:
115 | ret
116 |
117 | getgamma:
118 | xor ecx, ecx
119 | getgamma_no_ecx:
120 | inc ecx
121 | .getgammaloop:
122 | call getbit
123 | adc ecx, ecx
124 | call getbit
125 | jc .getgammaloop
126 | ret
127 |
128 | donedepacking:
129 | sub edi, [esp + _dst$]
130 | mov [esp + _ret$], edi ; return unpacked length in eax
131 |
132 | popad
133 |
134 | ret
135 |
136 | ; =============================================================
137 |
--------------------------------------------------------------------------------
/tools/files/applib/src/32bit/scheck.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm safe assembler crc checker
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | format MS COFF
13 |
14 | public aPsafe_check as '_aPsafe_check'
15 |
16 | extrn '_aP_crc32' as aP_crc32
17 |
18 | ; =============================================================
19 |
20 | section '.text' code readable executable
21 |
22 | aPsafe_check:
23 | ; aPsafe_check(const void *source)
24 |
25 | .ret$ equ 7*4
26 | .src$ equ 8*4 + 4
27 |
28 | pushad
29 |
30 | mov esi, [esp + .src$] ; esi -> buffer
31 |
32 | test esi, esi
33 | jz .return_error
34 |
35 | mov ebx, [esi] ; ebx = header.tag
36 |
37 | cmp ebx, 032335041h ; check tag == 'AP32'
38 | jne .return_error
39 |
40 | mov ebx, [esi + 4] ; ebx = header.header_size
41 | cmp ebx, 24 ; check header_size >= 24
42 | jb .return_error
43 |
44 | add ebx, esi ; ebx -> packed data
45 |
46 | push dword [esi + 8] ; push header.packed_size
47 | push ebx
48 | call aP_crc32
49 | add esp, 8
50 |
51 | cmp eax, [esi + 12] ; check eax == header.packed_crc
52 |
53 | mov eax, [esi + 16] ; eax = header.orig_size
54 |
55 | je .return_eax
56 |
57 | .return_error:
58 | or eax, -1 ; eax = -1
59 |
60 | .return_eax:
61 | mov [esp + .ret$], eax ; return unpacked length in eax
62 |
63 | popad
64 |
65 | ret
66 |
67 | ; =============================================================
68 |
--------------------------------------------------------------------------------
/tools/files/applib/src/32bit/sgetsize.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm safe assembler header access
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | format MS COFF
13 |
14 | public aPsafe_get_orig_size as '_aPsafe_get_orig_size'
15 |
16 | ; =============================================================
17 |
18 | section '.text' code readable executable
19 |
20 | aPsafe_get_orig_size:
21 | ; aPsafe_get_orig_size(const void *source)
22 |
23 | .ret$ equ 7*4
24 | .src$ equ 8*4 + 4
25 |
26 | pushad
27 |
28 | mov esi, [esp + .src$] ; esi -> buffer
29 |
30 | mov ebx, [esi] ; ebx = header.tag
31 |
32 | or eax, -1 ; eax = -1
33 |
34 | cmp ebx, 032335041h ; check tag == 'AP32'
35 | jne .return_eax
36 |
37 | mov ebx, [esi + 4] ; ebx = header.header_size
38 | cmp ebx, 24 ; check header_size >= 24
39 | jb .return_eax
40 |
41 | mov eax, [esi + 16] ; eax = header.orig_size
42 |
43 | .return_eax:
44 | mov [esp + .ret$], eax ; return unpacked length in eax
45 |
46 | popad
47 |
48 | ret
49 |
50 | ; =============================================================
51 |
--------------------------------------------------------------------------------
/tools/files/applib/src/64bit/depack.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm 64-bit assembler depacker
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | format MS64 COFF
13 |
14 | public aP_depack_asm
15 |
16 | ; =============================================================
17 |
18 | section '.text' code readable executable
19 |
20 | aP_depack_asm:
21 | ; aP_depack_asm(const void *source, void *destination)
22 |
23 | push rbx
24 | push rsi
25 | push rdi
26 |
27 | push rdx
28 |
29 | mov rsi, rcx
30 | mov rdi, rdx
31 |
32 | cld
33 | mov dl, 80h
34 | xor ebx, ebx
35 |
36 | literal:
37 | movsb
38 | mov bl, 2
39 | nexttag:
40 | call getbit
41 | jnc literal
42 |
43 | xor ecx, ecx
44 | call getbit
45 | jnc codepair
46 | xor eax, eax
47 | call getbit
48 | jnc shortmatch
49 | mov bl, 2
50 | inc ecx
51 | mov al, 10h
52 | .getmorebits:
53 | call getbit
54 | adc al, al
55 | jnc .getmorebits
56 | jnz domatch
57 | stosb
58 | jmp nexttag
59 | codepair:
60 | call getgamma_no_ecx
61 | sub ecx, ebx
62 | jnz normalcodepair
63 | call getgamma
64 | jmp domatch_lastpos
65 |
66 | shortmatch:
67 | lodsb
68 | shr eax, 1
69 | jz donedepacking
70 | adc ecx, ecx
71 | jmp domatch_with_2inc
72 |
73 | normalcodepair:
74 | xchg eax, ecx
75 | dec eax
76 | shl eax, 8
77 | lodsb
78 | call getgamma
79 |
80 | cmp eax, 32000
81 | jae short domatch_with_2inc
82 | cmp ah, 5
83 | jae short domatch_with_inc
84 | cmp eax, 7fh
85 | ja short domatch_new_lastpos
86 |
87 | domatch_with_2inc:
88 | inc ecx
89 |
90 | domatch_with_inc:
91 | inc ecx
92 |
93 | domatch_new_lastpos:
94 | xchg eax, r8d
95 | domatch_lastpos:
96 | mov eax, r8d
97 |
98 | mov bl, 1
99 |
100 | domatch:
101 | push rsi
102 | mov rsi, rdi
103 | sub rsi, rax
104 | rep movsb
105 | pop rsi
106 | jmp nexttag
107 |
108 | getbit:
109 | add dl, dl
110 | jnz .stillbitsleft
111 | mov dl, [rsi]
112 | inc rsi
113 | adc dl, dl
114 | .stillbitsleft:
115 | ret
116 |
117 | getgamma:
118 | xor ecx, ecx
119 | getgamma_no_ecx:
120 | inc ecx
121 | .getgammaloop:
122 | call getbit
123 | adc ecx, ecx
124 | call getbit
125 | jc .getgammaloop
126 | ret
127 |
128 | donedepacking:
129 | pop rdx
130 | sub rdi, rdx
131 | xchg eax, edi
132 |
133 | pop rdi
134 | pop rsi
135 | pop rbx
136 |
137 | ret
138 |
139 | ; =============================================================
140 |
--------------------------------------------------------------------------------
/tools/files/applib/src/64bit/scheck.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm 64-bit safe assembler crc checker
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | format MS64 COFF
13 |
14 | public aPsafe_check
15 |
16 | extrn aP_crc32
17 |
18 | ; =============================================================
19 |
20 | section '.text' code readable executable
21 |
22 | aPsafe_check:
23 | ; aPsafe_check(const void *source)
24 |
25 | push rdi
26 | sub rsp, 32
27 |
28 | mov rdi, rcx ; rdi -> source
29 |
30 | test rcx, rcx
31 | jz .return_error
32 |
33 | mov eax, [rdi] ; eax = header.tag
34 |
35 | cmp eax, 032335041h ; check tag == 'AP32'
36 | jne .return_error
37 |
38 | mov eax, [rdi + 4] ; rax = header.header_size
39 | cmp eax, 24 ; check header_size >= 24
40 | jb .return_error
41 |
42 | add rcx, rax ; rcx -> packed data
43 | mov edx, [rdi + 8] ; rdx = header.packed_size
44 |
45 | call aP_crc32
46 |
47 | cmp eax, [rdi + 12] ; check eax == header.packed_crc
48 |
49 | mov eax, [rdi + 16] ; rax = header.orig_size
50 |
51 | je .return_rax
52 |
53 | .return_error:
54 | or rax, -1 ; rax = -1
55 |
56 | .return_rax:
57 | add rsp, 32
58 | pop rdi
59 |
60 | ret
61 |
62 | ; =============================================================
63 |
--------------------------------------------------------------------------------
/tools/files/applib/src/64bit/sgetsize.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm 64-bit safe assembler header access
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | format MS64 COFF
13 |
14 | public aPsafe_get_orig_size
15 |
16 | ; =============================================================
17 |
18 | section '.text' code readable executable
19 |
20 | aPsafe_get_orig_size:
21 | ; aPsafe_get_orig_size(const void *source)
22 |
23 | mov edx, [rcx] ; edx = header.tag
24 |
25 | or rax, -1 ; rax = -1
26 |
27 | cmp edx, 032335041h ; check tag == 'AP32'
28 | jne .return_rax
29 |
30 | mov edx, [rcx + 4] ; edx = header.header_size
31 | cmp edx, 24 ; check header_size >= 24
32 | jb .return_rax
33 |
34 | mov eax, [rcx + 16] ; rax = header.orig_size
35 |
36 | .return_rax:
37 | ret
38 |
39 | ; =============================================================
40 |
--------------------------------------------------------------------------------
/tools/files/applib/src/64bit/spack.asm:
--------------------------------------------------------------------------------
1 | ;;
2 | ;; aPLib compression library - the smaller the better :)
3 | ;;
4 | ;; fasm 64-bit safe assembler wrapper for aP_pack
5 | ;;
6 | ;; Copyright (c) 1998-2014 Joergen Ibsen
7 | ;; All Rights Reserved
8 | ;;
9 | ;; http://www.ibsensoftware.com/
10 | ;;
11 |
12 | ; header format:
13 | ;
14 | ; offs size data
15 | ; --------------------------------------
16 | ; 0 dword tag ('AP32')
17 | ; 4 dword header_size (24 bytes)
18 | ; 8 dword packed_size
19 | ; 12 dword packed_crc
20 | ; 16 dword orig_size
21 | ; 20 dword orig_crc
22 |
23 | format MS64 COFF
24 |
25 | public aPsafe_pack
26 |
27 | extrn aP_pack
28 | extrn aP_crc32
29 |
30 | ; =============================================================
31 |
32 | section '.text' code readable executable
33 |
34 | aPsafe_pack:
35 | ; aPsafe_pack(const void *source,
36 | ; void *destination,
37 | ; unsigned int length,
38 | ; void *workmem,
39 | ; int (*callback)(unsigned int, unsigned int, void *),
40 | ; void *cbparam)
41 |
42 | mov [rsp + 8], rcx
43 | mov [rsp + 16], rdx
44 | mov [rsp + 24], r8
45 | mov [rsp + 32], r9
46 | push rdi
47 | sub rsp, 48
48 |
49 | mov rdi, rdx ; rdi -> destination
50 |
51 | or rax, -1 ; rax = -1
52 |
53 | test rcx, rcx ; check parameters
54 | jz .return_rax ;
55 | test rdx, rdx ;
56 | jz .return_rax ;
57 | test r8, r8 ;
58 | jz .return_rax ;
59 |
60 | mov edx, 032335041h
61 | mov [rdi], edx ; set header.tag
62 |
63 | mov edx, 24
64 | mov [rdi + 4], edx ; set header.header_size
65 |
66 | mov rdx, r8
67 | mov [rdi + 16], edx ; set header.orig_size
68 |
69 | call aP_crc32
70 |
71 | mov [rdi + 20], eax ; set header.orig_crc
72 |
73 | mov r10, [rsp + 96] ; r10 -> callback
74 | mov r11, [rsp + 104] ; r11 = cbparam
75 |
76 | mov rcx, [rsp + 64]
77 | mov rdx, [rsp + 72]
78 | mov r8, [rsp + 80]
79 | mov r9, [rsp + 88]
80 | mov [rsp + 32], r10
81 | mov [rsp + 40], r11
82 | add rdx, 24 ; rdx -> after header
83 |
84 | call aP_pack
85 |
86 | cmp eax, -1
87 | je .return_rax
88 |
89 | mov [rdi + 8], eax ; set header.packed_size
90 |
91 | mov rcx, [rsp + 72] ; rcx -> destination
92 | mov rdx, rax ; rdx = packed size
93 | add rcx, 24 ; rcx -> after header
94 |
95 | call aP_crc32
96 |
97 | mov [rdi + 12], eax ; set header.packed_crc
98 |
99 | mov eax, [rdi + 8] ; eax = header.packed_size
100 | add rax, 24 ; rax = final size
101 |
102 | .return_rax:
103 | add rsp, 48
104 | pop rdi
105 |
106 | ret
107 |
108 | ; =============================================================
109 |
--------------------------------------------------------------------------------
/tools/files/applib/src/depack.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * C depacker, header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef DEPACK_H_INCLUDED
13 | #define DEPACK_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | /* function prototype */
24 | unsigned int aP_depack(const void *source, void *destination);
25 |
26 | #ifdef __cplusplus
27 | } /* extern "C" */
28 | #endif
29 |
30 | #endif /* DEPACK_H_INCLUDED */
31 |
--------------------------------------------------------------------------------
/tools/files/applib/src/depacks.h:
--------------------------------------------------------------------------------
1 | /*
2 | * aPLib compression library - the smaller the better :)
3 | *
4 | * C safe depacker, header file
5 | *
6 | * Copyright (c) 1998-2014 Joergen Ibsen
7 | * All Rights Reserved
8 | *
9 | * http://www.ibsensoftware.com/
10 | */
11 |
12 | #ifndef DEPACKS_H_INCLUDED
13 | #define DEPACKS_H_INCLUDED
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #ifndef APLIB_ERROR
20 | # define APLIB_ERROR ((unsigned int) (-1))
21 | #endif
22 |
23 | /* function prototype */
24 | unsigned int aP_depack_safe(const void *source,
25 | unsigned int srclen,
26 | void *destination,
27 | unsigned int dstlen);
28 |
29 | #ifdef __cplusplus
30 | } /* extern "C" */
31 | #endif
32 |
33 | #endif /* DEPACKS_H_INCLUDED */
34 |
--------------------------------------------------------------------------------
/tools/files/bin2c-1.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/bin2c-1.0.zip
--------------------------------------------------------------------------------
/tools/files/makefiles-ldscripts-2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/makefiles-ldscripts-2.zip
--------------------------------------------------------------------------------
/tools/files/sixpack-13.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/sixpack-13.zip
--------------------------------------------------------------------------------
/tools/files/sjasm39g6.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/sjasm39g6.zip
--------------------------------------------------------------------------------
/tools/files/zasm-3.0.21-source-linux-2011-06-19.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubilus1/gendev/728f0f1b0a0237dfa411505713396b3eabcf90a8/tools/files/zasm-3.0.21-source-linux-2011-06-19.zip
--------------------------------------------------------------------------------