Newsgroups: alt.emulators.ibmpc.apple2 Path: nntp.Stanford.EDU!stanford.edu!ames!agate!spool.mu.edu!sol.ctr.columbia.edu!eff!world!tombaker From: tombaker@world.std.com (Tom A Baker) Subject: DSK_OUT - Extract files to MSDOS (inverse of DSK_IN) Message-ID: Organization: Me, at The World Public Access UNIX, Brookline, MA Date: Tue, 19 Jan 1993 02:26:16 GMT Lines: 376 DSK_OUT - Extract files from an Apple ][ DOS 3.3 .DSK file. NOTE: The described software is -------->"RELIEFWARE"<--------, meaning a form of shareware. If you buy this package for $10, I will donate all that money to a homeless shelter nearby. The shelter chosen is subject to change, but the one presently designated is named "Spot Pond" and provides housing on a temporary basis to displaced families, and is located in Stoneham, Massachusetts. This package is not freeware, and I hope that, after you've used it for a week, you'll decide you'll want to legally own it. In return for the money, I will place your name permanently on a mailing list connected with this product, and you'll receive future versions, and if I ever release the source code, you will get that, too. (See below for info on future features.) Tom Baker, Jan, 1993 Please send a ten dollar bill and your E-mail address (preferred) to register to: Tom Baker 237 Main Street, #A-11 Reading, MA 01867 Copyright (C) 1993 Thomas A.J.F. Baker, All Rights Reserved. WHAT IT DOES: Extracts files from .DSKs . The output can be left exactly as it was in the .DSK, suitable for XMODEMing to an Apple. Or it can be converted to MSDOS format -- that is, binary files can be made without embedded addresses and lengths, and text files can be made into MSDOS text files. Someone had asked about this -- This reverses DSK_IN. Invocation: (You can give it whatever name you want, but I'll assume you left it.) dsk_out mt DSK-name Apple-name MSDOS-name (makes MSDOS text file) or dsk_out mb DSK-name Apple-name MSDOS-name (makes MSDOS binary file) or dsk_out a DSK-name Apple-name MSDOS-name (makes no conversions) FIRST ARGUMENT is what is to be exported. where "a" means it needs no conversions. "mt" means it is a MSDOS text file and needs conversion from Apple DOS Text format. (The high bit is cleared, and end-of-line is changed from CR to CRLF.) "mb" means this is to be a MSDOS binary file, and needs conversion from Apple DOS binary format. SECOND ARGUMENT is the .DSK file name. THIRD ARGUMENT is the file name within the .DSK, and therefore can be up to 30 characters long, and can include spaces. It canNOT include lowercase letters. If you need to, you can enclose this argument in quotes to preserve the spaces. Trailing spaces can be ignored. FOURTH ARGUMENT is the MSDOS file name. This file will be created. Return Value: If the program fails, it returns the value "1" which can be detected with the MSDOS batch command "IF ERRORLEVEL 1 THEN ... ". Otherwise, the program returns 0. EXAMPLE: Let's say you have DISK6A.DSK full of stuff you want to print out. In the emulator, you type "CATALOG", and write down the program names. (Or you use the "DSK_CAT" freeware program from MSDOS.) ]CATALOG 010 T ALPHA 010 T BETA 010 T GAMMA 010 T DELTA In this case, there are four files with text in them. You'll dump them to MSDOS, then print them. You hit PrintScreen and go out to MSDOS. > dsk_out mt disk6a.dsk ALPHA alpha > dsk_out mt disk6a.dsk BETA beta > dsk_out mt disk6a.dsk GAMMA gamma > dsk_out mt disk6a.dsk DELTA delta > print alpha beta gamma delta END OF EXAMPLE Negative Notes: Still does not handle anything but Apple DOS 3.3 . So far, untested on any platform besides IBM DOS 3.3, running APL12EM. (That's right ... this is actually a DOS 3.3-DOS 3.3 text converter.) *8) MAKING TEXT FILES To port a Basic program from the Apple to the IBM emulator, you can just XMODEM or KERMIT it. However, if you want to make a text file out of it and transmit that, use the program "capture.txt" below. Leave it as a text file on the Apple disk. When you have a program in memory, EXEC the program (as in "EXEC CAPTURE") and it will load in as lines zero through 9. Running it will save the program as the text file "TEMP", which you can rename to whatever. ----------------------8<------ CUT HERE -->8---- File: capture.txt ----- 0 REM NEW CAPTURE - EXEC THIS WITH A BASIC PROGRAM IN MEMORY 1 PRINT "THE LINES 5 THROUGH 7 ARE AVAILABLE" : REM COPYRIGHT (C) 1981, 1993 2 PRINT "FOR SPECIFYING THE OUTPUT" : REM REM THOMAS A.J.F. BAKER 3 PRINT : LIST 5 - 7: PRINT : PRINT "ANY CHAR TO START, RESET TO ABORT" 4 PRINT CHR$ (4);"OPEN TEMP": PRINT CHR$ (4);"WRITE TEMP" 5 LIST 10- 8 PRINT CHR$ (4);"CLOSE TEMP" 9 END ----------------------8<------ CUT HERE -->8---- File: dsk_out.uue ----- begin 600 dsk_out.exe