Assembly

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

Assembly

Postby etko » May 30, 2005 11:03

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: 529
Joined: May 27, 2005 6:20
Location: Limoges, France
Contact:

Postby jdebord » May 30, 2005 11:40

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

Postby Sterling Christensen » May 30, 2005 13:22

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:

Postby etko » May 30, 2005 22:47

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: 3011
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re:

Postby marcov » Jul 28, 2020 12:29

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)

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 1 guest