30 lines
257 B
C
30 lines
257 B
C
|
|
/*
|
|
* @r0 = number
|
|
* r7 = len
|
|
*
|
|
* modyfies: r0,r7,a
|
|
*/
|
|
static void long_rrc__() __naked
|
|
{
|
|
__asm
|
|
.globl long_rrc
|
|
long_rrc:
|
|
push PSW
|
|
mov a,r0
|
|
add a,r7
|
|
mov r0,a
|
|
pop PSW
|
|
001$:
|
|
dec r0
|
|
mov a,@r0
|
|
rrc a
|
|
mov @r0,a
|
|
djnz r7,001$
|
|
ret
|
|
|
|
__endasm;
|
|
}
|
|
|
|
|