English
Language : 

CC78K0S Datasheet, PDF (392/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
BCD Operation Function
#pragma bcd
(3) unsigned int adbcdbe (x, y) ;
unsigned char x ;
unsigned char y ;
Decimal addition is carried out by the BCD adjustment instruction (with result expansion).
(4) unsigned int sbbcdbe (x, y) ;
unsigned char x ;
unsigned char y ;
Decimal subtraction is carried out by the BCD adjustment instruction (with result expansion). If a borrow occurs,
the higher digits are set to 0x99.
(5) unsigned int adbcdw (x, y) ;
unsigned int x ;
unsigned int y ;
Decimal addition is carried out by the BCD adjustment instruction.
(6) unsigned int sbbcdw (x, y) ;
unsigned int x ;
unsigned int y ;
Decimal subtraction is carried out by the BCD adjustment instruction.
(7) unsigned long adbcdwe (x, y) ;
unsigned int x ;
unsigned int y ;
Decimal addition is carried out by the BCD adjustment instruction (with result expansion).
(8) unsigned long sbbcdwe (x, y) ;
unsigned int x ;
unsigned int y ;
Decimal subtraction is carried out by the BCD adjustment instruction (with result expansion). If a borrow occurs,
the higher digits are set to 0x9999.
(9) unsigned char bcdtob (x) .
unsigned char x ;
Decimal numbers are converted to binary numbers.
(10) unsigned int btobcde (x) ;
unsigned char x ;
Binary numbers are converted to decimal numbers.
392
User’s Manual U14872EJ1V0UM