home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
nisttime.carsoncity.k12.mi.us
/
nisttime.carsoncity.k12.mi.us.tar
/
nisttime.carsoncity.k12.mi.us
/
pub
/
daytime
/
unpbcd.c
< prev
next >
Wrap
Text File
|
1996-11-18
|
321b
|
12 lines
int unpbcd(ival)
int ival;
{
/*
this routine receives a packed BCD value in ival (as read
from the CMOS clock) and returns the integer value.
it is the inverse function to cnvbcd, which produces a packed
BCD value from an integer input
*/
return(10*(ival >> 4) + (ival & 0xf) );
}