Re: Unsigned 32 bit

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 09/25/04

  • Next message: john andrew: "modifying data in a grid ajt"
    Date: Sat, 25 Sep 2004 02:28:32 -0400
    
    

    I'm reading through a MASM manual dated from 1992.

    I'm reading stuff about implicit and explicit loading and
    such... My goal is to compile the information you've
    provided into a DLL. This is my first time working with
    assembly to compile a DLL. I'm working with MASM
    6.15.8803.

    I'm not sure how much of this MASM Programmer's Guide
    applies to Win2K/WinXP. I believe most things conform
    to a C style parameter passing, but the MASM book is
    providing:

    DLLEntry PROC FAR PASCAL PUBLIC ;Entry point for DLL
    ...
    DLLEntry ENDP

    It refers to Windows 3.0 :-). If I can get some help in
    the way of some explanations about the calling conventions,
    that would be great. Some general comments about it.

    What I've configured so far is...
    http://www.microcosmotalk.com/library/files/AddLng.asm

    The text in the book mentions PASCAL, and I changed it
    from PASCAL to C. Thanks for your time and troubles.

    --
    Jim Carlock
    Post replies to the newsgroup.
    "Galen Somerville" wrote:
    "Jim Carlock" wrote:
    > I'm looking through some TypeLib stuff at the moment,
    > using the MIDL compiler. I've looked over some things
    > already involving the converting to four bytes and
    > putting into a Type declaration... that's not what I'm
    > looking to achieve though. I'm looking for a way to
    > create an REAL unsigned 32-bit and 64-bit type,
    > where CDec(), CLng() and such don't have to be
    > used. And if that can be achieved, the next goal
    > would be to overload the +, -, / and other operators.
    >
    > I want to avoid using the type casting functions, Cxxx(),
    > maybe create a Cui4() or Cui8().
    >
    > Some of the things I've already looked through:
    >
    >
    Public Declare Sub LNGADD Lib "ARYASM" (ByVal lngQuan As Long, _
        ByRef lngDest As Long, ByRef lngFirst As Long, _
        ByRef lngSecond As Long, ByRef gbytError As Byte)
    Private Sub AddLng_Click()
    Dim Value As Long, Temp As Long, Msg As String, Max As Long
        ReDim lngDest(4)
        ReDim lngFirst(4)
        ReDim lngSecond(4)
        Value = 99992
        For Index = 0 To 4
            lngFirst(Index) = Value
            lngSecond(Index) = Index + 5
        Next Index
        lngQuan = 5
        Call LNGADD(lngQuan, lngDest(0), lngFirst(0), lngSecond(0), _
            gbytError)
        If gbytError = 1 Then Msg = "Overflow occurred"
        For Index = 0 To 4
            Temp = lngDest(Index)  'So you can see in debug
        Next Index
    End Sub
    I'm not shouting. That's just the way the routine was written. If you want
    the ARYASM dll let me know
    Galen
    

  • Next message: john andrew: "modifying data in a grid ajt"

    Relevant Pages

    • Re: Unsigned 32 bit
      ... > I'm reading through a MASM manual dated from 1992. ... > assembly to compile a DLL. ... I'm working with MASM ... > ByRef lngDest As Long, ByRef lngFirst As Long, _ ...
      (microsoft.public.vb.general.discussion)
    • Re: Unsigned 32 bit
      ... "Jim Carlock" wrote: ... > assembly to compile a DLL. ... I'm working with MASM ... ByRef lngDest As Long, ByRef lngFirst As Long, _ ...
      (microsoft.public.vb.general.discussion)
    • Re: Create assembly obj to link with Windows objs
      ... >Using MASM 5.1 and 6.x, I am able to compile and create an obj file. ... So, assuming that you really do have 16-bit MASM code, your choices are ...
      (comp.lang.asm.x86)
    • Re: MASM as an addition to the VC Express edition now available
      ... What you have said does not match the enclosed EULA for MASM version ... either your own business or to sell. ... MASM to compile the program and then sells this program, ...
      (alt.lang.asm)
    • Re: Localized Parameter Directive?
      ... Jim Carlock wrote: ... > Using RadASM which in turn is using MASM to compile. ...
      (alt.lang.asm)