[Home] [Back]

An Interpreter For Attiny85

TGRK (Tiny General Reusable Keywords)

About TGRK

TGRK is an extremely simplified version of GORK, an interpreted language I am buiding with C. It is designed specigically to run on the TBM.

Features

Base Features:

Input/Output:

Builtin Functions:

TGRK Keyword Tables

Below are the keywords for TGRK. There is absolutely no ASCII association with any of these. Keywords are all negative numbers. Any positive number in TGRK is processed as an integer.

All caps keywords and their decimal equivalent can be used to write programs in the default program array. This is useful for having a default program to load, or for testing reasons.

Example (both of these are the same):
int8_t prog[MAX] = { R1, 0, SEP };
int8_t prog[MAX] = { -127, 0, -1 };

Binary data for keyword is what is used to program TGRK on the TBM. This is the lookup table for that.

Symbols:

KEYWORD DECIMAL NIBBLE 1 NIBBLE 2 DESCRIPTION
SEP -1 1111 1111 Expression Seperator
FUNC -2 1111 1110 Function Block Symbol
ADD -3 1111 1101 Math +
SUB -4 1111 1100 Math -
MUL -5 1111 1011 Math *
DIV -6 1111 1010 Math /
AND -7 1111 1001 Condition Joiner
OR -8 1111 1000 Condition Joiner

Conditions:

KEYWORD DECIMAL NIBBLE 1 NIBBLE 2 DESCRIPTION
CG -11 1111 0101 >
CL -12 1111 0100 <
CE -13 1111 0011 = =
CNE -14 1111 0010 !=
CGE -15 1111 0001 >=
CLE -16 1111 0000 <=