Rev 131 | Rev 1429 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 131 | Rev 485 | ||
---|---|---|---|
1 | ;constants |
1 | ;constants |
2 | ;for keys |
2 | ;for keys |
3 | KEY_ESC equ 27 |
3 | KEY_ESC equ 27 |
4 | KEY_PGDN equ 183 |
4 | KEY_PGDN equ 183 |
5 | KEY_PGUP equ 184 |
5 | KEY_PGUP equ 184 |
6 | KEY_LNDN equ 177 |
6 | KEY_LNDN equ 177 |
7 | KEY_LNUP equ 178 |
7 | KEY_LNUP equ 178 |
8 | KEY_RIGHT equ 179 |
8 | KEY_RIGHT equ 179 |
9 | KEY_LEFT equ 176 |
9 | KEY_LEFT equ 176 |
10 | KEY_HOME equ 180 |
10 | KEY_HOME equ 180 |
11 | KEY_END equ 181 |
11 | KEY_END equ 181 |
12 | KEY_HOMETOP equ 251 ;Ctrl + '[' |
12 | KEY_HOMETOP equ 251 ;Ctrl + '[' |
13 | KEY_ENDBOTTOM equ 253 ;Ctrl + ']' |
13 | KEY_ENDBOTTOM equ 253 ;Ctrl + ']' |
14 | 14 | ||
15 | use32 |
15 | use32 |
16 | org 0x0 |
16 | org 0x0 |
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 0x80000 ; memory for app |
21 | dd 0x80000 ; memory for app |
22 | dd 0x80000 ; esp |
22 | dd 0x80000 ; 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' |
26 | include '..\..\..\macros.inc' |
27 | 27 | ||
28 | 28 | ||
29 | START: ; start of execution |
29 | START: ; start of execution |
30 | 30 | ||
31 | mov eax,40 |
31 | mov eax,40 |
32 | mov ebx,100111b ;event mouse |
32 | mov ebx,100111b ;event mouse |
33 | int 0x40 |
33 | mcall |
34 | mov dword [process_info+42],540 |
34 | mov dword [process_info+42],540 |
35 | mov dword [process_info+46],414 |
35 | mov dword [process_info+46],414 |
- | 36 | ||
- | 37 | red: |
|
36 | call draw_window |
38 | call draw_window |
37 | 39 | ||
38 | still: |
40 | still: |
39 | mov eax,10 ; wait here for event |
41 | mov eax,10 ; wait here for event |
40 | int 0x40 |
42 | mcall |
41 | dec al ; redraw request ? |
43 | dec al ; redraw request ? |
42 | je red |
44 | je red |
43 | dec al ; key in buffer ? |
45 | dec al ; key in buffer ? |
44 | je key |
46 | je key |
45 | dec al ; button in buffer ? |
47 | dec al ; button in buffer ? |
46 | je button |
48 | je button |
47 | ; mouse event received |
49 | ; mouse event received |
48 | mouse: |
50 | mouse: |
49 | mov eax,37 |
51 | mov eax,37 |
50 | mov ebx,2 |
52 | mov ebx,2 |
51 | int 0x40 |
53 | mcall |
52 | or eax,eax |
54 | or eax,eax |
53 | jz still |
55 | jz still |
54 | cmp [menu_opened],1 |
56 | cmp [menu_opened],1 |
55 | jne still |
57 | jne still |
56 | mov [menu_opened],0 |
58 | mov [menu_opened],0 |
57 | - | ||
58 | red: ; redraw |
- | |
59 | call redraw_window |
- | |
60 | jmp still |
59 | |
61 | 60 | ||
62 | key: ; key |
61 | key: ; key |
63 | mov eax,2 |
62 | mov eax,2 |
64 | int 0x40 |
63 | mcall |
65 | ; test al,al |
64 | ; test al,al |
66 | ; jnz still |
65 | ; jnz still |
67 | cmp ah,KEY_ESC |
66 | cmp ah,KEY_ESC |
68 | jz close |
67 | jz close |
69 | mov al,[o_s_flag] |
68 | mov al,[o_s_flag] |
70 | and al,8 ;set bit 3? |
69 | and al,8 ;set bit 3? |
71 | jz edit_keys ;not - no output to filename area |
70 | jz edit_keys ;not - no output to filename area |
72 | cmp ah,8 ;BACKSPACE |
71 | cmp ah,8 ;BACKSPACE |
73 | jnz no_backspace |
72 | jnz no_backspace |
74 | dec [name_l] |
73 | dec [name_l] |
75 | cmp [name_l],0 |
74 | cmp [name_l],0 |
76 | mov edx,filename |
75 | mov edx,filename |
77 | je A1 |
76 | je A1 |
78 | jg @f |
77 | jg @f |
79 | mov [name_l],0 |
78 | mov [name_l],0 |
80 | jmp A1 |
79 | jmp A1 |
81 | @@: |
80 | @@: |
82 | add dl,[name_l] |
81 | add dl,[name_l] |
83 | A1: |
82 | A1: |
84 | sub [x_cursor],0x60000 |
83 | sub [x_cursor],0x60000 |
85 | mov [edx],byte 0 |
84 | mov [edx],byte 0 |
86 | cmp [x_cursor],0xb0005 |
85 | cmp [x_cursor],0xb0005 |
87 | jge @f |
86 | jge @f |
88 | mov [x_cursor],0xb0005 |
87 | mov [x_cursor],0xb0005 |
89 | @@: |
88 | @@: |
90 | call redraw_window |
89 | call redraw_window |
91 | jmp still ;END BACKSPACE |
90 | jmp still ;END BACKSPACE |
92 | 91 | ||
93 | no_backspace: |
92 | no_backspace: |
94 | cmp ah,0x30 ;'0' |
93 | cmp ah,0x30 ;'0' |
95 | jl A2 |
94 | jl A2 |
96 | cmp ah,0x39 ;'9' |
95 | cmp ah,0x39 ;'9' |
97 | jle bigsym |
96 | jle bigsym |
98 | cmp ah,65 ;'A' |
97 | cmp ah,65 ;'A' |
99 | jbe bigsym |
98 | jbe bigsym |
100 | cmp ah,90 ;'Z' |
99 | cmp ah,90 ;'Z' |
101 | jle bigsym |
100 | jle bigsym |
102 | cmp ah,97 ;'a' |
101 | cmp ah,97 ;'a' |
103 | jbe smsym |
102 | jbe smsym |
104 | cmp ah,122;'z' |
103 | cmp ah,122;'z' |
105 | jle smsym |
104 | jle smsym |
106 | jmp still |
105 | jmp still |
107 | A2: |
106 | A2: |
108 | cmp ah,46 ;'.' |
107 | cmp ah,46 ;'.' |
109 | jz bigsym |
108 | jz bigsym |
110 | cmp ah,0x20 |
109 | cmp ah,0x20 |
111 | jz bigsym |
110 | jz bigsym |
112 | jmp still |
111 | jmp still |
113 | smsym: |
112 | smsym: |
114 | sub ah,32 |
113 | sub ah,32 |
115 | bigsym: |
114 | bigsym: |
116 | cmp [name_l],13 ;yes. filename length <13 |
115 | cmp [name_l],13 ;yes. filename length <13 |
117 | jl @f |
116 | jl @f |
118 | sub [o_s_flag],8 ;not - disable output to filename area |
117 | sub [o_s_flag],8 ;not - disable output to filename area |
119 | mov [x_cursor],0x680005; - set x-base & x-size |
118 | mov [x_cursor],0x680005; - set x-base & x-size |
120 | jmp _end_keys |
119 | jmp _end_keys |
121 | @@: |
120 | @@: |
122 | mov edx,filename ; |
121 | mov edx,filename ; |
123 | add dl,[name_l] |
122 | add dl,[name_l] |
124 | mov [edx],ah |
123 | mov [edx],ah |
125 | inc [name_l] |
124 | inc [name_l] |
126 | add [x_cursor],0x60000 |
125 | add [x_cursor],0x60000 |
127 | _end_keys: |
126 | _end_keys: |
128 | call redraw_window |
127 | call redraw_window |
129 | jmp still |
128 | jmp still |
130 | edit_keys: |
129 | edit_keys: |
131 | cmp ah,KEY_PGDN |
130 | cmp ah,KEY_PGDN |
132 | jnz @f |
131 | jnz @f |
133 | call PgDn |
132 | call PgDn |
134 | jmp still |
133 | jmp still |
135 | @@: |
134 | @@: |
136 | cmp ah,KEY_PGUP |
135 | cmp ah,KEY_PGUP |
137 | jnz @f |
136 | jnz @f |
138 | call PgUp |
137 | call PgUp |
139 | jmp still |
138 | jmp still |
140 | @@: |
139 | @@: |
141 | cmp ah,KEY_HOME ;Home |
140 | cmp ah,KEY_HOME ;Home |
142 | jnz @f |
141 | jnz @f |
143 | call Home |
142 | call Home |
144 | jmp still |
143 | jmp still |
145 | @@: |
144 | @@: |
146 | cmp ah,KEY_END ;Home |
145 | cmp ah,KEY_END ;Home |
147 | jnz @f |
146 | jnz @f |
148 | call _End |
147 | call _End |
149 | jmp still |
148 | jmp still |
150 | @@: |
149 | @@: |
151 | cmp ah,KEY_HOMETOP |
150 | cmp ah,KEY_HOMETOP |
152 | jnz @f |
151 | jnz @f |
153 | call CtrlHome |
152 | call CtrlHome |
154 | jmp still |
153 | jmp still |
155 | @@: |
154 | @@: |
156 | cmp ah,KEY_ENDBOTTOM |
155 | cmp ah,KEY_ENDBOTTOM |
157 | jnz @f |
156 | jnz @f |
158 | call CtrlEnd |
157 | call CtrlEnd |
159 | jmp still |
158 | jmp still |
160 | @@: |
159 | @@: |
161 | cmp ah,KEY_LNDN |
160 | cmp ah,KEY_LNDN |
162 | jnz @f |
161 | jnz @f |
163 | call LnDn |
162 | call LnDn |
164 | jmp still |
163 | jmp still |
165 | @@: |
164 | @@: |
166 | cmp ah,KEY_LNUP |
165 | cmp ah,KEY_LNUP |
167 | jnz @f |
166 | jnz @f |
168 | call LnUp |
167 | call LnUp |
169 | jmp still |
168 | jmp still |
170 | @@: |
169 | @@: |
171 | cmp ah,KEY_RIGHT ;Right |
170 | cmp ah,KEY_RIGHT ;Right |
172 | jnz @f |
171 | jnz @f |
173 | call Right |
172 | call Right |
174 | jmp still |
173 | jmp still |
175 | @@: |
174 | @@: |
176 | cmp ah,KEY_LEFT ;Left |
175 | cmp ah,KEY_LEFT ;Left |
177 | jnz @f |
176 | jnz @f |
178 | call Left |
177 | call Left |
179 | @@: |
178 | @@: |
180 | ;। ªâ¨à®¢ ¨¥ áâப¨ ¢ hex-¯à¥¤áâ ¢«¥¨¨ |
179 | ;। ªâ¨à®¢ ¨¥ áâப¨ ¢ hex-¯à¥¤áâ ¢«¥¨¨ |
181 | mov esi,[current] |
180 | mov esi,[current] |
182 | mov bl,[posx] |
181 | mov bl,[posx] |
183 | add esi,0x10000 ;0x80000 |
182 | add esi,0x10000 ;0x80000 |
184 | cmp ah,0x30 |
183 | cmp ah,0x30 |
185 | jl still ;ah<'0' |
184 | jl still ;ah<'0' |
186 | cmp ah,0x39 |
185 | cmp ah,0x39 |
187 | jle A23 ;ah='0'...'9' - ¯¥à¥¢®¤ ¨§ ᨬ¢®«®¢ ¢ hex |
186 | jle A23 ;ah='0'...'9' - ¯¥à¥¢®¤ ¨§ ᨬ¢®«®¢ ¢ hex |
188 | ;¯à®¢¥àª ª®¤ë áâ àè¨å hex-æ¨äà |
187 | ;¯à®¢¥àª ª®¤ë áâ àè¨å hex-æ¨äà |
189 | cmp ah,0x61 ;ah<'a' |
188 | cmp ah,0x61 ;ah<'a' |
190 | jl A27 ;¬®¦¥â ¡ëâì ¢¢®¤ïâáï ¡®«ì訥 ¡ãª¢ë? |
189 | jl A27 ;¬®¦¥â ¡ëâì ¢¢®¤ïâáï ¡®«ì訥 ¡ãª¢ë? |
191 | cmp ah,0x66 ;ah>'f' |
190 | cmp ah,0x66 ;ah>'f' |
192 | jg still |
191 | jg still |
193 | sub ah,0x20 ;ª®¢¥àâ¨à㥬 ¢ ¡®«ì訥 ¡ãª¢ë |
192 | sub ah,0x20 ;ª®¢¥àâ¨à㥬 ¢ ¡®«ì訥 ¡ãª¢ë |
194 | jmp A24 |
193 | jmp A24 |
195 | A27: |
194 | A27: |
196 | cmp ah,0x41 |
195 | cmp ah,0x41 |
197 | jl still ;ah<'A' |
196 | jl still ;ah<'A' |
198 | cmp ah,0x46 |
197 | cmp ah,0x46 |
199 | jg still ;ah>'F' |
198 | jg still ;ah>'F' |
200 | A24: |
199 | A24: |
201 | add ah,9 |
200 | add ah,9 |
202 | A23: |
201 | A23: |
203 | mov dl,[esi];®à¨£¨ «ìë© ¡ ©â |
202 | mov dl,[esi];®à¨£¨ «ìë© ¡ ©â |
204 | and bl,1 ;¥á«¨ ¥ç¥â - । ªâ¨àã¥âáï ¬« ¤è¨© ¯®«ã¡ ©â, ç¥â - áâ à訩 |
203 | and bl,1 ;¥á«¨ ¥ç¥â - । ªâ¨àã¥âáï ¬« ¤è¨© ¯®«ã¡ ©â, ç¥â - áâ à訩 |
205 | jz hi_half_byte |
204 | jz hi_half_byte |
206 | ;¬« ¤è¨© ¯®«ã¡ ©â |
205 | ;¬« ¤è¨© ¯®«ã¡ ©â |
207 | and ah,0x0f ;®¡ã«ï¥¬ áâ à訩 ¯®«ã¡ ©â ¢¢¥¤¥®© æ¨äàë |
206 | and ah,0x0f ;®¡ã«ï¥¬ áâ à訩 ¯®«ã¡ ©â ¢¢¥¤¥®© æ¨äàë |
208 | ;¥á«¨ ah = 0x30...0x39, â® ¢á¥ ®à¬ «ì® |
207 | ;¥á«¨ ah = 0x30...0x39, â® ¢á¥ ®à¬ «ì® |
209 | ;¥á«¨ ah = 0x41...0x46, â® ¬¥âª¥ 24 ¯®«ã稬 |
208 | ;¥á«¨ ah = 0x41...0x46, â® ¬¥âª¥ 24 ¯®«ã稬 |
210 | ;ah = 0x4A...0x4F ¨ ⮦¥ ¢á¥ ®à¬ «ì® |
209 | ;ah = 0x4A...0x4F ¨ ⮦¥ ¢á¥ ®à¬ «ì® |
211 | and dl,0xf0 ;®¡ã«ï¥¬ ¬« ¤è¨© ¯®«ã¡ ©â 㠮ਣ¨ «ì®£® ¡ ©â |
210 | and dl,0xf0 ;®¡ã«ï¥¬ ¬« ¤è¨© ¯®«ã¡ ©â 㠮ਣ¨ «ì®£® ¡ ©â |
212 | jmp patch_byte |
211 | jmp patch_byte |
213 | hi_half_byte: |
212 | hi_half_byte: |
214 | ;áâ à訩 ¯®«ã¡ ©â |
213 | ;áâ à訩 ¯®«ã¡ ©â |
215 | shl ah,4 ;®¤®¢à¥¬¥® ᤢ¨£ ¥¬ 㦮¥ § 票¥ ¢ áâ à訩 ¯®«ã¡ ©â |
214 | shl ah,4 ;®¤®¢à¥¬¥® ᤢ¨£ ¥¬ 㦮¥ § 票¥ ¢ áâ à訩 ¯®«ã¡ ©â |
216 | ;¨ ®¡ã«ï¥¬ ¬« ¤è¨© |
215 | ;¨ ®¡ã«ï¥¬ ¬« ¤è¨© |
217 | and dl,0x0f ;®¡ã«ï¥¬ áâ à訩 ¯®«ã¡ ©â 㠮ਣ¨ «ì®£® ¡ ©â |
216 | and dl,0x0f ;®¡ã«ï¥¬ áâ à訩 ¯®«ã¡ ©â 㠮ਣ¨ «ì®£® ¡ ©â |
218 | patch_byte: |
217 | patch_byte: |
219 | or ah,dl ;®¡ê¥¤¨ï¥¬ ¯®«ã¡ ©âë |
218 | or ah,dl ;®¡ê¥¤¨ï¥¬ ¯®«ã¡ ©âë |
220 | mov [esi],ah;¯ â稬 ¢ ¯ ¬ï⨠|
219 | mov [esi],ah;¯ â稬 ¢ ¯ ¬ï⨠|
221 | mov ebx,0x20100 |
220 | mov ebx,0x20100 |
222 | movzx ecx,ah ;¤«ï äãªæ¨¨ ¢ë¢®¤ ç¨á« |
221 | movzx ecx,ah ;¤«ï äãªæ¨¨ ¢ë¢®¤ ç¨á« |
223 | ;⥯¥àì ¤® à áç¨â âì ª®®à¤¨ âë ¢ë¢®¤ ¤«ï ç¨á« |
222 | ;⥯¥àì ¤® à áç¨â âì ª®®à¤¨ âë ¢ë¢®¤ ¤«ï ç¨á« |
224 | ;edx = x shl 16 + y |
223 | ;edx = x shl 16 + y |
225 | mov edx,[x_cursor] |
224 | mov edx,[x_cursor] |
226 | mov edi,[y_cursor] |
225 | mov edi,[y_cursor] |
227 | and edx,0xffff0000 |
226 | and edx,0xffff0000 |
228 | shr edi,0x10 |
227 | shr edi,0x10 |
229 | xor esi,esi |
228 | xor esi,esi |
230 | or edx,edi |
229 | or edx,edi |
231 | mov eax,47 |
230 | mov eax,47 |
232 | add edx,8 |
231 | add edx,8 |
233 | int 0x40 |
232 | mcall |
234 | call redraw_window |
233 | call redraw_window |
235 | jmp still |
234 | jmp still |
236 | 235 | ||
237 | button: ; button |
236 | button: ; button |
238 | mov eax,17 ; get id |
237 | mov eax,17 ; get id |
239 | int 0x40 |
238 | mcall |
240 | dec ah ;close programm button |
239 | dec ah ;close programm button |
241 | jne @f |
240 | jne @f |
242 | close: |
241 | close: |
243 | mov eax,-1 ; close this program |
242 | mov eax,-1 ; close this program |
244 | int 0x40 |
243 | mcall |
245 | @@: |
244 | @@: |
246 | dec ah |
245 | dec ah |
247 | jne @f |
246 | jne @f |
248 | call redraw_window |
247 | call redraw_window |
249 | call menufile |
248 | call menufile |
250 | jmp still |
249 | jmp still |
251 | @@: |
250 | @@: |
252 | dec ah ;menu 'coding' button |
251 | dec ah ;menu 'coding' button |
253 | jne @f |
252 | jne @f |
254 | call redraw_window |
253 | call redraw_window |
255 | call menucoding |
254 | call menucoding |
256 | jmp still |
255 | jmp still |
257 | @@: |
256 | @@: |
258 | dec ah ;menu 'Help' button |
257 | dec ah ;menu 'Help' button |
259 | jne @f |
258 | jne @f |
260 | call redraw_window |
259 | call redraw_window |
261 | call menuhelp |
260 | call menuhelp |
262 | jmp still |
261 | jmp still |
263 | @@: |
262 | @@: |
264 | ;now processed low_level menu buttons |
263 | ;now processed low_level menu buttons |
265 | ;id m_open = 5 |
264 | ;id m_open = 5 |
266 | ;id m_save = 6 |
265 | ;id m_save = 6 |
267 | ;id m_exit = 7 |
266 | ;id m_exit = 7 |
268 | ;id m_win2dos 8 |
267 | ;id m_win2dos 8 |
269 | ;id m_win2koi 9 |
268 | ;id m_win2koi 9 |
270 | ;id m_win2iso 10 |
269 | ;id m_win2iso 10 |
271 | ;id m_dos2win 11 |
270 | ;id m_dos2win 11 |
272 | ;id m_dos2koi 12 |
271 | ;id m_dos2koi 12 |
273 | ;id m_dos2iso 13 |
272 | ;id m_dos2iso 13 |
274 | ;id m_help 14 |
273 | ;id m_help 14 |
275 | ;id m_about 15 |
274 | ;id m_about 15 |
276 | dec ah ;open? |
275 | dec ah ;open? |
277 | jne @f |
276 | jne @f |
278 | cmp [o_s_flag],0 ;disable 'Open' if flag !=0 |
277 | cmp [o_s_flag],0 ;disable 'Open' if flag !=0 |
279 | jnz no_open |
278 | jnz no_open |
280 | ; call redraw_window |
279 | ; call redraw_window |
281 | mov [color],0x0072b9fc |
280 | mov [color],0x0072b9fc |
282 | call f2 ;set x_cursor & y_cursor for input filename |
281 | call f2 ;set x_cursor & y_cursor for input filename |
283 | mov [o_s_flag],8 ;for output to filename area |
282 | mov [o_s_flag],8 ;for output to filename area |
284 | no_open: |
283 | no_open: |
285 | call redraw_window |
284 | call redraw_window |
286 | jmp still |
285 | jmp still |
287 | @@: |
286 | @@: |
288 | dec ah ;save? |
287 | dec ah ;save? |
289 | jne @f |
288 | jne @f |
290 | cmp [o_s_flag],1 ;enable save if flag = 1 |
289 | cmp [o_s_flag],1 ;enable save if flag = 1 |
291 | jnz no_save |
290 | jnz no_save |
292 | movzx ecx,[name_l] ;begin clear filename string |
291 | movzx ecx,[name_l] ;begin clear filename string |
293 | mov edi,filename |
292 | mov edi,filename |
294 | xor al,al |
293 | xor al,al |
295 | jecxz no_clear |
294 | jecxz no_clear |
296 | clear: |
295 | clear: |
297 | mov [edi+ecx],al |
296 | mov [edi+ecx],al |
298 | loop clear |
297 | loop clear |
299 | mov [name_l],al ;set filename length = 0 |
298 | mov [name_l],al ;set filename length = 0 |
300 | no_clear: ;ebd clear |
299 | no_clear: ;ebd clear |
301 | call f2 ;set x_cursor & y_cursor for input filename |
300 | call f2 ;set x_cursor & y_cursor for input filename |
302 | mov [o_s_flag],9 ;for output to filename area |
301 | mov [o_s_flag],9 ;for output to filename area |
303 | no_save: |
302 | no_save: |
304 | call redraw_window |
303 | call redraw_window |
305 | jmp still |
304 | jmp still |
306 | @@: |
305 | @@: |
307 | dec ah ;exit? |
306 | dec ah ;exit? |
308 | jne @f |
307 | jne @f |
309 | jmp close |
308 | jmp close |
310 | @@: |
309 | @@: |
311 | dec ah ;m_win2dos? |
310 | dec ah ;m_win2dos? |
312 | jne @f |
311 | jne @f |
313 | push dword WIN_TABLE |
312 | push dword WIN_TABLE |
314 | push dword DOS_TABLE |
313 | push dword DOS_TABLE |
315 | call coding |
314 | call coding |
316 | call redraw_window |
315 | call redraw_window |
317 | jmp still |
316 | jmp still |
318 | @@: |
317 | @@: |
319 | dec ah ;m_win2koi? |
318 | dec ah ;m_win2koi? |
320 | jne @f |
319 | jne @f |
321 | push WIN_TABLE |
320 | push WIN_TABLE |
322 | push KOI_TABLE |
321 | push KOI_TABLE |
323 | call coding |
322 | call coding |
324 | call redraw_window |
323 | call redraw_window |
325 | jmp still |
324 | jmp still |
326 | @@: |
325 | @@: |
327 | dec ah ;m_win2iso? |
326 | dec ah ;m_win2iso? |
328 | jne @f |
327 | jne @f |
329 | push WIN_TABLE |
328 | push WIN_TABLE |
330 | push ISO_TABLE |
329 | push ISO_TABLE |
331 | call coding |
330 | call coding |
332 | call redraw_window |
331 | call redraw_window |
333 | jmp still |
332 | jmp still |
334 | @@: |
333 | @@: |
335 | dec ah ;m_dos2win? |
334 | dec ah ;m_dos2win? |
336 | jne @f |
335 | jne @f |
337 | push DOS_TABLE |
336 | push DOS_TABLE |
338 | push WIN_TABLE |
337 | push WIN_TABLE |
339 | call coding |
338 | call coding |
340 | call redraw_window |
339 | call redraw_window |
341 | jmp still |
340 | jmp still |
342 | @@: |
341 | @@: |
343 | dec ah ;m_dos2koi? |
342 | dec ah ;m_dos2koi? |
344 | jne @f |
343 | jne @f |
345 | push DOS_TABLE |
344 | push DOS_TABLE |
346 | push KOI_TABLE |
345 | push KOI_TABLE |
347 | call coding |
346 | call coding |
348 | call redraw_window |
347 | call redraw_window |
349 | jmp still |
348 | jmp still |
350 | @@: |
349 | @@: |
351 | dec ah ;dos2iso? |
350 | dec ah ;dos2iso? |
352 | jne @f |
351 | jne @f |
353 | push DOS_TABLE |
352 | push DOS_TABLE |
354 | push ISO_TABLE |
353 | push ISO_TABLE |
355 | call coding |
354 | call coding |
356 | call redraw_window |
355 | call redraw_window |
357 | jmp still |
356 | jmp still |
358 | @@: |
357 | @@: |
359 | dec ah ;m_help? |
358 | dec ah ;m_help? |
360 | jne @f |
359 | jne @f |
361 | ;create new thread for output help info |
360 | ;create new thread for output help info |
362 | ;parameter: address for entry_point thread |
361 | ;parameter: address for entry_point thread |
363 | push help_thread |
362 | push help_thread |
364 | call create_process |
363 | call create_process |
365 | call redraw_window |
364 | call redraw_window |
366 | jmp still |
365 | jmp still |
367 | @@: |
366 | @@: |
368 | dec ah ;m_about? |
367 | dec ah ;m_about? |
369 | jne @f |
368 | jne @f |
370 | ;create new thread for output about info |
369 | ;create new thread for output about info |
371 | ;parameter: address for entry_point thread |
370 | ;parameter: address for entry_point thread |
372 | push about_thread |
371 | push about_thread |
373 | call create_process |
372 | call create_process |
374 | call redraw_window |
373 | call redraw_window |
375 | jmp still |
374 | jmp still |
376 | @@: |
375 | @@: |
377 | ;button 'Go' |
376 | ;button 'Go' |
378 | and [o_s_flag],1 |
377 | and [o_s_flag],1 |
379 | jnz _savefile |
378 | jnz _savefile |
380 | ;open file |
379 | ;open file |
381 | mov eax,6 |
380 | mov eax,6 |
382 | mov ebx,filename |
381 | mov ebx,filename |
383 | xor ecx,ecx |
382 | xor ecx,ecx |
384 | or edx,-1 |
383 | or edx,-1 |
385 | mov esi,0x10000 |
384 | mov esi,0x10000 |
386 | int 0x40 |
385 | mcall |
387 | inc [o_s_flag] |
386 | inc [o_s_flag] |
388 | mov [sizefile],eax |
387 | mov [sizefile],eax |
389 | jmp end_Go |
388 | jmp end_Go |
390 | _savefile: |
389 | _savefile: |
391 | ;save file |
390 | ;save file |
392 | mov ebx,filename |
391 | mov ebx,filename |
393 | mov ecx,0x10000 |
392 | mov ecx,0x10000 |
394 | mov edx,[sizefile] |
393 | mov edx,[sizefile] |
395 | xor esi,esi |
394 | xor esi,esi |
396 | dec edx |
395 | dec edx |
397 | mov eax,33 |
396 | mov eax,33 |
398 | int 0x40 |
397 | mcall |
399 | end_Go: |
398 | end_Go: |
400 | call CtrlHome |
399 | call CtrlHome |
401 | jmp still |
400 | jmp still |
402 | 401 | ||
403 | Right: |
402 | Right: |
404 | pushad |
403 | pushad |
405 | mov al,[posx] |
404 | mov al,[posx] |
406 | inc al |
405 | inc al |
407 | cmp al,0x20 |
406 | cmp al,0x20 |
408 | jl @f |
407 | jl @f |
409 | mov [posx],0 |
408 | mov [posx],0 |
410 | mov [x_cursor],0x680005 |
409 | mov [x_cursor],0x680005 |
411 | mov [text_cursor],0x01200000 |
410 | mov [text_cursor],0x01200000 |
412 | sub [current],0xf ;because [current] add 0x10 in LnDn |
411 | sub [current],0xf ;because [current] add 0x10 in LnDn |
413 | call LnDn |
412 | call LnDn |
414 | popad |
413 | popad |
415 | ret |
414 | ret |
416 | @@: |
415 | @@: |
417 | mov [posx],al |
416 | mov [posx],al |
418 | and al,1 |
417 | and al,1 |
419 | jnz @f ;not increment [current] |
418 | jnz @f ;not increment [current] |
420 | ;increment |
419 | ;increment |
421 | add [x_cursor],0xa0000 |
420 | add [x_cursor],0xa0000 |
422 | sub [text_cursor],0x40000 |
421 | sub [text_cursor],0x40000 |
423 | inc [current] |
422 | inc [current] |
424 | jmp end_r |
423 | jmp end_r |
425 | @@: |
424 | @@: |
426 | add [x_cursor],0x60000 |
425 | add [x_cursor],0x60000 |
427 | sub [text_cursor],0x60000 |
426 | sub [text_cursor],0x60000 |
428 | end_r: |
427 | end_r: |
429 | call redraw_window |
428 | call redraw_window |
430 | popad |
429 | popad |
431 | ret |
430 | ret |
432 | 431 | ||
433 | Left: |
432 | Left: |
434 | pushad |
433 | pushad |
435 | mov al,[posx] |
434 | mov al,[posx] |
436 | dec al |
435 | dec al |
437 | jge @f |
436 | jge @f |
438 | mov [posx],0x1f |
437 | mov [posx],0x1f |
439 | mov [x_cursor],0x015e0005 |
438 | mov [x_cursor],0x015e0005 |
440 | mov [text_cursor],0x00840000 |
439 | mov [text_cursor],0x00840000 |
441 | add [current],0x0f |
440 | add [current],0x0f |
442 | call LnUp |
441 | call LnUp |
443 | popad |
442 | popad |
444 | ret |
443 | ret |
445 | @@: |
444 | @@: |
446 | mov [posx],al |
445 | mov [posx],al |
447 | and al,1 |
446 | and al,1 |
448 | jnz @f ;decrement [current] |
447 | jnz @f ;decrement [current] |
449 | ;not decrement |
448 | ;not decrement |
450 | sub [x_cursor],0x60000 |
449 | sub [x_cursor],0x60000 |
451 | add [text_cursor],0x60000 |
450 | add [text_cursor],0x60000 |
452 | jmp end_l |
451 | jmp end_l |
453 | @@: |
452 | @@: |
454 | cmp [current],0 |
453 | cmp [current],0 |
455 | jle end_l |
454 | jle end_l |
456 | sub [x_cursor],0xa0000 |
455 | sub [x_cursor],0xa0000 |
457 | add [text_cursor],0x40000 |
456 | add [text_cursor],0x40000 |
458 | dec [current] |
457 | dec [current] |
459 | end_l: |
458 | end_l: |
460 | call redraw_window |
459 | call redraw_window |
461 | popad |
460 | popad |
462 | ret |
461 | ret |
463 | 462 | ||
464 | LnDn: |
463 | LnDn: |
465 | pushad |
464 | pushad |
466 | add [current],0x10 |
465 | add [current],0x10 |
467 | movzx ecx,[lines] |
466 | movzx ecx,[lines] |
468 | cmp cl,[posy] |
467 | cmp cl,[posy] |
469 | jl @f ;when counter strings >= number strings in window |
468 | jl @f ;when counter strings >= number strings in window |
470 | add [y_cursor],0xa0000 |
469 | add [y_cursor],0xa0000 |
471 | inc [posy] |
470 | inc [posy] |
472 | call redraw_window |
471 | call redraw_window |
473 | popad |
472 | popad |
474 | ret |
473 | ret |
475 | @@: |
474 | @@: |
476 | mov eax,0x10 |
475 | mov eax,0x10 |
477 | xor edx,edx |
476 | xor edx,edx |
478 | imul ecx |
477 | imul ecx |
479 | sub eax,0x10 |
478 | sub eax,0x10 |
480 | sub [end_str],eax |
479 | sub [end_str],eax |
481 | ; mov eax,[sizefile] |
480 | ; mov eax,[sizefile] |
482 | ; add eax,0x80000 |
481 | ; add eax,0x80000 |
483 | ; cmp eax,[end_str] |
482 | ; cmp eax,[end_str] |
484 | ; jge @f |
483 | ; jge @f |
485 | ; mov [end_str],eax |
484 | ; mov [end_str],eax |
486 | ; @@: |
485 | ; @@: |
487 | call draw_window |
486 | call draw_window |
488 | popad |
487 | popad |
489 | ret |
488 | ret |
490 | 489 | ||
491 | LnUp: |
490 | LnUp: |
492 | pushad |
491 | pushad |
493 | sub [current],0x10 |
492 | sub [current],0x10 |
494 | cmp [current],0 |
493 | cmp [current],0 |
495 | jge @f |
494 | jge @f |
496 | mov [current],0 |
495 | mov [current],0 |
497 | @@: |
496 | @@: |
498 | cmp [posy],3 |
497 | cmp [posy],3 |
499 | jle @f ;when counter strings < number top string |
498 | jle @f ;when counter strings < number top string |
500 | sub [y_cursor],0xa0000 |
499 | sub [y_cursor],0xa0000 |
501 | dec [posy] |
500 | dec [posy] |
502 | call redraw_window |
501 | call redraw_window |
503 | popad |
502 | popad |
504 | ret |
503 | ret |
505 | @@: |
504 | @@: |
506 | ; movzx ecx,[lines] |
505 | ; movzx ecx,[lines] |
507 | ; mov eax,0x10 |
506 | ; mov eax,0x10 |
508 | ; xor edx,edx |
507 | ; xor edx,edx |
509 | ; imul ecx |
508 | ; imul ecx |
510 | ; add eax,0x10 |
509 | ; add eax,0x10 |
511 | sub [end_str],0x10 |
510 | sub [end_str],0x10 |
512 | cmp [end_str],0x10000 |
511 | cmp [end_str],0x10000 |
513 | jge @f |
512 | jge @f |
514 | mov [end_str],0x10000 |
513 | mov [end_str],0x10000 |
515 | @@: |
514 | @@: |
516 | call redraw_window |
515 | call redraw_window |
517 | popad |
516 | popad |
518 | ret |
517 | ret |
519 | 518 | ||
520 | CtrlEnd: |
519 | CtrlEnd: |
521 | pushad |
520 | pushad |
522 | popad |
521 | popad |
523 | ret |
522 | ret |
524 | 523 | ||
525 | CtrlHome: |
524 | CtrlHome: |
526 | pushad |
525 | pushad |
527 | mov [x_cursor],0x00680005 ;ãáâ ¢«¨¢ îâáï § 票ï, ª ª ¯à¨ ®âªàë⨨ |
526 | mov [x_cursor],0x00680005 ;ãáâ ¢«¨¢ îâáï § 票ï, ª ª ¯à¨ ®âªàë⨨ |
528 | mov [y_cursor],0x00280008 |
527 | mov [y_cursor],0x00280008 |
529 | mov [text_cursor],0x01200000 |
528 | mov [text_cursor],0x01200000 |
530 | mov [posx],0 |
529 | mov [posx],0 |
531 | mov [posy],3 |
530 | mov [posy],3 |
532 | call b_in_screen |
531 | call b_in_screen |
533 | mov [end_str],0x10000 |
532 | mov [end_str],0x10000 |
534 | mov [current],0 |
533 | mov [current],0 |
535 | call redraw_window |
534 | call redraw_window |
536 | popad |
535 | popad |
537 | ret |
536 | ret |
538 | 537 | ||
539 | _End: |
538 | _End: |
540 | pushad |
539 | pushad |
541 | mov [x_cursor],0x015e0005 |
540 | mov [x_cursor],0x015e0005 |
542 | mov [posx],0x1f |
541 | mov [posx],0x1f |
543 | mov [text_cursor],0x00840000 |
542 | mov [text_cursor],0x00840000 |
544 | or [current],0xf |
543 | or [current],0xf |
545 | call b_in_screen |
544 | call b_in_screen |
546 | call redraw_window |
545 | call redraw_window |
547 | popad |
546 | popad |
548 | ret |
547 | ret |
549 | 548 | ||
550 | Home: |
549 | Home: |
551 | pushad |
550 | pushad |
552 | mov [x_cursor],0x00680005 ;ãáâ ¢«¨¢ îâáï § ç¥¨ï ¤«ï ç « áâப¨ |
551 | mov [x_cursor],0x00680005 ;ãáâ ¢«¨¢ îâáï § ç¥¨ï ¤«ï ç « áâப¨ |
553 | mov [posx],0 |
552 | mov [posx],0 |
554 | mov [text_cursor],0x01200000 |
553 | mov [text_cursor],0x01200000 |
555 | and [current],0xfffffff0 |
554 | and [current],0xfffffff0 |
556 | call b_in_screen |
555 | call b_in_screen |
557 | call redraw_window |
556 | call redraw_window |
558 | popad |
557 | popad |
559 | ret |
558 | ret |
560 | 559 | ||
561 | PgDn: |
560 | PgDn: |
562 | pushad |
561 | pushad |
563 | xor edx,edx |
562 | xor edx,edx |
564 | movzx ecx,[lines] |
563 | movzx ecx,[lines] |
565 | mov eax,0x10 |
564 | mov eax,0x10 |
566 | imul ecx |
565 | imul ecx |
567 | add [current],eax |
566 | add [current],eax |
568 | add [end_str],eax |
567 | add [end_str],eax |
569 | call redraw_window |
568 | call redraw_window |
570 | popad |
569 | popad |
571 | ret |
570 | ret |
572 | 571 | ||
573 | PgUp: |
572 | PgUp: |
574 | pushad |
573 | pushad |
575 | xor edx,edx |
574 | xor edx,edx |
576 | movzx ecx,[lines] |
575 | movzx ecx,[lines] |
577 | mov eax,0x10 |
576 | mov eax,0x10 |
578 | imul ecx |
577 | imul ecx |
579 | sub [current],eax |
578 | sub [current],eax |
580 | cmp [current],0 |
579 | cmp [current],0 |
581 | jge @f |
580 | jge @f |
582 | mov [current],0 |
581 | mov [current],0 |
583 | @@: |
582 | @@: |
584 | sub [end_str],eax |
583 | sub [end_str],eax |
585 | cmp [end_str],0x10000 |
584 | cmp [end_str],0x10000 |
586 | jge @f |
585 | jge @f |
587 | ; call CtrlHome |
586 | ; call CtrlHome |
588 | mov [end_str],0x10000 |
587 | mov [end_str],0x10000 |
589 | @@: |
588 | @@: |
590 | call redraw_window |
589 | call redraw_window |
591 | popad |
590 | popad |
592 | ret |
591 | ret |
593 | 592 | ||
594 | b_in_screen: |
593 | b_in_screen: |
595 | pushad |
594 | pushad |
596 | call get_process_info |
595 | call get_process_info |
597 | mov eax,[process_info+0x2e] |
596 | mov eax,[process_info+0x2e] |
598 | mov ebx,0x0a |
597 | mov ebx,0x0a |
599 | sub eax,0x3c |
598 | sub eax,0x3c |
600 | cmp eax,0x10 ;now |
599 | cmp eax,0x10 ;now |
601 | jg @f ;now |
600 | jg @f ;now |
602 | mov [lines],0 ;now |
601 | mov [lines],0 ;now |
603 | jmp C1 ;now |
602 | jmp C1 ;now |
604 | @@: |
603 | @@: |
605 | xor edx,edx |
604 | xor edx,edx |
606 | div ebx |
605 | div ebx |
607 | mov [lines],al |
606 | mov [lines],al |
608 | C1: |
607 | C1: |
609 | popad |
608 | popad |
610 | ret |
609 | ret |
611 | 610 | ||
612 | 611 | ||
613 | 612 | ||
614 | output_screen: |
613 | output_screen: |
615 | pushad |
614 | pushad |
616 | movzx ecx,[lines] |
615 | movzx ecx,[lines] |
617 | jecxz no_out ;now |
616 | jecxz no_out ;now |
618 | cmp [rflag],1 |
617 | cmp [rflag],1 |
619 | jz _redraw |
618 | jz _redraw |
620 | mov eax,[end_str] |
619 | mov eax,[end_str] |
621 | sub eax,0x80001 |
620 | sub eax,0x80001 |
622 | cmp eax,[sizefile] |
621 | cmp eax,[sizefile] |
623 | jl @f |
622 | jl @f |
624 | _redraw: |
623 | _redraw: |
625 | xor edx,edx |
624 | xor edx,edx |
626 | mov eax,0x10 |
625 | mov eax,0x10 |
627 | imul ecx |
626 | imul ecx |
628 | sub [end_str],eax |
627 | sub [end_str],eax |
629 | cmp [end_str],0x10000 |
628 | cmp [end_str],0x10000 |
630 | jge A3 |
629 | jge A3 |
631 | mov [end_str],0x10000 |
630 | mov [end_str],0x10000 |
632 | A3: |
631 | A3: |
633 | mov [rflag],0 |
632 | mov [rflag],0 |
634 | @@: |
633 | @@: |
635 | mov eax,0x28 |
634 | mov eax,0x28 |
636 | @@: |
635 | @@: |
637 | push ecx |
636 | push ecx |
638 | push eax |
637 | push eax |
639 | call form_str |
638 | call form_str |
640 | mov ebx,0x01880000 |
639 | mov ebx,0x01880000 |
641 | add ebx,eax |
640 | add ebx,eax |
642 | mov ecx,0x00ffffff |
641 | mov ecx,0x00ffffff |
643 | add eax,10 |
642 | add eax,10 |
644 | mov edx,[end_str] |
643 | mov edx,[end_str] |
645 | push eax |
644 | push eax |
646 | sub edx,0x10 |
645 | sub edx,0x10 |
647 | mov esi,0x10 |
646 | mov esi,0x10 |
648 | mov eax,4 |
647 | mov eax,4 |
649 | int 0x40 |
648 | mcall |
650 | pop eax |
649 | pop eax |
651 | pop ecx |
650 | pop ecx |
652 | loop @b |
651 | loop @b |
653 | no_out: |
652 | no_out: |
654 | popad |
653 | popad |
655 | ret |
654 | ret |
656 | 655 | ||
657 | 656 | ||
658 | 657 | ||
659 | form_str: |
658 | form_str: |
660 | pushad |
659 | pushad |
661 | mov ebp,[end_str] ;¯®á«¥¤¨© ¢ë¢¥¤¥ë© ¡ ©â |
660 | mov ebp,[end_str] ;¯®á«¥¤¨© ¢ë¢¥¤¥ë© ¡ ©â |
662 | xor edi,edi ;áç¥â稪 ¡ ©â <= 16 |
661 | xor edi,edi ;áç¥â稪 ¡ ©â <= 16 |
663 | ;¢ë¢¥á⨠¤à¥á |
662 | ;¢ë¢¥á⨠¤à¥á |
664 | mov ecx,ebp |
663 | mov ecx,ebp |
665 | mov ebx,0x80100 ;8 æ¨äà, 16-à¨çë¥, ç¨á«® ¢ ecx |
664 | mov ebx,0x80100 ;8 æ¨äà, 16-à¨çë¥, ç¨á«® ¢ ecx |
666 | sub ecx,0x10000 ;®à¬ «¨§ æ¨ï ¤à¥á |
665 | sub ecx,0x10000 ;®à¬ «¨§ æ¨ï ¤à¥á |
667 | mov edx,0x80000 ; ç «® ¯® |
666 | mov edx,0x80000 ; ç «® ¯® |
668 | add edx,[esp+0x24] ; ç «® ¯® |
667 | add edx,[esp+0x24] ; ç «® ¯® |
669 | mov esi,0x00ffffff ;梥â |
668 | mov esi,0x00ffffff ;梥â |
670 | mov eax,47 ;¢ë¢¥á⨠ç¨á«® |
669 | mov eax,47 ;¢ë¢¥á⨠ç¨á«® |
671 | int 0x40 |
670 | mcall |
672 | add edx,0x600000 ;0x40 - 8chars + 0x20 - space |
671 | add edx,0x600000 ;0x40 - 8chars + 0x20 - space |
673 | mov ebx,0x20100 ;2 æ¨äàë, 16-à¨çë¥, ç¨á«® ¢ ecx |
672 | mov ebx,0x20100 ;2 æ¨äàë, 16-à¨çë¥, ç¨á«® ¢ ecx |
674 | @@: |
673 | @@: |
675 | mov ecx,[ebp+edi] ;ç¨á«® ¢ ecx |
674 | mov ecx,[ebp+edi] ;ç¨á«® ¢ ecx |
676 | inc edi |
675 | inc edi |
677 | and ecx,0xff |
676 | and ecx,0xff |
678 | cmp edi,0x11 |
677 | cmp edi,0x11 |
679 | jz endstr |
678 | jz endstr |
680 | int 0x40 |
679 | mcall |
681 | add edx,0x100000 |
680 | add edx,0x100000 |
682 | jmp @b |
681 | jmp @b |
683 | endstr: |
682 | endstr: |
684 | dec edi |
683 | dec edi |
685 | add ebp,edi |
684 | add ebp,edi |
686 | mov [end_str],ebp |
685 | mov [end_str],ebp |
687 | popad |
686 | popad |
688 | ret 4 |
687 | ret 4 |
689 | 688 | ||
690 | 689 | ||
691 | 690 | ||
692 | draw_cursor: |
691 | draw_cursor: |
693 | pushad |
692 | pushad |
694 | mov ebx,[x_cursor] |
693 | mov ebx,[x_cursor] |
695 | mov ecx,[esp+0x24] |
694 | mov ecx,[esp+0x24] |
696 | mov edx,[color] |
695 | mov edx,[color] |
697 | mov eax,13 |
696 | mov eax,13 |
698 | int 0x40 |
697 | mcall |
699 | movzx edi,[o_s_flag] |
698 | movzx edi,[o_s_flag] |
700 | and edi,8 |
699 | and edi,8 |
701 | jnz @f |
700 | jnz @f |
702 | add ebx,[text_cursor] |
701 | add ebx,[text_cursor] |
703 | int 0x40 |
702 | mcall |
704 | @@: |
703 | @@: |
705 | popad |
704 | popad |
706 | ret 4 |
705 | ret 4 |
707 | 706 | ||
708 | f2: |
707 | f2: |
709 | mov eax,[process_info+46] |
708 | mov eax,[process_info+46] |
710 | mov [x_cursor],0xb0005 |
709 | mov [x_cursor],0xb0005 |
711 | sub eax,0x11 |
710 | sub eax,0x11 |
712 | ; mov [text_cursor],-1 |
711 | ; mov [text_cursor],-1 |
713 | shl eax,0x10 |
712 | shl eax,0x10 |
714 | 713 | ||
715 | mov [y_filename_area],eax |
714 | mov [y_filename_area],eax |
716 | ret |
715 | ret |
717 | 716 | ||
718 | menufile: |
717 | menufile: |
719 | mov [menu_opened],1 |
718 | mov [menu_opened],1 |
720 | mov ebx,[xf_menu];x-base+x_size for hi-level menu button |
719 | mov ebx,[xf_menu];x-base+x_size for hi-level menu button |
721 | mov edx,5;first id button for this group |
720 | mov edx,5;first id button for this group |
722 | mov edi,3;counter buttons |
721 | mov edi,3;counter buttons |
723 | call f1 |
722 | call f1 |
724 | ;output text for menu |
723 | ;output text for menu |
725 | shr ecx,0x10 ;y-base button |
724 | shr ecx,0x10 ;y-base button |
726 | and ebx,0xffff0000 |
725 | and ebx,0xffff0000 |
727 | add ecx,0x6000f ;for y-base text |
726 | add ecx,0x6000f ;for y-base text |
728 | mov esi,4 ;length text |
727 | mov esi,4 ;length text |
729 | add ebx,ecx ;full base text |
728 | add ebx,ecx ;full base text |
730 | mov edx,m_open |
729 | mov edx,m_open |
731 | mov ecx,[sc.work_button_text] |
730 | mov ecx,[sc.work_button_text] |
732 | or ecx,0x10000000 |
731 | or ecx,0x10000000 |
733 | sub eax,4 |
732 | sub eax,4 |
734 | int 0x40 |
733 | mcall |
735 | add ebx,0x0c ;next full base text |
734 | add ebx,0x0c ;next full base text |
736 | add edx,4 ;next string |
735 | add edx,4 ;next string |
737 | int 0x40 |
736 | mcall |
738 | add ebx,0x0c |
737 | add ebx,0x0c |
739 | add edx,4 |
738 | add edx,4 |
740 | int 0x40 |
739 | mcall |
741 | ret |
740 | ret |
742 | 741 | ||
743 | menucoding: |
742 | menucoding: |
744 | mov [menu_opened],1 |
743 | mov [menu_opened],1 |
745 | mov ebx,[xe_menu] |
744 | mov ebx,[xe_menu] |
746 | mov edx,8 ;first id |
745 | mov edx,8 ;first id |
747 | mov edi,6 ;counter |
746 | mov edi,6 ;counter |
748 | add ebx,0x10 ;add width buttons |
747 | add ebx,0x10 ;add width buttons |
749 | push edi |
748 | push edi |
750 | call f1 |
749 | call f1 |
751 | pop edi |
750 | pop edi |
752 | shr ecx,0x10 |
751 | shr ecx,0x10 |
753 | and ebx,0xffff0000 |
752 | and ebx,0xffff0000 |
754 | add ecx,0x8000f |
753 | add ecx,0x8000f |
755 | mov esi,8 ;length text |
754 | mov esi,8 ;length text |
756 | add ebx,ecx |
755 | add ebx,ecx |
757 | mov edx,m_win2dos |
756 | mov edx,m_win2dos |
758 | mov ecx,[sc.work_button_text] |
757 | mov ecx,[sc.work_button_text] |
759 | or ecx,0x10000000 |
758 | or ecx,0x10000000 |
760 | sub eax,4 |
759 | sub eax,4 |
761 | @@: |
760 | @@: |
762 | int 0x40 |
761 | mcall |
763 | add ebx,0x0c |
762 | add ebx,0x0c |
764 | add edx,8 ;next string |
763 | add edx,8 ;next string |
765 | dec edi |
764 | dec edi |
766 | jnz @b |
765 | jnz @b |
767 | ret |
766 | ret |
768 | 767 | ||
769 | menuhelp: |
768 | menuhelp: |
770 | mov [menu_opened],1 |
769 | mov [menu_opened],1 |
771 | mov ebx,[xh_menu] |
770 | mov ebx,[xh_menu] |
772 | mov edx,14 ;first id |
771 | mov edx,14 ;first id |
773 | add ebx,6 ;add width buttons |
772 | add ebx,6 ;add width buttons |
774 | mov edi,2 ;counter |
773 | mov edi,2 ;counter |
775 | call f1 |
774 | call f1 |
776 | shr ecx,0x10 |
775 | shr ecx,0x10 |
777 | and ebx,0xffff0000 |
776 | and ebx,0xffff0000 |
778 | add ecx,0x8000f |
777 | add ecx,0x8000f |
779 | mov esi,4 ;length text |
778 | mov esi,4 ;length text |
780 | add ebx,ecx |
779 | add ebx,ecx |
781 | mov edx,m_help |
780 | mov edx,m_help |
782 | mov ecx,[sc.work_button_text] |
781 | mov ecx,[sc.work_button_text] |
783 | or ecx,0x10000000 |
782 | or ecx,0x10000000 |
784 | sub eax,4 |
783 | sub eax,4 |
785 | int 0x40 |
784 | mcall |
786 | add ebx,0x0c |
785 | add ebx,0x0c |
787 | inc esi ;add lebgth output text |
786 | inc esi ;add lebgth output text |
788 | add edx,4 |
787 | add edx,4 |
789 | int 0x40 |
788 | mcall |
790 | ret |
789 | ret |
791 | 790 | ||
792 | f1:;uses for drawing low-level menu buttons |
791 | f1:;uses for drawing low-level menu buttons |
793 | ;counter buttons get into |
792 | ;counter buttons get into |
794 | ;menufile,menucoding,menuhelp funcs. |
793 | ;menufile,menucoding,menuhelp funcs. |
795 | mov ecx,[y_menu] ;y-base+y_size for hi-level menu button |
794 | mov ecx,[y_menu] ;y-base+y_size for hi-level menu button |
796 | mov esi,[sc.work_button] ;color buttons |
795 | mov esi,[sc.work_button] ;color buttons |
797 | mov eax,8 |
796 | mov eax,8 |
798 | push ecx ;for output text |
797 | push ecx ;for output text |
799 | @@: |
798 | @@: |
800 | add ecx,0xc0000 |
799 | add ecx,0xc0000 |
801 | int 0x40 |
800 | mcall |
802 | inc edx ;id |
801 | inc edx ;id |
803 | dec edi ;counter |
802 | dec edi ;counter |
804 | jnz @b |
803 | jnz @b |
805 | pop ecx ;for output text |
804 | pop ecx ;for output text |
806 | ret |
805 | ret |
807 | 806 | ||
808 | redraw_window: |
807 | redraw_window: |
809 | call get_process_info |
808 | call get_process_info |
810 | mov [rflag],1 |
809 | mov [rflag],1 |
811 | call draw_window |
810 | call draw_window |
812 | ret |
811 | ret |
813 | 812 | ||
814 | ;this is debug func |
813 | ;this is debug func |
815 | debug: |
814 | debug: |
816 | pushad |
815 | pushad |
817 | mov ecx,[esp+0x24] |
816 | mov ecx,[esp+0x24] |
818 | mov ebx,0x80100 |
817 | mov ebx,0x80100 |
819 | mov edx,0x10000a0 |
818 | mov edx,0x10000a0 |
820 | mov eax,47 |
819 | mov eax,47 |
821 | mov esi,0x00ffffff |
820 | mov esi,0x00ffffff |
822 | int 0x40 |
821 | mcall |
823 | popad |
822 | popad |
824 | ret 4 |
823 | ret 4 |
825 | 824 | ||
826 | ; ********************************************* |
825 | ; ********************************************* |
827 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
826 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
828 | ; ********************************************* |
827 | ; ********************************************* |
829 | 828 | ||
830 | draw_window: |
829 | draw_window: |
831 | pushad |
830 | pushad |
832 | mov eax,48 |
831 | mov eax,48 |
833 | mov ebx,3 |
832 | mov ebx,3 |
834 | mov ecx,sc |
833 | mov ecx,sc |
835 | mov edx,sizeof.system_colors |
834 | mov edx,sizeof.system_colors |
836 | int 0x40 |
835 | mcall |
837 | 836 | ||
838 | mov eax,12 ; function 12:tell os about windowdraw |
837 | mov eax,12 ; function 12:tell os about windowdraw |
839 | mov ebx,1 ; 1, start of draw |
838 | mov ebx,1 ; 1, start of draw |
840 | int 0x40 |
839 | mcall |
841 | ; DRAW WINDOW |
840 | ; DRAW WINDOW |
842 | mov eax,0 ; function 0 : define and draw window |
841 | mov eax,0 ; function 0 : define and draw window |
843 | ; [x start] *65536 + [x size] |
842 | ; [x start] *65536 + [x size] |
844 | mov ebx,[process_info+42] |
843 | mov ebx,[process_info+42] |
845 | ; [y start] *65536 + [y size] |
844 | ; [y start] *65536 + [y size] |
846 | mov ecx,[process_info+46] |
845 | mov ecx,[process_info+46] |
847 | mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
846 | mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
848 | int 0x40 |
847 | mcall |
849 | ; WINDOW LABEL |
848 | ; WINDOW LABEL |
850 | mov eax,4 ; function 4 : write text to window |
849 | mov eax,4 ; function 4 : write text to window |
851 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
850 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
852 | mov ecx,[sc.grab_text] |
851 | mov ecx,[sc.grab_text] |
853 | or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
852 | or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
854 | mov edx,labelt ; pointer to text beginning |
853 | mov edx,labelt ; pointer to text beginning |
855 | mov esi,labellen-labelt ; text length |
854 | mov esi,labellen-labelt ; text length |
856 | int 0x40 |
855 | mcall |
857 | ;check for only header window output |
856 | ;check for only header window output |
858 | cmp dword [process_info+46],25 |
857 | cmp dword [process_info+46],25 |
859 | jle minimaze_view |
858 | jle minimaze_view |
860 | 859 | ||
861 | ;MENU AREA |
860 | ;MENU AREA |
862 | mov eax,[process_info+42] ;x-size window |
861 | mov eax,[process_info+42] ;x-size window |
863 | mov ecx,[process_info+46] ;y-size window |
862 | mov ecx,[process_info+46] ;y-size window |
864 | push ecx ;for using done |
863 | push ecx ;for using done |
865 | mov ebx,0x40000 |
864 | mov ebx,0x40000 |
866 | sub eax,8 |
865 | sub eax,8 |
867 | mov edi,ecx |
866 | mov edi,ecx |
868 | add ebx,eax ;x-base + x-size |
867 | add ebx,eax ;x-base + x-size |
869 | sub edi,22 ;temporary value for menu area |
868 | sub edi,22 ;temporary value for menu area |
870 | push ebx ;for drawing buttons area |
869 | push ebx ;for drawing buttons area |
871 | sub ecx,edi ;y-base menu area |
870 | sub ecx,edi ;y-base menu area |
872 | mov edx,[sc.work_graph] |
871 | mov edx,[sc.work_graph] |
873 | shl ecx,0x10 |
872 | shl ecx,0x10 |
874 | mov eax,13 |
873 | mov eax,13 |
875 | add ecx,0x10 |
874 | add ecx,0x10 |
876 | int 0x40 |
875 | mcall |
877 | ;MENU BUTTONS |
876 | ;MENU BUTTONS |
878 | ;now in hi-half ecx register begin Y-coord. menu area |
877 | ;now in hi-half ecx register begin Y-coord. menu area |
879 | ;in hi-half ebx begin X-coord. |
878 | ;in hi-half ebx begin X-coord. |
880 | ;menu 'File' |
879 | ;menu 'File' |
881 | mov esi,edx ;color |
880 | mov esi,edx ;color |
882 | and ecx,0xffff0000 |
881 | and ecx,0xffff0000 |
883 | and ebx,0xffff0000 |
882 | and ebx,0xffff0000 |
884 | add ecx,0x1000c |
883 | add ecx,0x1000c |
885 | add ebx,0x20028 ;40x12 |
884 | add ebx,0x20028 ;40x12 |
886 | mov edx,2 ;menu 'File' id = 2 |
885 | mov edx,2 ;menu 'File' id = 2 |
887 | mov [y_menu],ecx ;for low-level menus func. |
886 | mov [y_menu],ecx ;for low-level menus func. |
888 | mov [xf_menu],ebx;for low-level menus func. |
887 | mov [xf_menu],ebx;for low-level menus func. |
889 | mov eax,8 |
888 | mov eax,8 |
890 | push ebx ;for output buttons texts |
889 | push ebx ;for output buttons texts |
891 | int 0x40 |
890 | mcall |
892 | ;registers is't change |
891 | ;registers is't change |
893 | ;menu 'Coding' |
892 | ;menu 'Coding' |
894 | add ebx,0x290018 ;80x12 |
893 | add ebx,0x290018 ;80x12 |
895 | inc edx ;menu 'coding' id = 3 |
894 | inc edx ;menu 'coding' id = 3 |
896 | mov [xe_menu],ebx;for low-level menus func. |
895 | mov [xe_menu],ebx;for low-level menus func. |
897 | int 0x40 |
896 | mcall |
898 | ;menu 'Help' |
897 | ;menu 'Help' |
899 | add ebx,0x40ffe8 ;+0x280000 - 0x28, 40x12 |
898 | add ebx,0x40ffe8 ;+0x280000 - 0x28, 40x12 |
900 | inc edx ;menu 'Help' id = 4 |
899 | inc edx ;menu 'Help' id = 4 |
901 | mov [xh_menu],ebx;for low-level menus func. |
900 | mov [xh_menu],ebx;for low-level menus func. |
902 | int 0x40 |
901 | mcall |
903 | ;MENU BUTTONS TEXTS |
902 | ;MENU BUTTONS TEXTS |
904 | ;'File' |
903 | ;'File' |
905 | pop ebx |
904 | pop ebx |
906 | shr ecx,0x10 |
905 | shr ecx,0x10 |
907 | and ebx,0xffff0000 |
906 | and ebx,0xffff0000 |
908 | add ecx,3 |
907 | add ecx,3 |
909 | mov eax,4 ; function 4 : write text to window |
908 | mov eax,4 ; function 4 : write text to window |
910 | add ebx,0x80000 |
909 | add ebx,0x80000 |
911 | mov edx,f_menu |
910 | mov edx,f_menu |
912 | add ebx,ecx ; [x start] *65536 + [y start] |
911 | add ebx,ecx ; [x start] *65536 + [y start] |
913 | mov esi,4 |
912 | mov esi,4 |
914 | mov ecx,[sc.work_button_text] |
913 | mov ecx,[sc.work_button_text] |
915 | or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
914 | or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
916 | push esi ;for 'Help' menu text |
915 | push esi ;for 'Help' menu text |
917 | int 0x40 |
916 | mcall |
918 | ;'coding' |
917 | ;'coding' |
919 | ;registers is't change |
918 | ;registers is't change |
920 | add ebx,0x2d0000 |
919 | add ebx,0x2d0000 |
921 | ;mov esi,6 |
920 | ;mov esi,6 |
922 | add esi,2 |
921 | add esi,2 |
923 | ; mov edx,e_menu |
922 | ; mov edx,e_menu |
924 | add edx,4 |
923 | add edx,4 |
925 | int 0x40 |
924 | mcall |
926 | ;'Help' |
925 | ;'Help' |
927 | add ebx,0x3b0000 |
926 | add ebx,0x3b0000 |
928 | ; mov esi,4 |
927 | ; mov esi,4 |
929 | pop esi |
928 | pop esi |
930 | ; mov edx,h_menu |
929 | ; mov edx,h_menu |
931 | add edx,6 |
930 | add edx,6 |
932 | int 0x40 |
931 | mcall |
933 | ;LOW_LEVEL MENU |
932 | ;LOW_LEVEL MENU |
934 | ;for every hi-level menu exists one procedure |
933 | ;for every hi-level menu exists one procedure |
935 | ;in begin programm they are not calls, |
934 | ;in begin programm they are not calls, |
936 | ;but when user click on one item hi-level menu |
935 | ;but when user click on one item hi-level menu |
937 | ;or press hot keys, call one func. and after |
936 | ;or press hot keys, call one func. and after |
938 | ;end work this func. she is redraw window - |
937 | ;end work this func. she is redraw window - |
939 | ;low-level menu is hide. Functions: |
938 | ;low-level menu is hide. Functions: |
940 | ;menufile,menucoding,menuhelp. |
939 | ;menufile,menucoding,menuhelp. |
941 | ;Thay uses global virables, top-left corner every |
940 | ;Thay uses global virables, top-left corner every |
942 | ;hi-level menu buttons: [xf_menu],[xe_menu],[xh_menu],[y_menu] |
941 | ;hi-level menu buttons: [xf_menu],[xe_menu],[xh_menu],[y_menu] |
943 | 942 | ||
944 | ;DRAW BUTTONS AREA |
943 | ;DRAW BUTTONS AREA |
945 | pop ebx ;for push ebx into processed menu area: x-bzse + x-size |
944 | pop ebx ;for push ebx into processed menu area: x-bzse + x-size |
946 | ; mov ecx,[process_info+46] |
945 | ; mov ecx,[process_info+46] |
947 | pop ecx |
946 | pop ecx |
948 | push ecx |
947 | push ecx |
949 | sub ecx,24 |
948 | sub ecx,24 |
950 | mov edx,[sc.work_graph] |
949 | mov edx,[sc.work_graph] |
951 | shl ecx,16 ;y start |
950 | shl ecx,16 ;y start |
952 | mov eax,13 |
951 | mov eax,13 |
953 | add ecx,20 |
952 | add ecx,20 |
954 | int 0x40 |
953 | mcall |
955 | 954 | ||
956 | ;filename input area |
955 | ;filename input area |
957 | ; mov ecx,[process_info+46] |
956 | ; mov ecx,[process_info+46] |
958 | pop ecx |
957 | pop ecx |
959 | push ecx ;for info strings |
958 | push ecx ;for info strings |
960 | mov ebx,0x0008005a |
959 | mov ebx,0x0008005a |
961 | sub ecx,21 |
960 | sub ecx,21 |
962 | xor edx,edx |
961 | xor edx,edx |
963 | shl ecx,16 |
962 | shl ecx,16 |
964 | mov [y_filename_area],ecx |
963 | mov [y_filename_area],ecx |
965 | dec edx |
964 | dec edx |
966 | add ecx,16 |
965 | add ecx,16 |
967 | mov eax,13 |
966 | mov eax,13 |
968 | push ecx ;for button 'Go' |
967 | push ecx ;for button 'Go' |
969 | int 0x40 |
968 | mcall |
970 | 969 | ||
971 | ;button 'Go', press in case open/save if filename input complete |
970 | ;button 'Go', press in case open/save if filename input complete |
972 | ;button size = 24x16 |
971 | ;button size = 24x16 |
973 | mov eax,8 |
972 | mov eax,8 |
974 | pop ecx ;y-base+y-size |
973 | pop ecx ;y-base+y-size |
975 | mov ebx,0x00680018;x-base+x-size |
974 | mov ebx,0x00680018;x-base+x-size |
976 | dec ecx |
975 | dec ecx |
977 | mov edx,0xff ;id |
976 | mov edx,0xff ;id |
978 | mov esi,[sc.work_button] |
977 | mov esi,[sc.work_button] |
979 | int 0x40 |
978 | mcall |
980 | shr ecx,0x10 |
979 | shr ecx,0x10 |
981 | and ebx,0xffff0000 |
980 | and ebx,0xffff0000 |
982 | add ecx,0x50004 |
981 | add ecx,0x50004 |
983 | mov edx,b_go |
982 | mov edx,b_go |
984 | add ebx,ecx |
983 | add ebx,ecx |
985 | mov esi,2 |
984 | mov esi,2 |
986 | mov ecx,[sc.work_button_text] |
985 | mov ecx,[sc.work_button_text] |
987 | or ecx,0x10000000 |
986 | or ecx,0x10000000 |
988 | sub eax,4 |
987 | sub eax,4 |
989 | int 0x40 |
988 | mcall |
990 | 989 | ||
991 | ;where output cursor? |
990 | ;where output cursor? |
992 | mov al,[o_s_flag] |
991 | mov al,[o_s_flag] |
993 | and al,8 |
992 | and al,8 |
994 | je @f |
993 | je @f |
995 | mov ecx,[y_filename_area] |
994 | mov ecx,[y_filename_area] |
996 | add ecx,0x40008 |
995 | add ecx,0x40008 |
997 | jmp cursor |
996 | jmp cursor |
998 | @@: ;o_s_flag<0 - not output cursor into filename area |
997 | @@: ;o_s_flag<0 - not output cursor into filename area |
999 | mov ecx,[y_cursor] |
998 | mov ecx,[y_cursor] |
1000 | cursor: |
999 | cursor: |
1001 | push ecx |
1000 | push ecx |
1002 | call draw_cursor |
1001 | call draw_cursor |
1003 | 1002 | ||
1004 | mov eax,[y_filename_area] |
1003 | mov eax,[y_filename_area] |
1005 | mov ebx,0xa0000 |
1004 | mov ebx,0xa0000 |
1006 | mov edx,filename |
1005 | mov edx,filename |
1007 | shr eax,0x10 |
1006 | shr eax,0x10 |
1008 | and ebx,0xffff0000 |
1007 | and ebx,0xffff0000 |
1009 | add eax,4 |
1008 | add eax,4 |
1010 | xor ecx,ecx |
1009 | xor ecx,ecx |
1011 | add ebx,eax |
1010 | add ebx,eax |
1012 | movzx esi,[name_l] |
1011 | movzx esi,[name_l] |
1013 | mov eax,4 |
1012 | mov eax,4 |
1014 | int 0x40 |
1013 | mcall |
1015 | 1014 | ||
1016 | ;info strings |
1015 | ;info strings |
1017 | ; sizefile text |
1016 | ; sizefile text |
1018 | ; mov eax,[process_info+46] |
1017 | ; mov eax,[process_info+46] |
1019 | pop eax |
1018 | pop eax |
1020 | mov ebx,0x00840000 |
1019 | mov ebx,0x00840000 |
1021 | sub eax,18 |
1020 | sub eax,18 |
1022 | xor ecx,ecx |
1021 | xor ecx,ecx |
1023 | add ebx,eax |
1022 | add ebx,eax |
1024 | mov edx,sizestr ; pointer to text beginning |
1023 | mov edx,sizestr ; pointer to text beginning |
1025 | mov eax,4 |
1024 | mov eax,4 |
1026 | mov esi,5 |
1025 | mov esi,5 |
1027 | int 0x40 |
1026 | mcall |
1028 | add ebx,0x00530000 |
1027 | add ebx,0x00530000 |
1029 | inc esi |
1028 | inc esi |
1030 | ; mov edx,offst |
1029 | ; mov edx,offst |
1031 | add edx,5 |
1030 | add edx,5 |
1032 | inc esi |
1031 | inc esi |
1033 | int 0x40 |
1032 | mcall |
1034 | ;sizefile |
1033 | ;sizefile |
1035 | mov ecx,[sizefile] |
1034 | mov ecx,[sizefile] |
1036 | mov edx,ebx |
1035 | mov edx,ebx |
1037 | xor esi,esi |
1036 | xor esi,esi |
1038 | sub edx,0x00350000 |
1037 | sub edx,0x00350000 |
1039 | mov eax,47 |
1038 | mov eax,47 |
1040 | mov ebx,0x80100 |
1039 | mov ebx,0x80100 |
1041 | int 0x40 |
1040 | mcall |
1042 | mov ecx,[current] |
1041 | mov ecx,[current] |
1043 | add edx,0x005f0000 |
1042 | add edx,0x005f0000 |
1044 | int 0x40 |
1043 | mcall |
1045 | 1044 | ||
1046 | push [text_cursor] ;íâ® ¯®§¨æ¨ï ªãàá®à ¢ ⥪á⮢®© áâப¥ |
1045 | push [text_cursor] ;íâ® ¯®§¨æ¨ï ªãàá®à ¢ ⥪á⮢®© áâப¥ |
1047 | call draw_cursor |
1046 | call draw_cursor |
1048 | mov ecx,[sizefile] |
1047 | mov ecx,[sizefile] |
1049 | jecxz minimaze_view |
1048 | jecxz minimaze_view |
1050 | call output_screen |
1049 | call output_screen |
1051 | 1050 | ||
1052 | minimaze_view: |
1051 | minimaze_view: |
1053 | mov eax,12 ; function 12:tell os about windowdraw |
1052 | mov eax,12 ; function 12:tell os about windowdraw |
1054 | mov ebx,2 ; 2, end of draw |
1053 | mov ebx,2 ; 2, end of draw |
1055 | int 0x40 |
1054 | mcall |
1056 | popad |
1055 | popad |
1057 | ret |
1056 | ret |
1058 | 1057 | ||
1059 | 1058 | ||
1060 | 1059 | ||
1061 | 1060 | ||
1062 | 1061 | ||
1063 | get_process_info: |
1062 | get_process_info: |
1064 | pushad |
1063 | pushad |
1065 | mov eax,9 |
1064 | mov eax,9 |
1066 | mov ebx,process_info |
1065 | mov ebx,process_info |
1067 | xor ecx,ecx |
1066 | xor ecx,ecx |
1068 | dec ecx |
1067 | dec ecx |
1069 | int 0x40 |
1068 | mcall |
1070 | popad |
1069 | popad |
1071 | ret |
1070 | ret |
1072 | 1071 | ||
1073 | coding: |
1072 | coding: |
1074 | pushad |
1073 | pushad |
1075 | mov ebp,0x10000 ;0x80000 |
1074 | mov ebp,0x10000 ;0x80000 |
1076 | mov edi,[esp+0x28] ;source table |
1075 | mov edi,[esp+0x28] ;source table |
1077 | mov esi,[esp+0x24] ;destination table |
1076 | mov esi,[esp+0x24] ;destination table |
1078 | xor ecx,ecx ;index in file |
1077 | xor ecx,ecx ;index in file |
1079 | new_char: |
1078 | new_char: |
1080 | xor ebx,ebx ;index in tables |
1079 | xor ebx,ebx ;index in tables |
1081 | not_c: |
1080 | not_c: |
1082 | mov ah,[ebp+ecx] ;load char |
1081 | mov ah,[ebp+ecx] ;load char |
1083 | cmp ah,[edi+ebx] ; |
1082 | cmp ah,[edi+ebx] ; |
1084 | jz @f |
1083 | jz @f |
1085 | inc ebx |
1084 | inc ebx |
1086 | cmp ebx,0x40 |
1085 | cmp ebx,0x40 |
1087 | jge end_table |
1086 | jge end_table |
1088 | jmp not_c |
1087 | jmp not_c |
1089 | @@: |
1088 | @@: |
1090 | mov al,[esi+ebx] |
1089 | mov al,[esi+ebx] |
1091 | inc ebx |
1090 | inc ebx |
1092 | mov [ebp+ecx],al |
1091 | mov [ebp+ecx],al |
1093 | end_table: |
1092 | end_table: |
1094 | inc ecx |
1093 | inc ecx |
1095 | cmp ecx,[sizefile] |
1094 | cmp ecx,[sizefile] |
1096 | jle new_char |
1095 | jle new_char |
1097 | popad |
1096 | popad |
1098 | ret 8 |
1097 | ret 8 |
1099 | 1098 | ||
1100 | create_process: |
1099 | create_process: |
1101 | pushad |
1100 | pushad |
1102 | mov eax,51 |
1101 | mov eax,51 |
1103 | xor ebx,ebx |
1102 | xor ebx,ebx |
1104 | mov ecx,[esp+0x24] |
1103 | mov ecx,[esp+0x24] |
1105 | inc ebx |
1104 | inc ebx |
1106 | mov edx,0x7E000 ;0x1000 |
1105 | mov edx,0x7E000 ;0x1000 |
1107 | int 0x40 |
1106 | mcall |
1108 | popad |
1107 | popad |
1109 | ret 4 |
1108 | ret 4 |
1110 | 1109 | ||
1111 | help_thread: |
1110 | help_thread: |
1112 | call help_window |
1111 | call help_window |
1113 | help_still: |
1112 | help_still: |
1114 | mov eax,10 |
1113 | mov eax,10 |
1115 | int 0x40 |
1114 | mcall |
1116 | dec eax |
1115 | dec eax |
1117 | jz help_red |
1116 | jz help_red |
1118 | dec eax |
1117 | dec eax |
1119 | jz help_key |
1118 | jz help_key |
1120 | dec eax |
1119 | dec eax |
1121 | jz help_button |
1120 | jz help_button |
1122 | jmp help_still |
1121 | jmp help_still |
1123 | help_red: |
1122 | help_red: |
1124 | call help_window |
1123 | call help_window |
1125 | jmp help_still |
1124 | jmp help_still |
1126 | help_key: |
1125 | help_key: |
1127 | inc eax |
1126 | inc eax |
1128 | inc eax |
1127 | inc eax |
1129 | int 0x40 |
1128 | mcall |
1130 | jmp help_still |
1129 | jmp help_still |
1131 | help_button: |
1130 | help_button: |
1132 | mov eax,17 |
1131 | mov eax,17 |
1133 | int 0x40 |
1132 | mcall |
1134 | dec ah |
1133 | dec ah |
1135 | jne help_still |
1134 | jne help_still |
1136 | shr eax,8 |
1135 | shr eax,8 |
1137 | dec eax |
1136 | dec eax |
1138 | int 0x40 |
1137 | mcall |
1139 | 1138 | ||
1140 | help_window: |
1139 | help_window: |
1141 | pushad |
1140 | pushad |
1142 | mov eax,12 ; function 12:tell os about windowdraw |
1141 | mov eax,12 ; function 12:tell os about windowdraw |
1143 | mov ebx,1 ; 1, start of draw |
1142 | mov ebx,1 ; 1, start of draw |
1144 | int 0x40 |
1143 | mcall |
1145 | ; DRAW WINDOW |
1144 | ; DRAW WINDOW |
1146 | mov eax,0 ; function 0 : define and draw window |
1145 | mov eax,0 ; function 0 : define and draw window |
1147 | mov ebx,0x500140 ; [x start] *65536 + [x size] |
1146 | mov ebx,0x500140 ; [x start] *65536 + [x size] |
1148 | mov ecx,0x700110 ; [y start] *65536 + [y size] |
1147 | mov ecx,0x700110 ; [y start] *65536 + [y size] |
1149 | mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
1148 | mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
1150 | int 0x40 |
1149 | mcall |
1151 | ; WINDOW LABEL |
1150 | ; WINDOW LABEL |
1152 | mov eax,4 ; function 4 : write text to window |
1151 | mov eax,4 ; function 4 : write text to window |
1153 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
1152 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
1154 | mov ecx,0x10ffffff ; font 1 & color ( 0xF0RRGGBB ) |
1153 | mov ecx,0x10ffffff ; font 1 & color ( 0xF0RRGGBB ) |
1155 | mov edx,help_label ; pointer to text beginning |
1154 | mov edx,help_label ; pointer to text beginning |
1156 | mov esi,14 ; text length |
1155 | mov esi,14 ; text length |
1157 | int 0x40 |
1156 | mcall |
1158 | ; HELP TEXT |
1157 | ; HELP TEXT |
1159 | add edx,14 ;help_text addr. |
1158 | add edx,14 ;help_text addr. |
1160 | add esi,37 ; = 51 - length 1 line |
1159 | add esi,37 ; = 51 - length 1 line |
1161 | mov ecx,0x00ffffff |
1160 | mov ecx,0x00ffffff |
1162 | mov edi,(help_end-help_text)/51 |
1161 | mov edi,(help_end-help_text)/51 |
1163 | @@: |
1162 | @@: |
1164 | add ebx,0x10 |
1163 | add ebx,0x10 |
1165 | int 0x40 |
1164 | mcall |
1166 | add edx,51 |
1165 | add edx,51 |
1167 | dec edi |
1166 | dec edi |
1168 | jnz @b |
1167 | jnz @b |
1169 | 1168 | ||
1170 | 1169 | ||
1171 | mov eax,12 ; function 12:tell os about windowdraw |
1170 | mov eax,12 ; function 12:tell os about windowdraw |
1172 | mov ebx,2 ; 2, end of draw |
1171 | mov ebx,2 ; 2, end of draw |
1173 | int 0x40 |
1172 | mcall |
1174 | popad |
1173 | popad |
1175 | ret |
1174 | ret |
1176 | 1175 | ||
1177 | about_thread: |
1176 | about_thread: |
1178 | call about_window |
1177 | call about_window |
1179 | about_still: |
1178 | about_still: |
1180 | mov eax,10 |
1179 | mov eax,10 |
1181 | int 0x40 |
1180 | mcall |
1182 | dec eax |
1181 | dec eax |
1183 | jz about_red |
1182 | jz about_red |
1184 | dec eax |
1183 | dec eax |
1185 | jz about_key |
1184 | jz about_key |
1186 | dec eax |
1185 | dec eax |
1187 | jz about_button |
1186 | jz about_button |
1188 | jmp about_still |
1187 | jmp about_still |
1189 | about_red: |
1188 | about_red: |
1190 | call about_window |
1189 | call about_window |
1191 | jmp about_still |
1190 | jmp about_still |
1192 | about_key: |
1191 | about_key: |
1193 | inc eax |
1192 | inc eax |
1194 | inc eax |
1193 | inc eax |
1195 | int 0x40 |
1194 | mcall |
1196 | jmp about_still |
1195 | jmp about_still |
1197 | about_button: |
1196 | about_button: |
1198 | mov eax,17 |
1197 | mov eax,17 |
1199 | int 0x40 |
1198 | mcall |
1200 | dec ah |
1199 | dec ah |
1201 | jne about_still |
1200 | jne about_still |
1202 | shr eax,8 |
1201 | shr eax,8 |
1203 | dec eax |
1202 | dec eax |
1204 | int 0x40 |
1203 | mcall |
1205 | 1204 | ||
1206 | about_window: |
1205 | about_window: |
1207 | pushad |
1206 | pushad |
1208 | mov eax,12 ; function 12:tell os about windowdraw |
1207 | mov eax,12 ; function 12:tell os about windowdraw |
1209 | mov ebx,1 ; 1, start of draw |
1208 | mov ebx,1 ; 1, start of draw |
1210 | int 0x40 |
1209 | mcall |
1211 | ; DRAW WINDOW |
1210 | ; DRAW WINDOW |
1212 | mov eax,0 ; function 0 : define and draw window |
1211 | mov eax,0 ; function 0 : define and draw window |
1213 | mov ebx,0x500140 ; [x start] *65536 + [x size] |
1212 | mov ebx,0x500140 ; [x start] *65536 + [x size] |
1214 | mov ecx,0x700110 ; [y start] *65536 + [y size] |
1213 | mov ecx,0x700110 ; [y start] *65536 + [y size] |
1215 | mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
1214 | mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
1216 | int 0x40 |
1215 | mcall |
1217 | ; WINDOW LABEL |
1216 | ; WINDOW LABEL |
1218 | mov eax,4 ; function 4 : write text to window |
1217 | mov eax,4 ; function 4 : write text to window |
1219 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
1218 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
1220 | mov ecx,[sc.work_button_text] |
1219 | mov ecx,[sc.work_button_text] |
1221 | or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
1220 | or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
1222 | mov edx,about_label ; pointer to text beginning |
1221 | mov edx,about_label ; pointer to text beginning |
1223 | mov esi,17 ; text length |
1222 | mov esi,17 ; text length |
1224 | int 0x40 |
1223 | mcall |
1225 | ; ABOUT TEXT |
1224 | ; ABOUT TEXT |
1226 | add edx,17 ;about_text addr. |
1225 | add edx,17 ;about_text addr. |
1227 | add esi,34 ; = 51 - length 1 line |
1226 | add esi,34 ; = 51 - length 1 line |
1228 | mov ecx,0x00ddeeff |
1227 | mov ecx,0x00ddeeff |
1229 | mov edi,15 |
1228 | mov edi,15 |
1230 | @@: |
1229 | @@: |
1231 | add ebx,0x10 |
1230 | add ebx,0x10 |
1232 | int 0x40 |
1231 | mcall |
1233 | add edx,51 |
1232 | add edx,51 |
1234 | dec edi |
1233 | dec edi |
1235 | jnz @b |
1234 | jnz @b |
1236 | 1235 | ||
1237 | mov eax,12 ; function 12:tell os about windowdraw |
1236 | mov eax,12 ; function 12:tell os about windowdraw |
1238 | mov ebx,2 ; 2, end of draw |
1237 | mov ebx,2 ; 2, end of draw |
1239 | int 0x40 |
1238 | mcall |
1240 | popad |
1239 | popad |
1241 | ret |
1240 | ret |
1242 | 1241 | ||
1243 | ; DATA AREA |
1242 | ; DATA AREA |
1244 | sizefile dd 0 |
1243 | sizefile dd 0 |
1245 | current dd 0 ;current offset relative begin file. Uses as offset for patch. |
1244 | current dd 0 ;current offset relative begin file. Uses as offset for patch. |
1246 | ;Coordinates left hi-level menu buttons |
1245 | ;Coordinates left hi-level menu buttons |
1247 | ;Uses into low-level menu output. |
1246 | ;Uses into low-level menu output. |
1248 | xf_menu dd 0 |
1247 | xf_menu dd 0 |
1249 | xe_menu dd 0 |
1248 | xe_menu dd 0 |
1250 | xh_menu dd 0 |
1249 | xh_menu dd 0 |
1251 | y_menu dd 0 ;top coord. menu |
1250 | y_menu dd 0 ;top coord. menu |
1252 | y_filename_area dd 0 ;top coord. filename input area |
1251 | y_filename_area dd 0 ;top coord. filename input area |
1253 | color dd 0 |
1252 | color dd 0 |
1254 | y_cursor dd 0x280008 ;y coord. shl 16 + y size for cursor |
1253 | y_cursor dd 0x280008 ;y coord. shl 16 + y size for cursor |
1255 | x_cursor dd 0x680005 ;x coord. shl 16 + x size for cursor |
1254 | x_cursor dd 0x680005 ;x coord. shl 16 + x size for cursor |
1256 | name_l db 0 ;counter chars into filename |
1255 | name_l db 0 ;counter chars into filename |
1257 | o_s_flag db 0 ; |
1256 | o_s_flag db 0 ; |
1258 | rflag dd 0; |
1257 | rflag dd 0; |
1259 | posx db 0 |
1258 | posx db 0 |
1260 | posy db 3 |
1259 | posy db 3 |
1261 | lines db 0 |
1260 | lines db 0 |
1262 | end_str dd 0x10000 ;addr. first byte for output |
1261 | end_str dd 0x10000 ;addr. first byte for output |
1263 | text_cursor dd 0x01200000 |
1262 | text_cursor dd 0x01200000 |
1264 | 1263 | ||
1265 | filename: rb 13 |
1264 | filename: rb 13 |
1266 | 1265 | ||
1267 | b_go: db 'Go' |
1266 | b_go: db 'Go' |
1268 | 1267 | ||
1269 | sizestr: db 'SIZE:' |
1268 | sizestr: db 'SIZE:' |
1270 | 1269 | ||
1271 | offst: db 'OFFSET:' |
1270 | offst: db 'OFFSET:' |
1272 | 1271 | ||
1273 | labelt: db 'HeEd' |
1272 | labelt: db 'HeEd' |
1274 | labellen: |
1273 | labellen: |
1275 | 1274 | ||
1276 | ;text for hi-level menu buttons |
1275 | ;text for hi-level menu buttons |
1277 | f_menu: db 'File' |
1276 | f_menu: db 'File' |
1278 | e_menu: db 'Coding' |
1277 | e_menu: db 'Coding' |
1279 | h_menu: db 'Help' |
1278 | h_menu: db 'Help' |
1280 | ;text for low-level menu buttons |
1279 | ;text for low-level menu buttons |
1281 | ;menu File |
1280 | ;menu File |
1282 | m_open: db 'Open' |
1281 | m_open: db 'Open' |
1283 | m_save: db 'Save' |
1282 | m_save: db 'Save' |
1284 | m_exit: db 'Exit' |
1283 | m_exit: db 'Exit' |
1285 | ;menu coding |
1284 | ;menu coding |
1286 | m_win2dos: db 'Win->Dos' |
1285 | m_win2dos: db 'Win->Dos' |
1287 | m_win2koi: db 'Win->Koi' |
1286 | m_win2koi: db 'Win->Koi' |
1288 | m_win2iso: db 'Win->Iso' |
1287 | m_win2iso: db 'Win->Iso' |
1289 | m_dos2win: db 'Dos->Win' |
1288 | m_dos2win: db 'Dos->Win' |
1290 | m_dos2koi: db 'Dos->Koi' |
1289 | m_dos2koi: db 'Dos->Koi' |
1291 | m_dos2iso: db 'Dos->Iso' |
1290 | m_dos2iso: db 'Dos->Iso' |
1292 | ;menu Help |
1291 | ;menu Help |
1293 | m_help: db 'Help' |
1292 | m_help: db 'Help' |
1294 | m_about: db 'About' |
1293 | m_about: db 'About' |
1295 | ;tables for coding |
1294 | ;tables for coding |
1296 | WIN_TABLE: |
1295 | WIN_TABLE: |
1297 | db 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9 |
1296 | db 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9 |
1298 | db 0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3 |
1297 | db 0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3 |
1299 | db 0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD |
1298 | db 0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD |
1300 | db 0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7 |
1299 | db 0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7 |
1301 | db 0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1 |
1300 | db 0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1 |
1302 | db 0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB |
1301 | db 0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB |
1303 | db 0xFC,0xFD,0xFE,0xFF |
1302 | db 0xFC,0xFD,0xFE,0xFF |
1304 | DOS_TABLE: |
1303 | DOS_TABLE: |
1305 | db 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89 |
1304 | db 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89 |
1306 | db 0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93 |
1305 | db 0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93 |
1307 | db 0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D |
1306 | db 0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D |
1308 | db 0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7 |
1307 | db 0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7 |
1309 | db 0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xE0,0xE1 |
1308 | db 0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xE0,0xE1 |
1310 | db 0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB |
1309 | db 0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB |
1311 | db 0xEC,0xED,0xEE,0xEF |
1310 | db 0xEC,0xED,0xEE,0xEF |
1312 | KOI_TABLE: |
1311 | KOI_TABLE: |
1313 | db 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA |
1312 | db 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA |
1314 | db 0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF2,0xF3,0xF4,0xF5 |
1313 | db 0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF2,0xF3,0xF4,0xF5 |
1315 | db 0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC |
1314 | db 0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC |
1316 | db 0xE0,0xF1,0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA |
1315 | db 0xE0,0xF1,0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA |
1317 | db 0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD2,0xD3 |
1316 | db 0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD2,0xD3 |
1318 | db 0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9 |
1317 | db 0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9 |
1319 | db 0xD8,0xDC,0xC0,0xD1 |
1318 | db 0xD8,0xDC,0xC0,0xD1 |
1320 | ISO_TABLE: |
1319 | ISO_TABLE: |
1321 | db 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9 |
1320 | db 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9 |
1322 | db 0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3 |
1321 | db 0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3 |
1323 | db 0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD |
1322 | db 0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD |
1324 | db 0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7 |
1323 | db 0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7 |
1325 | db 0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1 |
1324 | db 0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1 |
1326 | db 0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB |
1325 | db 0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB |
1327 | db 0xEC,0xED,0xEE,0xEF |
1326 | db 0xEC,0xED,0xEE,0xEF |
1328 | 1327 | ||
1329 | ;text for help_window |
1328 | ;text for help_window |
1330 | help_label: db 'Help for HeEd.' |
1329 | help_label: db 'Help for HeEd.' |
1331 | help_text: |
1330 | help_text: |
1332 | if lang eq ru |
1331 | if lang eq ru |
1333 | db '1.HeEd ¢ á®áâ®ï¨¨ ®âªàëâì ä ©« ⮫쪮 ®¤¨ à § ¨ ' |
1332 | db '1.HeEd ¢ á®áâ®ï¨¨ ®âªàëâì ä ©« ⮫쪮 ®¤¨ à § ¨ ' |
1334 | db ' 㦮¥ ç¨á«® à § á®åà ¨âì ¥£®. ' |
1333 | db ' 㦮¥ ç¨á«® à § á®åà ¨âì ¥£®. ' |
1335 | db '2.ਠ®âªàë⨨ ä ©« ¡¥§ à áè¨à¥¨ï ¤® íâ® à áè¨-' |
1334 | db '2.ਠ®âªàë⨨ ä ©« ¡¥§ à áè¨à¥¨ï ¤® íâ® à áè¨-' |
1336 | db ' è¨à¥¨¥ ¢á¥ à ¢® 㪠§ë¢ âì ª ª âਠ¯à®¡¥« ¯®á«¥' |
1335 | db ' è¨à¥¨¥ ¢á¥ à ¢® 㪠§ë¢ âì ª ª âਠ¯à®¡¥« ¯®á«¥' |
1337 | db ' â®çª¨. ' |
1336 | db ' â®çª¨. ' |
1338 | db '3. ¬® ®âªàë⨥ ä ©« ¯à®¨á室¨â ¯à¨ ¦ ⨨ ª®¯ª¨' |
1337 | db '3. ¬® ®âªàë⨥ ä ©« ¯à®¨á室¨â ¯à¨ ¦ ⨨ ª®¯ª¨' |
1339 | db ' "Go". ' |
1338 | db ' "Go". ' |
1340 | db '4.®§¤ ¨¥ ®¢ëå ä ©«®¢ ¢ ¬¥î ¥ ¯à¥¤ãᬮâ८, ®' |
1339 | db '4.®§¤ ¨¥ ®¢ëå ä ©«®¢ ¢ ¬¥î ¥ ¯à¥¤ãᬮâ८, ®' |
1341 | db ' ¬®¦® ¦¥ । ªâ¨à®¢ âì... ' |
1340 | db ' ¬®¦® ¦¥ । ªâ¨à®¢ âì... ' |
1342 | db '5. ä ©« § ¯¨áë¢ ¥âáï ⮫쪮 ª®«¨ç¥á⢮ ¡ ©â, ª®â®-' |
1341 | db '5. ä ©« § ¯¨áë¢ ¥âáï ⮫쪮 ª®«¨ç¥á⢮ ¡ ©â, ª®â®-' |
1343 | db ' ஥ ¡ë«® à §¬¥à®¬ ä ©« ¤® ®âªàëâ¨ï. ' |
1342 | db ' ஥ ¡ë«® à §¬¥à®¬ ä ©« ¤® ®âªàëâ¨ï. ' |
1344 | db '6.ਠ¦ ⨨ "Go" á ¯ãáâë¬ ¯®«¥¬ ¨¬¥¨ ä ©« ¢ë¢®-' |
1343 | db '6.ਠ¦ ⨨ "Go" á ¯ãáâë¬ ¯®«¥¬ ¨¬¥¨ ä ©« ¢ë¢®-' |
1345 | db ' ¤¨âáï ¯ ¬ïâì á ¤à¥á 0å80000, ® à §¬¥à ä ©« ' |
1344 | db ' ¤¨âáï ¯ ¬ïâì á ¤à¥á 0å80000, ® à §¬¥à ä ©« ' |
1346 | db ' à ¢¥ 0xFFFFFFFF. ' |
1345 | db ' à ¢¥ 0xFFFFFFFF. ' |
1347 | db ' (á¬. ¨ä® "About") ' |
1346 | db ' (á¬. ¨ä® "About") ' |
1348 | else |
1347 | else |
1349 | db '1.HeEd can once open file and many times save it. ' |
1348 | db '1.HeEd can once open file and many times save it. ' |
1350 | db '2.To open file without extension it is required to ' |
1349 | db '2.To open file without extension it is required to ' |
1351 | db ' specify anyway as three spaces after a dot. ' |
1350 | db ' specify anyway as three spaces after a dot. ' |
1352 | db '3.File is opened when the button "Go" is pressed. ' |
1351 | db '3.File is opened when the button "Go" is pressed. ' |
1353 | db '4.Creation of new files in the menu is not provided' |
1352 | db '4.Creation of new files in the menu is not provided' |
1354 | db ' but you can edit... ' |
1353 | db ' but you can edit... ' |
1355 | db '5.Only number of bytes which was file size when ' |
1354 | db '5.Only number of bytes which was file size when ' |
1356 | db ' opening is written to file. ' |
1355 | db ' opening is written to file. ' |
1357 | db '6.If you press "Go" with empty filename field, ' |
1356 | db '6.If you press "Go" with empty filename field, ' |
1358 | db ' memory starting from address 0x80000 is output, ' |
1357 | db ' memory starting from address 0x80000 is output, ' |
1359 | db ' but file size equals to 0xFFFFFFFF. ' |
1358 | db ' but file size equals to 0xFFFFFFFF. ' |
1360 | db ' (see info "About") ' |
1359 | db ' (see info "About") ' |
1361 | end if |
1360 | end if |
1362 | help_end: |
1361 | help_end: |
1363 | ;text for about_window |
1362 | ;text for about_window |
1364 | about_label: db 'About this funny.' |
1363 | about_label: db 'About this funny.' |
1365 | about_text: |
1364 | about_text: |
1366 | if lang eq ru |
1365 | if lang eq ru |
1367 | db '¥ª®â®à ï ¨ä®à¬ æ¨ï ¤«ï â¥å, ªâ® § å®ç¥â ¤®¯¨á âì ' |
1366 | db '¥ª®â®à ï ¨ä®à¬ æ¨ï ¤«ï â¥å, ªâ® § å®ç¥â ¤®¯¨á âì ' |
1368 | db 'áî¤ çâ®-⮠᢮¥: ª®¤ ¯à ªâ¨ç¥áª¨ ¥ ®¯â¨¬¨§¨à®¢ ,' |
1367 | db 'áî¤ çâ®-⮠᢮¥: ª®¤ ¯à ªâ¨ç¥áª¨ ¥ ®¯â¨¬¨§¨à®¢ ,' |
1369 | db 'â ª çâ® à §®¡à âìáï ¡ã¤¥â ¥ â ª 㦠᫮¦®. âப¨ ' |
1368 | db 'â ª çâ® à §®¡à âìáï ¡ã¤¥â ¥ â ª 㦠᫮¦®. âப¨ ' |
1370 | db '¤«ï ª®¯®ª ¬¥î ¤®«¦ë ¨¤â¨ ¯àאַ ¤à㣠§ ¤à㣮¬, ' |
1369 | db '¤«ï ª®¯®ª ¬¥î ¤®«¦ë ¨¤â¨ ¯àאַ ¤à㣠§ ¤à㣮¬, ' |
1371 | db 'â. ª. ï ¯à¨ ¢ë¢®¤¥ ¨á¯®«ì§ãî ¥ mov esi,à §¬¥à ¨ ' |
1370 | db 'â. ª. ï ¯à¨ ¢ë¢®¤¥ ¨á¯®«ì§ãî ¥ mov esi,à §¬¥à ¨ ' |
1372 | db 'mov edx, ¤à¥á ¯à®áâ® ¯à¨¡ ¢«ïî ᬥ饨ï. â® ª -' |
1371 | db 'mov edx, ¤à¥á ¯à®áâ® ¯à¨¡ ¢«ïî ᬥ饨ï. â® ª -' |
1373 | db 'á ¥âáï ª®¤¨à®¢®ª ¨ à §¬¥à®¢ ä ©« ¤«ï á®åà ¥¨ï, ' |
1372 | db 'á ¥âáï ª®¤¨à®¢®ª ¨ à §¬¥à®¢ ä ©« ¤«ï á®åà ¥¨ï, ' |
1374 | db 'â® ®áâ ¥âáï ⮫쪮 ¤®¡ ¢¨âì ª®¯ª¨ ¬¥î á ⥪á⮬ ' |
1373 | db 'â® ®áâ ¥âáï ⮫쪮 ¤®¡ ¢¨âì ª®¯ª¨ ¬¥î á ⥪á⮬ ' |
1375 | db '(¯à¨ ¤®¡ ¢«¥¨¨ ¤® ãç¨âë¢ âì, çâ® ID ª®¯ª¨ ®¯®§-' |
1374 | db '(¯à¨ ¤®¡ ¢«¥¨¨ ¤® ãç¨âë¢ âì, çâ® ID ª®¯ª¨ ®¯®§-' |
1376 | db ' îâáï dec ah, ¥ ª ª cmp ah,ID). ᫨ ¢á¥ ¦¥ ¡ã-' |
1375 | db ' îâáï dec ah, ¥ ª ª cmp ah,ID). ᫨ ¢á¥ ¦¥ ¡ã-' |
1377 | db '¤¥â ¥¯à¨ïâ® à §¡¨à âìáï, â® ¬®¦¥â¥ ¯¨á âì ¨ ' |
1376 | db '¤¥â ¥¯à¨ïâ® à §¡¨à âìáï, â® ¬®¦¥â¥ ¯¨á âì ¨ ' |
1378 | db 'á¯à®á¨âì. â ¯à®£à ¬¬ ¡ë« ¯¨á ¢ 室¥ à §¡®-' |
1377 | db 'á¯à®á¨âì. â ¯à®£à ¬¬ ¡ë« ¯¨á ¢ 室¥ à §¡®-' |
1379 | db 'ப á GUI MeOS ¨ ¯®í⮬㠥 ¯à¥â¥¤ã¥â çâ®-â® ' |
1378 | db 'ப á GUI MeOS ¨ ¯®í⮬㠥 ¯à¥â¥¤ã¥â çâ®-â® ' |
1380 | db '¡®«ì襥, 祬 ¯à¨¬¥à. à®áâ® ¤®¥« íâ ⥬ , ¢ë-' |
1379 | db '¡®«ì襥, 祬 ¯à¨¬¥à. à®áâ® ¤®¥« íâ ⥬ , ¢ë-' |
1381 | db 'ª¨ãâì ¦ «ª®. mailto:babalbes@yandex.ru ' |
1380 | db 'ª¨ãâì ¦ «ª®. mailto:babalbes@yandex.ru ' |
1382 | else |
1381 | else |
1383 | db 'Some information for those who want add to this ' |
1382 | db 'Some information for those who want add to this ' |
1384 | db 'something their own: the code is practically not ' |
1383 | db 'something their own: the code is practically not ' |
1385 | db 'optimized, so investigation is not complicated. ' |
1384 | db 'optimized, so investigation is not complicated. ' |
1386 | db 'Strings for menu buttons must rank after each other' |
1385 | db 'Strings for menu buttons must rank after each other' |
1387 | db 'as I use not mov esi,size and mov edx,address when ' |
1386 | db 'as I use not mov esi,size and mov edx,address when ' |
1388 | db 'output but simply add offsets. For encodins and ' |
1387 | db 'output but simply add offsets. For encodins and ' |
1389 | db 'file sizes for save, it remains only add buttons ' |
1388 | db 'file sizes for save, it remains only add buttons ' |
1390 | db 'with text in menu (at addition one should take into' |
1389 | db 'with text in menu (at addition one should take into' |
1391 | db 'account that buttons ID are recognized as dec ah ' |
1390 | db 'account that buttons ID are recognized as dec ah ' |
1392 | db 'rather than cmp ah,ID). Nevertheless if study is ' |
1391 | db 'rather than cmp ah,ID). Nevertheless if study is ' |
1393 | db 'unpleasant, you can write and ask. This program has' |
1392 | db 'unpleasant, you can write and ask. This program has' |
1394 | db 'been written in course of study GUI MeOS and does ' |
1393 | db 'been written in course of study GUI MeOS and does ' |
1395 | db 'not therefore pretend on some more than example. ' |
1394 | db 'not therefore pretend on some more than example. ' |
1396 | db 'Just this theme bothers, but I regret to delete. ' |
1395 | db 'Just this theme bothers, but I regret to delete. ' |
1397 | db ' mailto:babalbes@yandex.ru ' |
1396 | db ' mailto:babalbes@yandex.ru ' |
1398 | end if |
1397 | end if |
1399 | about_end: |
1398 | about_end: |
1400 | 1399 | ||
1401 | I_END: |
1400 | I_END: |
1402 | 1401 | ||
1403 | sc system_colors |
1402 | sc system_colors |
1404 | 1403 | ||
1405 | process_info: |
1404 | process_info: |
1406 | rb 1024 |
1405 | rb 1024 |
1407 | menu_opened db ? |
1406 | menu_opened db ? |
1408 | m_text:0>=>>'A' |
1407 | m_text:0>=>>'A' |
1409 | >'a' |
1408 | >'a' |
1410 | >'0' |
1409 | >'0' |
1411 | >13 |
1410 | >13 |
1412 | > |
1411 | > |