Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3435 mario79 1
;----------------------------------------------------------------------
2
draw_rectangle:
3
; in
4
; ebx = [coordinate on axis x]*65536 + [size on axis x]
5
; ecx = [coordinate on axis y]*65536 + [size on axis y]
6
	push	edx eax
7
;--------------------------------------
8
; top
9
	push	ebx ecx
10
	mov	eax,ebx
11
	shr	eax,16
12
	add	bx,ax
13
 
14
	mov	eax,ecx
15
	shr	eax,16
16
	mov	cx,ax
17
 
18
	sub	ecx,1 shl 16 +1
19
	sub	ebx,1 shl 16
20
	mcall	38,,,0xffffff
21
 
22
	sub	ecx,1 shl 16 +1
23
	sub	ebx,1 shl 16
24
	inc	ebx
25
	xor	edx,edx		; color black
26
	mcall
27
	pop	ecx ebx
28
;--------------------------------------
29
; bottom
30
	push	ebx ecx
31
	mov	eax,ebx
32
	shr	eax,16
33
	add	bx,ax
34
 
35
	mov	eax,ecx
36
	shr	eax,16
37
	add	cx,ax
38
 
39
	mov	eax,ecx
40
	ror	ecx,16
41
	mov	cx,ax
42
	rol	ecx,16
43
 
44
	sub	ebx,1 shl 16
45
	mcall	38,,,0xffffff
46
 
47
	add	ecx,1 shl 16 +1
48
	sub	ebx,1 shl 16
49
	inc	ebx
50
	xor	edx,edx
51
	mcall
52
	pop	ecx ebx
53
;--------------------------------------
54
; left
55
	push	ebx ecx
56
 
57
	mov	eax,ebx
58
	shr	eax,16
59
	mov	bx,ax
60
 
61
	mov	eax,ecx
62
	shr	eax,16
63
	add	cx,ax
64
 
65
	sub	ebx,1 shl 16 +1
66
	sub	ecx,1 shl 16
67
	mcall	38,,,0xffffff
68
 
69
	sub	ebx,1 shl 16 +1
70
	xor	edx,edx
71
	mcall
72
	pop	ecx ebx
73
;--------------------------------------
74
; right
75
	push	ebx ecx
76
 
77
	mov	eax,ebx
78
	shr	eax,16
79
	add	bx,ax
80
 
81
	mov	eax,ebx
82
	ror	ebx,16
83
	mov	bx,ax
84
	rol	ebx,16
85
 
86
	mov	eax,ecx
87
	shr	eax,16
88
	add	cx,ax
89
 
90
	sub	ecx,1 shl 16
91
	mcall	38,,,0xffffff
92
 
93
	add	ebx,1 shl 16 +1
94
	sub	ecx,1 shl 16
95
	inc	ecx
96
	xor	edx,edx
97
	mcall
98
	pop	ecx ebx
99
;--------------------------------------
100
	pop	eax edx
101
	ret
102
;----------------------------------------------------------------------
103