Permalink
Browse files

symbolic operators

  • Loading branch information...
samdoshi committed Jan 27, 2016
1 parent b6f41b0 commit 5cf6dd2491e7a70dba904738be867f59c8046888
Showing with 15 additions and 2 deletions.
  1. +15 −2 teletype/teletype.c
View
@@ -801,7 +801,7 @@ static void op_ER(void);
#define MAKEOP(name, params, returns, doc) {#name, op_ ## name, params, returns, doc}
#define OPS 54
#define OPS 67
// DO NOT INSERT in the middle. there's a hack in validate() for P and PN
static const tele_op_t tele_ops[OPS] = {
MAKEOP(ADD, 2, 1,"[A B] ADD A TO B"),
@@ -857,7 +857,20 @@ static const tele_op_t tele_ops[OPS] = {
MAKEOP(UNMUTE, 1, 0,"UNMUTE INPUT"),
MAKEOP(SCALE, 5, 1,"SCALE NUMBER RANGES"),
MAKEOP(STATE, 1, 1,"GET INPUT STATE"),
MAKEOP(ER, 3, 1,"EUCLIDEAN RHYTHMS")
MAKEOP(ER, 3, 1,"EUCLIDEAN RHYTHMS"),
{"+", op_ADD, 2, 1, "[A B] ADD A TO B"},
{"-", op_SUB, 2, 1,"[A B] SUBTRACT B FROM A"},
{"*", op_MUL, 2, 1,"[A B] MULTIPLY TWO VALUES"},
{"/", op_DIV, 2, 1,"[A B] DIVIDE FIRST BY SECOND"},
{"%", op_MOD, 2, 1,"[A B] MOD FIRST BY SECOND"},
{"==", op_EQ, 2, 1,"LOGIC: EQUAL"},
{"!=", op_NE, 2, 1,"LOGIC: NOT EQUAL"},
{"<", op_LT, 2, 1,"LOGIC: LESS THAN"},
{">", op_GT, 2, 1,"LOGIC: GREATER THAN"},
{">>", op_RSH, 2, 1, "RIGHT SHIFT"},
{"<<", op_LSH, 2, 1, "LEFT SHIFT"},
{"&&", op_AND, 2, 1,"LOGIC: AND"},
{"||", op_OR, 2, 1,"LOGIC: OR"}
};
static void op_ADD() {

1 comment on commit 5cf6dd2

@tehn

This comment has been minimized.

Show comment
Hide comment
@tehn

tehn Mar 20, 2016

shall we do this? looks good for power users.

tehn commented on 5cf6dd2 Mar 20, 2016

shall we do this? looks good for power users.

Please sign in to comment.