view 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
line wrap: on
line source

#ifndef __OPERATIONS_H
#define __OPERATIONS_H

#include <std.h>
#include <stack.h>

enum Operation {PRINT, ADD, SUB, MULT, DIV, POW, DUP, DROP, LOG, EXP, SWAP, MAXOP};
extern const char operationNames[MAXOP][10];
extern void (*operation[MAXOP])(Stack*);

void op_math1(Stack *stack, eltType (*mathop)(eltType));
void op_math2(Stack *stack, eltType (*mathop)(eltType, eltType));

void op_print(Stack *stack);
void op_add(Stack *stack);
void op_sub(Stack *stack);
void op_mult(Stack *stack);
void op_div(Stack *stack);
void op_pow(Stack *stack);
void op_dup(Stack *stack);
void op_drop(Stack *stack);
void op_log(Stack *stack);
void op_exp(Stack *stack);
void op_swap(Stack *stack);

#endif //__OPERATIONS_H