Subversion Repositories Kolibri OS

Rev

Rev 1686 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1686 Rev 1688
Line 1... Line 1...
1
;*********************************************************************
1
;*********************************************************************
2
pack:
2
pack:
3
;	call	clear_edit_points
3
	call	refresh_editbox_data
4
;	and	[curedit],0
-
 
5
; clear messages
4
; clear messages
6
	call	clear_messages
5
	call	clear_messages
7
; display logo
6
; display logo
8
	mov	esi,info_str
7
	mov	esi,info_str
9
	push	info_len
8
	push	info_len
Line 32... Line 31...
32
inopened:
31
inopened:
33
        mov     ebx,[insize]
32
        mov     ebx,[insize]
34
        test    ebx,ebx
33
        test    ebx,ebx
35
        jz      infileerr
34
        jz      infileerr
36
; maximum memory requests: 2*insize + 2*(maxoutsize+400h) + worksize
35
; maximum memory requests: 2*insize + 2*(maxoutsize+400h) + worksize
37
;	mov	esi,[memf]
-
 
38
	xor	esi,esi
36
	xor	esi,esi
39
;	mov	[infile],esi
-
 
40
	add	esi,ebx
37
	add	esi,ebx
41
	mov	[inbuftmp],esi
38
	mov	[inbuftmp],esi
42
	add	esi,ebx
39
	add	esi,ebx
43
	mov	[outfile],esi
40
	mov	[outfile],esi
44
	mov	[outfile1],esi
41
	mov	[outfile1],esi
Line 52... Line 49...
52
	mov	[outfile2],esi
49
	mov	[outfile2],esi
53
	add	esi,ecx
50
	add	esi,ecx
54
	mov	[workmem],esi
51
	mov	[workmem],esi
55
	add	ecx,ebx
52
	add	ecx,ebx
56
	add	ecx,ecx
53
	add	ecx,ecx
57
;	add	ecx,[memf]
-
 
58
; LZMA requires 0x448000 + dictsize*9.5 bytes for workmem,
54
; LZMA requires 0x448000 + dictsize*9.5 bytes for workmem,
59
	and	[lzma_dictsize],0
55
	and	[lzma_dictsize],0
60
	push	ecx
56
	push	ecx
61
	mov	eax,ebx
57
	mov	eax,ebx
62
	dec	eax
58
	dec	eax
Line 75... Line 71...
75
	imul	eax,19
71
	imul	eax,19
76
	shr	eax,1
72
	shr	eax,1
77
	add	eax,448000h
73
	add	eax,448000h
78
	pop	ecx
74
	pop	ecx
79
	add	ecx,eax
75
	add	ecx,eax
80
;	mcall	64,1
-
 
81
	
-
 
82
;	test	eax,eax
-
 
83
;	jz	mem_ok
-
 
Line 84... Line 76...
84
 
76
 
Line 85... Line 77...
85
	mcall	68,12
77
	mcall	68,12
86
 
78
 
Line 136... Line 128...
136
	mcall	70
128
	mcall	70
137
	test	eax,eax
129
	test	eax,eax
138
	jnz	infileerr
130
	jnz	infileerr
Line 139... Line 131...
139
 
131
 
140
	mov	eax,[outfile]
132
	mov	eax,[outfile]
141
	mov	[eax],dword 'KPCK'	;'KCPK'
133
	mov	[eax],dword 'KPCK'
142
	mov     ecx,[insize]
134
	mov     ecx,[insize]
143
	mov	[eax+4],dword ecx
135
	mov	[eax+4],dword ecx
144
	mov	edi,eax
136
	mov	edi,eax
145
; set LZMA dictionary size
137
; set LZMA dictionary size