Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. case 0x19: // DAA inherent
  2. temp_word = Registers[REGISTER_A];
  3. lb = Registers[REGISTER_A] & 0x0F;
  4. hb = Registers[REGISTER_A] >> 4;
  5. if ((lb > 9) || (Flags & FLAG_C) == FLAG_C) {
  6. lb = lb + 6;
  7. }
  8. if ((hb > 9) || (Flags & FLAG_C) == FLAG_C) {
  9. hb = hb + 6;
  10. }
  11. Registers[REGISTER_A] = lb + (hb << 4);
  12. temp_word = Registers[REGISTER_A];
  13. set_flag_n((BYTE)temp_word);
  14. set_flag_z((BYTE)temp_word);
  15. set_flag_v(lb, hb, (BYTE)temp_word);
  16. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement