adaptateur.h

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

H
69
字号
/**********************************************************************************//*                                                                                *//*    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                                                           *//*                                                                                *//* Module adaptateur */#ifndef M_ADAPTATEUR_FLAG#define M_ADAPTATEUR_FLAG/* Autres modules du projet utilis閟.                                                        */#include <parametres.h>#include <stdio.h>/*********************************************************************************************//*                                 DEFINITION DU TYPE MASQUE                                 *//* D閒inition du type mask                                                                   *//*********************************************************************************************/typedef short int type_taille_mask;typedef unsigned long type_valeur_mask;typedef struct{        type_taille_mask taille;        /* taille du masque en octets.                       */        type_valeur_mask valeur;        /* valeur du masque sur 64 bits.                     */} type_mask;/* Comme l'allocation de masques sera une op閞ation tr鑣 fr閝uente, on pourra utiliser la    *//* macro suivante pour simplifier le code.                                                   */#define ALLOC_MASK(msk) {\                                msk = ((type_mask *) malloc(sizeof(type_mask)));\                        }#define FREE_MASK(msk)  {\                                free(msk);\                        }/*********************************************************************************************//*                        EXPORTATION DES FONCTIONS DE L'ADAPTATEUR                          *//*********************************************************************************************//* D閒inition du type pointeur vers une fonction g閚閞atrice de masque.                      */typedef type_mask *((*type_ptr_fgm)());type_ptr_fgm alias(char *);     /* Retourne le pointeur sur la fonction 

⌨️ 快捷键说明

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