News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

call instead of invoke!

Started by LAS3R, February 12, 2005, 04:57:15 PM

Previous topic - Next topic

LAS3R

call me dumb or whatever but i don't see answer hehe, all i understand so far is that u explained that invoke, whatever, ebx, eax, ecx is same as

push ecx
push eax
push ebx
call whatever

i like invoke more beacuse i can put all on same line instead of 4 lines as above, wich in end make code very big read and hard understand

but found patch that change masm syntax from invoke, whatever, ebx, eax, ecx to just whatever, ebx, eax, ecx , and that's not really what i want either hehe, just want old nice call "word" back but still same invoke function with addr instead of offset such!

i think i explained bit bad in my first post, hope this one is better!

pbrennick

LAS3R,
The difference betweem addr and offset is addr is using in local declarations (within the procedure) and offset is used for global declarations.

At this point I really don't have any idea WTF you want.

Paul

BogdanOntanu

In TASM you can simply say

Call Message_Box,param1,param2,eax,ebx,offset my_string,[edx],[esi.structure.item]
and so on ... basically just like  invoke in MASM but using Call instead (as a keyword)

The call in TASM is better than invoke in MASM because you can use variables and structures defined after the call statement. This is because call statement is internal to TASM and support multiple passes unlike a macro like invoke.

I guess that is what he has saw somewhere in some TASM source code and now he is begging for that.
But mASM is using invoke and that is that... he somehow has a problem understanding this ;)
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

LAS3R

paul lol , calm down :P


all i want is change word invoke to call in masm, somehow ,either by hex editing masm or changing inc file what ever need to do, so anyone know how i shall do it???

:U

pbrennick

Just use invoke and stop driving us nuts.  I for one am done with this thread.

Paul

LAS3R

lol, np using invoke!


just wanted know if was possible  :U

pbrennick

LAS3R,
Glad to hear it.  Some questions are hard for me to relate to, I have been around longer than most everybody here and sometimes it is hard to view a problem from the eyes of a beginner.  I am glad you are being good natured in the face of my gruffness.

Paul

LAS3R

np mate hehe, infact u should have medallion for even trying to understand what i asked, not sure i really understood now that i read it myself  :green2

Kestrel


hutch--

Kestrel,

You are a little behind the times, after Manhattan shared the info around, enough people have passed feedback to Microsoft to get this result.

http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=db4193d3-14fa-49dc-84e5-f06089b7e496
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Alloy

That's scary not seeing that Microsoft knows the low level advantages and uses of their own tools.
We all used to be something else. Nature has always recycled.

pbrennick

They were evidently misinformed and this reversal is the result of what I have recently viewed as a willingness to listen to others and follow their suggestions.  As a professional with a stubborn pride in my own work, I know how difficult this can be.  Even though I have always had a high level of respect for Microsoft and its people, this has only caused it to reach a new plateau and I feel the need to vocalize it.  I also would like to thank Manhattan for looking out for us, and of course, Hutch, what can I say.  Most if not all of the success of the rebirth of assembly, a language I fell in love with before any other language was available is something Hutch is directly responsible for. <NOT Betov>  And all the user base has gone to make a very positive reinforcement for everything Hutch has done.  Thanks to you ALL!

Paul

<I probably should move this to the soap box, sorry, I want to make sure it gets seen.>

AeroASM

LAS3R:

You could make a macro. Check the source code in \masm32\examples\EXAMPLE5\SCALL
Or you could make an app that searches for any call's and replaces them with invoke's, before getting ml to assemble it.

pbrennick

LAS3R,
Even though it is difficult to use the word 'call' to replace 'invoke', you can use 'calll'

        .386
        .model  flat, stdcall
        option  casemap:none
;
        include \masm32\include\windows.inc
        include \masm32\include\kernel32.inc
        include \masm32\include\user32.inc
;
        includelib  \masm32\lib\user32.lib
        includelib  \masm32\lib\kernel32.lib
;
calll   equ invoke
;
.data
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
caption db  'Hello World!', 0
message db  'Hello World!', 0
;
.code
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
start:
        calll   MessageBox, 0, ADDR message, ADDR caption, MB_OK
        calll   ExitProcess, 0
        end     start


Unfortunately, in masm, reserved words are case insensitive or there would be a better solution.

Paul

MichaelW

I don't really understand why anyone would want to do this, but it is possible...

        .386
        .model  flat, stdcall
        option  casemap:none
;
        include \masm32\include\windows.inc
        include \masm32\include\kernel32.inc
        include \masm32\include\user32.inc
;
        includelib  \masm32\lib\user32.lib
        includelib  \masm32\lib\kernel32.lib
;
option nokeyword:<call>
call   equ invoke
;
.data
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
caption db  'Hello World!', 0
message db  'Hello World!', 0
;
.code
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
start:
        call    MessageBox, 0, ADDR message, ADDR caption, MB_OK
        call    ExitProcess, 0
        end     start
eschew obfuscation