Re: Unsigned 32 bit

From: J French (erewhon_at_nowhere.com)
Date: 09/25/04


Date: Sat, 25 Sep 2004 08:46:56 +0000 (UTC)

On Fri, 24 Sep 2004 14:20:48 -0400, "Jim Carlock"
<anonymous@127.0.0.1> wrote:

>1) Any suggestions about creating a true UInt32 or UInt64?
>
>Fuction AddUInt(ByVal ui32_1 As UInt32, ByVal ui32_2 As UInt32) As UInt32
> AddUInt = ui32_1 + ui32_2
>End Function

You can make a very nice unsigned Long out of a Currency
- provided you do not want 'overflow'

I see you are dabbling with MASM
- take a look at : http://www.masm32.com

Another way is to use Delphi which includes the data types you want,
and also has inline ASM

One word of warning (from reading your later posts) be very careful
about changing 'PASCAL' to 'C' in any calling conventions.

VB uses StdCall which is right to left pushing of parameters with the
callee cleaning the stack

Older BASICs used Pascal as the convention, Left to Right with the
callee cleaning up the stack

The standard 'C' uses right to left, but the /caller/ cleans the stack

Old books are rather dangerous



Relevant Pages

  • RE: Calling convention
    ... For calling conventions, cleaning stack means remove parameters info from ... I will explain cdecl, ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Calling convention
    ... For calling conventions, cleaning stack means remove parameters info from ... Microsoft Online Community Support ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.dotnet.framework.interop)
  • Re: GCC front-end for FORTH?
    ... more or less the same as generating C from Forth and then compiling ... No, of course not, but Java's stack is local to the function, and Java ... and the particular calling conventions. ... I guess this question amounts to "is it possible to stop the back-end ...
    (comp.lang.forth)
  • Re: Making C better (by borrowing from C++)
    ... This means that the called function cleans up the ... >> stack, i.e. adds to the stack before returning the space allocate ... different calling conventions automatically. ...
    (comp.lang.c)
  • Re: Parameter Overflow Attack?
    ... >:pushed on to the stack in reverse order, ... However, in my defence, I was using the term "standard C calling ... The SGI ABI provides the same resiliance against too many parameters as ... what I described as the standard C calling conventions. ...
    (comp.security.misc)