Subversion Repositories Kolibri OS

Rev

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

Rev 190 Rev 485
Line 13... Line 13...
13
    dd     0x300000                ; memory for app
13
    dd     0x300000                ; memory for app
14
    dd     0x300000                ; esp
14
    dd     0x300000                ; esp
15
    dd     temp_area , 0x0         ; I_Param , I_Icon
15
    dd     temp_area , 0x0         ; I_Param , I_Icon
Line 16... Line 16...
16
 
16
 
17
include    'lang.inc'
17
include    'lang.inc'
18
include    'macros.inc'
18
include    '..\..\..\macros.inc'
Line 19... Line 19...
19
;******************************************************************************
19
;******************************************************************************
Line 20... Line 20...
20
 
20
 
Line 25... Line 25...
25
   jne   .no_boot
25
   jne   .no_boot
26
   call  load_image
26
   call  load_image
27
   call  convert
27
   call  convert
28
   call  background
28
   call  background
29
   or    eax,-1
29
   or    eax,-1
30
   int   0x40
30
   mcall
31
 .no_boot:
31
 .no_boot:
Line 32... Line 32...
32
 
32
 
33
   cmp   byte [temp_area],0
33
   cmp   byte [temp_area],0
34
   jz    .no_param
34
   jz    .no_param
Line 50... Line 50...
50
   call  convert
50
   call  convert
Line 51... Line 51...
51
 
51
 
Line 52... Line 52...
52
 .no_param:
52
 .no_param:
53
 
53
 
Line 54... Line 54...
54
 
54
 
55
   mov  ecx,-1           ; get information about me
55
   or  ecx,-1           ; get information about me
Line 73... Line 73...
73
    call draw_window
73
    call draw_window
Line 74... Line 74...
74
 
74
 
Line 75... Line 75...
75
still:
75
still:
76
 
76
 
Line 77... Line 77...
77
    mov  eax,10                 ; wait here for event
77
    mov  eax,10                 ; wait here for event
78
    int  0x40
78
    mcall
79
 
79
 
80
        dec     eax
80
        dec     eax
Line 81... Line 81...
81
        jz      red
81
        jz      red
82
        dec     eax
82
        dec     eax
83
        jnz     button
83
        jnz     button
84
 
84
 
85
  key:                          ; key
85
  key:                          ; key
86
    mov  al,2
86
    mov  al,2
87
    int  0x40
87
    mcall
88
    mov  al,ah
88
    mov  al,ah
Line 100... Line 100...
100
        test    byte [status], 4
100
        test    byte [status], 4
101
        jz      draw_still
101
        jz      draw_still
102
        mov     al, 18
102
        mov     al, 18
103
        mov     ebx, 3
103
        mov     ebx, 3
104
        mov     ecx, [process]
104
        mov     ecx, [process]
105
        int     0x40
105
        mcall
106
        and     byte [status], not 4
106
        and     byte [status], not 4
107
        jmp     still
107
        jmp     still
Line 108... Line 108...
108
 
108
 
109
  button:                       ; button
109
  button:                       ; button
110
    mov  eax,17                 ; get id
110
    mov  eax,17                 ; get id
Line 111... Line 111...
111
    int  0x40
111
    mcall
112
 
112
 
Line 113... Line 113...
113
    cmp  ah,1                   ; button id=1 ?
113
    cmp  ah,1                   ; button id=1 ?
114
    jne  noclose
114
    jne  noclose
115
 
115
 
116
    mov  eax,-1                 ; close this program
116
    mov  eax,-1                 ; close this program
117
    int  0x40
117
    mcall
118
  noclose:
118
  noclose:
119
    cmp  ah,2
119
    cmp  ah,2
Line 124... Line 124...
124
        or      byte [status], 1
124
        or      byte [status], 1
125
    mov  eax,51
125
    mov  eax,51
126
    mov  ebx,1
126
    mov  ebx,1
127
    mov  ecx,thread1
127
    mov  ecx,thread1
128
    mov  edx,0x29fff0
128
    mov  edx,0x29fff0
129
    int  0x40
129
    mcall
130
    jmp  still
130
    jmp  still
131
  nofile:
131
  nofile:
132
    cmp  ah,3
132
    cmp  ah,3
133
    jne  noopen
133
    jne  noopen
Line 139... Line 139...
139
    mov ecx,dword [I_END+46]
139
    mov ecx,dword [I_END+46]
140
    add ebx,10*65536-15
140
    add ebx,10*65536-15
141
    add ecx,50*65536-55
141
    add ecx,50*65536-55
142
    mov edx,0xffffff
142
    mov edx,0xffffff
143
    mov eax,13
143
    mov eax,13
144
    int 0x40
144
    mcall
Line 145... Line 145...
145
 
145
 
Line 146... Line 146...
146
    call load_image
146
    call load_image
147
 
147
 
Line 161... Line 161...
161
        or      byte [status], 2
161
        or      byte [status], 2
162
    mov  eax,51
162
    mov  eax,51
163
    mov  ebx,1
163
    mov  ebx,1
164
    mov  ecx,thread2
164
    mov  ecx,thread2
165
    mov  edx,0x2afff0
165
    mov  edx,0x2afff0
166
    int  0x40
166
    mcall
167
    jmp  still
167
    jmp  still
168
  noinfo:
168
  noinfo:
Line 169... Line 169...
169
 
169
 
170
; “‘’€Ž‚ˆ’œ ”Ž
170
; “‘’€Ž‚ˆ’œ ”Ž
Line 176... Line 176...
176
        or      byte [status], 8
176
        or      byte [status], 8
177
    mov  eax,51
177
    mov  eax,51
178
    mov  ebx,1
178
    mov  ebx,1
179
    mov  ecx,thread3
179
    mov  ecx,thread3
180
    mov  edx,0x2bfff0
180
    mov  edx,0x2bfff0
181
    int  0x40
181
    mcall
182
    jmp  still
182
    jmp  still
183
    ;call background
183
    ;call background
Line 184... Line 184...
184
 
184
 
185
 getappinfo:
185
 getappinfo:
186
    mov  eax,9
186
    mov  eax,9
187
    mov  ebx,process_info
187
    mov  ebx,process_info
188
    int  0x40
188
    mcall
Line 189... Line 189...
189
    ret
189
    ret
190
 
190
 
191
 
191
 
192
load_image:
192
load_image:
193
        mov     eax, 70
193
        mov     eax, 70
194
        mov     ebx, fileinfo
194
        mov     ebx, fileinfo
195
        int     0x40
195
        mcall
196
    mov  eax,[I_END+18]
196
    mov  eax,[I_END+18]
197
    mov  ebx,[I_END+22]
197
    mov  ebx,[I_END+22]
Line 216... Line 216...
216
    mov  esi,ebx
216
    mov  esi,ebx
217
    mov  edx,eax
217
    mov  edx,eax
218
    mov  ecx,-1
218
    mov  ecx,-1
219
    mov  ebx,-1
219
    mov  ebx,-1
220
    mov  eax,67
220
    mov  eax,67
221
    int  40h
221
    mcall
222
@@:
222
@@:
223
    ret
223
    ret
Line 224... Line 224...
224
 
224
 
Line 233... Line 233...
233
        test    cx, cx
233
        test    cx, cx
234
        jns     @f
234
        jns     @f
235
        neg     cx
235
        neg     cx
236
@@:
236
@@:
237
    mov  edx,10*65536+50
237
    mov  edx,10*65536+50
238
    int  0x40
238
    mcall
239
  nodrawimage:
239
  nodrawimage:
240
    ret
240
    ret
Line 241... Line 241...
241
 
241
 
242
; “‘’€Ž‚ˆ’œ ”Ž
242
; “‘’€Ž‚ˆ’œ ”Ž
Line 245... Line 245...
245
    jne  @f
245
    jne  @f
246
    mov  eax,15
246
    mov  eax,15
247
    mov  ebx,1
247
    mov  ebx,1
248
    mov  ecx,[I_END+18] ; è¨à¨­ 
248
    mov  ecx,[I_END+18] ; è¨à¨­ 
249
    mov  edx,[I_END+22] ; ¢ëá®â 
249
    mov  edx,[I_END+22] ; ¢ëá®â 
250
    int  0x40
250
    mcall
Line 251... Line 251...
251
 
251
 
252
    mov  esi, ecx
252
    mov  esi, ecx
253
    imul esi, edx
253
    imul esi, edx
254
        lea     esi, [esi+esi*2]
254
        lea     esi, [esi+esi*2]
255
    mov  ebx,5
255
    mov  ebx,5
256
    mov  ecx,[soi]
256
    mov  ecx,[soi]
257
    xor  edx,edx
257
    xor  edx,edx
258
;;;    mov  esi, ;640*480*3
258
;;;    mov  esi, ;640*480*3
Line 259... Line 259...
259
    int  0x40
259
    mcall
260
 
260
 
261
    dec  ebx    ;tile/stretch
261
    dec  ebx    ;tile/stretch
Line 262... Line 262...
262
    mov  ecx,dword [bgrmode]
262
    mov  ecx,dword [bgrmode]
263
    int  0x40
263
    mcall
264
 
264
 
265
    dec  ebx
265
    dec  ebx
Line 266... Line 266...
266
    int  0x40
266
    mcall
267
   @@:
267
   @@:
Line 441... Line 441...
441
draw_window:
441
draw_window:
442
    or   [bWasDraw],1
442
    or   [bWasDraw],1
Line 443... Line 443...
443
 
443
 
444
    mov  eax,12                    ; function 12:tell os about windowdraw
444
    mov  eax,12                    ; function 12:tell os about windowdraw
445
    mov  ebx,1                     ; 1, start of draw
445
    mov  ebx,1                     ; 1, start of draw
Line 446... Line 446...
446
    int  0x40
446
    mcall
447
 
447
 
448
                                   ; DRAW WINDOW
448
                                   ; DRAW WINDOW
449
    xor  eax,eax                   ; function 0 : define and draw window
449
    xor  eax,eax                   ; function 0 : define and draw window
450
;    mov  ebx,350                   ; [x start] *65536 + [x size]
450
;    mov  ebx,350                   ; [x start] *65536 + [x size]
451
;    mov  ecx,400                   ; [y start] *65536 + [y size]
451
;    mov  ecx,400                   ; [y start] *65536 + [y size]
452
    mov  ebx,100*65536
452
    mov  ebx,100*65536
453
    mov  ecx,100*65536
453
    mov  ecx,100*65536
454
    add  ebx,[wnd_width]
454
    add  ebx,[wnd_width]
455
    add  ecx,[wnd_height]
455
    add  ecx,[wnd_height]
Line 456... Line 456...
456
    mov  edx,0x03ffffff            ; color of work area RRGGBB,8->color gl
456
    mov  edx,0x03ffffff            ; color of work area RRGGBB,8->color gl
457
    int  0x40
457
    mcall
458
 
458
 
459
    mov  eax,8
459
    mov  eax,8
460
    mov  ebx,10*65536+46
460
    mov  ebx,10*65536+46
461
    mov  ecx,25*65536+20
461
    mov  ecx,25*65536+20
462
    mov  edx,2
462
    mov  edx,2
463
    mov  esi,0x780078
463
    mov  esi,0x780078
464
  newbutton:
464
  newbutton:
465
    int  0x40
465
    mcall
466
    add  ebx,48*65536
466
    add  ebx,48*65536
Line 472... Line 472...
472
    mov  eax,4                     ; function 4 : write text to window
472
    mov  eax,4                     ; function 4 : write text to window
473
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
473
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
474
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
474
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
475
    mov  edx,labelt                ; pointer to text beginning
475
    mov  edx,labelt                ; pointer to text beginning
476
    mov  esi,12                    ; text length
476
    mov  esi,12                    ; text length
477
    int  0x40
477
    mcall
Line 478... Line 478...
478
 
478
 
479
    mov  ebx,14*65536+32
479
    mov  ebx,14*65536+32
480
    mov  edx,buttext
480
    mov  edx,buttext
481
    mov  esi,26
481
    mov  esi,26
Line 482... Line 482...
482
    int  0x40
482
    mcall
Line 483... Line 483...
483
 
483
 
484
    call drawimage
484
    call drawimage
485
 
485
 
Line 486... Line 486...
486
    mov  eax,12                    ; function 12:tell os about windowdraw
486
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 487... Line 487...
487
    mov  ebx,2                     ; 2, end of draw
487
    mov  ebx,2                     ; 2, end of draw
Line 505... Line 505...
505
     call draw_window1
505
     call draw_window1
Line 506... Line 506...
506
 
506
 
Line 507... Line 507...
507
still1:
507
still1:
508
 
508
 
Line 509... Line 509...
509
    mov  eax,10                 ; wait here for event
509
    mov  eax,10                 ; wait here for event
510
    int  0x40
510
    mcall
511
 
511
 
512
    cmp  eax,1                  ; redraw request ?
512
    cmp  eax,1                  ; redraw request ?
Line 517... Line 517...
517
    je   button1
517
    je   button1
Line 518... Line 518...
518
 
518
 
Line 519... Line 519...
519
    jmp  still1
519
    jmp  still1
520
 
520
 
521
  key1:                         ; key
521
  key1:                         ; key
522
    int  0x40
522
    mcall
523
    cmp  ah,179
523
    cmp  ah,179
524
    jne  noright
524
    jne  noright
525
    mov  eax,[pos]
525
    mov  eax,[pos]
Line 594... Line 594...
594
 
594
 
Line 595... Line 595...
595
    jmp  still1
595
    jmp  still1
596
 
596
 
597
  button1:                      ; button
597
  button1:                      ; button
Line 598... Line 598...
598
    mov  eax,17                 ; get id
598
    mov  eax,17                 ; get id
599
    int  0x40
599
    mcall
600
 
600
 
601
    cmp  ah,1                   ; button id=1 ?
601
    cmp  ah,1                   ; button id=1 ?
602
    jne  noclose1
602
    jne  noclose1
603
    jmp  enter1
603
    jmp  enter1
604
  close1:
604
  close1:
605
    bts  dword [status],2
605
    bts  dword [status],2
606
    btr  dword [status],0
606
    btr  dword [status],0
607
    mov  eax,-1                 ; close this program
607
    mov  eax,-1                 ; close this program
608
    int  0x40
608
    mcall
609
  noclose1:
609
  noclose1:
610
    cmp  ah,2
610
    cmp  ah,2
611
    jne  nosetcur
611
    jne  nosetcur
612
    mov  eax,37
612
    mov  eax,37
613
    mov  ebx,1
613
    mov  ebx,1
614
    int  0x40
614
    mcall
615
    shr  eax,16
615
    shr  eax,16
616
    sub  eax,21
616
    sub  eax,21
Line 643... Line 643...
643
draw_window1:
643
draw_window1:
Line 644... Line 644...
644
 
644
 
645
 
645
 
646
    mov  eax,12                    ; function 12:tell os about windowdraw
646
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 647... Line 647...
647
    mov  ebx,1                     ; 1, start of draw
647
    mov  ebx,1                     ; 1, start of draw
648
    int  0x40
648
    mcall
649
 
649
 
650
                                   ; DRAW WINDOW
650
                                   ; DRAW WINDOW
651
    xor  eax,eax                   ; function 0 : define and draw window
651
    xor  eax,eax                   ; function 0 : define and draw window
652
    mov  ebx,100*65536+300         ; [x start] *65536 + [x size]
652
    mov  ebx,100*65536+300         ; [x start] *65536 + [x size]
Line 653... Line 653...
653
    mov  ecx,100*65536+80          ; [y start] *65536 + [y size]
653
    mov  ecx,100*65536+80          ; [y start] *65536 + [y size]
654
    mov  edx,0x03780078            ; color of work area RRGGBB,8->color gl
654
    mov  edx,0x03780078            ; color of work area RRGGBB,8->color gl
655
    int  0x40
655
    mcall
656
 
656
 
657
                                   ; WINDOW LABEL
657
                                   ; WINDOW LABEL
658
    mov  eax,4                     ; function 4 : write text to window
658
    mov  eax,4                     ; function 4 : write text to window
659
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
659
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
Line 660... Line 660...
660
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
660
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
Line 661... Line 661...
661
    mov  edx,labelt1               ; pointer to text beginning
661
    mov  edx,labelt1               ; pointer to text beginning
662
    mov  esi,labelt1.size          ; text length
662
    mov  esi,labelt1.size          ; text length
663
    int  0x40
663
    mcall
Line 664... Line 664...
664
 
664
 
Line 665... Line 665...
665
    call drawstring
665
    call drawstring
666
 
666
 
667
    mov  eax,12                    ; function 12:tell os about windowdraw
667
    mov  eax,12                    ; function 12:tell os about windowdraw
668
    mov  ebx,2                     ; 2, end of draw
668
    mov  ebx,2                     ; 2, end of draw
669
    int  0x40
669
    mcall
670
 
670
 
671
    ret
671
    ret
Line 672... Line 672...
672
 
672
 
673
 drawstring:
673
 drawstring:
674
    pusha
674
    pusha
675
    mov  eax,8             ;invisible button
675
    mov  eax,8             ;invisible button
676
    mov  ebx,21*65536+258
676
    mov  ebx,21*65536+258
677
    mov  ecx,40*65536+15
677
    mov  ecx,40*65536+15
678
    mov  edx,0x60000002
678
    mov  edx,0x60000002
679
    int  0x40
679
    mcall
680
 
680
 
681
    mov  eax,13             ;bar
681
    mov  eax,13             ;bar
682
    mov  edx,0xe0e0e0
682
    mov  edx,0xe0e0e0
683
    int  0x40
683
    mcall
684
    push eax                ;cursor
684
    push eax                ;cursor
685
    mov  eax,6*65536
685
    mov  eax,6*65536
686
    mul  dword [pos]
686
    mul  dword [pos]
687
    add  eax,21*65536+6
687
    add  eax,21*65536+6
688
    mov  ebx,eax
688
    mov  ebx,eax
Line 689... Line 689...
689
    pop  eax
689
    pop  eax
690
    mov  edx,0x6a73d0
690
    mov  edx,0x6a73d0
Line 712... Line 712...
712
     call draw_window2
712
     call draw_window2
Line 713... Line 713...
713
 
713
 
Line 714... Line 714...
714
still2:
714
still2:
715
 
715
 
Line 716... Line 716...
716
    mov  eax,10                 ; wait here for event
716
    mov  eax,10                 ; wait here for event
717
    int  0x40
717
    mcall
718
 
718
 
719
    cmp  eax,1                  ; redraw request ?
719
    cmp  eax,1                  ; redraw request ?
Line 725... Line 725...
725
 
725
 
Line 726... Line 726...
726
    jmp  still2
726
    jmp  still2
727
 
727
 
728
  button2:                       ; button
728
  button2:                       ; button
Line 729... Line 729...
729
    mov  eax,17                 ; get id
729
    mov  eax,17                 ; get id
730
    int  0x40
730
    mcall
731
 
731
 
732
    cmp  ah,1                   ; button id=1 ?
732
    cmp  ah,1                   ; button id=1 ?
733
    jne  noclose2
733
    jne  noclose2
734
  close2:
734
  close2:
735
    btr dword [status],1
735
    btr dword [status],1
736
    bts dword [status],2
736
    bts dword [status],2
Line 737... Line 737...
737
    mov  eax,-1                 ; close this program
737
    mov  eax,-1                 ; close this program
Line 751... Line 751...
751
draw_window2:
751
draw_window2:
Line 752... Line 752...
752
 
752
 
753
 
753
 
754
    mov  eax,12                    ; function 12:tell os about windowdraw
754
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 755... Line 755...
755
    mov  ebx,1                     ; 1, start of draw
755
    mov  ebx,1                     ; 1, start of draw
756
    int  0x40
756
    mcall
757
 
757
 
758
                                   ; DRAW WINDOW
758
                                   ; DRAW WINDOW
759
    xor  eax,eax                   ; function 0 : define and draw window
759
    xor  eax,eax                   ; function 0 : define and draw window
760
    mov  ebx,100*65536+330         ; [x start] *65536 + [x size]
760
    mov  ebx,100*65536+330         ; [x start] *65536 + [x size]
Line 761... Line 761...
761
    mov  ecx,100*65536+90          ; [y start] *65536 + [y size]
761
    mov  ecx,100*65536+90          ; [y start] *65536 + [y size]
762
    mov  edx,0x03780078            ; color of work area RRGGBB,8->color gl
762
    mov  edx,0x03780078            ; color of work area RRGGBB,8->color gl
763
    int  0x40
763
    mcall
764
 
764
 
765
                                   ; WINDOW LABEL
765
                                   ; WINDOW LABEL
766
    mov  eax,4                     ; function 4 : write text to window
766
    mov  eax,4                     ; function 4 : write text to window
767
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
767
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
Line 768... Line 768...
768
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
768
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
769
    mov  edx,labelt2               ; pointer to text beginning
769
    mov  edx,labelt2               ; pointer to text beginning
770
    mov  esi,labelt2.size          ; text length
770
    mov  esi,labelt2.size          ; text length
771
    int  0x40
771
    mcall
772
 
772
 
773
    mov  ebx,10*65536+30
773
    mov  ebx,10*65536+30
774
    mov  edx,string
774
    mov  edx,string
775
    mov  esi,43
775
    mov  esi,43
776
    int  0x40
776
    mcall
777
    mov  edx,fitext
777
    mov  edx,fitext
778
    mov  esi,14
778
    mov  esi,14
779
    add  ebx,70*65536+10
779
    add  ebx,70*65536+10
780
 followstring:
780
 followstring:
781
    int  0x40
781
    mcall
782
    add  ebx,10
782
    add  ebx,10
783
    add  edx,esi
783
    add  edx,esi
784
    cmp  ebx,80*65536+70
784
    cmp  ebx,80*65536+70
785
    jbe  followstring
785
    jbe  followstring
786
    mov  eax,47
786
    mov  eax,47
787
    mov  edx,200*65536+40
787
    mov  edx,200*65536+40
788
    mov  esi,ecx
788
    mov  esi,ecx
789
    mov  ecx, [I_END+2]
789
    mov  ecx, [I_END+2]
790
    call digitcorrect
790
    call digitcorrect
791
    int  0x40
791
    mcall
792
    add  edx,10
792
    add  edx,10
793
    mov  ecx, [I_END+18]
793
    mov  ecx, [I_END+18]
794
    call digitcorrect
794
    call digitcorrect
795
    int  0x40
795
    mcall
796
    add  edx,10
796
    add  edx,10
797
    mov  ecx, [I_END+22]
797
    mov  ecx, [I_END+22]
798
    call digitcorrect
798
    call digitcorrect
Line 799... Line 799...
799
    int  0x40
799
    mcall
800
    add  edx,10
800
    add  edx,10
801
    movzx ecx,word [I_END+28]
801
    movzx ecx,word [I_END+28]
Line 802... Line 802...
802
    call digitcorrect
802
    call digitcorrect
Line 803... Line 803...
803
    int  0x40
803
    mcall
804
 
804
 
Line 859... Line 859...
859
     call draw_window3
859
     call draw_window3
Line 860... Line 860...
860
 
860
 
Line 861... Line 861...
861
still3:
861
still3:
862
 
862
 
Line 863... Line 863...
863
    mov  eax,10                 ; wait here for event
863
    mov  eax,10                 ; wait here for event
864
    int  0x40
864
    mcall
865
 
865
 
866
    cmp  eax,1                  ; redraw request ?
866
    cmp  eax,1                  ; redraw request ?
Line 871... Line 871...
871
    je   button3
871
    je   button3
Line 872... Line 872...
872
 
872
 
Line 873... Line 873...
873
    jmp  still3
873
    jmp  still3
874
 
874
 
875
  key3:
875
  key3:
876
    int  0x40
876
    mcall
877
    cmp  ah,27
877
    cmp  ah,27
878
    je   close3
878
    je   close3
879
    cmp  ah,13
879
    cmp  ah,13
Line 895... Line 895...
895
    jmp  flagcont
895
    jmp  flagcont
Line 896... Line 896...
896
 
896
 
897
 
897
 
898
  button3:                       ; button
898
  button3:                       ; button
Line 899... Line 899...
899
    mov  eax,17                 ; get id
899
    mov  eax,17                 ; get id
900
    int  0x40
900
    mcall
901
 
901
 
902
    cmp  ah,1                   ; button id=1 ?
902
    cmp  ah,1                   ; button id=1 ?
903
    jne  noclose3
903
    jne  noclose3
904
  close3:
904
  close3:
905
    btr dword [status],3
905
    btr dword [status],3
906
    bts dword [status],2
906
    bts dword [status],2
907
    mov  eax,-1                 ; close this program
907
    mov  eax,-1                 ; close this program
908
    int  0x40
908
    mcall
909
  noclose3:
909
  noclose3:
910
    cmp  ah,4
910
    cmp  ah,4
Line 934... Line 934...
934
draw_window3:
934
draw_window3:
Line 935... Line 935...
935
 
935
 
936
 
936
 
937
    mov  eax,12                    ; function 12:tell os about windowdraw
937
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 938... Line 938...
938
    mov  ebx,1                     ; 1, start of draw
938
    mov  ebx,1                     ; 1, start of draw
939
    int  0x40
939
    mcall
940
 
940
 
941
                                   ; DRAW WINDOW
941
                                   ; DRAW WINDOW
942
    xor  eax,eax                   ; function 0 : define and draw window
942
    xor  eax,eax                   ; function 0 : define and draw window
943
    mov  ebx,100*65536+200         ; [x start] *65536 + [x size]
943
    mov  ebx,100*65536+200         ; [x start] *65536 + [x size]
Line 944... Line 944...
944
    mov  ecx,100*65536+100         ; [y start] *65536 + [y size]
944
    mov  ecx,100*65536+100         ; [y start] *65536 + [y size]
945
    mov  edx,0x03780078            ; color of work area RRGGBB,8->color gl
945
    mov  edx,0x03780078            ; color of work area RRGGBB,8->color gl
946
    int  0x40
946
    mcall
947
 
947
 
948
    mov  eax,8
948
    mov  eax,8
949
    mov  ebx,70*65536+40
949
    mov  ebx,70*65536+40
Line 950... Line 950...
950
    mov  ecx,70*65536+20
950
    mov  ecx,70*65536+20
951
    mov  edx,4
951
    mov  edx,4
952
    mov  esi,0xac0000
952
    mov  esi,0xac0000
953
    int  0x40
953
    mcall
954
 
954
 
955
                                   ; WINDOW LABEL
955
                                   ; WINDOW LABEL
956
    mov  eax,4                     ; function 4 : write text to window
956
    mov  eax,4                     ; function 4 : write text to window
957
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
957
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
958
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
958
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
959
    mov  edx,labelt3               ; pointer to text beginning
959
    mov  edx,labelt3               ; pointer to text beginning
960
    mov  esi,labelt3.size          ; text length
960
    mov  esi,labelt3.size          ; text length
961
    int  0x40
961
    mcall
962
    add  ebx,38*65536+20
962
    add  ebx,38*65536+20
963
    mov  ecx,0xddeeff
963
    mov  ecx,0xddeeff
964
    mov  edx, bgrdtext
964
    mov  edx, bgrdtext
965
    mov  esi, bgrdtext.size
965
    mov  esi, bgrdtext.size
966
    int  0x40
966
    mcall
967
    add  ebx,40*65536+15
967
    add  ebx,40*65536+15
968
    mov  edx, tiled
968
    mov  edx, tiled
969
    mov  esi, tiled.size
969
    mov  esi, tiled.size
970
    int  0x40
970
    mcall
971
    add  ebx,15
971
    add  ebx,15
972
    mov  edx, stretch
972
    mov  edx, stretch
973
    mov  esi, stretch.size ;7
973
    mov  esi, stretch.size ;7
Line 974... Line 974...
974
    int  0x40
974
    mcall
Line 975... Line 975...
975
    add  ebx,18
975
    add  ebx,18
976
    mov  edx, ok_btn
976
    mov  edx, ok_btn
977
    mov  esi, ok_btn.size ;2
977
    mov  esi, ok_btn.size ;2
Line 978... Line 978...
978
    int  0x40
978
    mcall
Line 979... Line 979...
979
 
979
 
980
    call drawflags
980
    call drawflags
981
 
981
 
982
    mov  eax,12                    ; function 12:tell os about windowdraw
982
    mov  eax,12                    ; function 12:tell os about windowdraw
983
    mov  ebx,2                     ; 2, end of draw
983
    mov  ebx,2                     ; 2, end of draw
984
    int  0x40
984
    mcall
985
 
985
 
986
    ret
986
    ret
987
 
987
 
988
 drawflags:
988
 drawflags:
989
    mov  eax,8
989
    mov  eax,8
990
    mov  ebx,70*65536+10
990
    mov  ebx,70*65536+10
991
    mov  ecx,40*65536+10
991
    mov  ecx,40*65536+10
992
    mov  edx,2
992
    mov  edx,2
993
    mov  esi,0xe0e0e0
993
    mov  esi,0xe0e0e0
994
    int  0x40
994
    mcall
995
    add  ecx,15*65536
995
    add  ecx,15*65536
996
    inc  edx
996
    inc  edx
997
    int  0x40
997
    mcall
998
    mov  eax,4
998
    mov  eax,4
999
    mov  ebx,73*65536+42
999
    mov  ebx,73*65536+42
Line 1000... Line 1000...
1000
    xor  ecx,ecx
1000
    xor  ecx,ecx
1001
    mov  edx,vflag
1001
    mov  edx,vflag