Subversion Repositories Kolibri OS

Rev

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

Rev 341 Rev 485
Line 4... Line 4...
4
;  note that 'mov al,xx' is shorter than 'mov eax,xx'
4
;  note that 'mov al,xx' is shorter than 'mov eax,xx'
5
;           and if we know that high 24 bits of eax are zero, we can use 1st form
5
;           and if we know that high 24 bits of eax are zero, we can use 1st form
6
;           the same about ebx,ecx,edx
6
;           the same about ebx,ecx,edx
Line 7... Line 7...
7
 
7
 
8
include "lang.inc"
8
include "lang.inc"
Line 9... Line 9...
9
include "macros.inc"
9
include "..\..\..\macros.inc"
10
 
10
 
Line 11... Line 11...
11
meos_app_start
11
meos_app_start
Line 12... Line 12...
12
code
12
code
13
 
13
 
14
do_draw:
14
do_draw:
15
 
15
 
16
    mov  eax,48
16
    mov  eax,48
Line 17... Line 17...
17
    mov  ebx,3
17
    mov  ebx,3
18
    mov  ecx,sc
18
    mov  ecx,sc
19
    mov  edx,sizeof.system_colors
19
    mov  edx,sizeof.system_colors
Line 20... Line 20...
20
    int  0x40
20
    mcall
21
 
21
 
Line 22... Line 22...
22
    mov  al,12 		   ; eax=12 - tell os about redraw start
22
    mov  al,12 		   ; eax=12 - tell os about redraw start
Line 23... Line 23...
23
    mov  bl,1
23
    mov  bl,1
24
    int  0x40
24
    mcall
Line 38... Line 38...
38
 
38
 
39
    xor  eax,eax			   ; define and draw window
39
    xor  eax,eax			   ; define and draw window
40
    mov  edx,[sc.work]
40
    mov  edx,[sc.work]
41
    mov  esi,edx
41
    mov  esi,edx
42
    mov  edi,edx
42
    mov  edi,edx
Line 43... Line 43...
43
    int  0x40
43
    mcall
44
 
44
 
45
   mov edx,0x444444
45
   mov edx,0x444444
46
   mov al,13
46
   mov al,13
Line 69... Line 69...
69
    mov  al,4			   ; 0x00000004 = write text
69
    mov  al,4			   ; 0x00000004 = write text
70
    mov  ebx,75*65536+10
70
    mov  ebx,75*65536+10
71
    mov  ecx,[sc.work_text] ; 8b window nro - RR GG BB color
71
    mov  ecx,[sc.work_text] ; 8b window nro - RR GG BB color
72
    or   ecx,0x90000000
72
    or   ecx,0x90000000
73
    mov  edx,label1		   ; pointer to text beginning
73
    mov  edx,label1		   ; pointer to text beginning
74
    int  0x40
74
    mcall
Line 75... Line 75...
75
 
75
 
76
    mov  ebx,15*65536+101
76
    mov  ebx,15*65536+101
77
    mov  edx,label4
77
    mov  edx,label4
Line 78... Line 78...
78
    int  0x40
78
    mcall
79
 
79
 
80
    mov  ecx,0x90eeeeee            ; 8b window nro - RR GG BB color
80
    mov  ecx,0x90eeeeee            ; 8b window nro - RR GG BB color
81
    mov  ebx,25*65536+30
81
    mov  ebx,25*65536+30
Line 82... Line 82...
82
    mov  edx,label2		     ; pointer to text beginning
82
    mov  edx,label2		     ; pointer to text beginning
83
    int  0x40
83
    mcall
84
 
84
 
Line 85... Line 85...
85
    mov  ebx,20*65536+64
85
    mov  ebx,20*65536+64
86
    mov  edx,label3
86
    mov  edx,label3
87
    int  0x40
87
    mcall
Line 88... Line 88...
88
 
88
 
89
    mov  ebx,45*65536+41
89
    mov  ebx,45*65536+41
90
    mov  edx,label5
90
    mov  edx,label5
Line 91... Line 91...
91
    int  0x40
91
    mcall
92
 
92
 
93
    mov  ebx,40*65536+75
93
    mov  ebx,40*65536+75
Line 94... Line 94...
94
    mov  edx,label6
94
    mov  edx,label6
Line 95... Line 95...
95
    int  0x40
95
    mcall
96
 
96
 
Line 97... Line 97...
97
    mov  al,12 		   ;end of redraw 
97
    mov  al,12 		   ;end of redraw 
98
    mov  ebx,2
98
    mov  ebx,2
99
    int  0x40
99
    mcall
100
 
100
 
101
still:
101
still:
102
 
102
 
103
    mov  eax,10 		; wait here for event
103
    mov  eax,10 		; wait here for event
104
    int  0x40
104
    mcall
105
 
105
 
106
    dec  eax
106
    dec  eax
107
    jz   do_draw
107
    jz   do_draw
108
    dec  eax
108
    dec  eax
Line 121... Line 121...
121
     jz   power_off
121
     jz   power_off
122
     jmp  still
122
     jmp  still
Line 123... Line 123...
123
 
123
 
124
  button:
124
  button:
125
    mov  al,17	; now eax=17 - get pressed button id
125
    mov  al,17	; now eax=17 - get pressed button id
126
    int  0x40
126
    mcall
127
    xchg al,ah
127
    xchg al,ah
128
    dec  eax
128
    dec  eax
129
    jz   power_off
129
    jz   power_off
130
    dec  eax
130
    dec  eax
Line 136... Line 136...
136
; we have only one button left, this is close button
136
; we have only one button left, this is close button
137
;    dec  eax
137
;    dec  eax
138
;    jnz  still
138
;    jnz  still
139
close_1:
139
close_1:
140
    or   eax,-1
140
    or   eax,-1
141
    int  40h
141
    mcall
Line 142... Line 142...
142
 
142
 
143
 power_off:
143
 power_off:
144
    push 2
144
    push 2
Line 156... Line 156...
156
    jmp  close_1
156
    jmp  close_1
Line 157... Line 157...
157
 
157
 
158
run_rdsave:
158
run_rdsave:
159
    mov eax,70
159
    mov eax,70
160
    mov ebx,rdsave
160
    mov ebx,rdsave
161
    int 0x40
161
    mcall
Line 162... Line 162...
162
    jmp still
162
    jmp still
Line 163... Line 163...
163
 
163