generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

VC++ generating crap

Previous Thread :: Next Thread 
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
28 Apr 2016 03:13 AM
It's not compiling functions correctly, it's generating __stdcall/__fastcall or some sht which makes no sense considering I told the compiler to use __cdecl (passed /Gd) and I'm still getting idiotic crap like:

func:
push ebp
mov ebp,esp
push esi
push edi
mov edi,edx
mov esi,ecx
.. random crap ..

Obviously the parameters are being passed in ecx/edx for some reason which makes no sense in cdecl some1 help
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
28 Apr 2016 03:18 AM
not quite sure what you are doing
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
28 Apr 2016 03:18 AM
stop


#code R+ | local RAP = "R$450,331"; local robux = "R$6,020"
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
28 Apr 2016 03:27 AM
stop? lmao dude I searched forever on google and even called a damn microsoft employee (apparently I have to pay now) and got nothing.

I can't just use a diff. compiler because I have too much inline asm and gcc/g++'s is way different (and uglier) and also not sure how to compile & link -> DLL in gcc/g++.
Report Abuse
GetTheJobDone is not online. GetTheJobDone
Joined: 20 Apr 2016
Total Posts: 3008
28 Apr 2016 03:34 AM
I understand that code enough but I have nooooo idea what your problem even means


Report Abuse
GetTheJobDone is not online. GetTheJobDone
Joined: 20 Apr 2016
Total Posts: 3008
28 Apr 2016 03:37 AM
I also forget why you move esp to ebp in functions but I know that you do...something to do with the stack I think? God I really need to do more assembly and remember what I forgot.



Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
28 Apr 2016 03:39 AM
It's the wrong calling convention, I specified cdecl and I'm not getting that. Arguments are not passed in registers in cdecl, in the code I gave you above there are parameters passed from the caller into edx and ecx
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
28 Apr 2016 03:52 AM
so then why are you trying to make your own compiler?

std: is c++, but you should not have errors.
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
28 Apr 2016 03:55 AM
I'm not writing my own compiler, and I don't see how the std namespace has anything to do with this.
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
28 Apr 2016 04:14 AM
nevermind, i just realized you never ended your function.
I have not seen asembly language, before so thats why I was confused at first, but after looking at a few examples, they all have end points to their functions. You do not.
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
28 Apr 2016 04:18 AM
I also highly recommend to use linux + nasm assembly programming language.
And simply use the gcc compiler.
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
28 Apr 2016 11:29 AM
Did you even read the thread I'm not having a problem writing assembly, I'm having a problem with the code generated from VC++, this is obviously not the whole function, "the other crap..." should imply to you that there is more code that is not relevant to the problem I'm having.
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
28 Apr 2016 12:13 PM
Yeah it looks like it is definitely using __fastcall which is weird considering I set the default conv. to __cdecl.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image