I keep getting an error with RangeCheck, read, prntword. The errors are:
undefined reference to RangeCheck(short, short, short)
undefined reference to read(short*, bool)
undefined reference to prntword(short)
I tried to change where I placed the functions (above main, in main), but I've no idea what to do to fix the error.
#include <stdio.h>
#include <stdlib.h>
#define READ  10
#define WRITE 11
#define LOAD  20
#define STORE 21
#define ADD   30
#define SUBTRACT 31
#define DIVIDE 32
#define MULTIPLY 33
#define BRANCH 40
#define BRANCHNEG 41
#define BRANCHZERO 42
#define HALT  43
#define CELLS 100
#define RANGE 9999
#define SENTINEL -1
#define DEBUG 0
short RangeCheck(short word, short min, short max);
char* prntword(short word);
bool read(short *data, bool check);
int main()
{
    bool error = false;
    char *word, OperationCode, Operand;
    short memory[CELLS], InstructionRegister;
    int counter, Accumulator;
    Accumulator = 0;
    for (int i = 0; i < CELLS; i++) {
        memory[i] = 0;
    }
    for (counter = 0; !error; counter++); {
        counter = RangeCheck(counter, 0, CELLS - 1);
        InstructionRegister = memory[counter];
        OperationCode = InstructionRegister / 100;
        Operand = InstructionRegister % 100;
    } 
    switch(OperationCode) {
        case READ:
            read(&memory[Operand], false);
            break;
        case WRITE:
            printf("%s\n", word = prntword(memory[Operand]));
            break;
        case LOAD:
            Accumulator = memory[Operand];
            break;
        case STORE:
            memory[Operand] = RangeCheck(Accumulator, -RANGE, RANGE);
            break;
        case ADD:
            Accumulator += memory[Operand];
            break;
        case SUBTRACT:
            Accumulator -= memory[Operand];
            break; 
        case DIVIDE:
            Accumulator /= memory[Operand];
            break;
        case MULTIPLY:
            Accumulator *= memory[Operand];
            break;
        case BRANCH:
            break;
    }
}
 
     
     
     
    