mc8051fun/long_rrc__.c

30 lines
257 B
C
Raw Normal View History

2024-07-01 20:48:39 +02:00
/*
* @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;
}