This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: different results on using intel syntax and at&t syntax


Dave Korn,

> [  Hi NN, you sent this reply to me only, but since
> it's nothing personal and
> the information might be useful for anyone else who
> has the same problem I've
> added the binutils list back into the Cc line.  ]

thanks for adding it as possible follow up (i had hit
reply insted of reply to everyone and noticed the goof
up only after 
i had posted so i sent one to binutils@sources but it
got converted to a new thread :) and i was hoping some
one would pluck it and stick it here :) thanks for
that


>   If you ever run into problems like this again, and
> you want to use proper
> symbols for numeric constants but can't because of
> some problem it would
> trigger, there is another technique often used: add
> C-style #define statements
> to your assembler file instead of .equ, and use the
> C preprocessor on the
> source before it gets assembled by using "gcc -x
> assembler-with-cpp" to
> compile it instead of "as".

well i was trying to avoid gcc dependance completely
and wanted to assemble and link with as and ld only 
but thanks for the pointers i sure would do that since

i cant be conveting the .h to .inc (is there a h2inc
that converts c header files to as include files ala
microsoft style 
H2INC.exe that creates masm compatible inc files ??
well i searched and see one big long perl script
floating in kernel.sec mailing list but i dont know if
it works 


 
>   In case you don't know yet, there are separate
> ChangeLogs for each of the
> main directories in the binutils source.  You should
> have been checking the
> one in the gas subdirectory, not the main (toplevel)
> changelog nor the one in
> the binutils dir.  (Just trying to be clear).
> 

well like my nick states i am not much aware of the
way that works i wanted to write an assembly program
and found as(1) to be too much of a headache to use
and every one who was some one just asked me to use
nasm,fasm,etc (not many were even aware of this
.intel_syntax pseudo-op or directive what ever it was 
i couldnt find a decent looking tut that was written
in pure 
assembly using intel syntax assembled and linked with
as and ld only 

if you noticed my first post you might see an invoke
statement in there also in the disassembly you might
notice an lea esp,[esp+1*4]

actually i faced this problem when i made that macro 
i did add esp,narg*4  narg == no of args passed to
invoke 
and the disassembly turned out to be 
add esp,[narg]  
ie if narg was 2,3,4 the disassembly was 
add esp ,[8] | add esp,[0x0c]  | add esp,[0x10] and
was segfaulting 
so i just utilised the behaviour as it is thinking it
might be some gas magic :)
and converted the expansion to lea esp,[esp+narg*4] so
that it worked 

and the macro that i made is looking absolutely logic
less and i dont know why such code should work but
unfortunately it works :(
but i was surprised to find that a code which should
work flawlessly was not working 

thanks and regards

nix noob



		
__________________________________________ 
Yahoo! DSL ? Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]