Can someone translate this into Masm? I have a program to send mail messages, Messages are first put into my "Outbox". Then it should check if the computer is online, if so, send. If not, then wait and keep checking. I came across this code. But it is in Tasm style and does not work for me. If anyone could please translate, i'll be thankful! Thank you. -J44

; --- code starts here ---

localhostname db 256 dup (0)
localhostnamelen EQU $-offset(localhostname)

        push    localhostnamelen     	; Check if there's an internet
        push    offset localhostname 	; connection : get the local hostname,
        call    gethostname          	; do a call to gethostbyname, then
        or      eax, eax             	; read out hostent structure to compare
        jnz     WaitForConnection    	; IP # with
        push    offset localhostname 	; 
        call    gethostbyname
        or      eax, eax
        jz      WaitForConnection    	; on error : try again
        push    eax                     ; read out hostent structure in a clean way
        mov     eax, dword ptr ds:
        mov     ebx, dword ptr ds:
        pop     eax
        add     eax, 4
        cmp     ebx, 0
        jnz     @@1
        add     eax, 4
        mov     eax, ds:
        mov     eax, ds:
        mov     eax, ds:
        cmp     eax, 0100007Fh  	;
        jnz     SendOutGoingMail

        push    10000d               	; 10 sec. Delay
        call    Sleep

        jmp     WaitForConnection    	; if IP# = : try again (wait)

Posted on 2001-05-22 17:42:00 by Jumpsteady44

 what is there to convert???
 that looks like MASM code to me.
Posted on 2001-05-27 09:42:00 by disease_2000