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
Labels are created for humans to write and read more convenient, the after assembling, they're translated into machine code. You can, of course, don't use any labels, but this will introduce at last two problems:
- you need to count A LOT;
- once you change somewhere in your assembly program, almost you need to change most of your jr, j, jal, etc, because you're using absolute address of your program.
If you use labels(now they're references to sections in your program), these program will be solved with no extra effort!
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.