mc8051fun/bcd.h
2024-07-01 20:48:39 +02:00

17 lines
564 B
C

#ifndef BCD_H_
#define BCD_H
#include <stdint.h>
uint8_t bcd_add(__idata uint8_t *v1, __idata uint8_t *v2,uint8_t len) __reentrant;
void bcd_9cpl(__idata uint8_t *v1, uint8_t len) __reentrant;
void bcd_shr(__idata uint8_t *v, uint8_t len, uint8_t d) __reentrant;
void bcd_invert(__idata uint8_t *v1, uint8_t len);
void bcd_addbyte(__idata uint8_t *v1, uint8_t len, uint8_t b) __reentrant;
uint8_t bcd_getsig(__idata uint8_t*v, uint8_t len);
void long_tobcd(__idata uint8_t *binval, __idata uint8_t *bcdval, uint8_t binlen, uint8_t bcdlen) __reentrant;
#endif