News:

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

Main Menu

scanf macro and printf macro

Started by stevenxie, November 14, 2020, 11:53:04 PM

Previous topic - Next topic

TouEnMasm

Sorry but it is write with UASM and his prototypes are modern (Windows SDK prototypes translated) ,not old (you need to invert your affirmation).
The old are those you have made (hutch proto) for ML64 who accept this prototypes without controling of the arguments.
Microsoft have done ML64 to replace the inline assembler of the C++.
That is something very limited in memory,and more...and bugged
The new couldn't be no verify of the arguments passed by the prototypes.
A compiler need to verify the human work.
The prototypes you have write for ml64 don't allow any verify of the arguments (there is one case where ml64 could verify arguments with modern proto).
That is dinosaure prototypes not new. :joking: (to be more exact ,machine proto first level of library)





Fa is a musical note to play with CL

hutch--

ML64 is for assembler programmers with enough experience to use it, hand holding belongs to the past. ML64 with 64 bit MASM is already application capable, I wonder why we don't see working applications from other "civilised" assemblers ?

You probably should stick to UASM where they need a comprehensive collection of prototypes, 64 bit MASM does not need them.

TouEnMasm


Ok,prototypes are useless and verify the writing is also useless,I will return perhaps to binary code
1010111
1110011
That was enough for today. :thumbsup:

Fa is a musical note to play with CL

hutch--

Yves,

You can go high level, write the code in HEX.

jj2007

Quote from: TouEnMasm on November 22, 2020, 03:34:39 AM
Ok,prototypes are useless

Absolutely useless! Only Bill Gates knows why they invented them. Real menTM don't need that type checking crap as in C/C++, they count and check their arguments by hand - push push push in 32-bit code, mov rdx, xxx in 64-bit code :cool:

Vortex

The Solar Assembler and Flat Assembler does not need prototypes.

daydreamer

Quote from: Vortex on November 22, 2020, 06:55:17 AM
The Solar Assembler and Flat Assembler does not need prototypes.
in old ml I seen invoke something that is below needs proto,but when its just make PROC without any arguments,using call works without proto

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

Vortex

Hi daydreamer,

Here is another invoke macro implementation declaring the external functions. While it does not use prototypes, you need to be careful to specify the ANSI\UNICODE version of the API functions.

jj2007

With 64-bit Assembly, I always use jinvoke (no PROTOs btw) :tongue:

jinvoke CreateWindowEx, WS_EX_CLIENTEDGE, Chr$("RichEdit20A"), NULL,\
reStyle, 0, 0, 1, 1, hWnd, ID_EDIT, wcx.hInstance
mov hEdit, rax ; you may need this global variable for further processing
xchg rax, rbx ; use a persistent register for the handle
jinvoke SendMessage, rbx, WM_SETTEXT, 0, MyR4

Tmp_File.asm(31) : Error A2114: forced error: ## not enough arguments for CreateWindowEx ##
** Warning, line 35: passing a REAL4 may not work **


Oops, it seems I forgot the lParam - what a lousy coder I am :sad:

hutch--

 :biggrin:

We have all heard this sobbing before, ML clone users have problems with real low level assembler, they don't know how to count and want the assembler to do it for them. Who cared about the documentation where you need to be able to read, the assembler should be able to do it for them.

Do you need the author of the assembler to hold your hot little hand and lead you through the complexities of something that you are too dumb to comprehend when you could be using PHP or JAVA or a nice soft script kiddie's script language instead of a nasty professional tool that bites the hand that feeds it ?

You don't need a tool that is sharper than a razor blade when you could be using a nice soft easy powder puff designed for server side scripting. There is a big wide wonderful world out there where you can write garbage like the rest and feel profound about it.  :tongue:

hutch--

 :biggrin:

You can tell the men from the boys by the paper they use. Large sheet of xxxx grade sand paper hanging off a nail in the loo.  :badgrin:

TouEnMasm

Quote
We have all heard this sobbing before, ML clone users have problems with real low level assembler, they don't know how to count and want the assembler to do it for them. Who cared about the documentation where you need to be able to read, the assembler should be able to do it for them.
Human (including Hutch) are just ridiculous when they count in place of a machine.The machine just do about 1 million of calculations by second when the human haven't just started.
But if it is your pleasure to count each jump instead of let's it done by the machine,do it.
Fa is a musical note to play with CL

jj2007

No, Yves, Real MenTM don't need to count the arguments, and they don't produce bugs! The others can go for C/C++, where argument counting and type checking is, of course, obligatory :cool:

@Yves: Perhaps we could register at a C++ forum, and try to convince them that type checking is not necessary, what do you think? We might become very popular, even famous :mrgreen:

TouEnMasm

Buffoon or REAL men ,keep your sentance for you .


Fa is a musical note to play with CL

hutch--

He he, their is a wonderful wide world out there where the authors hold your hot little hand and you don't have to play with nasty things like professional tool that already deliver applications that work. You know the line about XXXX grade sandpaper in the loo. In a world where programmers can't count and can't read the reference material, you always have server side scripting to feel profound about.  :tongue:

Try this but beware, you have to know how to count and read at the same time.

invoke SendMessage, \       ; the function read from the reference material
            hWhatever, \    ; number 1
            WM_COMMAND, \   ; number 2
            100, \          ; number 3
            0               ; number 4

Difficult isn't it ?

Now doesn't someone holding you poor hot little hand look so much easier ?