Rev 2439 | Rev 2987 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
431 | serge | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
2465 | Serge | 3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
431 | serge | 4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
7 | |||
593 | mikedld | 8 | $Revision: 2465 $ |
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 |
2465 | Serge | 80 | ; call [putpixel] |
81 | call __sys_putpixel |
||
139 | diamond | 82 | jmp .pixloop1cont |
2439 | Serge | 83 | ;-------------------------------------- |
84 | align 4 |
||
12 | halyavin | 85 | .nopix: |
139 | diamond | 86 | test ecx, 0x40000000 |
87 | jz .pixloop1cont |
||
88 | push ecx |
||
831 | diamond | 89 | mov ecx, [esp+4+20h+20h] |
2434 | Serge | 90 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2465 | Serge | 91 | ; call [putpixel] |
92 | call __sys_putpixel |
||
139 | diamond | 93 | pop ecx |
2439 | Serge | 94 | ;-------------------------------------- |
95 | align 4 |
||
139 | diamond | 96 | .pixloop1cont: |
97 | inc eax |
||
98 | jmp .pixloop1 |
||
2439 | Serge | 99 | ;-------------------------------------- |
100 | align 4 |
||
139 | diamond | 101 | .pixloop1end: |
102 | sub eax, 6 |
||
103 | inc ebx |
||
104 | inc ebp |
||
105 | dec esi |
||
106 | jnz .symloop1 |
||
106 | john | 107 | popad |
139 | diamond | 108 | add eax, 6 |
109 | jmp .loop |
||
2439 | Serge | 110 | ;-------------------------------------- |
111 | align 4 |
||
139 | diamond | 112 | .font2: |
113 | add edx, edx |
||
381 | serge | 114 | lea ebp, [FONT_II+4*edx+edx+1] |
139 | diamond | 115 | push 9 |
116 | movzx esi, byte [ebp-1] |
||
2439 | Serge | 117 | ;-------------------------------------- |
118 | align 4 |
||
139 | diamond | 119 | .symloop2: |
120 | mov dl, byte [ebp] |
||
121 | push esi |
||
2439 | Serge | 122 | ;-------------------------------------- |
123 | align 4 |
||
139 | diamond | 124 | .pixloop2: |
125 | shr dl, 1 |
||
126 | jnc .nopix2 |
||
2434 | Serge | 127 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2465 | Serge | 128 | ; call [putpixel] |
129 | call __sys_putpixel |
||
139 | diamond | 130 | jmp .pixloop2cont |
2439 | Serge | 131 | ;-------------------------------------- |
132 | align 4 |
||
139 | diamond | 133 | .nopix2: |
134 | test ecx, 0x40000000 |
||
135 | jz .pixloop2cont |
||
136 | push ecx |
||
831 | diamond | 137 | mov ecx, [esp+12+20h+20h] |
2434 | Serge | 138 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2465 | Serge | 139 | ; call [putpixel] |
140 | call __sys_putpixel |
||
139 | diamond | 141 | pop ecx |
2439 | Serge | 142 | ;-------------------------------------- |
143 | align 4 |
||
139 | diamond | 144 | .pixloop2cont: |
145 | inc eax |
||
146 | dec esi |
||
147 | jnz .pixloop2 |
||
148 | pop esi |
||
149 | sub eax, esi |
||
150 | inc ebx |
||
151 | inc ebp |
||
152 | dec dword [esp] |
||
153 | jnz .symloop2 |
||
154 | pop eax |
||
155 | add dword [esp+28], esi |
||
156 | popad |
||
157 | jmp .loop |
||
2439 | Serge | 158 | ;-------------------------------------- |
159 | align 4 |
||
139 | diamond | 160 | .end: |
161 | popad |
||
2439 | Serge | 162 | pop eax |
139 | diamond | 163 | ret |
2439 | Serge | 164 | ;------------------------------------------------------------------------------=>=> |