Subversion Repositories Kolibri OS

Rev

Rev 2434 | Rev 2465 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
431 serge 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
983 diamond 3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
431 serge 4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
593 mikedld 8
$Revision: 2439 $
9
 
2439 Serge 10
;------------------------------------------------------------------------------
803 alver 11
align 4
12
dtext_asciiz_esi:                          ; for skins title out
2434 Serge 13
        push    eax
14
        xor     eax, eax
15
        inc     eax
16
        jmp     dtext.1
2439 Serge 17
;------------------------------------------------------------------------------
1 ha 18
align 4
106 john 19
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
684 diamond 20
        ; ebx x & y
21
        ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
139 diamond 22
        ; X = ABnnb:
23
        ; nn = font
684 diamond 24
        ; A = 0 <=> output esi characters; otherwise output ASCIIZ string
25
        ; B = 1 <=> fill background with color eax
26
        ; edx start of text
1 ha 27
        ; edi 1 force
2434 Serge 28
        push    eax
803 alver 29
        xor     eax, eax
2439 Serge 30
;--------------------------------------
31
align 4
803 alver 32
.1:
1 ha 33
        pushad
684 diamond 34
        movsx   eax, bx         ; eax=y
35
        sar     ebx, 16         ; ebx=x
36
        xchg    eax, ebx        ; eax=x, ebx=y
37
        cmp     esi, 255
139 diamond 38
        jb      .loop
684 diamond 39
        mov     esi, 255
2439 Serge 40
;--------------------------------------
41
align 4
139 diamond 42
.loop:
43
        test    ecx, ecx
44
        js      .test_asciiz
684 diamond 45
        dec     esi
139 diamond 46
        js      .end
47
        jmp     @f
2439 Serge 48
;--------------------------------------
49
align 4
139 diamond 50
.test_asciiz:
684 diamond 51
        cmp     byte [edx], 0
139 diamond 52
        jz      .end
2439 Serge 53
 
2434 Serge 54
        cmp     byte [esp+28], 1
55
        jne     @f
803 alver 56
        dec     esi
2434 Serge 57
        js      .end
2439 Serge 58
;--------------------------------------
59
align 4
139 diamond 60
@@:
684 diamond 61
        inc     edx
62
        pushad
63
        movzx   edx, byte [edx-1]
139 diamond 64
        test    ecx, 0x10000000
65
        jnz     .font2
66
        mov     esi, 9
381 serge 67
        lea     ebp, [FONT_I+8*edx+edx]
2439 Serge 68
;--------------------------------------
69
align 4
139 diamond 70
.symloop1:
71
        mov     dl, byte [ebp]
72
        or      dl, 1 shl 6
2439 Serge 73
;--------------------------------------
74
align 4
139 diamond 75
.pixloop1:
76
        shr     dl, 1
77
        jz      .pixloop1end
78
        jnc     .nopix
2434 Serge 79
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 80
        call    [putpixel]
81
        jmp     .pixloop1cont
2439 Serge 82
;--------------------------------------
83
align 4
12 halyavin 84
.nopix:
139 diamond 85
        test    ecx, 0x40000000
86
        jz      .pixloop1cont
87
        push    ecx
831 diamond 88
        mov     ecx, [esp+4+20h+20h]
2434 Serge 89
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 90
        call    [putpixel]
91
        pop     ecx
2439 Serge 92
;--------------------------------------
93
align 4
139 diamond 94
.pixloop1cont:
95
        inc     eax
96
        jmp     .pixloop1
2439 Serge 97
;--------------------------------------
98
align 4
139 diamond 99
.pixloop1end:
100
        sub     eax, 6
101
        inc     ebx
102
        inc     ebp
103
        dec     esi
104
        jnz     .symloop1
106 john 105
        popad
139 diamond 106
        add     eax, 6
107
        jmp     .loop
2439 Serge 108
;--------------------------------------
109
align 4
139 diamond 110
.font2:
111
        add     edx, edx
381 serge 112
        lea     ebp, [FONT_II+4*edx+edx+1]
139 diamond 113
        push    9
114
        movzx   esi, byte [ebp-1]
2439 Serge 115
;--------------------------------------
116
align 4
139 diamond 117
.symloop2:
118
        mov     dl, byte [ebp]
119
        push    esi
2439 Serge 120
;--------------------------------------
121
align 4
139 diamond 122
.pixloop2:
123
        shr     dl, 1
124
        jnc     .nopix2
2434 Serge 125
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 126
        call    [putpixel]
127
        jmp     .pixloop2cont
2439 Serge 128
;--------------------------------------
129
align 4
139 diamond 130
.nopix2:
131
        test    ecx, 0x40000000
132
        jz      .pixloop2cont
133
        push    ecx
831 diamond 134
        mov     ecx, [esp+12+20h+20h]
2434 Serge 135
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 136
        call    [putpixel]
137
        pop     ecx
2439 Serge 138
;--------------------------------------
139
align 4
139 diamond 140
.pixloop2cont:
141
        inc     eax
142
        dec     esi
143
        jnz     .pixloop2
144
        pop     esi
145
        sub     eax, esi
146
        inc     ebx
147
        inc     ebp
148
        dec     dword [esp]
149
        jnz     .symloop2
150
        pop     eax
151
        add     dword [esp+28], esi
152
        popad
153
        jmp     .loop
2439 Serge 154
;--------------------------------------
155
align 4
139 diamond 156
.end:
157
        popad
2439 Serge 158
        pop     eax
139 diamond 159
        ret
2439 Serge 160
;------------------------------------------------------------------------------