Subversion Repositories Kolibri OS

Rev

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

Rev 131 Rev 205
1
; language for programs
-
 
2
lang fix en ; ru en fr ge fi
-
 
3
 
-
 
4
@^ fix macro comment {
-
 
5
^@ fix }
-
 
6
 
-
 
7
 
-
 
8
macro m2m dest,src {
-
 
9
 push src
-
 
10
 pop  dest
-
 
11
}
-
 
12
 
-
 
13
; new application structure
1
; new application structure
14
macro meos_app_start
2
macro meos_app_start
15
 {
3
 {
16
  use32
4
  use32
17
  org 0x0
5
  org 0x0
18
 
6
 
19
  db 'MENUET01'
7
  db 'MENUET01'
20
  dd 0x01
8
  dd 0x01
21
  dd __start
9
  dd __start
22
  dd __end
10
  dd __end
23
  dd __memory
11
  dd __memory
24
  dd __stack
12
  dd __stack
25
 
13
 
26
  if used __params & ~defined __params
14
  if used __params & ~defined __params
27
    dd __params
15
    dd __params
28
  else
16
  else
29
    dd 0x0
17
    dd 0x0
30
  end if
18
  end if
31
 
19
 
32
  dd 0x0
20
  dd 0x0
33
 }
21
 }
34
MEOS_APP_START fix meos_app_start
22
MEOS_APP_START fix meos_app_start
35
 
23
 
36
macro code
24
macro code
37
 {
25
 {
38
  __start:
26
  __start:
39
 }
27
 }
40
CODE fix code
28
CODE fix code
41
 
29
 
42
macro data
30
macro data
43
 {
31
 {
44
  __data:
32
  __data:
45
 }
33
 }
46
DATA fix data
34
DATA fix data
47
 
35
 
48
macro udata
36
macro udata
49
 {
37
 {
50
  if used __params & ~defined __params
38
  if used __params & ~defined __params
51
    __params:
39
    __params:
52
      db 0
40
      db 0
53
    __end:
41
    __end:
54
      rb 255
42
      rb 255
55
  else
43
  else
56
    __end:
44
    __end:
57
  end if
45
  end if
58
  __udata:
46
  __udata:
59
 }
47
 }
60
UDATA fix udata
48
UDATA fix udata
61
 
49
 
62
macro meos_app_end
50
macro meos_app_end
63
 {
51
 {
64
  align 32
52
  align 32
65
  rb 2048
53
  rb 2048
66
  __stack:
54
  __stack:
67
  __memory:
55
  __memory:
68
 }
56
 }
69
MEOS_APP_END fix meos_app_end
57
MEOS_APP_END fix meos_app_end
70
 
58
 
71
 
59
 
72
; macro for defining multiline text data
60
; macro for defining multiline text data
73
struc mstr [sstring]
61
struc mstr [sstring]
74
 {
62
 {
75
  forward
63
  forward
76
    local ssize
64
    local ssize
77
    virtual at 0
65
    virtual at 0
78
      db sstring
66
      db sstring
79
      ssize = $
67
      ssize = $
80
    end virtual
68
    end virtual
81
    dd ssize
69
    dd ssize
82
    db sstring
70
    db sstring
83
  common
71
  common
84
    dd -1
72
    dd -1
85
 }
73
 }
86
 
74
 
87
 
75
 
88
; strings
76
; strings
89
macro sz name,[data] {         ; from MFAR [mike.dld]
77
macro sz name,[data] {       ; from MFAR [mike.dld]
90
 common
78
  common
91
  if used name
79
   if used name
92
   name db data
-
 
93
   .size = $-name
-
 
94
  end if
-
 
95
}
-
 
96
 
-
 
97
macro lsz name,[lng,data] {  ; from MFAR [mike.dld]
-
 
98
 common
-
 
99
  if used name
-
 
100
   label name
80
    label name
-
 
81
   end if
101
 forward
82
  forward
102
  if lang eq lng
83
   if used name
103
   db data
84
    db data
104
  end if
85
   end if
105
 common
86
  common
106
   .size = $-name
-
 
107
  end if
-
 
108
}
-
 
109
 
-
 
110
macro szc name,elsz,[data] {         ; from MFAR [mike.dld]
-
 
111
 common
-
 
112
  local s,m
-
 
113
  m = 0
-
 
114
  if used name
87
   if used name
115
   label name
-
 
116
   virtual at 0
-
 
117
    db data
-
 
118
    s = $
-
 
119
   end virtual
-
 
120
   d#elsz s
-
 
121
   if m < s
-
 
122
    m = s
-
 
123
   end if
-
 
124
   db data
-
 
125
   .size = $-name
88
    .size = $-name
126
   .maxl = m
-
 
127
  end if
89
   end if
128
}
90
}
129
 
91
 
130
macro lszc name,elsz,[lng,data] {  ; from MFAR [mike.dld]
92
macro lsz name,[lng,data] {  ; from MFAR [mike.dld]
131
 common
-
 
132
  local s,m,c
-
 
133
  m = 0
-
 
134
  c = 0
93
  common
135
  if used name
94
   if used name
136
   label name
-
 
137
 forward
-
 
138
  if lang eq lng
-
 
139
   virtual at 0
-
 
140
    db data
-
 
141
    s = $
-
 
142
   end virtual
-
 
143
   d#elsz s
-
 
144
   if m < s
-
 
145
    m = s
95
    label name
-
 
96
   end if
-
 
97
  forward
146
   end if
98
   if (used name)&(lang eq lng)
147
   db data
-
 
148
   c = c+1
99
    db data
149
  end if
100
   end if
-
 
101
  common
150
 common
102
   if used name
151
   .size  = $-name
-
 
152
   .maxl  = m
-
 
153
   .count = c
103
    .size = $-name
154
  end if
104
   end if
155
}
105
}
156
 
106
 
-
 
107
 
157
 
108
 
158
; easy system call macro
109
; easy system call macro
159
macro mpack dest, hsrc, lsrc
110
macro mpack dest, hsrc, lsrc
160
{
111
{
161
  if (hsrc eqtype 0) & (lsrc eqtype 0)
112
  if (hsrc eqtype 0) & (lsrc eqtype 0)
162
    mov dest, (hsrc) shl 16 + lsrc
113
    mov dest, (hsrc) shl 16 + lsrc
163
  else
114
  else
164
    if (hsrc eqtype 0) & (~lsrc eqtype 0)
115
    if (hsrc eqtype 0) & (~lsrc eqtype 0)
165
      mov dest, (hsrc) shl 16
116
      mov dest, (hsrc) shl 16
166
      add dest, lsrc
117
      add dest, lsrc
167
    else
118
    else
168
      mov dest, hsrc
119
      mov dest, hsrc
169
      shl dest, 16
120
      shl dest, 16
170
      add dest, lsrc
121
      add dest, lsrc
171
    end if
122
    end if
172
  end if
123
  end if
173
}
124
}
174
 
-
 
175
;macro __mov reg,a {         ; mike.dld
-
 
176
; if ~a eq
-
 
177
;   mov reg,a
-
 
178
; end if
-
 
179
;}
-
 
180
 
125
 
181
macro __mov reg,a,b {        ; mike.dld
126
macro __mov reg,a,b {         ; mike.dld
182
 if (~a eq)&(~b eq)
127
 if (~a eq)&(~b eq)
183
   mpack reg,a,b
128
   mpack reg,a,b
184
 else if (~a eq)&(b eq)
129
 else if (~a eq)&(b eq)
185
   mov reg,a
130
   mov reg,a
186
 end if
131
 end if
187
}
132
}
188
 
133
 
189
macro mcall a,b,c,d,e,f {   ; mike.dld
134
macro mcall a,b,c,d,e,f {   ; mike.dld
190
 __mov eax,a
135
 __mov eax,a
191
 __mov ebx,b
136
 __mov ebx,b
192
 __mov ecx,c
137
 __mov ecx,c
193
 __mov edx,d
138
 __mov edx,d
194
 __mov esi,e
139
 __mov esi,e
195
 __mov edi,f
140
 __mov edi,f
196
 int   0x40
141
 int   0x40
197
}
142
}
198
 
143
 
199
 
-
 
200
; -------------------------
-
 
201
macro header a,[b] {
-
 
202
 common
-
 
203
  use32
-
 
204
  org 0
-
 
205
  db 'MENUET',a
-
 
206
 forward
-
 
207
  if b eq
-
 
208
   dd 0
-
 
209
  else
-
 
210
   dd b
-
 
211
  end if }
-
 
212
macro section name { align 16
-
 
213
 label name }
-
 
214
macro func name {
-
 
215
 if ~used name
-
 
216
  display 'FUNC NOT USED: ',`name,13,10
-
 
217
 else
-
 
218
  align 4
-
 
219
  name:
-
 
220
;pushad
-
 
221
;pushfd
-
 
222
;dps `name
-
 
223
;newline
-
 
224
;mcall 5,1
-
 
225
;popfd
-
 
226
;popad
-
 
227
}
-
 
228
macro endf { end if }
-
 
229
 
-
 
230
macro diff16 title,l1,l2
-
 
231
 {
-
 
232
  local s,d
-
 
233
  s = l2-l1
-
 
234
  display title,': 0x'
-
 
235
  repeat 8
-
 
236
   d = '0' + s shr ((8-%) shl 2) and $0F
-
 
237
   if d > '9'
-
 
238
    d = d + 'A'-'9'-1
-
 
239
   end if
-
 
240
   display d
-
 
241
  end repeat
-
 
242
  display 13,10
-
 
243
 }
-
 
244
 
-
 
245
macro diff10 title,l1,l2
-
 
246
 {
-
 
247
  local s,d,z,m
-
 
248
  s = l2-l1
-
 
249
  z = 0
-
 
250
  m = 1000000000
-
 
251
  display title,': '
-
 
252
  repeat 10
-
 
253
   d = '0' + s / m
-
 
254
   s = s - (s/m)*m
-
 
255
   m = m / 10
-
 
256
   if d <> '0'
-
 
257
    z = 1
-
 
258
   end if
-
 
259
   if z <> 0
-
 
260
    display d
-
 
261
   end if
-
 
262
  end repeat
-
 
263
  display 13,10
-
 
264
 }
144
 
265
 
145
 
266
; optimize the code for size
146
; optimize the code for size
267
__regs fix 
147
__regs fix 
268
 
148
 
269
macro add arg1,arg2
149
macro add arg1,arg2
270
 {
150
 {
271
   if (arg2 eqtype 0)
151
   if (arg2 eqtype 0)
272
      if (arg2) = 1
152
      if (arg2) = 1
273
     inc arg1
153
         inc arg1
274
      else
154
      else
275
     add arg1,arg2
155
         add arg1,arg2
276
      end if
156
      end if
277
   else
157
   else
278
      add arg1,arg2
158
      add arg1,arg2
279
   end if
159
   end if
280
 }
160
 }
281
 
161
 
282
macro sub arg1,arg2
162
macro sub arg1,arg2
283
 {
163
 {
284
   if (arg2 eqtype 0)
164
   if (arg2 eqtype 0)
285
      if (arg2) = 1
165
      if (arg2) = 1
286
     dec arg1
166
         dec arg1
287
      else
167
      else
288
     sub arg1,arg2
168
         sub arg1,arg2
289
      end if
169
      end if
290
   else
170
   else
291
      sub arg1,arg2
171
      sub arg1,arg2
292
   end if
172
   end if
293
 }
173
 }
294
 
174
 
295
macro mov arg1,arg2
175
macro mov arg1,arg2
296
 {
176
 {
297
   if (arg1 in __regs) & (arg2 eqtype 0)
177
   if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0'))
298
      if (arg2) = 0
178
      if (arg2) = 0
299
     xor arg1,arg1
179
         xor arg1,arg1
300
      else if (arg2) = 1
180
      else if (arg2) = 1
301
     xor arg1,arg1
181
         xor arg1,arg1
302
     inc arg1
182
         inc arg1
303
      else if (arg2) = -1
183
      else if (arg2) = -1
304
     or  arg1,-1
184
         or  arg1,-1
305
      else if (arg2) > -128 & (arg2) < 128
185
      else if (arg2) > -128 & (arg2) < 128
306
     push arg2
186
         push arg2
307
     pop  arg1
187
         pop  arg1
308
      else
188
      else
309
     mov  arg1,arg2
189
         mov  arg1,arg2
310
      end if
190
      end if
311
   else
191
   else
312
      mov arg1,arg2
192
      mov arg1,arg2
313
   end if
193
   end if
314
 }
194
 }
315
 
195
 
316
 
-
 
317
macro RGB [a] {
-
 
318
 common
-
 
319
  match (r=,g=,b),a \{
-
 
320
   \dd ((r) shl 16) or ((g) shl 8) or (b)
-
 
321
  \}
-
 
322
}
-
 
323
 
-
 
324
 
-
 
325
struc POINT _t,_dx,_dy {
-
 
326
 .x _t _dx
-
 
327
 .y _t _dy
-
 
328
}
-
 
329
 
-
 
330
 
-
 
331
; Macroinstructions for defining data structures
-
 
332
 
196
 
333
macro struct name
-
 
334
 { fields@struct equ name
-
 
335
   match child parent, name \{ fields@struct equ child,fields@\#parent \}
-
 
336
   sub@struct equ
-
 
337
   struc db [val] \{ \common fields@struct equ fields@struct,.,db, \}
-
 
338
   struc dw [val] \{ \common fields@struct equ fields@struct,.,dw, \}
-
 
339
   struc du [val] \{ \common fields@struct equ fields@struct,.,du, \}
-
 
340
   struc dd [val] \{ \common fields@struct equ fields@struct,.,dd, \}
-
 
341
   struc dp [val] \{ \common fields@struct equ fields@struct,.,dp, \}
-
 
342
   struc dq [val] \{ \common fields@struct equ fields@struct,.,dq, \}
-
 
343
   struc dt [val] \{ \common fields@struct equ fields@struct,.,dt, \}
-
 
344
   struc rb count \{ fields@struct equ fields@struct,.,db,count dup (?) \}
-
 
345
   struc rw count \{ fields@struct equ fields@struct,.,dw,count dup (?) \}
-
 
346
   struc rd count \{ fields@struct equ fields@struct,.,dd,count dup (?) \}
-
 
347
   struc rp count \{ fields@struct equ fields@struct,.,dp,count dup (?) \}
-
 
348
   struc rq count \{ fields@struct equ fields@struct,.,dq,count dup (?) \}
-
 
349
   struc rt count \{ fields@struct equ fields@struct,.,dt,count dup (?) \}
-
 
350
   macro db [val] \{ \common \local anonymous
-
 
351
             fields@struct equ fields@struct,anonymous,db, \}
-
 
352
   macro dw [val] \{ \common \local anonymous
-
 
353
             fields@struct equ fields@struct,anonymous,dw, \}
-
 
354
   macro du [val] \{ \common \local anonymous
-
 
355
             fields@struct equ fields@struct,anonymous,du, \}
-
 
356
   macro dd [val] \{ \common \local anonymous
-
 
357
             fields@struct equ fields@struct,anonymous,dd, \}
-
 
358
   macro dp [val] \{ \common \local anonymous
-
 
359
             fields@struct equ fields@struct,anonymous,dp, \}
-
 
360
   macro dq [val] \{ \common \local anonymous
-
 
361
             fields@struct equ fields@struct,anonymous,dq, \}
-
 
362
   macro dt [val] \{ \common \local anonymous
-
 
363
             fields@struct equ fields@struct,anonymous,dt, \}
-
 
364
   macro rb count \{ \local anonymous
-
 
365
             fields@struct equ fields@struct,anonymous,db,count dup (?) \}
-
 
366
   macro rw count \{ \local anonymous
-
 
367
             fields@struct equ fields@struct,anonymous,dw,count dup (?) \}
-
 
368
   macro rd count \{ \local anonymous
-
 
369
             fields@struct equ fields@struct,anonymous,dd,count dup (?) \}
-
 
370
   macro rp count \{ \local anonymous
-
 
371
             fields@struct equ fields@struct,anonymous,dp,count dup (?) \}
-
 
372
   macro rq count \{ \local anonymous
-
 
373
             fields@struct equ fields@struct,anonymous,dq,count dup (?) \}
-
 
374
   macro rt count \{ \local anonymous
-
 
375
             fields@struct equ fields@struct,anonymous,dt,count dup (?) \}
-
 
376
   macro union \{ fields@struct equ fields@struct,,union,<
-
 
377
          sub@struct equ union \}
-
 
378
   macro struct \{ fields@struct equ fields@struct,,substruct,<
-
 
379
          sub@struct equ substruct \}
-
 
380
   virtual at 0 }
-
 
381
 
-
 
382
macro ends
-
 
383
 { match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt
-
 
384
             restruc rb,rw,rd,rp,rq,rt
-
 
385
             purge db,dw,du,dd,dp,dq,dt
-
 
386
             purge rb,rw,rd,rp,rq,rt
-
 
387
             purge union,struct
-
 
388
             match name=,fields,fields@struct \\{ fields@struct equ
-
 
389
                                  make@struct name,fields
-
 
390
                                  fields@\\#name equ fields \\}
-
 
391
             end virtual \}
-
 
392
   match any, sub@struct \{ fields@struct equ fields@struct> \}
-
 
393
   restore sub@struct }
-
 
394
 
-
 
395
macro make@struct name,[field,type,def]
-
 
396
 { common
-
 
397
    if $
-
 
398
     display 'Error: definition of ',`name,' contains illegal instructions.',0Dh,0Ah
-
 
399
     err
-
 
400
    end if
-
 
401
    local define
-
 
402
    define equ name
-
 
403
   forward
-
 
404
    local sub
-
 
405
    match , field \{ make@substruct type,name,sub def
-
 
406
             define equ define,.,sub, \}
-
 
407
    match any, field \{ define equ define,.#field,type, \}
-
 
408
   common
-
 
409
    match fields, define \{ define@struct fields \} }
-
 
410
 
-
 
411
macro define@struct name,[field,type,def]
-
 
412
 { common
-
 
413
    local list
-
 
414
    list equ
-
 
415
   forward
-
 
416
    if ~ field eq .
-
 
417
     name#field type def
-
 
418
     sizeof.#name#field = $ - name#field
-
 
419
    else
-
 
420
     rb sizeof.#type
-
 
421
    end if
-
 
422
    local value
-
 
423
    match any, list \{ list equ list, \}
-
 
424
    list equ list 
-
 
425
   common
-
 
426
    sizeof.#name = $
-
 
427
    restruc name
-
 
428
    match values, list \{
-
 
429
    struc name value \\{
-
 
430
    match any, fields@struct \\\{ fields@struct equ fields@struct,.,name, \\\}
-
 
431
    match , fields@struct \\\{ label .
-
 
432
   forward
-
 
433
     match , value \\\\{ field type def \\\\}
-
 
434
     match any, value \\\\{ field type value
-
 
435
               if ~ field eq .
-
 
436
                rb sizeof.#name#field - ($-field)
-
 
437
               end if \\\\}
-
 
438
   common \\\} \\} \} }
-
 
439
 
-
 
440
macro enable@substruct
-
 
441
 { macro make@substruct substruct,parent,name,[field,type,def]
-
 
442
    \{ \common
-
 
443
    \local define
-
 
444
    define equ parent,name
-
 
445
       \forward
-
 
446
    \local sub
-
 
447
    match , field \\{ match any, type \\\{ enable@substruct
-
 
448
                           make@substruct type,name,sub def
-
 
449
                           purge make@substruct
-
 
450
                           define equ define,.,sub, \\\} \\}
-
 
451
    match any, field \\{ define equ define,.\#field,type, \\}
-
 
452
       \common
-
 
453
    match fields, define \\{ define@\#substruct fields \\} \} }
-
 
454
 
-
 
455
enable@substruct
-
 
456
 
-
 
457
macro define@union parent,name,[field,type,def]
-
 
458
 { common
-
 
459
    virtual at 0
-
 
460
   forward
-
 
461
    if ~ field eq .
-
 
462
     virtual at 0
-
 
463
      parent#field type def
-
 
464
      sizeof.#parent#field = $ - parent#field
-
 
465
     end virtual
-
 
466
     if sizeof.#parent#field > $
-
 
467
      rb sizeof.#parent#field - $
-
 
468
     end if
-
 
469
    else if sizeof.#type > $
-
 
470
     rb sizeof.#type - $
-
 
471
    end if
-
 
472
   common
-
 
473
    sizeof.#name = $
-
 
474
    end virtual
-
 
475
    struc name [value] \{ \common
-
 
476
    label .\#name
-
 
477
    last@union equ
-
 
478
   forward
-
 
479
    match any, last@union \\{ virtual at .\#name
-
 
480
                   field type def
-
 
481
                  end virtual \\}
-
 
482
    match , last@union \\{ match , value \\\{ field type def \\\}
-
 
483
               match any, value \\\{ field type value \\\} \\}
-
 
484
    last@union equ field
-
 
485
   common rb sizeof.#name - ($ - .\#name) \} }
197
macro struct name
486
 
-
 
487
macro define@substruct parent,name,[field,type,def]
-
 
488
 { common
198
 {
489
    virtual at 0
-
 
490
   forward
-
 
491
    if ~ field eq .
-
 
492
     parent#field type def
-
 
493
     sizeof.#parent#field = $ - parent#field
-
 
494
    else
-
 
495
     rb sizeof.#type
-
 
496
    end if
-
 
497
    local value
199
  virtual at 0
498
   common
200
   name name
499
    sizeof.#name = $
201
   sizeof.#name = $ - name
500
    end virtual
-
 
501
    struc name value \{
-
 
502
    label .\#name
202
  end virtual
503
   forward
-
 
504
     match , value \\{ field type def \\}
-
 
505
     match any, value \\{ field type value
-
 
506
              if ~ field eq .
-
 
507
               rb sizeof.#parent#field - ($-field)
-
 
508
              end if \\}
-
 
509
   common \} }
203
 }
-
 
204
 
-
 
205
; structures used in MeOS
-
 
206
struc process_information
-
 
207
 {
-
 
208
  .cpu_usage               dd ?  ; +0
-
 
209
  .window_stack_position   dw ?  ; +4
-
 
210
  .window_stack_value      dw ?  ; +6
-
 
211
  .not_used1               dw ?  ; +8
-
 
212
  .process_name            rb 12 ; +10
-
 
213
  .memory_start            dd ?  ; +22
-
 
214
  .used_memory             dd ?  ; +26
-
 
215
  .PID                     dd ?  ; +30
-
 
216
  .x_start                 dd ?  ; +34
-
 
217
  .y_start                 dd ?  ; +38
-
 
218
  .x_size                  dd ?  ; +42
-
 
219
  .y_size                  dd ?  ; +46
-
 
220
  .slot_state              dw ?  ; +50
-
 
221
                           dw ?  ; +52 - reserved
-
 
222
  .client_left             dd ?  ; +54
-
 
223
  .client_top              dd ?  ; +58
-
 
224
  .client_width            dd ?  ; +62
-
 
225
  .client_height           dd ?  ; +66
-
 
226
  .wnd_state               db ?  ; +70
510
 
227
  rb (1024-71)
511
; structures used in MeOS
-
 
512
struct process_information
-
 
513
  cpu_usage          dd ?    ; +0
-
 
514
  window_stack_position   dw ?    ; +4
-
 
515
  window_stack_value      dw ?    ; +6
-
 
516
  not_used1          dw ?    ; +8
-
 
517
  process_name          rb 12 ; +10
-
 
518
  memory_start          dd ?    ; +22
-
 
519
  used_memory          dd ?    ; +26
-
 
520
  PID              dd ?    ; +30
-
 
521
  x_start          dd ?    ; +34
-
 
522
  y_start          dd ?    ; +38
-
 
523
  x_size          dd ?    ; +42
-
 
524
  y_size          dd ?    ; +46
-
 
525
  slot_state          dw ?    ; +50
-
 
-
 
228
 }
-
 
229
struct process_information
-
 
230
 
-
 
231
struc system_colors
-
 
232
 {
-
 
233
  .frame            dd ?
-
 
234
  .grab             dd ?
-
 
235
  .grab_button      dd ?
-
 
236
  .grab_button_text dd ?
-
 
237
  .grab_text        dd ?
-
 
238
  .work             dd ?
-
 
239
  .work_button      dd ?
-
 
240
  .work_button_text dd ?
526
  rb (1024-52)
241
  .work_text        dd ?
527
ends
-
 
528
 
-
 
529
struct system_colors
-
 
530
  frame        dd ?
-
 
531
  grab           dd ?
-
 
532
  grab_button       dd ?
-
 
533
  grab_button_text dd ?
-
 
534
  grab_text       dd ?
-
 
535
  work           dd ?
-
 
536
  work_button       dd ?
-
 
537
  work_button_text dd ?
-
 
538
  work_text       dd ?
242
  .work_graph       dd ?
539
  work_graph       dd ?
243
 }
540
ends
244
struct system_colors
541
 
245
 
542
 
246
 
543
; constants
247
; constants
544
 
248
 
545
; events
249
; events
546
EV_IDLE        = 0
250
EV_IDLE        = 0
547
EV_TIMER       = 0
251
EV_TIMER       = 0
548
EV_REDRAW      = 1
252
EV_REDRAW      = 1
549
EV_KEY           = 2
253
EV_KEY         = 2
550
EV_BUTTON      = 3
254
EV_BUTTON      = 3
551
EV_EXIT        = 4
255
EV_EXIT        = 4
552
EV_BACKGROUND  = 5
256
EV_BACKGROUND  = 5
553
EV_MOUSE       = 6
257
EV_MOUSE       = 6
554
EV_IPC           = 7
258
EV_IPC         = 7
555
EV_STACK       = 8
259
EV_STACK       = 8
556
 
260
 
557
; event mask bits for function 40
261
; event mask bits for function 40
558
EVM_REDRAW     =    1b
262
EVM_REDRAW     =        1b
559
EVM_KEY        =       10b
263
EVM_KEY        =       10b
560
EVM_BUTTON     =      100b
264
EVM_BUTTON     =      100b
561
EVM_EXIT       =     1000b
265
EVM_EXIT       =     1000b
562
EVM_BACKGROUND =    10000b
266
EVM_BACKGROUND =    10000b
563
EVM_MOUSE      =   100000b
267
EVM_MOUSE      =   100000b
564
EVM_IPC        =  1000000b
268
EVM_IPC        =  1000000b
565
EVM_STACK      = 10000000b
269
EVM_STACK      = 10000000b
566
>
-
 
567
>
-