Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!ig!ames!amelia!eos!shelby!portia!kodali From: kodali@portia.Stanford.EDU (VAS KODALI) Newsgroups: comp.sys.apple Subject: Sneaky LF -> CR Summary: Faster way then BASIC... Message-ID: <4196@portia.Stanford.EDU> Date: 2 Aug 89 22:33:14 GMT Sender: VAS KODALI Reply-To: kodali@Portia.Stanford.EDU (VAS KODALI) Organization: Stanford University Lines: 36 Well, I ran into this nasty problem, of trying to convert LF to CR. After writing a quick & dirty BASIC program to convert, and watching it take over 20 minutes to run, I decided to get nasty. It's a real simple matter to write a quick assembly (gasp!) program that will search a range from, say, $1000 to $8000, and replace every occurance of LF to CR (I don't have the hex values in front of me..) This routine runs instantaneously, cause it's so simple. Just load your text file into memory like such: ]bload filename,a$1000,ttxt (if it's a text file, which it should be) and then execute the assembly program, and save the file out. If you save it under a different name, you will have to CREATE a file first, like so: CREATE FILENAME.CONV,TTXT and then bsave it: bsave filename,a$1000,ttxt,l$xxxx The length is found from either the catalog entry or immediately after you bload the file, do a BEDB (or BED7, I'm not exactly sure- one is length, one is location) If the file is bigger than $7000, you will have to split it up and convert it that way. I've never done it, because I don't know exactly how to use the B parameter...as in BLOAD FILENAME,A$1000,L$7000,B$???? --Chan Wilson 'noshin' right along....