Rev 6027 | Rev 9979 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6027 | Rev 7300 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; Written by hidnplayr@kolibrios.org ;; |
6 | ;; Written by hidnplayr@kolibrios.org ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
Line 202... | Line 202... | ||
202 | ; end the command with a CRLF |
202 | ; end the command with a CRLF |
203 | mov ax, 0x0a0d |
203 | mov ax, 0x0a0d |
204 | stosw |
204 | stosw |
205 | mov byte[edi], 0 |
205 | mov byte[edi], 0 |
Line 206... | Line -... | ||
206 | - | ||
207 | lea esi, [edi - packetbuf] |
- | |
208 | mcall send, [socketnum], packetbuf, , 0 |
- | |
209 | 206 | ||
210 | ; now print to the window |
207 | ; now print to the window |
211 | if TIMESTAMP |
208 | if TIMESTAMP |
212 | call print_timestamp |
209 | call print_timestamp |
Line 224... | Line 221... | ||
224 | 221 | ||
225 | mov al, ' ' |
222 | mov al, ' ' |
Line 226... | Line 223... | ||
226 | call print_char |
223 | call print_char |
- | 224 | ||
227 | 225 | pop esi |
|
- | 226 | push esi |
|
- | 227 | call print_asciiz |
|
- | 228 | pop esi |
|
- | 229 | ||
- | 230 | ||
Line 228... | Line 231... | ||
228 | pop esi |
231 | lea esi, [edi - packetbuf] |
229 | call print_asciiz |
232 | mcall send, [socketnum], packetbuf, , 0 |
Line 525... | Line 528... | ||
525 | mov ax, ' :' |
528 | mov ax, ' :' |
526 | stosw |
529 | stosw |
527 | mov al, 0x01 |
530 | mov al, 0x01 |
528 | stosb |
531 | stosb |
Line -... | Line 532... | ||
- | 532 | ||
- | 533 | push edi esi |
|
529 | 534 | ||
530 | ; copy the message itself |
535 | ; copy the message itself |
531 | @@: |
536 | @@: |
532 | lodsb |
537 | lodsb |
533 | test al, al |
538 | test al, al |
Line 543... | Line 548... | ||
543 | ; end of message |
548 | ; end of message |
544 | mov al, 0x01 |
549 | mov al, 0x01 |
545 | stosb |
550 | stosb |
546 | mov ax, 0x0a0d |
551 | mov ax, 0x0a0d |
547 | stosw |
552 | stosw |
- | 553 | mov byte[edi], 0 |
|
- | 554 | ||
- | 555 | ; now print to the window |
|
- | 556 | if TIMESTAMP |
|
- | 557 | call print_timestamp |
|
- | 558 | end if |
|
- | 559 | ||
- | 560 | mov esi, ctcp_header |
|
- | 561 | call print_asciiz |
|
- | 562 | ||
- | 563 | mov esi, packetbuf+8 |
|
- | 564 | mov bl, ' ' |
|
- | 565 | call print_string |
|
- | 566 | ||
- | 567 | mov al, ']' |
|
- | 568 | call print_char |
|
- | 569 | ||
- | 570 | mov al, ' ' |
|
- | 571 | call print_char |
|
- | 572 | ||
- | 573 | pop esi |
|
- | 574 | call print_asciiz |
|
- | 575 | pop esi |
|
- | 576 | ||
Line 548... | Line 577... | ||
548 | 577 | ||
549 | ; now send it away |
578 | ; now send it away |
550 | lea esi, [edi - packetbuf] ; calculate length |
579 | lea esi, [edi - packetbuf] ; calculate length |
Line 551... | Line -... | ||
551 | mcall send, [socketnum], packetbuf, , 0 ; and finally send to server |
- | |
552 | - | ||
553 | ;; TODO: print to window |
580 | mcall send, [socketnum], packetbuf, , 0 ; and finally send to server |
Line 554... | Line 581... | ||
554 | 581 |