Example #1
0
void	print(t_inst *inst, t_label *label, t_n_c *n_c)
{
	t_inst	*tmp;
	int		i;

	i = 0;
	tmp = inst;
	print_n_label(n_c, label);
	ft_put("\n=======INSTRUCTIONS=======\n\n", RED);
	while (tmp)
	{
		i = 0;
		ft_put("ID : ", GREEN);
		ft_putnbr(tmp->id);
		ft_put("  OPCODE : ", YELLOW);
		ft_putnbr(tmp->opcode);
		print_par(tmp, i);
		if (tmp->error)
		{
			ft_putstr(" | INST ERROR : ");
			ft_putstr(tmp->error);
		}
		ft_putchar('\n');
		tmp = tmp->next;
	}
}
Example #2
0
void print_ar()
{
	int i;

	for(i=0; i<num_ar; i++)
		print_par(ar[i]);

	return;
}