Assembly

New to FreeBASIC? Post your questions here.
Post Reply
etko
Posts: 113
Joined: May 27, 2005 7:55
Location: Slovakia
Contact:

Assembly

Post by etko »

Can someone provide me with simple asm howto?

What are differencies between FB assembler and Intel assembler? My assembler of choice is Netwide assembler which I think is the most powerful and representative free 32-bit Intel assembler, so by its syntax I understand Intel syntax. After finding some info about AS on net I have soup in my head. Does or doesn't it support Intel notation (like netwide does for mov ax,bx) and are instruction semantics same like in Intel ore they change to at&t style -> cbtw from cbw?
jdebord
Posts: 547
Joined: May 27, 2005 6:20
Location: Limoges, France
Contact:

Post by jdebord »

FreePascal has a switch to choose between Intel and ATT syntax in in-line assembly. Since it uses AS, too, this could also be possible in FB.
Sterling Christensen
Posts: 142
Joined: May 27, 2005 6:13

Post by Sterling Christensen »

AS can do both AT&T and Intel. FreeBASIC uses AS's dialect of Intel syntax assembler.

So don't worry, you can forget all the crazy AT&T syntax stuff.
etko
Posts: 113
Joined: May 27, 2005 7:55
Location: Slovakia
Contact:

Post by etko »

So thank you, I will give it try as soon as I can, and yes AT&T seems crazy to me too, god bless Intel, in this ccase ;).
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re:

Post by marcov »

jdebord wrote:FreePascal has a switch to choose between Intel and ATT syntax in in-line assembly. Since it uses AS, too, this could also be possible in FB.
(A slightly late reply because it bubbled up due to searchengine problems, but no. FPC parses both Intel and AT&T fully, and then always generates AT&T from that for GAS. This was originalyl done for pascal<->asm cooperation, but has the convenient sideeffect of not being too particular which assembler is used.

If it uses AS at all. For most popular targets (Windows + ELF based targets), it writes .o's directly)
Post Reply