I'm attempting to write ASM that uses a logical right shift to shift a byte over without destroying the bytes at the end, but instead rotating them to the front. Essentially, I'm trying to emulate the ROR instruction without specifically using that instruction.
I know the right shift instruction automatically replace the leftover space with 0's, but is there a way to potentially change that value?
.data
InArr: .word 0xe0000000
OutArr: .word 0
.text
.global main
main:
    lw $s2, InArr
    lw $s3, OutArr
loop:
    #ror $s2, $s2, 4
    srl $s2, $s2, 4
    sw $s2, InArr
    bne $s2, $s3, loop
    syscall
In this case, the code runs until "e" is shifted all the way to the right.