Registers: Difference between revisions

No edit summary
Line 496:
 
You cannot perform operations between entire position registers and other variables, as position registers contain 6 separate elements. You can only work with one element at a time, using PR[i,j].
 
=== Common Examples ===
PR[#] = PR[#] - PR[#] is a commonly seen instruction in the beginning of programs that ensures the position register is completely zeroed before the program's main components begin.
Anything minus itself will always equal zero, so no matter what the contents of each element in the position register happen to be, it will become zero after this instruction is reached.
Since position registers are global variables, they may be used in other programs and can contain values that are unrelated to your own. You should never assume a position register will be at specific values before the program begins.
 
==Division Instruction ==