assembly - MIPS simple Sum -
i friends,
i'm working on compiler program so, can't understand while i'm passin 3 code address mips assembly, gets error in simple sums those:
addi $t0 , 1 ,1
it accepts :
addi temp , temp , 1
how can sum 2 integers? have store first "1" in temporary?
thanks lot
yes. each instruction has 32-bits encode operation, registers , in case immediate value. immediate value alone consumes 16-bits, there aren't instructions 2 immediates. question why ever need 2 immediate values. if have 2 constants want put code, compute answer , put answer instruction code.
Comments
Post a Comment