Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, Ayumi, VHX, monarch), 1,161 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: function vs. void [Re: WretchedSid] #451403
05/05/15 16:48
05/05/15 16:48
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Theres a difference between C2 and C3...
C2 is used for stack cleanup for the stdcall/thiscall/fastcall calling conventions because its not done by the caller but by the callee. Depending on the return size it could end up on the stack if its > 4 byte because EAX is 4 byte and cant hold a complete structure which is bigger.
And it would be nice if you could stop acting like you know anything and I nothing. You have actually no Idea what I know and what not so please dont post those comments since you actually write the same with just some more words.

And in short: C3 is the command for "RETN" in assembler written in hex.
You dont have to learn any assembler to code with 3dgs, was just saying that void actually changes the compiler behaviour together with the calling convention.

Last edited by Ch40zzC0d3r; 05/05/15 16:52.
Re: function vs. void [Re: Ch40zzC0d3r] #451404
05/05/15 17:03
05/05/15 17:03
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Ch40zzC0d3r
You have actually no Idea what I know and what not so please dont post those comments since you actually write the same with just some more words.

Except your comments give a good glimpse into the fact that you have no idea what you are talking about. Gamestudio doesn't use the stdcall calling convention, so either you know what you are talking about and chose to deliberately put bullshit down to sound smart, or, well...

Also, you can't return structs in Lite-C. Just saying, cause apparently you think that the result will be on the stack if it is greater than 4 byte. Except there is nothing bigger than 4 byte that you could return and that would end up in an integer register. Double precision floating points are returned on the floating point stack which is 80 byte wide and holds long doubles.

And last but not least, Assembler is not machine code. Assembler has to run through an assembler to turn into machine code, 0xc3 has nothing to do with assembler.

The biggest issue I have is that you say "oh, void is 0xc3 and everything else is 0xc2". In a thread asked in ask Gamestudio. Yeah, that will surely help the beginner asking, amirite? I have nothing against just giving pointers in the right direction, but at least make it possible for someone to find the information they need with your pointer. Being a smartass is alright if you ask me. Just stroking your ego and not adding any value to the discussion is not.

PS: C4 is a plastic explosive that can be triggered with an electrical charge.

Last edited by WretchedSid; 05/05/15 17:09.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: function vs. void [Re: WretchedSid] #451406
05/05/15 17:31
05/05/15 17:31
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
I know lite-c doesnt support this stuff, but when I talk about 3DGS then I usually talk about C++ code because Lite-C is a scripting language in the end.
And yes I sometimes dont offer enough info, that happens when I dont re-read my answers and expect everyone to know the basics

Re: function vs. void [Re: Ch40zzC0d3r] #451407
05/05/15 17:41
05/05/15 17:41
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Ch40zzC0d3r
I usually talk about C++ code because Lite-C is a scripting language in the end.

Cool. Next time you ask about something I will answer you in Haskell since apparently the language doesn't matter. Also, C++ doesn't have a standard defined calling convention, but you'll usually find cdecl. So your 0xc3 and 0xc2 argument is void again.

And Lite-C a scripting language? It's a super stripped down C, alright, but it's not a scripting language.

Last edited by WretchedSid; 05/05/15 17:51.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: function vs. void [Re: WretchedSid] #451412
05/05/15 18:07
05/05/15 18:07

M
Malice
Unregistered
Malice
Unregistered
M



Lol love these combative posts. But to help the newbies can we port them over to a Rants? It floods the thread otherwise.

Just asking,
Mal

Re: function vs. void [Re: WretchedSid] #451414
05/05/15 18:09
05/05/15 18:09
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I have to agree with the Shitlord here. Helping is nice and all but I'd say keep it comparatively simple in programming terms and esp. keep it lite-C related, not C++, not Assembler or anything fancy I've never heard of before.
Everything else will just evoke more confusion and, judging from the past, could in the end lead to more lite-C related rumors.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: function vs. void [Re: Superku] #451424
05/05/15 19:32
05/05/15 19:32
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
REKT checklist
[ ] Not REKT
[x] REKT
[x] REKTangle
[x] SHREKT
[x] REKT-it Ralph
[x] Total REKTall
[x] The Lord of the REKT
[x] The Usual SusREKTs
[x] North by NorthREKT
[x] REKT to the Future
[x] Once Upon a Time in the REKT
[x] The Good, the Bad, and the REKT
[x] LawREKT of Arabia
[x] Tyrannosaurus REKT
[x] eREKTile dysfunction

Last edited by Michael_Schwarz; 05/05/15 19:33.

"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Page 2 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1