Subversion Repositories Kolibri OS

Rev

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

Rev 4668 Rev 4669
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2014. 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
;;   Written by hidnplayr@kolibrios.org                            ;;
6
;;   Written by hidnplayr@kolibrios.org                            ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;         GNU GENERAL PUBLIC LICENSE                              ;;
8
;;         GNU GENERAL PUBLIC LICENSE                              ;;
9
;;          Version 2, June 1991                                   ;;
9
;;          Version 2, June 1991                                   ;;
10
;;                                                                 ;;
10
;;                                                                 ;;
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
 
12
 
13
 
13
 
14
 
14
 
15
draw_window:    ; Completely redraw the window, recalculate all coordinates and sizes
15
draw_window:    ; Completely redraw the window, recalculate all coordinates and sizes
16
 
16
 
17
        pusha
17
        pusha
18
 
18
 
19
        mcall   9, thread_info, -1              ; get current window size
19
        mcall   9, thread_info, -1                      ; get information about this thread
20
        mov     eax, dword[thread_info+42]      ; window xsize
20
        mov     eax, [thread_info.box.width]            ; window xsize
21
        mov     ebx, dword[thread_info+46]      ; ysize
21
        mov     ebx, [thread_info.box.height]           ; ysize
22
        mov     edx, dword[thread_info+62]      ; work area xsize
22
        mov     edx, [thread_info.client_box.width]     ; work area xsize
23
        mov     esi, dword[thread_info+66]      ; ysize
23
        mov     esi, [thread_info.client_box.height]    ; ysize
24
        sub     eax, edx
24
        sub     eax, edx
25
        sub     ebx, esi
25
        sub     ebx, esi
26
 
26
 
27
        cmp     edx, WIN_MIN_X
27
        cmp     edx, WIN_MIN_X
28
        jae     .x_ok
28
        jae     .x_ok
29
        mov     edx, WIN_MIN_X
29
        mov     edx, WIN_MIN_X
30
  .x_ok:
30
  .x_ok:
31
        mov     [xsize], edx
31
        mov     [xsize], edx
32
        add     edx, eax
32
        add     edx, eax
33
 
33
 
34
        cmp     esi, WIN_MIN_Y
34
        cmp     esi, WIN_MIN_Y
35
        jae     .y_ok
35
        jae     .y_ok
36
        mov     esi, WIN_MIN_Y
36
        mov     esi, WIN_MIN_Y
37
  .y_ok:
37
  .y_ok:
38
        mov     [ysize], esi
38
        mov     [ysize], esi
39
        add     esi, ebx
39
        add     esi, ebx
40
        mcall   67, -1, -1                      ; set the new sizes
40
        mcall   67, -1, -1                              ; set the new sizes
41
 
41
 
42
        popa
42
        popa
43
 
43
 
44
  .dont_resize:
44
  .dont_resize:
45
 
45
 
46
        pusha
46
        pusha
47
 
47
 
48
        mcall   12, 1
48
        mcall   12, 1
49
        xor     eax, eax                        ; draw window
49
        xor     eax, eax                        ; draw window
50
        mov     ebx, WIN_MIN_X
50
        mov     ebx, WIN_MIN_X
51
        mov     ecx, WIN_MIN_Y
51
        mov     ecx, WIN_MIN_Y
52
        mov     edx, [colors.work]
52
        mov     edx, [colors.work]
53
        add     edx, 0x33000000
53
        add     edx, 0x33000000
54
        mov     edi, str_programname
54
        mov     edi, str_programname
55
        mcall
55
        mcall
56
        mcall   12, 2 ;; when do we actually need this??
56
        mcall   12, 2
57
		
57
		
58
		movsx	eax, [thread_info+70]			; skip if window rolled up
58
		movsx	eax, [thread_info+70]			; skip if window rolled up
59
		test	eax, 100b
59
		test	eax, 100b
60
		jne		.exit
60
		jne		.exit
61
 
61
 
62
        mov     ebx, [xsize]
62
        mov     ebx, [xsize]
63
        mov     ecx, [ysize]
63
        mov     ecx, [ysize]
64
        sub     cx, BOTTOM_Y ;;;;
64
        sub     cx, BOTTOM_Y ;;;;
65
        push    cx
65
        push    cx
66
        shl     ecx, 16
66
        shl     ecx, 16
67
        pop     cx
67
        pop     cx
68
        mov     edx, [colors.work_graph]
68
        mov     edx, [colors.work_graph]
69
        mcall   38                              ; draw bottom line
69
        mcall   38                              ; draw bottom line
70
        mov     ecx, TOP_Y SHL 16 + TOP_Y
70
        mov     ecx, TOP_Y SHL 16 + TOP_Y
71
        mcall                                   ; draw top line
71
        mcall                                   ; draw top line
72
 
72
 
73
; calculate available space for textbox and coordinates for scrollbars
73
; calculate available space for textbox and coordinates for scrollbars
74
        mov     eax, [ysize]
74
        mov     eax, [ysize]
75
        sub     eax, TOP_Y + BOTTOM_Y - 1   ;;;;
75
        sub     eax, TOP_Y + BOTTOM_Y - 1   ;;;;
76
        mov     [scroll2.y_size], ax
76
        mov     [scroll2.y_size], ax
77
        mov     [scroll1.y_size], ax
77
        mov     [scroll1.y_size], ax
78
        sub     eax, 4 ;;;;
78
        sub     eax, 4 ;;;;
79
        xor     edx, edx
79
        xor     edx, edx
80
        mov     ecx, FONT_HEIGHT
80
        mov     ecx, FONT_HEIGHT
81
        div     ecx
81
        div     ecx
82
        mov     [textbox_height], eax
82
        mov     [textbox_height], eax
83
        mov     [scroll2.cur_area], eax
83
        mov     [scroll2.cur_area], eax
84
        mov     [scroll1.cur_area], eax
84
        mov     [scroll1.cur_area], eax
85
 
85
 
86
        mov     eax, [xsize]
86
        mov     eax, [xsize]
87
        sub     eax, SCROLLBAR_WIDTH
87
        sub     eax, SCROLLBAR_WIDTH
88
        mov     [scroll1.x_pos], ax
88
        mov     [scroll1.x_pos], ax
89
        mov     edi, [window_active]
89
        mov     edi, [window_active]
90
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
90
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
91
        jne     @f
91
        jne     @f
92
        sub     eax, USERLIST_WIDTH + SCROLLBAR_WIDTH + 2
92
        sub     eax, USERLIST_WIDTH + SCROLLBAR_WIDTH + 2
93
  @@:
93
  @@:
94
        mov     [scroll2.x_pos], ax
94
        mov     [scroll2.x_pos], ax
95
        sub     eax, 10
95
        sub     eax, 10
96
        xor     edx, edx
96
        xor     edx, edx
97
        mov     ecx, FONT_WIDTH
97
        mov     ecx, FONT_WIDTH
98
        div     ecx
98
        div     ecx
99
        mov     [textbox_width], eax
99
        mov     [textbox_width], eax
100
 
100
 
101
; recalculate text line breaks (because height/width might have changed..)
101
; recalculate text line breaks (because height/width might have changed..)
102
; meanwhile, recalculate line number of current line
102
; meanwhile, recalculate line number of current line
103
        mov     esi, [edi + window.text_print]
103
        mov     esi, [edi + window.text_print]
104
        mov     al, byte[esi]
104
        mov     al, byte[esi]
105
        push    eax
105
        push    eax
106
        mov     byte[esi], 0
106
        mov     byte[esi], 0
107
        push    esi
107
        push    esi
108
 
108
 
109
        mov     esi, [edi + window.text_start]
109
        mov     esi, [edi + window.text_start]
110
        call    text_insert_newlines
110
        call    text_insert_newlines
111
        mov     [edi + window.text_lines], edx
111
        mov     [edi + window.text_lines], edx
112
        mov     [edi + window.text_scanned], esi
112
        mov     [edi + window.text_scanned], esi
113
        mov     [edi + window.text_line_print], edx
113
        mov     [edi + window.text_line_print], edx
114
 
114
 
115
        pop     esi
115
        pop     esi
116
        pop     eax
116
        pop     eax
117
        mov     byte[esi], al
117
        mov     byte[esi], al
118
 
118
 
119
; and redraw the textbox (and scrollbar if needed)
119
; and redraw the textbox (and scrollbar if needed)
120
        mov     [scroll2.all_redraw], 1
120
        mov     [scroll2.all_redraw], 1
121
        call    draw_channel_text
121
        call    draw_channel_text
122
 
122
 
123
; Draw userlist if active window is a channel
123
; Draw userlist if active window is a channel
124
        mov     edi, [window_active]
124
        mov     edi, [window_active]
125
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
125
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
126
        jne     .not_channel
126
        jne     .not_channel
127
 
127
 
128
        mov     [scroll1.all_redraw], 1
128
        mov     [scroll1.all_redraw], 1
129
        call    draw_channel_list
129
        call    draw_channel_list
130
 
130
 
131
; draw a vertical separator line when there is no scrollbar
131
; draw a vertical separator line when there is no scrollbar
132
        cmp     [scroll2.all_redraw], 1
132
        cmp     [scroll2.all_redraw], 1
133
        jne     .not_channel
133
        jne     .not_channel
134
 
134
 
135
        mov     ebx, [xsize]
135
        mov     ebx, [xsize]
136
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH + 3
136
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH + 3
137
        push    bx
137
        push    bx
138
        shl     ebx, 16
138
        shl     ebx, 16
139
        pop     bx
139
        pop     bx
140
        mov     ecx, [ysize]
140
        mov     ecx, [ysize]
141
        add     ecx, TOP_Y shl 16 - (BOTTOM_Y)
141
        add     ecx, TOP_Y shl 16 - (BOTTOM_Y)
142
        mov     edx, [colors.work_graph]
142
        mov     edx, [colors.work_graph]
143
        mcall   38
143
        mcall   38
144
  .not_channel:
144
  .not_channel:
145
 
145
 
146
; draw editbox
146
; draw editbox
147
        mov     eax, [ysize]
147
        mov     eax, [ysize]
148
        sub     eax, 13 ;;;;;;
148
        sub     eax, 13 ;;;;;;
149
        mov     [edit1.top], eax
149
        mov     [edit1.top], eax
150
 
150
 
151
        mov     eax, [xsize]
151
        mov     eax, [xsize]
152
        mov     [edit1.width], eax
152
        mov     [edit1.width], eax
153
 
153
 
154
        push    dword edit1
154
        push    dword edit1
155
        call    [edit_box_draw]
155
        call    [edit_box_draw]
156
 
156
 
157
; draw tabs
157
; draw tabs
158
        call    draw_windowtabs
158
        call    draw_windowtabs
159
		
159
                
160
  .exit:
160
  .exit:
161
        popa
161
        popa
162
        ret
162
        ret
163
 
163
 
164
 
164
 
165
 
165
 
166
draw_channel_list:
166
draw_channel_list:
167
 
167
 
168
        pusha
168
        pusha
169
 
169
 
170
        ; Do we need a scrollbar?
170
        ; Do we need a scrollbar?
171
        mov     ebx, [window_active]
171
        mov     ebx, [window_active]
172
        mov     eax, [ebx + window.users]
172
        mov     eax, [ebx + window.users]
173
        mov     [scroll1.max_area], eax
173
        mov     [scroll1.max_area], eax
174
        cmp     [scroll1.cur_area], eax
174
        cmp     [scroll1.cur_area], eax
175
        jae     .noscroll
175
        jae     .noscroll
176
 
176
 
177
        ; Is the current position greater then the max position?
177
        ; Is the current position greater then the max position?
178
        cmp     eax, [scroll1.position]
178
        cmp     eax, [scroll1.position]
179
        ja      @f
179
        ja      @f
180
        mov     [scroll1.position], eax
180
        mov     [scroll1.position], eax
181
  @@:
181
  @@:
182
        ; OK, draw the scrollbar
182
        ; OK, draw the scrollbar
183
        push    dword scroll1
183
        push    dword scroll1
184
        call    [scrollbar_draw]
184
        call    [scrollbar_draw]
185
 
185
 
186
        ; dont redraw scrollbar completely next time,
186
        ; dont redraw scrollbar completely next time,
187
        ; unless draw_window asks us to by setting [scroll1.all_redraw] back to 1
187
        ; unless draw_window asks us to by setting [scroll1.all_redraw] back to 1
188
        mov     [scroll1.all_redraw], 0
188
        mov     [scroll1.all_redraw], 0
189
        jmp     .scroll_done
189
        jmp     .scroll_done
190
 
190
 
191
  .noscroll:
191
  .noscroll:
192
        mov     [scroll1.position], 0
192
        mov     [scroll1.position], 0
193
  .scroll_done:
193
  .scroll_done:
194
 
194
 
195
        ; draw an invisible button, where the usernames will go
195
        ; draw an invisible button, where the usernames will go
196
        mov     ebx, [xsize]
196
        mov     ebx, [xsize]
197
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH
197
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH
198
        shl     ebx, 16
198
        shl     ebx, 16
199
        push    ebx
199
        push    ebx
200
        mov     bx, USERLIST_WIDTH
200
        mov     bx, USERLIST_WIDTH
201
        mov     ecx, [ysize]
201
        mov     ecx, [ysize]
202
        add     ecx, TEXT_Y shl 16 - (TEXT_Y + 16)
202
        add     ecx, TEXT_Y shl 16 - (TEXT_Y + 16)
203
        push    ecx ebx
203
        push    ecx ebx
204
        mov     edx, WINDOW_BTN_LIST + 1 shl 29 + 1 shl 30
204
        mov     edx, WINDOW_BTN_LIST + 1 shl 29 + 1 shl 30
205
        mcall   8
205
        mcall   8
206
 
206
 
207
        ; draw a filled rectangle to clear previously printed names
207
        ; draw a filled rectangle to clear previously printed names
208
        pop     ebx ecx
208
        pop     ebx ecx
209
        mov     edx, [colors.work]
209
        mov     edx, [colors.work]
210
        mcall   13
210
        mcall   13
211
 
211
 
212
; now, draw the names according to the scrollbar position and window size
212
; now, draw the names according to the scrollbar position and window size
213
        mov     eax, [scroll1.position]
213
        mov     eax, [scroll1.position]
214
        xor     edx, edx
214
        xor     edx, edx
215
        mov     ecx, MAX_NICK_LEN
215
        mov     ecx, MAX_NICK_LEN
216
        mul     ecx
216
        mul     ecx
217
        mov     edx, eax
217
        mov     edx, eax
218
        mov     eax, [window_active]
218
        mov     eax, [window_active]
219
        mov     ebp, [eax + window.selected]
219
        mov     ebp, [eax + window.selected]
220
        add     edx, [eax + window.data_ptr]
220
        add     edx, [eax + window.data_ptr]
221
        sub     ebp, [scroll1.position]
221
        sub     ebp, [scroll1.position]
222
        add     edx, window_data.names
222
        add     edx, window_data.names
223
 
223
 
224
        pop     ebx
224
        pop     ebx
225
        mov     bx, TEXT_Y
225
        mov     bx, TEXT_Y
226
        mov     ecx, [colors.work_text]
226
        mov     ecx, [colors.work_text]
227
        or      ecx, 0x80000000                 ; ASCIIZ string
227
        or      ecx, 0x80000000                 ; ASCIIZ string
228
        mov     eax, 4                          ; draw text
228
        mov     eax, 4                          ; draw text
229
 
229
 
230
        mov     edi, [textbox_height]           ; how many names will fit on screen
230
        mov     edi, [textbox_height]           ; how many names will fit on screen
231
  .loop:
231
  .loop:
232
        cmp     byte[edx], 0                    ; end of list?
232
        cmp     byte[edx], 0                    ; end of list?
233
        je      .done
233
        je      .done
234
 
234
 
235
        dec     ebp                             ; is this name selected?
235
        dec     ebp                             ; is this name selected?
236
        jnz     .nothighlight
236
        jnz     .nothighlight
237
                                                ; yes, highlight it
237
                                                ; yes, highlight it
238
        pusha
238
        pusha
239
        mov     cx, bx
239
        mov     cx, bx
240
        mov     bx, USERLIST_WIDTH
240
        mov     bx, USERLIST_WIDTH
241
        shl     ecx, 16
241
        shl     ecx, 16
242
        mov     cx, 10 - 1
242
        mov     cx, 10 - 1
243
        mov     edx, 0x00000055                 ; blue!
243
        mov     edx, 0x00000055                 ; blue!
244
        mcall   13
244
        mcall   13
245
        popa
245
        popa
246
 
246
 
247
        mov     ecx, 0x8000ffff                 ; cyan!
247
        mov     ecx, 0x8000ffff                 ; cyan!
248
        mcall
248
        mcall
249
 
249
 
250
        mov     ecx, [colors.work_text]
250
        mov     ecx, [colors.work_text]
251
        or      ecx, 0x80000000                 ; ASCIIZ string
251
        or      ecx, 0x80000000                 ; ASCIIZ string
252
        jmp     .next
252
        jmp     .next
253
 
253
 
254
  .nothighlight:
254
  .nothighlight:
255
        mcall
255
        mcall
256
 
256
 
257
  .next:
257
  .next:
258
        add     edx, MAX_NICK_LEN
258
        add     edx, MAX_NICK_LEN
259
        add     ebx, FONT_HEIGHT
259
        add     ebx, FONT_HEIGHT
260
        dec     edi
260
        dec     edi
261
        jnz     .loop
261
        jnz     .loop
262
 
262
 
263
  .done:
263
  .done:
264
        popa
264
        popa
265
 
265
 
266
        ret
266
        ret
267
 
267
 
268
 
268
 
269
draw_windowtabs:
269
draw_windowtabs:
270
 
270
 
271
; Create the buttons
271
; Create the buttons
272
 
272
 
273
        mov     eax, 8
273
        mov     eax, 8
274
        mov     ebx, 5 shl 16 + 120
274
        mov     ebx, 5 shl 16 + 120
275
        mov     ecx, 12 shl 16 + 12
275
        mov     ecx, 12 shl 16 + 12
276
        mov     edx, WINDOW_BTN_START
276
        mov     edx, WINDOW_BTN_START
277
        mov     edi, windows
277
        mov     edi, windows
278
  .more_btn:
278
  .more_btn:
279
        mov     esi, [colors.work_button]
279
        mov     esi, [colors.work_button]
280
        cmp     [window_active], edi
280
        cmp     [window_active], edi
281
        jne     @f
281
        jne     @f
282
        not     esi
282
        not     esi
283
        and     esi, 0x00ffffff
283
        and     esi, 0x00ffffff
284
      @@:
284
      @@:
285
        mcall
285
        mcall
286
        inc     edx
286
        inc     edx
287
        add     ebx, 125 shl 16
287
        add     ebx, 125 shl 16
288
        add     edi, sizeof.window
288
        add     edi, sizeof.window
289
        cmp     [edi + window.data_ptr], 0
289
        cmp     [edi + window.data_ptr], 0
290
        jne     .more_btn
290
        jne     .more_btn
291
 
291
 
292
; Draw the close window button
292
; Draw the close window button
293
 
293
 
294
        mov     edi, [window_active]
294
        mov     edi, [window_active]
295
        cmp     [edi + window.type], WINDOWTYPE_SERVER  ; dont let the user close server window
295
        cmp     [edi + window.type], WINDOWTYPE_SERVER  ; dont let the user close server window
296
        je      @f
296
        je      @f
297
 
297
 
298
;        mov     eax, 8
298
;        mov     eax, 8
299
        mov     ebx, [xsize]
299
        mov     ebx, [xsize]
300
        sub     ebx, 12
300
        sub     ebx, 12
301
        shl     ebx, 16
301
        shl     ebx, 16
302
        mov     bx, 12
302
        mov     bx, 12
303
        mov     ecx, 6 shl 16 + 12
303
        mov     ecx, 6 shl 16 + 12
304
        mov     edx, WINDOW_BTN_CLOSE
304
        mov     edx, WINDOW_BTN_CLOSE
305
        mov     esi, 0x00aa0000         ; red !
305
        mov     esi, 0x00aa0000         ; red !
306
        mcall
306
        mcall
307
  @@:
307
  @@:
308
 
308
 
309
; Draw the windownames onto the buttons
309
; Draw the windownames onto the buttons
310
 
310
 
311
        mov     eax, 4
311
        mov     eax, 4
312
        mov     ebx, 10 shl 16 + 15
312
        mov     ebx, 10 shl 16 + 15
313
        mov     esi, MAX_WINDOWS
313
        mov     esi, MAX_WINDOWS
314
        mov     edi, windows
314
        mov     edi, windows
315
  .more:
315
  .more:
316
        mov     ecx, [colors.work_button_text]
316
        mov     ecx, [colors.work_button_text]
317
        test    [edi + window.flags], FLAG_UPDATED
317
        test    [edi + window.flags], FLAG_UPDATED
318
        jz      @f
318
        jz      @f
319
        mov     ecx, 0x00aa0000 ; RED!
319
        mov     ecx, 0x00aa0000 ; RED!
320
  @@:
320
  @@:
321
        or      ecx, 0x80000000         ; ASCIIZ string
321
        or      ecx, 0x80000000         ; ASCIIZ string
322
        lea     edx, [edi + window.name]
322
        lea     edx, [edi + window.name]
323
        mcall
323
        mcall
324
        add     edi, sizeof.window      ; get ptr to next window
324
        add     edi, sizeof.window      ; get ptr to next window
325
        cmp     [edi + window.data_ptr], 0
325
        cmp     [edi + window.data_ptr], 0
326
        je      .enough
326
        je      .enough
327
        add     ebx, 125 shl 16
327
        add     ebx, 125 shl 16
328
        dec     esi
328
        dec     esi
329
        jnz     .more
329
        jnz     .more
330
  .enough:
330
  .enough:
331
 
331
 
332
        ret
332
        ret
333
 
333
 
334
 
334
 
335
 
335
 
336
highlight_updated_tabs:
336
highlight_updated_tabs:
337
        mov     eax, 4
337
        mov     eax, 4
338
        mov     ebx, 10 shl 16 + 15
338
        mov     ebx, 10 shl 16 + 15
339
        mov     ecx, 0x80aa0000
339
        mov     ecx, 0x80aa0000
340
        mov     esi, MAX_WINDOWS
340
        mov     esi, MAX_WINDOWS
341
        mov     edi, windows
341
        mov     edi, windows
342
  .more_:
342
  .more_:
343
        test    [edi + window.flags], FLAG_UPDATED
343
        test    [edi + window.flags], FLAG_UPDATED
344
        jz      .next
344
        jz      .next
345
        lea     edx, [edi + window.name]
345
        lea     edx, [edi + window.name]
346
        mcall
346
        mcall
347
  .next:
347
  .next:
348
        add     edi, sizeof.window      ; get ptr to next window
348
        add     edi, sizeof.window      ; get ptr to next window
349
        cmp     [edi + window.data_ptr], 0
349
        cmp     [edi + window.data_ptr], 0
350
        je      .enough_
350
        je      .enough_
351
        add     ebx, 125 shl 16
351
        add     ebx, 125 shl 16
352
        dec     esi
352
        dec     esi
353
        jnz     .more_
353
        jnz     .more_
354
  .enough_:
354
  .enough_:
355
 
355
 
356
        ret
356
        ret