Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 132 → Rev 485

/programs/network/rccc/trunk/rccc.asm
25,7 → 25,7
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
 
START: ; start of execution
 
34,7 → 34,7
mov ecx,0x6000 ; local port
mov edx,0x6100 ; remote port
mov esi,dword [remote_ip] ; remote IP
int 0x40
mcall
 
mov [socket], eax
 
43,8 → 43,9
mov ecx,[socket]
mov edx,1
mov esi,connect
int 0x40
mcall
 
red:
call draw_window ; at first, draw the window
 
still:
51,7 → 52,7
 
mov eax,23 ; wait here for event
mov ebx,1
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
jz red
61,19 → 62,14
jz button
 
jmp still
 
red:
call draw_window
jmp still
 
key:
mov eax,2
int 0x40
mcall
jmp still
 
button:
mov eax,17
int 0x40
mcall
 
cmp ah,1 ; button id=1 ?
jnz noclose
80,9 → 76,9
mov eax, 53
mov ebx, 1
mov ecx, [socket]
int 0x40
mov eax,-1
int 0x40
mcall
or eax,-1
mcall
noclose:
 
cmp ah,2 ; SEND SHUTDOWN COMMAND?
118,7 → 114,7
mov ecx,[socket]
mov edx,1
mov esi,sen_shutdown
int 0x40
mcall
 
jmp still
 
129,7 → 125,7
mov ecx,[socket]
mov edx,1
mov esi,sen_reboot
int 0x40
mcall
 
jmp still
 
140,7 → 136,7
mov ecx,[socket]
mov edx,1
mov esi,sen_savefi
int 0x40
mcall
 
jmp still
 
151,7 → 147,7
mov ecx,[socket]
mov edx,1
mov esi,sen_savehi
int 0x40
mcall
 
jmp still
 
162,7 → 158,7
mov ecx,[socket]
mov edx,1
mov esi,sen_hotreboot
int 0x40
mcall
 
jmp still
 
173,7 → 169,7
mov ecx,[socket]
mov edx,1
mov esi,sen_exit
int 0x40
mcall
 
jmp still
 
182,7 → 178,7
mov eax,53
mov ebx,3
mov ecx,[socket]
int 0x40
mcall
 
mov [edi],bl
inc edi
190,7 → 186,7
mov eax,53
mov ebx,2
mov ecx,[socket]
int 0x40
mcall
 
cmp eax,0
jne get_data
200,7 → 196,7
mov ecx,0x000000
mov edx,I_END
mov esi,15
int 0x40
mcall
 
jmp still
; *********************************************
212,24 → 208,16
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+250 ; [x start] *65536 + [x size]
mov ecx,60*65536+280 ; [y start] *65536 + [y size]
mov edx,0x03ffffff ; color of work area RRGGBB
mov esi,0x80aabbcc ; color of grab bar RRGGBB,8->color gl
mov edi,0x00aabbcc ; color of frames RRGGBB
int 0x40
mov edx,0x13ffffff ; color of work area RRGGBB
mov edi,title ; WINDOW LABEL
mcall
 
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,0x00ffffff ; color of text RRGGBB
mov edx,labeltext ; pointer to text beginning
mov esi,lte-labeltext ; text length
int 0x40
 
mov eax,8 ; CONTROL BUTTONS
mov ebx,25*65536+9
236,9 → 224,8
mov ecx,113*65536+9
mov edx,2
mov esi,0x667788
int 0x40
newbut:
int 0x40
mcall
add ecx,16*65536
inc edx
cmp edx,8
245,13 → 232,13
jb newbut
 
cld
mov eax,4
mov ebx,25*65536+50 ; draw info text with function 4
mov ecx,0x000000
mov edx,text
mov esi,40
newline:
mov eax,4
int 0x40
mcall
add ebx,16
add edx,40
cmp [edx],byte 'x'
259,7 → 246,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
303,9 → 290,9
db 'x' ; <- END MARKER, DONT DELETE
end if
 
labeltext: db 'Remote Control Center(Client)' ;
lte:
title db 'Remote Control Center(Client)',0
 
 
socket dd 0x0
 
remote_ip db 192,168,0,2