Subversion Repositories Kolibri OS

Rev

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

Rev 593 Rev 684
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 593 $
8
$Revision: 684 $
9
 
9
 
10
 
10
 
11
align 4
11
align 4
12
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
12
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
13
        ; eax x & y
13
        ; ebx x & y
14
        ; ebx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
14
        ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
15
        ; X = ABnnb:
15
        ; X = ABnnb:
16
        ; nn = font
16
        ; nn = font
17
        ; A = 0 <=> output edx characters; otherwise output ASCIIZ string
17
        ; A = 0 <=> output esi characters; otherwise output ASCIIZ string
Line 18... Line 18...
18
        ; B = 1 <=> fill background with color esi
18
        ; B = 1 <=> fill background with color eax
19
        ; ecx start of text
19
        ; edx start of text
Line 20... Line -...
20
        ; edi 1 force
-
 
21
 
20
        ; edi 1 force
22
        pushad
21
 
23
        call    [disable_mouse]
22
        pushad
24
 
23
        call    [disable_mouse]
25
        mov     ebp, ecx        ; ebp=pointer to text
24
 
26
        mov     ecx, ebx        ; ecx=color
25
        movsx   eax, bx         ; eax=y
27
        movsx   ebx, ax         ; ebx=y
26
        sar     ebx, 16         ; ebx=x
28
        sar     eax, 16         ; eax=x
27
        xchg    eax, ebx        ; eax=x, ebx=y
29
        cmp     edx, 255
28
        cmp     esi, 255
30
        jb      .loop
29
        jb      .loop
31
        mov     edx, 255
30
        mov     esi, 255
32
.loop:
31
.loop:
33
        test    ecx, ecx
32
        test    ecx, ecx
34
        js      .test_asciiz
33
        js      .test_asciiz
35
        dec     edx
34
        dec     esi
36
        js      .end
35
        js      .end
37
        jmp     @f
36
        jmp     @f
38
.test_asciiz:
37
.test_asciiz:
39
        cmp     byte [ebp], 0
38
        cmp     byte [edx], 0
40
        jz      .end
39
        jz      .end
41
@@:
40
@@:
42
        push    edx
-
 
43
        movzx   edx, byte [ebp]
41
        inc     edx
44
        inc     ebp
42
        pushad
45
        test    ecx, 0x10000000
43
        movzx   edx, byte [edx-1]
46
        jnz     .font2
44
        test    ecx, 0x10000000
47
        pushad
45
        jnz     .font2
Line 58... Line 56...
58
        jmp     .pixloop1cont
56
        jmp     .pixloop1cont
59
.nopix:
57
.nopix:
60
        test    ecx, 0x40000000
58
        test    ecx, 0x40000000
61
        jz      .pixloop1cont
59
        jz      .pixloop1cont
62
        push    ecx
60
        push    ecx
63
        mov     ecx, [esp+4+4]
61
        mov     ecx, [esp+4+20h+1Ch]
64
        call    [putpixel]
62
        call    [putpixel]
65
        pop     ecx
63
        pop     ecx
66
.pixloop1cont:
64
.pixloop1cont:
67
        inc     eax
65
        inc     eax
68
        jmp     .pixloop1
66
        jmp     .pixloop1
Line 72... Line 70...
72
        inc     ebp
70
        inc     ebp
73
        dec     esi
71
        dec     esi
74
        jnz     .symloop1
72
        jnz     .symloop1
75
        popad
73
        popad
76
        add     eax, 6
74
        add     eax, 6
77
        pop     edx
-
 
78
        jmp     .loop
75
        jmp     .loop
79
.font2:
76
.font2:
80
        pushad
-
 
81
        add     edx, edx
77
        add     edx, edx
82
        lea     ebp, [FONT_II+4*edx+edx+1]
78
        lea     ebp, [FONT_II+4*edx+edx+1]
83
        push    9
79
        push    9
84
        movzx   esi, byte [ebp-1]
80
        movzx   esi, byte [ebp-1]
85
.symloop2:
81
.symloop2:
Line 92... Line 88...
92
        jmp     .pixloop2cont
88
        jmp     .pixloop2cont
93
.nopix2:
89
.nopix2:
94
        test    ecx, 0x40000000
90
        test    ecx, 0x40000000
95
        jz      .pixloop2cont
91
        jz      .pixloop2cont
96
        push    ecx
92
        push    ecx
97
        mov     ecx, [esp+12+4]
93
        mov     ecx, [esp+12+20h+1Ch]
98
        call    [putpixel]
94
        call    [putpixel]
99
        pop     ecx
95
        pop     ecx
100
.pixloop2cont:
96
.pixloop2cont:
101
        inc     eax
97
        inc     eax
102
        dec     esi
98
        dec     esi
Line 108... Line 104...
108
        dec     dword [esp]
104
        dec     dword [esp]
109
        jnz     .symloop2
105
        jnz     .symloop2
110
        pop     eax
106
        pop     eax
111
        add     dword [esp+28], esi
107
        add     dword [esp+28], esi
112
        popad
108
        popad
113
        pop     edx
-
 
114
        jmp     .loop
109
        jmp     .loop
115
.end:
110
.end:
116
        popad
111
        popad
117
        ret
112
        ret