Subversion Repositories Kolibri OS

Rev

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

Rev 4966 Rev 6609
Line 9... Line 9...
9
PARAMS_SIZE                       equ 256
9
PARAMS_SIZE                       equ 256
10
STACK_SIZE                        equ 256
10
STACK_SIZE                        equ 256
11
PROC_INFO_SIZE                    equ 1024
11
PROC_INFO_SIZE                    equ 1024
12
TMP_BUFFER_SIZE                   equ 64
12
TMP_BUFFER_SIZE                   equ 64
13
; ---------------------------------------------------------------------------- ;
13
; ---------------------------------------------------------------------------- ;
14
TEXT_WIDTH                        equ 6
14
TEXT_WIDTH                        equ 8
15
BOLD_TEXT_WIDTH                   equ TEXT_WIDTH + 1
15
BOLD_TEXT_WIDTH                   equ TEXT_WIDTH + 1
16
; ---------------------------------------------------------------------------- ;
16
; ---------------------------------------------------------------------------- ;
17
COLUMN1_MAX_COUNT                 equ 13
17
COLUMN1_MAX_COUNT                 equ 13
18
COLUMN2_MAX_COUNT                 equ 12
18
COLUMN2_MAX_COUNT                 equ 12
19
COLUMN3_MAX_COUNT                 equ 26
19
COLUMN3_MAX_COUNT                 equ 26
Line 21... Line 21...
21
COLUMN_PADDING                    equ 3
21
COLUMN_PADDING                    equ 3
22
COLUMN1_PADDING                   equ COLUMN_PADDING
22
COLUMN1_PADDING                   equ COLUMN_PADDING
23
COLUMN2_PADDING                   equ COLUMN_PADDING
23
COLUMN2_PADDING                   equ COLUMN_PADDING
24
COLUMN3_PADDING                   equ COLUMN_PADDING
24
COLUMN3_PADDING                   equ COLUMN_PADDING
25
; ---------------------------------------------------------------------------- ;
25
; ---------------------------------------------------------------------------- ;
26
ITEM_HEIGHT                       equ 15
26
ITEM_HEIGHT                       equ 22
27
TEXT_HEIGHT                       equ 9
27
TEXT_HEIGHT                       equ 16
-
 
28
%comment
28
COLUMN1_ITEM_WIDTH                equ COLUMN1_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN1_PADDING * 2
29
COLUMN1_ITEM_WIDTH                equ COLUMN1_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN1_PADDING * 2
29
COLUMN2_ITEM_WIDTH                equ COLUMN2_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN2_PADDING * 2
30
COLUMN2_ITEM_WIDTH                equ COLUMN2_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN2_PADDING * 2
30
COLUMN3_ITEM_WIDTH                equ COLUMN3_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN3_PADDING * 2
31
COLUMN3_ITEM_WIDTH                equ COLUMN3_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN3_PADDING * 2
-
 
32
%endcomment
-
 
33
COLUMN1_ITEM_WIDTH                equ COLUMN1_MAX_COUNT * TEXT_WIDTH + COLUMN1_PADDING * 2
-
 
34
COLUMN2_ITEM_WIDTH                equ COLUMN2_MAX_COUNT * TEXT_WIDTH + COLUMN2_PADDING * 2
-
 
35
COLUMN3_ITEM_WIDTH                equ COLUMN3_MAX_COUNT * TEXT_WIDTH + COLUMN3_PADDING * 2
31
ITEM_MARGIN                       equ 6
36
ITEM_MARGIN                       equ 6
32
ITEM_BACK_COLOR_1                 equ 0x00EAEAEA
37
ITEM_BACK_COLOR_1                 equ 0x00EAEAEA
33
ITEM_BACK_COLOR_2                 equ 0x00F4F4F4
38
ITEM_BACK_COLOR_2                 equ 0x00F4F4F4
34
ITEM_COUNT                        equ 18 ; at current time we have 18 items
39
ITEM_COUNT                        equ 18 ; at current time we have 18 items
35
; ---------------------------------------------------------------------------- ;
40
; ---------------------------------------------------------------------------- ;
Line 221... Line 226...
221
        push   dword COLUMN1_TEXT_X
226
        push   dword COLUMN1_TEXT_X
222
        push   dword y
227
        push   dword y
223
        push   dword sz_cpu_usage
228
        push   dword sz_cpu_usage
224
        push   dword [fore_color]
229
        push   dword [fore_color]
225
        push   dword [back_color]
230
        push   dword [back_color]
226
        call   DrawTextBold
231
        call   DrawText
227
; [cpu_usage]
232
; [cpu_usage]
228
        push   dword [thread_info + THREAD_INFO.cpu_usage]
233
        push   dword [thread_info + THREAD_INFO.cpu_usage]
229
        call   uint2str
234
        call   uint2str
230
        push   dword COLUMN2_MAX_COUNT
235
        push   dword COLUMN2_MAX_COUNT
231
        call   PadBuffSpaces
236
        call   PadBuffSpaces
232
        push   dword COLUMN2_TEXT_X
237
        push   dword COLUMN2_TEXT_X
233
        push   dword y
238
        push   dword y
234
        push   dword tmpbuffer
239
        push   dword tmpbuffer
235
        push   dword [fore_color]
240
        push   dword [fore_color]
236
        push   dword [back_color]
241
        push   dword [back_color]
237
        call   DrawTextBold
242
        call   DrawText
238
        call   ChangeBackColor
243
        call   ChangeBackColor
239
        add    y, dword ITEM_HEIGHT
244
        add    y, dword ITEM_HEIGHT
240
%endmacro
245
%endmacro
241
; **************************************************************************** ;
246
; **************************************************************************** ;
242
%macro DrawWinStackPos 0
247
%macro DrawWinStackPos 0
Line 244... Line 249...
244
        push   dword COLUMN1_TEXT_X
249
        push   dword COLUMN1_TEXT_X
245
        push   dword y
250
        push   dword y
246
        push   dword sz_win_stack_pos
251
        push   dword sz_win_stack_pos
247
        push   dword [fore_color]
252
        push   dword [fore_color]
248
        push   dword [back_color]
253
        push   dword [back_color]
249
        call   DrawTextBold
254
        call   DrawText
250
; [win_stack_pos]
255
; [win_stack_pos]
251
        movzx  eax, word [thread_info + THREAD_INFO.win_stack_pos]
256
        movzx  eax, word [thread_info + THREAD_INFO.win_stack_pos]
252
        push   eax
257
        push   eax
253
        call   uint2str
258
        call   uint2str
254
        push   dword COLUMN2_MAX_COUNT
259
        push   dword COLUMN2_MAX_COUNT
Line 256... Line 261...
256
        push   dword COLUMN2_TEXT_X
261
        push   dword COLUMN2_TEXT_X
257
        push   dword y
262
        push   dword y
258
        push   dword tmpbuffer
263
        push   dword tmpbuffer
259
        push   dword [fore_color]
264
        push   dword [fore_color]
260
        push   dword [back_color]
265
        push   dword [back_color]
261
        call   DrawTextBold
266
        call   DrawText
262
        call   ChangeBackColor
267
        call   ChangeBackColor
263
        add    y, dword ITEM_HEIGHT
268
        add    y, dword ITEM_HEIGHT
264
%endmacro
269
%endmacro
265
; **************************************************************************** ;
270
; **************************************************************************** ;
266
%macro DrawName 0
271
%macro DrawName 0
Line 268... Line 273...
268
        push   dword COLUMN1_TEXT_X
273
        push   dword COLUMN1_TEXT_X
269
        push   dword y
274
        push   dword y
270
        push   dword sz_name
275
        push   dword sz_name
271
        push   dword [fore_color]
276
        push   dword [fore_color]
272
        push   dword [back_color]
277
        push   dword [back_color]
273
        call   DrawTextBold
278
        call   DrawText
274
; name
279
; name
275
        push   dword COLUMN2_TEXT_X
280
        push   dword COLUMN2_TEXT_X
276
        push   dword y
281
        push   dword y
277
        push   dword (thread_info + THREAD_INFO.name)
282
        push   dword (thread_info + THREAD_INFO.name)
278
        push   dword [fore_color]
283
        push   dword [fore_color]
279
        push   dword [back_color]
284
        push   dword [back_color]
280
        call   DrawTextBold
285
        call   DrawText
281
        call   ChangeBackColor
286
        call   ChangeBackColor
282
        add    y, dword ITEM_HEIGHT
287
        add    y, dword ITEM_HEIGHT
283
%endmacro
288
%endmacro
284
; **************************************************************************** ;
289
; **************************************************************************** ;
285
%macro DrawMemAddress 0
290
%macro DrawMemAddress 0
Line 287... Line 292...
287
        push   dword COLUMN1_TEXT_X
292
        push   dword COLUMN1_TEXT_X
288
        push   dword y
293
        push   dword y
289
        push   dword sz_mem_address
294
        push   dword sz_mem_address
290
        push   dword [fore_color]
295
        push   dword [fore_color]
291
        push   dword [back_color]
296
        push   dword [back_color]
292
        call   DrawTextBold
297
        call   DrawText
293
; [mem_address]
298
; [mem_address]
294
        push   dword [thread_info + THREAD_INFO.mem_address]
299
        push   dword [thread_info + THREAD_INFO.mem_address]
295
        call   uint2str
300
        call   uint2str
296
        push   dword COLUMN2_MAX_COUNT
301
        push   dword COLUMN2_MAX_COUNT
297
        call   PadBuffSpaces
302
        call   PadBuffSpaces
298
        push   dword COLUMN2_TEXT_X
303
        push   dword COLUMN2_TEXT_X
299
        push   dword y
304
        push   dword y
300
        push   dword tmpbuffer
305
        push   dword tmpbuffer
301
        push   dword [fore_color]
306
        push   dword [fore_color]
302
        push   dword [back_color]
307
        push   dword [back_color]
303
        call   DrawTextBold
308
        call   DrawText
304
        call   ChangeBackColor
309
        call   ChangeBackColor
305
        add    y, dword ITEM_HEIGHT
310
        add    y, dword ITEM_HEIGHT
306
%endmacro
311
%endmacro
307
; **************************************************************************** ;
312
; **************************************************************************** ;
308
%macro DrawMemUsage 0
313
%macro DrawMemUsage 0
Line 310... Line 315...
310
        push   dword COLUMN1_TEXT_X
315
        push   dword COLUMN1_TEXT_X
311
        push   dword y
316
        push   dword y
312
        push   dword sz_mem_usage
317
        push   dword sz_mem_usage
313
        push   dword [fore_color]
318
        push   dword [fore_color]
314
        push   dword [back_color]
319
        push   dword [back_color]
315
        call   DrawTextBold
320
        call   DrawText
316
; [mem_usage]
321
; [mem_usage]
317
        push   dword [thread_info + THREAD_INFO.mem_usage]
322
        push   dword [thread_info + THREAD_INFO.mem_usage]
318
        call   uint2str
323
        call   uint2str
319
        push   dword COLUMN2_MAX_COUNT
324
        push   dword COLUMN2_MAX_COUNT
320
        call   PadBuffSpaces
325
        call   PadBuffSpaces
321
        push   dword COLUMN2_TEXT_X
326
        push   dword COLUMN2_TEXT_X
322
        push   dword y
327
        push   dword y
323
        push   dword tmpbuffer
328
        push   dword tmpbuffer
324
        push   dword [fore_color]
329
        push   dword [fore_color]
325
        push   dword [back_color]
330
        push   dword [back_color]
326
        call   DrawTextBold
331
        call   DrawText
327
        call   ChangeBackColor
332
        call   ChangeBackColor
328
        add    y, dword ITEM_HEIGHT
333
        add    y, dword ITEM_HEIGHT
329
%endmacro
334
%endmacro
330
; **************************************************************************** ;
335
; **************************************************************************** ;
331
%macro DrawIdentifier 0
336
%macro DrawIdentifier 0
Line 333... Line 338...
333
        push   dword COLUMN1_TEXT_X
338
        push   dword COLUMN1_TEXT_X
334
        push   dword y
339
        push   dword y
335
        push   dword sz_identifier
340
        push   dword sz_identifier
336
        push   dword [fore_color]
341
        push   dword [fore_color]
337
        push   dword [back_color]
342
        push   dword [back_color]
338
        call   DrawTextBold
343
        call   DrawText
339
; [identifier]
344
; [identifier]
340
        push   dword [thread_info + THREAD_INFO.identifier]
345
        push   dword [thread_info + THREAD_INFO.identifier]
341
        call   uint2str
346
        call   uint2str
342
        push   dword COLUMN2_MAX_COUNT
347
        push   dword COLUMN2_MAX_COUNT
343
        call   PadBuffSpaces
348
        call   PadBuffSpaces
344
        push   dword COLUMN2_TEXT_X
349
        push   dword COLUMN2_TEXT_X
345
        push   dword y
350
        push   dword y
346
        push   dword tmpbuffer
351
        push   dword tmpbuffer
347
        push   dword [fore_color]
352
        push   dword [fore_color]
348
        push   dword [back_color]
353
        push   dword [back_color]
349
        call   DrawTextBold
354
        call   DrawText
350
        call   ChangeBackColor
355
        call   ChangeBackColor
351
        add    y, dword ITEM_HEIGHT
356
        add    y, dword ITEM_HEIGHT
352
%endmacro
357
%endmacro
353
; **************************************************************************** ;
358
; **************************************************************************** ;
354
%macro DrawWindowX 0
359
%macro DrawWindowX 0
Line 356... Line 361...
356
        push   dword COLUMN1_TEXT_X
361
        push   dword COLUMN1_TEXT_X
357
        push   dword y
362
        push   dword y
358
        push   dword sz_x
363
        push   dword sz_x
359
        push   dword [fore_color]
364
        push   dword [fore_color]
360
        push   dword [back_color]
365
        push   dword [back_color]
361
        call   DrawTextBold
366
        call   DrawText
362
; [x]
367
; [x]
363
        push   dword [thread_info + THREAD_INFO.x]
368
        push   dword [thread_info + THREAD_INFO.x]
364
        call   uint2str
369
        call   uint2str
365
        push   dword COLUMN2_MAX_COUNT
370
        push   dword COLUMN2_MAX_COUNT
366
        call   PadBuffSpaces
371
        call   PadBuffSpaces
367
        push   dword COLUMN2_TEXT_X
372
        push   dword COLUMN2_TEXT_X
368
        push   dword y
373
        push   dword y
369
        push   dword tmpbuffer
374
        push   dword tmpbuffer
370
        push   dword [fore_color]
375
        push   dword [fore_color]
371
        push   dword [back_color]
376
        push   dword [back_color]
372
        call   DrawTextBold
377
        call   DrawText
373
        call   ChangeBackColor
378
        call   ChangeBackColor
374
        add    y, dword ITEM_HEIGHT
379
        add    y, dword ITEM_HEIGHT
375
%endmacro
380
%endmacro
376
; **************************************************************************** ;
381
; **************************************************************************** ;
377
%macro DrawWindowY 0
382
%macro DrawWindowY 0
Line 379... Line 384...
379
        push   dword COLUMN1_TEXT_X
384
        push   dword COLUMN1_TEXT_X
380
        push   dword y
385
        push   dword y
381
        push   dword sz_y
386
        push   dword sz_y
382
        push   dword [fore_color]
387
        push   dword [fore_color]
383
        push   dword [back_color]
388
        push   dword [back_color]
384
        call   DrawTextBold
389
        call   DrawText
385
; [y]
390
; [y]
386
        push   dword [thread_info + THREAD_INFO.y]
391
        push   dword [thread_info + THREAD_INFO.y]
387
        call   uint2str
392
        call   uint2str
388
        push   dword COLUMN2_MAX_COUNT
393
        push   dword COLUMN2_MAX_COUNT
389
        call   PadBuffSpaces
394
        call   PadBuffSpaces
390
        push   dword COLUMN2_TEXT_X
395
        push   dword COLUMN2_TEXT_X
391
        push   dword y
396
        push   dword y
392
        push   dword tmpbuffer
397
        push   dword tmpbuffer
393
        push   dword [fore_color]
398
        push   dword [fore_color]
394
        push   dword [back_color]
399
        push   dword [back_color]
395
        call   DrawTextBold
400
        call   DrawText
396
        call   ChangeBackColor
401
        call   ChangeBackColor
397
        add    y, dword ITEM_HEIGHT
402
        add    y, dword ITEM_HEIGHT
398
%endmacro
403
%endmacro
399
; **************************************************************************** ;
404
; **************************************************************************** ;
400
%macro DrawWindowSizeX 0
405
%macro DrawWindowSizeX 0
Line 402... Line 407...
402
        push   dword COLUMN1_TEXT_X
407
        push   dword COLUMN1_TEXT_X
403
        push   dword y
408
        push   dword y
404
        push   dword sz_size_x
409
        push   dword sz_size_x
405
        push   dword [fore_color]
410
        push   dword [fore_color]
406
        push   dword [back_color]
411
        push   dword [back_color]
407
        call   DrawTextBold
412
        call   DrawText
408
; [size_x]
413
; [size_x]
409
        push   dword [thread_info + THREAD_INFO.size_x]
414
        push   dword [thread_info + THREAD_INFO.size_x]
410
        call   uint2str
415
        call   uint2str
411
        push   dword COLUMN2_MAX_COUNT
416
        push   dword COLUMN2_MAX_COUNT
412
        call   PadBuffSpaces
417
        call   PadBuffSpaces
413
        push   dword COLUMN2_TEXT_X
418
        push   dword COLUMN2_TEXT_X
414
        push   dword y
419
        push   dword y
415
        push   dword tmpbuffer
420
        push   dword tmpbuffer
416
        push   dword [fore_color]
421
        push   dword [fore_color]
417
        push   dword [back_color]
422
        push   dword [back_color]
418
        call   DrawTextBold
423
        call   DrawText
419
        call   ChangeBackColor
424
        call   ChangeBackColor
420
        add    y, dword ITEM_HEIGHT
425
        add    y, dword ITEM_HEIGHT
421
%endmacro
426
%endmacro
422
; **************************************************************************** ;
427
; **************************************************************************** ;
423
%macro DrawWindowSizeY 0
428
%macro DrawWindowSizeY 0
Line 425... Line 430...
425
        push   dword COLUMN1_TEXT_X
430
        push   dword COLUMN1_TEXT_X
426
        push   dword y
431
        push   dword y
427
        push   dword sz_size_y
432
        push   dword sz_size_y
428
        push   dword [fore_color]
433
        push   dword [fore_color]
429
        push   dword [back_color]
434
        push   dword [back_color]
430
        call   DrawTextBold
435
        call   DrawText
431
; [size_y]
436
; [size_y]
432
        push   dword [thread_info + THREAD_INFO.size_y]
437
        push   dword [thread_info + THREAD_INFO.size_y]
433
        call   uint2str
438
        call   uint2str
434
        push   dword COLUMN2_MAX_COUNT
439
        push   dword COLUMN2_MAX_COUNT
435
        call   PadBuffSpaces
440
        call   PadBuffSpaces
436
        push   dword COLUMN2_TEXT_X
441
        push   dword COLUMN2_TEXT_X
437
        push   dword y
442
        push   dword y
438
        push   dword tmpbuffer
443
        push   dword tmpbuffer
439
        push   dword [fore_color]
444
        push   dword [fore_color]
440
        push   dword [back_color]
445
        push   dword [back_color]
441
        call   DrawTextBold
446
        call   DrawText
442
        call   ChangeBackColor
447
        call   ChangeBackColor
443
        add    y, dword ITEM_HEIGHT
448
        add    y, dword ITEM_HEIGHT
444
%endmacro
449
%endmacro
445
; **************************************************************************** ;
450
; **************************************************************************** ;
446
%macro DrawThreadState 0
451
%macro DrawThreadState 0
Line 448... Line 453...
448
        push   dword COLUMN1_TEXT_X
453
        push   dword COLUMN1_TEXT_X
449
        push   dword y
454
        push   dword y
450
        push   dword sz_thread_state
455
        push   dword sz_thread_state
451
        push   dword [fore_color]
456
        push   dword [fore_color]
452
        push   dword [back_color]
457
        push   dword [back_color]
453
        call   DrawTextBold
458
        call   DrawText
454
; decoded_thread_state & [thread_state]
459
; decoded_thread_state & [thread_state]
455
        movzx  eax, word [thread_info + THREAD_INFO.thread_state]
460
        movzx  eax, word [thread_info + THREAD_INFO.thread_state]
456
        push   eax ; for "call uint2str" below
461
        push   eax ; for "call uint2str" below
457
%%running:
462
%%running:
458
        cmp    eax, THREAD_STATE_RUNNING
463
        cmp    eax, THREAD_STATE_RUNNING
Line 495... Line 500...
495
        push   dword COLUMN3_TEXT_X
500
        push   dword COLUMN3_TEXT_X
496
        push   dword y
501
        push   dword y
497
        push   eax
502
        push   eax
498
        push   dword [fore_color]
503
        push   dword [fore_color]
499
        push   dword [back_color]
504
        push   dword [back_color]
500
        call   DrawTextBold
505
        call   DrawText
501
        call   uint2str
506
        call   uint2str
502
        push   dword COLUMN2_MAX_COUNT
507
        push   dword COLUMN2_MAX_COUNT
503
        call   PadBuffSpaces
508
        call   PadBuffSpaces
504
        push   dword COLUMN2_TEXT_X
509
        push   dword COLUMN2_TEXT_X
505
        push   dword y
510
        push   dword y
506
        push   dword tmpbuffer
511
        push   dword tmpbuffer
507
        push   dword [fore_color]
512
        push   dword [fore_color]
508
        push   dword [back_color]
513
        push   dword [back_color]
509
        call   DrawTextBold
514
        call   DrawText
510
        call   ChangeBackColor
515
        call   ChangeBackColor
511
        add    y, dword ITEM_HEIGHT
516
        add    y, dword ITEM_HEIGHT
512
%endmacro
517
%endmacro
513
; **************************************************************************** ;
518
; **************************************************************************** ;
514
%macro DrawClientX 0
519
%macro DrawClientX 0
Line 516... Line 521...
516
        push   dword COLUMN1_TEXT_X
521
        push   dword COLUMN1_TEXT_X
517
        push   dword y
522
        push   dword y
518
        push   dword sz_client_x
523
        push   dword sz_client_x
519
        push   dword [fore_color]
524
        push   dword [fore_color]
520
        push   dword [back_color]
525
        push   dword [back_color]
521
        call   DrawTextBold
526
        call   DrawText
522
; [client_x]
527
; [client_x]
523
        push   dword [thread_info + THREAD_INFO.client_x]
528
        push   dword [thread_info + THREAD_INFO.client_x]
524
        call   uint2str
529
        call   uint2str
525
        push   dword COLUMN2_MAX_COUNT
530
        push   dword COLUMN2_MAX_COUNT
526
        call   PadBuffSpaces
531
        call   PadBuffSpaces
527
        push   dword COLUMN2_TEXT_X
532
        push   dword COLUMN2_TEXT_X
528
        push   dword y
533
        push   dword y
529
        push   dword tmpbuffer
534
        push   dword tmpbuffer
530
        push   dword [fore_color]
535
        push   dword [fore_color]
531
        push   dword [back_color]
536
        push   dword [back_color]
532
        call   DrawTextBold
537
        call   DrawText
533
        call   ChangeBackColor
538
        call   ChangeBackColor
534
        add    y, dword ITEM_HEIGHT
539
        add    y, dword ITEM_HEIGHT
535
%endmacro
540
%endmacro
536
; **************************************************************************** ;
541
; **************************************************************************** ;
537
%macro DrawClientY 0
542
%macro DrawClientY 0
Line 539... Line 544...
539
        push   dword COLUMN1_TEXT_X
544
        push   dword COLUMN1_TEXT_X
540
        push   dword y
545
        push   dword y
541
        push   dword sz_client_y
546
        push   dword sz_client_y
542
        push   dword [fore_color]
547
        push   dword [fore_color]
543
        push   dword [back_color]
548
        push   dword [back_color]
544
        call   DrawTextBold
549
        call   DrawText
545
; [client_y]
550
; [client_y]
546
        push   dword [thread_info + THREAD_INFO.client_y]
551
        push   dword [thread_info + THREAD_INFO.client_y]
547
        call   uint2str
552
        call   uint2str
548
        push   dword COLUMN2_MAX_COUNT
553
        push   dword COLUMN2_MAX_COUNT
549
        call   PadBuffSpaces
554
        call   PadBuffSpaces
550
        push   dword COLUMN2_TEXT_X
555
        push   dword COLUMN2_TEXT_X
551
        push   dword y
556
        push   dword y
552
        push   dword tmpbuffer
557
        push   dword tmpbuffer
553
        push   dword [fore_color]
558
        push   dword [fore_color]
554
        push   dword [back_color]
559
        push   dword [back_color]
555
        call   DrawTextBold
560
        call   DrawText
556
        call   ChangeBackColor
561
        call   ChangeBackColor
557
        add    y, dword ITEM_HEIGHT
562
        add    y, dword ITEM_HEIGHT
558
%endmacro
563
%endmacro
559
; **************************************************************************** ;
564
; **************************************************************************** ;
560
%macro DrawClientSizeX 0
565
%macro DrawClientSizeX 0
Line 562... Line 567...
562
        push   dword COLUMN1_TEXT_X
567
        push   dword COLUMN1_TEXT_X
563
        push   dword y
568
        push   dword y
564
        push   dword sz_client_size_x
569
        push   dword sz_client_size_x
565
        push   dword [fore_color]
570
        push   dword [fore_color]
566
        push   dword [back_color]
571
        push   dword [back_color]
567
        call   DrawTextBold
572
        call   DrawText
568
; [client_size_x]
573
; [client_size_x]
569
        push   dword [thread_info + THREAD_INFO.client_size_x]
574
        push   dword [thread_info + THREAD_INFO.client_size_x]
570
        call   uint2str
575
        call   uint2str
571
        push   dword COLUMN2_MAX_COUNT
576
        push   dword COLUMN2_MAX_COUNT
572
        call   PadBuffSpaces
577
        call   PadBuffSpaces
573
        push   dword COLUMN2_TEXT_X
578
        push   dword COLUMN2_TEXT_X
574
        push   dword y
579
        push   dword y
575
        push   dword tmpbuffer
580
        push   dword tmpbuffer
576
        push   dword [fore_color]
581
        push   dword [fore_color]
577
        push   dword [back_color]
582
        push   dword [back_color]
578
        call   DrawTextBold
583
        call   DrawText
579
        call   ChangeBackColor
584
        call   ChangeBackColor
580
        add    y, dword ITEM_HEIGHT
585
        add    y, dword ITEM_HEIGHT
581
%endmacro
586
%endmacro
582
; **************************************************************************** ;
587
; **************************************************************************** ;
583
%macro DrawClientSizeY 0
588
%macro DrawClientSizeY 0
Line 585... Line 590...
585
        push   dword COLUMN1_TEXT_X
590
        push   dword COLUMN1_TEXT_X
586
        push   dword y
591
        push   dword y
587
        push   dword sz_client_size_y
592
        push   dword sz_client_size_y
588
        push   dword [fore_color]
593
        push   dword [fore_color]
589
        push   dword [back_color]
594
        push   dword [back_color]
590
        call   DrawTextBold
595
        call   DrawText
591
; [client_size_y]
596
; [client_size_y]
592
        push   dword [thread_info + THREAD_INFO.client_size_y]
597
        push   dword [thread_info + THREAD_INFO.client_size_y]
593
        call   uint2str
598
        call   uint2str
594
        push   dword COLUMN2_MAX_COUNT
599
        push   dword COLUMN2_MAX_COUNT
595
        call   PadBuffSpaces
600
        call   PadBuffSpaces
596
        push   dword COLUMN2_TEXT_X
601
        push   dword COLUMN2_TEXT_X
597
        push   dword y
602
        push   dword y
598
        push   dword tmpbuffer
603
        push   dword tmpbuffer
599
        push   dword [fore_color]
604
        push   dword [fore_color]
600
        push   dword [back_color]
605
        push   dword [back_color]
601
        call   DrawTextBold
606
        call   DrawText
602
        call   ChangeBackColor
607
        call   ChangeBackColor
603
        add    y, dword ITEM_HEIGHT
608
        add    y, dword ITEM_HEIGHT
604
%endmacro
609
%endmacro
605
; **************************************************************************** ;
610
; **************************************************************************** ;
606
%macro DrawWindowState 0
611
%macro DrawWindowState 0
Line 608... Line 613...
608
        push   dword COLUMN1_TEXT_X
613
        push   dword COLUMN1_TEXT_X
609
        push   dword y
614
        push   dword y
610
        push   dword sz_window_state
615
        push   dword sz_window_state
611
        push   dword [fore_color]
616
        push   dword [fore_color]
612
        push   dword [back_color]
617
        push   dword [back_color]
613
        call   DrawTextBold
618
        call   DrawText
614
; decoded_window_state & [window_state]
619
; decoded_window_state & [window_state]
615
        movzx  eax, byte [thread_info + THREAD_INFO.window_state]
620
        movzx  eax, byte [thread_info + THREAD_INFO.window_state]
616
        push   eax ; for "call uint2str" below
621
        push   eax ; for "call uint2str" below
617
        mov    ebx, eax
622
        mov    ebx, eax
618
        mov    [tmpbuffer], byte 0
623
        mov    [tmpbuffer], byte 0
Line 640... Line 645...
640
        push   dword COLUMN3_TEXT_X
645
        push   dword COLUMN3_TEXT_X
641
        push   dword y
646
        push   dword y
642
        push   dword tmpbuffer
647
        push   dword tmpbuffer
643
        push   dword [fore_color]
648
        push   dword [fore_color]
644
        push   dword [back_color]
649
        push   dword [back_color]
645
        call   DrawTextBold
650
        call   DrawText
646
        call   uint2str
651
        call   uint2str
647
        push   dword COLUMN2_MAX_COUNT
652
        push   dword COLUMN2_MAX_COUNT
648
        call   PadBuffSpaces
653
        call   PadBuffSpaces
649
        push   dword COLUMN2_TEXT_X
654
        push   dword COLUMN2_TEXT_X
650
        push   dword y
655
        push   dword y
651
        push   dword tmpbuffer
656
        push   dword tmpbuffer
652
        push   dword [fore_color]
657
        push   dword [fore_color]
653
        push   dword [back_color]
658
        push   dword [back_color]
654
        call   DrawTextBold
659
        call   DrawText
655
        call   ChangeBackColor
660
        call   ChangeBackColor
656
        add    y, dword ITEM_HEIGHT
661
        add    y, dword ITEM_HEIGHT
657
%endmacro
662
%endmacro
658
; **************************************************************************** ;
663
; **************************************************************************** ;
659
%macro DrawEventMask 0
664
%macro DrawEventMask 0
Line 661... Line 666...
661
        push   dword COLUMN1_TEXT_X
666
        push   dword COLUMN1_TEXT_X
662
        push   dword y
667
        push   dword y
663
        push   dword sz_event_mask
668
        push   dword sz_event_mask
664
        push   dword [fore_color]
669
        push   dword [fore_color]
665
        push   dword [back_color]
670
        push   dword [back_color]
666
        call   DrawTextBold
671
        call   DrawText
667
; decoded_event_mask & [event_mask]
672
; decoded_event_mask & [event_mask]
668
        mov    eax, [thread_info + THREAD_INFO.event_mask]
673
        mov    eax, [thread_info + THREAD_INFO.event_mask]
669
        push   eax ; for "call uint2str" below
674
        push   eax ; for "call uint2str" below
670
        mov    ebx, eax
675
        mov    ebx, eax
671
        mov    [tmpbuffer], byte 0
676
        mov    [tmpbuffer], byte 0
Line 729... Line 734...
729
        push   dword COLUMN3_TEXT_X
734
        push   dword COLUMN3_TEXT_X
730
        push   dword y
735
        push   dword y
731
        push   dword tmpbuffer
736
        push   dword tmpbuffer
732
        push   dword [fore_color]
737
        push   dword [fore_color]
733
        push   dword [back_color]
738
        push   dword [back_color]
734
        call   DrawTextBold
739
        call   DrawText
735
        call   uint2str
740
        call   uint2str
736
        push   dword COLUMN2_MAX_COUNT
741
        push   dword COLUMN2_MAX_COUNT
737
        call   PadBuffSpaces
742
        call   PadBuffSpaces
738
        push   dword COLUMN2_TEXT_X
743
        push   dword COLUMN2_TEXT_X
739
        push   dword y
744
        push   dword y
740
        push   dword tmpbuffer
745
        push   dword tmpbuffer
741
        push   dword [fore_color]
746
        push   dword [fore_color]
742
        push   dword [back_color]
747
        push   dword [back_color]
743
        call   DrawTextBold
748
        call   DrawText
744
        call   ChangeBackColor
749
        call   ChangeBackColor
745
        add    y, dword ITEM_HEIGHT
750
        add    y, dword ITEM_HEIGHT
746
%endmacro
751
%endmacro
747
; **************************************************************************** ;
752
; **************************************************************************** ;
748
%macro DrawKeyboardMode 0
753
%macro DrawKeyboardMode 0
Line 752... Line 757...
752
        push   dword COLUMN1_TEXT_X
757
        push   dword COLUMN1_TEXT_X
753
        push   dword y
758
        push   dword y
754
        push   dword sz_keyboard_mode
759
        push   dword sz_keyboard_mode
755
        push   dword [fore_color]
760
        push   dword [fore_color]
756
        push   dword [back_color]
761
        push   dword [back_color]
757
        call   DrawTextBold
762
        call   DrawText
758
; decoded_keyboard_mode & [keyboard_mode]
763
; decoded_keyboard_mode & [keyboard_mode]
759
        movzx  eax, byte [thread_info + THREAD_INFO.keyboard_mode]
764
        movzx  eax, byte [thread_info + THREAD_INFO.keyboard_mode]
760
        push   eax ; for "call uint2str" below
765
        push   eax ; for "call uint2str" below
761
%%ascii:
766
%%ascii:
762
        cmp    eax, KEYBOARD_MODE_ASCII
767
        cmp    eax, KEYBOARD_MODE_ASCII
Line 774... Line 779...
774
        push   dword COLUMN3_TEXT_X
779
        push   dword COLUMN3_TEXT_X
775
        push   dword y
780
        push   dword y
776
        push   eax
781
        push   eax
777
        push   dword [fore_color]
782
        push   dword [fore_color]
778
        push   dword [back_color]
783
        push   dword [back_color]
779
        call   DrawTextBold
784
        call   DrawText
780
        call   uint2str
785
        call   uint2str
781
        push   dword COLUMN2_TEXT_X
786
        push   dword COLUMN2_TEXT_X
782
        push   dword y
787
        push   dword y
783
        push   dword tmpbuffer
788
        push   dword tmpbuffer
784
        push   dword [fore_color]
789
        push   dword [fore_color]
785
        push   dword [back_color]
790
        push   dword [back_color]
786
        call   DrawTextBold
791
        call   DrawText
787
        call   ChangeBackColor
792
        call   ChangeBackColor
788
        add    y, dword ITEM_HEIGHT
793
        add    y, dword ITEM_HEIGHT
789
%endmacro
794
%endmacro
790
; **************************************************************************** ;
795
; **************************************************************************** ;
791
%macro DrawUpdateIndicator 0
796
%macro DrawUpdateIndicator 0
Line 1031... Line 1036...
1031
        ret    8
1036
        ret    8
1032
%undef stradd
1037
%undef stradd
1033
%undef str
1038
%undef str
1034
; ---------------------------------------------------------------------------- ;
1039
; ---------------------------------------------------------------------------- ;
1035
align 4
1040
align 4
-
 
1041
DrawText:
-
 
1042
%define x          [esp + 20]
-
 
1043
%define y          [esp + 16]
-
 
1044
%define text       [esp + 12]
-
 
1045
%define fore_color [esp +  8]
-
 
1046
%define back_color [esp +  4]
-
 
1047
        mov    eax, 4
-
 
1048
        mov    ecx, fore_color
-
 
1049
        mov    edi, back_color
-
 
1050
        mov    edx, text
-
 
1051
        mov    ebx, x
-
 
1052
        shl    ebx, 16
-
 
1053
        or     ebx, y
-
 
1054
        or     ecx, 0xD0000000
-
 
1055
        int    64
-
 
1056
        ret    20
-
 
1057
%undef x
-
 
1058
%undef y
-
 
1059
%undef text
-
 
1060
%undef fore_color
-
 
1061
%undef back_color
-
 
1062
; ---------------------------------------------------------------------------- ;
-
 
1063
%comment
-
 
1064
align 4
1036
DrawTextBold:
1065
DrawTextBold:
1037
%define x          [esp + 20]
1066
%define x          [esp + 20]
1038
%define y          [esp + 16]
1067
%define y          [esp + 16]
1039
%define text       [esp + 12]
1068
%define text       [esp + 12]
1040
%define fore_color [esp +  8]
1069
%define fore_color [esp +  8]
Line 1049... Line 1078...
1049
        or     ebx, y
1078
        or     ebx, y
1050
align 4
1079
align 4
1051
.next:
1080
.next:
1052
        test   [edx], byte 0xFF
1081
        test   [edx], byte 0xFF
1053
        jz     .done
1082
        jz     .done
1054
        or     ecx, 0x40000000
1083
        or     ecx, 0x50000000
1055
        int    64
1084
        int    64
1056
        add    ebx, (1 << 16)
1085
        add    ebx, (1 << 16)
1057
        and    ecx, 0x00FFFFFF
1086
        and    ecx, 0x10FFFFFF
1058
        int    64
1087
        int    64
1059
        add    ebx, (6 << 16)
1088
        add    ebx, (TEXT_WIDTH << 16)
1060
        inc    edx
1089
        inc    edx
1061
        jmp    .next
1090
        jmp    .next
1062
align 4
1091
align 4
1063
.done:
1092
.done:
1064
        ret    20
1093
        ret    20
1065
%undef x
1094
%undef x
1066
%undef y
1095
%undef y
1067
%undef text
1096
%undef text
1068
%undef fore_color
1097
%undef fore_color
1069
%undef back_color
1098
%undef back_color
-
 
1099
%endcomment
1070
; ---------------------------------------------------------------------------- ;
1100
; ---------------------------------------------------------------------------- ;
1071
align 4
1101
align 4
1072
ChangeBackColor:
1102
ChangeBackColor:
1073
        mov    eax, [BackColors]
1103
        mov    eax, [BackColors]
1074
        sub    eax, 3
1104
        sub    eax, 3