Path: utzoo!attcan!uunet!lll-winken!ames!xanth!mcnc!rutgers!att!chinet!patrick From: patrick@chinet.chi.il.us (Patrick A. Townson) Newsgroups: comp.sys.apple Subject: Re: Getting a CATALOG into a file Message-ID: <7525@chinet.chi.il.us> Date: 26 Jan 89 01:31:05 GMT References: <410f8301.14dd6@c> Reply-To: patrick@chinet.chi.il.us (Patrick A. Townson) Organization: Chinet - Public Access Unix Lines: 61 In article <410f8301.14dd6@c> bauer@procase.UUCP (Jerry Bauer) writes: >Under ProDOS, in APPLESOFT, how can one get a list of the files on >a given disk (CATALOG) into a file? > >This code DOESN'T work: > >100 PRINT CHR$(4);"OPEN TEMP.CATALOG" >110 PRINT CHR$(4);"WRITE TEMP.CATALOG" >120 CATALOG >130 PRINT CHR$(4);"CLOSE TEMP.CATALOG" > >because line 120 becomes: > >120 C AT A LOG > You might write line 120 to say PRINT CHR$(4)"CATALOG". Issuing it that way will prevent the inappropriate parsing. You might also write line 120 to say CALL XXXXX, where XXXXX is the pro-DOS location for the catalog routine. (In DOS 3.3, 'call 42350' will do a catalog. I do not know what the pro-DOS location would be.) >(Isn't APPLESOFT wonderful?) Yep. It sure is. I've used it for years in programming on my Bell & Howell Apple 2+ (the 'black apples'). I have yet to find something I wanted to do which could not be programmed easily using a combination of Applesoft, Calls, and a little assembly code. In fact I do what assembly is required right in the APPLESOFT program itself with POKES. Or sometimes I write a short routine at 768 to interact with Applesoft as required. Applesoft does require a little imagination at times, and a good working knowledge of how it goes about its business is important. By the way, I would also suggest one other change when you write that catalog to a file: If you have a long catalog, it is going to pause after about a screenful and wait for a keypress, which it will never find since the computer is getting its input from the disk. To temporarily suspend catalog pause (that is, to play the entire catalog without stopping after a screen) -- 115 FOR LOOP=44596 TO 44598: POKE LOOP,234: NEXT LOOP: REM You have to NOP those three instructions which cause the catalog to pause. 125 POKE 44596,206: POKE 44597,157: POKE 44598,179: REM To restore DOS to normal operation where catalog pausing is concerned. Again, the above applies to DOS 3.3. You would need to substitute Pro-DOS locations. But the need for the adjustment is the same using either DOS I believe. Patrick -- Patrick Townson patrick@chinet.chi.il.us / US Mail: 60690-1570 (personal zip code) FIDO: 115/743 / AT&T Mail: 529-6378 (!ptownson) / MCI Mail: 222-4956