www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/02/17/09:30:36

Date: Mon, 17 Feb 92 08:41:35 EST
From: DJ Delorie <dj AT ctron DOT com>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: BSD style assembly?
Status: O

>What are the exact syntactical differences between 8086 aseembly output
>and the stuff that "gcc -S" generates?  I have heard it referred to
>as "BSD" assembly, but it looks mostly like 8086 with some odd
>conventions.  Any ideas?

Well, there are *lots* of syntactical differences, plus the fact that it
is a native 32-bit assembler.

Examples:

* MOV AX,45h becomes movw $0x45,%ax
* MOV FOO,AL becomes movb %al,foo
* MOV EAX,ES:[AX+4*CX] becomes seg es; movl (ax,cx,4),%eax

Plus don't forget that MASM expects segments (TEXT SEGMENT BYTE PUBLIC
'CODE') whereas gas uses sections (.text).

DJ
dj AT ctron DOT com
Life is a banana.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019