News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

atoflt

Started by jimg, February 28, 2024, 11:43:08 AM

Previous topic - Next topic

jj2007

Quote from: jimg on March 05, 2024, 10:54:41 AMslowing down the compile time

I made a series of tests. A simple Windows GUI program of about 100 lines takes:

- about 460 milliseconds to assemble with a minimal set of includes and libraries
- about 460 milliseconds with a simple include \masm32\include\masm32rt.inc
- about 520 milliseconds with include \masm32\MasmBasic\MasmBasic.inc

So the "slowdown" is zero milliseconds for masm32rt.inc and a whopping 60 milliseconds for the MasmBasic library (with currently 520 additional commands) :cool:

jimg

Yes, of course my feelings were from 15 or more years ago hardware.  But I'm still a minimalist at heart :)

NoCforMe

Well, then you'd better remember to include all those little bits and pieces.

15 years ago I would've agreed with you. I find as I get older that I want the machine to remember more and me to have to remember less stuff.
Assembly language programming should be fun. That's why I do it.

Vortex

Hello,

Here is a quick _strtoui64 example :

include     \masm32\include\masm32rt.inc
includelib  ucrt.lib

_strtoui64  PROTO C :DWORD,:DWORD,:DWORD

.data

str1        db '65536',0
str2        db 'Value returned by'
            db '_strtoui64 : %u',0

.data?

.code

start:

    invoke  _strtoui64,ADDR str1,\
            0,10

    invoke  crt_printf,ADDR str2,eax

    invoke  ExitProcess,0

END start

jimg

Thanks erol.

I'm not clear on the difference between strtoui64 and strtoull, that is I'm not sure what the difference between the output, "unsigned __int64"  and  "unsigned long long" is, and which one I should use when.

TimoVJL

Quote from: jimg on March 07, 2024, 01:01:22 AMThanks erol.

I'm not clear on the difference between strtoui64 and strtoull, that is I'm not sure what the difference between the output, "unsigned __int64"  and  "unsigned long long" is, and which one I should use when.
Both means same, 64bits long and long long is from newer standard C99 and __int64 is not standard C msvc private type.
May the source be with you

jimg

So it doesn't matter which one I use.  I'm not chunking vast amounts of data, so no need to run timing tests between the two.