Bigger font, not bold

git-svn-id: svn://kolibrios.org@6609 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
0CodErr 2016-10-19 20:30:50 +00:00
parent 437682c9a5
commit f1d8896636

View File

@ -11,7 +11,7 @@ STACK_SIZE equ 256
PROC_INFO_SIZE equ 1024 PROC_INFO_SIZE equ 1024
TMP_BUFFER_SIZE equ 64 TMP_BUFFER_SIZE equ 64
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
TEXT_WIDTH equ 6 TEXT_WIDTH equ 8
BOLD_TEXT_WIDTH equ TEXT_WIDTH + 1 BOLD_TEXT_WIDTH equ TEXT_WIDTH + 1
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
COLUMN1_MAX_COUNT equ 13 COLUMN1_MAX_COUNT equ 13
@ -23,11 +23,16 @@ COLUMN1_PADDING equ COLUMN_PADDING
COLUMN2_PADDING equ COLUMN_PADDING COLUMN2_PADDING equ COLUMN_PADDING
COLUMN3_PADDING equ COLUMN_PADDING COLUMN3_PADDING equ COLUMN_PADDING
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
ITEM_HEIGHT equ 15 ITEM_HEIGHT equ 22
TEXT_HEIGHT equ 9 TEXT_HEIGHT equ 16
%comment
COLUMN1_ITEM_WIDTH equ COLUMN1_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN1_PADDING * 2 COLUMN1_ITEM_WIDTH equ COLUMN1_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN1_PADDING * 2
COLUMN2_ITEM_WIDTH equ COLUMN2_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN2_PADDING * 2 COLUMN2_ITEM_WIDTH equ COLUMN2_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN2_PADDING * 2
COLUMN3_ITEM_WIDTH equ COLUMN3_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN3_PADDING * 2 COLUMN3_ITEM_WIDTH equ COLUMN3_MAX_COUNT * BOLD_TEXT_WIDTH + COLUMN3_PADDING * 2
%endcomment
COLUMN1_ITEM_WIDTH equ COLUMN1_MAX_COUNT * TEXT_WIDTH + COLUMN1_PADDING * 2
COLUMN2_ITEM_WIDTH equ COLUMN2_MAX_COUNT * TEXT_WIDTH + COLUMN2_PADDING * 2
COLUMN3_ITEM_WIDTH equ COLUMN3_MAX_COUNT * TEXT_WIDTH + COLUMN3_PADDING * 2
ITEM_MARGIN equ 6 ITEM_MARGIN equ 6
ITEM_BACK_COLOR_1 equ 0x00EAEAEA ITEM_BACK_COLOR_1 equ 0x00EAEAEA
ITEM_BACK_COLOR_2 equ 0x00F4F4F4 ITEM_BACK_COLOR_2 equ 0x00F4F4F4
@ -223,7 +228,7 @@ sz_undefined db "UnDef ",0
push dword sz_cpu_usage push dword sz_cpu_usage
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [cpu_usage] ; [cpu_usage]
push dword [thread_info + THREAD_INFO.cpu_usage] push dword [thread_info + THREAD_INFO.cpu_usage]
call uint2str call uint2str
@ -234,7 +239,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -246,7 +251,7 @@ sz_undefined db "UnDef ",0
push dword sz_win_stack_pos push dword sz_win_stack_pos
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [win_stack_pos] ; [win_stack_pos]
movzx eax, word [thread_info + THREAD_INFO.win_stack_pos] movzx eax, word [thread_info + THREAD_INFO.win_stack_pos]
push eax push eax
@ -258,7 +263,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -270,14 +275,14 @@ sz_undefined db "UnDef ",0
push dword sz_name push dword sz_name
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; name ; name
push dword COLUMN2_TEXT_X push dword COLUMN2_TEXT_X
push dword y push dword y
push dword (thread_info + THREAD_INFO.name) push dword (thread_info + THREAD_INFO.name)
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -289,7 +294,7 @@ sz_undefined db "UnDef ",0
push dword sz_mem_address push dword sz_mem_address
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [mem_address] ; [mem_address]
push dword [thread_info + THREAD_INFO.mem_address] push dword [thread_info + THREAD_INFO.mem_address]
call uint2str call uint2str
@ -300,7 +305,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -312,7 +317,7 @@ sz_undefined db "UnDef ",0
push dword sz_mem_usage push dword sz_mem_usage
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [mem_usage] ; [mem_usage]
push dword [thread_info + THREAD_INFO.mem_usage] push dword [thread_info + THREAD_INFO.mem_usage]
call uint2str call uint2str
@ -323,7 +328,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -335,7 +340,7 @@ sz_undefined db "UnDef ",0
push dword sz_identifier push dword sz_identifier
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [identifier] ; [identifier]
push dword [thread_info + THREAD_INFO.identifier] push dword [thread_info + THREAD_INFO.identifier]
call uint2str call uint2str
@ -346,7 +351,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -358,7 +363,7 @@ sz_undefined db "UnDef ",0
push dword sz_x push dword sz_x
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [x] ; [x]
push dword [thread_info + THREAD_INFO.x] push dword [thread_info + THREAD_INFO.x]
call uint2str call uint2str
@ -369,7 +374,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -381,7 +386,7 @@ sz_undefined db "UnDef ",0
push dword sz_y push dword sz_y
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [y] ; [y]
push dword [thread_info + THREAD_INFO.y] push dword [thread_info + THREAD_INFO.y]
call uint2str call uint2str
@ -392,7 +397,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -404,7 +409,7 @@ sz_undefined db "UnDef ",0
push dword sz_size_x push dword sz_size_x
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [size_x] ; [size_x]
push dword [thread_info + THREAD_INFO.size_x] push dword [thread_info + THREAD_INFO.size_x]
call uint2str call uint2str
@ -415,7 +420,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -427,7 +432,7 @@ sz_undefined db "UnDef ",0
push dword sz_size_y push dword sz_size_y
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [size_y] ; [size_y]
push dword [thread_info + THREAD_INFO.size_y] push dword [thread_info + THREAD_INFO.size_y]
call uint2str call uint2str
@ -438,7 +443,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -450,7 +455,7 @@ sz_undefined db "UnDef ",0
push dword sz_thread_state push dword sz_thread_state
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; decoded_thread_state & [thread_state] ; decoded_thread_state & [thread_state]
movzx eax, word [thread_info + THREAD_INFO.thread_state] movzx eax, word [thread_info + THREAD_INFO.thread_state]
push eax ; for "call uint2str" below push eax ; for "call uint2str" below
@ -497,7 +502,7 @@ sz_undefined db "UnDef ",0
push eax push eax
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call uint2str call uint2str
push dword COLUMN2_MAX_COUNT push dword COLUMN2_MAX_COUNT
call PadBuffSpaces call PadBuffSpaces
@ -506,7 +511,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -518,7 +523,7 @@ sz_undefined db "UnDef ",0
push dword sz_client_x push dword sz_client_x
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [client_x] ; [client_x]
push dword [thread_info + THREAD_INFO.client_x] push dword [thread_info + THREAD_INFO.client_x]
call uint2str call uint2str
@ -529,7 +534,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -541,7 +546,7 @@ sz_undefined db "UnDef ",0
push dword sz_client_y push dword sz_client_y
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [client_y] ; [client_y]
push dword [thread_info + THREAD_INFO.client_y] push dword [thread_info + THREAD_INFO.client_y]
call uint2str call uint2str
@ -552,7 +557,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -564,7 +569,7 @@ sz_undefined db "UnDef ",0
push dword sz_client_size_x push dword sz_client_size_x
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [client_size_x] ; [client_size_x]
push dword [thread_info + THREAD_INFO.client_size_x] push dword [thread_info + THREAD_INFO.client_size_x]
call uint2str call uint2str
@ -575,7 +580,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -587,7 +592,7 @@ sz_undefined db "UnDef ",0
push dword sz_client_size_y push dword sz_client_size_y
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; [client_size_y] ; [client_size_y]
push dword [thread_info + THREAD_INFO.client_size_y] push dword [thread_info + THREAD_INFO.client_size_y]
call uint2str call uint2str
@ -598,7 +603,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -610,7 +615,7 @@ sz_undefined db "UnDef ",0
push dword sz_window_state push dword sz_window_state
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; decoded_window_state & [window_state] ; decoded_window_state & [window_state]
movzx eax, byte [thread_info + THREAD_INFO.window_state] movzx eax, byte [thread_info + THREAD_INFO.window_state]
push eax ; for "call uint2str" below push eax ; for "call uint2str" below
@ -642,7 +647,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call uint2str call uint2str
push dword COLUMN2_MAX_COUNT push dword COLUMN2_MAX_COUNT
call PadBuffSpaces call PadBuffSpaces
@ -651,7 +656,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -663,7 +668,7 @@ sz_undefined db "UnDef ",0
push dword sz_event_mask push dword sz_event_mask
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; decoded_event_mask & [event_mask] ; decoded_event_mask & [event_mask]
mov eax, [thread_info + THREAD_INFO.event_mask] mov eax, [thread_info + THREAD_INFO.event_mask]
push eax ; for "call uint2str" below push eax ; for "call uint2str" below
@ -731,7 +736,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call uint2str call uint2str
push dword COLUMN2_MAX_COUNT push dword COLUMN2_MAX_COUNT
call PadBuffSpaces call PadBuffSpaces
@ -740,7 +745,7 @@ sz_undefined db "UnDef ",0
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -754,7 +759,7 @@ sz_undefined db "UnDef ",0
push dword sz_keyboard_mode push dword sz_keyboard_mode
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
; decoded_keyboard_mode & [keyboard_mode] ; decoded_keyboard_mode & [keyboard_mode]
movzx eax, byte [thread_info + THREAD_INFO.keyboard_mode] movzx eax, byte [thread_info + THREAD_INFO.keyboard_mode]
push eax ; for "call uint2str" below push eax ; for "call uint2str" below
@ -776,14 +781,14 @@ sz_undefined db "UnDef ",0
push eax push eax
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call uint2str call uint2str
push dword COLUMN2_TEXT_X push dword COLUMN2_TEXT_X
push dword y push dword y
push dword tmpbuffer push dword tmpbuffer
push dword [fore_color] push dword [fore_color]
push dword [back_color] push dword [back_color]
call DrawTextBold call DrawText
call ChangeBackColor call ChangeBackColor
add y, dword ITEM_HEIGHT add y, dword ITEM_HEIGHT
%endmacro %endmacro
@ -1033,6 +1038,30 @@ StringConcatenate:
%undef str %undef str
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
align 4 align 4
DrawText:
%define x [esp + 20]
%define y [esp + 16]
%define text [esp + 12]
%define fore_color [esp + 8]
%define back_color [esp + 4]
mov eax, 4
mov ecx, fore_color
mov edi, back_color
mov edx, text
mov ebx, x
shl ebx, 16
or ebx, y
or ecx, 0xD0000000
int 64
ret 20
%undef x
%undef y
%undef text
%undef fore_color
%undef back_color
; ---------------------------------------------------------------------------- ;
%comment
align 4
DrawTextBold: DrawTextBold:
%define x [esp + 20] %define x [esp + 20]
%define y [esp + 16] %define y [esp + 16]
@ -1051,12 +1080,12 @@ align 4
.next: .next:
test [edx], byte 0xFF test [edx], byte 0xFF
jz .done jz .done
or ecx, 0x40000000 or ecx, 0x50000000
int 64 int 64
add ebx, (1 << 16) add ebx, (1 << 16)
and ecx, 0x00FFFFFF and ecx, 0x10FFFFFF
int 64 int 64
add ebx, (6 << 16) add ebx, (TEXT_WIDTH << 16)
inc edx inc edx
jmp .next jmp .next
align 4 align 4
@ -1067,6 +1096,7 @@ align 4
%undef text %undef text
%undef fore_color %undef fore_color
%undef back_color %undef back_color
%endcomment
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
align 4 align 4
ChangeBackColor: ChangeBackColor: