File: cpu.h

package info (click to toggle)
crasm 1.8-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 376 kB
  • sloc: ansic: 3,505; makefile: 65
file content (53 lines) | stat: -rwxr-xr-x 1,814 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*  Copyright (C) 1987- Leon Bottou
 * 
 *  This is free documentation; 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.
 * 
 *  The GNU General Public License's references to "object code"
 *  and "executables" are to be interpreted as the output of any
 *  document formatting or typesetting system, including
 *  intermediate and printed output.
 * 
 *  This manual 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 this manual. Otherwise check the web site
 *  of the Free Software Foundation at http://www.fsf.org.
 */
/*  CRASM: cpu.h 
    include pour les fichiers de definition de CPU
*/

#ifndef CPU_H
#define CPU_H

#include "dcl.h"
#include "label.h"

/***************************************************************************/

#define startmnemos(n)			struct label n[] = {
#define endmnemos			{(void*)-1,(void*)-1} };
#define mnemo(n,c,p)			{0,0,n,NOREDEF,L_MNEMO,p,c},
#define directive(n,c)			{0,0,n,NOREDEF|NOLABEL,L_MNEMO,0,c},
#define address(n,a)			{0,0,n,NOREDEF,L_ABSOLUTE,0,a},
#define directbit(n,a,b)		{0,0,n,NOREDEF,L_DIRECTBIT,b,a},
#define regs(n,r)			{0,0,n,NOREDEF,L_REGS,r,0,(1<<r)},

#define bindvocabulary(n)		init_label_list(n)

#define startcpu			struct cpulist cpulist[] = {
#define endcpu				{0,0} };
#define newcpu(c,i,a)   		{c,a,i,},


struct cpulist {  char  *name;
		  int    code;
                  void (*init)(); };

#endif