Subversion Repositories Kolibri OS

Rev

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

Rev 3282 Rev 3363
Line 5... Line 5...
5
 
5
 
6
char   os_name[8]   = {'M','E','N','U','E','T','0','1'};
6
char   os_name[8]   = {'M','E','N','U','E','T','0','1'};
7
dword  os_version   = 0x00000001;
7
dword  os_version   = 0x00000001;
8
dword  start_addr   = #main;
8
dword  start_addr   = #main;
9
dword  final_addr   = #stop+32;
-
 
10
#ifdef MEMSIZE
9
dword  final_addr   = #stop+32;
11
	dword  alloc_mem    = MEMSIZE;
10
dword  alloc_mem    = MEMSIZE;
12
	dword  x86esp_reg   = MEMSIZE;
-
 
13
#else
-
 
14
	dword  alloc_mem    = #0x00100000;
-
 
15
	dword  x86esp_reg   = #0x00100000;	
-
 
16
#endif
11
dword  x86esp_reg   = MEMSIZE;
17
dword  I_Param      = #param;
12
dword  I_Param      = #param;
18
dword  I_Path       = #program_path;
13
dword  I_Path       = #program_path;
19
char param[4096];
14
char param[4096];
Line -... Line 15...
-
 
15
char program_path[4096];
-
 
16
 
-
 
17
#define NULL      0
-
 
18
#define OLD      -1
-
 
19
#define true      1
20
char program_path[4096];
20
#define false     0
21
 
21
 
22
//Events
22
//Events
23
#define evMouse   6
23
#define evMouse   6
24
#define evButton  3
24
#define evButton  3
Line 25... Line -...
25
#define evKey     2
-
 
26
#define evReDraw  1
-
 
27
 
-
 
28
#define OLD      -1
-
 
29
#define true      1
-
 
30
#define false     0
-
 
31
 
25
#define evKey     2
32
#define NULL      0
26
#define evReDraw  1
33
 
27
 
34
//Button options
28
//Button options
Line 350... Line 344...
350
	$pop ecx
344
	$pop ecx
351
	$pop ebx
345
	$pop ebx
352
	$pop eax
346
	$pop eax
353
}
347
}
Line -... Line 348...
-
 
348
 
354
 
349
 
355
inline fastcall void debugch( ECX)
350
inline fastcall void debugch( ECX)
356
{
351
{
357
	$push eax
352
	$push eax
358
	$push ebx
353
	$push ebx
Line 397... Line 392...
397
void WriteTextB(dword x,y,byte fontType, dword color, EDX)
392
void WriteTextB(dword x,y,byte fontType, dword color, EDX)
398
{
393
{
399
	EAX = 4;
394
	EAX = 4;
400
	EBX = x<<16+y;
395
	EBX = x<<16+y;
401
	ECX = fontType<<24+color;
396
	ECX = fontType<<24+color;
-
 
397
	ESI = 0;
402
	$int 0x40;
398
	$int 0x40;
403
	$add ebx, 1<<16
399
	$add ebx, 1<<16
404
	$int 0x40
400
	$int 0x40
405
}
401
}
Line 406... Line 402...
406
 
402
 
407
void WriteText(dword x,y,byte fontType, dword color, EDX)
403
void WriteText(dword x,y,byte fontType, dword color, EDX)
408
{
404
{
409
	EAX = 4;
405
	EAX = 4;
410
	EBX = x<<16+y;
406
	EBX = x<<16+y;
411
	ECX = fontType<<24+color;
407
	ECX = fontType<<24+color;
412
	$xor esi, esi
408
	ESI = 0;
413
	$int 0x40;
409
	$int 0x40;
Line 414... Line 410...
414
}
410
}
415
 
411
 
Line 420... Line 416...
420
	EDX = x<<16+y;
416
	EDX = x<<16+y;
421
	ESI = fontType<<24+color;
417
	ESI = fontType<<24+color;
422
	$int 0x40;
418
	$int 0x40;
423
}
419
}
Line 424... Line 420...
424
 
420
 
425
void CopyScreen(dword EBX, x, y, sizeX, sizeY)
421
void CopyScreen(dword EBX, x, y, w, h)
426
{
422
{
427
  EAX = 36;
423
  EAX = 36;
428
  ECX = sizeX << 16 + sizeY;
424
  ECX = w << 16 + h;
429
  EDX = x << 16 + y;
425
  EDX = x << 16 + y;
430
  $int  0x40;
426
  $int  0x40;
Line 431... Line 427...
431
}
427
}
Line 435... Line 431...
435
	$mov eax, 35
431
	$mov eax, 35
436
	EBX= y*x_size+x;
432
	EBX= y*x_size+x;
437
	$int 0x40
433
	$int 0x40
438
}
434
}
Line 439... Line -...
439
 
-
 
440
void PutImage(dword EBX,w,h,x,y)
-
 
441
{
-
 
442
	EAX = 7;
-
 
443
	ECX = w<<16+h;
-
 
444
	EDX = x<<16+y;
-
 
445
	$int 0x40
-
 
Line 446... Line 435...
446
}
435
 
447
 
436
 
448
void _PutImage(dword x,y, w,h, EBX)
437
void _PutImage(dword x,y, w,h, EBX)
449
{
438
{