-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBoxInfo.h
More file actions
116 lines (104 loc) · 2.04 KB
/
BoxInfo.h
File metadata and controls
116 lines (104 loc) · 2.04 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#ifndef BOXINFO_H
#define BOXINFO_H
/*****************************************************************************************************************
* PROGRAM DESCRIPTION
*
* @program BOX programming language virutal machine
* @file BOXVM.cpp
* @purpose Defines headers, constants, type definitions and macros specified by operation system.
*
* @author Duje Senta
* @company Faculty of Electrical Engineering, Mechanical Engineering and Naval Architecture, Split
* @version 0.6 27/04/2015
*
*****************************************************************************************************************/
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#include <Windows.h>
#endif
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#if defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
#include <unistd.h>
#endif
#define null 0
#define MAX_BUFFER_SIZE 8
#define MAXFILESIZE 1048576
#define MAXPATHSIZE 1024
#define MAX_BUFFER_WORD 128
#define MAXLOOPSIZE 8
#define BLOCK_SIZE 4096
typedef unsigned int Type;
typedef unsigned int Status;
typedef char *Address;
typedef char *Bcode;
typedef char Byte;
typedef unsigned int Size;
typedef unsigned int Count;
char *BOXVM_PATH = null;
enum DATA_TYPES
{
BOX_CHAR,
BOX_INT,
BOX_FLOAT,
BOX_LONG,
BOX_DOUBLE,
BOX_STRING
};
const Size DATA_TYPES_SIZE[6] =
{
1,
4,
4,
8,
8,
0
};
enum OPERATIONS
{
MOV,
ADD,
MUL,
DIV,
SUB,
MOD,
RAND,
SCAN,
PRINT,
PRINTLN,
ADI,
MUC,
DIC,
SUC,
MODC,
CMPE,
CMPNE,
CMPG,
CMPL,
CMPGE,
CMPLE,
LOOPE,
LOOPNE,
LOOPG,
LOOPL,
LOOPGE,
LOOPLE,
NEW,
NEWV,
FREE,
OPENW,
OPENR,
OPENA,
PUT,
GET,
GETLINE,
REPLOOP,
RUN,
START,
ESTART
};
#endif