diff options
Diffstat (limited to 'software/first/set_LED.S')
-rw-r--r-- | software/first/set_LED.S | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/software/first/set_LED.S b/software/first/set_LED.S index e436615..0785d43 100644 --- a/software/first/set_LED.S +++ b/software/first/set_LED.S @@ -23,24 +23,24 @@ set_LED: beq a1, t2, ledOn # branch if on requested li a0, ERROR # bad status request, return error - j exit + j exit ledOn: - or t1, t1, a0 # only change the value of the requested LED (xor in the video) - sw t1, GPIO_OUTPUT_VAL(t0) # write new LED values to the right address + or t1, t1, a0 # only change the value of the requested LED (xor in the video) + sw t1, GPIO_OUTPUT_VAL(t0) # write new LED values to the right address li a0, NOERROR # success - j exit + j exit ledOff: - xor a0, a0, 0xffffffff # invert bits so off bits are off - and t1, t1, a0 # turn of LEDs - sw t1, GPIO_OUTPUT_VAL(t0) # write new LED values to the right address + xor a0, a0, 0xffffffff # invert bits so off bits are off + and t1, t1, a0 # turn of LEDs + sw t1, GPIO_OUTPUT_VAL(t0) # write new LED values to the right address li a0, NOERROR # success exit: - lw ra, 12(sp) # load return address - addi sp, sp, 16 # deallocate stack frame + lw ra, 12(sp) # load return address + addi sp, sp, 16 # deallocate stack frame ret |