-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgetcode.h
executable file
·76 lines (67 loc) · 2.67 KB
/
getcode.h
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
/***************************************************************************
* NESHLA: The Nintendo Entertainment System High Level Assembler
* Copyright (C) 2003,2004,2005 Brian Provinciano, http://www.bripro.com
*
* This program is free software.
* You may use this code for anything you wish.
* It comes with no warranty.
***************************************************************************/
/******************************************************************************/
#ifndef getcodeH
#define getcodeH
/******************************************************************************/
#include "opcodes.h"
/******************************************************************************/
#include "expressions\exp_general.h"
#include "expressions\exp_preprocess.h"
#include "expressions\exp_vardeclare.h"
#include "expressions\exp_funcdeclare.h"
#include "expressions\exp_labels.h"
#include "expressions\exp_funccall.h"
#include "expressions\exp_ifloop.h"
#include "expressions\exp_switch.h"
#include "expressions\exp_asm.h"
/******************************************************************************/
#define CF_GETNEXTWORD 0x0001
#define CF_INOBJECT 0x0002
#define CF_INFUNCTION 0x0004
#define CF_BRACEOK 0x0008
#define CF_BRACED 0x0010
#define CF_MACRO 0x0020
#define CF_VARCHILD 0x8000
/******************************************************************************/
typedef BOOL FASTCALL (*COMPPROC)(U16 flags, S16 *brackCnt);
/******************************************************************************/
enum _ARITHOPS {
ARITHOPS_ADD,
ARITHOPS_SUB,
ARITHOPS_MUL,
ARITHOPS_DIV,
ARITHOPS_MOD,
ARITHOPS_SHR,
ARITHOPS_SHL,
ARITHOPS_XOR,
ARITHOPS_AND,
ARITHOPS_OR,
ARITHOPS_EQ,
ARITHOPS_NE,
ARITHOPS_GTE,
ARITHOPS_LTE,
ARITHOPS_GT,
ARITHOPS_LT,
};
BOOL FASTCALL CompileImmediateInteger(S16 brackCnt, S32 *outnum, S32 set, S32 inval);
/******************************************************************************/
S16 FASTCALL GetCode(U16 flags, S16 *brackCnt);
void FASTCALL CheckSemicolon(void);
void FASTCALL CheckBracksZero(S16 *brackCnt);
void FASTCALL SeekThroughInBracks(S16 *brackCnt);
void FASTCALL PeekThroughInBracks(S16 *brackCnt);
void FASTCALL SeekThroughOutBracks(S16 *brackCnt);
void FASTCALL PeekThroughOutBracks(S16 *brackCnt);
void FASTCALL SeekThroughOutBracksNM(S16 *brackCnt);
void FASTCALL PeekThroughOutBracksNM(S16 *brackCnt);
S32 FASTCALL AccOpNum(int idx, S32 _num2);
/******************************************************************************/
#endif
/******************************************************************************/