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.
SECTION .data source: db 01101001b , 11011100b SECTION .text global main main: mov EAX,source ; Address to my source of bits
如何迭代source变量中的每一位(那里有 16 位)?
source
要迭代一个值的位,请使用移位和掩码,就像在 C 中一样。
要获取单个位的值,您可以使用bt指令,它将 CF 设置为寄存器或内存位置中选定位的值。
bt