forked from nzeemin/ukncbtl-wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdafx.h
51 lines (35 loc) · 1.33 KB
/
stdafx.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
#define PRODUCT
#include <string.h>
#include <stdio.h>
#include <cstdio>
#include <cstdlib>
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef signed short int int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
typedef unsigned long long uint64_t;
#define MAKELONG(a, b) ((uint16_t)(((uint16_t)(((uint32_t)(a)) & 0xffff)) | ((uint32_t)((uint16_t)(((uint32_t)(b)) & 0xffff))) << 16))
#define MAKEWORD(a, b) ((uint16_t)(((uint8_t)(((uint32_t)(a)) & 0xff)) | ((uint16_t)((uint8_t)(((uint32_t)(b)) & 0xff))) << 8))
typedef char TCHAR;
#define _T(x) x
typedef const char * LPCTSTR;
#define _tfopen fopen
#define _tfsopen _fsopen
#define _tcscpy strcpy
#define _tstat _stat
#define _tcsrchr strrchr
#define _tcsicmp strcasecmp
#define _sntprintf snprintf
#define CALLBACK
#define ASSERT(f) ((void)0)
#define VERIFY(f) ((void)f)
// DebugPrint and DebugLog
void DebugPrint(LPCTSTR message);
void DebugPrintFormat(LPCTSTR pszFormat, ...);
void DebugLogClear();
void DebugLogCloseFile();
void DebugLog(LPCTSTR message);
void DebugLogFormat(LPCTSTR pszFormat, ...);
// Processor register names
const LPCTSTR REGISTER_NAME[] = { _T("R0"), _T("R1"), _T("R2"), _T("R3"), _T("R4"), _T("R5"), _T("SP"), _T("PC") };