Implement CHIP-8 Instructions: Arithmetic
Closed this issue · 0 comments
fokoid commented
-
0x7XNN
Adds NN to VX (carry flag is not changed). (Vx += NN
) -
0x8XY4
Adds VY to VX. VF is set to 1 when there's a carry, and to 0 when there is not. (Vx += Vy
) -
0x8XY5
VY is subtracted from VX. VF is set to 0 when there's a borrow, and 1 when there is not. (Vx -= Vy
) -
0x8XY7
Sets VX to VY minus VX. VF is set to 0 when there's a borrow, and 1 when there is not. (Vx = Vy - Vx
)
Pseudocode and descriptions were sourced from the CHIP-8 Wikipedia article and are licensed under the Creative Commons Attribution-ShareAlike License 3.0.