Conditional structures: Difference between revisions

m
Line 4,319:
BLT $t7,$t3,label ;branch if $t7 < $t3, treating both as signed
NOP</lang>
 
Like most assembly languages, the label operand of a branch instruction is a hardware abstraction that allows you to more easily tell the assembler where you want the branch to go without having to figure it out yourself. In reality, the actual operand that the label represents is not an absolute address, but a calculated signed offset that is added to the program counter. Therefore there is a limit on how far away you can branch. Given that MIPS is a 32-bit CPU at a minimum, the maximum distance is very generous and you're extremely unlikely to ever need to branch further than it allows.
 
=={{header|МК-61/52}}==
1,489

edits