Subversion Repositories Kolibri OS

Rev

Rev 205 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 205 Rev 1098
1
macro use_label
1
macro use_label
2
{
2
{
3
draw_label:
3
draw_label:
4
pusha
4
pusha
5
	xor	esi,esi
5
        xor     esi,esi
6
	mov	edx,[edi+8]
6
        mov     edx,[edi+8]
7
.check_next:
7
.check_next:
8
	mov	ah,[edx+esi]
8
        mov     ah,[edx+esi]
9
	inc	esi
9
        inc     esi
10
	test	ah,ah
10
        test    ah,ah
11
	jz	@f
11
        jz      @f
12
	jmp	.check_next
12
        jmp     .check_next
13
@@:
13
@@:
14
	mov	eax,4
14
        mov     eax,4
15
	mov	ebx,[edi]
15
        mov     ebx,[edi]
16
	mov	ecx,[edi+4]
16
        mov     ecx,[edi+4]
17
	int	0x40
17
        mcall
18
popa
18
popa
19
ret
19
ret
20
}
20
}
21
 
21
 
22
struc label left,top,color,text
22
struc label left,top,color,text
23
{
23
{
24
.top: dw top ; +0
24
.top: dw top ; +0
25
.left: dw left ; +2
25
.left: dw left ; +2
26
.color: dd color; +4
26
.color: dd color; +4
27
.text: dd text	; +8
27
.text: dd text  ; +8
28
}
28
}
29
 
29
 
30
l_struc_size=12
30
l_struc_size=12
31
macro draw_labels start,end
31
macro draw_labels start,end
32
{
32
{
33
	mov	edi,start
33
        mov     edi,start
34
	mov	ecx,((end-start)/l_struc_size)
34
        mov     ecx,((end-start)/l_struc_size)
35
@@:
35
@@:
36
	call	draw_label
36
        call    draw_label
37
	add	edi,l_struc_size
37
        add     edi,l_struc_size
38
	loop	@r
38
        loop    @r
39
}
39
}
40
 
40
 
41
macro labels_set_sys_color start,end,color_table
41
macro labels_set_sys_color start,end,color_table
42
{
42
{
43
	mov	edi,start
43
        mov     edi,start
44
	mov	ecx,((end-start)/l_struc_size)
44
        mov     ecx,((end-start)/l_struc_size)
45
	mov	esi,color_table
45
        mov     esi,color_table
46
@@:
46
@@:
47
	push	dword [esi+32]
47
        push    dword [esi+32]
48
	pop	dword [edi+4]
48
        pop     dword [edi+4]
49
	add	edi,l_struc_size
49
        add     edi,l_struc_size
50
	loop	@r
50
        loop    @r
51
}
51
}