Subversion Repositories Kolibri OS

Rev

Rev 31 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31 Rev 68
1
; project name:   SYSTREE FILE COPIER
1
; project name:   SYSTREE FILE COPIER
2
; version:        1.1b
2
; version:        1.1b
3
; last update:    18/07/2004
3
; last update:    18/07/2004
4
; compiler:       FASM 1.52
4
; compiler:       FASM 1.52
5
; written by:     Ivan Poddubny
5
; written by:     Ivan Poddubny
6
; e-mail:         ivan-yar@bk.ru
6
; e-mail:         ivan-yar@bk.ru
7
; copying-policy: GPL
7
; copying-policy: GPL
8
 
8
 
9
; History:
9
; History:
10
; 18/07/2004 strings using "lsz" macro + french language (not 100%!)
10
; 18/07/2004 strings using "lsz" macro + french language (not 100%!)
11
; 04/06/2004 Bugfix for memory - thanks to Ville
11
; 04/06/2004 Bugfix for memory - thanks to Ville
12
; ...
12
; ...
13
 
13
 
14
    use32
14
    use32
15
    org     0x0
15
    org     0x0
16
 
16
 
17
    db      'MENUET01'     ; 8 byte id
17
    db      'MENUET01'     ; 8 byte id
18
    dd      0x01           ; header version
18
    dd      0x01           ; header version
19
    dd      START          ; start of code
19
    dd      START          ; start of code
20
    dd      I_END          ; size of image
20
    dd      I_END          ; size of image
21
    dd      0x20201        ; memory for app
21
    dd      0x20201        ; memory for app
22
    dd      0x10000        ; esp
22
    dd      0x10000        ; esp
23
    dd      0x0 , 0x0      ; I_Param , I_Icon
23
    dd      0x0 , 0x0      ; I_Param , I_Icon
24
 
24
 
25
include 'lang.inc'
25
include 'lang.inc'
26
include 'macros.inc'       ; very useful stuff for MeOS
26
include 'macros.inc'       ; very useful stuff for MeOS
27
STRLEN = 48                ; maximal length of filename
27
STRLEN = 48                ; maximal length of filename
28
 
28
 
29
 
29
 
30
START:                     ; start of execution
30
START:                     ; start of execution
31
 
31
 
32
red:
32
red:
33
    call draw_window       ; at first, draw the window
33
    call draw_window       ; at first, draw the window
34
 
34
 
35
still:                     ; main cycle of application begins here
35
still:                     ; main cycle of application begins here
36
 
36
 
37
    mov  eax,10     ; wait here for event
37
    mov  eax,10     ; wait here for event
38
    int  0x40
38
    int  0x40
39
 
39
 
40
    dec  eax        ; redraw request ?
40
    dec  eax        ; redraw request ?
41
    jz   red
41
    jz   red
42
    dec  eax        ; key in buffer ?
42
    dec  eax        ; key in buffer ?
43
    jz   key
43
    jz   key
44
    dec  eax        ; button in buffer ?
44
    dec  eax        ; button in buffer ?
45
    jz   button
45
    jz   button
46
 
46
 
47
    jmp  still
47
    jmp  still
48
 
48
 
49
  key:              ; key event handler
49
  key:              ; key event handler
50
    mov  eax,2      ;   just read it and ignore
50
    mov  eax,2      ;   just read it and ignore
51
    int  0x40
51
    int  0x40
52
    jmp  still      ;   return to main loop
52
    jmp  still      ;   return to main loop
53
 
53
 
54
  button:           ; button
54
  button:           ; button
55
    mov  eax,17     ;   get id
55
    mov  eax,17     ;   get id
56
    int  0x40
56
    int  0x40
57
 
57
 
58
    cmp  ah,1       ;   button id=1 ?  (close_btn)
58
    cmp  ah,1       ;   button id=1 ?  (close_btn)
59
    jz   close
59
    jz   close
60
 
60
 
61
    cmp  ah,2       ;   copy ?
61
    cmp  ah,2       ;   copy ?
62
    je   copy_file
62
    je   copy_file
63
 
63
 
64
; read_string:
64
; read_string:
65
 
65
 
66
    cmp  ah,5       ; user pressed dest button ?
66
    cmp  ah,5       ; user pressed dest button ?
67
    jz   dstbtn
67
    jz   dstbtn
68
    cmp  ah,4       ; user pressed src button ?
68
    cmp  ah,4       ; user pressed src button ?
69
    jnz  still
69
    jnz  still
70
 
70
 
71
  srcbtn:
71
  srcbtn:
72
    mov  [addr],dword source
72
    mov  [addr],dword source
73
    mov  [ya],dword 36
73
    mov  [ya],dword 36
74
    jmp  rk
74
    jmp  rk
75
  dstbtn:
75
  dstbtn:
76
    mov  [addr],dword destination
76
    mov  [addr],dword destination
77
    mov  [ya],dword 36+16
77
    mov  [ya],dword 36+16
78
 
78
 
79
  rk:
79
  rk:
80
    mov  edi,[addr]    ; load the address of the string
80
    mov  edi,[addr]    ; load the address of the string
81
    mov  al,0          ; the symbol we will search for
81
    mov  al,0          ; the symbol we will search for
82
    mov  ecx,STRLEN+1  ; length of the string (+1)
82
    mov  ecx,STRLEN+1  ; length of the string (+1)
83
    cld                ; search forward
83
    cld                ; search forward
84
  repne  scasb         ; do search now
84
  repne  scasb         ; do search now
85
    inc  ecx           ; we've found a zero or ecx became 0
85
    inc  ecx           ; we've found a zero or ecx became 0
86
    mov  eax,STRLEN+1
86
    mov  eax,STRLEN+1
87
    sub  eax,ecx       ; eax = address of <0> character
87
    sub  eax,ecx       ; eax = address of <0> character
88
    mov  [temp],eax    ; position
88
    mov  [temp],eax    ; position
89
 
89
 
90
    call print_text
90
    call print_text
91
 
91
 
92
    mov  edi,[addr]    ; address of string
92
    mov  edi,[addr]    ; address of string
93
    add  edi,[temp]    ; cursor position
93
    add  edi,[temp]    ; cursor position
94
 
94
 
95
  .waitev:
95
  .waitev:
96
    mov  eax,10
96
    mov  eax,10
97
    int  0x40
97
    int  0x40
98
    cmp  eax,2
98
    cmp  eax,2
99
    jnz  still
99
    jnz  still
100
;   mov  eax,2
100
;   mov  eax,2
101
    int  0x40
101
    int  0x40
102
    shr  eax,8
102
    shr  eax,8
103
    cmp  eax,8
103
    cmp  eax,8
104
    jnz  .nobs         ; BACKSPACE
104
    jnz  .nobs         ; BACKSPACE
105
    cmp  edi,[addr]
105
    cmp  edi,[addr]
106
    jz   .waitev
106
    jz   .waitev
107
    dec  edi
107
    dec  edi
108
    mov  [edi],byte 0
108
    mov  [edi],byte 0
109
    call print_text
109
    call print_text
110
    jmp  .waitev
110
    jmp  .waitev
111
  .nobs:
111
  .nobs:
112
    cmp  eax,13        ; ENTER
112
    cmp  eax,13        ; ENTER
113
    je   still
113
    je   still
114
    cmp  eax,192
114
    cmp  eax,192
115
    jne  .noclear
115
    jne  .noclear
116
    xor  al,al
116
    xor  al,al
117
    mov  edi,[addr]
117
    mov  edi,[addr]
118
    mov  ecx,STRLEN
118
    mov  ecx,STRLEN
119
    rep  stosb
119
    rep  stosb
120
    mov  edi,[addr]
120
    mov  edi,[addr]
121
    call print_text
121
    call print_text
122
    jmp  .waitev
122
    jmp  .waitev
123
 
123
 
124
  .noclear:
124
  .noclear:
125
    mov  [edi],al
125
    mov  [edi],al
126
 
126
 
127
    call print_text
127
    call print_text
128
 
128
 
129
    inc  edi
129
    inc  edi
130
    mov  esi,[addr]
130
    mov  esi,[addr]
131
    add  esi,STRLEN
131
    add  esi,STRLEN
132
    cmp  esi,edi
132
    cmp  esi,edi
133
    jnz  .waitev
133
    jnz  .waitev
134
 
134
 
135
    jmp  still
135
    jmp  still
136
 
136
 
137
 
137
 
138
  close:
138
  close:
139
    or   eax,-1        ; close program
139
    or   eax,-1        ; close program
140
    int  0x40
140
    int  0x40
141
 
141
 
142
 
142
 
143
;====================================================
143
;====================================================
144
; copy_file
144
; copy_file
145
;   This piece of code copies src file to dst file,
145
;   This piece of code copies src file to dst file,
146
;   then it pass the control to copy_error routine,
146
;   then it pass the control to copy_error routine,
147
;   which returns to the main cycle of the app.
147
;   which returns to the main cycle of the app.
148
;   It's NOT a function! It's reached by direct jump
148
;   It's NOT a function! It's reached by direct jump
149
;   from the button handler.
149
;   from the button handler.
150
;====================================================
150
;====================================================
151
copy_file:
151
copy_file:
152
    ; at first we must get the size of the source file
152
    ; at first we must get the size of the source file
153
    mov  [source_info.blocks],1 ; load only 512 bytes
153
    mov  [source_info.blocks],1 ; load only 512 bytes
154
    mov  eax,58
154
    mov  eax,58
155
    mov  ebx,source_info
155
    mov  ebx,source_info
156
    int  0x40
156
    int  0x40
157
 
157
 
158
    ; now eax contains error code
158
    ; now eax contains error code
159
    ; and ebx contains file size in bytes
159
    ; and ebx contains file size in bytes
160
    test eax,eax      ; check if eax is equal to zero (success)
160
    test eax,eax      ; check if eax is equal to zero (success)
161
    je   .ok_getsize  ;   eax = 0 => continue
161
    je   .ok_getsize  ;   eax = 0 => continue
162
    cmp  eax,6
162
    cmp  eax,6
163
    jna  @f
163
    jna  @f
164
    mov  eax,7        ; if error code is above 6, it will be 7
164
    mov  eax,7        ; if error code is above 6, it will be 7
165
  @@:
165
  @@:
166
    cmp  eax,5        ; file might be copied successfully altrough
166
    cmp  eax,5        ; file might be copied successfully altrough
167
                      ; the system reports an error 5
167
                      ; the system reports an error 5
168
    jne  copy_error   ; print error code now
168
    jne  copy_error   ; print error code now
169
  .ok_getsize:
169
  .ok_getsize:
170
 
170
 
171
    ; allocate memory
171
    ; allocate memory
172
    push ebx         ; save file size
172
    push ebx         ; save file size
173
    mov  ecx,ebx
173
    mov  ecx,ebx
174
    add  ecx,0x20000 ; size of memory needed = 0x20000+filesize
174
    add  ecx,0x20000 ; size of memory needed = 0x20000+filesize
175
    mov  eax,64      ; func 64
175
    mov  eax,64      ; func 64
176
    mov  ebx,1       ; resize application memory
176
    mov  ebx,1       ; resize application memory
177
    int  0x40
177
    int  0x40
178
    pop  ebx         ; restore filesize
178
    pop  ebx         ; restore filesize
179
 
179
 
180
    ; check if alloc function failed
180
    ; check if alloc function failed
181
    test eax,eax     ; non-zero value means error
181
    test eax,eax     ; non-zero value means error
182
    je   .ok_memory
182
    je   .ok_memory
183
    mov  eax,5       ; error 5 - out of memory
183
    mov  eax,5       ; error 5 - out of memory
184
    jmp  copy_error  ; print error code now
184
    jmp  copy_error  ; print error code now
185
  .ok_memory:
185
  .ok_memory:
186
 
186
 
187
    ; save number of blocks to source_info
187
    ; save number of blocks to source_info
188
    shr  ebx,9       ; divide by 512
188
    add  ebx,511
189
    inc  ebx         ; blocks++
189
    shr  ebx,9       ; round up to 512 boundary
190
    mov  [source_info.blocks],ebx
190
    mov  [source_info.blocks],ebx
191
    ; read the source file
191
    ; read the source file
192
    mov  eax,58
192
    mov  eax,58
193
    mov  ebx,source_info
193
    mov  ebx,source_info
194
    int  0x40
194
    int  0x40
195
 
195
 
196
    ; ebx = file size
196
    ; ebx = file size
197
    ; save loaded file
197
    ; save loaded file
198
    mov  [dest_info.bytes2write],ebx ; file size in bytes
198
    mov  [dest_info.bytes2write],ebx ; file size in bytes
199
    mov  eax,58
199
    mov  eax,58
200
    mov  ebx,dest_info
200
    mov  ebx,dest_info
201
    int  0x40
201
    int  0x40
202
 
202
 
203
    ; check if 58 function failed
203
    ; check if 58 function failed
204
    test eax,eax
204
    test eax,eax
205
    je   .ok_write
205
    je   .ok_write
206
    add  eax,7        ; error number += 7
206
    add  eax,7        ; error number += 7
207
    cmp  eax,6+7
207
    cmp  eax,6+7
208
    jna  copy_error
208
    jna  copy_error
209
    mov  eax,7+7
209
    mov  eax,7+7
210
    jmp  copy_error
210
    jmp  copy_error
211
  .ok_write:
211
  .ok_write:
212
 
212
 
213
    ; return to the initial amount of memory
213
    ; return to the initial amount of memory
214
    mov  eax,64
214
    mov  eax,64
215
    mov  ebx,1
215
    mov  ebx,1
216
    mov  ecx,0x20201
216
    mov  ecx,0x20201
217
    int  0x40
217
    int  0x40
218
 
218
 
219
    xor  eax,eax      ; eax = message number (0-OK)
219
    xor  eax,eax      ; eax = message number (0-OK)
220
 
220
 
221
 
221
 
222
; print message now
222
; print message now
223
copy_error:
223
copy_error:
224
    mov  edi,eax
224
    mov  edi,eax
225
    mov  eax,4
225
    mov  eax,4
226
    mov  ebx,20*65536+83
226
    mov  ebx,20*65536+83
227
    mov  ecx,0x10ff0000
227
    mov  ecx,0x10ff0000
228
    mov  edx,[errors+edi*8]
228
    mov  edx,[errors+edi*8]
229
    mov  esi,[errors+edi*8+4]
229
    mov  esi,[errors+edi*8+4]
230
    int  0x40
230
    int  0x40
231
jmp still
231
jmp still
232
 
232
 
233
 
233
 
234
; print strings (source & destination)
234
; print strings (source & destination)
235
print_text:
235
print_text:
236
    mov  eax,13
236
    mov  eax,13
237
    mov  ebx,107*65536+STRLEN*6
237
    mov  ebx,107*65536+STRLEN*6
238
    mov  ecx,[ya]
238
    mov  ecx,[ya]
239
    shl  ecx,16
239
    shl  ecx,16
240
    add  ecx,9
240
    add  ecx,9
241
    mov  edx,0xf2f2f2
241
    mov  edx,0xf2f2f2
242
    int  0x40
242
    int  0x40
243
 
243
 
244
    mov  eax,4
244
    mov  eax,4
245
    mov  ebx,109*65536
245
    mov  ebx,109*65536
246
    add  ebx,[ya]
246
    add  ebx,[ya]
247
    xor  ecx,ecx
247
    xor  ecx,ecx
248
    mov  edx,[addr]
248
    mov  edx,[addr]
249
    mov  esi,STRLEN
249
    mov  esi,STRLEN
250
    int  0x40
250
    int  0x40
251
 
251
 
252
    ret
252
    ret
253
 
253
 
254
 
254
 
255
;   *********************************************
255
;   *********************************************
256
;   *******  WINDOW DEFINITIONS AND DRAW ********
256
;   *******  WINDOW DEFINITIONS AND DRAW ********
257
;   *********************************************
257
;   *********************************************
258
 
258
 
259
 
259
 
260
draw_window:
260
draw_window:
261
 
261
 
262
    mov  eax, 12                   ; function 12:tell os about windowdraw
262
    mov  eax, 12                   ; function 12:tell os about windowdraw
263
    mov  ebx, 1                    ; 1, start of draw
263
    mov  ebx, 1                    ; 1, start of draw
264
    int  0x40
264
    int  0x40
265
 
265
 
266
                                   ; DRAW WINDOW
266
                                   ; DRAW WINDOW
267
    xor  eax, eax                  ; function 0 : define and draw window
267
    xor  eax, eax                  ; function 0 : define and draw window
268
    mov  ebx, 160*65536+415        ; [x start] *65536 + [x size]
268
    mov  ebx, 160*65536+415        ; [x start] *65536 + [x size]
269
    mov  ecx, 160*65536+100        ; [y start] *65536 + [y size]
269
    mov  ecx, 160*65536+100        ; [y start] *65536 + [y size]
270
    mov  edx, 0x03DDDDDD           ; color of work area RRGGBB
270
    mov  edx, 0x03DDDDDD           ; color of work area RRGGBB
271
    int  0x40
271
    int  0x40
272
 
272
 
273
                                   ; WINDOW LABEL
273
                                   ; WINDOW LABEL
274
    mov  eax, 4                    ; function 4 : write text to window
274
    mov  eax, 4                    ; function 4 : write text to window
275
    mov  ebx, 8*65536+8            ; [x start] *65536 + [y start]
275
    mov  ebx, 8*65536+8            ; [x start] *65536 + [y start]
276
    mov  ecx, 0x10ffffff           ; color of text RRGGBB
276
    mov  ecx, 0x10ffffff           ; color of text RRGGBB
277
    mov  edx, header               ; pointer to text beginning
277
    mov  edx, header               ; pointer to text beginning
278
    mov  esi, header.size          ; text length
278
    mov  esi, header.size          ; text length
279
    int  0x40
279
    int  0x40
280
 
280
 
281
    mov  eax, 8                    ; COPY BUTTON
281
    mov  eax, 8                    ; COPY BUTTON
282
    mov  ebx, 20*65536+375
282
    mov  ebx, 20*65536+375
283
    mov  ecx, 63*65536+16
283
    mov  ecx, 63*65536+16
284
    mov  edx, 2
284
    mov  edx, 2
285
    mov  esi, 0xCCCCCC
285
    mov  esi, 0xCCCCCC
286
    int  0x40
286
    int  0x40
287
 
287
 
288
    mov  ebx, 105*65536+290
288
    mov  ebx, 105*65536+290
289
    mov  ecx, 33*65536+12
289
    mov  ecx, 33*65536+12
290
    mov  edx, 4
290
    mov  edx, 4
291
    mov  esi, 0xEBEBEB
291
    mov  esi, 0xEBEBEB
292
    int  0x40
292
    int  0x40
293
 
293
 
294
    mov  ebx, 105*65536+290
294
    mov  ebx, 105*65536+290
295
    mov  ecx, 49*65536+12
295
    mov  ecx, 49*65536+12
296
    mov  edx, 5
296
    mov  edx, 5
297
    mov  esi, 0xEBEBEB
297
    mov  esi, 0xEBEBEB
298
    int  0x40
298
    int  0x40
299
 
299
 
300
    mov  esi, source
300
    mov  esi, source
301
    mov  edi, text+14
301
    mov  edi, text+14
302
    mov  ecx, STRLEN
302
    mov  ecx, STRLEN
303
    rep  movsb
303
    rep  movsb
304
 
304
 
305
    mov  esi, destination
305
    mov  esi, destination
306
    mov  edi, text+STRLEN+59-45+14
306
    mov  edi, text+STRLEN+59-45+14
307
    mov  ecx, STRLEN
307
    mov  ecx, STRLEN
308
    rep  movsb
308
    rep  movsb
309
 
309
 
310
    mov  ebx, 25*65536+36   ; print filenames
310
    mov  ebx, 25*65536+36   ; print filenames
311
    xor  ecx, ecx
311
    xor  ecx, ecx
312
    mov  edx, text
312
    mov  edx, text
313
    mov  esi, STRLEN+59-45
313
    mov  esi, STRLEN+59-45
314
  newline:
314
  newline:
315
    mov  eax, 4
315
    mov  eax, 4
316
    int  0x40
316
    int  0x40
317
    add  ebx, 16
317
    add  ebx, 16
318
    add  edx, STRLEN+59-45
318
    add  edx, STRLEN+59-45
319
    cmp  [edx], byte 'x'
319
    cmp  [edx], byte 'x'
320
    jnz  newline
320
    jnz  newline
321
 
321
 
322
    mov  eax, 12                   ; function 12:tell os about windowdraw
322
    mov  eax, 12                   ; function 12:tell os about windowdraw
323
    mov  ebx, 2                    ; 2, end of draw
323
    mov  ebx, 2                    ; 2, end of draw
324
    int  0x40
324
    int  0x40
325
 
325
 
326
    ret
326
    ret
327
 
327
 
328
 
328
 
329
; DATA AREA
329
; DATA AREA
330
align 4
330
align 4
331
source_info:                 ; SOURCE FILEINFO
331
source_info:                 ; SOURCE FILEINFO
332
  .mode            dd 0      ; read file
332
  .mode            dd 0      ; read file
333
  .start_block     dd 0x0    ; block to read
333
  .start_block     dd 0x0    ; block to read
334
  .blocks          dd 0x700  ; num of blocks
334
  .blocks          dd 0x700  ; num of blocks
335
  .address         dd 0x20000
335
  .address         dd 0x20000
336
  .workarea        dd 0x10000
336
  .workarea        dd 0x10000
337
  source           db '/HD/1/KERNEL/KERNEL.MNT',0
337
  source           db '/HD/1/KERNEL/KERNEL.MNT',0
338
    times (STRLEN-23) db 0
338
    times (STRLEN-23) db 0
339
 
339
 
340
dest_info:                   ; DESTINATION FILEINFO
340
dest_info:                   ; DESTINATION FILEINFO
341
  .mode            dd 1      ; write
341
  .mode            dd 1      ; write
342
  .notused         dd 0x0    ; not used
342
  .notused         dd 0x0    ; not used
343
  .bytes2write     dd 0      ; bytes to write
343
  .bytes2write     dd 0      ; bytes to write
344
  .address         dd 0x20000
344
  .address         dd 0x20000
345
  .workarea        dd 0x10000
345
  .workarea        dd 0x10000
346
  destination      db '/RD/1/KERNEL.MNT',0
346
  destination      db '/RD/1/KERNEL.MNT',0
347
    times (STRLEN-16) db 0
347
    times (STRLEN-16) db 0
348
 
348
 
349
  align 4
349
  align 4
350
  addr  dd  0x0
350
  addr  dd  0x0
351
  ya    dd  0x0
351
  ya    dd  0x0
352
  temp  dd  0
352
  temp  dd  0
353
 
353
 
354
 
354
 
355
lsz  text,\
355
lsz  text,\
356
  ru, '   Ž’Š“„€:    |   ®áá¨ï, Ÿà®á« ¢«ì                           ',\
356
  ru, '   Ž’Š“„€:    |   ®áá¨ï, Ÿà®á« ¢«ì                           ',\
357
  ru, '    Š“„€:     |        ®¤¤ã¡­ë© ˆ¢ ­, ivan-yar@bk.ru         ',\
357
  ru, '    Š“„€:     |        ®¤¤ã¡­ë© ˆ¢ ­, ivan-yar@bk.ru         ',\
358
  ru, '                         ŠŽˆŽ‚€’œ                           ',\
358
  ru, '                         ŠŽˆŽ‚€’œ                           ',\
359
  ru, 'x',\ ; <- END MARKER, DONT DELETE
359
  ru, 'x',\ ; <- END MARKER, DONT DELETE
360
\
360
\
361
  en, 'SOURCE:       |   Russia, Yaroslavl                           ',\
361
  en, 'SOURCE:       |   Russia, Yaroslavl                           ',\
362
  en, 'DESTINATION:  |        Poddubny Ivan, ivan-yar@bk.ru          ',\
362
  en, 'DESTINATION:  |        Poddubny Ivan, ivan-yar@bk.ru          ',\
363
  en, '                   COPY SOURCE -> DESTINATION                 ',\
363
  en, '                   COPY SOURCE -> DESTINATION                 ',\
364
  en, 'x',\ ; <- END MARKER, DONT DELETE
364
  en, 'x',\ ; <- END MARKER, DONT DELETE
365
\
365
\
366
  fr, 'SOURCE:       |                                               ',\
366
  fr, 'SOURCE:       |                                               ',\
367
  fr, 'DESTINATION:  |                                               ',\
367
  fr, 'DESTINATION:  |                                               ',\
368
  fr, '                           COPIER                             ',\
368
  fr, '                           COPIER                             ',\
369
  fr, 'x'
369
  fr, 'x'
370
 
370
 
371
 
371
 
372
lsz  header,\
372
lsz  header,\
373
  ru, 'ŠŽˆŽ‚€’œ ”€‰‹',\
373
  ru, 'ŠŽˆŽ‚€’œ ”€‰‹',\
374
  en, 'SYSTREE FILE COPIER',\
374
  en, 'SYSTREE FILE COPIER',\
375
  fr, 'COPIER LE FICHIER'
375
  fr, 'COPIER LE FICHIER'
376
 
376
 
377
 
377
 
378
;  This macro is used to define a string table in format 
378
;  This macro is used to define a string table in format 
379
macro strtbl name,[string]
379
macro strtbl name,[string]
380
 {
380
 {
381
  common
381
  common
382
    label name dword
382
    label name dword
383
  forward
383
  forward
384
    local str,size
384
    local str,size
385
    dd str,size
385
    dd str,size
386
  forward
386
  forward
387
    str db string
387
    str db string
388
    size = $ - str
388
    size = $ - str
389
 }
389
 }
390
 
390
 
391
if lang eq ru
391
if lang eq ru
392
strtbl errors,\
392
strtbl errors,\
393
       "ä ©« ᪮¯¨à®¢ ­ ãᯥ譮",\
393
       "ä ©« ᪮¯¨à®¢ ­ ãᯥ譮",\
394
       "(ç⥭¨¥) ­¥ § ¤ ­  ¡ §  ¦¤",\
394
       "(ç⥭¨¥) ­¥ § ¤ ­  ¡ §  ¦¤",\
395
       "(ç⥭¨¥) ä ©«®¢ ï á¨á⥬  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï",\
395
       "(ç⥭¨¥) ä ©«®¢ ï á¨á⥬  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï",\
396
       "(ç⥭¨¥) ­¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ",\
396
       "(ç⥭¨¥) ­¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ",\
397
       "(ç⥭¨¥) ­¥ § ¤ ­ à §¤¥« ¦¤",\
397
       "(ç⥭¨¥) ­¥ § ¤ ­ à §¤¥« ¦¤",\
398
       "­¥¤®áâ â®ç­® ¯ ¬ïâ¨",\
398
       "­¥¤®áâ â®ç­® ¯ ¬ïâ¨",\
399
       "(ç⥭¨¥) ª®­¥æ ä ©« ",\
399
       "(ç⥭¨¥) ª®­¥æ ä ©« ",\
400
       "(ç⥭¨¥) ­¥¨§¢¥áâ­ ï ®è¨¡ª ",\
400
       "(ç⥭¨¥) ­¥¨§¢¥áâ­ ï ®è¨¡ª ",\
401
       "(§ ¯¨áì) ­¥ § ¤ ­ à §¤¥« ¦¤",\
401
       "(§ ¯¨áì) ­¥ § ¤ ­ à §¤¥« ¦¤",\
402
       "(§ ¯¨áì) ä ©«®¢ ï á¨á⥬  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï",\
402
       "(§ ¯¨áì) ä ©«®¢ ï á¨á⥬  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï",\
403
       "(§ ¯¨áì) ­¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ",\
403
       "(§ ¯¨áì) ­¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ",\
404
       "(§ ¯¨áì) ­¥ § ¤ ­ à §¤¥« ¦¤",\
404
       "(§ ¯¨áì) ­¥ § ¤ ­ à §¤¥« ¦¤",\
405
       "?",\
405
       "?",\
406
       "(§ ¯¨áì) ä ©« ­¥ ­ ©¤¥­",\
406
       "(§ ¯¨áì) ä ©« ­¥ ­ ©¤¥­",\
407
       "(§ ¯¨áì) ­¥¨§¢¥áâ­ ï ®è¨¡ª "
407
       "(§ ¯¨áì) ­¥¨§¢¥áâ­ ï ®è¨¡ª "
408
else
408
else
409
strtbl errors,\
409
strtbl errors,\
410
       "Success!",\
410
       "Success!",\
411
       "(read) no hd base or partition defined",\
411
       "(read) no hd base or partition defined",\
412
       "(read) unsupported file system",\
412
       "(read) unsupported file system",\
413
       "(read) unknown file system",\
413
       "(read) unknown file system",\
414
       "(read) hd partition not defined",\
414
       "(read) hd partition not defined",\
415
       "out of memory",\
415
       "out of memory",\
416
       "(read) end of file",\
416
       "(read) end of file",\
417
       "(read) unknown error",\
417
       "(read) unknown error",\
418
       "(write) no hd base or partition defined",\
418
       "(write) no hd base or partition defined",\
419
       "(write) unsupported file system",\
419
       "(write) unsupported file system",\
420
       "(write) unknown file system",\
420
       "(write) unknown file system",\
421
       "(write) hd partition not defined",\
421
       "(write) hd partition not defined",\
422
       "?",\
422
       "?",\
423
       "(write) end of file",\
423
       "(write) end of file",\
424
       "(write) unknown error"
424
       "(write) unknown error"
425
end if
425
end if
426
 
426
 
427
I_END:
427
I_END: