Subversion Repositories Kolibri OS

Rev

Rev 3014 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3014 Rev 9587
1
use32
1
use32
2
  org	 0x0
2
  org	 0x0
3
 
3
 
4
  db	 'MENUET01'
4
  db	 'MENUET01'
5
  dd	 0x01
5
  dd	 0x01
6
  dd	 START
6
  dd	 START
7
  dd	 I_END
7
  dd	 I_END
8
  dd	 0x1000
8
  dd	 0x1000
9
  dd	 0x1000
9
  dd	 0x1000
10
  dd	 0x0
10
  dd	 0x0
11
  dd	 0x0
11
  dd	 0x0
12
 
12
 
13
FALSE = 0
13
FALSE = 0
14
TRUE  = 1
14
TRUE  = 1
15
 
15
 
16
include '../../../../../proc32.inc'
16
include '../../../../../proc32.inc'
17
include '../../../../../macros.inc'
17
include '../../../../../macros.inc'
18
include '../../libio/libio.inc'
18
include '../../libio/libio.inc'
19
include '../../../../../dll.inc'
19
include '../../../../../dll.inc'
20
 
20
 
21
yy dd 20
21
yy dd 20
22
 
22
 
23
proc draw xx,color,key,val
23
proc draw xx,color,key,val
24
	pushad
24
	pushad
25
 
25
 
26
	mov	esi,[key]
26
	mov	esi,[key]
27
	mov	edi,buf
27
	mov	edi,buf
28
	cld
28
	cld
29
	mov	al,"'"
29
	mov	al,"'"
30
	stosb
30
	stosb
31
    @@: lodsb
31
    @@: lodsb
32
	stosb
32
	stosb
33
	or	al,al
33
	or	al,al
34
	jnz	@b
34
	jnz	@b
35
	mov	word[edi-1],"'"
35
	mov	word[edi-1],"'"
36
 
36
 
37
	mov	esi,[val]
37
	mov	esi,[val]
38
	or	esi,esi
38
	or	esi,esi
39
	je	.noval
39
	je	.noval
40
	mov	eax," = '"
40
	mov	eax," = '"
41
	stosd
41
	stosd
42
    @@: lodsb
42
    @@: lodsb
43
	stosb
43
	stosb
44
	or	al,al
44
	or	al,al
45
	jnz	@b
45
	jnz	@b
46
	mov	word[edi-1],"'"
46
	mov	word[edi-1],"'"
47
  .noval:
47
  .noval:
48
 
48
 
49
	or	[color],0x80000000
49
	or	[color],0x80000000
50
	mcall	4,<[xx],[yy]>,[color],buf
50
	mcall	4,<[xx],[yy]>,[color],buf
51
	add	[yy],10
51
	add	[yy],10
52
	popad
52
	popad
53
	ret
53
	ret
54
endp
54
endp
55
 
55
 
56
proc callb_k f_name,sec_name,key_name,key_val
56
proc callb_k f_name,sec_name,key_name,key_val
57
	stdcall draw,224,0x0000FF,[key_name],[key_val]
57
	stdcall draw,224,0x0000FF,[key_name],[key_val]
58
	mov	eax,TRUE
58
	mov	eax,TRUE
59
	ret
59
	ret
60
endp
60
endp
61
 
61
 
62
proc callb f_name,sec_name
62
proc callb f_name,sec_name
63
	stdcall draw,200,0xFF0000,[sec_name],0
63
	stdcall draw,200,0xFF0000,[sec_name],0
64
	invoke	ini.enum_keys,[f_name],[sec_name],callb_k
64
	invoke	ini.enum_keys,[f_name],[sec_name],callb_k
65
	mov	eax,TRUE
65
	mov	eax,TRUE
66
	ret
66
	ret
67
endp
67
endp
68
 
68
 
69
;---------------------------------------------------------------------
69
;---------------------------------------------------------------------
70
;---  ÍÀ×ÀËÎ ÏÐÎÃÐÀÌÌÛ  ----------------------------------------------
70
;---  ÍÀ×ÀËÎ ÏÐÎÃÐÀÌÌÛ  ----------------------------------------------
71
;---------------------------------------------------------------------
71
;---------------------------------------------------------------------
72
 
72
 
73
s_key1 db "LeftViewMode",0
73
s_key1 db "LeftViewMode",0
74
s_key2 db "RightViewMode",0
74
s_key2 db "RightViewMode",0
75
 
75
 
76
macro wildcard_test_data label1, label2, label3, [str1, str2, res]
76
macro wildcard_test_data label1, label2, label3, [str1, str2, res]
77
{
77
{
78
  common
78
  common
79
    label label1
79
    label label1
80
  forward
80
  forward
81
    local ..lbl
81
    local ..lbl
82
    dd ..lbl - $
82
    dd ..lbl - $
83
    db str1,0
83
    db str1,0
84
    ..lbl:
84
    ..lbl:
85
  common
85
  common
86
    dd 0
86
    dd 0
87
    label label2
87
    label label2
88
  forward
88
  forward
89
    local ..lbl
89
    local ..lbl
90
    dd ..lbl - $
90
    dd ..lbl - $
91
    db str2,0
91
    db str2,0
92
    ..lbl:
92
    ..lbl:
93
  common
93
  common
94
    label label3
94
    label label3
95
  forward
95
  forward
96
    if res = "t"
96
    if res = "t"
97
      dd 1
97
      dd 1
98
    else
98
    else
99
      dd 0
99
      dd 0
100
    end if
100
    end if
101
}
101
}
102
 
102
 
103
wildcard_test_data _str1, _str2, _str3, \
103
wildcard_test_data _str1, _str2, _str3, \
104
  ""	       ,""	 ,"t",	  ""		,"a"	    ,"f", \
104
  ""	       ,""	 ,"t",	  ""		,"a"	    ,"f", \
105
  "a"	       ,"a"	 ,"t",	  "a"		,"b"	    ,"f", \
105
  "a"	       ,"a"	 ,"t",	  "a"		,"b"	    ,"f", \
106
  "?"	       ,"b"	 ,"t",	  "??"		,"bc"	    ,"t", \
106
  "?"	       ,"b"	 ,"t",	  "??"		,"bc"	    ,"t", \
107
  "?c"	       ,"bc"	 ,"t",	  "b?"		,"bc"	    ,"t", \
107
  "?c"	       ,"bc"	 ,"t",	  "b?"		,"bc"	    ,"t", \
108
  "[a-z]"      ,"b"	 ,"t",	  "[A-Z]"	,"b"	    ,"f", \
108
  "[a-z]"      ,"b"	 ,"t",	  "[A-Z]"	,"b"	    ,"f", \
109
  "*"	       ,"a"	 ,"t",	  "**"		,"a"	    ,"t", \
109
  "*"	       ,"a"	 ,"t",	  "**"		,"a"	    ,"t", \
110
  "*"	       ,""	 ,"t",	  "*bc*hij"	,"abcdfghij","t", \
110
  "*"	       ,""	 ,"t",	  "*bc*hij"	,"abcdfghij","t", \
111
  "*b*a*"      ,"b"	 ,"f",	  "*bc*hik"	,"abcdfghij","f", \
111
  "*b*a*"      ,"b"	 ,"f",	  "*bc*hik"	,"abcdfghij","f", \
112
  "abc*"       ,"abc"	 ,"t",	  "abc**"	,"abc"	    ,"t", \
112
  "abc*"       ,"abc"	 ,"t",	  "abc**"	,"abc"	    ,"t", \
113
  "[^]]"       ,"^"	 ,"t",	  "[^]]"	,"]"	    ,"f", \
113
  "[^]]"       ,"^"	 ,"t",	  "[^]]"	,"]"	    ,"f", \
114
  "[^abc]"     ,"d"	 ,"t",	  "[^abc]"	,"b"	    ,"f", \
114
  "[^abc]"     ,"d"	 ,"t",	  "[^abc]"	,"b"	    ,"f", \
115
  "*???"       ,"abc"	 ,"t",	  "*???"	,"ab"	    ,"f", \
115
  "*???"       ,"abc"	 ,"t",	  "*???"	,"ab"	    ,"f", \
116
  "*???"       ,"abcd"	 ,"t",	  "*?*" 	,"abcd"     ,"t", \
116
  "*???"       ,"abcd"	 ,"t",	  "*?*" 	,"abcd"     ,"t", \
117
  "*bc"        ,"abc"	 ,"t",	  "*cc" 	,"abc"	    ,"f", \
117
  "*bc"        ,"abc"	 ,"t",	  "*cc" 	,"abc"	    ,"f", \
118
  "[a-c]*"     ,"d"	 ,"f",	  "*[a-e]"	,"d"	    ,"t", \
118
  "[a-c]*"     ,"d"	 ,"f",	  "*[a-e]"	,"d"	    ,"t", \
119
  "*a*"        ,"de"	 ,"f",	  "*[a-c]"	,"d"	    ,"f", \
119
  "*a*"        ,"de"	 ,"f",	  "*[a-c]"	,"d"	    ,"f", \
120
  "[a-c]"      ,"d"	 ,"f",	  "[b-d]"	,"a"	    ,"f", \
120
  "[a-c]"      ,"d"	 ,"f",	  "[b-d]"	,"a"	    ,"f", \
121
  "[]abc]"     ,"b"	 ,"t",	  "[]abc]"	,"d"	    ,"f", \
121
  "[]abc]"     ,"b"	 ,"t",	  "[]abc]"	,"d"	    ,"f", \
122
  "[z-a]"      ,"-"	 ,"t",	  "[z-a]"	,"b"	    ,"f", \
122
  "[z-a]"      ,"-"	 ,"t",	  "[z-a]"	,"b"	    ,"f", \
123
  "[A-]"       ,"-"	 ,"t",	  "[A-]"	,"]"	    ,"f", \
123
  "[A-]"       ,"-"	 ,"t",	  "[A-]"	,"]"	    ,"f", \
124
  "[-a]"       ,"-"	 ,"t",	  "[-[]"	,"-"	    ,"t", \
124
  "[-a]"       ,"-"	 ,"t",	  "[-[]"	,"-"	    ,"t", \
125
  "[-]"        ,"-"	 ,"t",	  "[^-b]"	,"a"	    ,"t", \
125
  "[-]"        ,"-"	 ,"t",	  "[^-b]"	,"a"	    ,"t", \
126
  "[^-b]"      ,"-"	 ,"f",	  "[-b]"	,"a"	    ,"f", \
126
  "[^-b]"      ,"-"	 ,"f",	  "[-b]"	,"a"	    ,"f", \
127
  "[a-g]lorian","florian","t",	  "[a-g]*rorian","f"	    ,"f", \
127
  "[a-g]lorian","florian","t",	  "[a-g]*rorian","f"	    ,"f", \
128
  "*???*"      ,"123"	 ,"t"
128
  "*???*"      ,"123"	 ,"t"
129
 
129
 
130
START:
130
START:
131
	mcall	68,11
131
	mcall	68,11
132
 
132
 
133
	stdcall dll.Load,@IMPORT
133
	stdcall dll.Load,@IMPORT
134
	or	eax,eax
134
	or	eax,eax
135
	jnz	exit
135
	jnz	exit
136
 
136
 
137
@^ ; commenting out, file.aux.match_wildcard is no longer exported
137
@^ ; commenting out, file.aux.match_wildcard is no longer exported
138
	mov	esi,_str1 + 4
138
	mov	esi,_str1 + 4
139
	mov	edi,_str2 + 4
139
	mov	edi,_str2 + 4
140
	mov	ecx,_str3
140
	mov	ecx,_str3
141
	xor	ebx,ebx
141
	xor	ebx,ebx
142
	inc	ebx
142
	inc	ebx
143
    @@: invoke	file.aux.match_wildcard,edi,esi,0
143
    @@: invoke	file.aux.match_wildcard,edi,esi,0
144
	cmp	eax,[ecx]
144
	cmp	eax,[ecx]
145
	je	.ok
145
	je	.ok
146
	mcall	-1
146
	mcall	-1
147
  .ok:	inc	ebx
147
  .ok:	inc	ebx
148
	add	esi,[esi-4]
148
	add	esi,[esi-4]
149
	add	edi,[edi-4]
149
	add	edi,[edi-4]
150
	add	ecx,4
150
	add	ecx,4
151
	cmp	dword[esi-4],0
151
	cmp	dword[esi-4],0
152
	jnz	@b
152
	jnz	@b
153
^@
153
^@
154
 
154
 
155
	invoke	ini.set_int,s_ini,s_sec,s_key1,100
155
	invoke	ini.set_int,s_ini,s_sec,s_key1,100
156
	invoke	ini.set_int,s_ini,s_sec,s_key2,101
156
	invoke	ini.set_int,s_ini,s_sec,s_key2,101
157
 
157
 
158
	invoke	ini.get_int,s_ini,s_sec,s_key1,-1
158
	invoke	ini.get_int,s_ini,s_sec,s_key1,-1
159
	cmp	eax,100
159
	cmp	eax,100
160
	jne	exit
160
	jne	exit
161
	invoke	ini.get_int,s_ini,s_sec,s_key2,-1
161
	invoke	ini.get_int,s_ini,s_sec,s_key2,-1
162
	cmp	eax,101
162
	cmp	eax,101
163
	jne	exit
163
	jne	exit
164
 
164
 
165
	mov	dword[buf],'102'
165
	mov	dword[buf],'102'
166
	invoke	ini.set_str,s_ini,s_sec,s_key1,buf,3
166
	invoke	ini.set_str,s_ini,s_sec,s_key1,buf,3
167
	mov	dword[buf],'103'
167
	mov	dword[buf],'103'
168
	invoke	ini.set_str,s_ini,s_sec,s_key2,buf,3
168
	invoke	ini.set_str,s_ini,s_sec,s_key2,buf,3
169
 
169
 
170
	invoke	ini.get_str,s_ini,s_sec,s_key1,buf,1024,0
170
	invoke	ini.get_str,s_ini,s_sec,s_key1,buf,1024,0
171
	cmp	dword[buf],'102'
171
	cmp	dword[buf],'102'
172
	jne	exit
172
	jne	exit
173
	invoke	ini.get_str,s_ini,s_sec,s_key2,buf,1024,0
173
	invoke	ini.get_str,s_ini,s_sec,s_key2,buf,1024,0
174
	cmp	dword[buf],'103'
174
	cmp	dword[buf],'103'
175
	jne	exit
175
	jne	exit
176
 
176
 
177
	invoke	ini.enum_sections,s_ini,callb
177
	invoke	ini.enum_sections,s_ini,callb
178
 
178
 
179
;       invoke  file.open,s_ininame,O_WRITE+O_CREATE
179
;       invoke  file.open,s_ininame,O_WRITE+O_CREATE
180
;       or      eax,eax
180
;       or      eax,eax
181
;       jnz     @f
181
;       jnz     @f
182
;       int3
182
;       int3
183
;   @@: mov     [fh],eax
183
;   @@: mov     [fh],eax
184
;       invoke  file.seek,[fh],SEEK_SET,8192
184
;       invoke  file.seek,[fh],SEEK_SET,8192
185
;       invoke  file.write,[fh],s_ininame,16
185
;       invoke  file.write,[fh],s_ininame,16
186
;       invoke  file.seteof,[fh]
186
;       invoke  file.seteof,[fh]
187
;       invoke  file.close,[fh]
187
;       invoke  file.close,[fh]
188
 
188
 
189
red:
189
red:
190
 
190
 
191
	call	draw_window
191
	call	draw_window
192
 
192
 
193
;---------------------------------------------------------------------
193
;---------------------------------------------------------------------
194
;---  ÖÈÊË ÎÁÐÀÁÎÒÊÈ ÑÎÁÛÒÈÉ  ----------------------------------------
194
;---  ÖÈÊË ÎÁÐÀÁÎÒÊÈ ÑÎÁÛÒÈÉ  ----------------------------------------
195
;---------------------------------------------------------------------
195
;---------------------------------------------------------------------
196
 
196
 
197
still:
197
still:
198
	mcall	10
198
	mcall	10
199
 
199
 
200
	cmp	eax,1
200
	cmp	eax,1
201
	je	red
201
	je	red
202
	cmp	eax,2
202
	cmp	eax,2
203
	je	key
203
	je	key
204
	cmp	eax,3
204
	cmp	eax,3
205
	je	button
205
	je	button
206
 
206
 
207
	jmp	still
207
	jmp	still
208
 
208
 
209
;---------------------------------------------------------------------
209
;---------------------------------------------------------------------
210
 
210
 
211
  key:
211
  key:
212
	mcall	2
212
	mcall	2
213
	jmp	still
213
	jmp	still
214
 
214
 
215
;---------------------------------------------------------------------
215
;---------------------------------------------------------------------
216
 
216
 
217
  button:
217
  button:
218
	mcall	17
218
	mcall	17
219
 
219
 
220
	cmp	ah,1
220
	cmp	ah,1
221
	jne	still
221
	jne	still
222
 
222
 
223
  exit:
223
  exit:
224
	mcall	-1
224
	mcall	-1
225
 
225
 
226
;---------------------------------------------------------------------
226
;---------------------------------------------------------------------
227
;---  ÎÏÐÅÄÅËÅÍÈÅ È ÎÒÐÈÑÎÂÊÀ ÎÊÍÀ  ----------------------------------
227
;---  ÎÏÐÅÄÅËÅÍÈÅ È ÎÒÐÈÑÎÂÊÀ ÎÊÍÀ  ----------------------------------
228
;---------------------------------------------------------------------
228
;---------------------------------------------------------------------
229
 
229
 
230
ctx dd ?
230
ctx dd ?
231
 
231
 
232
draw_window:
232
draw_window:
233
	invoke	gfx.open,TRUE
233
	invoke	gfx.open,TRUE
234
	mov	[ctx],eax
234
	mov	[ctx],eax
235
	mcall	0,<200,700>,<200,200>,0x33FFFFFF,,s_header
235
	mcall	0,<200,700>,<200,200>,0x33FFFFFF,,s_header
236
	invoke	gfx.pen.color,[ctx],0x00FF0000
236
	invoke	gfx.pen.color,[ctx],0x00FF0000
237
	invoke	gfx.line,[ctx],0,0,50,50
237
	invoke	gfx.line,[ctx],0,0,50,50
238
	invoke	gfx.framerect,[ctx],10,10,100,70
238
	invoke	gfx.framerect,[ctx],10,10,100,70
239
	invoke	gfx.brush.color,[ctx],0x000000FF
239
	invoke	gfx.brush.color,[ctx],0x000000FF
240
	invoke	gfx.fillrect,[ctx],15,15,95,65
240
	invoke	gfx.fillrect,[ctx],15,15,95,65
241
	invoke	gfx.pen.color,[ctx],0x00008800
241
	invoke	gfx.pen.color,[ctx],0x00008800
242
	invoke	gfx.brush.color,[ctx],0x00CCCCFF
242
	invoke	gfx.brush.color,[ctx],0x00CCCCFF
243
	invoke	gfx.rectangle,[ctx],20,20,90,60
243
	invoke	gfx.rectangle,[ctx],20,20,90,60
244
	invoke	gfx.move.to,[ctx],13,5
244
	invoke	gfx.move.to,[ctx],13,5
245
	invoke	gfx.line.to,[ctx],105,5
245
	invoke	gfx.line.to,[ctx],105,5
246
	invoke	gfx.line.to,[ctx],105,75
246
	invoke	gfx.line.to,[ctx],105,75
247
	invoke	gfx.line.to,[ctx],5,75
247
	invoke	gfx.line.to,[ctx],5,75
248
	invoke	gfx.line.to,[ctx],5,13
248
	invoke	gfx.line.to,[ctx],5,13
249
	invoke	gfx.line.to,[ctx],13,5
249
	invoke	gfx.line.to,[ctx],13,5
250
	invoke	gfx.pen.color,[ctx],0x00888888
250
	invoke	gfx.pen.color,[ctx],0x00888888
251
	invoke	gfx.polyline,[ctx],poly_points,11
251
	invoke	gfx.polyline,[ctx],poly_points,11
252
	invoke	gfx.close,[ctx]
252
	invoke	gfx.close,[ctx]
253
 
253
 
254
	mov	[yy],10
254
	mov	[yy],10
255
	invoke	ini.enum_sections,s_ini,callb
255
	invoke	ini.enum_sections,s_ini,callb
256
 
256
 
257
	invoke	file.find_first,_f_path,_f_mask,FA_ANY-FA_FOLDER
257
	invoke	file.find_first,_f_path,_f_mask,FA_ANY-FA_FOLDER
258
	cmp	eax,0
258
	cmp	eax,0
259
	jle	.finished
259
	jle	.finished
260
	mov	ebp,eax
260
	mov	ebp,eax
261
	mov	[yy],10
261
	mov	[yy],10
262
    @@: lea	edx,[ebp+FileInfo.FileName]
262
    @@: lea	edx,[ebp+FileInfo.FileName]
263
	mcall	4,<450,[yy]>,0x80000000
263
	mcall	4,<450,[yy]>,0x80000000
264
	add	[yy],10
264
	add	[yy],10
265
	invoke	file.find_next,ebp
265
	invoke	file.find_next,ebp
266
	cmp	eax,0
266
	cmp	eax,0
267
	jg	@b
267
	jg	@b
268
	invoke	file.find_close,ebp
268
	invoke	file.find_close,ebp
269
 
269
 
270
  .finished:
270
  .finished:
271
 
271
 
272
	ret
272
	ret
273
 
273
 
274
_f_path db '/rd/1/lib',0
274
_f_path db '/sys/lib',0
275
_f_mask db '*ini*',0
275
_f_mask db '*ini*',0
276
 
276
 
277
;---------------------------------------------------------------------
277
;---------------------------------------------------------------------
278
;---  ÄÀÍÍÛÅ ÏÐÎÃÐÀÌÌÛ  ----------------------------------------------
278
;---  ÄÀÍÍÛÅ ÏÐÎÃÐÀÌÌÛ  ----------------------------------------------
279
;---------------------------------------------------------------------
279
;---------------------------------------------------------------------
280
 
280
 
281
s_header db 'EXAMPLE APPLICATION',0
281
s_header db 'EXAMPLE APPLICATION',0
282
 
282
 
283
s_ini db '/rd/1/test001.ini',0
283
s_ini db '/sys/test001.ini',0
284
s_sec db 'Panels',0
284
s_sec db 'Panels',0
285
s_key db 'param1',0
285
s_key db 'param1',0
286
 
286
 
287
align 4
287
align 4
288
poly_points dd \
288
poly_points dd \
289
  140, 10, \
289
  140, 10, \
290
  150, 10, \
290
  150, 10, \
291
  150, 20, \
291
  150, 20, \
292
  160, 20, \
292
  160, 20, \
293
  160, 30, \
293
  160, 30, \
294
  170, 30, \
294
  170, 30, \
295
  170, 40, \
295
  170, 40, \
296
  180, 40, \
296
  180, 40, \
297
  180, 50, \
297
  180, 50, \
298
  140, 50, \
298
  140, 50, \
299
  140, 10
299
  140, 10
300
 
300
 
301
;---------------------------------------------------------------------
301
;---------------------------------------------------------------------
302
 
302
 
303
align 16
303
align 16
304
@IMPORT:
304
@IMPORT:
305
 
305
 
306
library \
306
library \
307
	libini,'libini.obj',\
307
	libini,'libini.obj',\
308
	libio ,'libio.obj',\
308
	libio ,'libio.obj',\
309
	libgfx,'libgfx.obj'
309
	libgfx,'libgfx.obj'
310
 
310
 
311
import	libini, \
311
import	libini, \
312
	ini.get_str,'ini_get_str',\
312
	ini.get_str,'ini_get_str',\
313
	ini.set_str,'ini_set_str',\
313
	ini.set_str,'ini_set_str',\
314
	ini.get_int,'ini_get_int',\
314
	ini.get_int,'ini_get_int',\
315
	ini.set_int,'ini_set_int',\
315
	ini.set_int,'ini_set_int',\
316
	ini.enum_sections,'ini_enum_sections',\
316
	ini.enum_sections,'ini_enum_sections',\
317
	ini.enum_keys,'ini_enum_keys'
317
	ini.enum_keys,'ini_enum_keys'
318
 
318
 
319
import	libio, \
319
import	libio, \
320
\;      file.aux.match_wildcard,'file_aux_match_wildcard',\
320
\;      file.aux.match_wildcard,'file_aux_match_wildcard',\
321
	file.find_first,'file_find_first',\
321
	file.find_first,'file_find_first',\
322
	file.find_next,'file_find_next',\
322
	file.find_next,'file_find_next',\
323
	file.find_close,'file_find_close',\
323
	file.find_close,'file_find_close',\
324
	file.open,'file_open',\
324
	file.open,'file_open',\
325
	file.seek,'file_seek',\
325
	file.seek,'file_seek',\
326
	file.write,'file_write',\
326
	file.write,'file_write',\
327
	file.truncate,'file_truncate',\
327
	file.truncate,'file_truncate',\
328
	file.close,'file_close'
328
	file.close,'file_close'
329
 
329
 
330
import	libgfx, \
330
import	libgfx, \
331
	gfx.open	,'gfx_open',\
331
	gfx.open	,'gfx_open',\
332
	gfx.close	,'gfx_close',\
332
	gfx.close	,'gfx_close',\
333
	gfx.pen.color	,'gfx_pen_color',\
333
	gfx.pen.color	,'gfx_pen_color',\
334
	gfx.brush.color ,'gfx_brush_color',\
334
	gfx.brush.color ,'gfx_brush_color',\
335
	gfx.pixel	,'gfx_pixel',\
335
	gfx.pixel	,'gfx_pixel',\
336
	gfx.move.to	,'gfx_move_to',\
336
	gfx.move.to	,'gfx_move_to',\
337
	gfx.line.to	,'gfx_line_to',\
337
	gfx.line.to	,'gfx_line_to',\
338
	gfx.line	,'gfx_line',\
338
	gfx.line	,'gfx_line',\
339
	gfx.polyline	,'gfx_polyline',\
339
	gfx.polyline	,'gfx_polyline',\
340
	gfx.polyline.to ,'gfx_polyline_to',\
340
	gfx.polyline.to ,'gfx_polyline_to',\
341
	gfx.fillrect	,'gfx_fillrect',\
341
	gfx.fillrect	,'gfx_fillrect',\
342
	gfx.fillrect.ex ,'gfx_fillrect_ex',\
342
	gfx.fillrect.ex ,'gfx_fillrect_ex',\
343
	gfx.framerect	,'gfx_framerect',\
343
	gfx.framerect	,'gfx_framerect',\
344
	gfx.framerect.ex,'gfx_framerect_ex',\
344
	gfx.framerect.ex,'gfx_framerect_ex',\
345
	gfx.rectangle	,'gfx_rectangle',\
345
	gfx.rectangle	,'gfx_rectangle',\
346
	gfx.rectangle.ex,'gfx_rectangle_ex'
346
	gfx.rectangle.ex,'gfx_rectangle_ex'
347
 
347
 
348
I_END:
348
I_END:
349
 
349
 
350
fh dd ?
350
fh dd ?
351
 
351
 
352
buf rb 1024
352
buf rb 1024