24 lines
250 B
C
24 lines
250 B
C
|
/*
|
||
|
* a = byte to add
|
||
|
* @r0 = long val
|
||
|
* r7 = length
|
||
|
*
|
||
|
*/
|
||
|
static void long_addbyte__() __naked
|
||
|
{
|
||
|
__asm
|
||
|
.globl long_addbyte
|
||
|
long_addbyte:
|
||
|
clr c
|
||
|
ajmp 002$
|
||
|
001$:
|
||
|
mov a,#0x00
|
||
|
002$:
|
||
|
addc a,@r0
|
||
|
mov @r0,a
|
||
|
inc r0
|
||
|
djnz r7,001$
|
||
|
ret
|
||
|
__endasm;
|
||
|
}
|