Rev 4905 | Rev 4907 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4905 | Rev 4906 | ||
---|---|---|---|
Line 94... | Line 94... | ||
94 | cmdline_x_size equ messages_x_size |
94 | cmdline_x_size equ messages_x_size |
95 | cmdline_y_size equ 10 |
95 | cmdline_y_size equ 10 |
Line 96... | Line 96... | ||
96 | 96 | ||
97 | registers_x_pos equ (data_x_pos + messages_x_size + 4) |
97 | registers_x_pos equ (data_x_pos + messages_x_size + 4) |
98 | registers_y_pos equ (title_y_pos + title_y_size - 3) |
98 | registers_y_pos equ (title_y_pos + title_y_size - 3) |
99 | registers_x_size equ 134 |
99 | registers_x_size equ 134+2*6 |
Line 100... | Line 100... | ||
100 | registers_y_size equ (cmdline_y_pos + cmdline_y_size - registers_y_pos+1) |
100 | registers_y_size equ (cmdline_y_pos + cmdline_y_size - registers_y_pos+1) |
101 | 101 | ||
Line 656... | Line 656... | ||
656 | 656 | ||
Line 657... | Line 657... | ||
657 | ; TODO: add format support (e.g. numerical value, or address offset/pointer) |
657 | ; TODO: add format support (e.g. numerical value, or address offset/pointer) |
658 | 658 | ||
- | 659 | ; in: esi->value, edx->string, ecx = string length, ebx = coord |
|
659 | ; in: esi->value, edx->string, ecx = string length, ebx = coord |
660 | draw_register: |
660 | draw_register: |
661 | push esi |
661 | push edx |
662 | push edx |
662 | push ecx |
- | |
- | 663 | push ecx |
|
663 | push esi |
664 | push ebp |
Line 664... | Line 665... | ||
664 | mov eax, esi |
665 | |
665 | mov esi, ecx |
666 | mov ebp, ecx |
666 | 667 | ||
667 | mov ecx, (COLOR_TXT_INACTIVE or 0x40000000) |
668 | mov ecx, (COLOR_TXT_INACTIVE or 0x40000000) |
668 | cmp [debuggee_pid], 0 |
669 | cmp [debuggee_pid], 0 |
Line 669... | Line 670... | ||
669 | jz .cd |
670 | jz .cd |
670 | cmp [bSuspended], 0 |
- | |
671 | jz .cd |
671 | cmp [bSuspended], 0 |
672 | 672 | jz .cd |
|
673 | mov ecx, (COLOR_TXT_NORMAL or 0x40000000) |
- | |
674 | push edi |
673 | |
675 | mov edi, [eax] |
674 | mov ecx, (COLOR_TXT_NORMAL or 0x40000000) |
676 | cmp dword [eax+oldcontext-context], edi |
- | |
677 | pop edi |
675 | mov eax, [esi] |
- | 676 | cmp eax, dword [esi+oldcontext-context] |
|
- | 677 | je .cd |
|
- | 678 | mov ecx, (COLOR_TXT_CHANGED or 0x40000000) |
|
678 | jz .cd |
679 | .cd: |
679 | mov ecx, (COLOR_TXT_CHANGED or 0x40000000) |
680 | push eax ;store reg value |
- | 681 | ||
680 | 682 | mov esi, ebp |
|
681 | .cd: |
683 | ; draw a text string in the window |
682 | ; draw a text string in the window |
684 | mcall 4 |
683 | mcall 4 |
685 | |
Line 684... | Line 686... | ||
684 | imul esi, 60000h |
686 | imul esi, 60000h |
685 | lea edx, [ebx+esi] |
- | |
686 | mov esi, ecx |
- | |
687 | pop ecx |
- | |
688 | 687 | lea edx, [ebx+esi] |
|
689 | ; draw a number in the window |
- | |
690 | mcall 47, 80101h |
688 | mov esi, ecx |
691 | lea ebx, [edx+60000h*18] |
- | |
692 | mov esi, ecx |
- | |
693 | pop ecx |
- | |
694 | pop edx |
- | |
695 | add edx, ecx |
- | |
696 | ret |
- | |
697 | - | ||
698 | ;----------------------------------------------------------------------------- |
- | |
699 | ; Display FPU register (ST0 - ST7) content |
- | |
700 | ; |
- | |
701 | ; in: esi->value, edx->string, ecx = string length, ebx = coord |
- | |
Line 702... | Line 689... | ||
702 | draw_fpu_register: |
689 | pop ecx |
- | 690 | ||
- | 691 | ; draw a number in the window |
|
Line 703... | Line -... | ||
703 | push ebx |
- | |
704 | push edx |
- | |
705 | push ecx |
- | |
706 | push esi |
- | |
707 | - | ||
708 | sub esp, 8 |
- | |
709 | - | ||
710 | fld tword [esi] |
- | |
711 | fistp qword [esp] |
- | |
712 | - | ||
713 | mov eax, esi |
- | |
714 | mov esi, ecx |
- | |
715 | - | ||
716 | mov ecx, (COLOR_TXT_INACTIVE or 0x40000000) |
- | |
717 | cmp [debuggee_pid], 0 |
- | |
718 | jz .cd |
- | |
719 | cmp [bSuspended], 0 |
- | |
720 | jz .cd |
- | |
721 | - | ||
722 | mov ecx, (COLOR_TXT_NORMAL or 0x40000000) |
- | |
723 | push edi |
- | |
724 | mov edi, [eax] |
- | |
725 | cmp dword [eax+oldcontext-context], edi |
- | |
726 | pop edi |
- | |
727 | jnz .scol |
- | |
728 | push edi |
- | |
729 | mov edi, [eax+4] |
- | |
730 | cmp dword [eax+oldcontext-context+4], edi |
- | |
731 | pop edi |
- | |
732 | jz .cd |
- | |
733 | - | ||
734 | .scol: |
- | |
735 | mov ecx, (COLOR_TXT_CHANGED or 0x40000000) |
- | |
736 | - | ||
737 | .cd: |
- | |
738 | ; draw a text string in the window |
- | |
739 | mcall 4 |
- | |
740 | imul esi, 60000h |
- | |
741 | lea edx, [ebx+esi] |
- | |
742 | mov esi, ecx |
- | |
743 | - | ||
744 | mov ecx, esp |
692 | rol ecx, 16 |
745 | - | ||
746 | ; draw a number in the window |
- | |
747 | ; color is the same as for previous text draw function |
693 | mcall 47, 0x00040100 |
748 | ; ebx : [20] show 16 chars set [30] bit - qword |
694 | |
749 | mcall 47, 40100101h |
695 | shr ecx, 16 |
750 | add esp, 8 |
696 | add edx, (4*6+3) shl 16 |
751 | pop ecx |
697 | mcall 47 |
Line -... | Line 698... | ||
- | 698 | ||
752 | lea ebx, [edx+60000h*18] |
699 | pop ebp |
753 | mov esi, ecx |
700 | pop ecx |
754 | pop ecx |
701 | pop edx |
755 | pop edx |
702 | pop esi |
- | 703 | add edx, ecx |
|
756 | pop ebx |
704 | ret |
Line 757... | Line 705... | ||
757 | add edx, ecx |
705 | |
758 | ret |
706 | |
759 | 707 | ;----------------------------------------------------------------------------- |
|
Line 998... | Line 946... | ||
998 | 946 | ||
999 | 947 | ||
1000 | ;----------------------------------------------------------------------------- |
948 | ;----------------------------------------------------------------------------- |
1001 | ; Show FPU MMX register content |
949 | ; Show FPU MMX register content |
- | 950 | ; |
|
1002 | ; |
951 | ; in: ebp index, ebx = coord |
1003 | ; in: esi->value, edx->string, ecx = string length, ebx = coord |
- | |
1004 | draw_mmx_register: |
- | |
1005 | push ebx |
- | |
1006 | push edx |
- | |
1007 | push ecx |
- | |
- | 952 | ||
1008 | push esi |
953 | draw_mmx_register_2: |
Line 1009... | Line 954... | ||
1009 | mov eax, esi |
954 | |
1010 | mov esi, ecx |
955 | shl ebp, 4 |
1011 | 956 | ||
1012 | mov ecx, (COLOR_TXT_INACTIVE or 0x40000000) |
957 | mov ecx, (COLOR_TXT_INACTIVE or 0x40000000) |
1013 | cmp [debuggee_pid], 0 |
958 | cmp [debuggee_pid], 0 |
Line 1014... | Line 959... | ||
1014 | jz .cd |
959 | jz .cd |
1015 | cmp [bSuspended], 0 |
- | |
- | 960 | cmp [bSuspended], 0 |
|
1016 | jz .cd |
961 | jz .cd |
1017 | 962 | ||
1018 | mov ecx, (COLOR_TXT_NORMAL or 0x40000000) |
- | |
1019 | push edi |
963 | mov ecx, (COLOR_TXT_NORMAL or 0x40000000) |
1020 | mov edi, [eax] |
- | |
- | 964 | ||
1021 | cmp dword [eax+oldcontext-context], edi |
965 | mov eax, dword [_mm0+ebp] |
1022 | pop edi |
966 | cmp eax, dword [_mm0+(oldcontext-context)+ebp] |
1023 | jnz .scol |
- | |
1024 | push edi |
967 | jne .scol |
Line 1025... | Line 968... | ||
1025 | mov edi, [eax+4] |
968 | |
1026 | cmp dword [eax+oldcontext-context+4], edi |
969 | mov eax, dword [_mm0+ebp+4] |
1027 | pop edi |
- | |
1028 | jz .cd |
970 | cmp eax, dword [_mm0+(oldcontext-context)+ebp+4] |
- | 971 | je .cd |
|
- | 972 | ||
- | 973 | .scol: |
|
- | 974 | mov ecx, (COLOR_TXT_CHANGED or 0x40000000) |
|
- | 975 | .cd: |
|
1029 | 976 | mov eax, ebp |
|
1030 | .scol: |
- | |
Line 1031... | Line 977... | ||
1031 | mov ecx, (COLOR_TXT_CHANGED or 0x40000000) |
977 | shl eax, 16-4 |
1032 | - | ||
1033 | .cd: |
978 | add eax, 'MM0=' |
1034 | ; draw a text string in the window |
979 | push eax ;write label into stack |
1035 | mcall 4 |
980 | |
1036 | - | ||
1037 | imul esi, 60000h |
- | |
1038 | lea edx, [ebx+esi] |
981 | ; draw a text string in the window |
1039 | mov esi, ecx |
- | |
- | 982 | ||
1040 | pop ecx |
983 | mov eax, 4 |
- | 984 | mov esi, eax |
|
- | 985 | mov edx, esp |
|
- | 986 | mov edi, COLOR_BG_NORMAL |
|
1041 | ; draw a number in the window |
987 | int 0x40 |
- | 988 | ||
- | 989 | mov esi, ecx |
|
- | 990 | mov [esp], ebx |
|
- | 991 | ||
- | 992 | mov ecx, dword [_mm0+ebp+4] |
|
- | 993 | rol ecx, 16 |
|
- | 994 | lea edx, [ebx+0x180000] |
|
- | 995 | mov ebx, 0x00040100 |
|
- | 996 | mcall 47 ;word #3 |
|
1042 | ; color is the same as for previous draw text function |
997 | |
- | 998 | shr ecx, 16 |
|
- | 999 | add edx, (4*6+3) shl 16 |
|
- | 1000 | mcall 47 ;word #2 |
|
- | 1001 | ||
- | 1002 | mov ecx, dword [_mm0+ebp] |
|
- | 1003 | rol ecx, 16 |
|
- | 1004 | add edx, (4*6+3) shl 16 |
|
1043 | ; ebx : [20] show 16 chars set [30] bit - qword |
1005 | mcall 47 ;word #1 |
- | 1006 | ||
1044 | mcall 47, 40100101h |
1007 | shr ecx, 16 |
1045 | lea ebx, [edx+60000h*18] |
1008 | add edx, (4*6+3) shl 16 |
Line 1046... | Line 1009... | ||
1046 | mov esi, ecx |
1009 | mcall 47 ;word #0 |
1047 | pop ecx |
1010 | |
Line 1169... | Line 1132... | ||
1169 | ; MMX registers |
1132 | ; MMX registers |
Line 1170... | Line 1133... | ||
1170 | 1133 | ||
Line 1171... | Line 1134... | ||
1171 | push ebp |
1134 | push ebp |
1172 | 1135 | ||
1173 | push 8 |
1136 | push 8 |
1174 | mov edx, mmx_strs |
- | |
Line 1175... | Line 1137... | ||
1175 | mov ebx, (registers_x_pos+2)*10000h+registers_y_pos+142 |
1137 | xor ebp, ebp |
1176 | mov esi, _mm0 |
1138 | mov ebx, (registers_x_pos+2)*10000h+registers_y_pos+142 |
Line 1177... | Line 1139... | ||
1177 | 1139 | ||
1178 | align 4 |
1140 | align 4 |
1179 | .draw_mmx_regs: |
1141 | .draw_mmx_regs: |
1180 | 1142 | ||
1181 | call draw_mmx_register |
1143 | call draw_mmx_register_2 |
Line 1182... | Line 1144... | ||
1182 | add ebx, 10 |
1144 | add ebx, 10 |
Line 1183... | Line 1145... | ||
1183 | add esi, 16 |
1145 | inc ebp |
1184 | dec dword [esp] |
1146 | dec dword [esp] |
Line 1185... | Line 1147... | ||
1185 | jnz .draw_mmx_regs |
1147 | jnz .draw_mmx_regs |
1186 | 1148 | ||
1187 | ;FPU registers |
1149 | ;FPU registers |