Reputation: 2355
I am new to MIPS so I apologize if this is a dumb question. I can't seem to find an answer to this question on the web. Can these two instructions be written as one instruction? The code I have below feels redundant:
li $t0, 23
sb $t0, 0x10010000
Thanks in advance for your responses!
Upvotes: 0
Views: 156
Reputation: 45114
No, they can´t be combined. There is no such thing as a "store inmediate to memory" instruction.
Mips implements a simple ISA. Being a RISC architecture, the only way to store a byte in memory is to use the sb
instruction.
Upvotes: 1