Rev 109 | Rev 485 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 316 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ; |
1 | ; |
2 | ; TIMER |
2 | ; TIMER (show how much system works) |
3 | ; |
3 | ; |
4 | ; Compile with flat assembler |
4 | ; Compile with flat assembler |
5 | ; |
5 | ; |
Line 6... | Line 6... | ||
6 | 6 | ||
Line 51... | Line 51... | ||
51 | ; ********************************************* |
51 | ; ********************************************* |
52 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
52 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
53 | ; ********************************************* |
53 | ; ********************************************* |
Line 54... | Line 54... | ||
54 | 54 | ||
55 | draw_clock: |
- | |
56 | mov eax, 13 ; clear area |
- | |
57 | mov ebx, 10*65536+55 |
- | |
58 | mov ecx, 30*65536+10 |
- | |
59 | mov edx, [sc.work] |
- | |
Line 60... | Line 55... | ||
60 | int 0x40 |
55 | draw_clock: |
61 | 56 | ||
62 | mov eax, 26 ; get system counter |
57 | mov eax, 26 ; get system counter |
Line 82... | Line 77... | ||
82 | div ebx |
77 | div ebx |
83 | mov ecx,eax |
78 | mov ecx,eax |
Line 84... | Line 79... | ||
84 | 79 | ||
85 | mov eax,47 ; HH |
80 | mov eax,47 ; HH |
86 | mov esi,[sc.work_text] |
81 | mov esi,[sc.work_text] |
- | 82 | or esi,0x50000000 |
|
87 | or esi,0x10000000 |
83 | mov edi,[sc.work] |
88 | mov ebx,0x00020000 |
84 | mov ebx,0x00020000 |
89 | mov edx,10*65536+30 |
85 | mov edx,15*65536+5 |
Line 90... | Line 86... | ||
90 | int 0x40 |
86 | int 0x40 |
91 | 87 | ||
92 | pop eax ; MM |
88 | pop eax ; MM |
Line 120... | Line 116... | ||
120 | mov eax,12 ; function 12:tell os about windowdraw |
116 | mov eax,12 ; function 12:tell os about windowdraw |
121 | mov ebx,1 ; 1, start of draw |
117 | mov ebx,1 ; 1, start of draw |
122 | int 0x40 |
118 | int 0x40 |
Line 123... | Line 119... | ||
123 | 119 | ||
124 | ; DRAW WINDOW |
120 | ; DRAW WINDOW |
125 | mov eax,0 ; function 0 : define and draw window |
121 | xor eax,eax ; function 0 : define and draw window |
126 | mov ebx,100*65536+75 ; [x start] *65536 + [x size] |
122 | mov ebx,100*65536+100 ; [x start] *65536 + [x size] |
127 | mov ecx,100*65536+45 ; [y start] *65536 + [y size] |
123 | mov ecx,100*65536+40 ; [y start] *65536 + [y size] |
128 | mov edx,[sc.work] ; color of work area RRGGBB,8->color gl |
- | |
129 | mov esi,[sc.grab] ; color of grab bar RRGGBB,8->color gl |
124 | mov edx,[sc.work] ; color of work area RRGGBB,8->color gl |
130 | or esi,0x80000000 |
- | |
131 | mov edi,[sc.frame] ; color of frames RRGGBB |
- | |
132 | int 0x40 |
- | |
133 | - | ||
134 | ; WINDOW LABEL |
- | |
135 | mov eax,4 ; function 4 : write text to window |
- | |
136 | mov ebx,6*65536+7 ; [x start] *65536 + [y start] |
- | |
137 | mov ecx,[sc.grab_text] ; font 1 & color ( 0xF0RRGGBB ) |
125 | or edx,0x33000000 |
138 | or ecx,0x10000000 |
- | |
139 | mov edx,header ; pointer to text beginning |
- | |
140 | mov esi,header.len ; text length |
- | |
141 | int 0x40 |
- | |
142 | - | ||
143 | ; CLOSE BUTTON |
- | |
144 | mov eax,8 ; function 8 : define and draw button |
- | |
145 | mov ebx,(75-16)*65536+12 ; [x start] *65536 + [x size] |
- | |
146 | mov ecx,4*65536+12 ; [y start] *65536 + [y size] |
- | |
147 | mov edx,1 ; button id |
- | |
148 | mov esi,[sc.grab_button] ; button color RRGGBB |
126 | mov edi,header |
Line 149... | Line 127... | ||
149 | int 0x40 |
127 | int 0x40 |
Line 150... | Line 128... | ||
150 | 128 | ||
Line 158... | Line 136... | ||
158 | 136 | ||
Line 159... | Line 137... | ||
159 | 137 | ||
160 | ; DATA AREA |
- | |
161 | 138 | ; DATA AREA |
|
162 | if lang eq ru |
- | |
163 | header: |
139 | |
164 | db ' ' |
- | |
165 | .len = $ - header |
140 | if lang eq ru |
166 | else |
- | |
167 | header: |
141 | header db ' ',0 |
Line 168... | Line 142... | ||
168 | db 'TIMER' |
142 | else |