diff --git a/vhdl/arch/InstructionMem.vhdl b/vhdl/arch/InstructionMem.vhdl index a094abd..5d8429b 100644 --- a/vhdl/arch/InstructionMem.vhdl +++ b/vhdl/arch/InstructionMem.vhdl @@ -38,6 +38,13 @@ architecture behav of InstructionMem is X"240200e0", -- li v0,224 X"a382012b", -- sb v0,299(gp) X"00000000", -- nop + + X"3c011400", -- lui at,0x1400 + X"3c1a1400", -- lui k0,0x1400 + X"375a0002", -- ori k0,k0,0x2 + X"83420000", -- lb v0,0(k0) + X"a0220000", -- sb v0,0(at) + X"08000000", -- j 0 <_start> X"00000000" -- nop ); diff --git a/vhdl/roms/button2leds.S b/vhdl/roms/button2leds.S new file mode 100644 index 0000000..1162a50 --- /dev/null +++ b/vhdl/roms/button2leds.S @@ -0,0 +1,12 @@ +.set mips1 +.set noreorder +.set noat + +.org 0 + +li $at, 0x14000000 # LEDs +li $k0, 0x14000002 # Push buttons + +lb $v0, 0($k0) +sb $v0, 0($at) +