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.
有人可以解释一下以下汇编代码片段的作用吗?我不太确定最后一行的真正作用。
.def main = r16 .equ O = 5 .equ P = 6 ldi main, 0 ldi r16, (1<<O) | (1<<P)
我特别想知道最后一行的真正作用。它是否在 OR 语句之后将寄存器 16 的值向左移了两个?
非常感谢。
(1<<O) | (1<<P)是由汇编器求值的表达式,其结果(在本例中96为 )然后被替换为最终的机器代码。
(1<<O) | (1<<P)
96