MOV src,dest(或)MOV dest,src? [英] MOV src, dest (or) MOV dest, src?

查看:92
本文介绍了MOV src,dest(或)MOV dest,src?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MOV可能是每个人在学习ASM时都会学到的第一条指令.

MOV is probably the first instruction everyone learns while learning ASM.

刚才我遇到了一本书

Just now I encountered a book Assembly Language Programming in GNU/Linux for IA32 Architectures By Rajat Moona which says: (broken link removed)

但是我知道它是MOV dest, src.就像用src加载dest".甚至 Wiki 也是如此.

But I learnt that it is MOV dest, src. Its like "Load dest with src". Even Wiki says the same.

我并不是说作者错了.我知道他是对的.但是我在这里想念什么?

I'm not saying that the author is wrong. I know that he is right. But what am I missing here?

btw ..他正在使用GCC的as汇编这些指令.但这不应该改变指令语法吗?

btw.. he is using GCC's as to assemble these instructions. But that shouldn't change the instruction syntax right?

推荐答案

mov dest, src被称为 Intel语法 . (例如mov eax, 123)

mov src, dest被称为 AT& T语法 . (例如mov $123, %eax)

包括GNU汇编程序在内的UNIX汇编程序都使用AT& T语法,我所知道的所有其他x86汇编程序都使用Intel语法.您可以阅读维基百科上的差异.

UNIX assemblers including the GNU assembler uses AT&T syntax, all other x86 assemblers I know of uses Intel syntax. You can read up on the differences on wikipedia.

这篇关于MOV src,dest(或)MOV dest,src?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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