mc8051fun/long_tobcd.c

34 lines
403 B
C
Raw Permalink Normal View History

2024-07-01 20:48:39 +02:00
#include "mc8051fun.h"
/*
* C-Wrapper for long_tobcd
*/
void long_tobcd(__idata uint8_t *binval, __idata uint8_t *bcdval, uint8_t binlen, uint8_t bcdlen) __reentrant
{
(void)binval;
(void)bcdval;
(void)binlen;
(void)bcdlen;
__asm
mov a,_bp
add a,#0xfd
mov r0,a
mov a,@r0
mov r1,a
dec r0
mov a,@r0
mov r7,a
dec r0
mov a,@r0
mov r6,a
mov r0,dpl
lcall long_tobcd
__endasm;
}