# XOKEY, XUSER

> [HTML Version](xokey-xuser_sbr.htm)

**xcall XOKEY, mode, msgname, msgdata**

**xcall XUSER, mode, msgname, msgdata**

XOKEY is a variation of [COMMON](commonsbr.md), used for passing data between programs in memory, supporting up to 400 packets of fifteen bytes each. XUSER is a disk-based version of XOKEY; the packets are stored in the file SYS:XUSER.SYS which will be created automatically if not present.

**Parameters**

_mode_  ([String](string.md),1)  \[in\]

Operation to perform:  "P" to put (write), "R" to read (destructive), "G" to get (non-destructive read), "Z" to clear all packets

_msgname _ ([String](string.md),10)  \[in\]

Name of message packet

_msgdata _ ([String](string.md),15)  \[in/out\]

Data to read or write

**Comments**

The Put ("P") operation scans the file from the start, using the first empty slot, or re-using the first slot matching _msgname_, whichever comes first. This could result in multiple entries with the same _msgname_. To eliminate that possibility, use the destructive Read ("R") first. Likewise, the Read and Get operations stop at the first matching _msgname_.

**History**

2025 February:  These routines have existed in A-Shell for many years, but was only documented at this time.