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.
任何人都可以帮助我了解此代码如何影响寄存器 ctl0 中的值(忽略保留位)。这是代码
rdctl r6,ctl0 andi r6, r6, 0x0006 wrctl ctl0, r6
等效的 C 伪代码将是:
r6 = ctl0; // rdctl r6, ctl0 r6 = r6 & 0x0006; // andi r6, r6, 0x0006 ctl0 = r6; // wrctl ctl0, r6
所以,换句话说,
ctl0 = ctl0 & 0x0006;