News:

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

Improve _invoke

Started by ecube, April 16, 2007, 10:09:55 PM

Previous topic - Next topic

lingo

Quote"push operand" takes an even smaller part of the sum.

Disagree because:
- Modern CPU can manage 8 or 16 operations in
  two clocks with a throughput of one instruction per clock and really
  speed up code that lends itself well to parallel operations.
  It is true for mov but not for push because :
  2 and more push can`t paralleled (second push can`t execute before increment ESP)

- we can use MMX mov too..

- push reg -> 2  uops
  mov  mem, r -> 1 uops  (see A.Fog)


hutch--

I have split this topic because it shifted in its content. The offshoot is in the Colloseum.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ecube

are there any noticeable limitations with the latest verison of _invoke? can I for example use

     CTEXT MACRO text:VARARG
            local TxtName
              .data
               TxtName BYTE text,0
              .code
            EXITM <ADDR TxtName>
     ENDM

_invoke apifunc,CTEXT("hi")

safely and things of that nature? I want to use _invoke in a indepth project but would like to have a "headsups" on issues to save time on possibly debugging or a broken application.

Vortex

It works :


include \masm32\include\masm32rt.inc
include invoke.inc

CTEXT MACRO text:VARARG
    LOCAL TxtName
    .data
    TxtName BYTE text,0
    .code
    EXITM <ADDR TxtName>
ENDM

.code

start:

    _invoke MessageBox,0,CTEXT("_invoke demo"),CTEXT("Hello"),MB_OK
    _invoke ExitProcess,0

END start

[attachment deleted by admin]