Lines Matching full:bcd
249 /* Handles increment/decrement of BCD formatted integers */
251 static unsigned int incbcd(unsigned int *bcd,
256 unsigned int init = *bcd, i, j;
259 /* If bcd is not in BCD format, just increment */
261 *bcd += inc;
265 /* Convert BCD to Decimal */
267 c = (*bcd >> (i << 2)) & 0xf;
268 c = c > 9 ? 9 : c; /* force to bcd just in case */
276 *bcd = 0;
278 /* Convert back to BCD */
283 *bcd += c << (i << 2);
307 /* Figure out if this entry is in bcd or hex format */
329 if (chi > max) /* If we are in bcd mode, truncate if necessary */