How to compile the following into a DLL?

From: Jim Carlock (spamtrap_at_crayne.org)
Date: 09/25/04

  • Next message: Chewy509: "Re: Help Wanted : Protected mode console input and output routines library"
    Date: Fri, 24 Sep 2004 23:40:31 +0000 (UTC)
    
    

    The code is as follows... it's supposed to be put into
    a dll, and the dll is supposed to be able to be registered,
    and useable from VB.

    My ultimate goal is to be able to provide some Unsigned
    32 and 64 bit numbers to the VB6 IDE. Any suggestions
    or hints would be great!

    ;this adds two long arrays and places in third array
    LngAdd proc stdcall uses edx ecx esi edi ebx eax,
    nquan:dword,ndest:dword,nwrd1:dword,nwrd2:dword,nbyte:dword
     mov ecx,nquan ;# to do
     mov ebx,ndest ;dest address
     mov edi,nwrd1 ;first array address
     mov esi,nwrd2 ;second array address
     mov nbyt,00h
    next: mov eax,[edi]
     add eax,[esi]
     jno okay ;jmp if no overflow
     mov nbyt,01h ;set flag
    okay: mov [ebx],eax
     add esi,4
     add edi,4
     add ebx,4
     loop next
     mov edi,nbyte
     mov al,nbyt
     mov [edi],al ;ret flag
     ret
    lngadd endp

    -- 
    Jim Carlock
    http://www.microcosmotalk.com/
    Post replies to the newsgroup.
    

  • Next message: Chewy509: "Re: Help Wanted : Protected mode console input and output routines library"

    Relevant Pages

    • Re: getting offset of the value instead of the value
      ... program that has a "graph" feature in it. ... column will be loaded from the array. ... PUSH BX ... MOV BX, 440 ...
      (comp.lang.asm.x86)
    • Why does this array send garbage to the screen?
      ... array db 0,0,0,0,0; Array of five integers initialized to 0. ... After moving the array to the line immediately after "jmp ... PUSH AX; store registers... ... MOV AH, 0Eh; teletype function. ...
      (comp.lang.asm.x86)
    • getting offset of the value instead of the value
      ... program that has a "graph" feature in it. ... column will be loaded from the array. ... PUSH BX ... MOV BX, 440 ...
      (comp.lang.asm.x86)
    • Re: Array Usage
      ... invoke GetWindowRect,hDlg,addr rect ... ;save all the handles in an array for the hook ... mov ebp,addr hHandleArray ... inc ecx ...
      (comp.lang.asm.x86)
    • MASM: Array Usage
      ... invoke GetWindowRect,hDlg,addr rect ... ;save all the handles in an array for the hook ... mov ebp,addr hHandleArray ... inc ecx ...
      (comp.lang.asm.x86)