Subversion Repositories Kolibri OS

Rev

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

Rev 4590 Rev 4591
Line 3... Line 3...
3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 4... Line 4...
4
 
4
 
5
;-----------------------------------------------------------------------------
5
;-----------------------------------------------------------------------------
Line -... Line 6...
-
 
6
;                             Color scheme
-
 
7
 
-
 
8
BLACK_ON_WHITE  equ 0
-
 
9
MOVIEOS         equ 1
6
;                             Color scheme
10
WHITE_ON_BLACK  equ 2
-
 
11
 
-
 
12
;                         format - 0xRRGGBB
-
 
13
if COLOR_THEME eq MOVIEOS
-
 
14
 
-
 
15
        COLOR_BG_NORMAL           = 0x1d272f
-
 
16
        COLOR_BG_BREAKPOINT       = 0x0000aa
-
 
17
        COLOR_BG_SELECTED         = 0xec9300
-
 
18
        COLOR_LINE                = 0x00b9a0
-
 
19
        COLOR_TXT_NORMAL          = 0xffffff
-
 
20
        COLOR_TXT_INACTIVE        = 0x8f7948
-
 
21
        COLOR_TXT_CHANGED         = 0xec9300
-
 
22
        COLOR_TXT_SELECTED        = 0x1d272f
-
 
23
 
7
 
24
else if COLOR_THEME eq WHITE_ON_BLACK
-
 
25
 
-
 
26
        COLOR_BG_NORMAL           = 0x101010 ; dark grey
-
 
27
        COLOR_BG_BREAKPOINT       = 0xFF0000 ; red
-
 
28
        COLOR_BG_SELECTED         = 0x0000FF ; blue
-
 
29
        COLOR_LINE                = 0xFFFFFF ; white
-
 
30
        COLOR_TXT_NORMAL          = 0xFFFFFF ; white
-
 
31
        COLOR_TXT_INACTIVE        = 0x808080 ; grey
-
 
32
        COLOR_TXT_CHANGED         = 0x00AA00 ; green
-
 
33
        COLOR_TXT_SELECTED        = 0xFFFFFF ; white
-
 
34
 
-
 
35
else  ; BLACK ON WHITE
8
;                         format - 0xRRGGBB
36
 
9
COLOR_BG_NORMAL           equ 0x101010 ; was 0xFFFFFF white
37
        COLOR_BG_NORMAL           = 0xffffff ; white
10
COLOR_BG_BREAKPOINT       equ 0xFF0000 ; red
38
        COLOR_BG_BREAKPOINT       = 0xFF0000 ; red
11
COLOR_BG_SELECTED         equ 0x0000FF ; blue
39
        COLOR_BG_SELECTED         = 0x0000FF ; blue
12
COLOR_LINE                equ 0xFFFFFF ; was 0x000000 black
40
        COLOR_LINE                = 0x000000 ; black
13
COLOR_TXT_NORMAL          equ 0xFFFFFF ; was 0x000000 black
41
        COLOR_TXT_NORMAL          = 0x000000 ; black
14
COLOR_TXT_INACTIVE        equ 0x808080 ; grey
42
        COLOR_TXT_INACTIVE        = 0x808080 ; grey
-
 
43
        COLOR_TXT_CHANGED         = 0x00AA00 ; green
-
 
44
        COLOR_TXT_SELECTED        = 0xFFFFFF ; white
Line 15... Line 45...
15
COLOR_TXT_CHANGED         equ 0x00AA00 ; green
45
 
Line 16... Line 46...
16
COLOR_TXT_SELECTED        equ 0xFFFFFF ; white
46
end if
17
 
47
 
Line 575... Line 605...
575
draw_title:
605
draw_title:
576
        ;mov    al, 38
606
        ;mov    al, 38
577
        ;mov    ebx, (data_x_pos-2)*10000h + title_x_pos-5
607
        ;mov    ebx, (data_x_pos-2)*10000h + title_x_pos-5
578
        ;mov    ecx, (title_y_pos+5)*10001h
608
        ;mov    ecx, (title_y_pos+5)*10001h
579
        ; draw line with COLOR_LINE (in edx)
609
        ; draw line with COLOR_LINE (in edx)
580
        ; was 'xor     edx, edx'
-
 
581
        mcall   38, (data_x_pos-2)*10000h+title_x_pos-5, (title_y_pos+5)*10001h, COLOR_LINE
610
        mcall   38, (data_x_pos-2)*10000h+title_x_pos-5, (title_y_pos+5)*10001h, COLOR_LINE
582
        push    NoPrgLoaded_len
611
        push    NoPrgLoaded_len
583
        pop     esi
612
        pop     esi
584
        cmp     [debuggee_pid], 0
613
        cmp     [debuggee_pid], 0
585
        jz      @f
614
        jz      @f
Line 601... Line 630...
601
        ; draw line with COLOR_LINE (in edx)
630
        ; draw line with COLOR_LINE (in edx)
602
        mcall
631
        mcall
603
        mov     al, 4
632
        mov     al, 4
604
        mov     ebx, title_x_pos*10000h+title_y_pos
633
        mov     ebx, title_x_pos*10000h+title_y_pos
605
        ; setting up text color scheme and attributes
634
        ; setting up text color scheme and attributes
606
        ; was 'xor     ecx, ecx'
-
 
607
        mov     ecx, COLOR_TXT_NORMAL
635
        mov     ecx, COLOR_TXT_NORMAL
608
        mov     edx, NoPrgLoaded_str
636
        mov     edx, NoPrgLoaded_str
609
        cmp     [debuggee_pid], 0
637
        cmp     [debuggee_pid], 0
610
        jz      @f
638
        jz      @f
611
        mov     edx, [prgname_ptr]
639
        mov     edx, [prgname_ptr]
Line 633... Line 661...
633
 
661
 
634
    .nodebuggee:
662
    .nodebuggee:
635
        mov     al, 38
663
        mov     al, 38
636
        mov     ebx, (data_x_pos+data_x_size-10-6*7-5)*0x10000 + data_x_pos+data_x_size+2
664
        mov     ebx, (data_x_pos+data_x_size-10-6*7-5)*0x10000 + data_x_pos+data_x_size+2
637
        mov     ecx, (title_y_pos+5)*10001h
-
 
638
        ; setting up line color scheme 
-
 
639
        ; was 'xor     edx, edx'
665
        mov     ecx, (title_y_pos+5)*10001h
640
        mov     edx, COLOR_LINE
666
        mov     edx, COLOR_LINE
Line 641... Line 667...
641
        jmp     @b
667
        jmp     @b
642
 
668
 
Line 1012... Line 1038...
1012
 
1038
 
1013
    @@:
1039
    @@:
1014
        mov     edx, aColon
1040
        mov     edx, aColon
1015
        xor     esi, esi
1041
        xor     esi, esi
-
 
1042
        inc     esi
1016
        inc     esi
1043
        mov     ecx, COLOR_TXT_INACTIVE
1017
        ;mov    ebx, (registers_x_pos+10)*10000h + registers_y_pos+122
1044
        ;mov    ebx, (registers_x_pos+10)*10000h + registers_y_pos+122
1018
        ; draw a text string in the window, color in ecx
1045
        ; draw a text string in the window, color in ecx
1019
        mcall   4, (registers_x_pos+10)*10000h+registers_y_pos+122
1046
        mcall   4, (registers_x_pos+10)*10000h+registers_y_pos+122
Line 1495... Line 1522...
1495
;-----------------------------------------------------------------------------
1522
;-----------------------------------------------------------------------------
1496
;                               Draw main window
1523
;                               Draw main window
Line 1497... Line 1524...
1497
 
1524
 
1498
draw_window:
1525
draw_window:
1499
    ; start window redraw
-
 
1500
        ;push   12
-
 
1501
        ;pop    eax
-
 
1502
        ;push   1
-
 
1503
        ;pop    ebx
1526
    ; start window redraw
Line 1504... Line 1527...
1504
        mcall   12, 1
1527
        mcall   12, 1
1505
 
-
 
1506
    ; define window
-
 
1507
        ;xor    eax, eax
-
 
1508
        ;mov    ebx, wnd_x_size
-
 
1509
        ;mov    ecx, wnd_y_size
-
 
1510
        ;mov    edx, 54FFFFFFh
-
 
1511
        mov     edi, caption_str
-
 
1512
        ; draw window with color in edx
1528
 
Line 1513... Line 1529...
1513
        ; was 0x54FFFFFF - white background
1529
    ; define window
1514
        mcall   0, wnd_x_size, wnd_y_size, (COLOR_BG_NORMAL or 0x54000000)
-
 
1515
 
-
 
1516
    ; clear unused areas
-
 
1517
        ;mov    al, 48
1530
        mcall   0, wnd_x_size, wnd_y_size, (COLOR_BG_NORMAL or 0x54000000), caption_str
1518
        ;push   4
1531
 
1519
        ;pop    ebx
1532
    ; clear unused areas
1520
        ; get window skin height
1533
        ; get window skin height
1521
        mcall   48, 4
1534
        mcall   48, 4
Line 1530... Line 1543...
1530
        push    eax
1543
        push    eax
1531
        sub     ecx, eax
1544
        sub     ecx, eax
1532
        shl     eax, 16
1545
        shl     eax, 16
1533
        add     ecx, eax
1546
        add     ecx, eax
1534
        mov     ebx, 5*10000h + (wnd_x_size-9)
1547
        mov     ebx, 5*10000h + (wnd_x_size-9)
1535
        ;push   13
-
 
1536
        ;pop    eax
-
 
1537
        ; color in edx for all rectangles (COLOR_BG_NORMAL)
1548
        mov     edx, COLOR_BG_NORMAL
1538
        ; draw container rectangle/box for registers information region
1549
        ; draw container rectangle/box for registers information region
1539
        mcall   13
1550
        mcall   13
1540
        mov     ecx, (dump_y_pos+dump_y_size)*10000h + (disasm_y_pos-dump_y_pos-dump_y_size)
1551
        mov     ecx, (dump_y_pos+dump_y_size)*10000h + (disasm_y_pos-dump_y_pos-dump_y_size)
1541
        ; draw container rectangle/box for dump memory region
1552
        ; draw container rectangle/box for dump memory region
1542
        mcall
1553
        mcall
Line 1554... Line 1565...
1554
        ; draw container rectangle/box
1565
        ; draw container rectangle/box
1555
        mcall
1566
        mcall
1556
        mov     ebx, (data_x_pos+data_x_size)*10000h + (wnd_x_size-data_x_pos-data_x_size-4)
1567
        mov     ebx, (data_x_pos+data_x_size)*10000h + (wnd_x_size-data_x_pos-data_x_size-4)
1557
        ; draw container rectangle/box
1568
        ; draw container rectangle/box
1558
        mcall
1569
        mcall
-
 
1570
        mov     ebx, 5*10000h + title_x_pos - 5
-
 
1571
        mov     ecx, (title_y_pos)*10000h + (title_y_size)
-
 
1572
        ; draw container rectangle/box for dump memory region title
-
 
1573
        mcall
Line 1559... Line 1574...
1559
 
1574
 
1560
    ; messages frame
-
 
1561
        ;mov    al, 38
1575
    ; messages frame
1562
        mov     ebx, (messages_x_pos-2)*10000h + (messages_x_pos+messages_x_size+2)
1576
        mov     ebx, (messages_x_pos-2)*10000h + (messages_x_pos+messages_x_size+2)
1563
        push    ebx
1577
        push    ebx
1564
        mov     ecx, (messages_y_pos-2)*10001h
-
 
1565
        ; setting up lines color
-
 
1566
        ; was 'xor     edx, edx' - black
1578
        mov     ecx, (messages_y_pos-2)*10001h
1567
        mov     edx, COLOR_LINE
-
 
1568
        ; draw line, color in edx
1579
        mov     edx, COLOR_LINE
1569
        mcall   38
1580
        mcall   38
1570
        mov     ecx, (messages_y_pos+messages_y_size+2)*10001h
-
 
1571
        ; draw line, color in edx
1581
        mov     ecx, (messages_y_pos+messages_y_size+2)*10001h
1572
        mcall
1582
        mcall
1573
        mov     ebx, (messages_x_pos-2)*10001h
1583
        mov     ebx, (messages_x_pos-2)*10001h
1574
        push    ebx
1584
        push    ebx
1575
        mov     ecx, (messages_y_pos-2)*10000h + (messages_y_pos+messages_y_size+2)
-
 
1576
        ; draw line, color in edx
1585
        mov     ecx, (messages_y_pos-2)*10000h + (messages_y_pos+messages_y_size+2)
1577
        mcall
1586
        mcall
1578
        mov     ebx, (messages_x_pos+messages_x_size+2)*10001h
1587
        mov     ebx, (messages_x_pos+messages_x_size+2)*10001h
1579
        push    ebx
-
 
1580
        ; draw line, color in edx
1588
        push    ebx
Line 1581... Line 1589...
1581
        mcall
1589
        mcall
1582
 
1590
 
1583
    ; command line frame
1591
    ; command line frame
1584
        mov     ecx, (cmdline_y_pos-2)*10000h + (cmdline_y_pos+cmdline_y_size+2)
-
 
1585
        pop     ebx
1592
        mov     ecx, (cmdline_y_pos-2)*10000h + (cmdline_y_pos+cmdline_y_size+2)
1586
        ; draw line, color in edx
1593
        pop     ebx
1587
        mcall
-
 
1588
        pop     ebx
1594
        mcall
1589
        ; draw line, color in edx
1595
        pop     ebx
1590
        mcall
1596
        mcall
1591
        pop     ebx
-
 
1592
        mov     ecx, (cmdline_y_pos+cmdline_y_size+2)*10001h
1597
        pop     ebx
1593
        ; draw line, color in edx
1598
        mov     ecx, (cmdline_y_pos+cmdline_y_size+2)*10001h
1594
        mcall
-
 
1595
        mov     ecx, (cmdline_y_pos-2)*10001h
1599
        mcall
Line 1596... Line 1600...
1596
        ; draw line, color in edx
1600
        mov     ecx, (cmdline_y_pos-2)*10001h
1597
        mcall
-
 
1598
 
-
 
1599
    ; registers frame
1601
        mcall
1600
        ;push   13
1602
 
1601
        ;pop    eax
1603
    ; registers frame
1602
        mov     ebx, (registers_x_pos-2)*10000h + (registers_x_size+4)
-
 
1603
        mov     ecx, (registers_y_pos-2)*10000h + (registers_y_size+4)
1604
        mov     ebx, (registers_x_pos-2)*10000h + (registers_x_size+4)
Line 1604... Line 1605...
1604
        ; draw container rectangle/box for registers information window region
1605
        mov     ecx, (registers_y_pos-2)*10000h + (registers_y_size+4)
1605
        ; color in edx
1606
        ; draw container rectangle/box for registers information window region
Line 1606... Line 1607...
1606
        mcall   13
1607
        mcall   13
1607
 
1608
 
1608
    ; messages
1609
    ; messages
Line 1609... Line 1610...
1609
        call    draw_messages
1610
        call    draw_messages
1610
 
-
 
1611
    ; command line & cursor
1611
 
1612
        call    draw_cmdline
1612
    ; command line & cursor
1613
        call    draw_cursor
1613
        call    draw_cmdline
1614
 
1614
        call    draw_cursor
1615
    ; title & registers & dump & disasm
1615
 
1616
        ;mov    al, 38
-
 
1617
        mov     ebx, (data_x_pos-2)*10001h
1616
    ; title & registers & dump & disasm
1618
        mov     ecx, (title_y_pos+5)*10000h + (messages_y_pos-2)
1617
        mov     ebx, (data_x_pos-2)*10001h
1619
        ; draw line, color in edx
-
 
1620
        mcall   38
-
 
1621
        mov     ebx, (data_x_pos+data_x_size+2)*10001h
-
 
1622
        ; draw line, color in edx
1618
        mov     ecx, (title_y_pos+5)*10000h + (messages_y_pos-2)
1623
        mcall
-
 
1624
        mov     ebx, (data_x_pos-2)*10000h + (data_x_pos+data_x_size+2)
1619
        mov     edx, COLOR_LINE
Line 1625... Line 1620...
1625
        mov     ecx, (dump_y_pos-3)*10001h
1620
        mcall   38
1626
        ; draw line, color in edx
1621
        mov     ebx, (data_x_pos+data_x_size+2)*10001h
1627
        mcall
1622
        mcall
1628
        mov     ecx, (disasm_y_pos-4)*10001h
1623
        mov     ebx, (data_x_pos-2)*10000h + (data_x_pos+data_x_size+2)
1629
        ; draw line, color in edx
1624
        mov     ecx, (disasm_y_pos-4)*10001h
Line 1630... Line 1625...
1630
        mcall
1625
        mcall
1631
 
-
 
1632
    ; redraw whole window again
-
 
1633
        call    redraw_title
-
 
1634
        call    draw_registers
-
 
1635
        call    draw_dump
1626
 
1636
        call    draw_disasm.redraw
1627
    ; redraw whole window again
Line 1637... Line 1628...
1637
 
1628
        call    redraw_title