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;