An emulator, assembler, and disassembler for the Sega Game Gear
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

13 satır
305 B

  1. /* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. Released under the terms of the MIT License. See LICENSE for details. */
  3. #include "util.h"
  4. /*
  5. Convert a BCD-encoded hexadecimal number to decimal.
  6. */
  7. uint8_t bcd_decode(uint8_t num)
  8. {
  9. return ((num >> 4) * 10) + (num & 0x0F);
  10. }