Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

applesoft <-> text basic

40 views
Skip to first unread message

Jim Spath 410-631-3318, MD Dept of Environment.2500 Broening Hwy.Balt MD 21224-6612

unread,
Nov 29, 1993, 9:19:00 PM11/29/93
to
I dug up some old Microsoft BASIC programs to show my soon-to-be
5 year-old some simple arithmetic/computer tricks, and was
wondering how to load them into Applesoft on my //e. I get a
message that says "FILE TYPE MISMATCH," after transferring the
ASCII-saved code from (shudder) CP/M origins to PRODOS. Any
hints or suggestions? <S...@NCCIBM1.BITNET> /jim spath

Mark Manning

unread,
Nov 30, 1993, 11:05:43 AM11/30/93
to
In article <"93-11-29-21:19:29.79*SPA"@NCCIBM1.BITNET>, S...@NCCIBM1.BITNET
(Jim Spath 410-631-3318, MD Dept of Environment.2500 Broening Hwy.Balt MD

The problem here is that the programs were originally under CP/M.

When you saved the files, are you sure you saved them as text? If, the
original program was saved as a tokenized file under CP/M and then you
saved to the same file name as a text file, then sometimes MBASIC (or
GBASIC or CBASIC or whichever one you used) will abort without telling
you it aborted OR it will save as a tokenized file even though you
told it to do otherwise.

Then there is the question of how you transferred the program from
CP/M to ProDOS (or DOS 3.3). If you do not have it, you should get
Chameleon. It will transfer the files for you without any kind of
problem.

So let's say you get past the two things above and you have an
actual text file. Under DOS 3.3 (and I believe Applesoft under
ProDOS allows for this as well), you would type:

EXEC <Filename>

to get the program back into memory. Unfortunately, this is only
the start of your problems. Unless the program is very generic,
you will find that the commands under CP/M's basic will not work
under Applesoft. Now, this is not to say that commands such as
IF-THEN won't work, but it does mean that the IF-THEN-ELSE won't
work. LOCATE doesn't work, the graphic commands won't work, and
other things won't work. But so long as you stick with the basic
BASIC commands you should be ok. :)

If, when you do the EXEC command, you get errors, then your best
bet is to use a text editor program and look at the file. You
should be able to detect where there are strange control characters
within the file and remove them. Or, on the other hand, you might
wind up writing a small BASIC program to convert the file to a
more standard text file. Such as:

10 ?"^Dopen myfile"
20 ?"^Dread myfile"
30 ?"^Dopen newfile"
40 ?"^Dwrite newfile"
50 ?"^Dread myfile"
60 onerr goto 150
70 a$=""
80 get b$
90 if asc(b$)>127 then b$=chr$(asc(b$)-128)
100 if b$<" " and b$<>chr$(13) then b$=" "
110 if b$<>chr$(13) then a$=a$+b$:goto 80
120 ?"^Dwrite newfile"
130 ? a$
140 goto 50
150 ?"^Dclose"
160 poke 216,0
170 ?"Finished."
180 end

This little program should remove any weird characters your file
has and make it usuable by Applesoft via the EXEC command.

Later.

----------------------------------------------------------------------------
I saw a mountain rising. Rising above the sea. I heard the wind calling.
Calling unto me. Oh, who has seen the sunset? Who has seen it rise? Who
could ever be so blind? As to never open their eyes? - Mark Manning

ma...@trillian.jsc.nasa.gov

Phillip Vandry

unread,
Nov 30, 1993, 11:26:36 AM11/30/93
to
S...@NCCIBM1.BITNET (Jim Spath 410-631-3318, MD Dept of Environment.2500 Broening Hwy.Balt MD 21224-6612) writes:

>message that says "FILE TYPE MISMATCH," after transferring the
>ASCII-saved code from (shudder) CP/M origins to PRODOS. Any
>hints or suggestions? <S...@NCCIBM1.BITNET> /jim spath

The file isn't saved as an Applesoft BASIC file. Use:

]NEW
]EXEC ascii-basic-file
]SAVE applesoft-basic-file

You will get a lot of blank prompts as the program is read in. You may also
get various errors. those mean Applesoft didn't understand something about
the program. Also, be sure every line has a number.

You may want to run the programs through a text editor and use search and
replace to port the programs first.

-Phil

Paul Parkhurst

unread,
Nov 30, 1993, 8:13:00 PM11/30/93
to

Try "-file" or "exec file" Also, be prepared for syntax errors when you run
the program, since Applesoft and CP/M BASICs will probably have some
differences.

-- Paul Parkhurst
Author of ANSITerm Telecommunications Software for the Apple IIGS
Delphi & GEnie: PMP OGG-Net: User #1 (Oggman), Infinity's Edge
Internet: p...@delphi.com -OR- p...@genie.geis.com
Voice: (510) 837-9098 BBS: (510) 820-9401
Sent by ANSITerm at 1:10:46 AM on 1-Dec-93

"Computer Make Very Fast, Very Accurate Mistakes.."

----
+------------------------------------------------------------------------+
| The Transfer Station BBS (510) 837-4610 & 837-5591 (V.32bis both lines)|
| Danville, California, USA. 1.5 GIG Files & FREE public Internet Access |
+------------------------------------------------------------------------+

0 new messages