annotate include/operations.h @ 99:2a0aa3efc228

The shell script will now theroretically load the program into memory, will not run it. The shell script loads a program into memory and displays the address but as of now does not jump to it (though it does display the address it would jump to) Added a memset function Added a python script (credit for its writing to Jeff) that sets up a filesystem
author Jonathan Pevarnek <pevarnj@gmail.com>
date Sat, 14 May 2011 19:40:18 -0400
parents 2b19746a4e97
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
1 #ifndef __OPERATIONS_H
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
2 #define __OPERATIONS_H
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
3
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
4 #include <std.h>
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
5 #include <stack.h>
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
6
25
2b19746a4e97 Added stack_destroy, separated programs, added swap operation
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 24
diff changeset
7 enum Operation {PRINT, ADD, SUB, MULT, DIV, POW, DUP, DROP, LOG, EXP, SWAP, MAXOP};
3
0aa0ad9e1cc3 Converted to work with doubles instead of ints (and other changes)
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 2
diff changeset
8 extern const char operationNames[MAXOP][10];
24
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
9 extern void (*operation[MAXOP])(Stack*);
2
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
10
24
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
11 void op_math1(Stack *stack, eltType (*mathop)(eltType));
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
12 void op_math2(Stack *stack, eltType (*mathop)(eltType, eltType));
8
25b2b501a5fa Cleaned up the stack operations
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 7
diff changeset
13
24
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
14 void op_print(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
15 void op_add(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
16 void op_sub(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
17 void op_mult(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
18 void op_div(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
19 void op_pow(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
20 void op_dup(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
21 void op_drop(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
22 void op_log(Stack *stack);
45a80ea314ae The stack now theroretically is a properly working stack!
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 8
diff changeset
23 void op_exp(Stack *stack);
25
2b19746a4e97 Added stack_destroy, separated programs, added swap operation
Jonathan Pevarnek <pevarnj@gmail.com>
parents: 24
diff changeset
24 void op_swap(Stack *stack);
2
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
25
b6182f00de82 The work I have so far
Jonathan Pevarnek <pevarnj@gmail.com>
parents:
diff changeset
26 #endif //__OPERATIONS_H