Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1805 yogev_ezra 1
;************************************
2
;******** МАКРОСЫ *******************
3
;************************************
4
; Constants= colors
5
;-----------------------цвет:0xRRGGBB
6
cBLACK     = 0x000000 ; черный
7
cRED       = 0xFF0000 ; красный
8
cYELLOW    = 0xFFFF00 ; желтый
9
cGREEN     = 0x00FF00 ; зеленый
10
cNAVY      = 0x0000FF ; синий
11
cMAGENTA   = 0xFF00FF ; малиновый
12
cBLUE      = 0x00FFFF ; голубой
13
cWHITE     = 0xFFFFFF ; белый
14
cBROWN     = 0x554433 ; коричневый
15
cB     equ cBLACK
16
cW     equ cWHITE
17
 
18
macro BeginProgram
19
 {
20
  use32
21
  org 0x0
22
 
23
  db 'MENUET01'
24
  dd 0x01
25
  dd __start
26
  dd __end
27
  dd __memory  ;   0x10000
28
  dd __stack   ;   0x10000
29
  dd 0x0       ; dd __params
30
  dd 0x0
31
  __start:
32
 }
33
 
34
macro EndProgram
35
 {
36
  align 32
37
  rb 256   ;512
38
  __end:
39
  __stack:
40
  __memory:
41
 }
42
 
43
 
44
macro LoopBegin  lab,begi
45
{
46
        push  ecx                        ; ECX->STACK store  old
47
        mov   ecx,begi
48
  lab:
49
        push  ecx                        ; ECX->STACK counter store
50
}
51
 
52
macro LoopEnd lab,endi
53
{
54
        pop   ecx                        ;ECX<-STACK counter restore
55
        inc   ecx
56
        cmp   ecx,endi
57
        jne   lab
58
        pop   ecx                        ;ECX<-STACK restore  old
59
}
60
 
61
macro SetEventMask mmm
62
{
63
        mov eax,40
64
        mov ebx,mmm
65
        int 0x40
66
}
67
 
68
macro  redraw_begin
69
{
70
        mov     eax,12
71
        mov     ebx,1
72
        int     0x40
73
}
74
 
75
macro  redraw_end
76
{
77
        mov     eax,12
78
        mov     ebx,2
79
        int     0x40
80
}
81
 
82
macro  EventIs  eee,lll
83
{
84
        cmp     eax,eee
85
        je      lll
86
}