PUT X,$Z |
PUT X,Z |
GET $X,Z |
Specification:
PUT: u(g[X]) | ← u($Z) |
GET: u($X) | ← u(g[Z]) |
Timing:
1υ
Description:
GET transfers the value of a special register into a regular register. PUT goes the other way round, transferring the value from a regular register or a constant to a special register.
To indicate one of the special registers, use the predefined constants rA…rZ as well as rBB, rTT, rWW,rXX,rYY and rZZ.
The following registers are read only in user mode: rC, rL, rN, rO, rS, rI, rT, rTT, rK, rQ, rU and rV.
It is not possible to store a value in rG that is less than 32, or less than the current value of rL, or greater than 255.
It is not possible to store a value in rA that is greater than #3FFFF.
PUT: | "put into special register" (the Y field must be zero.) The special register identified by X is set to the contents of register $Z or to the unsigned byte Z itself, if permissible. Some changes are, however, impermissible:
Impermissible PUT commands cause an illegal instruction interrupt, or (in the case of rC, rI, rK, rQ, rT, rU, rV, and rTT) a privileged operation interrupt. | ||||||||||||
GET: | "get from special register" (the Y field must be zero.) Register $X is set to the contents of the special register identified by its code number Z, using the code numbers listed earlier. An illegal instruction interrupt occurs if Z ≥ 32. Every special register is readable; MMIX does not keep secrets from an inquisitive user. But of course only the operating system is allowed to change registers like rK and rQ (the interrupt mask and request registers). And not even the operating system is allowed to change rN (the serial number) or the stack pointers rO and rS. |
See also: