Subversion Repositories Kolibri OS

Rev

Rev 6847 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6847 Rev 6851
Line 105... Line 105...
105
;end if
105
;end if
106
;    return flags;
106
;    return flags;
107
	ret
107
	ret
108
endp
108
endp
Line 109... Line -...
109
 
-
 
110
;void (m)
109
 
111
;    char *m
110
;void (char *m)
112
align 4
111
align 4
113
proc z_error, m:dword
112
proc z_error, m:dword
114
;    fprintf(stderr, "%s\n", m);
113
;    fprintf(stderr, "%s\n", m);
115
;    exit(1);
114
;    exit(1);
116
	ret
115
	ret
Line 117... Line 116...
117
endp
116
endp
118
 
117
 
Line 119... Line 118...
119
; exported to allow conversion of error code to string for compress() and
118
; exported to allow conversion of error code to string for compress() and
120
; uncompress()
-
 
121
 
119
; uncompress()
122
;const char * (err)
120
 
123
;    int err
121
;const char * (int err)
124
align 4
122
align 4
125
proc zError uses ecx, err:dword
123
proc zError uses ecx, err:dword
Line 171... Line 169...
171
;    }
169
;    }
172
;    return 0;
170
;    return 0;
173
	ret
171
	ret
174
endp
172
endp
Line 175... Line 173...
175
 
173
 
176
;void (dest, len)
-
 
177
;    Bytef* dest
-
 
178
;    uInt  len
174
;void (Bytef* dest, uInt len)
179
align 4
175
align 4
180
proc zmemzero, dest:dword, len:dword
176
proc zmemzero uses eax ecx edi, dest:dword, len:dword
-
 
177
	mov ecx,[len]
181
;    if (len == 0) return;
178
	test ecx,ecx
-
 
179
	jz .end0
-
 
180
		xor eax,eax
182
;    do {
181
		mov edi,[dest]
-
 
182
		bt ecx,0 ;кратно 2 ?
-
 
183
		jnc @f
-
 
184
			rep stosb
-
 
185
			jmp .end0
183
;        *dest++ = 0;  /* ??? to be unrolled */
186
		@@:
-
 
187
		bt ecx,1 ;кратно 4 ?
-
 
188
		jnc @f
-
 
189
			shr ecx,1
-
 
190
			rep stosw
-
 
191
			jmp .end0
-
 
192
		@@:
-
 
193
		shr ecx,2
-
 
194
		rep stosd
184
;    } while (--len != 0);
195
	.end0:
185
	ret
196
	ret
186
endp
197
endp
Line 187... Line 198...
187
;end if
198
;end if