Skip to content

Commit

Permalink
Added missing rand instruction (0xc family)
Browse files Browse the repository at this point in the history
  • Loading branch information
plekakis committed Feb 16, 2023
1 parent 92ac423 commit 7359f25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/tiny8.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ namespace tiny8
else
m_registers.m_pc = m_state.m_nnn + m_registers.m_v[m_state.m_x];
});
add_instruction(0xc0, 0x00, 0x0000, [&]() { m_registers.m_v[m_state.m_x] = (std::rand() % 255) & m_state.m_nn; });
add_instruction(0xd0, 0x00, 0x0000, [&]()
{
auto const coordx = m_registers.m_v[m_state.m_x] & (c_displayWidth - 1);
Expand Down

0 comments on commit 7359f25

Please sign in to comment.