NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on January 12, 2005, 07:32:54 PM

Title: Newbie Question - How to make this DLL
Post by: nobody on January 12, 2005, 07:32:54 PM
I've got the NASM... I need to download all the files to compile this DLL (Windows.Inc, etc.) but i dont know where...
Can somebody make a steep-to-steep to make the dll??? Thanks! :(


--- CODE ---
%define _WINALL_
%include "Include\Windows.inc"

extern _send@16

[BITS 32]
[section .text]

procglobal DllMain, hinstDLL, fdwReason, lpvReserved
   LibMainPrologue
   mov   eax, 1
   LibMainEpilogue
endproc

procglobal SetKernelMaxUsers, _MaxUsers, _XMaxMapSize, _YMaxMapSize
   mov eax, ._MaxUsers
   mov [MaxUsers], eax
   mov eax, ._XMaxMapSize
   mov [XMaxMapSize],  eax
   mov eax, ._YMaxMapSize
   mov [YMaxMapSize],  eax
endproc

;--------------------------------------------------------------------------------------------------------------
;Esta funcion corta el campo especificado en _Pos con el separador _SepASCII sobre el string que esta en _Text.
;--------------------------------------------------------------------------------------------------------------
procglobal ReadFieldASM, _Pos, _Text, _SepASCII
   push ebx
   push ecx
   push edx
   push esi
   push edi

mov ecx, ._Pos
   mov ebx, ._SepASCII
   mov esi, ._Text
   mov edi, ReadFieldOutPut
   dec ecx
   jz NoFieldError1
   jc FieldError
NoFieldError:
   lodsb
   test al, al
   je FieldError
   cmp al, bl
   jnz NoFieldError
   dec ecx
   jnz NoFieldError
NoFieldError1:
   lodsb
   test al, al
   je FieldError
   cmp al, bl
   je FieldError
   stosb
   jmp NoFieldError1
FieldError:
   sub edi, ReadFieldOutPut
   mov [ReadFieldOutPutLen], edi
   mov eax, ReadFieldOutPut

pop edi
   pop esi
   pop edx
   pop ecx
   pop ebx
endproc
;*************************************************************************

;-------------------------------------------------------------------------------------
;Env
Title: Re: Newbie Question - How to make this DLL
Post by: nobody on January 12, 2005, 07:34:44 PM
There's an error in the code, please delete:
mov eax, ._XMaxMapSize
mov [XMaxMapSize], eax
mov eax, ._YMaxMapSize
mov [YMaxMapSize], eax

Thanks ;)....
Title: Re: Newbie Question - How to make this DLL
Post by: Frank Kotler on January 12, 2005, 08:48:18 PM
Try the NaGoA package. I'm not sure it's the exact include file you quote (I don't think so), but it's the most commonly used one, and should give you some information you can use.

http://www.visual-assembler.pt.vu/ (http://www.visual-assembler.pt.vu/)

Best,
Frank
Title: Re: Newbie Question - How to make this DLL
Post by: nobody on January 13, 2005, 02:26:32 PM
Thanks Frank but i need the "Windows.Inc" :(... Can somebody Help Me?

Bye!