home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 10 / amigaformatcd10.iso / -in_the_mag- / emulation / abeeb_beta / patches / pch.c < prev   
C/C++ Source or Header  |  1996-04-11  |  327b  |  28 lines

  1. #include <stdio.h>
  2. #include <fcntl.h>
  3.  
  4. main()
  5. {
  6.     unsigned char    x [ 16384 ];
  7.     int                fd;
  8.  
  9.     fd = open ( "OS1.2p1.rom", O_RDWR );
  10.     read ( fd, x, 16384 );
  11.  
  12.     /*
  13.      * The OSFILE trap
  14.      */
  15.  
  16.     x [ 0x327d ] = 0x22;
  17.  
  18.     /*
  19.      * The OSFSC trap
  20.      */
  21.  
  22.     x [ 0x31b1 ] = 0x02;
  23.  
  24.     lseek ( fd, 0, SEEK_SET );
  25.     write ( fd, x, 16384 );
  26.     close ( fd );
  27. }
  28.