Subversion Repositories Kolibri OS

Rev

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

Rev 109 Rev 122
Line 1... Line 1...
1
; language for programs
1
; language for programs
-
 
2
lang fix en ; ru en fr ge fi
Line 2... Line 3...
2
 
3
 
3
@^ fix macro comment {
4
@^ fix macro comment {
Line -... Line 5...
-
 
5
^@ fix }
-
 
6
 
-
 
7
 
-
 
8
macro m2m dest,src {
-
 
9
 push src
4
^@ fix }
10
 pop  dest
5
 
11
}
6
 
12
 
7
; new application structure
13
; new application structure
8
macro meos_app_start
14
macro meos_app_start
Line 81... Line 87...
81
 
87
 
82
; strings
88
; strings
83
macro sz name,[data] {	     ; from MFAR [mike.dld]
89
macro sz name,[data] {	     ; from MFAR [mike.dld]
84
 common
90
 common
85
  if used name
-
 
86
   name:
91
  if used name
87
    db data
92
   name db data
88
   .size = $-name
93
   .size = $-name
89
  end if
94
  end if
Line 90... Line 95...
90
}
95
}
Line 122... Line 127...
122
  end if
127
  end if
123
}
128
}
Line 124... Line 129...
124
 
129
 
125
macro lszc name,elsz,[lng,data] {  ; from MFAR [mike.dld]
130
macro lszc name,elsz,[lng,data] {  ; from MFAR [mike.dld]
126
 common
131
 common
127
  local s,m
132
  local s,m,c
-
 
133
  m = 0
128
  m = 0
134
  c = 0
129
  if used name
135
  if used name
130
   label name
136
   label name
131
 forward
137
 forward
132
  if lang eq lng
138
  if lang eq lng
Line 137... Line 143...
137
   d#elsz s
143
   d#elsz s
138
   if m < s
144
   if m < s
139
    m = s
145
    m = s
140
   end if
146
   end if
141
   db data
147
   db data
-
 
148
   c = c+1
142
  end if
149
  end if
143
 common
150
 common
144
   .size = $-name
151
   .size  = $-name
145
   .maxl = m
152
   .maxl  = m
-
 
153
   .count = c
146
  end if
154
  end if
147
}
155
}
Line 148... Line 156...
148
 
156
 
Line 207... Line 215...
207
 if ~used name
215
 if ~used name
208
  display 'FUNC NOT USED: ',`name,13,10
216
  display 'FUNC NOT USED: ',`name,13,10
209
 else
217
 else
210
  align 4
218
  align 4
211
  name:
219
  name:
-
 
220
  ;diff16 `name,0,name
212
;pushad
221
;pushad
213
;pushfd
222
;pushfd
214
;dps `name
223
;dps `name
215
;newline
224
;newline
216
;mcall 5,1
225
;mcall 5,1
Line 304... Line 313...
304
      mov arg1,arg2
313
      mov arg1,arg2
305
   end if
314
   end if
306
 }
315
 }
Line -... Line 316...
-
 
316
 
-
 
317
 
-
 
318
macro RGB [a] {
-
 
319
 common
-
 
320
  match (r=,g=,b),a \{
-
 
321
   \dd ((r) shl 16) or ((g) shl 8) or (b)
-
 
322
  \}
-
 
323
}
307
 
324
 
308
 
325
 
309
struc POINT _t,_dx,_dy {
326
struc POINT _t,_dx,_dy {
310
 .x _t _dx
327
 .x _t _dx
Line 311... Line 328...
311
 .y _t _dy
328
 .y _t _dy
312
}
329
}
313
 
-
 
314
; structure definition helper
-
 
315
;include 'struct.inc'
-
 
316
 
-
 
317
macro union [def]
-
 
318
 {
-
 
319
   common size@union = 0
-
 
320
	  origin@union = $
-
 
321
   forward virtual
-
 
322
	    def
-
 
323
	    if $-origin@union > size@union
-
 
324
	     size@union = $-origin@union
-
 
325
	    end if
-
 
Line 326... Line 330...
326
	   end virtual
330
 
327
   common rb size@union
331
; structure definition helper
328
 }
-
 
329
 
332
include 'struct.inc'
330
; structures used in MeOS
333
 
331
struc process_information
334
; structures used in MeOS
332
{
335
struct process_information
333
  .cpu_usage		   dd ?  ; +0
336
  cpu_usage		  dd ?	; +0
334
  .window_stack_position   dw ?  ; +4
337
  window_stack_position   dw ?	; +4
335
  .window_stack_value	   dw ?  ; +6
338
  window_stack_value	  dw ?	; +6
336
  .not_used1		   dw ?  ; +8
339
  not_used1		  dw ?	; +8
337
  .process_name 	   rb 12 ; +10
340
  process_name		  rb 12 ; +10
338
  .memory_start 	   dd ?  ; +22
341
  memory_start		  dd ?	; +22
339
  .used_memory		   dd ?  ; +26
342
  used_memory		  dd ?	; +26
340
  .PID			   dd ?  ; +30
343
  PID			  dd ?	; +30
341
  .x_start		   dd ?  ; +34
344
  x_start		  dd ?	; +34
342
  .y_start		   dd ?  ; +38
345
  y_start		  dd ?	; +38
-
 
346
  x_size		  dd ?	; +42
343
  .x_size		   dd ?  ; +42
347
  y_size		  dd ?	; +46
344
  .y_size		   dd ?  ; +46
348
  slot_state		  dw ?	; +50
-
 
349
  rb (1024-52)
-
 
350
ends
-
 
351
 
-
 
352
struct system_colors
-
 
353
  frame 	   dd ?
-
 
354
  grab		   dd ?
-
 
355
  grab_button	   dd ?
-
 
356
  grab_button_text dd ?
-
 
357
  grab_text	   dd ?
-
 
358
  work		   dd ?
-
 
359
  work_button	   dd ?
Line 345... Line -...
345
  .slot_state		   dw ?  ; +50
-
 
346
  rb (1024-52)
-
 
347
}
-
 
348
sizeof.process_information=1024
-
 
349
 
-
 
350
struc system_colors
-
 
351
{
-
 
352
  .frame	    dd ?
-
 
353
  .grab 	    dd ?
-
 
354
  .grab_button	    dd ?
-
 
355
  .grab_button_text dd ?
-
 
356
  .grab_text	    dd ?
-
 
357
  .work 	    dd ?
-
 
358
  .work_button	    dd ?
-
 
Line 359... Line 360...
359
  .work_button_text dd ?
360
  work_button_text dd ?
Line 360... Line 361...
360
  .work_text	    dd ?
361
  work_text	   dd ?
361
  .work_graph	    dd ?
362
  work_graph	   dd ?