#include int main() { int halt=0; FILE *file=fopen("file", "r"); unsigned char byte; while ((fread(&byte,1,1,file))) { /* true until EOF */ switch (byte) { case (0xcd): /* notice: 1,1 means one byte at a time */ fread(&byte,1,1,file); printf("INT %d\n",(int)byte); break; case (0xf4): halt=1; break; default: break; /* could use this for something too */ } if (halt==1) break; /* still more ...