exit:
ret
+
byte_rot_jmptable:
rjmp post_byterot;ret; rjmp byte_rotr_0
rjmp byte_rotr_7
; 0 1 2 3 4 5 6 7
; 1 2 3 4 5 6 7 0
-
+;.global byte_rotr_1
+;.global byte_rotr_0
byte_rotr_1: /* 10 words */
mov r0, B0
mov B0, B1
; 0 1 2 3 4 5 6 7
; 2 3 4 5 6 7 0 1
-
+;.global byte_rotr_2
byte_rotr_2: /* 11 words */
mov r0, B0
mov B0, B2
; 0 1 2 3 4 5 6 7
; 3 4 5 6 7 0 1 2
-
+;.global byte_rotr_3
byte_rotr_3: /* 10 words */
mov r0, B0
mov B0, B3
; 0 1 2 3 4 5 6 7
; 4 5 6 7 0 1 2 3
+;.global byte_rotr_4
byte_rotr_4: /* 13 words */
mov r0, B0
mov B0, B4
; 0 1 2 3 4 5 6 7
; 5 6 7 0 1 2 3 4
+;.global byte_rotr_5
byte_rotr_5: /* 10 words */
mov r0, B0
mov B0, B5
; 0 1 2 3 4 5 6 7
; 6 7 0 1 2 3 4 5
+;.global byte_rotr_6
byte_rotr_6: /* 11 words */
mov r0, B0
mov B0, B6
; 0 1 2 3 4 5 6 7
; 7 0 1 2 3 4 5 6
+;.global byte_rotr_7
byte_rotr_7: /* 10 words */
mov r0, B7
mov B7, B6
mov B0, r0
rjmp post_byterot
+;.global bit_rotl
bit_rotl:
tst vROT
brne 1f
dec vROT
rjmp bit_rotl
+;.global bit_rotr
bit_rotr:
tst vROT
brne 1f