在装配code跨平台? [英] Is assembly code cross-platform?

查看:114
本文介绍了在装配code跨平台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0x042444FF; /* inc dword ptr [esp+4] */

0x042444FF 是计算机code,而 INC DWORD PTR [ESP + 4] 是组装code,我知道
机code不是跨平台的,因为这取决于很多因素。

0x042444FF is the machine code,while inc dword ptr [esp+4] is the assembly code, I know machine code is NOT cross-platform,as it depends on many factors.

怎么样组装code,不是取决于CPU?

What about assembly code, does it depends on CPU ?

推荐答案

大会code是不是跨平台。

Assembly code is not cross platform.

通常有机器和安装说明之间有非常直接的映射,因此组装$ C $,c取决于架构。

Usually there is a very direct mapping between machine instructions and assembly instructions so the assembly code depends on the architecture.

维基百科:

这是汇编语言是一个低级语言为计算机,微处理器,微控制器,和其它集成电路。它实现了二进制机器codeS和一个特定的CPU架构编程所需的其他常量的一个象征性的重新presentation。这种重presentation通常是由硬件制造商所定义,并且是根据显示用符号的处理步骤(指令),处理器寄存器,存储器位置,以及其它语言功能助记符。 汇编语言是这样具体到某些物理(或虚拟)计算机架构。这是相对于最高级语言,这是理想的便携

An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other integrated circuits. It implements a symbolic representation of the binary machine codes and other constants needed to program a particular CPU architecture. This representation is usually defined by the hardware manufacturer, and is based on mnemonics that symbolize processing steps (instructions), processor registers, memory locations, and other language features. An assembly language is thus specific to a certain physical (or virtual) computer architecture. This is in contrast to most high-level languages, which are ideally portable.

这篇关于在装配code跨平台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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