Subversion Repositories Kolibri OS

Rev

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

Rev 451 Rev 485
Line 6... Line 6...
6
;
6
;
7
;   Š®¬¯¨«¨à®¢ âì FASM'®¬
7
;   Š®¬¯¨«¨à®¢ âì FASM'®¬
8
;
8
;
9
;---------------------------------------------------------------------
9
;---------------------------------------------------------------------
10
include 'lang.inc'
10
include 'lang.inc'
11
include 'macros.inc'
11
include '..\..\..\macros.inc'
Line 12... Line 12...
12
 
12
 
13
appname equ 'RDsave '
13
appname equ 'RDsave '
Line 14... Line 14...
14
version equ '1.2'
14
version equ '1.2'
Line 18... Line 18...
18
 
18
 
19
  db     'MENUET01'  ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
19
  db     'MENUET01'  ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
20
  dd     0x01        ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
20
  dd     0x01        ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
21
  dd     START       ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
21
  dd     START       ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
22
  dd     I_END       ; à §¬¥à ¯à®£à ¬¬ë
22
  dd     I_END       ; à §¬¥à ¯à®£à ¬¬ë
23
  dd     0x1000      ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
23
  dd     0x2000      ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
24
  dd     0x1000      ;  ¤à¥á ¢¥à設ë áâíª 
24
  dd     0x2000      ;  ¤à¥á ¢¥à設ë áâíª 
25
  dd     0x0         ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
25
  dd     0x0         ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
Line 26... Line 26...
26
  dd     0x0         ; § à¥§¥à¢¨à®¢ ­®
26
  dd     0x0         ; § à¥§¥à¢¨à®¢ ­®
27
 
27
 
Line 28... Line 28...
28
include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
28
include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
29
use_edit_box
29
use_edit_box structure_of_potock,22,5
30
 
30
 
Line 31... Line 31...
31
;---------------------------------------------------------------------
31
;---------------------------------------------------------------------
32
;---  €—€‹Ž Žƒ€ŒŒ›  ----------------------------------------------
32
;---  €—€‹Ž Žƒ€ŒŒ›  ----------------------------------------------
33
;---------------------------------------------------------------------
33
;---------------------------------------------------------------------
34
 
34
 
35
START:
35
START:
36
   mov eax, 40
36
   mov eax, 40
Line 37... Line 37...
37
   mov ebx, 100111b
37
   mov ebx, 100111b
38
   int 0x40
38
   mcall
39
red:                    ; ¯¥à¥à¨á®¢ âì ®ª­®
39
red:                    ; ¯¥à¥à¨á®¢ âì ®ª­®
Line 40... Line 40...
40
    call draw_window    ; ¢ë§ë¢ ¥¬ ¯à®æ¥¤ãàã ®âà¨á®¢ª¨ ®ª­ 
40
    call draw_window    ; ¢ë§ë¢ ¥¬ ¯à®æ¥¤ãàã ®âà¨á®¢ª¨ ®ª­ 
41
 
41
 
42
;---------------------------------------------------------------------
42
;---------------------------------------------------------------------
43
;---  –ˆŠ‹ Ž€Ž’Šˆ ‘Ž›’ˆ‰  ----------------------------------------
43
;---  –ˆŠ‹ Ž€Ž’Šˆ ‘Ž›’ˆ‰  ----------------------------------------
Line 44... Line 44...
44
;---------------------------------------------------------------------
44
;---------------------------------------------------------------------
45
 
45
 
46
still:
46
still:
47
    push 10 
47
    push 10 
Line 59... Line 59...
59
    mouse_edit_boxes editbox,editbox_end
59
    mouse_edit_boxes editbox,editbox_end
60
    jmp still
60
    jmp still
Line 61... Line 61...
61
    
61
    
62
button:
62
button:
63
    mov  al,17           ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
63
    mov  al,17           ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
Line 64... Line 64...
64
    int  0x40
64
    mcall
65
 
65
 
66
    cmp  ah,1            ; ª­®¯ª  á id=1("§ ªàëâì")?
66
    cmp  ah,1            ; ª­®¯ª  á id=1("§ ªàëâì")?
67
    jne  noclose
67
    jne  noclose
Line 68... Line 68...
68
    or   eax,-1          ; äã­ªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
68
    or   eax,-1          ; äã­ªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
69
    int  0x40
69
    mcall
70
 
70
 
71
noclose:
71
noclose:
72
    cmp  ah,2
72
    cmp  ah,2
73
    jne  path_2
73
    jne  path_2
74
    call clear_err
74
    call clear_err
75
    mov  al,16
75
    mov  al,16
76
    mov  ebx,1
76
    mov  ebx,1
77
    int  0x40
77
    mcall
78
    call check_for_error
78
    call check_for_error
79
    jmp  still
79
    jmp  still
80
 path_2:
80
 path_2:
81
    cmp  ah,3
81
    cmp  ah,3
82
    jne  path_3
82
    jne  path_3
83
    call clear_err
83
    call clear_err
84
    mov  al,16
84
    mov  al,16
85
    mov  ebx,2
85
    mov  ebx,2
86
    int  0x40
86
    mcall
87
    call check_for_error
87
    call check_for_error
88
    jmp  still
88
    jmp  still
89
 path_3:
89
 path_3:
90
    cmp  ah,4
90
    cmp  ah,4
91
    jne  path_4
91
    jne  path_4
92
    call clear_err
92
    call clear_err
93
    mov  al,18
93
    mov  al,18
94
    mov  ebx,6
94
    mov  ebx,6
95
    mov  ecx,path3
95
    mov  ecx,path3
96
    int  0x40
96
    mcall
97
    call check_for_error
97
    call check_for_error
98
    jmp  still
98
    jmp  still
99
 path_4:
99
 path_4:
100
    call clear_err
100
    call clear_err
101
    mov  eax,18
101
    mov  eax,18
102
    mov  ebx,6
102
    mov  ebx,6
103
    mov  ecx,path4
103
    mov  ecx,path4
Line 104... Line 104...
104
    int  0x40
104
    mcall
105
    call check_for_error
105
    call check_for_error
106
    jmp  still
106
    jmp  still
107
 
107
 
108
key:         
108
key:         
Line 109... Line 109...
109
    mov  al,2
109
    mov  al,2
Line 161... Line 161...
161
 
161
 
162
 print:
162
 print:
163
    mov eax,4                              ;­ ¤¯¨á¨
163
    mov eax,4                              ;­ ¤¯¨á¨
164
    mov ebx,20 shl 16 + 148
164
    mov ebx,20 shl 16 + 148
165
    or  ecx,0x80000000
165
    or  ecx,0x80000000
166
    int 0x40
166
    mcall
Line 167... Line 167...
167
    ret
167
    ret
168
 
168
 
169
clear_err:
169
clear_err:
170
    mov al,13
170
    mov al,13
171
    mov ebx,15 shl 16 + 240
171
    mov ebx,15 shl 16 + 240
172
    mov ecx,145 shl 16 +15
172
    mov ecx,145 shl 16 +15
173
    mov edx,[sc.work]
173
    mov edx,[sc.work]
Line 174... Line 174...
174
    int 0x40
174
    mcall
175
    ret
175
    ret
176
 
176
 
Line 182... Line 182...
182
 
182
 
183
   mov  eax,48
183
   mov  eax,48
184
   mov  ebx,3
184
   mov  ebx,3
185
   mov  ecx,sc
185
   mov  ecx,sc
186
   mov  edx,sizeof.system_colors
186
   mov  edx,sizeof.system_colors
Line 187... Line 187...
187
   int  0x40
187
   mcall
188
 
188
 
189
   mov eax,12                            ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª­ 
189
   mov eax,12                            ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª­ 
Line 190... Line 190...
190
   mov bl,1                              ; 1 - ­ ç¨­ ¥¬ à¨á®¢ âì
190
   mov bl,1                              ; 1 - ­ ç¨­ ¥¬ à¨á®¢ âì
191
   int 0x40
191
   mcall
192
 
192
 
193
                                         ; ‘Ž‡„€ðŒ ŽŠŽ
193
                                         ; ‘Ž‡„€ðŒ ŽŠŽ
194
   xor eax,eax                           ; äã­ªæ¨ï 0 : ®¯à¥¤¥«¨âì ¨ ®âà¨á®¢ âì ®ª­®
194
   xor eax,eax                           ; äã­ªæ¨ï 0 : ®¯à¥¤¥«¨âì ¨ ®âà¨á®¢ âì ®ª­®
195
   mov ebx,200 shl 16 + 270              ; [x áâ àâ] *65536 + [x à §¬¥à]
195
   mov ebx,200 shl 16 + 270              ; [x áâ àâ] *65536 + [x à §¬¥à]
196
   mov ecx,200 shl 16 + 190              ; [y áâ àâ] *65536 + [y à §¬¥à]
196
   mov ecx,200 shl 16 + 190              ; [y áâ àâ] *65536 + [y à §¬¥à]
197
   mov edx,[sc.work]                     ; 梥â à ¡®ç¥© ®¡« á⨠ RRGGBB,8->color gl
197
   mov edx,[sc.work]                     ; 梥â à ¡®ç¥© ®¡« á⨠ RRGGBB,8->color gl
Line 198... Line 198...
198
   or  edx,0x33000000
198
   or  edx,0x33000000
Line 199... Line 199...
199
   mov edi,header                        ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ€
199
   mov edi,title                        ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ€
200
   int 0x40
200
   mcall
201
 
201
 
202
draw_edit_boxes editbox,editbox_end      ;à¨á®¢ ­¨¥ edit box'®¢
202
draw_edit_boxes editbox,editbox_end,use_f9,structure_of_potock  ;à¨á®¢ ­¨¥ edit box'®¢
203
 
203
 
Line 204... Line 204...
204
   mov al,13                             ;®âà¨á®¢ª  ⥭¥© ª­®¯®ª
204
   mov al,13                             ;®âà¨á®¢ª  ⥭¥© ª­®¯®ª
205
   mov ebx,194 shl 16 + 60
205
   mov ebx,194 shl 16 + 60
Line 206... Line 206...
206
   mov ecx,34 shl 16 +15
206
   mov ecx,34 shl 16 +15
207
   mov edx,0x444444
207
   mov edx,0x444444
Line 208... Line 208...
208
   int 0x40
208
   mcall
209
 
209
 
Line 210... Line 210...
210
   add ecx,20 shl 16
210
   add ecx,20 shl 16
211
   int 0x40
211
   mcall
212
 
212
 
213
   add ecx,20 shl 16
213
   add ecx,20 shl 16
214
   int 0x40
214
   mcall
215
 
215
 
Line 216... Line 216...
216
   add ecx,40 shl 16
216
   add ecx,40 shl 16
217
   int 0x40
217
   mcall
218
 
218
 
Line 219... Line 219...
219
   mov eax,8                             ;®âà¨á®¢ª  ª­®¯®ª
219
   mov eax,8                             ;®âà¨á®¢ª  ª­®¯®ª
220
   sub ebx,4 shl 16
220
   sub ebx,4 shl 16
221
   sub ecx,4 shl 16
221
   sub ecx,4 shl 16
Line 222... Line 222...
222
   mov edx,5
222
   mov edx,5
223
   mov esi,[sc.work_button]
223
   mov esi,[sc.work_button]
224
   int 0x40
224
   mcall
Line 225... Line 225...
225
 
225
 
226
   sub ecx,40 shl 16
226
   sub ecx,40 shl 16
227
   dec edx
227
   dec edx
228
   int 0x40
228
   mcall
229
 
229
 
230
   sub ecx,20 shl 16
230
   sub ecx,20 shl 16
Line 231... Line 231...
231
   dec edx
231
   dec edx
232
   int 0x40
232
   mcall
233
 
233
 
Line 234... Line 234...
234
   sub ecx,20 shl 16
234
   sub ecx,20 shl 16
235
   dec edx
235
   dec edx
236
   int 0x40
236
   mcall
Line 237... Line 237...
237
 
237
 
238
   mov al,4                              ;­ ¤¯¨á¨
238
   mov al,4                              ;­ ¤¯¨á¨
239
   mov ebx,45 shl 16 + 12
239
   mov ebx,45 shl 16 + 12
Line 240... Line 240...
240
   mov ecx,[sc.work_text]
240
   mov ecx,[sc.work_text]
241
   or  ecx,0x80000000
241
   or  ecx,0x80000000
242
   mov edx,label1
242
   mov edx,label1
Line 243... Line 243...
243
   int 0x40
243
   mcall
244
 
244
 
245
   mov ebx,150 shl 16 + 35
245
   mov ebx,150 shl 16 + 35
Line 246... Line 246...
246
   mov edx,path1
246
   mov edx,path1
247
   int 0x40
247
   mcall
248
 
248
 
249
   add ebx,20
249
   add ebx,20
250
   mov edx,path2
250
   mov edx,path2
Line 251... Line 251...
251
   int 0x40
251
   mcall
252
 
252
 
Line 253... Line 253...
253
   mov ebx,75 shl 16 + 75
253
   mov ebx,75 shl 16 + 75
254
   mov edx,path3
254
   mov edx,path3
Line 255... Line 255...
255
   int 0x40
255
   mcall
256
 
256
 
Line 257... Line 257...
257
   mov ebx,30 shl 16 + 97
257
   mov ebx,30 shl 16 + 97
258
   mov edx,label2
258
   mov edx,label2
259
   int 0x40
259
   mcall
Line 260... Line 260...
260
 
260
 
Line 261... Line 261...
261
   mov ebx,40 shl 16 + 135
261
   mov ebx,40 shl 16 + 135
262
   mov edx,label3
262
   mov edx,label3
263
   int 0x40
263
   mcall
Line 264... Line 264...
264
 
264
 
Line 265... Line 265...
265
   mov ecx,[sc.work_button_text]
265
   mov ecx,[sc.work_button_text]
266
   or  ecx,0x80000000
266
   or  ecx,0x80000000
267
   mov ebx,195 shl 16 + 35
267
   mov ebx,195 shl 16 + 35
Line 268... Line -...
268
   mov edx,save
-
 
269
   int 0x40
-
 
270
 
-
 
271
   add ebx,20
-
 
272
   int 0x40
-
 
273
 
-
 
274
   add ebx,20
268
   mov edx,save
275
   int 0x40
269
   mcall
276
 
270
 
277
   add ebx,40
271
   add ebx,20
278
   int 0x40
272
   mcall
Line 327... Line 321...
327
error11 db 'Device error',0
321
error11 db 'Device error',0
Line 328... Line 322...
328
 
322
 
Line 329... Line 323...
329
end if
323
end if
330
 
-
 
331
mouse_flag: dd 0x0
-
 
332
structure_of_potock:
-
 
Line -... Line 324...
-
 
324
 
-
 
325
mouse_flag: dd 0x0
-
 
326
 
-
 
327
path1   db '/fd/1/',0
-
 
328
path2   db '/fd/2/',0
-
 
329
path3   db '/hd0/1/kolibri.img',0
333
rb 100
330
path4   db '/hd0/1/kolibri/kolibri.img',0  ;¤«ï १¥à¢­®£® á®åà ­¥­¨ï
Line -... Line 331...
-
 
331
 
-
 
332
;---------------------------------------------------------------------
334
;---------------------------------------------------------------------
333
I_END:                             ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
-
 
334
 
-
 
335
rb 514
-
 
336
 
-
 
337
sc     system_colors
-
 
338