Assembly MIPS中.word和.eq的区别是什么?
我认为两者的作用大致相同:变量声明和初始化。你能详细说明一下吗?Assembly MIPS中.word和.eq的区别是什么?,assembly,mips,Assembly,Mips,我认为两者的作用大致相同:变量声明和初始化。你能详细说明一下吗?。word分配空间并初始化数据.eq定义一个常量,但不为其分配任何空间 例如,你可能会说: one .equ 1 ; defines a constant called "one" counter: .word one ; allocates space and initializes it with the value 1 不同之处在于.eq指令在编译后的图像中不分配任何空间。与C类似,第一行类似于#定义一个1,第二行类似于字
。word
分配空间并初始化数据.eq
定义一个常量,但不为其分配任何空间
例如,你可能会说:
one .equ 1 ; defines a constant called "one"
counter: .word one ; allocates space and initializes it with the value 1
不同之处在于
.eq
指令在编译后的图像中不分配任何空间。与C类似,第一行类似于#定义一个1
,第二行类似于字计数器=1代码>