Subversion Repositories Kolibri OS

Rev

Rev 109 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 485
1
center       fix false
1
center       fix false
2
SYSTEMCOLORS fix sc
2
SYSTEMCOLORS fix sc
3
PROCESSINFO  fix pinfo
3
PROCESSINFO  fix pinfo
4
 
4
 
5
macro get_sys_colors wnd_skin,font_1 {
5
macro get_sys_colors wnd_skin,font_1 {
6
 mcall 48,3,SYSTEMCOLORS,sizeof.system_colors
6
 mcall 48,3,SYSTEMCOLORS,sizeof.system_colors
7
 if wnd_skin <> 0
7
 if wnd_skin <> 0
8
  or [SYSTEMCOLORS+system_colors.work],0x03000000
8
  or [SYSTEMCOLORS+system_colors.work],0x03000000
9
 end if
9
 end if
10
 if font_1 <> 0
10
 if font_1 <> 0
11
  or [SYSTEMCOLORS+system_colors.grab_text],0x10000000
11
  or [SYSTEMCOLORS+system_colors.grab_text],0x10000000
12
 end if
12
 end if
13
}
13
}
14
 
14
 
15
macro draw_caption _edx,_esi {
15
macro draw_caption _edx,_esi {
16
 mov  edx,_edx
16
 mov  edx,_edx
17
 mov  esi,_esi
17
 mov  esi,_esi
18
 call __draw_caption
18
 call __draw_caption
19
}
19
}
20
 
-
 
21
macro mpack dest, hsrc, lsrc
-
 
22
{
-
 
23
  if (hsrc eqtype 0) & (lsrc eqtype 0)
-
 
24
    mov dest, (hsrc) shl 16 + lsrc
-
 
25
  else
-
 
26
    if (hsrc eqtype 0) & (~lsrc eqtype 0)
-
 
27
      mov dest, (hsrc) shl 16
-
 
28
      add dest, lsrc
-
 
29
    else
-
 
30
      mov dest, hsrc
-
 
31
      shl dest, 16
-
 
32
      add dest, lsrc
-
 
33
    end if
-
 
34
  end if
-
 
35
}
-
 
36
 
-
 
37
macro __mov reg,a,b {
-
 
38
 if (~a eq)&(~b eq)
-
 
39
   mpack reg,a,b
-
 
40
 else if (~a eq)&(b eq)
-
 
41
   mov reg,a
-
 
42
 end if
-
 
43
}
-
 
44
 
-
 
45
macro mcall a,b,c,d,e,f {
-
 
46
 __mov eax,a
-
 
47
 __mov ebx,b
-
 
48
 __mov ecx,c
-
 
49
 __mov edx,d
-
 
50
 __mov esi,e
-
 
51
 __mov edi,f
-
 
52
 int   0x40
-
 
53
}
-
 
54
 
-
 
55
macro sz name,[data] {
-
 
56
 if used name
-
 
57
  common
-
 
58
   label name
-
 
59
  forward
-
 
60
   db data
-
 
61
  common
-
 
62
   .size = $-name
-
 
63
 end if
-
 
64
}
-
 
65
 
-
 
66
macro lsz name,[lng,data] {
-
 
67
 if used name
-
 
68
  common
-
 
69
   label name
-
 
70
  forward
-
 
71
   if lang eq lng
-
 
72
    db data
-
 
73
   end if
-
 
74
  common
-
 
75
   .size = $-name
-
 
76
 end if
-
 
77
}
-
 
78
 
20
 
79
macro mmov reg,a1,a2 {
21
macro mmov reg,a1,a2 {
80
 mov reg,(a1) shl 16 + (a2)
22
 mov reg,(a1) shl 16 + (a2)
81
}
23
}
82
 
24
 
83
macro madd reg,a1,a2 {
25
macro madd reg,a1,a2 {
84
 add reg,(a1) shl 16 + (a2)
26
 add reg,(a1) shl 16 + (a2)
85
}
27
}
86
 
28
 
87
macro msub reg,a1,a2 {
29
macro msub reg,a1,a2 {
88
 sub reg,(a1) shl 16 + (a2)
30
 sub reg,(a1) shl 16 + (a2)
89
}
31
}
90
 
32
 
91
macro jmpe reg,def,[val,lab] {
33
macro jmpe reg,def,[val,lab] {
92
 forward
34
 forward
93
  cmp reg,val
35
  cmp reg,val
94
  je  lab
36
  je  lab
95
 common
37
 common
96
  if ~def eq
38
  if ~def eq
97
   jmp def
39
   jmp def
98
  end if
40
  end if
99
}
41
}
100
 
42
 
101
macro func name {
43
macro func name {
102
 if used name
44
 if used name
103
  name:
45
  name:
104
}
46
}
105
 
47
 
106
macro endf {
48
macro endf {
107
 end if
49
 end if
108
}
50
}
109
 
51
 
110
@^ fix macro comment {
52
@^ fix macro comment {
111
^@ fix }
53
^@ fix }
112
 
-
 
113
; structure definition helper
-
 
114
 
-
 
115
;include '%fasminc%struct.inc'
-
 
116
include 'struct.inc'
-
 
117
 
-
 
118
; structures used in MeOS
-
 
119
struct process_information
-
 
120
  cpu_usage               dd ?  ; +0
-
 
121
  window_stack_position   dw ?  ; +4
-
 
122
  window_stack_value      dw ?  ; +6
-
 
123
  not_used1               dw ?  ; +8
-
 
124
  process_name            db 12 dup(?) ; +10
-
 
125
  memory_start            dd ?  ; +22
-
 
126
  used_memory             dd ?  ; +26
-
 
127
  PID                     dd ?  ; +30
-
 
128
  x_start                 dd ?  ; +34
-
 
129
  y_start                 dd ?  ; +38
-
 
130
  x_size                  dd ?  ; +42
-
 
131
  y_size                  dd ?  ; +46
-
 
132
  slot_state              dw ?  ; +50
-
 
133
  not_used2               db 1024-52 dup(?)
-
 
134
ends
-
 
135
 
-
 
136
struct system_colors
-
 
137
  frame            dd ?
-
 
138
  grab             dd ?
-
 
139
  grab_button      dd ?
-
 
140
  grab_button_text dd ?
-
 
141
  grab_text        dd ?
-
 
142
  work             dd ?
-
 
143
  work_button      dd ?
-
 
144
  work_button_text dd ?
-
 
145
  work_text        dd ?
-
 
146
  work_graph       dd ?
-
 
147
ends
-