-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathop.h
More file actions
76 lines (59 loc) · 2.05 KB
/
op.h
File metadata and controls
76 lines (59 loc) · 2.05 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* op.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zaz <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/10/04 11:33:27 by zaz #+# #+# */
/* Updated: 2013/11/06 14:21:46 by zaz ### ########.fr */
/* */
/* ************************************************************************** */
/*
** Toutes les tailles sont en octets.
** On part du principe qu'un int fait 32 bits. Est-ce vrai chez vous ?
*/
#define IND_SIZE 2
#define REG_SIZE 4
#define DIR_SIZE REG_SIZE
# define REG_CODE 1
# define DIR_CODE 2
# define IND_CODE 3
#define MAX_ARGS_NUMBER 4
#define MAX_PLAYERS 4
#define MEM_SIZE (4*1024)
#define IDX_MOD (MEM_SIZE / 8)
#define CHAMP_MAX_SIZE (MEM_SIZE / 6)
#define COMMENT_CHAR '#'
#define LABEL_CHAR ':'
#define DIRECT_CHAR '%'
#define SEPARATOR_CHAR ','
#define LABEL_CHARS "abcdefghijklmnopqrstuvwxyz_0123456789"
#define NAME_CMD_STRING ".name"
#define COMMENT_CMD_STRING ".comment"
#define REG_NUMBER 16
#define CYCLE_TO_DIE 1536
#define CYCLE_DELTA 50
#define NBR_LIVE 21
#define MAX_CHECKS 10
/*
**
*/
typedef char t_arg_type;
#define T_REG 1
#define T_DIR 2
#define T_IND 4
#define T_LAB 8
/*
**
*/
# define PROG_NAME_LENGTH (128)
# define COMMENT_LENGTH (2048)
# define COREWAR_EXEC_MAGIC 0xea83f3
typedef struct header_s
{
unsigned int magic;
char prog_name[PROG_NAME_LENGTH + 1];
unsigned int prog_size;
char comment[COMMENT_LENGTH + 1];
} header_t;