linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* .intel_syntax
@ 2003-01-16  1:19 n  mishra
  2003-01-16  6:30 ` .intel_syntax hp
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: n  mishra @ 2003-01-16  1:19 UTC (permalink / raw)
  To: linux-assembly

Hi all,
Could someone please tell me how the .intel_syntax works.I can't 
seem to find any reference to it in the man pages or any other 
documentation on it.I want to compile some code written in the 
intel syntax using gcc.
Thanks.
mishra.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: .intel_syntax
  2003-01-16  1:19 .intel_syntax n  mishra
@ 2003-01-16  6:30 ` hp
  2003-01-16  6:36 ` .intel_syntax hp
  2003-01-16 14:48 ` .intel_syntax etienne
  2 siblings, 0 replies; 4+ messages in thread
From: hp @ 2003-01-16  6:30 UTC (permalink / raw)
  To: n mishra, linux-assembly


AS (dvi, html or ps variant, 'info' is un-readable, 'man' doesn't even exist) 
documentation mentions only the difference wrt att syntax and some specific 
issues, basic coding should refer to intel docs.

find an excerpt at
	http://www.lxhp.in-berlin.de/lhpas86.html

basic rules, very short:
  <source> and <destn> appear exchanged (mostly! fp oprs are different!)
  mnonic+"l" for <dword> opr,  "w" for word, "b" for byte
  the operand never takes a size praefix.
  use "(...)" instead of " [ .. ]" or intel syntax "ptr" or "pointer".
  immediate oprs praefixed w. "$"
  indexed addressing by " disp(reg)" 
  or " disp( base-reg, scaled-reg, scale-factor)"
	where any of the rsp. items migh be left blank, e.g.
		movl $1, (,edx,2)
	which for nasm would be "mov dword[edx*2],1"

AS alway 'optimzes' branches and byte-codeable immeds, uncontrolably, 
but, any branches to labels which are declared "global" will be assembled  
'long' regardless of the displacement figure - "nasm "jmp/jcc near label".

other differences exist wrt pseudo operations, which are fully explaind in AS 
documentation.

insert ".att_syntax noprefix" at top asm line for un-prefixed registers which 
would otherwise be expected w. a leading "%" character.
AS's ".intel_syntax" not orderly implemented, imo, not recommendable.


best,
	hp

n  mishra am Donnerstag, 16. Januar 2003 01:19:
> Hi all,
> Could someone please tell me how the .intel_syntax works.I can't
> seem to find any reference to it in the man pages or any other
> documentation on it.I want to compile some code written in the
> intel syntax using gcc.

-- 
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de
  >> clf -at- lxhp -dot- in-berlin -dot- de <<

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: .intel_syntax
  2003-01-16  1:19 .intel_syntax n  mishra
  2003-01-16  6:30 ` .intel_syntax hp
@ 2003-01-16  6:36 ` hp
  2003-01-16 14:48 ` .intel_syntax etienne
  2 siblings, 0 replies; 4+ messages in thread
From: hp @ 2003-01-16  6:36 UTC (permalink / raw)
  To: n mishra, linux-assembly

hp am Donnerstag, 16. Januar 2003 06:30:

I forgot (didn't read carefully)

intel_syntax is not documented, at all. but, you'll find several examples to 
almost all mnemonics in the <binutils> sources - which also reveal the 
current state of in-completeness. 


-- 
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de
  >> hp -at- lxhp -dot- in-berlin -dot- de <<

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: .intel_syntax
  2003-01-16  1:19 .intel_syntax n  mishra
  2003-01-16  6:30 ` .intel_syntax hp
  2003-01-16  6:36 ` .intel_syntax hp
@ 2003-01-16 14:48 ` etienne
  2 siblings, 0 replies; 4+ messages in thread
From: etienne @ 2003-01-16 14:48 UTC (permalink / raw)
  To: linux-assembly

n mishra wrote:

> Hi all,
> Could someone please tell me how the .intel_syntax works.I can't seem 
> to find any reference to it in the man pages or any other 
> documentation on it.I want to compile some code written in the intel 
> syntax using gcc. 

you cant (unless I am wrong)

gcc does at&t syntax only .......... and uses gas to compile assembly

but you can use nasm to compile intel syntax ..... and link nasm object 
files to gcc compiled C or C++

there is heaps of intel syntax docs on Intel's site

etienne

>
> Thanks.
> mishra.
>
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-assembly" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-16 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-16  1:19 .intel_syntax n  mishra
2003-01-16  6:30 ` .intel_syntax hp
2003-01-16  6:36 ` .intel_syntax hp
2003-01-16 14:48 ` .intel_syntax etienne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).