Subversion Repositories Kolibri OS

Rev

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

Rev 984 Rev 1415
Line 161... Line 161...
161
	$int 0x40
161
	$int 0x40
162
}
162
}
Line 163... Line 163...
163
 
163
 
Line 164... Line 164...
164
//------------------------------------------------------------------------------
164
//------------------------------------------------------------------------------
165
 
165
 
-
 
166
inline fastcall dword strlen(EDI){
-
 
167
	asm {
166
inline fastcall dword strlen(dword EDI){
168
	  xor ecx, ecx
167
	EAX=0;
169
	  xor eax, eax
168
	ECX=-1;
170
	  dec ecx
-
 
171
	  repne scasb
-
 
172
	  sub eax, 2
169
	$REPNE $SCASB
173
	  sub eax, ecx
Line 170... Line 174...
170
	EAX-=2+ECX;
174
	}
171
}
175
}
Line 179... Line 183...
179
	$stosb
183
	$stosb
180
	$test al,al
184
	$test al,al
181
	$jnz l1
185
	$jnz l1
182
}
186
}
Line 183... Line -...
183
 
-
 
184
 
187
 
185
byte fastcall TestBit(EAX, CL)
188
byte fastcall TestBit(EAX, CL)
186
{
189
{
187
	$shr eax,cl
190
	$shr eax,cl
188
	$and eax,1
191
	$and eax,1
Line 257... Line 260...
257
	} while(AL!=0);
260
	} while(AL!=0);
258
	return last;
261
	return last;
259
}
262
}
Line 260... Line -...
260
 
-
 
261
 
-
 
262
inline fastcall memmov( EDI, ESI, ECX)
-
 
263
{
-
 
264
  asm {
-
 
265
    MOV EAX, ECX
-
 
266
    CMP EDI, ESI
-
 
267
    JG L1
-
 
268
    JE L2
-
 
269
    SAR ECX, 2
-
 
270
    JS L2
-
 
271
    REP MOVSD
-
 
272
    MOV ECX, EAX
-
 
273
    AND ECX, 3
-
 
274
    REP MOVSB
-
 
275
    JMP SHORT L2
-
 
276
L1: LEA ESI, DSDWORD[ ESI+ECX-4]
-
 
277
    LEA EDI, DSDWORD[ EDI+ECX-4]
-
 
278
    SAR ECX, 2
-
 
279
    JS L2
-
 
280
    STD
-
 
281
    REP MOVSD
-
 
282
    MOV ECX, EAX
-
 
283
    AND ECX, 3
-
 
284
    ADD ESI, 3
-
 
285
    ADD EDI, 3
-
 
286
    REP MOVSB
-
 
287
    CLD
-
 
288
L2:
-
 
289
  }
-
 
290
}
-
 
291
 
263
 
292
 
264
 
293
inline fastcall ChangeCase(dword EDX)
265
inline fastcall ChangeCase(dword EDX)
294
{
266
{
295
	AL=DSBYTE[EDX];
267
	AL=DSBYTE[EDX];
Line 378... Line 350...
378
	EBP = 0;
350
	EBP = 0;
379
	$int 0x40
351
	$int 0x40
380
}  
352
}  
Line 381... Line 353...
381
 
353
 
382
//------------------------------------------------------------------------------
354
//------------------------------------------------------------------------------
383
inline fastcall dword WriteDebug(dword EDX)
355
void WriteDebug(dword EDX)
384
{
-
 
385
	$push ebx
-
 
386
	$push ecx
356
{
387
	$mov eax, 63
357
	$mov eax, 63
388
	$mov ebx, 1
358
	$mov ebx, 1
389
next_char:
359
next_char:
390
	$mov ecx, DSDWORD[edx]
360
	$mov ecx, DSDWORD[edx]
Line 396... Line 366...
396
done:
366
done:
397
	$mov cl, 13
367
	$mov cl, 13
398
	$int 0x40
368
	$int 0x40
399
	$mov cl, 10
369
	$mov cl, 10
400
	$int 0x40
370
	$int 0x40
401
	$pop ecx
-
 
402
	$pop ebx
-
 
403
}
371
}