Newer
Older
Scratch / ubix3 / src / boot / writeimg.c
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 488 bytes Scratch
/**************************************************************************************
$Id: writeimg.c,v 1.6 2002/04/24 07:54:53 clive Exp $


**************************************************************************************/

#include <stdio.h>

int main(int argc, char **argv) {
  FILE *in,*out;
  int tmp;

  in = fopen("bootsec","rb");
  out = fopen(argv[1],"r+b");
  while(!feof(in)) {
    tmp = fgetc(in);
    fputc(tmp,out);
    }
  close(in);
  close(out);
  return(0);
  }