Subversion Repositories Kolibri OS

Rev

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

Rev 2086 Rev 2102
1
use32
1
use32
2
  org 0x0
2
  org 0x0
3
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
3
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
4
  dd 0x01
4
  dd 0x01
5
  dd start
5
  dd start
6
  dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
6
  dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
7
  dd mem
7
  dd mem
8
  dd stacktop
8
  dd stacktop
9
  dd file_name
9
  dd file_name
10
  dd sys_path
10
  dd sys_path
11
 
11
 
12
MAX_COLOR_WORD_LEN equ 40
12
MAX_COLOR_WORD_LEN equ 40
13
BUF_SIZE equ 1000 ;buffer for copy|paste
13
BUF_SIZE equ 1000 ;buffer for copy|paste
14
maxSyntaxFileSize equ 310000
14
maxSyntaxFileSize equ 310000
15
CAPT_PATH_WIDTH equ 50 ;è¨à¨­  ¯®¤¯¨á¨ ¯¥à¥¤ ⥪áâ®¢ë¬ ¯®«¥¬
15
CAPT_PATH_WIDTH equ 50 ;è¨à¨­  ¯®¤¯¨á¨ ¯¥à¥¤ ⥪áâ®¢ë¬ ¯®«¥¬
16
 
16
 
17
include '../../macros.inc'
17
include '../../macros.inc'
18
include '../../proc32.inc'
18
include '../../proc32.inc'
19
include '../../develop/libraries/box_lib/load_lib.mac'
19
include '../../develop/libraries/box_lib/load_lib.mac'
20
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
20
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
21
include '../t_edit/mem.inc'
21
include '../t_edit/mem.inc'
22
include 'te_data.inc'
22
include 'te_data.inc'
23
include 'te_work.inc' ;text work functions
23
include 'te_work.inc' ;text work functions
24
 
24
 
25
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,0
25
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,0
26
 
26
 
27
align 4
27
align 4
28
start:
28
start:
29
  mov eax,48
29
  mov eax,48
30
  mov ebx,3
30
  mov ebx,3
31
  mov ecx,sc
31
  mov ecx,sc
32
  mov edx,sizeof.system_colors
32
  mov edx,sizeof.system_colors
33
  mcall
33
  mcall
34
 
34
 
35
  mcall 68,11
35
  mcall 68,11
36
  or eax,eax
36
  or eax,eax
37
  jz button.exit
37
  jz button.exit
38
 
38
 
39
  mcall 40,0x27
39
  mcall 40,0x27
40
 
40
 
41
;-------------------------------------------------
41
;-------------------------------------------------
42
  mov ecx,maxSyntaxFileSize
42
  mov ecx,maxSyntaxFileSize
43
  stdcall mem.Alloc,ecx
43
  stdcall mem.Alloc,ecx
44
  mov [options_file],eax
44
  mov [options_file],eax
45
  mov [options_file_end],eax
45
  mov [options_file_end],eax
46
  add [options_file_end],ecx
46
  add [options_file_end],ecx
47
 
47
 
48
 
48
 
49
load_libraries l_libs_start,load_lib_end
49
load_libraries l_libs_start,load_lib_end
50
 
50
 
51
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
51
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
52
	mov	ebp,lib0
52
	mov	ebp,lib0
53
	cmp	dword [ebp+ll_struc_size-4],0
53
	cmp	dword [ebp+ll_struc_size-4],0
54
	jz	@f
54
	jz	@f
55
	mcall	-1	;exit not correct
55
	mcall	-1	;exit not correct
56
@@:
56
@@:
57
 
57
 
58
;---------------------------------------------------------------------
58
;---------------------------------------------------------------------
59
  stdcall dword[tl_data_init],dword tree1
59
  stdcall dword[tl_data_init],dword tree1
60
  copy_path fn_icon_tl_sys,sys_path,file_name,0
60
  copy_path fn_icon_tl_sys,sys_path,file_name,0
61
 
61
 
62
  mov ecx,3*256*13
62
  mov ecx,3*256*13
63
  stdcall mem.Alloc,ecx
63
  stdcall mem.Alloc,ecx
64
  mov dword[tree1.data_img_sys],eax
64
  mov dword[tree1.data_img_sys],eax
65
 
65
 
66
  mov [run_file_70.Function], 0
66
  mov [run_file_70.Function], 0
67
  mov [run_file_70.Position], 54
67
  mov [run_file_70.Position], 54
68
  mov [run_file_70.Flags], 0
68
  mov [run_file_70.Flags], 0
69
  mov [run_file_70.Count], ecx
69
  mov [run_file_70.Count], ecx
70
  mov [run_file_70.Buffer], eax
70
  mov [run_file_70.Buffer], eax
71
  mov byte[run_file_70+20], 0
71
  mov byte[run_file_70+20], 0
72
  mov [run_file_70.FileName], file_name
72
  mov [run_file_70.FileName], file_name
73
 
73
 
74
  mov eax,70 ;load icon file
74
  mov eax,70 ;load icon file
75
  mov ebx,run_file_70
75
  mov ebx,run_file_70
76
  int 0x40
76
  int 0x40
77
  cmp ebx,0
77
  cmp ebx,0
78
  jg @f
78
  jg @f
79
    mov dword[tree1.data_img_sys],0
79
    mov dword[tree1.data_img_sys],0
80
  @@:
80
  @@:
81
;---------------------------------------------------------------------
81
;---------------------------------------------------------------------
82
; ç¨â ¥¬ bmp ä ©« á ¨ª®­ª ¬¨ 㧫®¢
82
; ç¨â ¥¬ bmp ä ©« á ¨ª®­ª ¬¨ 㧫®¢
83
  copy_path fn_icon_tl_nod,sys_path,file_name,0
83
  copy_path fn_icon_tl_nod,sys_path,file_name,0
84
 
84
 
85
  mov ecx,3*256*2
85
  mov ecx,3*256*2
86
  stdcall mem.Alloc,ecx
86
  stdcall mem.Alloc,ecx
87
  mov dword[tree1.data_img],eax
87
  mov dword[tree1.data_img],eax
88
 
88
 
89
;  mov [run_file_70.Function], 0
89
;  mov [run_file_70.Function], 0
90
;  mov [run_file_70.Position], 54
90
;  mov [run_file_70.Position], 54
91
;  mov [run_file_70.Flags], 0
91
;  mov [run_file_70.Flags], 0
92
  mov [run_file_70.Count], ecx
92
  mov [run_file_70.Count], ecx
93
  mov [run_file_70.Buffer], eax
93
  mov [run_file_70.Buffer], eax
94
;  mov byte[run_file_70+20], 0
94
;  mov byte[run_file_70+20], 0
95
;  mov [run_file_70.FileName], file_name
95
;  mov [run_file_70.FileName], file_name
96
 
96
 
97
  mov eax,70 ;load icon file
97
  mov eax,70 ;load icon file
98
  mov ebx,run_file_70
98
  mov ebx,run_file_70
99
  int 0x40
99
  int 0x40
100
  cmp ebx,0
100
  cmp ebx,0
101
  jg @f
101
  jg @f
102
    mov dword[tree1.data_img],0
102
    mov dword[tree1.data_img],0
103
  @@:
103
  @@:
104
;------------------------------------------------------------------------------
104
;------------------------------------------------------------------------------
105
  copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
105
  copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
106
  mov eax,70
106
  mov eax,70
107
  mov ebx,tree_file_struct
107
  mov ebx,tree_file_struct
108
  int 0x40
108
  int 0x40
109
 
109
 
110
cmp ebx,-1
110
cmp ebx,-1
111
je .end_dir_init
111
je .end_dir_init
112
 
112
 
113
  mov eax,dir_mem
113
  mov eax,dir_mem
114
  add eax,32+4+1+3+4*6+8
114
  add eax,32+4+1+3+4*6+8
115
mov ecx,ebx
115
mov ecx,ebx
116
@@:
116
@@:
117
  cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..'
117
  cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..'
118
  je .filter
118
  je .filter
119
    push dword tree1
119
    push dword tree1
120
    push dword 0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
120
    push dword 0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
121
    push dword eax
121
    push dword eax
122
    call dword[tl_node_add]
122
    call dword[tl_node_add]
123
 
123
 
124
    stdcall dword[tl_cur_next],tree1
124
    stdcall dword[tl_cur_next],tree1
125
  .filter:
125
  .filter:
126
  add eax,304
126
  add eax,304
127
  loop @b
127
  loop @b
-
 
128
  stdcall dword[tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ­  ­ ç «® ᯨ᪠
128
.end_dir_init:
129
.end_dir_init:
129
 
130
 
130
;--- load color option file ---
131
;--- load color option file ---
131
stdcall [ted_init], tedit0
132
stdcall [ted_init], tedit0
132
mov byte[file_name],0
133
mov byte[file_name],0
133
 
134
 
134
align 4
135
align 4
135
red_win:
136
red_win:
136
	call draw_window
137
	call draw_window
137
 
138
 
138
align 4
139
align 4
139
still:
140
still:
140
  mcall 10
141
  mcall 10
141
 
142
 
142
  cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
143
  cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
143
  jz red_win
144
  jz red_win
144
  cmp al,2
145
  cmp al,2
145
  jz key
146
  jz key
146
  cmp al,3
147
  cmp al,3
147
  jz button
148
  jz button
148
  cmp al,6
149
  cmp al,6
149
  jz mouse
150
  jz mouse
150
 
151
 
151
  jmp still
152
  jmp still
152
 
153
 
153
 
154
 
154
align 4
155
align 4
155
draw_window:
156
draw_window:
156
	pushad
157
	pushad
157
	mcall 12,1
158
	mcall 12,1
158
 
159
 
159
	mov edx,[sc.work]
160
	mov edx,[sc.work]
160
	or  edx,0x33000000
161
	or  edx,0x33000000
161
	mov edi,hed
162
	mov edi,hed
162
	mcall 0,<10,555>,<10,333>
163
	mcall 0,<10,555>,<10,333>
163
 
164
 
164
	mcall 9,procinfo,-1
165
	mcall 9,procinfo,-1
165
 
166
 
166
	mov eax,8 ;ª­®¯ª 
167
	mov eax,8 ;ª­®¯ª 
167
	mov ebx,5*65536+90
168
	mov ebx,5*65536+90
168
	mov ecx,195*65536+20
169
	mov ecx,195*65536+20
169
	mov edx,200
170
	mov edx,200
170
	mov esi,[sc.work_button];0xd0
171
	mov esi,[sc.work_button];0xd0
171
	mcall
172
	mcall
172
 
173
 
173
	;mov eax,8
174
	;mov eax,8
174
	mov ebx,100*65536+85
175
	mov ebx,100*65536+85
175
	mov ecx,195*65536+20
176
	mov ecx,195*65536+20
176
	mov edx,201
177
	mov edx,201
177
	mov esi,0xd00000
178
	mov esi,0xd00000
178
	mcall
179
	mcall
179
 
180
 
180
	mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
181
	mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
181
	mov ebx,10*65536+200
182
	mov ebx,10*65536+200
182
	mov ecx,[sc.work_button_text]
183
	mov ecx,[sc.work_button_text]
183
	or  ecx,0x80000000
184
	or  ecx,0x80000000
184
	mov edx,txt122
185
	mov edx,txt122
185
	mcall
186
	mcall
186
 
187
 
187
	mov ebx,105*65536+200
188
	mov ebx,105*65536+200
188
	mov ecx,0xffff00
189
	mov ecx,0xffff00
189
	or  ecx,0x80000000
190
	or  ecx,0x80000000
190
	mov edx,txt148
191
	mov edx,txt148
191
	mcall
192
	mcall
192
 
193
 
193
	mov ebx,195*65536+10
194
	mov ebx,195*65536+10
194
	mov ecx,[sc.work_text]
195
	mov ecx,[sc.work_text]
195
	or  ecx,0x80000000
196
	or  ecx,0x80000000
196
	mov edx,txt_inp_file
197
	mov edx,txt_inp_file
197
	int 0x40
198
	int 0x40
198
 
199
 
199
	add ebx,20
200
	add ebx,20
200
	mov edx,txt_out_file
201
	mov edx,txt_out_file
201
	int 0x40
202
	int 0x40
202
 
203
 
203
	mov ebx,(215+CAPT_PATH_WIDTH) shl 16 + 10
204
	mov ebx,(215+CAPT_PATH_WIDTH) shl 16 + 10
204
	mov edx,file_name
205
	mov edx,file_name
205
	int 0x40
206
	int 0x40
206
 
207
 
207
	stdcall [edit_box_draw],dword edit1
208
	stdcall [edit_box_draw],dword edit1
208
	stdcall [tl_draw],dword tree1
209
	stdcall [tl_draw],dword tree1
209
 
210
 
210
	;scroll 1
211
	;scroll 1
211
	mov [ws_dir_lbox.all_redraw],1
212
	mov [ws_dir_lbox.all_redraw],1
212
	stdcall [scrollbar_ver_draw],dword ws_dir_lbox
213
	stdcall [scrollbar_ver_draw],dword ws_dir_lbox
213
	stdcall [ted_draw], tedit0
214
	stdcall [ted_draw], tedit0
214
 
215
 
215
	mcall 12,2
216
	mcall 12,2
216
	popad
217
	popad
217
	ret
218
	ret
218
 
219
 
219
align 4
220
align 4
220
mouse:
221
mouse:
221
	stdcall [tl_mouse],tree1
222
	stdcall [tl_mouse],tree1
222
	stdcall [edit_box_mouse],edit1
223
	stdcall [edit_box_mouse],edit1
223
	stdcall [ted_mouse], tedit0
224
	stdcall [ted_mouse], tedit0
224
	jmp still
225
	jmp still
225
 
226
 
226
 
227
 
227
align 4
228
align 4
228
key:
229
key:
229
	mcall 2
230
	mcall 2
230
	stdcall [tl_key],tree1
231
	stdcall [tl_key],tree1
231
	stdcall [edit_box_key],edit1
232
	stdcall [edit_box_key],edit1
232
;;;stdcall [ted_key], tedit0, conv_tabl,esi
233
;;;stdcall [ted_key], tedit0, conv_tabl,esi
233
	jmp still
234
	jmp still
234
 
235
 
235
align 4
236
align 4
236
button:
237
button:
237
;  cmp [menu_active],1 ;¥á«¨ ­ ¦ «¨ ¬¥­î, â® á­ ç «  ॠªæ¨ï ­  ¬¥­î
238
;  cmp [menu_active],1 ;¥á«¨ ­ ¦ «¨ ¬¥­î, â® á­ ç «  ॠªæ¨ï ­  ¬¥­î
238
;  jne @f ;mouse.menu_bar_1
239
;  jne @f ;mouse.menu_bar_1
239
;    mov [menu_active],0
240
;    mov [menu_active],0
240
;    jmp still
241
;    jmp still
241
;  @@:
242
;  @@:
242
 
243
 
243
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
244
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
244
 
245
 
245
  cmp ah,200
246
  cmp ah,200
246
  jne @f
247
  jne @f
247
    call but_OpenSyntax
248
    call but_OpenSyntax
248
  @@:
249
  @@:
249
  cmp ah,201
250
  cmp ah,201
250
  jne @f
251
  jne @f
251
    call but_SaveSyntax
252
    call but_SaveSyntax
252
  @@:
253
  @@:
253
 
254
 
254
  cmp ah,1
255
  cmp ah,1
255
  jne still
256
  jne still
256
.exit:
257
.exit:
257
  ;push eax
258
  ;push eax
258
 
259
 
259
  stdcall mem.Free,[options_file]
260
  stdcall mem.Free,[options_file]
260
 
261
 
261
  stdcall [tl_data_clear], tree1
262
  stdcall [tl_data_clear], tree1
262
  stdcall [ted_delete], tedit0
263
  stdcall [ted_delete], tedit0
263
  mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
264
  mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
264
 
265
 
265
align 4
266
align 4
266
but_OpenSyntax:
267
but_OpenSyntax:
267
  stdcall [tl_node_get_data],tree1
268
  stdcall [tl_node_get_data],tree1
268
  pop dword [fn_col_option]
269
  pop dword [fn_col_option]
269
  call InitColText
270
  call InitColText
270
  ret
271
  ret
271
 
272
 
272
align 4
273
align 4
273
but_SaveSyntax:
274
but_SaveSyntax:
274
	stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
275
	stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
275
	ret
276
	ret
276
 
277
 
277
align 4
278
align 4
278
but_ctrl_o:
279
but_ctrl_o:
279
	push eax
280
	push eax
280
	call get_wnd_in_focus
281
	call get_wnd_in_focus
281
	cmp eax,0
282
	cmp eax,0
282
	je @f
283
	je @f
283
		stdcall [ted_open_file], eax,str_file_70,[edit1.text]
284
		stdcall [ted_open_file], eax,str_file_70,[edit1.text]
284
	@@:
285
	@@:
285
	pop eax
286
	pop eax
286
	ret
287
	ret
287
 
288
 
288
;ᮧ¤ ­¨¥ ­®¢®£® ä ©« 
289
;ᮧ¤ ­¨¥ ­®¢®£® ä ©« 
289
align 4
290
align 4
290
but_ctrl_n:
291
but_ctrl_n:
291
	push eax
292
	push eax
292
	call get_wnd_in_focus
293
	call get_wnd_in_focus
293
	cmp eax,0
294
	cmp eax,0
294
	je @f
295
	je @f
295
		stdcall [ted_clear], eax,1
296
		stdcall [ted_clear], eax,1
296
		stdcall [ted_draw], eax
297
		stdcall [ted_draw], eax
297
	@@:
298
	@@:
298
	pop eax
299
	pop eax
299
	ret
300
	ret
300
 
301
 
301
;®¯à¥¤¥«ï¥¬ ª ª®¥ ¨§ ®ª®­ । ªâ®à  ¢ 䮪ãá¥
302
;®¯à¥¤¥«ï¥¬ ª ª®¥ ¨§ ®ª®­ । ªâ®à  ¢ 䮪ãá¥
302
align 4
303
align 4
303
get_wnd_in_focus:
304
get_wnd_in_focus:
304
	xor eax,eax
305
	xor eax,eax
305
	cmp dword[el_focus],tedit0
306
	cmp dword[el_focus],tedit0
306
	jne @f
307
	jne @f
307
		mov eax,tedit0
308
		mov eax,tedit0
308
	@@:
309
	@@:
309
	;cmp dword[el_focus],tedit1
310
	;cmp dword[el_focus],tedit1
310
	;jne @f
311
	;jne @f
311
	;       mov eax,tedit1
312
	;       mov eax,tedit1
312
	;@@:
313
	;@@:
313
	ret
314
	ret
314
 
315
 
315
hed db 'TextEditor syntax file converter 20.08.11',0 ;¯®¤¯¨áì ®ª­ 
316
hed db 'TextEditor syntax file converter 22.08.11',0 ;¯®¤¯¨áì ®ª­ 
316
 
317
 
317
txt122 db '‡ £à. ä ©«',0
318
txt122 db '‡ £à. ä ©«',0
318
txt148 db '‘®åà. ä ©«',0
319
txt148 db '‘®åà. ä ©«',0
319
txt_inp_file db 'ˆáå. ä ©«:',0
320
txt_inp_file db 'ˆáå. ä ©«:',0
320
txt_out_file db '‚ëå. ä ©«:',0
321
txt_out_file db '‚ëå. ä ©«:',0
321
 
322
 
322
edit1 edit_box 305+16-CAPT_PATH_WIDTH, 215+CAPT_PATH_WIDTH, 25, 0xffffff, 0xff, 0xff0000, 0, 0x80, MAX_COLOR_WORD_LEN, ed_buffer.127, mouse_dd, 0
323
edit1 edit_box 305+16-CAPT_PATH_WIDTH, 215+CAPT_PATH_WIDTH, 25, 0xffffff, 0xff, 0xff0000, 0, 0x80, MAX_COLOR_WORD_LEN, ed_buffer.127, mouse_dd, 0
323
 
324
 
324
ed_buffer: ;⥪áâ ¤«ï edit
325
ed_buffer: ;⥪áâ ¤«ï edit
325
  .127: rb MAX_COLOR_WORD_LEN+2
326
  .127: rb MAX_COLOR_WORD_LEN+2
326
 
327
 
327
err_message_found_lib0	 db 'Sorry I cannot found library box_lib.obj',0
328
err_message_found_lib0	 db 'Sorry I cannot found library box_lib.obj',0
328
head_f_i0:
329
head_f_i0:
329
head_f_l0	  db 'System error',0
330
head_f_l0	  db 'System error',0
330
err_message_import0	 db 'Error on load import library box_lib.obj',0
331
err_message_import0	 db 'Error on load import library box_lib.obj',0
331
err_message_found_lib1	db 'Sorry I cannot found library msgbox.obj',0
332
err_message_found_lib1	db 'Sorry I cannot found library msgbox.obj',0
332
 
333
 
333
;library structures
334
;library structures
334
l_libs_start:
335
l_libs_start:
335
  lib0 l_libs boxlib_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l0, boxlib_import,err_message_import0, head_f_i0
336
  lib0 l_libs boxlib_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l0, boxlib_import,err_message_import0, head_f_i0
336
load_lib_end:
337
load_lib_end:
337
 
338
 
338
 
339
 
339
i_end:
340
i_end:
340
	rb 1024
341
	rb 1024
341
	align 16
342
	align 16
342
	procinfo process_information
343
	procinfo process_information
343
	thread:
344
	thread:
344
		rb 1024
345
		rb 1024
345
stacktop:
346
stacktop:
346
  sys_path:
347
  sys_path:
347
    rb 4096
348
    rb 4096
348
  file_name:
349
  file_name:
349
    rb 4096
350
    rb 4096
350
  file_name_rez:
351
  file_name_rez:
351
    rb 4096
352
    rb 4096
352
  file_info:
353
  file_info:
353
    rb 40
354
    rb 40
354
mem:
355
mem: