Path: utzoo!attcan!uunet!olivea!samsung!usc!elroy.jpl.nasa.gov!ncar!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Forth vs C Message-ID: <2105.UUL1.3#5129@willett.pgh.pa.us> Date: 13 Dec 90 12:34:44 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 36 Date: 12-08-90 (08:48) Number: 455 of 483 To: NMORGENSTERN Refer#: NONE From: STEVE PALINCSAR Read: NO Subj: FORTH VS C Status: PUBLIC MESSAGE Conf: FORTH (58) Read Type: GENERAL (+) There's a very similar word in HS/Forth called FILE? You give it the address of a string containing the file spec, and it returns a false flag if the file does not exist, or a true flag if it does. The other function is very similar to something I was working on a couple of weeks ago, DRIVE_READY? which uses INT 25 to test a drive by attempting to read sector zero. I got inspired to look into that one by a letter in PC Magazine which described a very strange program that tested drives that way: it included a batch file that created the .COM file by echo'ing ASCII characters into a .COM file (using self-modifying code to get around the unprintability of much of the required code), running the .COM file, and then erasing the .COM file. The effort turned our to be interesting, because as the note in Ray Duncan's Advanced MS-DOS mentions, INT 25 destroys the contents of the registers. I finally found a version of a word in HS/Forth's utility for reading native forth disks that had a version of INTCALL that preserved the registers prior to doing absolute sector reads with INT 25. First time I'd ever even looked at that extension. --- ~ MetroLink: Data Bit NETWork * Alexandria, VA * (703) 719-9648 PCRelay:DCINFO -> #16 MetroLink (tm) International Network 4.10 DC Info Exchange MetroLink International Hub <<<>>> ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp