Subversion Repositories Kolibri OS

Rev

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

Rev 4889 Rev 4890
Line 122... Line 122...
122
        mov     ecx, (needzeroend-needzerostart+3)/4
122
        mov     ecx, (needzeroend-needzerostart+3)/4
123
        rep stosd
123
        rep stosd
124
        mov     esi, begin_str
124
        mov     esi, begin_str
125
        call    put_message_nodraw
125
        call    put_message_nodraw
126
    ; set event mask - default events and debugging events
126
        ; set event mask - default events and debugging events
127
        ;push   40
-
 
128
        ;pop    eax
-
 
129
        ;mov    ebx, 0x107
-
 
130
        mcall   40, 0x107
127
        mcall   40, 0x107
131
    ; set debug messages buffer
128
        ; set debug messages buffer
132
        mov     ecx, dbgbufsize
129
        mov     ecx, dbgbufsize
133
        mov     dword [ecx], 256
130
        mov     dword [ecx], 256
134
        xor     ebx, ebx
131
        xor     ebx, ebx
Line 147... Line 144...
147
 
144
 
148
dodraw:
145
dodraw:
Line 149... Line 146...
149
        call    draw_window
146
        call    draw_window
150
 
-
 
151
waitevent:
-
 
152
        ;push   10
147
 
153
        ;pop    eax
148
waitevent:
154
        mcall   10
149
        mcall   10
155
        cmp     al, 9
150
        cmp     al, 9
156
        jz      debugmsg
151
        jz      debugmsg
157
        dec     eax
152
        dec     eax
158
        jz      dodraw
153
        jz      dodraw
159
        dec     eax
154
        dec     eax
160
        jz      keypressed
155
        jz      keypressed
161
        dec     eax
156
        dec     eax
162
        jnz     waitevent
-
 
163
    ; button pressed - we have only one button (close)
-
 
164
        ;push   -1
157
        jnz     waitevent
Line 165... Line 158...
165
        ;pop    eax
158
        ; button pressed - we have only one button (close)
166
        mcall   -1
159
        mcall   -1
167
 
160
 
Line 380... Line 373...
380
 
373
 
381
clear_cmdline_end:
374
clear_cmdline_end:
382
        mov     ebx, [cmdline_pos]
375
        mov     ebx, [cmdline_pos]
383
        mov     ecx, [cmdline_len]
376
        mov     ecx, [cmdline_len]
384
        sub     ecx, ebx
-
 
385
        ;push   13
-
 
386
        ;pop    eax
377
        sub     ecx, ebx
387
        imul    ebx, 6
378
        imul    ebx, 6
388
        imul    ecx, 6
379
        imul    ecx, 6
389
        inc     ecx
380
        inc     ecx
390
        add     ebx, cmdline_x_pos
381
        add     ebx, cmdline_x_pos
391
        shl     ebx, 16
382
        shl     ebx, 16
392
        or      ebx, ecx
383
        or      ebx, ecx
393
        mov     ecx, cmdline_y_pos*10000h + cmdline_y_size
-
 
394
        ; setting up container color scheme
-
 
395
        ; COLOR_BG_NORMAL was 0xFFFFFF
384
        mov     ecx, cmdline_y_pos*10000h + cmdline_y_size
396
        mov     edx, COLOR_BG_NORMAL
385
        mov     edx, COLOR_BG_NORMAL
397
        ; draw container rectangle/box for cmdline
386
        ; draw container rectangle/box for cmdline
398
        mcall   13
387
        mcall   13
Line 407... Line 396...
407
        mov     ebx, [cmdline_pos]
396
        mov     ebx, [cmdline_pos]
Line 408... Line 397...
408
 
397
 
409
    @@:
398
    @@:
410
        mov     esi, [cmdline_len]
399
        mov     esi, [cmdline_len]
411
        sub     esi, ebx
-
 
412
        ;push   4
-
 
413
        ;pop    eax
-
 
414
        ; setting up text color scheme and attributes
-
 
-
 
400
        sub     esi, ebx
415
        ; was 'xor     ecx, ecx'
401
 
416
        mov     ecx, COLOR_TXT_NORMAL
402
        mov     ecx, COLOR_TXT_NORMAL
417
        lea     edx, [cmdline+ebx]
403
        lea     edx, [cmdline+ebx]
418
        imul    ebx, 6
404
        imul    ebx, 6
419
        add     ebx, cmdline_x_pos
405
        add     ebx, cmdline_x_pos
420
        shl     ebx, 16
406
        shl     ebx, 16
421
        or      ebx, cmdline_y_pos+1
407
        or      ebx, cmdline_y_pos+1
422
        ; draw a text string in the window, color in ecx
408
        ; draw a text string in the window
423
        mcall   4
409
        mcall   4
Line 424... Line 410...
424
        ret
410
        ret
425
 
411
 
Line 522... Line 508...
522
 
508
 
523
put_message:
509
put_message:
Line 524... Line 510...
524
        call    put_message_nodraw
510
        call    put_message_nodraw
525
 
-
 
526
draw_messages:
-
 
527
        ;push   13
-
 
528
        ;pop    eax
-
 
529
        ;mov    edx, 0xFFFFFF
-
 
530
        ;mov    ebx, messages_x_pos*10000h+messages_x_size
511
 
531
        ;mov    ecx, messages_y_pos*10000h+messages_y_size
-
 
532
        ; draw container rectanle/box
512
draw_messages:
533
        ; COLOR_BG_NORMAL was 0xFFFFFF
513
        ; draw container rectangle/box
534
        mcall   13, messages_x_pos*10000h+messages_x_size, messages_y_pos*10000h+messages_y_size, COLOR_BG_NORMAL
514
        mcall   13, messages_x_pos*10000h+messages_x_size, messages_y_pos*10000h+messages_y_size, COLOR_BG_NORMAL
535
        mov     edx, messages
515
        mov     edx, messages
536
        push    messages_width
-
 
537
        pop     esi
-
 
538
        ; setting up text color scheme/attributes
516
        push    messages_width
539
        ; was 'xor     ecx, ecx'
-
 
540
        mov     ecx, COLOR_TXT_NORMAL
517
        pop     esi
Line 541... Line 518...
541
        ;mov    al, 4
518
        mov     ecx, COLOR_TXT_NORMAL
542
        mov     ebx, messages_x_pos*10000h+messages_y_pos
519
        mov     ebx, messages_x_pos*10000h+messages_y_pos
543
 
520
 
Line 598... Line 575...
598
;-----------------------------------------------------------------------------
575
;-----------------------------------------------------------------------------
599
;                       Draw program window title
576
;                       Draw program window title
Line 600... Line 577...
600
 
577
 
601
; FIXME: something wrong here
578
; FIXME: something wrong here
602
redraw_title:
-
 
603
        ;push   13
-
 
604
        ;pop    eax
-
 
605
        ;mov    edx, 0xFFFFFF
-
 
606
        ;mov    ebx, title_x_pos*10000h + data_x_pos+data_x_size-title_x_pos
-
 
607
        ;mov    ecx, title_y_pos*10000h + title_y_size
579
redraw_title:
608
        ; draw container rectangle/box
-
 
609
        ; color was 0xFFFFFF
580
        ; draw container rectangle/box
Line 610... Line 581...
610
        mcall   13, title_x_pos*10000h+data_x_pos+data_x_size-title_x_pos, title_y_pos*10000h+title_y_size, COLOR_BG_NORMAL
581
        mcall   13, title_x_pos*10000h+data_x_pos+data_x_size-title_x_pos, title_y_pos*10000h+title_y_size, COLOR_BG_NORMAL
611
 
-
 
612
draw_title:
-
 
613
        ;mov    al, 38
-
 
614
        ;mov    ebx, (data_x_pos-2)*10000h + title_x_pos-5
-
 
615
        ;mov    ecx, (title_y_pos+5)*10001h
582
 
616
        ; draw line with COLOR_LINE (in edx)
583
draw_title:
617
        mcall   38, (data_x_pos-2)*10000h+title_x_pos-5, (title_y_pos+5)*10001h, COLOR_LINE
584
        mcall   38, (data_x_pos-2)*10000h+title_x_pos-5, (title_y_pos+5)*10001h, COLOR_LINE
618
        push    NoPrgLoaded_len
585
        push    NoPrgLoaded_len
619
        pop     esi
586
        pop     esi
Line 687... Line 654...
687
        push    edx
654
        push    edx
688
        push    ecx
655
        push    ecx
689
        push    esi
656
        push    esi
690
        mov     eax, esi
657
        mov     eax, esi
691
        mov     esi, ecx
658
        mov     esi, ecx
692
    ; setting up registers colors
-
 
693
    ; can be usual, inactive and changed
-
 
694
        ; inactive color
-
 
695
        ; was 0x40808080 - grey
-
 
-
 
659
 
696
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
660
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
697
        cmp     [debuggee_pid], 0
661
        cmp     [debuggee_pid], 0
698
        jz      .cd
662
        jz      .cd
699
        cmp     [bSuspended], 0
663
        cmp     [bSuspended], 0
700
        jz      .cd
664
        jz      .cd
701
        ; normal color
-
 
702
        ; was 0x40000000 - black
-
 
-
 
665
 
703
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
666
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
704
        push    edi
667
        push    edi
705
        mov     edi, [eax]
668
        mov     edi, [eax]
706
        cmp     dword [eax+oldcontext-context], edi
669
        cmp     dword [eax+oldcontext-context], edi
707
        pop     edi
670
        pop     edi
708
        jz      .cd
671
        jz      .cd
709
        ; changed register color
-
 
710
        ; was 0x4000AA00 - green
-
 
711
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
672
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
Line 712... Line 673...
712
 
673
 
713
    .cd:
-
 
714
        ;push   4
-
 
715
        ;pop    eax
674
    .cd:
716
        ; draw a text string in the window
675
        ; draw a text string in the window
717
        mcall   4
676
        mcall   4
718
        imul    esi, 60000h
677
        imul    esi, 60000h
719
        lea     edx, [ebx+esi]
-
 
720
        ;mov    al, 47
-
 
721
        ;mov    ebx, 80101h
678
        lea     edx, [ebx+esi]
722
        mov     esi, ecx
679
        mov     esi, ecx
-
 
680
        pop     ecx
723
        pop     ecx
681
 
724
        ; draw a number in the window
-
 
725
        ; color in the esi (same value as for usual text)
682
        ; draw a number in the window
726
        mcall   47, 80101h
683
        mcall   47, 80101h
727
        lea     ebx, [edx+60000h*18]
684
        lea     ebx, [edx+60000h*18]
728
        mov     esi, ecx
685
        mov     esi, ecx
729
        pop     ecx
686
        pop     ecx
Line 739... Line 696...
739
        push    edx
696
        push    edx
740
        push    ecx
697
        push    ecx
741
        push    esi
698
        push    esi
742
        mov     eax, esi
699
        mov     eax, esi
743
        mov     esi, ecx
700
        mov     esi, ecx
744
    ; setting up registers color
-
 
745
    ; can be usual, inactive and changed
-
 
746
        ; inactive color
-
 
747
        ; was 0x40808080 - grey
-
 
-
 
701
 
748
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
702
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
749
        cmp     [debuggee_pid], 0
703
        cmp     [debuggee_pid], 0
750
        jz      .cd
704
        jz      .cd
751
        cmp     [bSuspended], 0
705
        cmp     [bSuspended], 0
752
        jz      .cd
706
        jz      .cd
753
        ; normal color
-
 
754
        ; was 0x40000000 - black
-
 
-
 
707
 
755
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
708
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
756
        push    edi
709
        push    edi
757
        mov     edi, [eax]
710
        mov     edi, [eax]
758
        cmp     dword [eax+oldcontext-context], edi
711
        cmp     dword [eax+oldcontext-context], edi
759
        pop     edi
712
        pop     edi
Line 763... Line 716...
763
        cmp     dword [eax+oldcontext-context+4], edi
716
        cmp     dword [eax+oldcontext-context+4], edi
764
        pop     edi
717
        pop     edi
765
        jz      .cd
718
        jz      .cd
Line 766... Line 719...
766
 
719
 
767
    .scol:
-
 
768
        ; changed register color
-
 
769
        ; was 0x4000AA00 - green
720
    .scol:
Line 770... Line 721...
770
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
721
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
771
 
-
 
772
    .cd:
-
 
773
        ;push   4
722
 
774
        ;pop    eax
723
    .cd:
775
        ; draw a text string in the window
724
        ; draw a text string in the window
776
        mcall   4
725
        mcall   4
777
        imul    esi, 60000h
-
 
778
        lea     edx, [ebx+esi]
-
 
779
        ;mov    al, 47
726
        imul    esi, 60000h
780
        ;mov    ebx, 40100101h ; [20] show 16 chars set [30] bit - qword
727
        lea     edx, [ebx+esi]
781
        mov     esi, ecx
728
        mov     esi, ecx
782
        pop     ecx
729
        pop     ecx
783
        ; draw a number in the window
730
        ; draw a number in the window
Line 799... Line 746...
799
        push    edx
746
        push    edx
800
        push    ecx
747
        push    ecx
801
        push    esi
748
        push    esi
802
        mov     eax, esi
749
        mov     eax, esi
803
        mov     esi, ecx
750
        mov     esi, ecx
804
    ; setting up registers color
-
 
805
    ; can be usual, inactive and changed
-
 
806
        ; inactive color
-
 
807
        ; was 0x40808080 - grey
-
 
-
 
751
 
808
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
752
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
809
        cmp     [debuggee_pid], 0
753
        cmp     [debuggee_pid], 0
810
        jz      .cd
754
        jz      .cd
811
        cmp     [bSuspended], 0
755
        cmp     [bSuspended], 0
812
        jz      .cd
756
        jz      .cd
813
        ; normal color
-
 
814
        ; was 0x40000000 - black
-
 
-
 
757
 
815
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
758
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
816
        push    edi
759
        push    edi
817
        mov     edi, [eax]
760
        mov     edi, [eax]
818
        cmp     dword [eax+oldcontext-context], edi
761
        cmp     dword [eax+oldcontext-context], edi
819
        pop     edi
762
        pop     edi
Line 823... Line 766...
823
        cmp     dword [eax+oldcontext-context+4], edi
766
        cmp     dword [eax+oldcontext-context+4], edi
824
        pop     edi
767
        pop     edi
825
        jz      .cd
768
        jz      .cd
Line 826... Line 769...
826
 
769
 
827
    .scol:
-
 
828
        ; changed color
-
 
829
        ; was 0x4000AA00 - green
770
    .scol:
Line 830... Line 771...
830
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
771
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
831
 
-
 
832
    .cd:
-
 
833
        ;push   4
772
 
834
        ;pop    eax
773
    .cd:
-
 
774
        ; draw a text string in the window
835
        ; draw a text string in the window
775
        mcall   4
836
        mcall   4
776
 
837
        imul    esi, 60000h
-
 
838
        lea     edx, [ebx+esi]
-
 
839
        ;mov    al, 47
777
        imul    esi, 60000h
840
        ;mov    ebx, 40100101h ; [20] show 16 chars set [30] bit - qword
778
        lea     edx, [ebx+esi]
841
        mov     esi, ecx
779
        mov     esi, ecx
842
        pop     ecx
780
        pop     ecx
843
        ; draw a number in the window
781
        ; draw a number in the window
Line 865... Line 803...
865
 
803
 
866
    .on:
804
    .on:
Line 867... Line 805...
867
        and     byte [edx], not 20h
805
        and     byte [edx], not 20h
868
 
-
 
869
    .onoff:
-
 
870
    ; setting up registers colors
-
 
871
    ; can be usual, inactive and changed
-
 
872
        ; inactive color
806
 
873
        ; was 0x40808080 - grey
807
    .onoff:
874
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
808
        mov     ecx, (COLOR_TXT_INACTIVE or 0x40000000)
875
        cmp     [debuggee_pid], 0
809
        cmp     [debuggee_pid], 0
876
        jz      .doit
810
        jz      .doit
877
        cmp     [bSuspended], 0
-
 
878
        jz      .doit
-
 
-
 
811
        cmp     [bSuspended], 0
879
        ; normal color
812
        jz      .doit
880
        ; was 0x40000000 - black
813
 
881
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
814
        mov     ecx, (COLOR_TXT_NORMAL or 0x40000000)
882
        bt      [_eflags], edi
815
        bt      [_eflags], edi
883
        lahf
816
        lahf
884
        bt      dword [_eflags + oldcontext - context], edi
817
        bt      dword [_eflags + oldcontext - context], edi
885
        rcl     ah, 1
818
        rcl     ah, 1
886
        test    ah, 3
-
 
887
        jp      .doit
-
 
888
        ; changed color
819
        test    ah, 3
Line 889... Line 820...
889
        ; was 0x4000AA00 - green
820
        jp      .doit
890
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
821
        mov     ecx, (COLOR_TXT_CHANGED or 0x40000000)
891
 
-
 
892
    .doit:
-
 
893
        mov     ah, 0
822
 
894
        ; background color for text string or number
823
    .doit:
895
        ; was 0xFFFFFF - white
824
        mov     ah, 0
896
        mov     edi, COLOR_BG_NORMAL
825
        mov     edi, COLOR_BG_NORMAL
897
        ; draw a text string in the window in one case
826
        ; draw a text string in the window in one case
Line 1000... Line 929...
1000
        add     esi, _mm6-_mm5
929
        add     esi, _mm6-_mm5
1001
        call    draw_mmx_register
930
        call    draw_mmx_register
1002
        mov     ebx, (registers_x_pos+2)*10000h+registers_y_pos+212
931
        mov     ebx, (registers_x_pos+2)*10000h+registers_y_pos+212
1003
        add     esi, _mm7-_mm6
932
        add     esi, _mm7-_mm6
1004
        call    draw_mmx_register
933
        call    draw_mmx_register
1005
        ;mov    al, 4
-
 
1006
        ; setting up text color
-
 
1007
        ; inactive color
-
 
1008
        ; was 0x808080 - grey
-
 
-
 
934
 
1009
        mov     ecx, COLOR_TXT_INACTIVE
935
        mov     ecx, COLOR_TXT_INACTIVE
1010
        cmp     [debuggee_pid], 0
936
        cmp     [debuggee_pid], 0
1011
        jz      @f
937
        jz      @f
1012
        cmp     [bSuspended], 0
938
        cmp     [bSuspended], 0
1013
        jz      @f
939
        jz      @f
Line 1198... Line 1124...
1198
        ret
1124
        ret
Line 1199... Line 1125...
1199
 
1125
 
1200
;-----------------------------------------------------------------------------
1126
;-----------------------------------------------------------------------------
Line 1201... Line -...
1201
;                   Display disassembled code
-
 
1202
 
-
 
1203
; @@@@@ WAS:
-
 
1204
; redraw_disasm:
-
 
1205
;       push    13
-
 
1206
;       pop     eax
-
 
1207
;       mov     edx, 0xFFFFFF
-
 
1208
;       mov     ebx, data_x_pos*10000h + data_x_size
-
 
1209
;       mov     ecx, (disasm_y_pos-1)*10000h + (disasm_y_size+1)
-
 
1210
;       mcall
-
 
1211
;
1127
;                   Display disassembled code
Line 1212... Line -...
1212
; @@@@@ NOW:
-
 
1213
draw_disasm:
1128
 
1214
 
1129
draw_disasm:
1215
    .redraw:
1130
 
Line 1216... Line 1131...
1216
        mov     eax, [disasm_start_pos]
1131
        mov     eax, [disasm_start_pos]
Line 1227... Line 1142...
1227
        lea     ecx, [ebx+disasm_y_pos-1]
1142
        lea     ecx, [ebx+disasm_y_pos-1]
1228
        shl     ecx, 16
1143
        shl     ecx, 16
1229
        mov     cl, 11
1144
        mov     cl, 11
1230
        ; setting up background color for disassembled text
1145
        ; setting up background color for disassembled text
1231
        mov     edx, COLOR_BG_NORMAL
1146
        mov     edx, COLOR_BG_NORMAL
1232
        ;mov    ebx, data_x_pos*10000h + data_x_size
-
 
1233
        ;push   13
-
 
1234
        ;pop    eax
-
 
1235
        ; draw container rectangle/box with color COLOR_BG_NORMAL (was 0xFFFFFF - white)
1147
        ; draw container rectangle/box with color COLOR_BG_NORMAL (was 0xFFFFFF - white)
1236
        mcall   13, data_x_pos*10000h+data_x_size
1148
        mcall   13, data_x_pos*10000h+data_x_size
1237
        pop     ebx
1149
        pop     ebx
1238
        ; copy color value from edx (COLOR_BG_NORMAL)
1150
        ; copy color value from edx (COLOR_BG_NORMAL)
1239
        mov     edi, edx
1151
        mov     edi, edx
Line 1300... Line 1212...
1300
        push    esi     ; Save color value for disassembled text
1212
        push    esi     ; Save color value for disassembled text
Line 1301... Line 1213...
1301
 
1213
 
1302
        ; draw container rectangle/box for disassembled text
1214
        ; draw container rectangle/box for disassembled text
1303
        ; color in edx
1215
        ; color in edx
1304
        mcall   13
-
 
1305
        ;mov    al, 47
-
 
-
 
1216
        mcall   13
1306
        ;mov    ebx, 80100h
1217
 
1307
        mov     edx, [disasm_cur_str]
1218
        mov     edx, [disasm_cur_str]
1308
        imul    edx, 10
1219
        imul    edx, 10
1309
        add     edx, data_x_pos*10000h + disasm_y_pos
-
 
1310
        ;mov    ecx, ebp
1220
        add     edx, data_x_pos*10000h + disasm_y_pos
1311
        ; draw a number in the window, color in esi
1221
        ; draw a number in the window, color in esi
1312
        mcall   47, 80100h, ebp
-
 
-
 
1222
        mcall   47, 80100h, ebp
1313
        ;mov    al, 4
1223
 
1314
        lea     ebx, [edx+8*6*10000h]
1224
        lea     ebx, [edx+8*6*10000h]
1315
        mov     ecx, esi    ; text color
1225
        mov     ecx, esi    ; text color
1316
        push    2
1226
        push    2
1317
        pop     esi
1227
        pop     esi
Line 1345... Line 1255...
1345
        mov     esi, [disasm_cur_pos]
1255
        mov     esi, [disasm_cur_pos]
1346
        dec     esi
1256
        dec     esi
1347
        cmp     esi, ebp
1257
        cmp     esi, ebp
1348
        pop     esi
1258
        pop     esi
1349
        jbe     .drawhex
1259
        jbe     .drawhex
1350
        ;mov    al, 4
-
 
-
 
1260
 
1351
        lea     ebx, [edx-6*10000h]
1261
        lea     ebx, [edx-6*10000h]
1352
        ; copy color value from esi
1262
        ; copy color value from esi
1353
        mov     ecx, esi
1263
        mov     ecx, esi
1354
        push    3
1264
        push    3
1355
        pop     esi
1265
        pop     esi
Line 1368... Line 1278...
1368
        dec     ecx
1278
        dec     ecx
1369
        xchg    ecx, esi
1279
        xchg    ecx, esi
1370
        mov     ebx, [disasm_cur_str]
1280
        mov     ebx, [disasm_cur_str]
1371
        imul    ebx, 10
1281
        imul    ebx, 10
1372
        add     ebx, (data_x_pos+6*40)*10000h+disasm_y_pos
1282
        add     ebx, (data_x_pos+6*40)*10000h+disasm_y_pos
1373
        ;mov    al, 4
-
 
-
 
1283
 
1374
        ; draw a text string in the window, color in ecx
1284
        ; draw a text string in the window, color in ecx
1375
        mcall   4
1285
        mcall   4
1376
        inc     [disasm_cur_str]
1286
        inc     [disasm_cur_str]
1377
        cmp     [disasm_cur_str], disasm_height
1287
        cmp     [disasm_cur_str], disasm_height
1378
        jb      .loop
1288
        jb      .loop
Line 1385... Line 1295...
1385
        inc     ecx
1295
        inc     ecx
1386
        mov     eax, disasm_y_pos + disasm_y_size
1296
        mov     eax, disasm_y_pos + disasm_y_size
1387
        sub     eax, ecx
1297
        sub     eax, ecx
1388
        shl     eax, 16
1298
        shl     eax, 16
1389
        add     ecx, eax
1299
        add     ecx, eax
1390
        ;push   13
-
 
1391
        ;pop    eax
-
 
1392
        ;mov    ebx, data_x_pos*65536 + data_x_size
-
 
1393
        ; set backroung color for disassembly container
-
 
1394
        ; was 0xFFFFFF - white
1300
        ; Draw filled rectangle
1395
        mov     edx, COLOR_BG_NORMAL
-
 
1396
        ; draw container rectangle/box with color COLOR_BG_NORMAL (in edx)
-
 
1397
        mcall   13, data_x_pos*65536+data_x_size
1301
        mcall   13, data_x_pos*10000h+data_x_size, , COLOR_BG_NORMAL
Line 1398... Line 1302...
1398
 
1302
 
1399
    @@:
1303
    @@:
Line 1400... Line 1304...
1400
        ret
1304
        ret
Line 1415... Line 1319...
1415
        dec     ecx
1319
        dec     ecx
1416
        jz      .m
1320
        jz      .m
Line 1417... Line 1321...
1417
 
1321
 
1418
    @@:
1322
    @@:
1419
        cmp     [_eip], eax
1323
        cmp     [_eip], eax
1420
        jz      draw_disasm.redraw
1324
        jz      draw_disasm
1421
        push    ecx
1325
        push    ecx
1422
        call    disasm_instr
1326
        call    disasm_instr
1423
        pop     ecx
1327
        pop     ecx
1424
        jc      .m
1328
        jc      .m
Line 1431... Line 1335...
1431
        mov     [disasm_start_pos], eax
1335
        mov     [disasm_start_pos], eax
Line 1432... Line 1336...
1432
 
1336
 
1433
update_disasm:
1337
update_disasm:
1434
        cmp     [debuggee_pid], 0
1338
        cmp     [debuggee_pid], 0
1435
        jz      .no
-
 
1436
        ;push   69
-
 
1437
        ;pop    eax
-
 
1438
        ;push   6
-
 
1439
        ;pop    ebx
-
 
1440
        ;mov    ecx, [debuggee_pid]
-
 
1441
        ;mov    edi, disasm_buffer
-
 
1442
        ;mov    edx, 256
-
 
-
 
1339
        jz      .no
1443
        ;mov    esi, [disasm_start_pos]
1340
 
1444
        mcall   69, 6, [debuggee_pid], 256, [disasm_start_pos], disasm_buffer
1341
        mcall   69, 6, [debuggee_pid], 256, [disasm_start_pos], disasm_buffer
1445
        cmp     eax, -1
1342
        cmp     eax, -1
1446
        jnz     @f
1343
        jnz     @f
1447
        mov     esi, read_mem_err
1344
        mov     esi, read_mem_err
Line 1451... Line 1348...
1451
        xor     eax, eax
1348
        xor     eax, eax
Line 1452... Line 1349...
1452
 
1349
 
1453
    @@:
1350
    @@:
1454
        mov     [disasm_buf_size], eax
1351
        mov     [disasm_buf_size], eax
1455
        call    restore_from_breaks
1352
        call    restore_from_breaks
Line 1456... Line 1353...
1456
        jmp     draw_disasm.redraw
1353
        jmp     draw_disasm
1457
 
1354
 
Line 1561... Line 1458...
1561
 
1458
 
1562
    ; redraw whole window again
1459
        ; redraw whole window again
1563
        call    redraw_title
1460
        call    redraw_title
1564
        call    draw_registers
1461
        call    draw_registers
1565
        call    draw_dump
1462
        call    draw_dump
Line 1566... Line 1463...
1566
        call    draw_disasm.redraw
1463
        call    draw_disasm
1567
 
1464
 
1568
    ; end of window redraw
1465
        ; end of window redraw