rustcc / Rust_Atomics_and_Locks

Rust Atomics and Locks (中文翻译)
https://rustcc.github.io/Rust_Atomics_and_Locks/
MIT License
227 stars 29 forks source link

第七章,修改汇编解释 #84

Closed anicetrip closed 11 months ago

anicetrip commented 11 months ago

ldr x, 1234 // 从内存地址 1234 加载数据到寄存器 x li y, 0 // 将寄存器 y 设置为零 inc x // 将寄存器 x 增加一 add y, x // 将寄存器 x 的值加到寄存器 y mul x, 3 // 将寄存器 x 的值乘以 3 cmp y, 10 // 比较寄存器 y 和 10 jne -5 // 如果不相等,向前跳转五条指令 str 1234, x // 将寄存器 x 的值存储到内存地址 1234

fwqaaq commented 11 months ago

@anicetrip thanks