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!