9,7 → 9,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
version equ '0.3' |
version equ '0.4' |
|
use32 |
|
22,16 → 22,17 |
dd 0x100000 ; required amount of memory |
dd 0x100000 |
dd 0,0 |
|
include "lang.inc" |
include "macros.inc" |
;include "macros.inc" |
|
irc_server_ip db 192,168,1,1 |
irc_server_ip db 83,149,74,246 ;server: kolibrios.org |
|
user_nick dd 4 ; length |
db 'airc ' ; string |
user_nick dd 12 ; length |
db 'kolibri_user ' ; string |
|
user_real_name dd 8 ; length |
db 'Joe User ' ; string |
user_real_name dd 14 ; length |
db 'KolibriOS User ' ; string |
|
|
START: ; start of execution |
423,6 → 424,19 |
start_user_list_at dd 0x0 |
|
|
recode_to_cp1251: |
push esi edx |
.loop: |
lodsb |
cmp al,0x80 |
jb @f |
and eax,0x7F |
mov al,[cp866_table+eax] |
@@: mov [esi-1],al |
dec edx |
jnz .loop |
pop edx esi |
ret |
|
|
send_data_to_server: |
501,6 → 515,8 |
mov edx,[xpos] |
inc edx |
|
call recode_to_cp1251 |
|
mov eax, 53 ; write message |
mov ebx, 7 |
mov ecx, [socket] |
1630,7 → 1646,27 |
ret |
|
|
cp1251_table: |
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; 8 |
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; 9 |
db '?','?','?','?','?','?','?','?' , $F0,'?','?','?','?','?','?','?' ; A |
db '?','?','?','?','?','?','?','?' , $F1,'?','?','?','?','?','?','?' ; B |
db $80,$81,$82,$83,$84,$85,$86,$87 , $88,$89,$8A,$8B,$8C,$8D,$8E,$8F ; C |
db $90,$91,$92,$93,$94,$95,$96,$97 , $98,$99,$9A,$9B,$9C,$9D,$9E,$9F ; D |
db $A0,$A1,$A2,$A3,$A4,$A5,$A6,$A7 , $A8,$A9,$AA,$AB,$AC,$AD,$AE,$AF ; E |
db $E0,$E1,$E2,$E3,$E4,$E5,$E6,$E7 , $E8,$E9,$EA,$EB,$EC,$ED,$EE,$EF ; F |
|
cp866_table: |
db $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7 , $C8,$C9,$CA,$CB,$CC,$CD,$CE,$CF ; 8 |
db $D0,$D1,$D2,$D3,$D4,$D5,$D6,$D7 , $D8,$D9,$DA,$DB,$DC,$DD,$DE,$DF ; 9 |
db $E0,$E1,$E2,$E3,$E4,$E5,$E6,$E7 , $E8,$E9,$EA,$EB,$EC,$ED,$EE,$EF ; A |
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; B |
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; C |
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; D |
db $F0,$F1,$F2,$F3,$F4,$F5,$F6,$F7 , $F8,$F9,$FA,$FB,$FC,$FD,$FE,$FF ; E |
db $A8,$B8,'?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; F |
|
|
print_character: |
|
pusha |
1749,7 → 1785,6 |
ret |
|
|
|
read_incoming_byte: |
|
mov eax, 53 |
1767,6 → 1802,12 |
mov ecx, [socket] |
int 0x40 |
|
cmp bl,0x80 |
jb @f |
and ebx,0x7F |
mov bl,[cp1251_table+ebx] |
@@: |
|
mov ecx,0 |
|
no_more_data: |
1874,20 → 1915,20 |
|
text: |
|
db ' Real name : Joe User - change with eg /areal Jill User ' |
db ' Nick : AIRC - change with eg /anick Jill ' |
db ' Server : 192.168.1.1 - change with eg /aserv 192.168.1.24 ' |
db ' Real name : KolibriOS User - change with eg /areal Jill User ' |
db ' Nick : kolibri_user - change with eg /anick Jill ' |
db ' Server : 83.149.74.246 - change with eg /aserv 192.168.1.24 ' |
db ' ' |
db ' 1) Open socket 2) Send userinfo Close socket ' |
db ' ' |
db ' Commands after established connection: ' |
db ' ' |
db ' /join #ChannelName - eg /join #menuet ' |
db ' /part #ChannelName - eg /part #linux ' |
db ' /join #ChannelName - eg /join #general ' |
db ' /part #ChannelName - eg /part #windows ' |
db ' /query Nickname - eg /query Mary ' |
db ' /quit - Quit server and Close socket ' |
|
db 'x <- END MARKER, DONT DELETE ' |
db 'x' ; <- END MARKER, DONT DELETE |
|
|
|
2280,10 → 2321,10 |
|
action_header_short db 10,'* ',0 |
|
has_left_channel db ' left channel ',0 |
joins_channel db ' joined channel ',0 |
has_left_channel db ' has left ',0 |
joins_channel db ' has joined ',0 |
is_now_known_as db ' is now known as ',0 |
has_quit_irc db ' has quit irc',0 |
has_quit_irc db ' has quit IRC',0 |
sets_mode db ' sets mode ',0 |
kicked db ' kicked from ',0 |
|