flat assembler
Message board for the users of flat assembler.

Index > Windows > help proc params.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1853
Roman 11 Jan 2016, 19:41
My proc:
Code:
proc Pr1 Name : DWORD, Param : i need 64 bytes !!!
endp
    


I need size Param = 64 or more (128 bytes), how do this ?
Post 11 Jan 2016, 19:41
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1853
Roman 12 Jan 2016, 10:07
struct MyStr
x dd 0
y dd 0
z dd 0
flag dd 0
op1 dd 0
op2 dd 0
ends
i mean Param : MyStr
Post 12 Jan 2016, 10:07
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1403
Location: Piraeus, Greece
Picnic 12 Jan 2016, 14:32
Pass a pointer to a MyStr structure.
Code:
stdcall Pr1, arg, MyStr1
    

Make a local copy of structure.
Code:
proc Pr1 Name : DWORD, Param : DWORD

  local mystr : MyStr

  ; mystr = Param  
  mov esi, dword [Param] 
  lea edi, dword [mystr] 
  mov ecx, sizeof.MyStr
  cld
  rep movsb
  
  ;
  ;

  ret
endp 
    

Excuse me if I get it wrong what you ask.
Post 12 Jan 2016, 14:32
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1853
Roman 13 Jan 2016, 06:09
Thanks Picnic.
I understand.
For Proc maximum QWORD size for one argument.
Thi is might be pointer to any data\struct.
Post 13 Jan 2016, 06:09
View user's profile Send private message Reply with quote
jiangfasm



Joined: 08 Mar 2015
Posts: 60
jiangfasm 19 Jan 2016, 16:09
proc Pr1 Name : DWORD, Param : qword
endp

Are you writing win32 program?
Post 19 Jan 2016, 16:09
View user's profile Send private message Visit poster's website 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.