#include <stdio.h>
#include <dos.h>
#define FALSE 0
#define TRUE !FALSE



main(argc, argv)
int argc;
char *argv[];
{
   int i, j, k;
   FILE *source;
   union REGS inregs, outregs;
   char hstring[50], temp[6], *sp;
   puts("Bios version 2 channel changer\n");
   if(argc <= 1) {
      puts("Error no file specified.\n");
      return(1);
   }
   if((source = fopen(argv[1], "rb")) == NULL) {
      printf("Error opening %s .\n", argv[1]);
      return(1);
   }
   while(fgets(hstring, 50, source) != NULL) {
      if(sscanf(hstring,"%x,%x,%x", &i, &j, &k) != EOF) {
         inregs.h.al = (char)i;
         inregs.h.bh = (char)j;
         inregs.h.bl = (char)k;
         inregs.h.ah = 0xff;
         int86(0xf8, &inregs, &outregs);
      }
      
   }
}
         
