Subversion Repositories Kolibri OS

Rev

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

Rev 180 Rev 485
Line 10... Line 10...
10
use32
10
use32
Line 11... Line 11...
11
   
11
   
Line 12... Line 12...
12
        org    0x0
12
        org    0x0
13
   
13
   
14
        db     'MENUET01'   ; 8 byte id
14
        db     'MENUET01'   ; 8 byte id
15
        dd     0x01         ; header version
15
        dd     0x01         ; title version
16
        dd     START        ; start of code
16
        dd     START        ; start of code
17
        dd     I_END        ; size of image
17
        dd     I_END        ; size of image
18
        dd     0x5000       ; memory for app
18
        dd     0x5000       ; memory for app
Line 19... Line 19...
19
        dd     0x4ff0       ; esp
19
        dd     0x4ff0       ; esp
20
        dd     0x0 , 0x0    ; I_Param , I_Icon
20
        dd     0x0 , 0x0    ; I_Param , I_Icon
Line 21... Line 21...
21
   
21
   
22
include 'macros.inc'
22
include '..\..\..\macros.inc'
23
START:    ; start of execution
23
START:    ; start of execution
24
   
24
   
25
    mov eax,14
25
    mov eax,14
26
    int 40h
26
    mcall
27
    mov ebx,eax
27
    mov ebx,eax
Line 34... Line 34...
34
; Test on installed video driver
34
; Test on installed video driver
35
    mov eax,21
35
    mov eax,21
36
    mov ebx,13
36
    mov ebx,13
37
    mov ecx,1
37
    mov ecx,1
38
    mov edx,drvinfo
38
    mov edx,drvinfo
39
    int 40h
39
    mcall
40
    cmp eax,0FFFFFFFFh ; = -1 - error or not installed
40
    cmp eax,0FFFFFFFFh ; = -1 - error or not installed
41
    jne vrr_00
41
    jne vrr_00
42
    call warning_info
42
    call warning_info
43
    retn
43
    retn
44
;
44
;
Line 52... Line 52...
52
    call draw_window  ; at first, draw the window
52
    call draw_window  ; at first, draw the window
Line 53... Line 53...
53
   
53
   
Line 54... Line 54...
54
still:
54
still:
55
   
55
   
Line 56... Line 56...
56
    mov  eax,10   ; check here for event
56
    mov  eax,10   ; check here for event
57
    int  0x40
57
    mcall
58
   
58
   
59
    cmp  eax,1   ; redraw request ?
59
    cmp  eax,1   ; redraw request ?
Line 65... Line 65...
65
    call get_pid
65
    call get_pid
66
    jmp  still
66
    jmp  still
Line 67... Line 67...
67
      
67
      
68
  key:    ; key
68
  key:    ; key
69
    mov  al,2   ; just read it
69
    mov  al,2   ; just read it
70
    int  0x40
70
    mcall
71
    cmp ah,'1'
71
    cmp ah,'1'
72
    jne key_loc_00
72
    jne key_loc_00
73
    call safekey
73
    call safekey
74
    jmp still
74
    jmp still
Line 139... Line 139...
139
    mov [vmselect],ax
139
    mov [vmselect],ax
140
    jmp red
140
    jmp red
Line 141... Line 141...
141
   
141
   
142
button:   ; button
142
button:   ; button
143
    mov  al,17   ; get id
143
    mov  al,17   ; get id
Line 144... Line 144...
144
    int  0x40
144
    mcall
145
   
145
   
146
    cmp  ah,1   ; button id=1 ?
146
    cmp  ah,1   ; button id=1 ?
147
    jne  noclose
147
    jne  noclose
148
    mov  eax,-1           ; close this program
148
    mov  eax,-1           ; close this program
149
    int  0x40
149
    mcall
150
  noclose:
150
  noclose:
151
    cmp ah,2              ;'+' screen width
151
    cmp ah,2              ;'+' screen width
152
    jne button_loc_01
152
    jne button_loc_01
Line 192... Line 192...
192
   
192
   
Line 193... Line 193...
193
dw_continue:
193
dw_continue:
194
   
194
   
195
    mov  eax,12      ; function 12:tell os about windowdraw
195
    mov  eax,12      ; function 12:tell os about windowdraw
Line 196... Line 196...
196
    mov  ebx,1      ; 1, start of draw
196
    mov  ebx,1      ; 1, start of draw
197
    int  0x40
197
    mcall
198
   
198
   
199
       ; DRAW WINDOW
199
       ; DRAW WINDOW
200
    mov  eax,0      ; function 0 : define and draw window
200
    mov  eax,0      ; function 0 : define and draw window
201
    mov  ebx,100*65536+400    ; [x start] *65536 + [x size]
201
    mov  ebx,100*65536+400    ; [x start] *65536 + [x size]
202
    mov  ecx,100*65536+200    ; [y start] *65536 + [y size]
202
    mov  ecx,100*65536+200    ; [y start] *65536 + [y size]
Line 203... Line 203...
203
    mov  edx,0x130020C0;0x00000040 ; color of work area RRGGBB,8->color glide
203
    mov  edx,0x130020C0;0x00000040 ; color of work area RRGGBB,8->color glide
204
    mov  edi,header
204
    mov  edi,title
205
    int  0x40
205
    mcall
206
   
206
   
207
       ; BUTTONS
207
       ; BUTTONS
208
    mov eax,8
208
    mov eax,8
209
    mov edx,0
209
    mov edx,0
210
    mov ebx,330*65536+20
210
    mov ebx,330*65536+20
211
    mov ecx,84*65536+48
211
    mov ecx,84*65536+48
212
    mov dl,2
212
    mov dl,2
213
    mov  esi,0x5599cc     ; button color RRGGBB
213
    mov  esi,0x5599cc     ; button color RRGGBB
214
    int 40h               ; Button '+'Width
214
    mcall               ; Button '+'Width
215
    add ebx,30*65536
215
    add ebx,30*65536
216
    mov dl,3
216
    mov dl,3
217
    int 40h               ; Button '-'Width
217
    mcall               ; Button '-'Width
218
    mov ebx,22*65536+85
218
    mov ebx,22*65536+85
219
    mov ecx,170*65536+15
219
    mov ecx,170*65536+15
220
    inc dl ;dl=4
220
    inc dl ;dl=4
221
    int 40h               ; Button 'Ok'
221
    mcall               ; Button 'Ok'
222
    add ebx,90*65536
222
    add ebx,90*65536
223
    inc dl ;dl=5
223
    inc dl ;dl=5
224
    int 40h               ; Button 'Cancel'
224
    mcall               ; Button 'Cancel'
225
    add ebx,90*65536
225
    add ebx,90*65536
226
    inc dl ;dl=6
226
    inc dl ;dl=6
Line 227... Line 227...
227
    int 40h               ; Button 'Return'
227
    mcall               ; Button 'Return'
Line 228... Line 228...
228
    add ebx,90*65536
228
    add ebx,90*65536
229
    inc dl ;dl=7
229
    inc dl ;dl=7
230
    int 40h               ; Button 'Default'
230
    mcall               ; Button 'Default'
Line 231... Line 231...
231
   
231
   
Line 232... Line 232...
232
    call draw_face
232
    call draw_face
Line 244... Line 244...
244
    push ebx
244
    push ebx
245
    push edx
245
    push edx
246
    mov eax,21
246
    mov eax,21
247
    mov ebx,13
247
    mov ebx,13
248
    mov ecx,4
248
    mov ecx,4
249
    int 40h
249
    mcall
250
    pop edx
250
    pop edx
251
    pop ecx
251
    pop ecx
252
    pop eax
252
    pop eax
253
    retn
253
    retn
Line 265... Line 265...
265
    pop edx
265
    pop edx
266
    push edx
266
    push edx
267
    mov eax,21
267
    mov eax,21
268
    mov ebx,13
268
    mov ebx,13
269
    mov ecx,3
269
    mov ecx,3
270
    int 40h
270
    mcall
271
    mcall 5,50
271
    mcall 5,50
272
    mcall 15,3
272
    mcall 15,3
273
    pop edx
273
    pop edx
274
    pop ebx
274
    pop ebx
275
    pop ecx
275
    pop ecx
Line 282... Line 282...
282
    push edx
282
    push edx
283
    mov edx,eax
283
    mov edx,eax
284
    mov eax,21
284
    mov eax,21
285
    mov ebx,13
285
    mov ebx,13
286
    mov ecx,5
286
    mov ecx,5
287
    int 40h
287
    mcall
288
    pop edx
288
    pop edx
289
    pop ecx
289
    pop ecx
290
    pop ebx
290
    pop ebx
291
    retn
291
    retn
Line 292... Line 292...
292
   
292
   
293
get_pid:
293
get_pid:
294
    mov eax,9
294
    mov eax,9
295
    mov ebx,buffer
295
    mov ebx,buffer
296
    xor ecx,ecx
296
    xor ecx,ecx
297
    dec ecx
297
    dec ecx
298
    int 40h
298
    mcall
299
    mov [totp],eax
299
    mov [totp],eax
300
    mov eax,[ebx+30]
300
    mov eax,[ebx+30]
301
    mov [mypid],eax
301
    mov [mypid],eax
302
    mov ax,[ebx+4]
302
    mov ax,[ebx+4]
Line 308... Line 308...
308
    mov ebx,eax
308
    mov ebx,eax
309
    mov ecx,eax
309
    mov ecx,eax
310
    mov al,21
310
    mov al,21
311
    mov bl,13
311
    mov bl,13
312
    mov cl,2
312
    mov cl,2
313
    int 40h
313
    mcall
314
    mov [initrr],ebx
314
    mov [initrr],ebx
315
    mov [refrate],ebx
315
    mov [refrate],ebx
316
    ror ecx,16
316
    ror ecx,16
317
    mov cx,bx
317
    mov cx,bx
318
    rol ecx,16
318
    rol ecx,16
Line 326... Line 326...
326
draw_table:
326
draw_table:
327
    mov eax,13
327
    mov eax,13
328
    mov ebx,9*65536+303
328
    mov ebx,9*65536+303
329
    mov ecx,59*65536+87
329
    mov ecx,59*65536+87
330
    xor edx,edx
330
    xor edx,edx
331
    int 40h
331
    mcall
332
    mov ebx,10*65536+300
332
    mov ebx,10*65536+300
333
    mov ecx,60*65536+24
333
    mov ecx,60*65536+24
334
    mov edx,00FF00FFh
334
    mov edx,00FF00FFh
335
    int 40h
335
    mcall
336
    mov ebx,10*65536+36
336
    mov ebx,10*65536+36
337
    mov ecx,72*65536+72
337
    mov ecx,72*65536+72
338
    mov edx,0000FFFFh
338
    mov edx,0000FFFFh
339
    int 40h
339
    mcall
340
    mov eax,38
340
    mov eax,38
341
    mov edx,00FFFFFFh
341
    mov edx,00FFFFFFh
342
    mov ebx,10*65536+310
342
    mov ebx,10*65536+310
343
    mov edi,60*65536+60
343
    mov edi,60*65536+60
344
    mov esi,12*65536+12
344
    mov esi,12*65536+12
345
    xor ecx,ecx
345
    xor ecx,ecx
346
    mov cl,8
346
    mov cl,8
347
dt_loc_hor_line:
347
dt_loc_hor_line:
348
    push ecx
348
    push ecx
349
    mov ecx,edi
349
    mov ecx,edi
350
    int 40h
350
    mcall
351
    add edi,esi
351
    add edi,esi
352
    pop ecx
352
    pop ecx
353
    loop dt_loc_hor_line
353
    loop dt_loc_hor_line
354
    mov ebx,10*65536+10
354
    mov ebx,10*65536+10
355
    mov edi,60*65536+144
355
    mov edi,60*65536+144
356
    mov esi,66*65536+66
356
    mov esi,66*65536+66
357
    mov ecx,edi
357
    mov ecx,edi
358
    int 40h
358
    mcall
359
    add ebx,36*65536+36
359
    add ebx,36*65536+36
360
    xor ecx,ecx
360
    xor ecx,ecx
361
    mov cl,5
361
    mov cl,5
362
dt_loc_vert_line:
362
dt_loc_vert_line:
363
    push ecx
363
    push ecx
364
    mov ecx,edi
364
    mov ecx,edi
365
    int 40h
365
    mcall
366
    add ebx,esi
366
    add ebx,esi
367
    pop ecx
367
    pop ecx
368
    loop dt_loc_vert_line
368
    loop dt_loc_vert_line
369
    mov eax,4
369
    mov eax,4
370
    mov ebx,52*65536+75
370
    mov ebx,52*65536+75
371
    mov ecx,000000FFh
371
    mov ecx,000000FFh
372
    mov edx,_m1280x1024
372
    mov edx,_m1280x1024
373
    mov esi,9
373
    mov esi,9
374
    int 40h
374
    mcall
375
    add edx,9
375
    add edx,9
376
    add ebx,66*65536
376
    add ebx,66*65536
377
    int 40h
377
    mcall
378
    add edx,9
378
    add edx,9
379
    add ebx,66*65536
379
    add ebx,66*65536
380
    int 40h
380
    mcall
381
    add edx,9
381
    add edx,9
382
    add ebx,66*65536
382
    add ebx,66*65536
383
    int 40h
383
    mcall
384
    xor eax,eax
384
    xor eax,eax
385
    mov ebx,eax
385
    mov ebx,eax
386
    mov ecx,eax
386
    mov ecx,eax
387
    mov al,47
387
    mov al,47
388
    inc ebx
388
    inc ebx
Line 393... Line 393...
393
    mov esi,00FF0000h
393
    mov esi,00FF0000h
394
    mov ecx,5
394
    mov ecx,5
395
dt_loc_00:
395
dt_loc_00:
396
    push ecx
396
    push ecx
397
    mov ecx,edi
397
    mov ecx,edi
398
    int 40h
398
    mcall
399
    inc edi
399
    inc edi
400
    add dx,12
400
    add dx,12
401
    pop ecx
401
    pop ecx
402
    loop dt_loc_00
402
    loop dt_loc_00
403
    xor ecx,ecx
403
    xor ecx,ecx
Line 407... Line 407...
407
    mov esi,000000FFh
407
    mov esi,000000FFh
408
    mov ecx,4
408
    mov ecx,4
409
dt_loc_01:
409
dt_loc_01:
410
    push ecx
410
    push ecx
411
    mov ecx,edi
411
    mov ecx,edi
412
    int 40h
412
    mcall
413
    inc edi
413
    inc edi
414
    add edx,66*65536
414
    add edx,66*65536
415
    pop ecx
415
    pop ecx
416
    loop dt_loc_01
416
    loop dt_loc_01
417
    mov eax,4
417
    mov eax,4
418
    mov ebx,16*65536+63
418
    mov ebx,16*65536+63
419
    mov ecx,000000FFh
419
    mov ecx,000000FFh
420
    mov edx,_mk
420
    mov edx,_mk
421
    mov esi,4
421
    mov esi,4
422
    int 40h
422
    mcall
423
    shl ecx,16
423
    shl ecx,16
424
    add bx,12
424
    add bx,12
425
    add edx,4
425
    add edx,4
426
    int 40h
426
    mcall
427
    retn
427
    retn
Line 428... Line 428...
428
   
428
   
429
;IN: ah=keycode
429
;IN: ah=keycode
430
safekey:
430
safekey:
Line 488... Line 488...
488
    mov al,38
488
    mov al,38
489
    push ecx
489
    push ecx
490
    mov edi,ecx
490
    mov edi,ecx
491
    shr edi,16
491
    shr edi,16
492
    mov cx,di
492
    mov cx,di
493
    int 40h
493
    mcall
494
    pop ecx
494
    pop ecx
495
    push ecx
495
    push ecx
496
    mov edi,ecx
496
    mov edi,ecx
497
    ror ecx,16
497
    ror ecx,16
498
    mov cx,di
498
    mov cx,di
499
    int 40h
499
    mcall
500
    pop ecx
500
    pop ecx
501
    push ebx
501
    push ebx
502
    mov edi,ebx
502
    mov edi,ebx
503
    shr edi,16
503
    shr edi,16
504
    mov bx,di
504
    mov bx,di
505
    int 40h
505
    mcall
506
    pop ebx
506
    pop ebx
507
    mov edi,ebx
507
    mov edi,ebx
508
    ror ebx,16
508
    ror ebx,16
509
    mov bx,di
509
    mov bx,di
510
    int 40h
510
    mcall
511
    pop edi
511
    pop edi
512
    pop edx
512
    pop edx
513
    pop ecx
513
    pop ecx
514
    pop ebx
514
    pop ebx
515
    pop eax
515
    pop eax
Line 522... Line 522...
522
    push ecx
522
    push ecx
523
    xor eax,eax
523
    xor eax,eax
524
    mov al,5
524
    mov al,5
525
    xor ebx,ebx
525
    xor ebx,ebx
526
    mov bx,300
526
    mov bx,300
527
    int 40h
527
    mcall
528
    call get_pid
528
    call get_pid
529
    xor eax,eax
529
    xor eax,eax
530
    mov ebx,eax
530
    mov ebx,eax
531
    mov ecx,eax
531
    mov ecx,eax
532
    mov al,18
532
    mov al,18
533
    mov ebx,3
533
    mov ebx,3
534
    mov cx,[mypno]
534
    mov cx,[mypno]
535
    int 40h
535
    mcall
536
    pop ecx
536
    pop ecx
537
    pusha
537
    pusha
538
    call draw_window
538
    call draw_window
539
    popa
539
    popa
540
    xor eax,eax
540
    xor eax,eax
541
    mov al,5
541
    mov al,5
542
    xor ebx,ebx
542
    xor ebx,ebx
543
    mov bx,300
543
    mov bx,300
544
    int 40h
544
    mcall
545
    xor eax,eax
545
    xor eax,eax
546
    mov al,11
546
    mov al,11
547
    int 40h
547
    mcall
548
    cmp eax,1
548
    cmp eax,1
549
    jne par_loc_00
549
    jne par_loc_00
550
    pusha
550
    pusha
551
    call draw_window
551
    call draw_window
552
    popa
552
    popa
553
par_loc_00:
553
par_loc_00:
554
    xor eax,eax
554
    xor eax,eax
555
    mov ebx,eax
555
    mov ebx,eax
556
    mov al,23
556
    mov al,23
557
    mov bx,700
557
    mov bx,700
558
    int 40h
558
    mcall
559
    cmp eax,0
559
    cmp eax,0
560
    jnz par_loc_02
560
    jnz par_loc_02
561
; mov [ftr_eax],eax
561
; mov [ftr_eax],eax
562
    mov edx,[oldvm]
562
    mov edx,[oldvm]
563
    call set_my_mode
563
    call set_my_mode
Line 573... Line 573...
573
;    shl ebx,16
573
;    shl ebx,16
574
;    mov bh,1
574
;    mov bh,1
575
;    mov ecx,[ftr_eax]
575
;    mov ecx,[ftr_eax]
576
;    mov edx,20*65536+180
576
;    mov edx,20*65536+180
577
;    mov esi,00FFFFFFh
577
;    mov esi,00FFFFFFh
578
;    int 40h
578
;    mcall
579
;    mov ecx,[ftr_ebx]
579
;    mov ecx,[ftr_ebx]
580
;    add edx,54*65536
580
;    add edx,54*65536
581
;    int 40h
581
;    mcall
582
    retn
582
    retn
Line 583... Line 583...
583
   
583
   
584
print_cur_vm:
584
print_cur_vm:
585
    mov eax,4
585
    mov eax,4
586
    mov ebx,20*65536+40
586
    mov ebx,20*65536+40
587
    mov ecx,0000FF00h
587
    mov ecx,0000FF00h
588
    mov edx,curmode
588
    mov edx,curmode
589
    mov esi,cmlen
589
    mov esi,cmlen
590
    int 40h
590
    mcall
591
    mov al,14
591
    mov al,14
592
    int 40h
592
    mcall
593
    mov esi,00FFFFFFh
593
    mov esi,00FFFFFFh
594
    mov edi,eax
594
    mov edi,eax
595
    shr eax,16
595
    shr eax,16
596
    xor ecx,ecx
596
    xor ecx,ecx
Line 599... Line 599...
599
    xor ebx,ebx
599
    xor ebx,ebx
600
    mov bl,4
600
    mov bl,4
601
    shl ebx,16
601
    shl ebx,16
602
    mov edx,104*65536+40
602
    mov edx,104*65536+40
603
    mov eax,47
603
    mov eax,47
604
    int 40h
604
    mcall
605
    add edx,30*65536
605
    add edx,30*65536
606
    mov cx,di
606
    mov cx,di
607
    inc ecx
607
    inc ecx
608
    int 40h
608
    mcall
609
    add edx,30*65536
609
    add edx,30*65536
610
    mov ecx,[initrr]
610
    mov ecx,[initrr]
611
    sub ebx,1*65536
611
    sub ebx,1*65536
612
    int 40h
612
    mcall
613
    mov al,4
613
    mov al,4
614
    mov ebx,200*65536+40
614
    mov ebx,200*65536+40
615
    mov ecx,0000FF00h
615
    mov ecx,0000FF00h
616
    mov edx,selmode
616
    mov edx,selmode
617
    mov esi,cmlen
617
    mov esi,cmlen
618
    int 40h
618
    mcall
619
    mov ax,[vmselect]
619
    mov ax,[vmselect]
620
    cmp ax,0
620
    cmp ax,0
621
    jz pcv_loc_00
621
    jz pcv_loc_00
622
    push eax
622
    push eax
623
    xor eax,eax
623
    xor eax,eax
624
    mov al,13
624
    mov al,13
625
    mov ebx,284*65536+54
625
    mov ebx,284*65536+54
626
    mov ecx,40*65536+10
626
    mov ecx,40*65536+10
627
    mov edx,000020C0h
627
    mov edx,000020C0h
628
    int 40h
628
    mcall
629
    pop eax
629
    pop eax
630
    push eax
630
    push eax
631
    xor ecx,ecx
631
    xor ecx,ecx
632
    dec al
632
    dec al
633
    mov cl,al
633
    mov cl,al
Line 638... Line 638...
638
    xor eax,eax
638
    xor eax,eax
639
    mov al,4
639
    mov al,4
640
    mov esi,9
640
    mov esi,9
641
    mov ebx,284*65536+40
641
    mov ebx,284*65536+40
642
    mov ecx,00ff0000h
642
    mov ecx,00ff0000h
643
    int 40h
643
    mcall
644
    pop eax
644
    pop eax
645
    cmp ah,0
645
    cmp ah,0
646
    jz pcv_loc_00
646
    jz pcv_loc_00
647
    push esi
647
    push esi
648
    push edx
648
    push edx
Line 651... Line 651...
651
    xor eax,eax
651
    xor eax,eax
652
    mov al,13
652
    mov al,13
653
    mov ebx,344*65536+18
653
    mov ebx,344*65536+18
654
    mov ecx,40*65536+10
654
    mov ecx,40*65536+10
655
    mov edx,000020C0h
655
    mov edx,000020C0h
656
    int 40h
656
    mcall
657
    pop eax
657
    pop eax
658
    push eax
658
    push eax
659
    mov bx,ax
659
    mov bx,ax
660
    xor edx,edx
660
    xor edx,edx
661
    mov esi,_m1
661
    mov esi,_m1
Line 680... Line 680...
680
    shl ebx,16
680
    shl ebx,16
681
    mov edx,344*65536+40
681
    mov edx,344*65536+40
682
    xor eax,eax
682
    xor eax,eax
683
    mov al,47
683
    mov al,47
684
    mov esi,00ff0000h
684
    mov esi,00ff0000h
685
    int 40h
685
    mcall
686
    pop eax
686
    pop eax
687
    pop ecx
687
    pop ecx
688
    pop edx
688
    pop edx
689
    pop esi
689
    pop esi
690
 pcv_loc_00:
690
 pcv_loc_00:
Line 745... Line 745...
745
        mov al,4
745
        mov al,4
746
        mov ecx,00FFFFFFh
746
        mov ecx,00FFFFFFh
747
        mov edx,noherz
747
        mov edx,noherz
748
        xor esi,esi
748
        xor esi,esi
749
        mov si,3
749
        mov si,3
750
        int 40h
750
        mcall
751
        pop esi
751
        pop esi
752
        pop edx
752
        pop edx
753
        pop ecx
753
        pop ecx
754
        pop ebx
754
        pop ebx
755
        pop eax
755
        pop eax
Line 769... Line 769...
769
        shl ebx,16
769
        shl ebx,16
770
        mov ecx,eax
770
        mov ecx,eax
771
        mov esi,00FFFFFFh
771
        mov esi,00FFFFFFh
772
        xor eax,eax
772
        xor eax,eax
773
        mov al,47
773
        mov al,47
774
        int 40h
774
        mcall
775
        pop esi
775
        pop esi
776
        pop edx
776
        pop edx
777
        pop ecx
777
        pop ecx
778
        pop ebx
778
        pop ebx
779
        pop eax
779
        pop eax
Line 861... Line 861...
861
        xor eax,eax
861
        xor eax,eax
862
        mov al,13
862
        mov al,13
863
        mov ebx,182*65536+36
863
        mov ebx,182*65536+36
864
        mov ecx,26*65536+5
864
        mov ecx,26*65536+5
865
        mov edx,000020C0h
865
        mov edx,000020C0h
866
        int 40h
866
        mcall
867
        mov ebx,173*65536+54
867
        mov ebx,173*65536+54
868
        mov ecx,153*65536+7
868
        mov ecx,153*65536+7
869
        int 40h
869
        mcall
870
        mov ebx,337*65536+36
870
        mov ebx,337*65536+36
871
        mov ecx,62*65536+10
871
        mov ecx,62*65536+10
872
        int 40h
872
        mcall
873
        mov al,4
873
        mov al,4
874
        shr ecx,16
874
        shr ecx,16
875
        mov bx,cx
875
        mov bx,cx
876
        add ebx,3*65536
876
        add ebx,3*65536
877
        mov ecx,00FF0000h
877
        mov ecx,00FF0000h
878
        mov edx,width
878
        mov edx,width
879
        mov esi,5
879
        mov esi,5
880
        int 40h
880
        mcall
881
        xor ecx,ecx
881
        xor ecx,ecx
882
        add edx,5
882
        add edx,5
883
        xor esi,esi
883
        xor esi,esi
884
        inc esi
884
        inc esi
885
        mov ebx,335*65536+104
885
        mov ebx,335*65536+104
886
        int 40h
886
        mcall
887
        add ebx,36*65536
887
        add ebx,36*65536
888
        inc edx
888
        inc edx
889
        int 40h
889
        mcall
890
        mov edx,tmode
890
        mov edx,tmode
891
        mov ecx,00FF0000h
891
        mov ecx,00FF0000h
892
        mov ebx,182*65536+24
892
        mov ebx,182*65536+24
893
        mov esi,6
893
        mov esi,6
894
        int 40h
894
        mcall
895
        mov edx,actions
895
        mov edx,actions
896
        mov ebx,173*65536+152
896
        mov ebx,173*65536+152
897
        mov esi,9
897
        mov esi,9
898
        int 40h
898
        mcall
899
        xor ecx,ecx
899
        xor ecx,ecx
900
        mov edx,button1
900
        mov edx,button1
901
        mov ebx,59*65536+174
901
        mov ebx,59*65536+174
902
        mov esi,2
902
        mov esi,2
903
        int 40h
903
        mcall
904
        add edx,esi
904
        add edx,esi
905
        mov esi,6
905
        mov esi,6
906
        add ebx,78*65536
906
        add ebx,78*65536
907
        int 40h
907
        mcall
908
        add edx,esi
908
        add edx,esi
909
        add ebx,90*65536
909
        add ebx,90*65536
910
        int 40h
910
        mcall
911
        add edx,esi
911
        add edx,esi
912
        mov esi,7
912
        mov esi,7
913
        add ebx,87*65536
913
        add ebx,87*65536
914
        int 40h
914
        mcall
915
        call rect_select
915
        call rect_select
916
;        call debug_ftr
916
;        call debug_ftr
917
        call print_cur_vm
917
        call print_cur_vm
918
        call print_all_herz
918
        call print_all_herz
919
        retn
919
        retn
Line 924... Line 924...
924
        retn
924
        retn
Line 925... Line 925...
925
   
925
   
926
warning_window:
926
warning_window:
927
        mov  eax,12      ; function 12:tell os about windowdraw
927
        mov  eax,12      ; function 12:tell os about windowdraw
928
        mov  ebx,1      ; 1, start of draw
928
        mov  ebx,1      ; 1, start of draw
929
        int  0x40
929
        mcall
930
   ; DRAW WARNING WINDOW
930
   ; DRAW WARNING WINDOW
931
        xor  eax,eax      ; function 0 : define and draw window
931
        xor  eax,eax      ; function 0 : define and draw window
932
        mov ebx,[oldX]
932
        mov ebx,[oldX]
933
        shr ebx,1
933
        shr ebx,1
Line 939... Line 939...
939
        shr ecx,1
939
        shr ecx,1
940
        sub ecx,100
940
        sub ecx,100
941
        shl ecx,16
941
        shl ecx,16
942
        mov cx,200
942
        mov cx,200
943
        mov  edx,0x13808080     ; color of work area RRGGBB,8->color glide
943
        mov  edx,0x13808080     ; color of work area RRGGBB,8->color glide
944
        mov  edi,header
944
        mov  edi,title
945
        int  0x40
945
        mcall
Line 946... Line 946...
946
 
946
 
947
   ; WARNING TEXT
947
   ; WARNING TEXT
948
        mov  eax,4      ; function 4 : write text to window
948
        mov  eax,4      ; function 4 : write text to window
949
        mov  ebx,(200-(len_warn00/2)*6)*65536+60    ; [x start] *65536 + [y
949
        mov  ebx,(200-(len_warn00/2)*6)*65536+60    ; [x start] *65536 + [y
950
   ;]
950
   ;]
951
        mov  ecx,0xf0ff0000     ; color of text RRGGBB
951
        mov  ecx,0xf0ff0000     ; color of text RRGGBB
952
        mov  edx,warn00        ; pointer to text beginning
952
        mov  edx,warn00        ; pointer to text beginning
953
        mov  esi,len_warn00     ; text length
953
        mov  esi,len_warn00     ; text length
954
;        int  0x40
954
;        mcall
955
;        inc  ebx
955
;        inc  ebx
956
        int  40h
956
        mcall
957
        add  ebx,1*65536
957
        add  ebx,1*65536
958
        int  40h
958
        mcall
959
        mov  ebx,(200-(len_warn01/2)*6)*65536+100
959
        mov  ebx,(200-(len_warn01/2)*6)*65536+100
960
        mov  edx,warn01
960
        mov  edx,warn01
961
        mov  esi,len_warn01
961
        mov  esi,len_warn01
962
        int  40h
962
        mcall
963
        mov  edx,button1
963
        mov  edx,button1
964
        add  ecx,0ffffh
964
        add  ecx,0ffffh
965
        mov  ebx,(200-6)*65536+(160-4)
965
        mov  ebx,(200-6)*65536+(160-4)
966
        mov  esi,2
966
        mov  esi,2
967
        int 40h
967
        mcall
968
        mov  eax,12      ; function 12:tell os about windowdraw
968
        mov  eax,12      ; function 12:tell os about windowdraw
969
        mov  ebx,2      ; 2, end of draw
969
        mov  ebx,2      ; 2, end of draw
970
        int  0x40
970
        mcall
Line 971... Line 971...
971
        retn
971
        retn
972
   
972
   
973
warning_loop:
973
warning_loop:
974
        mov  eax,5
974
        mov  eax,5
975
        mov ebx,13
975
        mov ebx,13
976
        int  0x40
976
        mcall
977
        mov eax,11
977
        mov eax,11
978
        int 40h
978
        mcall
979
        cmp  eax,1      ; redraw request ?
979
        cmp  eax,1      ; redraw request ?
980
        je  warning_red
980
        je  warning_red
981
        cmp  eax,2      ; key in buffer ?
981
        cmp  eax,2      ; key in buffer ?
Line 993... Line 993...
993
        mov [blinkcol],ecx
993
        mov [blinkcol],ecx
994
        mov ch,0f0h
994
        mov ch,0f0h
995
        shl ecx,16
995
        shl ecx,16
996
        mov  edx,warn01
996
        mov  edx,warn01
997
        mov  esi,len_warn01
997
        mov  esi,len_warn01
998
        int  40h
998
        mcall
999
        sub ebx,1*65536
999
        sub ebx,1*65536
1000
        int 40h
1000
        mcall
1001
        jmp  warning_loop
1001
        jmp  warning_loop
1002
  warning_red:      ; redraw
1002
  warning_red:      ; redraw
1003
        call warning_window
1003
        call warning_window
1004
        jmp  warning_loop
1004
        jmp  warning_loop
1005
  warning_key:      ; key
1005
  warning_key:      ; key
1006
        mov  eax,2      ;  read key
1006
        mov  eax,2      ;  read key
1007
        int  0x40
1007
        mcall
1008
        cmp ah,01h
1008
        cmp ah,01h
1009
        jne warning_loop
1009
        jne warning_loop
1010
        xor eax,eax
1010
        xor eax,eax
1011
        dec eax         ; Terminate application
1011
        dec eax         ; Terminate application
1012
        int 40h
1012
        mcall
1013
        jmp warning_loop
1013
        jmp warning_loop
1014
  warning_button:   ; button
1014
  warning_button:   ; button
1015
        mov  eax,17     ; get id
1015
        mov  eax,17     ; get id
1016
        int  0x40
1016
        mcall
1017
        cmp  ah,1   ; button id=1 ?
1017
        cmp  ah,1   ; button id=1 ?
1018
        jne  warning_loop
1018
        jne  warning_loop
1019
        xor eax,eax
1019
        xor eax,eax
1020
        dec eax         ; close this program
1020
        dec eax         ; close this program
1021
        int  0x40
1021
        mcall
1022
        jmp warning_loop
1022
        jmp warning_loop
1023
        retn
1023
        retn
Line 1024... Line 1024...
1024
   
1024
   
Line 1043... Line 1043...
1043
;_m1        dw 0,0,0,0,0
1043
;_m1        dw 0,0,0,0,0
1044
;_m2        dw 0,0,0,0,0
1044
;_m2        dw 0,0,0,0,0
1045
;_m3        dw 0,0,0,0,0
1045
;_m3        dw 0,0,0,0,0
1046
;_m4        dw 0,0,0,0,0
1046
;_m4        dw 0,0,0,0,0
Line 1047... Line 1047...
1047
   
1047
   
Line 1048... Line 1048...
1048
header     db   'Vertical Refresh Rate v2.0 (C) 2003 TRANS',0
1048
title     db   'Vertical Refresh Rate v2.0 (C) 2003 TRANS',0
1049
   
1049
   
1050
_m1280x1024 db '1280x1024'
1050
_m1280x1024 db '1280x1024'
1051
_m1024x768  db '1024x768 '
1051
_m1024x768  db '1024x768 '