Subversion Repositories Kolibri OS

Rev

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

Rev 131 Rev 485
Line 21... Line 21...
21
 dd 0x80000     ; memory for app
21
 dd 0x80000     ; memory for app
22
 dd 0x80000     ; esp
22
 dd 0x80000     ; esp
23
 dd 0x0 , 0x0   ; I_Param , I_Icon
23
 dd 0x0 , 0x0   ; I_Param , I_Icon
Line 24... Line 24...
24
 
24
 
25
 include 'lang.inc'
25
 include 'lang.inc'
Line 26... Line 26...
26
 include 'macros.inc'
26
 include '..\..\..\macros.inc'
Line 27... Line 27...
27
 
27
 
28
 
28
 
29
START: ; start of execution
29
START: ; start of execution
30
 
30
 
31
  mov  eax,40
31
  mov  eax,40
-
 
32
  mov  ebx,100111b ;event mouse
-
 
33
  mcall
32
  mov  ebx,100111b ;event mouse
34
  mov  dword [process_info+42],540
Line 33... Line 35...
33
  int  0x40
35
  mov  dword [process_info+46],414
34
  mov  dword [process_info+42],540
36
 
35
  mov  dword [process_info+46],414
37
red:
36
  call draw_window
38
  call draw_window
37
 
39
 
38
still:
40
still:
39
  mov  eax,10  ; wait here for event
41
  mov  eax,10  ; wait here for event
40
  int  0x40
42
  mcall
41
  dec  al      ; redraw request ?
43
  dec  al      ; redraw request ?
42
  je   red
44
  je   red
43
  dec  al      ; key in buffer ?
45
  dec  al      ; key in buffer ?
44
  je   key
46
  je   key
45
  dec  al      ; button in buffer ?
47
  dec  al      ; button in buffer ?
46
  je   button
48
  je   button
47
               ; mouse event received
49
               ; mouse event received
48
 mouse:
50
 mouse:
49
  mov  eax,37
51
  mov  eax,37
50
  mov  ebx,2
52
  mov  ebx,2
51
  int  0x40
53
  mcall
Line 52... Line -...
52
  or   eax,eax
-
 
53
  jz   still
-
 
54
  cmp  [menu_opened],1
-
 
Line 55... Line 54...
55
  jne  still
54
  or   eax,eax
56
  mov  [menu_opened],0
55
  jz   still
57
 
56
  cmp  [menu_opened],1
58
 red:          ; redraw
57
  jne  still
59
  call redraw_window
58
  mov  [menu_opened],0
60
  jmp  still
59
 
61
 
60
 
62
 key:          ; key
61
 key:          ; key
Line 228... Line 227...
228
  shr  edi,0x10
227
  shr  edi,0x10
229
  xor  esi,esi
228
  xor  esi,esi
230
  or   edx,edi
229
  or   edx,edi
231
  mov  eax,47
230
  mov  eax,47
232
  add  edx,8
231
  add  edx,8
233
  int  0x40
232
  mcall
234
  call redraw_window
233
  call redraw_window
235
  jmp  still
234
  jmp  still
Line 236... Line 235...
236
 
235
 
237
 button:   ; button
236
 button:   ; button
238
  mov  eax,17 ; get id
237
  mov  eax,17 ; get id
239
  int  0x40
238
  mcall
240
  dec  ah  ;close programm button
239
  dec  ah  ;close programm button
241
  jne  @f
240
  jne  @f
242
 close:
241
 close:
243
  mov  eax,-1 ; close this program
242
  mov  eax,-1 ; close this program
244
  int  0x40
243
  mcall
245
 @@:
244
 @@:
246
  dec  ah
245
  dec  ah
247
  jne  @f
246
  jne  @f
248
  call redraw_window
247
  call redraw_window
Line 381... Line 380...
381
  mov  eax,6
380
  mov  eax,6
382
  mov  ebx,filename
381
  mov  ebx,filename
383
  xor  ecx,ecx
382
  xor  ecx,ecx
384
  or   edx,-1
383
  or   edx,-1
385
  mov  esi,0x10000
384
  mov  esi,0x10000
386
  int  0x40
385
  mcall
387
  inc  [o_s_flag]
386
  inc  [o_s_flag]
388
  mov  [sizefile],eax
387
  mov  [sizefile],eax
389
  jmp  end_Go
388
  jmp  end_Go
390
 _savefile:
389
 _savefile:
391
  ;save file
390
  ;save file
Line 393... Line 392...
393
  mov  ecx,0x10000
392
  mov  ecx,0x10000
394
  mov  edx,[sizefile]
393
  mov  edx,[sizefile]
395
  xor  esi,esi
394
  xor  esi,esi
396
  dec  edx
395
  dec  edx
397
  mov  eax,33
396
  mov  eax,33
398
  int  0x40
397
  mcall
399
 end_Go:
398
 end_Go:
400
  call CtrlHome
399
  call CtrlHome
401
  jmp  still
400
  jmp  still
Line 402... Line 401...
402
 
401
 
Line 644... Line 643...
644
  mov  edx,[end_str]
643
  mov  edx,[end_str]
645
  push eax
644
  push eax
646
  sub  edx,0x10
645
  sub  edx,0x10
647
  mov  esi,0x10
646
  mov  esi,0x10
648
  mov  eax,4
647
  mov  eax,4
649
  int  0x40
648
  mcall
650
  pop  eax
649
  pop  eax
651
  pop  ecx
650
  pop  ecx
652
  loop @b
651
  loop @b
653
 no_out:
652
 no_out:
654
  popad
653
  popad
Line 666... Line 665...
666
  sub  ecx,0x10000  ;­®à¬ «¨§ æ¨ï  ¤à¥á 
665
  sub  ecx,0x10000  ;­®à¬ «¨§ æ¨ï  ¤à¥á 
667
  mov  edx,0x80000  ;­ ç «® ¯® •
666
  mov  edx,0x80000  ;­ ç «® ¯® •
668
  add  edx,[esp+0x24]  ;­ ç «® ¯® “
667
  add  edx,[esp+0x24]  ;­ ç «® ¯® “
669
  mov  esi,0x00ffffff ;梥â
668
  mov  esi,0x00ffffff ;梥â
670
  mov  eax,47 ;¢ë¢¥á⨠ç¨á«®
669
  mov  eax,47 ;¢ë¢¥á⨠ç¨á«®
671
  int  0x40
670
  mcall
672
  add  edx,0x600000   ;0x40 - 8chars + 0x20 - space
671
  add  edx,0x600000   ;0x40 - 8chars + 0x20 - space
673
  mov  ebx,0x20100    ;2 æ¨äàë, 16-à¨ç­ë¥, ç¨á«® ¢ ecx
672
  mov  ebx,0x20100    ;2 æ¨äàë, 16-à¨ç­ë¥, ç¨á«® ¢ ecx
674
 @@:
673
 @@:
675
  mov  ecx,[ebp+edi]   ;ç¨á«® ¢ ecx
674
  mov  ecx,[ebp+edi]   ;ç¨á«® ¢ ecx
676
  inc  edi
675
  inc  edi
677
  and  ecx,0xff
676
  and  ecx,0xff
678
  cmp  edi,0x11
677
  cmp  edi,0x11
679
  jz   endstr
678
  jz   endstr
680
  int  0x40
679
  mcall
681
  add  edx,0x100000
680
  add  edx,0x100000
682
  jmp  @b
681
  jmp  @b
683
 endstr:
682
 endstr:
684
  dec  edi
683
  dec  edi
685
  add  ebp,edi
684
  add  ebp,edi
Line 693... Line 692...
693
  pushad
692
  pushad
694
  mov  ebx,[x_cursor]
693
  mov  ebx,[x_cursor]
695
  mov  ecx,[esp+0x24]
694
  mov  ecx,[esp+0x24]
696
  mov  edx,[color]
695
  mov  edx,[color]
697
  mov  eax,13
696
  mov  eax,13
698
  int  0x40
697
  mcall
699
  movzx edi,[o_s_flag]
698
  movzx edi,[o_s_flag]
700
  and  edi,8
699
  and  edi,8
701
  jnz  @f
700
  jnz  @f
702
  add  ebx,[text_cursor]
701
  add  ebx,[text_cursor]
703
  int  0x40
702
  mcall
704
 @@:
703
 @@:
705
  popad
704
  popad
706
  ret  4
705
  ret  4
Line 707... Line 706...
707
 
706
 
Line 729... Line 728...
729
  add  ebx,ecx ;full base text
728
  add  ebx,ecx ;full base text
730
  mov  edx,m_open
729
  mov  edx,m_open
731
  mov  ecx,[sc.work_button_text]
730
  mov  ecx,[sc.work_button_text]
732
  or   ecx,0x10000000
731
  or   ecx,0x10000000
733
  sub  eax,4
732
  sub  eax,4
734
  int  0x40
733
  mcall
735
  add  ebx,0x0c ;next full base text
734
  add  ebx,0x0c ;next full base text
736
  add  edx,4 ;next string
735
  add  edx,4 ;next string
737
  int  0x40
736
  mcall
738
  add  ebx,0x0c
737
  add  ebx,0x0c
739
  add  edx,4
738
  add  edx,4
740
  int  0x40
739
  mcall
741
  ret
740
  ret
Line 742... Line 741...
742
 
741
 
743
menucoding:
742
menucoding:
744
  mov  [menu_opened],1
743
  mov  [menu_opened],1
Line 757... Line 756...
757
  mov  edx,m_win2dos
756
  mov  edx,m_win2dos
758
  mov  ecx,[sc.work_button_text]
757
  mov  ecx,[sc.work_button_text]
759
  or   ecx,0x10000000
758
  or   ecx,0x10000000
760
  sub  eax,4
759
  sub  eax,4
761
 @@:
760
 @@:
762
  int  0x40
761
  mcall
763
  add  ebx,0x0c
762
  add  ebx,0x0c
764
  add  edx,8 ;next string
763
  add  edx,8 ;next string
765
  dec  edi
764
  dec  edi
766
  jnz  @b
765
  jnz  @b
767
  ret
766
  ret
Line 780... Line 779...
780
  add  ebx,ecx
779
  add  ebx,ecx
781
  mov  edx,m_help
780
  mov  edx,m_help
782
  mov  ecx,[sc.work_button_text]
781
  mov  ecx,[sc.work_button_text]
783
  or   ecx,0x10000000
782
  or   ecx,0x10000000
784
  sub  eax,4
783
  sub  eax,4
785
  int  0x40
784
  mcall
786
  add  ebx,0x0c
785
  add  ebx,0x0c
787
  inc  esi ;add lebgth output text
786
  inc  esi ;add lebgth output text
788
  add  edx,4
787
  add  edx,4
789
  int  0x40
788
  mcall
790
  ret
789
  ret
Line 791... Line 790...
791
 
790
 
792
f1:;uses for drawing low-level menu buttons
791
f1:;uses for drawing low-level menu buttons
793
  ;counter buttons get into
792
  ;counter buttons get into
Line 796... Line 795...
796
  mov  esi,[sc.work_button] ;color buttons
795
  mov  esi,[sc.work_button] ;color buttons
797
  mov  eax,8
796
  mov  eax,8
798
  push ecx                  ;for output text
797
  push ecx                  ;for output text
799
 @@:
798
 @@:
800
  add  ecx,0xc0000
799
  add  ecx,0xc0000
801
  int  0x40
800
  mcall
802
  inc  edx ;id
801
  inc  edx ;id
803
  dec  edi ;counter
802
  dec  edi ;counter
804
  jnz  @b
803
  jnz  @b
805
  pop  ecx ;for output text
804
  pop  ecx ;for output text
806
  ret
805
  ret
Line 817... Line 816...
817
  mov  ecx,[esp+0x24]
816
  mov  ecx,[esp+0x24]
818
  mov  ebx,0x80100
817
  mov  ebx,0x80100
819
  mov  edx,0x10000a0
818
  mov  edx,0x10000a0
820
  mov  eax,47
819
  mov  eax,47
821
  mov  esi,0x00ffffff
820
  mov  esi,0x00ffffff
822
  int  0x40
821
  mcall
823
  popad
822
  popad
824
  ret  4
823
  ret  4
Line 825... Line 824...
825
 
824
 
826
;   *********************************************
825
;   *********************************************
Line 831... Line 830...
831
  pushad
830
  pushad
832
  mov  eax,48
831
  mov  eax,48
833
  mov  ebx,3
832
  mov  ebx,3
834
  mov  ecx,sc
833
  mov  ecx,sc
835
  mov  edx,sizeof.system_colors
834
  mov  edx,sizeof.system_colors
836
  int  0x40
835
  mcall
Line 837... Line 836...
837
 
836
 
838
  mov  eax,12                 ; function 12:tell os about windowdraw
837
  mov  eax,12                 ; function 12:tell os about windowdraw
839
  mov  ebx,1                  ; 1, start of draw
838
  mov  ebx,1                  ; 1, start of draw
840
  int  0x40
839
  mcall
841
     ; DRAW WINDOW
840
     ; DRAW WINDOW
842
  mov  eax,0                  ; function 0 : define and draw window
841
  mov  eax,0                  ; function 0 : define and draw window
843
                              ; [x start] *65536 + [x size]
842
                              ; [x start] *65536 + [x size]
844
  mov  ebx,[process_info+42]
843
  mov  ebx,[process_info+42]
845
                              ; [y start] *65536 + [y size]
844
                              ; [y start] *65536 + [y size]
846
  mov  ecx,[process_info+46]
845
  mov  ecx,[process_info+46]
847
  mov  edx,0x03000000         ; color of work area RRGGBB,8->color gl
846
  mov  edx,0x03000000         ; color of work area RRGGBB,8->color gl
848
  int  0x40
847
  mcall
849
     ; WINDOW LABEL
848
     ; WINDOW LABEL
850
  mov  eax,4                  ; function 4 : write text to window
849
  mov  eax,4                  ; function 4 : write text to window
851
  mov  ebx,8*65536+8          ; [x start] *65536 + [y start]
850
  mov  ebx,8*65536+8          ; [x start] *65536 + [y start]
852
  mov  ecx,[sc.grab_text]
851
  mov  ecx,[sc.grab_text]
853
  or   ecx,0x10000000         ; font 1 & color ( 0xF0RRGGBB )
852
  or   ecx,0x10000000         ; font 1 & color ( 0xF0RRGGBB )
854
  mov  edx,labelt             ; pointer to text beginning
853
  mov  edx,labelt             ; pointer to text beginning
855
  mov  esi,labellen-labelt    ; text length
854
  mov  esi,labellen-labelt    ; text length
856
  int  0x40
855
  mcall
857
    ;check for only header window output
856
    ;check for only header window output
858
  cmp  dword [process_info+46],25
857
  cmp  dword [process_info+46],25
Line 859... Line 858...
859
  jle  minimaze_view
858
  jle  minimaze_view
Line 871... Line 870...
871
  sub  ecx,edi ;y-base menu area
870
  sub  ecx,edi ;y-base menu area
872
  mov  edx,[sc.work_graph]
871
  mov  edx,[sc.work_graph]
873
  shl  ecx,0x10
872
  shl  ecx,0x10
874
  mov  eax,13
873
  mov  eax,13
875
  add  ecx,0x10
874
  add  ecx,0x10
876
  int  0x40
875
  mcall
877
     ;MENU BUTTONS
876
     ;MENU BUTTONS
878
  ;now in hi-half ecx register begin Y-coord. menu area
877
  ;now in hi-half ecx register begin Y-coord. menu area
879
  ;in hi-half ebx begin X-coord.
878
  ;in hi-half ebx begin X-coord.
880
  ;menu 'File'
879
  ;menu 'File'
881
  mov  esi,edx ;color
880
  mov  esi,edx ;color
Line 886... Line 885...
886
  mov  edx,2 ;menu 'File' id = 2
885
  mov  edx,2 ;menu 'File' id = 2
887
  mov  [y_menu],ecx ;for low-level menus func.
886
  mov  [y_menu],ecx ;for low-level menus func.
888
  mov  [xf_menu],ebx;for low-level menus func.
887
  mov  [xf_menu],ebx;for low-level menus func.
889
  mov  eax,8
888
  mov  eax,8
890
  push ebx ;for output buttons texts
889
  push ebx ;for output buttons texts
891
  int  0x40
890
  mcall
892
  ;registers is't change
891
  ;registers is't change
893
  ;menu 'Coding'
892
  ;menu 'Coding'
894
  add  ebx,0x290018 ;80x12
893
  add  ebx,0x290018 ;80x12
895
  inc  edx ;menu 'coding' id = 3
894
  inc  edx ;menu 'coding' id = 3
896
  mov  [xe_menu],ebx;for low-level menus func.
895
  mov  [xe_menu],ebx;for low-level menus func.
897
  int  0x40
896
  mcall
898
  ;menu 'Help'
897
  ;menu 'Help'
899
  add  ebx,0x40ffe8 ;+0x280000 - 0x28, 40x12
898
  add  ebx,0x40ffe8 ;+0x280000 - 0x28, 40x12
900
  inc  edx ;menu 'Help' id = 4
899
  inc  edx ;menu 'Help' id = 4
901
  mov  [xh_menu],ebx;for low-level menus func.
900
  mov  [xh_menu],ebx;for low-level menus func.
902
  int  0x40
901
  mcall
903
     ;MENU BUTTONS TEXTS
902
     ;MENU BUTTONS TEXTS
904
  ;'File'
903
  ;'File'
905
  pop  ebx
904
  pop  ebx
906
  shr  ecx,0x10
905
  shr  ecx,0x10
907
  and  ebx,0xffff0000
906
  and  ebx,0xffff0000
Line 912... Line 911...
912
  add  ebx,ecx                   ; [x start] *65536 + [y start]
911
  add  ebx,ecx                   ; [x start] *65536 + [y start]
913
  mov  esi,4
912
  mov  esi,4
914
  mov  ecx,[sc.work_button_text]
913
  mov  ecx,[sc.work_button_text]
915
  or   ecx,0x10000000            ; font 1 & color ( 0xF0RRGGBB )
914
  or   ecx,0x10000000            ; font 1 & color ( 0xF0RRGGBB )
916
  push esi                       ;for 'Help' menu text
915
  push esi                       ;for 'Help' menu text
917
  int  0x40
916
  mcall
918
  ;'coding'
917
  ;'coding'
919
  ;registers is't change
918
  ;registers is't change
920
  add  ebx,0x2d0000
919
  add  ebx,0x2d0000
921
  ;mov  esi,6
920
  ;mov  esi,6
922
  add  esi,2
921
  add  esi,2
923
;  mov  edx,e_menu
922
;  mov  edx,e_menu
924
  add  edx,4
923
  add  edx,4
925
  int  0x40
924
  mcall
926
  ;'Help'
925
  ;'Help'
927
  add  ebx,0x3b0000
926
  add  ebx,0x3b0000
928
;   mov  esi,4
927
;   mov  esi,4
929
  pop  esi
928
  pop  esi
930
;  mov  edx,h_menu
929
;  mov  edx,h_menu
931
  add  edx,6
930
  add  edx,6
932
  int  0x40
931
  mcall
933
 ;LOW_LEVEL MENU
932
 ;LOW_LEVEL MENU
934
  ;for every hi-level menu exists one procedure
933
  ;for every hi-level menu exists one procedure
935
  ;in begin programm they are not calls,
934
  ;in begin programm they are not calls,
936
  ;but when user click on one item hi-level menu
935
  ;but when user click on one item hi-level menu
937
  ;or press hot keys, call one func. and after
936
  ;or press hot keys, call one func. and after
Line 949... Line 948...
949
  sub  ecx,24
948
  sub  ecx,24
950
  mov  edx,[sc.work_graph]
949
  mov  edx,[sc.work_graph]
951
  shl  ecx,16              ;y start
950
  shl  ecx,16              ;y start
952
  mov  eax,13
951
  mov  eax,13
953
  add  ecx,20
952
  add  ecx,20
954
  int  0x40
953
  mcall
Line 955... Line 954...
955
 
954
 
956
;filename input area
955
;filename input area
957
;  mov  ecx,[process_info+46]
956
;  mov  ecx,[process_info+46]
958
  pop  ecx
957
  pop  ecx
Line 964... Line 963...
964
  mov  [y_filename_area],ecx
963
  mov  [y_filename_area],ecx
965
  dec  edx
964
  dec  edx
966
  add  ecx,16
965
  add  ecx,16
967
  mov  eax,13
966
  mov  eax,13
968
  push ecx ;for button 'Go'
967
  push ecx ;for button 'Go'
969
  int  0x40
968
  mcall
Line 970... Line 969...
970
 
969
 
971
;button 'Go', press in case open/save if filename input complete
970
;button 'Go', press in case open/save if filename input complete
972
  ;button size = 24x16
971
  ;button size = 24x16
973
  mov  eax,8
972
  mov  eax,8
974
  pop  ecx ;y-base+y-size
973
  pop  ecx ;y-base+y-size
975
  mov  ebx,0x00680018;x-base+x-size
974
  mov  ebx,0x00680018;x-base+x-size
976
  dec  ecx
975
  dec  ecx
977
  mov  edx,0xff ;id
976
  mov  edx,0xff ;id
978
  mov  esi,[sc.work_button]
977
  mov  esi,[sc.work_button]
979
  int  0x40
978
  mcall
980
  shr  ecx,0x10
979
  shr  ecx,0x10
981
  and  ebx,0xffff0000
980
  and  ebx,0xffff0000
982
  add  ecx,0x50004
981
  add  ecx,0x50004
983
  mov  edx,b_go
982
  mov  edx,b_go
984
  add  ebx,ecx
983
  add  ebx,ecx
985
  mov  esi,2
984
  mov  esi,2
986
  mov  ecx,[sc.work_button_text]
985
  mov  ecx,[sc.work_button_text]
987
  or   ecx,0x10000000
986
  or   ecx,0x10000000
988
  sub  eax,4
987
  sub  eax,4
Line 989... Line 988...
989
  int  0x40
988
  mcall
990
 
989
 
991
;where output cursor?
990
;where output cursor?
992
  mov  al,[o_s_flag]
991
  mov  al,[o_s_flag]
Line 1009... Line 1008...
1009
  add  eax,4
1008
  add  eax,4
1010
  xor  ecx,ecx
1009
  xor  ecx,ecx
1011
  add  ebx,eax
1010
  add  ebx,eax
1012
  movzx esi,[name_l]
1011
  movzx esi,[name_l]
1013
  mov  eax,4
1012
  mov  eax,4
1014
  int  0x40
1013
  mcall
Line 1015... Line 1014...
1015
 
1014
 
1016
;info strings
1015
;info strings
1017
     ; sizefile text
1016
     ; sizefile text
1018
;    mov  eax,[process_info+46]
1017
;    mov  eax,[process_info+46]
Line 1022... Line 1021...
1022
  xor  ecx,ecx
1021
  xor  ecx,ecx
1023
  add  ebx,eax
1022
  add  ebx,eax
1024
  mov  edx,sizestr   ; pointer to text beginning
1023
  mov  edx,sizestr   ; pointer to text beginning
1025
  mov  eax,4
1024
  mov  eax,4
1026
  mov  esi,5
1025
  mov  esi,5
1027
  int  0x40
1026
  mcall
1028
  add  ebx,0x00530000
1027
  add  ebx,0x00530000
1029
  inc  esi
1028
  inc  esi
1030
;    mov  edx,offst
1029
;    mov  edx,offst
1031
  add  edx,5
1030
  add  edx,5
1032
  inc  esi
1031
  inc  esi
1033
  int  0x40
1032
  mcall
1034
    ;sizefile
1033
    ;sizefile
1035
  mov  ecx,[sizefile]
1034
  mov  ecx,[sizefile]
1036
  mov  edx,ebx
1035
  mov  edx,ebx
1037
  xor  esi,esi
1036
  xor  esi,esi
1038
  sub  edx,0x00350000
1037
  sub  edx,0x00350000
1039
  mov  eax,47
1038
  mov  eax,47
1040
  mov  ebx,0x80100
1039
  mov  ebx,0x80100
1041
  int  0x40
1040
  mcall
1042
  mov  ecx,[current]
1041
  mov  ecx,[current]
1043
  add  edx,0x005f0000
1042
  add  edx,0x005f0000
1044
  int  0x40
1043
  mcall
Line 1045... Line 1044...
1045
 
1044
 
1046
  push [text_cursor] ;íâ® ¯®§¨æ¨ï ªãàá®à  ¢ ⥪á⮢®© áâப¥
1045
  push [text_cursor] ;íâ® ¯®§¨æ¨ï ªãàá®à  ¢ ⥪á⮢®© áâப¥
1047
  call draw_cursor
1046
  call draw_cursor
1048
  mov  ecx,[sizefile]
1047
  mov  ecx,[sizefile]
1049
  jecxz minimaze_view
1048
  jecxz minimaze_view
Line 1050... Line 1049...
1050
  call output_screen
1049
  call output_screen
1051
 
1050
 
1052
 minimaze_view:
1051
 minimaze_view:
1053
  mov  eax,12  ; function 12:tell os about windowdraw
1052
  mov  eax,12  ; function 12:tell os about windowdraw
1054
  mov  ebx,2 ; 2, end of draw
1053
  mov  ebx,2 ; 2, end of draw
1055
  int  0x40
1054
  mcall
Line 1064... Line 1063...
1064
  pushad
1063
  pushad
1065
  mov  eax,9
1064
  mov  eax,9
1066
  mov  ebx,process_info
1065
  mov  ebx,process_info
1067
  xor  ecx,ecx
1066
  xor  ecx,ecx
1068
  dec  ecx
1067
  dec  ecx
1069
  int  0x40
1068
  mcall
1070
  popad
1069
  popad
1071
  ret
1070
  ret
Line 1072... Line 1071...
1072
 
1071
 
1073
coding:
1072
coding:
Line 1102... Line 1101...
1102
  mov  eax,51
1101
  mov  eax,51
1103
  xor  ebx,ebx
1102
  xor  ebx,ebx
1104
  mov  ecx,[esp+0x24]
1103
  mov  ecx,[esp+0x24]
1105
  inc  ebx
1104
  inc  ebx
1106
  mov  edx,0x7E000 ;0x1000
1105
  mov  edx,0x7E000 ;0x1000
1107
  int  0x40
1106
  mcall
1108
  popad
1107
  popad
1109
  ret  4
1108
  ret  4
Line 1110... Line 1109...
1110
 
1109
 
1111
help_thread:
1110
help_thread:
1112
  call help_window
1111
  call help_window
1113
 help_still:
1112
 help_still:
1114
  mov  eax,10
1113
  mov  eax,10
1115
  int  0x40
1114
  mcall
1116
  dec  eax
1115
  dec  eax
1117
  jz   help_red
1116
  jz   help_red
1118
  dec  eax
1117
  dec  eax
1119
  jz   help_key
1118
  jz   help_key
Line 1124... Line 1123...
1124
  call help_window
1123
  call help_window
1125
  jmp  help_still
1124
  jmp  help_still
1126
 help_key:
1125
 help_key:
1127
  inc  eax
1126
  inc  eax
1128
  inc  eax
1127
  inc  eax
1129
  int  0x40
1128
  mcall
1130
  jmp  help_still
1129
  jmp  help_still
1131
 help_button:
1130
 help_button:
1132
  mov  eax,17
1131
  mov  eax,17
1133
  int  0x40
1132
  mcall
1134
  dec  ah
1133
  dec  ah
1135
  jne  help_still
1134
  jne  help_still
1136
  shr  eax,8
1135
  shr  eax,8
1137
  dec  eax
1136
  dec  eax
1138
  int  0x40
1137
  mcall
Line 1139... Line 1138...
1139
 
1138
 
1140
help_window:
1139
help_window:
1141
  pushad
1140
  pushad
1142
  mov  eax,12  ; function 12:tell os about windowdraw
1141
  mov  eax,12  ; function 12:tell os about windowdraw
1143
  mov  ebx,1 ; 1, start of draw
1142
  mov  ebx,1 ; 1, start of draw
1144
  int  0x40
1143
  mcall
1145
     ; DRAW WINDOW
1144
     ; DRAW WINDOW
1146
  mov  eax,0 ; function 0 : define and draw window
1145
  mov  eax,0 ; function 0 : define and draw window
1147
  mov  ebx,0x500140 ; [x start] *65536 + [x size]
1146
  mov  ebx,0x500140 ; [x start] *65536 + [x size]
1148
  mov  ecx,0x700110 ; [y start] *65536 + [y size]
1147
  mov  ecx,0x700110 ; [y start] *65536 + [y size]
1149
  mov  edx,0x03000000 ; color of work area RRGGBB,8->color gl
1148
  mov  edx,0x03000000 ; color of work area RRGGBB,8->color gl
1150
  int  0x40
1149
  mcall
1151
     ; WINDOW LABEL
1150
     ; WINDOW LABEL
1152
  mov  eax,4 ; function 4 : write text to window
1151
  mov  eax,4 ; function 4 : write text to window
1153
  mov  ebx,8*65536+8 ; [x start] *65536 + [y start]
1152
  mov  ebx,8*65536+8 ; [x start] *65536 + [y start]
1154
  mov  ecx,0x10ffffff ; font 1 & color ( 0xF0RRGGBB )
1153
  mov  ecx,0x10ffffff ; font 1 & color ( 0xF0RRGGBB )
1155
  mov  edx,help_label ; pointer to text beginning
1154
  mov  edx,help_label ; pointer to text beginning
1156
  mov  esi,14 ; text length
1155
  mov  esi,14 ; text length
1157
  int  0x40
1156
  mcall
1158
     ; HELP TEXT
1157
     ; HELP TEXT
1159
  add  edx,14 ;help_text addr.
1158
  add  edx,14 ;help_text addr.
1160
  add  esi,37 ; = 51 - length 1 line
1159
  add  esi,37 ; = 51 - length 1 line
1161
  mov  ecx,0x00ffffff
1160
  mov  ecx,0x00ffffff
1162
  mov  edi,(help_end-help_text)/51
1161
  mov  edi,(help_end-help_text)/51
1163
 @@:
1162
 @@:
1164
  add  ebx,0x10
1163
  add  ebx,0x10
1165
  int  0x40
1164
  mcall
1166
  add  edx,51
1165
  add  edx,51
1167
  dec  edi
1166
  dec  edi
Line 1168... Line 1167...
1168
  jnz  @b
1167
  jnz  @b
1169
 
1168
 
1170
 
1169
 
1171
  mov  eax,12  ; function 12:tell os about windowdraw
1170
  mov  eax,12  ; function 12:tell os about windowdraw
1172
  mov  ebx,2 ; 2, end of draw
1171
  mov  ebx,2 ; 2, end of draw
Line 1173... Line 1172...
1173
  int  0x40
1172
  mcall
1174
  popad
1173
  popad
1175
  ret
1174
  ret
1176
 
1175
 
1177
about_thread:
1176
about_thread:
1178
  call about_window
1177
  call about_window
1179
 about_still:
1178
 about_still:
1180
  mov  eax,10
1179
  mov  eax,10
1181
  int  0x40
1180
  mcall
1182
  dec  eax
1181
  dec  eax
Line 1190... Line 1189...
1190
  call about_window
1189
  call about_window
1191
  jmp  about_still
1190
  jmp  about_still
1192
 about_key:
1191
 about_key:
1193
  inc  eax
1192
  inc  eax
1194
  inc  eax
1193
  inc  eax
1195
  int  0x40
1194
  mcall
1196
  jmp  about_still
1195
  jmp  about_still
1197
 about_button:
1196
 about_button:
1198
  mov  eax,17
1197
  mov  eax,17
1199
  int  0x40
1198
  mcall
1200
  dec  ah
1199
  dec  ah
1201
  jne  about_still
1200
  jne  about_still
1202
  shr  eax,8
1201
  shr  eax,8
1203
  dec  eax
1202
  dec  eax
1204
  int  0x40
1203
  mcall
Line 1205... Line 1204...
1205
 
1204
 
1206
about_window:
1205
about_window:
1207
  pushad
1206
  pushad
1208
  mov  eax,12  ; function 12:tell os about windowdraw
1207
  mov  eax,12  ; function 12:tell os about windowdraw
1209
  mov  ebx,1 ; 1, start of draw
1208
  mov  ebx,1 ; 1, start of draw
1210
  int  0x40
1209
  mcall
1211
     ; DRAW WINDOW
1210
     ; DRAW WINDOW
1212
  mov  eax,0           ; function 0 : define and draw window
1211
  mov  eax,0           ; function 0 : define and draw window
1213
  mov  ebx,0x500140    ; [x start] *65536 + [x size]
1212
  mov  ebx,0x500140    ; [x start] *65536 + [x size]
1214
  mov  ecx,0x700110    ; [y start] *65536 + [y size]
1213
  mov  ecx,0x700110    ; [y start] *65536 + [y size]
1215
  mov  edx,0x03000000  ; color of work area RRGGBB,8->color gl
1214
  mov  edx,0x03000000  ; color of work area RRGGBB,8->color gl
1216
  int  0x40
1215
  mcall
1217
     ; WINDOW LABEL
1216
     ; WINDOW LABEL
1218
  mov  eax,4           ; function 4 : write text to window
1217
  mov  eax,4           ; function 4 : write text to window
1219
  mov  ebx,8*65536+8   ; [x start] *65536 + [y start]
1218
  mov  ebx,8*65536+8   ; [x start] *65536 + [y start]
1220
  mov  ecx,[sc.work_button_text]
1219
  mov  ecx,[sc.work_button_text]
1221
  or   ecx,0x10000000  ; font 1 & color ( 0xF0RRGGBB )
1220
  or   ecx,0x10000000  ; font 1 & color ( 0xF0RRGGBB )
1222
  mov  edx,about_label ; pointer to text beginning
1221
  mov  edx,about_label ; pointer to text beginning
1223
  mov  esi,17          ; text length
1222
  mov  esi,17          ; text length
1224
  int  0x40
1223
  mcall
1225
     ; ABOUT TEXT
1224
     ; ABOUT TEXT
1226
  add  edx,17 ;about_text addr.
1225
  add  edx,17 ;about_text addr.
1227
  add  esi,34 ; = 51 - length 1 line
1226
  add  esi,34 ; = 51 - length 1 line
1228
  mov  ecx,0x00ddeeff
1227
  mov  ecx,0x00ddeeff
1229
  mov  edi,15
1228
  mov  edi,15
1230
 @@:
1229
 @@:
1231
  add  ebx,0x10
1230
  add  ebx,0x10
1232
  int  0x40
1231
  mcall
1233
  add  edx,51
1232
  add  edx,51
1234
  dec  edi
1233
  dec  edi
Line 1235... Line 1234...
1235
  jnz  @b
1234
  jnz  @b
1236
 
1235
 
1237
  mov  eax,12  ; function 12:tell os about windowdraw
1236
  mov  eax,12  ; function 12:tell os about windowdraw
1238
  mov  ebx,2 ; 2, end of draw
1237
  mov  ebx,2 ; 2, end of draw
1239
  int  0x40
1238
  mcall
Line 1240... Line 1239...
1240
  popad
1239
  popad
1241
  ret
1240
  ret