我的INTEL语法很像DWORD PTR这样的ob语,在AT& T中,一个小的附加l就足够了.在许多情况下,助记符的确切拼写有所不同,我发现AT& T更合乎逻辑,而Intel的方式当然是标准.英特尔中的寻址模式更具可读性.哪个被更广泛地使用和理解?我相信AT& T被更多地使用,因为Linux在嵌入式平台上无处不在,在其他软件项目中,汇编器的使用率更高.有更多的汇编器了解Intel的语法,这是事实,但我相信gcc/gas在汇编器重要/有用的领域中使用更多.I'm going through the Intel processor documentation and writing some basic assembly code at the same time. I have both nasm and as (GAS) on my server and I understand the basic differences of both assemblers.In the long run:Focusing on which of these syntax is a better idea?What are the advantages and disadvantages of these syntax?Which one is more widely used and understood?I would also appreciate any preferences you could share with me. 解决方案 Focusing on which of these syntax is a better idea?Depends on your projects. Not every compiler does allow both kinds of syntax. If you need to have to code assembled on other platforms Intel is probably better, even after some years experience with both I personally like Intel more, but it`s a small difference, and it doesn't really matter to me.What are the advantages and disadvantages of these syntax?In the AT&T syntax there are slightly to much %, even more if you need to use macros. OTOH I prefer the source, destination ordering, but thats personal taste, others may prefer it the other way around because it resembles the writing order of an assignment operator in say C (and many more).I INTEL syntax the are obscenities like DWORD PTR, where in AT&T a small appended l is sufficient. The exact spelling of the mnemonics differs in many cases, I find the AT&T more logical while of course Intels way is the standard. The addressing modes in Intel are somewhat more readable.Which one is more widely used and understood?I believe AT&T is more used, because of the ubiquitousness of linux on embedded platforms, where assembler is much more often used that in other software projects. There are more assemblers which understand Intels syntax, that much is true, but I believe gcc/gas is more used in a field where assembler matters/is useful . 这篇关于NASM(Intel)与AT& T语法:有哪些优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-24 11:40