Subversion Repositories Kolibri OS

Rev

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

Rev 6950 Rev 7717
Line 82... Line 82...
82
	; inner
82
	; inner
83
	mov edx,color3
83
	mov edx,color3
84
	add ebx,1 shl 16
84
	add ebx,1 shl 16
85
	add ecx,1 shl 16
85
	add ecx,1 shl 16
86
	mov bx,DATE_BUTTON_WIDTH-4
86
	mov bx,DATE_BUTTON_WIDTH-4
87
	mov cx,DATE_BUTTON_HEIGHT-4
87
	mov cx,DATE_BUTTON_HEIGHT-3
88
	mcall
88
	mcall
89
	; bottom border-inner
89
	; bottom border-inner
90
	mov edx,color4
90
	mov edx,color4
91
	add ebx,DATE_BUTTON_WIDTH shl 16
91
	add ebx,DATE_BUTTON_WIDTH shl 16
92
	sub ebx,4 shl 16
92
	sub ebx,4 shl 16
Line 138... Line 138...
138
    and  eax,0xf
138
    and  eax,0xf
139
    imul ebx,10
139
    imul ebx,10
140
    add  al,bl
140
    add  al,bl
141
    ret
141
    ret
Line 142... Line 142...
142
 
142
 
143
START:
143
get_current_date:
144
    mcall 29
144
    mcall 29
145
    mov  [datestr],eax
145
    mov  [datestr],eax
146
    mov  esi,datestr
146
    mov  esi,datestr
147
    call str2int
147
    call str2int
148
    add  eax,1900
148
    add  eax,1900
149
    mov  [Year],eax
149
    mov  [curYear],eax
150
    call str2int
150
    call str2int
151
    dec  eax
151
    dec  eax
152
    mov  [Month],eax
152
    mov  [curMonth],eax
153
    call str2int
153
    call str2int
154
    mov  [day_sel],eax
154
    mov  [curDay],eax
155
    test byte[esi],0
155
    test byte[esi],0
156
    jnz  .no2000
156
    jnz  .no2000
157
    add  [Year],100
-
 
158
	mov eax,[Year]
-
 
159
	mov [curYear], eax
-
 
160
	mov eax,[Month]
-
 
161
	mov [curMonth], eax
-
 
162
	mov eax,[day_sel]
-
 
163
	mov [curDay], eax
157
    add  [curYear],100
-
 
158
  .no2000:
-
 
159
    call calculate
-
 
160
ret
-
 
161
 
-
 
162
check_midnight:
164
  .no2000:
163
    mov   ebx,[datestr]
-
 
164
    mcall 29
-
 
165
	cmp   eax,ebx
-
 
166
	je   end_check_midnight
-
 
167
	  call get_current_date
-
 
168
	  call draw_days
165
    jmp  upd
169
    end_check_midnight:
-
 
170
ret
-
 
171
 
Line -... Line 172...
-
 
172
;===============================================================
-
 
173
 
-
 
174
START:
-
 
175
    call get_current_date
-
 
176
	m2m [Year], [curYear]
-
 
177
	m2m [Month], [curMonth]
166
red:
178
	m2m [day_sel], [curDay]
Line 167... Line 179...
167
 
179
red:
Line 168... Line 180...
168
    call define_window
180
    call define_window
Line 177... Line 189...
177
    cmp  eax,2
189
    cmp  eax,2
178
    je	 key
190
    je	 key
179
    cmp  eax,3
191
    cmp  eax,3
180
    je	 button
192
    je	 button
Line -... Line 193...
-
 
193
 
181
 
194
    call check_midnight
Line 182... Line 195...
182
    call draw_clock
195
    call draw_clock
Line 183... Line 196...
183
 
196