Rev 260 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 260 | Rev 485 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | red_logon: |
1 | red_logon: |
2 | call draw_window_logon ; at first, draw the window |
2 | call draw_window_logon ; at first, draw the window |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | still_logon: ; main cycle of application begins here |
4 | still_logon: ; main cycle of application begins here |
5 | mov eax,10 ; wait here for event |
5 | mov eax,10 ; wait here for event |
Line 6... | Line 6... | ||
6 | int 0x40 |
6 | mcall |
Line 7... | Line 7... | ||
7 | 7 | ||
8 | checkevent_logon: ; Check what event was called _logon: this will be used to return from textbox focus |
8 | checkevent_logon: ; Check what event was called _logon: this will be used to return from textbox focus |
Line 16... | Line 16... | ||
16 | 16 | ||
Line 17... | Line 17... | ||
17 | jmp still_logon |
17 | jmp still_logon |
18 | 18 | ||
19 | key_logon: ; key event handler |
19 | key_logon: ; key event handler |
Line 20... | Line 20... | ||
20 | mov al,2 ; eax was zero so will now be 2 |
20 | mov al,2 ; eax was zero so will now be 2 |
21 | int 0x40 ; just read it and ignore |
21 | mcall ; just read it and ignore |
Line 22... | Line 22... | ||
22 | 22 | ||
Line 23... | Line 23... | ||
23 | cmp ah,13 |
23 | cmp ah,13 |
24 | jne still_logon ; return to main loop |
24 | jne still_logon ; return to main loop |
25 | 25 | ||
Line 26... | Line 26... | ||
26 | ret ; enter key was pressed => return to logon |
26 | ret ; enter key was pressed => return to logon |
27 | 27 | ||
28 | button_logon: ; eax was zero so will now be 17 |
28 | button_logon: ; eax was zero so will now be 17 |
29 | mov al,17 ; get id |
29 | mov al,17 ; get id |
Line 64... | Line 64... | ||
64 | mov edi,[addr] ; address of string |
64 | mov edi,[addr] ; address of string |
65 | add edi,[temp] ; cursor position |
65 | add edi,[temp] ; cursor position |
Line 66... | Line 66... | ||
66 | 66 | ||
67 | .waitev_logon: |
67 | .waitev_logon: |
68 | mov eax,10 ; wait for event |
68 | mov eax,10 ; wait for event |
69 | int 0x40 |
69 | mcall |
70 | cmp eax,2 ; button presed ? |
70 | cmp eax,2 ; button presed ? |
71 | jne checkevent_logon ; a key is pressed or redraw is nessesary, goto checkevent |
71 | jne checkevent_logon ; a key is pressed or redraw is nessesary, goto checkevent |
72 | int 0x40 ; eax = 2, read button |
72 | mcall ; eax = 2, read button |
73 | shr eax,8 |
73 | shr eax,8 |
74 | cmp eax,8 |
74 | cmp eax,8 |
75 | jnz .nobs_logon ; BACKSPACE |
75 | jnz .nobs_logon ; BACKSPACE |
76 | cmp edi,[addr] |
76 | cmp edi,[addr] |
Line 124... | Line 124... | ||
124 | mov eax, 8 |
124 | mov eax, 8 |
125 | mov ebx, 105*65536+200 |
125 | mov ebx, 105*65536+200 |
126 | mov ecx, 33*65536+12 |
126 | mov ecx, 33*65536+12 |
127 | mov edx, 4 |
127 | mov edx, 4 |
128 | mov esi, 0xEBEBEB |
128 | mov esi, 0xEBEBEB |
129 | int 0x40 |
129 | mcall |
Line 130... | Line 130... | ||
130 | 130 | ||
131 | cmp byte[mode],0 |
131 | cmp byte[mode],0 |
Line 132... | Line 132... | ||
132 | je @f |
132 | je @f |
133 | 133 | ||
134 | mov ecx, 49*65536+12 |
134 | mov ecx, 49*65536+12 |
Line 135... | Line 135... | ||
135 | inc edx |
135 | inc edx |
136 | int 0x40 |
136 | mcall |
137 | 137 | ||
138 | @@: |
138 | @@: |
139 | mov eax, 4 ; function 4 _logon: write text to window |
139 | mov eax, 4 ; function 4 _logon: write text to window |
140 | mov ebx, 107*65536+34 ; [x start] *65536 + [y start] |
140 | mov ebx, 107*65536+34 ; [x start] *65536 + [y start] |
141 | xor ecx, ecx ; color of text RRGGBB |
141 | xor ecx, ecx ; color of text RRGGBB |
Line 142... | Line 142... | ||
142 | mov edx, first ; pointer to text beginning |
142 | mov edx, first ; pointer to text beginning |
143 | mov esi, STRLEN ; text length |
143 | mov esi, STRLEN ; text length |
Line 144... | Line 144... | ||
144 | int 0x40 |
144 | mcall |
Line 154... | Line 154... | ||
154 | jle dont_draw_pass |
154 | jle dont_draw_pass |
Line 155... | Line 155... | ||
155 | 155 | ||
156 | dec edi |
156 | dec edi |
157 | mov edx, passchar |
157 | mov edx, passchar |
158 | mov esi, 1 |
158 | mov esi, 1 |
159 | int 0x40 |
159 | mcall |
160 | add ebx,6*65536 |
160 | add ebx,6*65536 |
Line 161... | Line 161... | ||
161 | jmp @r |
161 | jmp @r |
Line 162... | Line 162... | ||
162 | 162 | ||
163 | dont_draw_pass: |
163 | dont_draw_pass: |
Line 164... | Line 164... | ||
164 | 164 | ||
165 | popa |
165 | popa |
166 | ret |
166 | ret |
Line 167... | Line 167... | ||
167 | 167 | ||
168 | close_logon: |
168 | close_logon: |
Line 169... | Line 169... | ||
169 | mov eax,-1 |
169 | or eax,-1 |
Line 170... | Line 170... | ||
170 | int 0x40 |
170 | mcall |
171 | 171 | ||
172 | connect_logon: |
172 | connect_logon: |
173 | ret |
173 | ret |
174 | 174 | ||
175 | draw_window_logon: |
175 | draw_window_logon: |
176 | 176 | ||
177 | mov eax, 12 ; function 12_logon:tell os about windowdraw |
177 | mov eax, 12 ; function 12_logon:tell os about windowdraw |
178 | mov ebx, 1 ; 1, start of draw |
178 | mov ebx, 1 ; 1, start of draw |
- | 179 | mcall |
|
179 | int 0x40 |
180 | pusha |
Line 180... | Line 181... | ||
180 | pusha |
181 | ; DRAW WINDOW |
181 | ; DRAW WINDOW |
182 | xor eax, eax ; function 0 _logon: define and draw window |
182 | xor eax, eax ; function 0 _logon: define and draw window |
183 | mov ebx, 160*65536+330 ; [x start] *65536 + [x size] |
183 | mov ebx, 160*65536+330 ; [x start] *65536 + [x size] |
184 | mov ecx, 160*65536+100 ; [y start] *65536 + [y size] |
184 | mov ecx, 160*65536+100 ; [y start] *65536 + [y size] |
185 | mov edx, 0x13DDDDDD ; color of work area RRGGBB |
185 | mov edx, 0x03DDDDDD ; color of work area RRGGBB |
186 | mov edi, title ; WINDOW LABEL |
Line 186... | Line 187... | ||
186 | int 0x40 |
187 | mcall |
187 | - | ||
188 | mov eax, 8 ; LOGON BUTTON |
- | |
189 | mov ebx, 220*65536+85 |
- | |
190 | mov ecx, 63*65536+16 |
- | |
191 | mov edx, 2 |
- | |
192 | mov esi, 0xCCCCCC |
- | |
193 | int 0x40 |
- | |
Line 194... | Line 188... | ||
194 | 188 | ||
195 | call print_text_logon |
189 | mov eax, 8 ; LOGON BUTTON |
Line -... | Line 190... | ||
- | 190 | mov ebx, 220*65536+85 |
|
196 | ; WINDOW LABEL |
191 | mov ecx, 63*65536+16 |
197 | mov eax, 4 ; function 4 _logon: write text to window |
192 | mov edx, 2 |
198 | mov ebx, 8*65536+8 ; [x start] *65536 + [y start] |
193 | mov esi, 0xCCCCCC |
199 | mov ecx, 0x10ffffff ; color of text RRGGBB |
194 | mcall |
200 | mov edx, labelt ; pointer to text beginning |
195 | |
Line 201... | Line 196... | ||
201 | mov esi, labellen-labelt ; text length |
196 | call print_text_logon |
202 | int 0x40 |
197 | |
203 | 198 | cmp byte[mode],0 |
|
204 | cmp byte[mode],0 |
199 | je servermode_ |
Line 205... | Line 200... | ||
205 | je servermode_ |
200 | |
Line 206... | Line 201... | ||
206 | 201 | mov eax, 4 ; function 4 _logon: write text to window |
|
Line 207... | Line 202... | ||
207 | mov ebx, 25*65536+33 ; [x start] *65536 + [y start] |
202 | mov ebx, 25*65536+33 ; [x start] *65536 + [y start] |
208 | xor ecx, ecx |
203 | xor ecx, ecx |
209 | mov edx, userstr ; pointer to text beginning |
204 | mov edx, userstr ; pointer to text beginning |
210 | mov esi, passstr-userstr ; text length |
205 | mov esi, passstr-userstr ; text length |
211 | int 0x40 |
206 | mcall |
Line 212... | Line 207... | ||
212 | 207 | ||
Line 213... | Line 208... | ||
213 | add bl,16 |
208 | add bl,16 |
214 | mov edx, passstr ; pointer to text beginning |
209 | mov edx, passstr ; pointer to text beginning |
215 | mov esi, connect-passstr ; text length |
210 | mov esi, connect-passstr ; text length |
216 | int 0x40 |
211 | mcall |
Line 217... | Line 212... | ||
217 | 212 | ||
218 | jmp drawtherest_ |
213 | jmp drawtherest_ |
219 | 214 | ||
Line 220... | Line 215... | ||
220 | servermode_: |
215 | servermode_: |
Line 221... | Line 216... | ||
221 | 216 | ||
222 | mov ebx, 25*65536+33 ; [x start] *65536 + [y start] |
217 | mov ebx, 25*65536+33 ; [x start] *65536 + [y start] |
223 | xor ecx, ecx |
- | |
Line 224... | Line 218... | ||
224 | mov edx, serverstr ; pointer to text beginning |
218 | xor ecx, ecx |
225 | mov esi, userstr-serverstr ; text length |
219 | mov edx, serverstr ; pointer to text beginning |
226 | int 0x40 |
220 | mov esi, userstr-serverstr ; text length |