27 lines
278 B
C
27 lines
278 B
C
|
|
||
|
#include "bcd.h"
|
||
|
|
||
|
|
||
|
void bcd_9cpl(__idata uint8_t *v1, uint8_t len) __reentrant
|
||
|
{
|
||
|
__asm
|
||
|
|
||
|
mov a,_bp
|
||
|
add a,#0xfd
|
||
|
mov sp,a
|
||
|
mov r0,dpl
|
||
|
pop ar7
|
||
|
|
||
|
clr c
|
||
|
001$:
|
||
|
mov a,#0x99
|
||
|
subb a,@r0
|
||
|
mov @r0,a
|
||
|
inc r0
|
||
|
djnz r7,001$
|
||
|
mov sp,_bp
|
||
|
|
||
|
__endasm;
|
||
|
}
|
||
|
|