1,9 → 1,9 |
; |
; NetSend(Client) |
; |
; |
; ¢â®à: Hex |
; ©â: www.mestack.narod.ru |
; |
; |
; ¯¨á ¨¥: |
; à®£à ¬¬ ¤«ï ®¡¬¥ á®®¡é¥¨ï¬¨ ¢ á¥â¨.«¨¥â᪠ï ç áâì. |
; |
10,12 → 10,12 |
; Compile with FASM for Menuet |
; ®¬¯¨«¨àã¥âáï FASM'®¬ ¤«ï ¥ãíâ |
; |
|
|
|
|
use32 |
|
|
org 0x0 |
|
|
db 'MENUET01' ; 8 byte id |
dd 1 ; header version |
dd START ; program start |
23,12 → 23,12 |
dd mem ; required amount of memory |
dd mem ; stack pointer |
dd 0, 0 ; param, icon |
|
|
include 'lang.inc' |
include '..\..\..\macros.inc' |
|
include 'macros.inc' |
|
START: ; start of execution |
|
|
mov eax,53 ; open socket |
mov ebx,0 |
mov ecx,0x4000 ; local port |
35,14 → 35,14 |
mov edx,0x5000 ; remote port |
mov esi,dword [remote_ip] ; node IP |
mcall |
|
|
mov [socketNum], eax |
|
red: |
red: |
call draw_window ; at first, draw the window |
|
|
still: |
|
|
mov eax,10 ; wait here for event |
mcall |
|
55,11 → 55,11 |
mov al,2 |
mcall |
jmp still |
|
|
button: |
mov al,17 |
mcall |
|
|
dec ah ; button id=1 ? |
jnz noclose |
mov eax, 53 |
76,7 → 76,7 |
;; SEND CODE TO REMOTE ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
send_xcode: |
|
mov eax,53 ; SEND CODE TO REMOTE |
87,28 → 87,28 |
mcall |
|
jmp still |
|
|
|
|
; ********************************************* |
; ******* WINDOW DEFINITIONS AND DRAW ******** |
; ********************************************* |
|
|
|
|
draw_window: |
|
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
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+150 ; [y start] *65536 + [y size] |
mov edx,0x13ffffff ; color of work area RRGGBB |
mov edx,0x14ffffff ; color of work area RRGGBB |
mov edi,title ; WINDOW LABEL |
mcall |
|
|
|
|
mov eax,8 ; SEND MESSAGE |
mov ebx,50*65536+145 |
mov ecx,47*65536+13 |
115,7 → 115,7 |
mov edx,2 |
mov esi,0x667788 |
mcall |
|
|
mov eax,4 |
mov ebx,25*65536+50 ; draw info text with function 4 |
mov ecx,0x000000 |
127,17 → 127,17 |
add edx,esi |
cmp [edx],byte 'x' |
jnz newline |
|
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
mcall |
|
|
ret |
|
|
|
|
; DATA AREA |
|
if lang eq ru |
|
if lang eq ru |
text: |
db ' ®á« âì á®®¡é¥¨¥ ' |
db ' ' |
153,16 → 153,16 |
db ' Remote address : 192.168.0.2 ' |
db 'Text and address in end of source ' |
db 'x' ; <- END MARKER, DONT DELETE |
end if |
|
end if |
|
title db 'NetSend(Client)',0 |
|
|
remote_ip db 192,168,1,2 |
|
|
send_data db 'ਢ¥â,íâ® â¥áâ!Hello,this is a test!' |
end_message: |
|
|
|
I_END: |
align 4 |
socketNum dd ? |