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.
假设我有一个高级语言的 while 循环,看起来像:
当 i >= 0 且 x < 5 时,
x86 中的汇编代码看起来如何?我曾尝试考虑将 cmp 用于 while 语句的条件部分,但我不确定 AND 将如何实现。
谢谢
;; assuming eax contains i, ecx contains x myloop: test eax, eax jl exitloop ; i < 0 cmp ecx, 5 jge exitloop ; x >= 5 ;; loop content goes here jmp myloop exitloop: ;; life continues after the loop