Subversion Repositories Kolibri OS

Rev

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

Rev 2814 Rev 2875
Line 151... Line 151...
151
inline fastcall void ExitProcess(){
151
inline fastcall void ExitProcess(){
152
	EAX = -1;            // close this program
152
	EAX = -1;            // close this program
153
	$int 0x40
153
	$int 0x40
154
}
154
}
Line 155... Line 155...
155
 
155
 
156
inline fastcall void Pause(dword EBX){				
156
inline fastcall void Pause( EBX){				
157
	$mov eax, 5
157
	$mov eax, 5
158
	$int 0x40
158
	$int 0x40
Line 159... Line 159...
159
}
159
}
160
 
160
 
161
//------------------------------------------------------------------------------
-
 
162
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,
161
//------------------------------------------------------------------------------
163
dword mainAreaColour,byte headerType,dword headerColour,EDI)
162
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType, dword mainAreaColour, EDI)
164
{
163
{
165
	EAX = 12;              // function 12:tell os about windowdraw
164
	EAX = 12;              // function 12:tell os about windowdraw
Line 166... Line 165...
166
	EBX = 1;
165
	EBX = 1;
167
	$int 0x40
166
	$int 0x40
168
	
167
	
169
	EBX = x << 16 + sizeX;
-
 
170
	ECX = y << 16 + sizeY;
168
	EBX = x << 16 + sizeX;
171
	EDX = mainAreaType << 24 | mainAreaColour;
169
	ECX = y << 16 + sizeY;
Line 172... Line 170...
172
	ESI = headerType << 24 | headerColour;
170
	EDX = mainAreaType << 24 | mainAreaColour;
173
	$xor eax,eax
171
	$xor eax,eax
Line 189... Line 187...
189
	EAX = 71;
187
	EAX = 71;
190
	EBX = 1;
188
	EBX = 1;
191
	$int 0x40;
189
	$int 0x40;
192
}
190
}
Line 193... Line 191...
193
 
191
 
-
 
192
inline fastcall dword GetSkinHeight()
194
inline fastcall dword GetSkinWidth(){
193
{
195
	EAX = 48;
194
	$push ebx
-
 
195
	$mov  eax,48
196
	EBX = 4;
196
	$mov  ebx,4
-
 
197
	$int 0x40
197
	$int 0x40
198
	$pop  ebx
Line 198... Line 199...
198
}
199
}
199
 
200
 
200
inline fastcall dword GetScreenHeight()
201
inline fastcall dword GetScreenHeight()
201
{
-
 
202
	EAX = 14;
202
{
203
	EBX = 4;
-
 
204
	$int 0x40
203
	EAX = 14;
205
	//$shr eax, 16
204
	$int 0x40
Line 206... Line 205...
206
	$and eax,0x0000FFFF
205
	$and eax,0x0000FFFF
207
}
206
}
Line 306... Line 305...
306
		EDI++;
305
		EDI++;
307
	}
306
	}
308
}
307
}
Line -... Line 308...
-
 
308
 
-
 
309
 
-
 
310
inline fastcall signed int strncmp( ESI, EDI, ECX)
-
 
311
{
-
 
312
  asm {
-
 
313
    MOV EBX, EDI
-
 
314
    XOR EAX, EAX
-
 
315
    MOV EDX, ECX
-
 
316
    OR ECX, ECX
-
 
317
    JE L1
-
 
318
    REPNE SCASB
-
 
319
    SUB EDX, ECX
-
 
320
    MOV ECX, EDX
-
 
321
    MOV EDI, EBX
-
 
322
    XOR EBX, EBX
-
 
323
    REPE CMPSB
-
 
324
    MOV AL, DSBYTE[ ESI-1]
-
 
325
    MOV BL, DSBYTE[ EDI-1]
-
 
326
    SUB EAX, EBX
-
 
327
L1:
-
 
328
  }
-
 
329
}
309
 
330
 
310
 
331
 
311
inline fastcall unsigned int find_symbol(ESI,BL)
332
inline fastcall unsigned int strchr(ESI,BL)
312
{
333
{
313
	int jj=0, last=-1;
334
	int jj=0, last=-1;
314
	do{
335
	do{
Line 318... Line 339...
318
	} while(AL!=0);
339
	} while(AL!=0);
319
	return last;
340
	return last;
320
}
341
}
Line 321... Line 342...
321
 
342
 
322
 
343
 
323
inline fastcall ChangeCase( EDX)
344
inline fastcall TitleCase( EDX)
324
{
345
{
325
	AL=DSBYTE[EDX];
346
	AL=DSBYTE[EDX];
326
	IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f;
347
	IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f;
Line 414... Line 435...
414
}
435
}
Line 415... Line 436...
415
 
436
 
416
//------------------------------------------------------------------------------
437
//------------------------------------------------------------------------------
417
inline fastcall void debug( EDX)
438
inline fastcall void debug( EDX)
-
 
439
{
-
 
440
	$push eax
-
 
441
	$push ebx
418
{
442
	$push ecx
419
	$mov eax, 63
443
	$mov eax, 63
420
	$mov ebx, 1
444
	$mov ebx, 1
421
next_char:
445
next_char:
422
	$mov ecx, DSDWORD[edx]
446
	$mov ecx, DSDWORD[edx]
Line 428... Line 452...
428
done:
452
done:
429
	$mov cl, 13
453
	$mov cl, 13
430
	$int 0x40
454
	$int 0x40
431
	$mov cl, 10
455
	$mov cl, 10
432
	$int 0x40
456
	$int 0x40
433
}
-
 
434
 
-
 
435
inline fastcall void WriteFullDebug( ESI)
-
 
436
{
-
 
437
	WriteDebug("");
457
	$pop eax
438
	WriteDebug(ESI);
458
	$pop ebx
439
	
-
 
440
	WriteDebug("Number of files:");
-
 
441
	WriteDebug(IntToStr(count)); 
-
 
442
	
-
 
443
	WriteDebug("but_num:");
-
 
444
	WriteDebug(IntToStr(but_num));
-
 
445
	
-
 
446
	WriteDebug("curbtn");
-
 
447
	WriteDebug(IntToStr(curbtn));
-
 
448
	
-
 
449
	WriteDebug("ra_kadrom:");
-
 
450
	WriteDebug(IntToStr(za_kadrom));
-
 
451
	
-
 
452
	Pause(200);
459
	$pop ecx
453
}
460
}
454
>
461
>