Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (AndrewAMD, fogman, Grant, juanex), 972 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Intel Assembly in GCC? #373287
06/08/11 23:33
06/08/11 23:33
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Hi,

I'm porting a 3D game engine of mine from WinAPI to SDL. I originally wrote this engine in C for Windows with the OpenWatcom compiler, and I'm now writing this port on Debian Linux with GCC. My original game engine resorted to inline assembly code on a few occasions to give me more control over the mixing of 24bit colors. Anyway this code is Intel assembly and after only a few minutes of looking my first impression is that GCC can only handle AT&T/UNIX assembly code.

So, is it at all possible to get GCC to read Intel assembly code? I would prefer not to have to convert this code back to C, and I really do not want to try and learn UNIX assembly code.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Intel Assembly in GCC? [Re: Redeemer] #373290
06/09/11 00:05
06/09/11 00:05
Joined: Mar 2002
Posts: 1,774
Magdeburg
F
FlorianP Offline
Serious User
FlorianP  Offline
Serious User
F

Joined: Mar 2002
Posts: 1,774
Magdeburg
I dont think you can get GCC to eat up Intelasm...not without huge effort anyway

But as far as I remember theres only one real difference between intel and at&t - you have to swap the source and destination adresses.

Last edited by FlorianP; 06/09/11 00:07.

I <3 LINQ
Re: Intel Assembly in GCC? [Re: FlorianP] #373291
06/09/11 01:15
06/09/11 01:15
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Well, this sucks. Turns out there are a lot of differences between Intel asm and AT&T asm. I still don't care to learn at&t asm.




Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Intel Assembly in GCC? [Re: Redeemer] #373303
06/09/11 09:57
06/09/11 09:57
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Rewrite GAS, the GCC sends your assembly code right away to GAS so thats the point you need to change.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Intel Assembly in GCC? [Re: WretchedSid] #373309
06/09/11 12:32
06/09/11 12:32
Joined: Mar 2002
Posts: 1,774
Magdeburg
F
FlorianP Offline
Serious User
FlorianP  Offline
Serious User
F

Joined: Mar 2002
Posts: 1,774
Magdeburg
Really?
Since when does GAS support intelsyntax?
Seems im a bit out of date here...


I <3 LINQ
Re: Intel Assembly in GCC? [Re: FlorianP] #373311
06/09/11 12:41
06/09/11 12:41
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
No it doesn't, but if Redeemer wants support for the intel syntax, he has to change GAS and not the GCC.
But I agree, Intel and AT&T syntax is pretty similar, except of the swapped source and destination and the % that AT&T requires.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com

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