Rev 131 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 131 | Rev 485 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | dd mem ; required amount of memory |
23 | dd mem ; required amount of memory |
24 | dd mem ; stack pointer |
24 | dd mem ; stack pointer |
25 | dd 0, 0 ; param, icon |
25 | dd 0, 0 ; param, icon |
Line 26... | Line 26... | ||
26 | 26 | ||
27 | include 'lang.inc' |
27 | include 'lang.inc' |
Line 28... | Line 28... | ||
28 | include 'macros.inc' |
28 | include '..\..\..\macros.inc' |
Line 29... | Line 29... | ||
29 | 29 | ||
30 | START: ; start of execution |
30 | START: ; start of execution |
31 | 31 | ||
32 | mov eax,53 ; open socket |
32 | mov eax,53 ; open socket |
33 | mov ebx,0 |
33 | mov ebx,0 |
34 | mov ecx,0x4000 ; local port |
34 | mov ecx,0x4000 ; local port |
Line 35... | Line 35... | ||
35 | mov edx,0x5000 ; remote port |
35 | mov edx,0x5000 ; remote port |
Line 36... | Line 36... | ||
36 | mov esi,dword [remote_ip] ; node IP |
36 | mov esi,dword [remote_ip] ; node IP |
37 | int 0x40 |
37 | mcall |
Line 38... | Line 38... | ||
38 | 38 | ||
Line 39... | Line 39... | ||
39 | mov [socketNum], eax |
39 | mov [socketNum], eax |
40 | 40 | ||
Line 41... | Line 41... | ||
41 | red: |
41 | red: |
42 | call draw_window ; at first, draw the window |
42 | call draw_window ; at first, draw the window |
43 | 43 | ||
44 | still: |
44 | still: |
Line 45... | Line 45... | ||
45 | 45 | ||
46 | mov eax,10 ; wait here for event |
46 | mov eax,10 ; wait here for event |
47 | int 0x40 |
47 | mcall |
48 | 48 | ||
Line 49... | Line 49... | ||
49 | dec eax |
49 | dec eax |
50 | jz red |
50 | jz red |
51 | dec eax |
51 | dec eax |
Line 52... | Line 52... | ||
52 | jnz button |
52 | jnz button |
53 | 53 | ||
54 | key: |
54 | key: |
55 | mov al,2 |
55 | mov al,2 |
56 | int 0x40 |
56 | mcall |
57 | jmp still |
57 | jmp still |
58 | 58 | ||
59 | button: |
59 | button: |
60 | mov al,17 |
60 | mov al,17 |
61 | int 0x40 |
61 | mcall |
Line 62... | Line 62... | ||
62 | 62 | ||
63 | dec ah ; button id=1 ? |
63 | dec ah ; button id=1 ? |
Line 82... | Line 82... | ||
82 | mov eax,53 ; SEND CODE TO REMOTE |
82 | mov eax,53 ; SEND CODE TO REMOTE |
83 | mov ebx,4 |
83 | mov ebx,4 |
84 | mov ecx,[socketNum] |
84 | mov ecx,[socketNum] |
85 | mov edx,end_message-send_data |
85 | mov edx,end_message-send_data |
86 | mov esi,send_data |
86 | mov esi,send_data |
87 | int 0x40 |
87 | mcall |
Line 88... | Line 88... | ||
88 | 88 | ||
Line 89... | Line 89... | ||
89 | jmp still |
89 | jmp still |
Line 96... | Line 96... | ||
96 | 96 | ||
Line 97... | Line 97... | ||
97 | draw_window: |
97 | draw_window: |
98 | 98 | ||
99 | mov eax,12 ; function 12:tell os about windowdraw |
99 | mov eax,12 ; function 12:tell os about windowdraw |
Line 100... | Line 100... | ||
100 | mov ebx,1 ; 1, start of draw |
100 | mov ebx,1 ; 1, start of draw |
101 | int 0x40 |
101 | mcall |
102 | 102 | ||
103 | ; DRAW WINDOW |
103 | ; DRAW WINDOW |
104 | mov eax,0 ; function 0 : define and draw window |
104 | mov eax,0 ; function 0 : define and draw window |
- | 105 | mov ebx,100*65536+250 ; [x start] *65536 + [x size] |
|
105 | mov ebx,100*65536+250 ; [x start] *65536 + [x size] |
106 | mov ecx,60*65536+150 ; [y start] *65536 + [y size] |
Line 106... | Line -... | ||
106 | mov ecx,60*65536+150 ; [y start] *65536 + [y size] |
- | |
107 | mov edx,0x03ffffff ; color of work area RRGGBB |
- | |
108 | int 0x40 |
- | |
109 | - | ||
110 | ; WINDOW LABEL |
- | |
111 | mov eax,4 ; function 4 : write text to window |
- | |
112 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
- | |
Line 113... | Line 107... | ||
113 | mov ecx,0x00ffffff ; color of text RRGGBB |
107 | mov edx,0x13ffffff ; color of work area RRGGBB |
114 | mov edx,labeltext ; pointer to text beginning |
108 | mov edi,title ; WINDOW LABEL |
115 | mov esi,lte-labeltext ; text length |
109 | mcall |
116 | int 0x40 |
110 | |
117 | 111 | ||
118 | mov eax,8 ; SEND MESSAGE |
112 | mov eax,8 ; SEND MESSAGE |
Line -... | Line 113... | ||
- | 113 | mov ebx,50*65536+145 |
|
119 | mov ebx,50*65536+145 |
114 | mov ecx,47*65536+13 |
120 | mov ecx,47*65536+13 |
115 | mov edx,2 |
121 | mov edx,2 |
116 | mov esi,0x667788 |
122 | mov esi,0x667788 |
117 | mcall |
123 | int 0x40 |
118 | |
124 | 119 | mov eax,4 |
|
125 | mov ebx,25*65536+50 ; draw info text with function 4 |
- | |
126 | mov ecx,0x000000 |
120 | mov ebx,25*65536+50 ; draw info text with function 4 |
127 | mov edx,text |
121 | mov ecx,0x000000 |
128 | mov esi,40 |
122 | mov edx,text |
129 | newline: |
123 | mov esi,40 |
Line 130... | Line 124... | ||
130 | mov eax,4 |
124 | newline: |
131 | int 0x40 |
125 | mcall |
132 | add ebx,16 |
126 | add ebx,16 |
Line 133... | Line 127... | ||
133 | add edx,esi |
127 | add edx,esi |
Line 134... | Line 128... | ||
134 | cmp [edx],byte 'x' |
128 | cmp [edx],byte 'x' |
Line 159... | Line 153... | ||
159 | db ' Remote address : 192.168.0.2 ' |
153 | db ' Remote address : 192.168.0.2 ' |
160 | db 'Text and address in end of source ' |
154 | db 'Text and address in end of source ' |
161 | db 'x' ; <- END MARKER, DONT DELETE |
155 | db 'x' ; <- END MARKER, DONT DELETE |
162 | end if |
156 | end if |
Line 163... | Line 157... | ||
163 | 157 | ||
164 | labeltext: db 'NetSend(Client)' ; |
- | |
Line 165... | Line 158... | ||
165 | lte: |
158 | title db 'NetSend(Client)',0 |
Line 166... | Line 159... | ||
166 | 159 | ||
167 | remote_ip db 192,168,1,2 |
160 | remote_ip db 192,168,1,2 |