组装其中的语法和结构是最有用的知道吗? [英] Which syntax and architecture of assembly is most useful to know?

查看:129
本文介绍了组装其中的语法和结构是最有用的知道吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想学习汇编,但似乎是在那里组装相关信息的丛林中是难以间preT。我已经不只是能够谷歌学习汇编,并走了。

首先,有两种类型的语法:英特尔和AT& T公司。有什么不同?为何仍有两个用?我什么时候需要使用一个与其他?

二,有筹码众多那里。英特尔AMD VS,32位与64位x86 VS其他架构......即使86确实是一个整体的系列的芯片。所以,我怎么能知道我从某个网页学习大会是否会为我的机器工作?

有存在更加变化(操作系统,甚至在决定如何code将运行一个角色。

所以,最大的问题是,所有这些变量,我怎么能知道我应该学习什么类型?什么是最常见?怎么可能让人们知集结号的时候有所有这些变化?


解决方案

  

首先,有两种类型的语法:英特尔和AT& T公司。有什么区别?


借助 是肤浅的主要区别:扭转操作数,例如


  

为什么还有两个用?我什么时候需要使用一个与其他?


英特尔使用一种语法,是一个重大的背离形成,几乎所有的其它处理器ISA文档中使用的语法。

GNU 使用AT&安培; T语法适用于所有平台,并且支持Intel语法用于x86和x86_64

其他的汇编(NASM一样,MASM等),专门使用英特尔的语法。


  

所以,我怎么能知道我从某个网页学习大会是否会为我的机器工作?


它的记录从英特尔并的AMD 沙堆也是一个很好的资源。


  

所以,最大的问题是,所有这些变量,我怎么能知道我应该学习什么类型?什么是最常见的?


最广泛支持的将是奔腾亲类,所谓的i686的',和K8级(称为x86_64的'或'AMD64'或'EM64T')。从那里的变化是MMX或SSE或其变体是否支持。查找CPUID指令 - 它会为您提供为您正在运行的处理器支持信息


  

怎么可能让人们知集结号的时候有所有这些变化?


我不认为任何人知道86。大家谁需要有处理器手册的副本。

I've always wanted to learn assembly, but there seems to be a jungle of assembly-related information out there that is difficult to interpret. I haven't just been able to google "learn assembly" and get going.

First, there are two types of syntax: Intel and AT&T. What's the difference? Why are there still two in use? When would I need to use one versus the other?

Second, there's a multitude of chips out there. Intel vs AMD, 32-bit versus 64-bit, x86 vs other architectures... even x86 is really a whole family of chips. So, how can I know whether the assembly I'm learning from a certain web page will work for my machine?

There exist even more variations (operating system even plays a role in determining how code will run.

So, the big question is, with all these variables, how can I know what type I should learn? What's most common? How is it possible for people to "know assembly" when there are all of these variations?

解决方案

First, there are two types of syntax: Intel and AT&T. What's the difference?

The main differences are superficial: reversed operands, for example.

Why are there still two in use? When would I need to use one versus the other?

Intel uses a syntax that is a major departure form the syntax that virtually all other processor ISA documents use.

GNU as uses AT&T syntax for all platforms, and supports Intel syntax for x86 and x86_64.

Other assemblers (like NASM, MASM, etc.) use Intel syntax exclusively.

So, how can I know whether the assembly I'm learning from a certain web page will work for my machine?

It's documented in the processor manuals from Intel and AMD. Sandpile is also a good resource.

So, the big question is, with all these variables, how can I know what type I should learn? What's most common?

The most widely-supported would be Pentium-pro class, so-called 'i686', and K8-class (referred to as 'x86_64' or 'amd64' or 'EM64T'). The variations from there are whether MMX or SSE or its variations are supported. Look up the CPUID instruction - it will provide you with support information for the processor you're running on.

How is it possible for people to "know assembly" when there are all of these variations?

I don't think anyone "knows" x86. Everyone who needs to has a copy of the processor manuals.

这篇关于组装其中的语法和结构是最有用的知道吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆