There are several methods that can be used to transfer text files from
MS-DOS-based computers to Macintosh computers. Binary data files can
sometimes be transferred, depending on the format of the information
they contain. It is useless to transfer binary executable program
files, as the machine code of MS-DOS computers (based on the Intel
chip set) and the Macintosh computers (based on the Motorola chip set)
is very different.
This information applies to Microsoft QuickBASIC for the Macintosh
Version 1.00, to Microsoft QuickBASIC Versions 4.00, 4.00b, and 4.50
for MS-DOS, to Microsoft BASIC Compiler Versions 6.00 and 6.00b for
MS-DOS and MS OS/2, and to Microsoft BASIC Professional Development
System (PDS) Version 7.00 for MS-DOS and MS OS/2.
The following are several methods for transferring files between the
Macintosh and MS-DOS-based computers:
- Newer Macintoshes (current versions of the SE and all models
introduced after the IIx, including the Macintosh IIci, IIcx, and
the Macintosh portable) include the super drive. This drive is able
to read from and write to MS-DOS-formatted disks with the addition
of a special INIT.
A company called Dayna Communications produces an INIT called DOS
Mounter that allows super-drive-equipped computers to read from and
write to MS-DOS formatted disks. Dayna Communications can be
reached at (801) 531-0600.
- Files can also be transferred between MS-DOS machines and
Macintoshes by hooking them together through serial ports and using
communication programs to transfer the information.
A special null-modem cable that is specially designed to connect
Macintoshes and MS-DOS-based computers must be used.
- Modems can be attached to both computers, and the modems can be
hooked together to transfer data. This requires using a
communications program on both machines and having a modem
connected to both the Macintosh and the MS-DOS-based machine.
- The TOPS Network can be used to hook IBM-compatible computers and
Apple Macintosh computers together. Files can then be transferred
over this network. A TOPS FlashCard network card is required for
the IBM-compatible computer, and both the IBM-compatible and
Macintosh computers need special network driver software.
The TOPS Network is produced by TOPS, a Sun Microsystems company.
TOPS can be reached at (408) 562-6000.
- A company called Micro Solutions produces an IBM compatible card
and disk drive called MatchMaker that allows IBM-compatible
computers to read from and write to Macintosh disks. Micro
Solutions can be reached at the following address and phone number:
132 W Lincoln Hwy
Dekalb, IL 60115
Records in Macintosh text files are delimited just by carriage returns
and not by carriage return plus linefeed sequences as on MS-DOS
computers. This can cause problems when transferring MS-DOS text files
to the Macintosh and vice versa. The following two sections discuss
Transferring Text Files from IBM to Macintosh
The interpreter environment in Microsoft QuickBASIC for the Apple
Macintosh automatically accepts source code files that have linefeeds
at the end of lines.
When reading a text data file that was created on an IBM into a
Macintosh program, the extra linefeeds may appear as small square
boxes. The square box is the Macintosh's representation for the
linefeed. The linefeeds need to be stripped from the file for the
Macintosh to work with the file.
After transferring a file from IBM to Macintosh, you might want to
change the file's type to TEXT if the transfer utility (program) does
not do it for you. The following are two ways to change a file's type
- Run the following statements in QuickBASIC:
NAME x$ AS x$, "TEXT"
- Run ResEdit and select the file that you transferred. Press
COMMAND+I or choose Get Info from the File menu. In the box that
pops up, change whatever is in the TYPE box to "TEXT" or the
appropriate type. Close the box and choose to save the changes.
If you also want to change the creator type to determine which
application loads when you double-click the text file, query in this
Knowledge Base for the following words:
SetCreate and creator and double-click
Transferring Text Files from Macintosh to IBM
When text files created on the Macintosh are displayed on an MS-DOS
computer, they will have all the lines of data on one line. This is a
result of the Macintosh not appending a linefeed to the end of each
line of text. This problem can be solved by writing a program on the
Macintosh that will append the required linefeed onto the end of each
line of text (as shown in the Code Example below). The file can then
be transferred over to the MS-DOS computer.
The following source code, written for Microsoft QuickBASIC Version
1.00 for the Apple Macintosh, will read in a text file and output
another text file that is in a suitable format (carriage return plus
linefeed terminating each line) for reading on an MS-DOS-based
INPUT "Source file name: "; SFILE$
INPUT "Output file name: "; OFILE$
OPEN SFILE$ FOR INPUT AS #1
OPEN OFILE$ FOR OUTPUT AS #2
LINE INPUT #1, A$
PRINT #2, A$ ' Don't use a semicolon after A$.
PRINT #2, CHR$(10); ' Appends a linefeed character on each line.
PRINT "All Done!"
Article ID: 57345 - Last Review: January 11, 2015 - Revision: 2.1
- Microsoft QuickBasic Compiler for Macintosh 1.0
- Microsoft QuickBasic 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBasic 4.5 for MS-DOS
- Microsoft BASIC Compiler 6.0
- Microsoft BASIC Compiler 6.0b
- Microsoft BASIC Professional Development System 7.0
|kbnosurvey kbarchive KB57345|