flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > fasm not support "addr"

Author
Thread Post new topic Reply to topic
skykrnl



Joined: 17 Nov 2008
Posts: 21
skykrnl
fasm not support "addr"

Code:
include 'Win64A.inc'
proc Function, _String
        local   TempStr[1024]:BYTE
      invoke  lstrcpy, addr TempStr, [_String]
    ret
endp
    
Post 28 Jun 2009, 06:53
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Yes, addr comes with win32ax.inc but there is no win64ax.inc...

The solution for this particular code would be the following:
Code:
proc Function, _String
        local   TempStr[1024]:BYTE

        lea     rdx, [TempStr]
        invoke  lstrcpy, rdx, [_String]
        ret
endp    
Post 28 Jun 2009, 15:50
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Loco: Are you sure about that one? Wink
Post 28 Jun 2009, 19:05
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
skykrnl



Joined: 17 Nov 2008
Posts: 21
skykrnl
LocoDelAssembly wrote:
Yes, addr comes with win32ax.inc but there is no win64ax.inc...

The solution for this particular code would be the following:
Code:
proc Function, _String
        local   TempStr[1024]:BYTE

        lea     rdx, [TempStr]
        invoke  lstrcpy, rdx, [_String]
        ret
endp    
Post 29 Jun 2009, 01:50
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

Loco: Are you sure about that one?

Actually not Very Happy.

I forgot that on Win64 registers are used to pass parameters when I posted that reply. However, haven't I provided the right answer by coincidence? (And note that it wasn't general solution, just for this particular code)
Post 29 Jun 2009, 14:30
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.