/* Return the input or output data address specified in the tcw depending on whether the r-bit or the w-bit is set. If neither bit is set, return NULL.  */
void* tcw_get_data(struct tcw *tcw)
/* Return the input or output data address specified in the tcw depending on whether the r-bit or the w-bit is set. If neither bit is set, return NULL.  */
void* tcw_get_data(struct tcw *tcw)
{
	if (tcw->r)
		return (void *) ((addr_t) tcw->input);
	if (tcw->w)
		return (void *) ((addr_t) tcw->output);
	return NULL;
}