Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我认为两者都差不多:变量声明和初始化。你能详细说明一下吗?
.word分配空间并初始化数据。.equ定义一个常量,但不为其分配任何空间。
.word
.equ
因此,例如,您可能会说:
one .equ 1 ; defines a constant called "one" counter: .word one ; allocates space and initializes it with the value 1
不同之处在于该.equ指令不会在编译后的映像中分配任何空间。