Click here to Skip to main content
Click here to Skip to main content

Building a Programming Language: Part II (Adding Conditions, Loop and Blocks to BrainLess)

By , 20 Jan 2011
 
#ifndef __BRAINLESS_CONSTS_DEFINES__
#define __BRAINLESS_CONSTS_DEFINES__
/*
Author : Shakti Misra
All are welcome to use these files, distribute, modify and release. But This notice should be included.
This software is given as is, for use and modification.
*/

#ifndef DIM
#define DIM( a ) ( sizeof(a)/sizeof(a[0]) )
#endif

#define BCHAR( a ) #a
#define WBCHAR( a ) L ## #a

#define VM_VERSION v0.2

#define REGISTER_FILE 4

#define TAPE_SIZE 64
#define ARR_SIZE_128 128
#define BUFFER_SIZE 256

const unsigned int BLOCK_NAME_SIZE = 256;

typedef int BOOL;
#define TRUE 1
#define FALSE 0

//Hex constants
#define HEX_0 0x00000000
#define HEX_1 0x00000001
#define HEX_2 0x00000002
#define HEX_3 0x00000003
#define HEX_4 0x00000004

#define COMPARE_FLAG_MASK 0x00000003

//Data types
typedef unsigned long ulong;

#endif //__BRAINLESS_CONSTS_DEFINES__

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)

About the Author

Shakti Misra
Engineer
India India
Member
I like to explore different aspects of technology. Try new things, and get delighted. My interests are programming language, and Imaging. But its not hard to work on other things also. Algorithms delight me over a coffee break.
 
I basically code in C++, but JAVA is not so alien for me. I know few scripting languages also. Basically I feel that knowing a programing language is just a matter of getting introduced to it.
 
https://github.com/BrainlessLabs
 
http://in.linkedin.com/pub/shakti-misra/12/276/7aa
 
http://dl.acm.org/citation.cfm?id=1341782
 
http://www.luxrender.net/en_GB/authors_contributors - SMISRA

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 20 Jan 2011
Article Copyright 2010 by Shakti Misra
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid