Rev 109 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | ; |
2 | ; CHESS CLIENT for CHESSCLUB.COM (VT) |
||
3 | ; |
||
4 | ; Compile with FASM for Menuet |
||
5 | ; |
||
180 | heavyiron | 6 | |
7 | appname equ 'Chess Client for Chessclub.com ' |
||
8 | version equ '0.2' |
||
9 | |||
31 | halyavin | 10 | use32 |
180 | heavyiron | 11 | |
12 | org 0x0 |
||
13 | |||
14 | db 'MENUET00' ; 8 byte id |
||
15 | dd 38 ; required os |
||
16 | dd START ; program start |
||
17 | dd I_END ; program image size |
||
18 | dd 0x100000 ; required amount of memory |
||
19 | ; esp = 0x7FFF0 |
||
20 | dd 0x00000000 ; reserved=no extended header |
||
21 | |||
31 | halyavin | 22 | include 'lang.inc' |
23 | include 'macros.inc' |
||
180 | heavyiron | 24 | |
25 | ;file_info: |
||
26 | ; |
||
27 | ; dd 0,0,-1,0x4000,0x20000 |
||
28 | ; db '/rd/1/chess.bmp',0 |
||
29 | |||
31 | halyavin | 30 | file_info: |
180 | heavyiron | 31 | dd 0 |
32 | dd 0 |
||
33 | dd 0 |
||
34 | dd -1 |
||
35 | dd 0x4000 |
||
36 | db '/rd/1/chess.bmp',0 |
||
37 | |||
31 | halyavin | 38 | pawn_color: |
180 | heavyiron | 39 | |
31 | halyavin | 40 | dd 0x000000 |
41 | dd 0x222222 |
||
42 | dd 0x444444 |
||
43 | dd 0xf0f0f0 |
||
44 | dd 0xc0c0c0 |
||
45 | dd 0xa0a0a0 |
||
46 | dd 0xa0a0a0 |
||
47 | dd 0x707070 |
||
48 | dd 0xb0b0b0 |
||
49 | dd 0xc0c0c0 |
||
50 | dd 0xd0d0d0 |
||
51 | dd 0xd8d8d8 |
||
52 | dd 0xe0e0e0 |
||
53 | dd 0xe8e8e8 |
||
54 | dd 0x00ff00 |
||
55 | dd 0xffffff |
||
180 | heavyiron | 56 | |
57 | |||
58 | |||
31 | halyavin | 59 | texts equ board_old+80*30 |
180 | heavyiron | 60 | |
31 | halyavin | 61 | text equ texts+80*32*4 |
180 | heavyiron | 62 | |
63 | |||
64 | START: ; start of execution |
||
65 | |||
66 | ; mov eax,58 |
||
67 | mov eax,70 |
||
68 | ; mov ebx,file_info |
||
31 | halyavin | 69 | mov ebx,file_info |
70 | int 0x40 |
||
180 | heavyiron | 71 | |
31 | halyavin | 72 | mov esi,0x4000+22*3+4+24*2 |
73 | mov edi,0x10000+18*3 |
||
180 | heavyiron | 74 | |
31 | halyavin | 75 | mov ebx,0 |
76 | mov ecx,0 |
||
180 | heavyiron | 77 | |
31 | halyavin | 78 | newp: |
180 | heavyiron | 79 | |
31 | halyavin | 80 | xor eax,eax |
81 | mov al,[esi] |
||
82 | and al,0xf0 |
||
83 | shr al,4 |
||
84 | shl eax,2 |
||
85 | mov eax,[pawn_color+eax] |
||
86 | mov [edi+0],eax |
||
180 | heavyiron | 87 | |
31 | halyavin | 88 | xor eax,eax |
89 | mov al,[esi] |
||
90 | and al,0x0f |
||
91 | shl eax,2 |
||
92 | mov eax,[pawn_color+eax] |
||
93 | mov [edi+3],eax |
||
180 | heavyiron | 94 | |
31 | halyavin | 95 | add edi,6 |
96 | add esi,1 |
||
180 | heavyiron | 97 | |
31 | halyavin | 98 | inc ebx |
99 | cmp ebx,23 |
||
100 | jbe newp |
||
180 | heavyiron | 101 | |
31 | halyavin | 102 | sub edi,12 |
180 | heavyiron | 103 | |
31 | halyavin | 104 | mov ebx,0 |
180 | heavyiron | 105 | |
31 | halyavin | 106 | inc ecx |
107 | cmp ecx,279 |
||
180 | heavyiron | 108 | jb newp |
109 | |||
31 | halyavin | 110 | ; Clear the screen memory |
111 | mov eax, ' ' |
||
112 | mov edi,text |
||
113 | mov ecx,80*30 /4 |
||
114 | cld |
||
115 | rep stosd |
||
180 | heavyiron | 116 | |
117 | |||
31 | halyavin | 118 | call draw_window |
180 | heavyiron | 119 | |
31 | halyavin | 120 | still: |
180 | heavyiron | 121 | |
31 | halyavin | 122 | call check_for_board |
180 | heavyiron | 123 | |
31 | halyavin | 124 | call board_changed |
180 | heavyiron | 125 | |
31 | halyavin | 126 | call draw_board |
180 | heavyiron | 127 | |
31 | halyavin | 128 | ; check connection status |
129 | mov eax,53 |
||
130 | mov ebx,6 |
||
131 | mov ecx,[socket] |
||
132 | int 0x40 |
||
180 | heavyiron | 133 | |
31 | halyavin | 134 | mov ebx, [socket_status] |
135 | mov [socket_status], eax |
||
180 | heavyiron | 136 | |
31 | halyavin | 137 | cmp eax, ebx |
180 | heavyiron | 138 | je waitev |
139 | |||
31 | halyavin | 140 | call display_status |
180 | heavyiron | 141 | |
31 | halyavin | 142 | waitev: |
180 | heavyiron | 143 | mov eax,23 ; wait here for event |
31 | halyavin | 144 | mov ebx,20 |
145 | int 0x40 |
||
180 | heavyiron | 146 | |
147 | cmp eax,1 ; redraw request ? |
||
148 | je red |
||
149 | cmp eax,2 ; key in buffer ? |
||
150 | je key |
||
151 | cmp eax,3 ; button in buffer ? |
||
152 | je button |
||
153 | |||
31 | halyavin | 154 | ; any data from the socket? |
180 | heavyiron | 155 | |
31 | halyavin | 156 | mov eax, 53 |
157 | mov ebx, 2 |
||
158 | mov ecx, [socket] |
||
159 | int 0x40 |
||
160 | cmp eax, 0 |
||
161 | jne read_input |
||
180 | heavyiron | 162 | |
31 | halyavin | 163 | jmp still |
180 | heavyiron | 164 | |
165 | |||
31 | halyavin | 166 | read_input: |
180 | heavyiron | 167 | |
31 | halyavin | 168 | push ecx |
169 | mov eax, 53 |
||
170 | mov ebx, 3 |
||
171 | mov ecx, [socket] |
||
172 | int 0x40 |
||
173 | pop ecx |
||
180 | heavyiron | 174 | |
31 | halyavin | 175 | call handle_data |
180 | heavyiron | 176 | |
31 | halyavin | 177 | push ecx |
178 | mov eax, 53 |
||
179 | mov ebx, 2 |
||
180 | mov ecx, [socket] |
||
181 | int 0x40 |
||
182 | pop ecx |
||
183 | cmp eax, 0 |
||
180 | heavyiron | 184 | |
185 | |||
31 | halyavin | 186 | jne read_input |
187 | call draw_text |
||
188 | jmp still |
||
180 | heavyiron | 189 | |
190 | |||
191 | |||
31 | halyavin | 192 | check_for_board: |
180 | heavyiron | 193 | |
31 | halyavin | 194 | pusha |
180 | heavyiron | 195 | |
31 | halyavin | 196 | mov esi,text-80 |
197 | news: |
||
198 | add esi,80 |
||
199 | cmp esi,text+80*10 |
||
180 | heavyiron | 200 | je board_not_found |
31 | halyavin | 201 | cmp [esi+12],dword '----' |
180 | heavyiron | 202 | je cfb1 |
31 | halyavin | 203 | jmp news |
204 | cfb1: |
||
205 | cmp [esi+16*80+12],dword '----' |
||
180 | heavyiron | 206 | je cfb2 |
31 | halyavin | 207 | jmp news |
208 | cfb2: |
||
209 | cmp [esi+2*80+12],dword '+---' |
||
210 | jne news |
||
180 | heavyiron | 211 | |
31 | halyavin | 212 | cmp [esi+4*80+12],dword '+---' |
213 | jne news |
||
180 | heavyiron | 214 | |
31 | halyavin | 215 | board_found: |
180 | heavyiron | 216 | |
31 | halyavin | 217 | mov edi,chess_board |
218 | mov ecx,80*18 |
||
219 | cld |
||
220 | rep movsb |
||
180 | heavyiron | 221 | |
31 | halyavin | 222 | board_not_found: |
180 | heavyiron | 223 | |
31 | halyavin | 224 | popa |
180 | heavyiron | 225 | |
31 | halyavin | 226 | ret |
180 | heavyiron | 227 | |
228 | |||
229 | yst dd 150 |
||
230 | textx equ 10 |
||
231 | ysts equ 410 |
||
232 | |||
233 | boardx dd 45 |
||
234 | boardy dd 45 |
||
235 | |||
31 | halyavin | 236 | boardxs dd 44 |
237 | boardys dd 44 |
||
180 | heavyiron | 238 | |
239 | conx equ 420 |
||
240 | cony equ 118 |
||
241 | |||
242 | dconx equ 420 |
||
243 | dcony equ 148 |
||
244 | |||
31 | halyavin | 245 | statusx equ 420 |
246 | statusy equ 178 |
||
180 | heavyiron | 247 | |
248 | |||
31 | halyavin | 249 | drsq: |
180 | heavyiron | 250 | |
31 | halyavin | 251 | push eax ebx |
180 | heavyiron | 252 | |
31 | halyavin | 253 | mov ecx,ebx |
254 | mov ebx,eax |
||
180 | heavyiron | 255 | |
31 | halyavin | 256 | mov eax,ebx |
257 | add eax,ecx |
||
180 | heavyiron | 258 | |
31 | halyavin | 259 | imul ebx,[boardxs] |
260 | add ebx,[boardx] |
||
261 | shl ebx,16 |
||
262 | imul ecx,[boardys] |
||
263 | add ecx,[boardy] |
||
264 | shl ecx,16 |
||
180 | heavyiron | 265 | |
31 | halyavin | 266 | add ebx,[boardxs] |
267 | add ecx,[boardys] |
||
180 | heavyiron | 268 | |
31 | halyavin | 269 | mov edx,[sq_black] |
270 | test eax,1 |
||
271 | jnz dbl22 |
||
272 | mov edx,[sq_white] |
||
273 | dbl22: |
||
180 | heavyiron | 274 | |
31 | halyavin | 275 | mov eax,13 |
276 | int 0x40 |
||
180 | heavyiron | 277 | |
31 | halyavin | 278 | pop ebx eax |
180 | heavyiron | 279 | |
31 | halyavin | 280 | ret |
180 | heavyiron | 281 | |
282 | |||
283 | |||
31 | halyavin | 284 | draw_pawn: |
180 | heavyiron | 285 | |
31 | halyavin | 286 | ; edi,0 ; white / black |
287 | ; esi,0 ; from position 2 , 20 square |
||
288 | ; eax,2 ; board x |
||
289 | ; ebx,0 ; board y |
||
180 | heavyiron | 290 | |
31 | halyavin | 291 | pusha |
180 | heavyiron | 292 | |
31 | halyavin | 293 | call drsq |
180 | heavyiron | 294 | |
31 | halyavin | 295 | cmp esi,20 |
296 | jne no_sqd |
||
180 | heavyiron | 297 | |
31 | halyavin | 298 | popa |
299 | ret |
||
180 | heavyiron | 300 | |
31 | halyavin | 301 | no_sqd: |
180 | heavyiron | 302 | |
31 | halyavin | 303 | imul eax,[boardxs] |
304 | imul ebx,[boardys] |
||
180 | heavyiron | 305 | |
31 | halyavin | 306 | add eax,[boardx] |
307 | add ebx,[boardy] |
||
180 | heavyiron | 308 | |
31 | halyavin | 309 | imul esi,44*45*3 |
310 | add esi,0x10000+18*3 |
||
180 | heavyiron | 311 | |
31 | halyavin | 312 | mov ecx,43 |
180 | heavyiron | 313 | |
31 | halyavin | 314 | dp0: |
180 | heavyiron | 315 | |
31 | halyavin | 316 | pusha |
180 | heavyiron | 317 | |
31 | halyavin | 318 | mov ecx,44 |
180 | heavyiron | 319 | |
31 | halyavin | 320 | ldp1: |
180 | heavyiron | 321 | |
31 | halyavin | 322 | pusha |
180 | heavyiron | 323 | |
31 | halyavin | 324 | mov ecx,ebx |
325 | mov ebx,eax |
||
180 | heavyiron | 326 | |
31 | halyavin | 327 | mov edx,[esi] |
328 | and edx,0xffffff |
||
329 | mov eax,1 |
||
330 | cmp edx,0x00ff00 |
||
331 | je nowp |
||
332 | cmp edi,1 |
||
333 | jne nobl |
||
334 | shr edx,1 |
||
335 | and edx,0x7f7f7f |
||
336 | nobl: |
||
337 | int 0x40 |
||
338 | nowp: |
||
180 | heavyiron | 339 | |
31 | halyavin | 340 | popa |
180 | heavyiron | 341 | |
31 | halyavin | 342 | add esi,3 |
343 | add eax,1 |
||
180 | heavyiron | 344 | |
31 | halyavin | 345 | dec ecx |
346 | jnz ldp1 |
||
180 | heavyiron | 347 | |
31 | halyavin | 348 | popa |
180 | heavyiron | 349 | |
31 | halyavin | 350 | add ebx,1 |
351 | add esi,3*44 |
||
180 | heavyiron | 352 | |
31 | halyavin | 353 | dec ecx |
354 | jnz dp0 |
||
180 | heavyiron | 355 | |
31 | halyavin | 356 | popa |
180 | heavyiron | 357 | |
31 | halyavin | 358 | ret |
180 | heavyiron | 359 | |
360 | |||
31 | halyavin | 361 | board_changed: |
180 | heavyiron | 362 | |
31 | halyavin | 363 | pusha |
180 | heavyiron | 364 | |
31 | halyavin | 365 | mov eax,0 |
366 | mov esi,chess_board |
||
367 | bcl1: |
||
368 | add eax,[esi] |
||
369 | add esi,4 |
||
370 | cmp esi,chess_board+19*80 |
||
180 | heavyiron | 371 | jb bcl1 |
372 | |||
31 | halyavin | 373 | cmp eax,[checksum] |
180 | heavyiron | 374 | je bcl2 |
31 | halyavin | 375 | mov [changed],1 |
376 | bcl2: |
||
377 | mov [checksum],eax |
||
180 | heavyiron | 378 | |
31 | halyavin | 379 | popa |
180 | heavyiron | 380 | |
31 | halyavin | 381 | ret |
180 | heavyiron | 382 | |
383 | |||
384 | |||
31 | halyavin | 385 | checksum dd 0 |
180 | heavyiron | 386 | |
31 | halyavin | 387 | changed db 1 |
180 | heavyiron | 388 | |
31 | halyavin | 389 | draw_board: |
180 | heavyiron | 390 | |
31 | halyavin | 391 | pusha |
180 | heavyiron | 392 | |
31 | halyavin | 393 | cmp [changed],1 |
394 | jne no_change_in_board |
||
180 | heavyiron | 395 | |
31 | halyavin | 396 | mov [changed],0 |
180 | heavyiron | 397 | |
31 | halyavin | 398 | mov eax,0 |
399 | mov ebx,0 |
||
400 | scan_board: |
||
180 | heavyiron | 401 | |
31 | halyavin | 402 | push eax ebx |
180 | heavyiron | 403 | |
31 | halyavin | 404 | mov esi,ebx |
405 | imul esi,2 |
||
406 | imul esi,80 |
||
407 | add esi,80 |
||
180 | heavyiron | 408 | |
31 | halyavin | 409 | imul eax,4 |
410 | add eax,10 |
||
180 | heavyiron | 411 | |
31 | halyavin | 412 | add esi,eax |
180 | heavyiron | 413 | |
31 | halyavin | 414 | movzx edx,word [chess_board+esi] |
415 | cmp dx,[board_old+esi] |
||
416 | je empty_slot |
||
180 | heavyiron | 417 | |
31 | halyavin | 418 | mov ecx,13 |
419 | newseek2: |
||
420 | mov edi,ecx |
||
421 | imul edi,8 |
||
422 | sub edi,8 |
||
423 | cmp dx,[edi+nappulat] |
||
424 | je foundnappula2 |
||
425 | loop newseek2 |
||
180 | heavyiron | 426 | |
31 | halyavin | 427 | jmp empty_slot |
180 | heavyiron | 428 | |
31 | halyavin | 429 | foundnappula2: |
180 | heavyiron | 430 | |
31 | halyavin | 431 | mov esi,[edi+nappulat+4] |
432 | mov edi,0 |
||
433 | cmp dl,'*' |
||
434 | jne nnbb |
||
435 | mov edi,1 |
||
436 | nnbb: |
||
437 | mov eax,[esp+4] |
||
438 | mov ebx,[esp] |
||
439 | call draw_pawn |
||
180 | heavyiron | 440 | |
31 | halyavin | 441 | empty_slot: |
180 | heavyiron | 442 | |
31 | halyavin | 443 | pop ebx eax |
180 | heavyiron | 444 | |
31 | halyavin | 445 | inc eax |
446 | cmp eax,8 |
||
447 | jb scan_board |
||
448 | mov eax,0 |
||
449 | inc ebx |
||
450 | cmp ebx,8 |
||
451 | jb scan_board |
||
180 | heavyiron | 452 | |
31 | halyavin | 453 | mov esi,chess_board |
454 | mov edi,board_old |
||
455 | mov ecx,80*19 |
||
456 | cld |
||
457 | rep movsb |
||
180 | heavyiron | 458 | |
31 | halyavin | 459 | mov eax,13 |
460 | mov ebx,[boardx] |
||
461 | sub ebx,14 |
||
462 | shl ebx,16 |
||
463 | add ebx,8 |
||
464 | mov ecx,[boardy] |
||
465 | shl ecx,16 |
||
466 | add ecx,46*8 |
||
467 | mov edx,[wcolor] |
||
468 | int 0x40 |
||
180 | heavyiron | 469 | |
470 | mov eax,4 ; numbers at left |
||
31 | halyavin | 471 | mov ebx,[boardx] |
472 | sub ebx,14 |
||
473 | shl ebx,16 |
||
474 | add ebx,[boardy] |
||
475 | add ebx,18 |
||
476 | mov ecx,[tcolor] |
||
477 | mov edx,chess_board+80+5 |
||
478 | mov esi,3 |
||
479 | db1: |
||
480 | int 0x40 |
||
481 | add edx,80*2 |
||
482 | add ebx,[boardxs] |
||
483 | cmp edx,chess_board+80*16 |
||
484 | jb db1 |
||
180 | heavyiron | 485 | |
31 | halyavin | 486 | mov eax,13 |
487 | mov ebx,[boardx] |
||
488 | shl ebx,16 |
||
489 | add ebx,8*46 |
||
490 | mov ecx,[boardys] |
||
491 | imul ecx,8 |
||
492 | add ecx,[boardy] |
||
493 | add ecx,8 |
||
494 | shl ecx,16 |
||
495 | add ecx,10 |
||
496 | mov edx,[wcolor] |
||
497 | int 0x40 |
||
180 | heavyiron | 498 | |
499 | mov eax,4 ; letters at bottom |
||
31 | halyavin | 500 | mov ebx,[boardx] |
501 | add ebx,3 |
||
502 | shl ebx,16 |
||
503 | mov bx,word [boardys] |
||
504 | imul bx,8 |
||
505 | add ebx,[boardy] |
||
506 | add ebx,8 |
||
507 | mov ecx,[tcolor] |
||
508 | mov edx,chess_board+80*17+8 |
||
509 | mov esi,4 |
||
510 | db3: |
||
511 | int 0x40 |
||
512 | mov edi,[boardxs] |
||
513 | shl edi,16 |
||
514 | add ebx,edi |
||
515 | add edx,4 |
||
516 | cmp edx,chess_board+80*17+8+4*8 |
||
517 | jb db3 |
||
180 | heavyiron | 518 | |
31 | halyavin | 519 | ; print player times |
180 | heavyiron | 520 | |
31 | halyavin | 521 | mov edi,74 |
522 | cmp [chess_board+80+5],byte '1' |
||
523 | jne nowww2 |
||
524 | mov edi,371 |
||
525 | nowww2: |
||
180 | heavyiron | 526 | |
31 | halyavin | 527 | mov eax,13 |
528 | mov ebx,(conx)*65536+100 |
||
529 | mov ecx,edi |
||
530 | shl ecx,16 |
||
531 | add ecx,10 |
||
532 | mov edx,[wcolor] |
||
533 | int 0x40 |
||
180 | heavyiron | 534 | |
31 | halyavin | 535 | mov eax,4 |
536 | mov ebx,(conx)*65536 |
||
537 | add ebx,edi |
||
538 | mov ecx,[tcolor] |
||
539 | mov edx,chess_board+80*7+59-1 |
||
540 | mov esi,20 |
||
541 | int 0x40 |
||
180 | heavyiron | 542 | |
31 | halyavin | 543 | mov edi,74 |
544 | cmp [chess_board+80+5],byte '1' |
||
545 | je nowww |
||
546 | mov edi,371 |
||
547 | nowww: |
||
180 | heavyiron | 548 | |
31 | halyavin | 549 | mov eax,13 |
550 | mov ebx,(conx)*65536+100 |
||
551 | mov ecx,edi |
||
552 | shl ecx,16 |
||
553 | add ecx,10 |
||
554 | mov edx,[wcolor] |
||
555 | int 0x40 |
||
180 | heavyiron | 556 | |
31 | halyavin | 557 | mov eax,4 |
558 | mov ebx,(conx)*65536 |
||
559 | add ebx,edi |
||
560 | mov ecx,[tcolor] |
||
561 | mov edx,chess_board+80*9+59-1 |
||
562 | mov esi,20 |
||
563 | int 0x40 |
||
180 | heavyiron | 564 | |
31 | halyavin | 565 | ; move # |
180 | heavyiron | 566 | |
31 | halyavin | 567 | mov eax,13 |
568 | mov ebx,conx*65536+120 |
||
569 | mov ecx,200*65536+10 |
||
570 | mov edx,[wcolor] |
||
571 | int 0x40 |
||
180 | heavyiron | 572 | |
31 | halyavin | 573 | mov eax,4 |
574 | mov ebx,conx*65536 |
||
575 | add ebx,200 |
||
576 | mov ecx,[tcolor] |
||
577 | mov edx,chess_board+80*1+46 |
||
578 | mov esi,30 |
||
579 | int 0x40 |
||
180 | heavyiron | 580 | |
31 | halyavin | 581 | no_change_in_board: |
180 | heavyiron | 582 | |
31 | halyavin | 583 | popa |
180 | heavyiron | 584 | |
31 | halyavin | 585 | ret |
180 | heavyiron | 586 | |
587 | |||
31 | halyavin | 588 | handle_data: |
589 | ; Telnet servers will want to negotiate options about our terminal window |
||
590 | ; just reject them all. |
||
591 | ; Telnet options start with the byte 0xff and are 3 bytes long. |
||
180 | heavyiron | 592 | |
31 | halyavin | 593 | mov al, [telnetstate] |
594 | cmp al, 0 |
||
180 | heavyiron | 595 | je state0 |
31 | halyavin | 596 | cmp al, 1 |
180 | heavyiron | 597 | je state1 |
31 | halyavin | 598 | cmp al, 2 |
180 | heavyiron | 599 | je state2 |
31 | halyavin | 600 | jmp hd001 |
180 | heavyiron | 601 | |
31 | halyavin | 602 | state0: |
603 | cmp bl, 255 |
||
604 | jne hd001 |
||
605 | mov al, 1 |
||
606 | mov [telnetstate], al |
||
607 | ret |
||
180 | heavyiron | 608 | |
31 | halyavin | 609 | state1: |
610 | mov al, 2 |
||
611 | mov [telnetstate], al |
||
612 | ret |
||
180 | heavyiron | 613 | |
31 | halyavin | 614 | state2: |
615 | mov al, 0 |
||
616 | mov [telnetstate], al |
||
617 | mov [telnetrep+2], bl |
||
180 | heavyiron | 618 | |
31 | halyavin | 619 | mov edx, 3 |
620 | mov eax,53 |
||
621 | mov ebx,7 |
||
622 | mov ecx,[socket] |
||
623 | mov esi, telnetrep |
||
624 | int 0x40 |
||
625 | ret |
||
180 | heavyiron | 626 | |
31 | halyavin | 627 | hd001: |
180 | heavyiron | 628 | cmp bl,13 ; BEGINNING OF LINE |
31 | halyavin | 629 | jne nobol |
630 | mov ecx,[pos] |
||
631 | add ecx,1 |
||
632 | boll1: |
||
633 | sub ecx,1 |
||
634 | mov eax,ecx |
||
635 | xor edx,edx |
||
636 | mov ebx,80 |
||
637 | div ebx |
||
638 | cmp edx,0 |
||
639 | jne boll1 |
||
640 | mov [pos],ecx |
||
180 | heavyiron | 641 | |
31 | halyavin | 642 | call check_for_board |
180 | heavyiron | 643 | |
31 | halyavin | 644 | jmp newdata |
645 | nobol: |
||
180 | heavyiron | 646 | |
647 | cmp bl,10 ; LINE DOWN |
||
31 | halyavin | 648 | jne nolf |
649 | addx1: |
||
650 | add [pos],dword 1 |
||
651 | mov eax,[pos] |
||
652 | xor edx,edx |
||
653 | mov ecx,80 |
||
654 | div ecx |
||
655 | cmp edx,0 |
||
656 | jnz addx1 |
||
657 | mov eax,[pos] |
||
658 | jmp cm1 |
||
659 | nolf: |
||
180 | heavyiron | 660 | |
661 | cmp bl,9 ; TAB |
||
31 | halyavin | 662 | jne notab |
663 | add [pos],dword 8 |
||
664 | jmp newdata |
||
665 | notab: |
||
180 | heavyiron | 666 | |
667 | cmp bl,8 ; BACKSPACE |
||
31 | halyavin | 668 | jne nobasp |
669 | mov eax,[pos] |
||
670 | dec eax |
||
671 | mov [pos],eax |
||
672 | mov [eax+text],byte 32 |
||
673 | mov [eax+text+60*80],byte 0 |
||
674 | jmp newdata |
||
675 | nobasp: |
||
180 | heavyiron | 676 | |
677 | cmp bl,15 ; CHARACTER |
||
31 | halyavin | 678 | jbe newdata |
679 | mov eax,[pos] |
||
680 | mov [eax+text],bl |
||
681 | mov eax,[pos] |
||
682 | add eax,1 |
||
683 | cm1: |
||
684 | mov ebx,[scroll+4] |
||
685 | imul ebx,80 |
||
686 | cmp eax,ebx |
||
180 | heavyiron | 687 | jb noeaxz |
31 | halyavin | 688 | mov esi,text+80 |
689 | mov edi,text |
||
690 | mov ecx,ebx |
||
691 | cld |
||
692 | rep movsb |
||
693 | mov eax,ebx |
||
694 | sub eax,80 |
||
695 | noeaxz: |
||
696 | mov [pos],eax |
||
697 | newdata: |
||
698 | ret |
||
180 | heavyiron | 699 | |
700 | |||
701 | red: ; REDRAW WINDOW |
||
31 | halyavin | 702 | call draw_window |
703 | jmp still |
||
180 | heavyiron | 704 | |
705 | key: ; KEY |
||
706 | mov eax,2 ; send to modem |
||
31 | halyavin | 707 | int 0x40 |
180 | heavyiron | 708 | |
31 | halyavin | 709 | mov ebx, [socket_status] |
180 | heavyiron | 710 | cmp ebx, 4 ; connection open? |
711 | jne still ; no, so ignore key |
||
712 | |||
31 | halyavin | 713 | shr eax,8 |
180 | heavyiron | 714 | cmp eax,178 ; ARROW KEYS |
31 | halyavin | 715 | jne noaup |
716 | mov al,'A' |
||
717 | call arrow |
||
718 | jmp still |
||
719 | noaup: |
||
720 | cmp eax,177 |
||
721 | jne noadown |
||
722 | mov al,'B' |
||
723 | call arrow |
||
724 | jmp still |
||
725 | noadown: |
||
726 | cmp eax,179 |
||
727 | jne noaright |
||
728 | mov al,'C' |
||
729 | call arrow |
||
730 | jmp still |
||
731 | noaright: |
||
732 | cmp eax,176 |
||
733 | jne noaleft |
||
734 | mov al,'D' |
||
735 | call arrow |
||
736 | jmp still |
||
737 | noaleft: |
||
738 | modem_out: |
||
180 | heavyiron | 739 | |
31 | halyavin | 740 | call to_modem |
180 | heavyiron | 741 | |
31 | halyavin | 742 | jmp still |
180 | heavyiron | 743 | |
744 | button: ; BUTTON |
||
31 | halyavin | 745 | mov eax,17 |
746 | int 0x40 |
||
180 | heavyiron | 747 | cmp ah,1 ; CLOSE PROGRAM |
31 | halyavin | 748 | jne noclose |
180 | heavyiron | 749 | |
31 | halyavin | 750 | mov eax,53 |
751 | mov ebx,8 |
||
752 | mov ecx,[socket] |
||
753 | int 0x40 |
||
180 | heavyiron | 754 | |
31 | halyavin | 755 | mov eax,-1 |
756 | int 0x40 |
||
757 | noclose: |
||
180 | heavyiron | 758 | |
759 | cmp ah, 4 ; connect |
||
31 | halyavin | 760 | jne notcon |
180 | heavyiron | 761 | |
31 | halyavin | 762 | mov eax, [socket_status] |
763 | cmp eax, 4 |
||
180 | heavyiron | 764 | je still |
31 | halyavin | 765 | call connect |
180 | heavyiron | 766 | |
31 | halyavin | 767 | jmp still |
180 | heavyiron | 768 | |
31 | halyavin | 769 | notcon: |
180 | heavyiron | 770 | cmp ah,5 ; disconnect |
31 | halyavin | 771 | jne notdiscon |
180 | heavyiron | 772 | |
31 | halyavin | 773 | call disconnect |
774 | jmp still |
||
180 | heavyiron | 775 | |
31 | halyavin | 776 | notdiscon: |
180 | heavyiron | 777 | |
31 | halyavin | 778 | jmp still |
180 | heavyiron | 779 | |
31 | halyavin | 780 | arrow: |
180 | heavyiron | 781 | |
31 | halyavin | 782 | push eax |
783 | mov al,27 |
||
784 | call to_modem |
||
785 | mov al,'[' |
||
786 | call to_modem |
||
787 | pop eax |
||
788 | call to_modem |
||
180 | heavyiron | 789 | |
31 | halyavin | 790 | ret |
180 | heavyiron | 791 | |
792 | |||
31 | halyavin | 793 | to_modem: |
794 | pusha |
||
795 | push ax |
||
796 | mov [tx_buff], al |
||
797 | mov edx, 1 |
||
798 | cmp al, 13 |
||
799 | jne tm_000 |
||
800 | mov edx, 2 |
||
801 | tm_000: |
||
802 | mov eax,53 |
||
803 | mov ebx,7 |
||
804 | mov ecx,[socket] |
||
805 | mov esi, tx_buff |
||
806 | int 0x40 |
||
807 | pop bx |
||
808 | mov al, [echo] |
||
809 | cmp al, 0 |
||
180 | heavyiron | 810 | je tm_001 |
811 | |||
31 | halyavin | 812 | push bx |
813 | call handle_data |
||
814 | pop bx |
||
180 | heavyiron | 815 | |
31 | halyavin | 816 | cmp bl, 13 |
817 | jne tm_002 |
||
180 | heavyiron | 818 | |
31 | halyavin | 819 | mov bl, 10 |
820 | call handle_data |
||
180 | heavyiron | 821 | |
31 | halyavin | 822 | tm_002: |
823 | call draw_text |
||
180 | heavyiron | 824 | |
31 | halyavin | 825 | tm_001: |
826 | popa |
||
827 | ret |
||
180 | heavyiron | 828 | |
829 | |||
830 | |||
31 | halyavin | 831 | disconnect: |
832 | mov eax,53 |
||
833 | mov ebx,8 |
||
834 | mov ecx,[socket] |
||
835 | int 0x40 |
||
836 | ret |
||
180 | heavyiron | 837 | |
838 | |||
839 | |||
31 | halyavin | 840 | connect: |
841 | pusha |
||
180 | heavyiron | 842 | |
843 | mov ecx, 1000 ; local port starting at 1000 |
||
844 | |||
31 | halyavin | 845 | getlp: |
180 | heavyiron | 846 | inc ecx |
31 | halyavin | 847 | push ecx |
180 | heavyiron | 848 | mov eax, 53 |
849 | mov ebx, 9 |
||
850 | int 0x40 |
||
851 | pop ecx |
||
852 | cmp eax, 0 ; is this local port in use? |
||
853 | jz getlp ; yes - so try next |
||
854 | |||
31 | halyavin | 855 | mov eax,53 |
856 | mov ebx,5 |
||
857 | mov dl, [ip_address + 3] |
||
858 | shl edx, 8 |
||
859 | mov dl, [ip_address + 2] |
||
860 | shl edx, 8 |
||
861 | mov dl, [ip_address + 1] |
||
862 | shl edx, 8 |
||
863 | mov dl, [ip_address] |
||
864 | mov esi, edx |
||
180 | heavyiron | 865 | movzx edx, word [port] ; telnet port id |
31 | halyavin | 866 | mov edi,1 ; active open |
867 | int 0x40 |
||
868 | mov [socket], eax |
||
180 | heavyiron | 869 | |
31 | halyavin | 870 | popa |
180 | heavyiron | 871 | |
31 | halyavin | 872 | ret |
180 | heavyiron | 873 | |
874 | |||
875 | |||
31 | halyavin | 876 | ; ********************************************* |
877 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
||
878 | ; ********************************************* |
||
180 | heavyiron | 879 | |
880 | |||
31 | halyavin | 881 | draw_window: |
180 | heavyiron | 882 | |
31 | halyavin | 883 | pusha |
180 | heavyiron | 884 | |
31 | halyavin | 885 | mov eax,12 |
886 | mov ebx,1 |
||
887 | int 0x40 |
||
180 | heavyiron | 888 | |
31 | halyavin | 889 | mov eax,14 |
890 | int 0x40 |
||
180 | heavyiron | 891 | |
31 | halyavin | 892 | mov ebx,eax |
893 | mov ecx,eax |
||
180 | heavyiron | 894 | |
31 | halyavin | 895 | shr ebx,16 |
896 | and ebx,0xffff |
||
897 | and ecx,0xffff |
||
180 | heavyiron | 898 | |
31 | halyavin | 899 | shr ebx,1 |
900 | shr ecx,1 |
||
180 | heavyiron | 901 | |
31 | halyavin | 902 | sub ebx,275 |
903 | sub ecx,235 |
||
180 | heavyiron | 904 | |
31 | halyavin | 905 | shl ebx,16 |
906 | shl ecx,16 |
||
180 | heavyiron | 907 | |
908 | mov eax,0 ; DRAW WINDOW |
||
31 | halyavin | 909 | mov bx,550 |
910 | mov cx,470 |
||
911 | mov edx,[wcolor] |
||
180 | heavyiron | 912 | add edx,0x13000000 |
913 | mov edi,header |
||
31 | halyavin | 914 | int 0x40 |
180 | heavyiron | 915 | |
31 | halyavin | 916 | call display_status |
180 | heavyiron | 917 | |
918 | mov eax,8 ; BUTTON 4: Connect |
||
31 | halyavin | 919 | mov ebx,conx*65536+80 |
920 | mov ecx,cony*65536+15 |
||
921 | mov esi,[wbutton] |
||
922 | mov edx,4 |
||
923 | int 0x40 |
||
180 | heavyiron | 924 | mov eax,4 ; Button text |
31 | halyavin | 925 | mov ebx,(conx+4)*65536+cony+4 |
926 | mov ecx,0xffffff |
||
927 | mov edx,cont |
||
928 | mov esi,conlen-cont |
||
929 | int 0x40 |
||
180 | heavyiron | 930 | |
931 | |||
932 | mov eax,8 ; BUTTON 5: disconnect |
||
31 | halyavin | 933 | mov ebx,dconx*65536+80 |
934 | mov ecx,dcony*65536+15 |
||
935 | mov edx,5 |
||
936 | mov esi,[wbutton] |
||
937 | int 0x40 |
||
180 | heavyiron | 938 | mov eax,4 ; Button text |
31 | halyavin | 939 | mov ebx,(dconx+4)*65536+dcony+4 |
940 | mov ecx,0x00ffffff |
||
941 | mov edx,dist |
||
942 | mov esi,dislen-dist |
||
943 | int 0x40 |
||
180 | heavyiron | 944 | |
945 | |||
31 | halyavin | 946 | xor eax,eax |
947 | mov edi,text+80*30 |
||
948 | mov ecx,80*30 /4 |
||
949 | cld |
||
950 | rep stosd |
||
180 | heavyiron | 951 | |
31 | halyavin | 952 | call draw_text |
180 | heavyiron | 953 | |
31 | halyavin | 954 | mov [changed],1 |
180 | heavyiron | 955 | |
31 | halyavin | 956 | mov edi,board_old |
957 | mov ecx,80*19 |
||
958 | mov al,0 |
||
959 | cld |
||
960 | rep stosb |
||
180 | heavyiron | 961 | |
31 | halyavin | 962 | mov eax,4 |
963 | mov ebx,conx*65536+52 |
||
964 | mov ecx,[tcolor] |
||
965 | mov edx,quick_start |
||
966 | mov esi,30 |
||
180 | heavyiron | 967 | |
31 | halyavin | 968 | prqs: |
180 | heavyiron | 969 | |
31 | halyavin | 970 | int 0x40 |
971 | add ebx,10 |
||
972 | add edx,30 |
||
973 | cmp [edx],byte 'x' |
||
974 | jne prqs |
||
180 | heavyiron | 975 | |
31 | halyavin | 976 | mov eax,12 |
977 | mov ebx,2 |
||
978 | int 0x40 |
||
180 | heavyiron | 979 | |
31 | halyavin | 980 | popa |
180 | heavyiron | 981 | |
31 | halyavin | 982 | ret |
180 | heavyiron | 983 | |
984 | |||
31 | halyavin | 985 | display_status: |
180 | heavyiron | 986 | |
31 | halyavin | 987 | pusha |
180 | heavyiron | 988 | |
31 | halyavin | 989 | ; draw status bar |
990 | mov eax, 13 |
||
991 | mov ebx, statusx*65536+80 |
||
992 | mov ecx, statusy*65536 + 16 |
||
993 | mov edx, [wcolor] |
||
994 | int 0x40 |
||
180 | heavyiron | 995 | |
996 | mov esi,contlen-contt ; display connected status |
||
31 | halyavin | 997 | mov edx, contt |
998 | mov eax, [socket_status] |
||
180 | heavyiron | 999 | cmp eax, 4 ; 4 is connected |
1000 | je pcon |
||
31 | halyavin | 1001 | mov esi,discontlen-discontt |
1002 | mov edx, discontt |
||
1003 | pcon: |
||
180 | heavyiron | 1004 | mov eax,4 ; status text |
31 | halyavin | 1005 | mov ebx,statusx*65536+statusy+2 |
1006 | mov ecx,[tcolor] |
||
1007 | int 0x40 |
||
180 | heavyiron | 1008 | |
31 | halyavin | 1009 | popa |
1010 | ret |
||
180 | heavyiron | 1011 | |
1012 | |||
31 | halyavin | 1013 | nappulat: |
180 | heavyiron | 1014 | |
31 | halyavin | 1015 | dd '*P ',5 |
1016 | dd '*K ',3 |
||
1017 | dd '*Q ',4 |
||
1018 | dd '*R ',0 |
||
1019 | dd '*N ',1 |
||
1020 | dd '*B ',2 |
||
180 | heavyiron | 1021 | |
31 | halyavin | 1022 | dd ' ',20 |
180 | heavyiron | 1023 | |
31 | halyavin | 1024 | dd 'P ',5 |
1025 | dd 'K ',3 |
||
1026 | dd 'Q ',4 |
||
1027 | dd 'R ',0 |
||
1028 | dd 'N ',1 |
||
1029 | dd 'B ',2 |
||
180 | heavyiron | 1030 | |
1031 | |||
31 | halyavin | 1032 | row dd 0x0 |
1033 | col dd 0x0 |
||
180 | heavyiron | 1034 | |
1035 | |||
1036 | |||
31 | halyavin | 1037 | draw_text: |
180 | heavyiron | 1038 | |
31 | halyavin | 1039 | mov esi,text+80*24 |
1040 | mov edi,texts+80*3 |
||
180 | heavyiron | 1041 | |
31 | halyavin | 1042 | dtl1: |
180 | heavyiron | 1043 | |
31 | halyavin | 1044 | cmp [esi],dword 'logi' |
180 | heavyiron | 1045 | je add_text |
31 | halyavin | 1046 | cmp [esi],dword 'aics' |
180 | heavyiron | 1047 | je add_text |
31 | halyavin | 1048 | cmp [esi],dword 'You ' |
180 | heavyiron | 1049 | je add_text |
31 | halyavin | 1050 | cmp [esi],dword 'Your' |
180 | heavyiron | 1051 | je add_text |
31 | halyavin | 1052 | cmp [esi],dword 'Game' |
180 | heavyiron | 1053 | je add_text |
31 | halyavin | 1054 | cmp [esi],dword 'Ille' |
180 | heavyiron | 1055 | je add_text |
31 | halyavin | 1056 | cmp [esi],dword 'No s' |
180 | heavyiron | 1057 | je add_text |
1058 | |||
31 | halyavin | 1059 | sub esi,80 |
1060 | cmp esi,text |
||
1061 | jge dtl1 |
||
180 | heavyiron | 1062 | |
31 | halyavin | 1063 | dtl2: |
180 | heavyiron | 1064 | |
31 | halyavin | 1065 | mov eax,13 |
1066 | mov ebx,10*65536+532 |
||
1067 | mov ecx,420*65536+40 |
||
1068 | mov edx,[wtcom] |
||
1069 | int 0x40 |
||
180 | heavyiron | 1070 | |
31 | halyavin | 1071 | mov eax,4 |
1072 | mov ebx,10*65536+420 |
||
1073 | mov ecx,[wtxt] |
||
1074 | mov edx,texts |
||
1075 | mov esi,80 |
||
180 | heavyiron | 1076 | |
31 | halyavin | 1077 | dtl3: |
180 | heavyiron | 1078 | |
31 | halyavin | 1079 | int 0x40 |
1080 | add edx,80 |
||
1081 | add ebx,10 |
||
1082 | cmp edx,texts+4*80 |
||
180 | heavyiron | 1083 | jb dtl3 |
1084 | |||
31 | halyavin | 1085 | ret |
180 | heavyiron | 1086 | |
31 | halyavin | 1087 | add_text: |
180 | heavyiron | 1088 | |
31 | halyavin | 1089 | pusha |
180 | heavyiron | 1090 | |
31 | halyavin | 1091 | cld |
1092 | mov ecx,80 |
||
1093 | rep movsb |
||
180 | heavyiron | 1094 | |
31 | halyavin | 1095 | popa |
180 | heavyiron | 1096 | |
1097 | |||
31 | halyavin | 1098 | sub esi,80 |
1099 | sub edi,80 |
||
180 | heavyiron | 1100 | |
31 | halyavin | 1101 | cmp edi,texts |
180 | heavyiron | 1102 | jb dtl2 |
1103 | |||
31 | halyavin | 1104 | jmp dtl1 |
180 | heavyiron | 1105 | |
1106 | |||
31 | halyavin | 1107 | read_string: |
180 | heavyiron | 1108 | |
31 | halyavin | 1109 | mov edi,string |
1110 | mov eax,'_' |
||
1111 | mov ecx,[string_length] |
||
1112 | inc ecx |
||
1113 | cld |
||
1114 | rep stosb |
||
1115 | call print_text |
||
180 | heavyiron | 1116 | |
31 | halyavin | 1117 | mov edi,string |
1118 | f11: |
||
1119 | mov eax,10 |
||
1120 | int 0x40 |
||
1121 | cmp eax,2 |
||
1122 | jne read_done |
||
1123 | mov eax,2 |
||
1124 | int 0x40 |
||
1125 | shr eax,8 |
||
1126 | cmp eax,13 |
||
180 | heavyiron | 1127 | je read_done |
31 | halyavin | 1128 | cmp eax,8 |
1129 | jnz nobsl |
||
1130 | cmp edi,string |
||
180 | heavyiron | 1131 | jz f11 |
31 | halyavin | 1132 | sub edi,1 |
1133 | mov [edi],byte '_' |
||
1134 | call print_text |
||
1135 | jmp f11 |
||
1136 | nobsl: |
||
1137 | cmp eax,dword 31 |
||
1138 | jbe f11 |
||
1139 | cmp eax,dword 95 |
||
180 | heavyiron | 1140 | jb keyok |
31 | halyavin | 1141 | sub eax,32 |
1142 | keyok: |
||
1143 | mov [edi],al |
||
1144 | call print_text |
||
180 | heavyiron | 1145 | |
31 | halyavin | 1146 | inc edi |
1147 | mov esi,string |
||
1148 | add esi,[string_length] |
||
1149 | cmp esi,edi |
||
1150 | jnz f11 |
||
180 | heavyiron | 1151 | |
31 | halyavin | 1152 | read_done: |
180 | heavyiron | 1153 | |
31 | halyavin | 1154 | call print_text |
180 | heavyiron | 1155 | |
31 | halyavin | 1156 | ret |
180 | heavyiron | 1157 | |
1158 | |||
31 | halyavin | 1159 | print_text: |
180 | heavyiron | 1160 | |
31 | halyavin | 1161 | pusha |
180 | heavyiron | 1162 | |
31 | halyavin | 1163 | mov eax,13 |
1164 | mov ebx,[string_x] |
||
1165 | shl ebx,16 |
||
1166 | add ebx,[string_length] |
||
1167 | imul bx,6 |
||
1168 | mov ecx,[string_y] |
||
1169 | shl ecx,16 |
||
1170 | mov cx,8 |
||
1171 | mov edx,[wcolor] |
||
1172 | int 0x40 |
||
180 | heavyiron | 1173 | |
31 | halyavin | 1174 | mov eax,4 |
1175 | mov ebx,[string_x] |
||
1176 | shl ebx,16 |
||
1177 | add ebx,[string_y] |
||
1178 | mov ecx,[tcolor] |
||
1179 | mov edx,string |
||
1180 | mov esi,[string_length] |
||
1181 | int 0x40 |
||
180 | heavyiron | 1182 | |
31 | halyavin | 1183 | popa |
1184 | ret |
||
180 | heavyiron | 1185 | |
1186 | |||
1187 | |||
1188 | |||
31 | halyavin | 1189 | ; DATA AREA |
180 | heavyiron | 1190 | |
1191 | telnetrep db 0xff,0xfc,0x00 |
||
1192 | telnetstate db 0 |
||
1193 | |||
31 | halyavin | 1194 | string_length dd 16 |
1195 | string_x dd 200 |
||
1196 | string_y dd 60 |
||
180 | heavyiron | 1197 | |
1198 | string db '________________' |
||
1199 | |||
1200 | tx_buff db 0, 10 |
||
1201 | ip_address db 204,178,125,65 |
||
1202 | port dw 5051 ; 0,0 |
||
1203 | echo db 1 |
||
1204 | socket dd 0x0 |
||
1205 | socket_status dd 0x0 |
||
1206 | pos dd 80 * 22 |
||
1207 | scroll dd 1 |
||
1208 | dd 24 |
||
1209 | |||
1210 | wbutton dd 0x336688 |
||
1211 | |||
1212 | wtcom dd 0x336688 ; 0x666666 |
||
1213 | wtxt dd 0xffffff |
||
1214 | |||
1215 | wcolor dd 0xe0e0e0 |
||
1216 | tcolor dd 0x000000 |
||
1217 | |||
1218 | sq_black dd 0x336688 ; 666666 |
||
1219 | sq_white dd 0xffffff |
||
1220 | |||
1221 | header db appname,version,0 |
||
1222 | |||
1223 | setipt db ' . . .' |
||
31 | halyavin | 1224 | setiplen: |
180 | heavyiron | 1225 | setportt db ' ' |
31 | halyavin | 1226 | setportlen: |
180 | heavyiron | 1227 | cont db 'Connect' |
31 | halyavin | 1228 | conlen: |
180 | heavyiron | 1229 | dist db 'Disconnect' |
31 | halyavin | 1230 | dislen: |
180 | heavyiron | 1231 | contt db 'Connected' |
31 | halyavin | 1232 | contlen: |
180 | heavyiron | 1233 | discontt db 'Disconnected' |
31 | halyavin | 1234 | discontlen: |
180 | heavyiron | 1235 | echot db 'Echo On' |
31 | halyavin | 1236 | echolen: |
180 | heavyiron | 1237 | echoot db 'Echo Off' |
31 | halyavin | 1238 | echoolen: |
180 | heavyiron | 1239 | |
31 | halyavin | 1240 | quick_start: |
180 | heavyiron | 1241 | |
1242 | db '( OPPONENT ) ' |
||
1243 | |||
31 | halyavin | 1244 | times 16 db ' 1' |
180 | heavyiron | 1245 | |
1246 | db 'Quick start: ' |
||
1247 | db ' ' |
||
1248 | db '1 Connect ' |
||
1249 | db '2 login: "guest" ' |
||
1250 | db '3 aics% "seek 10 0" ' |
||
1251 | db ' (for a player) ' |
||
1252 | db ' (wait) ' |
||
1253 | db '4 Play eg. "e7e5" ' |
||
1254 | db ' or "d2d4" ' |
||
1255 | db '5 aics% "resign" ' |
||
1256 | db ' (quit game) ' |
||
1257 | db '6 Disconnect ' |
||
1258 | |||
31 | halyavin | 1259 | times 5 db ' ' |
180 | heavyiron | 1260 | |
1261 | db '( YOU ) ' |
||
1262 | |||
1263 | db 'x' |
||
1264 | |||
1265 | |||
31 | halyavin | 1266 | chess_board: |
180 | heavyiron | 1267 | |
1268 | times 80 db 0 |
||
1269 | |||
31 | halyavin | 1270 | db ' 8 *R *N *B *Q *K *B *N *R' |
1271 | db ' ' |
||
180 | heavyiron | 1272 | |
1273 | times 80 db 0 |
||
1274 | |||
31 | halyavin | 1275 | db ' 7 *P *P *P *P *P *P *P *P' |
1276 | db ' ' |
||
180 | heavyiron | 1277 | |
1278 | times 80 db 0 |
||
1279 | |||
31 | halyavin | 1280 | db ' 6 ' |
1281 | db ' ' |
||
180 | heavyiron | 1282 | |
1283 | times 80 db 0 |
||
1284 | |||
31 | halyavin | 1285 | db ' 5 ' |
1286 | db ' ' |
||
180 | heavyiron | 1287 | |
1288 | times 80 db 0 |
||
1289 | |||
31 | halyavin | 1290 | db ' 4 ' |
1291 | db ' ' |
||
180 | heavyiron | 1292 | |
1293 | times 80 db 0 |
||
1294 | |||
31 | halyavin | 1295 | db ' 3 ' |
1296 | db ' ' |
||
180 | heavyiron | 1297 | |
1298 | times 80 db 0 |
||
1299 | |||
31 | halyavin | 1300 | db ' 2 P P P P P P P P ' |
1301 | db ' ' |
||
180 | heavyiron | 1302 | |
1303 | times 80 db 0 |
||
1304 | |||
31 | halyavin | 1305 | db ' 1 R N B Q K B N R ' |
1306 | db ' ' |
||
180 | heavyiron | 1307 | |
1308 | times 80 db 0 |
||
1309 | |||
31 | halyavin | 1310 | db ' a b c d e f g h ' |
1311 | db ' ' |
||
180 | heavyiron | 1312 | |
1313 | |||
31 | halyavin | 1314 | times 80*20 db 0 |
180 | heavyiron | 1315 | |
31 | halyavin | 1316 | board_old: |
180 | heavyiron | 1317 | |
1318 | |||
31 | halyavin | 1319 | I_END: |
180 | heavyiron | 1320 |