manpagez: man pages & more
info dc
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Registers

DC provides at least 256 memory registers, each named by a single character. You can store a number in a register and retrieve it later.

sr

Pop the value off the top of the stack and store it into register r.

lr

Copy the value in register r, and push it onto the stack. This does not alter the contents of r.

Each register also contains its own stack. The current register value is the top of the register's stack.

Sr

Pop the value off the top of the (main) stack and push it onto the stack of register r. The previous value of the register becomes inaccessible.

Lr

Pop the value off the top of register r's stack and push it onto the main stack. The previous value in register r's stack, if any, is now accessible via the ‘lr’ command.


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.