// test.c // Temporary .c file where arbitrary tests are carried out. #include"headers/include.h" //LOOK INTO PTHREADS #include"headers/debug.h" int main(int argc, char *argv[]){ AppleOn(); byte c; // Interpreter loop while(1){ do { c = getc(stdin); } while (c == '\n' || c == ' '); if (c == 'P' || c == 'p'){ dStatusDump(); continue; } if (c == 'M' || c == 'm'){ c = dCharToNum(getc(stdin)) << 4; c += dCharToNum(getc(stdin)); dPageDump(c); continue; } // From here on it is expected input will be mostly correct c = dCharToNum(c) << 4; c += dCharToNum(getc(stdin)); address x = 0x0000; char z; for(int i = ((fAddressGetLengthPrempt(c) * 2) - 2); i > 0; i--) { z = getc(stdin); if (z != '\n'){ x += dCharToNum(z) << ((4 * (i - 1))); }else{ i++; } } callInstructionTable(c, x); } }