MIPS Assembly Labels

前端 未结 2 1708
灰色年华
灰色年华 2021-01-06 19:59

Does assembly for MIPS read every label? ignore the task and syntax, I just put something together quick.

add reg3, reg1, $zero
add reg1, reg1, reg2
beq reg1         


        
2条回答
  •  暖寄归人
    2021-01-06 20:49

    Labels are only so you can reference the line with a jump. The CPU itself will only see the machine code. The same is true of any comments in your code. They are only there in the assembler - this is then converted into machine code.

    You will need to jump over a line if you don't want it executing.

提交回复
热议问题