开发者

Is it true that windows uses intel assembly while *nix uses at&t?

开发者 https://www.devze.com 2023-03-01 00:19 出处:网络
Am I right to say so?This is based on my own experience of disasembling binaries on linux and windows开发者_C百科.It\'s the debugger who chooses which assembly syntax it want\'s to display and not the

Am I right to say so?This is based on my own experience of disasembling binaries on linux and windows开发者_C百科.


It's the debugger who chooses which assembly syntax it want's to display and not the Operating System. Usually, Windows debuggers go for the Intel syntax, and Linux debuggers rather AT&T.

However, some debuggers let you choose the syntax. For instance, GDB let's you switch to Intel with: set disassembly-flavor intel


This is true, but only because of the tools you have chosen to use. The machine language is identical for the CPU (Intel x86, presumably), but the tools you're using might show the assembly language differently. The assembly language is only a human-readable representation of the machine language.

One might compare this to doing accounting in English vs. French. The numbers are the same, but the words used to describe the numbers are different.


Mainly yes, but also depends on the assembler, for instance :

http://en.wikipedia.org/wiki/X86_assembly_language#Syntax

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号