synthetiseur.c

来自「这是一个基于mips-I结构的处理器,32bit,冯诺依曼结构」· C语言 代码 · 共 60 行

C
60
字号
/**********************************************************************************//*                                                                                *//*    Copyright (c) 2003, Hangouet Samuel, Mouton Louis-Marie all rights reserved *//*                                                                                *//*    This file is part of gasm.                                                  *//*                                                                                *//*    gasm is free software; you can redistribute it and/or modify                *//*    it under the terms of the GNU General Public License as published by        *//*    the Free Software Foundation; either version 2 of the License, or           *//*    (at your option) any later version.                                         *//*                                                                                *//*    gasm is distributed in the hope that it will be useful,                     *//*    but WITHOUT ANY WARRANTY; without even the implied warranty of              *//*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *//*    GNU General Public License for more details.                                *//*                                                                                *//*    You should have received a copy of the GNU General Public License           *//*    along with gasm; if not, write to the Free Software                         *//*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   *//*                                                                                *//**********************************************************************************//* If you encountered any problem, please contact :                               *//*                                                                                *//*   lmouton@enserg.fr                                                            *//*   shangoue@enserg.fr                                                           *//*                                                                                */#include "synthetiseur.h"/* Autres modules utilis閟 par le synth閠iseur.                                              */#include <debogueur.h>#include <dialogue.h>#include <formateur.h>#include <parametres.h>#include <adaptateur.h>#include <analyseur.h>/* Cette fonction convertit un masque en talbeau de char 閝uivalent.                         *//* La chaine 閠ant allou閑 dynamiquement, il conviendra de la lib閞er apr鑣 utilisation.     */char * cnv_mask_str(type_mask * m){        char * res;        int i;        type_valeur_mask v;        if (m==NULL) return NULL;        res = malloc((m->taille)*sizeof(char));        if (res==NULL) DIALOGUE("synthetiseur(cnv_mask_str)", 0, F_ERR_MEM);        v=m->valeur;        for (i=m->taille-1 ; i>=0 ; i--)        {                res[i]= (v & 0xFF);                v>>=8;        }        return res;}/* num閞o de la colonne o

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?