Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!microsoft!brianw From: brianw@microsoft.UUCP (Brian Willoughby) Newsgroups: comp.sys.apple Subject: Re: File types - Problem with downloads Summary: BASIC.SYSTEM solution Keywords: SYS BIN file types Message-ID: <6156@microsoft.UUCP> Date: 23 Jun 89 17:06:48 GMT References: <2069@dvinci.USask.CA> Reply-To: brianw@microsoft.UUCP (Brian Willoughby) Organization: Microsoft Corp., Redmond WA Lines: 37 In article <2069@dvinci.USask.CA> maton@dvinci.USask.CA (Terry Maton) writes: ... >When I download a EXEcable file and EXEC it, it makes a BIN type file >instead of a SYS type. > >I know there is a file type changer program in the APPLE2-L archives, but >yes - Catch-22 - that file when downloaded and EXEC'd produces a BIN file!!! > > Terry Maton What you need to do is create a new file of type SYS and copy the BIN file to it. In BASIC.SYSTEM you would first CATALOG the directory including the incorrect BIN file and remember it's length. Since SYS files always load at address $2000, you should then BLOAD the BIN file at that address: BLOAD oldfile,A$2000 Then you should create the destination SYS file... CREATE newfile,TSYS and save the BIN file memory image to the new name as a SYS file. BSAVE newfile,TSYS,A$2000,L The is found (in decimal, as I remember) in the full CATALOG display, but not in the shortened CAT command. If you use the wrong length then you'll lose part of the file in the conversion. Of course, this will only work with files that are short enough to load into memory, but that should not affect this kind of file type change because SYS files must be loaded into memory to execute. For other kinds of file type changes, try using a sector editor and the Apple ProDOS Reference Manual list of file type byte codes. Brian Willoughby ...!uw-beaver!microsoft!brianw or microsoft!brianw@uunet.UU.NET or just brianw@microsoft.UUCP