view target-utils/simagent/byterx.c @ 773:6d1b22d4926f

simagent: inverse coding convention table implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Mar 2021 21:20:56 +0000
parents 9c1d580b50fb
children badc5399d641
line wrap: on
line source

#include <stdlib.h>
#include "types.h"
#include "simregs.h"

rx_sim_byte(count)
	unsigned count;
{
	for (; count; count--) {
		if (!(SIMREGS.stat & SIM_STAT_FEMPTY))
			return SIMREGS.drx;
	}
	return(-1);
}

void
cmd_sertimeout(argbulk)
	char *argbulk;
{
	char *argv[2];
	int count;

	if (parse_args(argbulk, 1, 1, argv, 0) < 0)
		return;
	count = atoi(argv[0]);
	rx_sim_byte(count);
}