mc8051fun/bcd_tolong.c
2024-07-01 22:31:49 +02:00

34 lines
447 B
C

#include "mc8051fun.h"
/*
* C-Wrapper for bcd_tolong
*/
void bcd_tolong(__idata uint8_t *bcdval, __idata uint8_t *binval, uint8_t bcdlen, uint8_t binlen) __reentrant
{
(void)binval;
(void)bcdval;
(void)binlen;
(void)bcdlen;
__asm
mov a,_bp
add a,#0xfd
mov r0,a
mov a,@r0 ; binval
mov r1,a
dec r0
mov a,@r0 ; bcdlen
mov r7,a
dec r0
mov a,@r0 ; binlen
mov r6,a
mov r0,dpl ; bcdval
lcall bcd_tolong
__endasm;
}