25,7 → 25,7 |
dd 0x0 , 0x0 ; I_Param , I_Icon |
|
include 'lang.inc' |
include '..\..\..\macros.inc' |
include 'macros.inc' |
remote_ip db 192,168,0,1 |
|
|
36,11 → 36,10 |
mov ecx, 0x6100 ; local port |
mov edx, 0x6000 ; remote port |
mov esi, dword [remote_ip] ; remote IP |
mcall |
int 0x40 |
mov [socket],eax |
mov [0],eax ; save for remote code |
|
red: |
call draw_window ; at first, draw the window |
|
still: |
47,7 → 46,7 |
|
mov eax,23 ; wait here for event |
mov ebx,1 |
mcall |
int 0x40 |
|
cmp eax,1 ; redraw request ? |
jz red |
59,7 → 58,7 |
mov eax,53 ; data from cluster terminal ? |
mov ebx,2 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
cmp eax,0 |
jne data_arrived |
66,9 → 65,13 |
|
jmp still |
|
red: |
call draw_window |
jmp still |
|
key: |
mov eax,2 |
mcall |
int 0x40 |
jmp still |
|
button: |
76,9 → 79,9 |
mov eax,53 |
mov ebx,1 |
mov ecx,[socket] |
mcall |
or eax,-1 |
mcall |
int 0x40 |
mov eax,-1 |
int 0x40 |
|
|
data_arrived: |
85,7 → 88,7 |
|
mov eax,5 ; wait a second for everything to arrive |
mov ebx,10 |
mcall |
int 0x40 |
|
mov edi,I_END |
|
94,7 → 97,7 |
mov eax,53 |
mov ebx,3 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
mov [edi],bl |
inc edi |
102,7 → 105,7 |
mov eax,53 |
mov ebx,2 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
cmp eax,0 |
jne get_data |
115,7 → 118,7 |
mov ecx,0x000000 |
mov edx,inp_con |
mov esi,inp_con.len |
mcall |
int 0x40 |
add [y],10 |
|
jmp still |
129,13 → 132,13 |
mov ecx,0x000000 |
mov edx,inp_shut |
mov esi,inp_shut.len |
mcall |
int 0x40 |
add [y],10 |
|
mov eax,18 |
mov ebx,9 |
mov ecx,2 |
mcall |
int 0x40 |
|
jmp still |
|
148,13 → 151,13 |
mov ecx,0x000000 |
mov edx,inp_reb |
mov esi,inp_reb.len |
mcall |
int 0x40 |
add [y],10 |
|
mov eax,18 |
mov ebx,9 |
mov ecx,3 |
mcall |
int 0x40 |
jmp still |
|
no_reb: |
166,13 → 169,13 |
mov ecx,0x000000 |
mov edx,inp_savefi |
mov esi,inp_savefi.len |
mcall |
int 0x40 |
add [y],10 |
|
mov eax,18 |
mov ebx,9 |
mov ecx,1 |
mcall |
int 0x40 |
jmp still |
|
no_savefi: |
184,13 → 187,13 |
mov ecx,0x000000 |
mov edx,inp_savehi |
mov esi,inp_savehi.len |
mcall |
int 0x40 |
add [y],10 |
|
mov eax,18 |
mov ebx,6 |
mov ecx,2 |
mcall |
int 0x40 |
|
jmp still |
|
203,13 → 206,13 |
mov ecx,0x000000 |
mov edx,inp_hotreb |
mov esi,inp_hotreb.len |
mcall |
int 0x40 |
add [y],10 |
|
mov eax,18 |
mov ebx,9 |
mov ecx,4 |
mcall |
int 0x40 |
jmp still |
|
no_hotreb: |
221,7 → 224,7 |
mov ecx,0x000000 |
mov edx,inp_exit |
mov esi,inp_exit.len |
mcall |
int 0x40 |
add [y],10 |
|
call button |
234,7 → 237,7 |
mov ecx,0x000000 |
mov edx,inp_com |
mov esi,inp_com.len |
mcall |
int 0x40 |
add [y],10 |
|
jmp still |
248,26 → 251,41 |
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
mcall |
int 0x40 |
|
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
mov ecx,100*65536+330 ; [y start] *65536 + [y size] |
mov edx,0x13ffffff ; color of work area RRGGBB |
mov edi,title ; WINDOW LABEL |
mcall |
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 eax,8 |
mov ebx,(286-19)*65536+12 |
mov ecx,4*65536+12 |
mov edx,1 |
mov esi,0xaabbcc |
; int 0x40 |
|
; 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 |
|
; Re-draw the screen text |
cld |
mov eax,4 |
mov ebx,10*65536+30 ; draw info text with function 4 |
mov ecx,0x000000 |
mov edx,text |
mov esi,40 |
newline: |
mcall |
mov eax,4 |
int 0x40 |
add ebx,16 |
add edx,40 |
cmp [edx],byte 'x' |
276,7 → 294,7 |
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
mcall |
int 0x40 |
|
ret |
|
297,7 → 315,8 |
db 'x' ; <- END MARKER, DONT DELETE |
end if |
|
title db 'Remote Control Center(Server)',0 |
labeltext: db 'Remote Control Center(Server)' |
lte: |
|
socket dd 0x0 |
y dd 0x10 |