Jump to content
TheGrandPubaa

Typing in Basic programs on modern computer

Recommended Posts

I'm extremely new to actually using the CoCo 2 and basic code in general. So I found some sample basic code in an old december issue of The Rainbow that does a little Xmas demo and i'm wondering if there is a way to type it in on my modern computer(this one is a Macbook Pro, but I can also run windows so i'm fairly platform agnostic) in a text editor and convert that file to a cassette image or a disk image I can load on the CoCo? Does this even make sense?

Share this post


Link to post
Share on other sites

The "Toolshed" utilities can help you with that.

 

http://sourceforge.net/projects/toolshed/

You will need to edit program.bas as you see fit, then execute a sequence like this:

rm -f example.dsk

decb dskini example.dsk
decb copy -0 -b -l -t program.bas example.dsk,PROGRAM.BAS

Mounting example.dsk in your favorite emulator is left as an exercise for the reader...

Edited by linville
  • Like 1

Share this post


Link to post
Share on other sites

I'm extremely new to actually using the CoCo 2 and basic code in general. So I found some sample basic code in an old december issue of The Rainbow that does a little Xmas demo and i'm wondering if there is a way to type it in on my modern computer(this one is a Macbook Pro, but I can also run windows so i'm fairly platform agnostic) in a text editor and convert that file to a cassette image or a disk image I can load on the CoCo? Does this even make sense?

Yes, you can use a utility to save the program as a .wav audio file to load in a real CoCo; sounds like that is what you are trying to do.

Share this post


Link to post
Share on other sites

The "Toolshed" utilities can help you with that.

 

http://sourceforge.net/projects/toolshed/

You will need to edit program.bas as you see fit, then execute a sequence like this:

 

rm -f example.dsk

decb dskini example.dsk

decb copy -0 -b -l -t program.bas example.dsk,PROGRAM.BAS

 

Mounting example.dsk in your favorite emulator is left as an exercise for the reader...

This was very helpful and worked so far as to get the basic code listing on a disk image that I could then test in an emulator. However, it gives me a syntax error on the first line with actual code when I load the .bas program from the example dsk. When I type in the same line of code from scratch in the emulator, it seems to work fine. So I take this to mean there may be some kind of formatting issue with the code I entered into Notepad? For what it's worth, I pieced together the listing from a December issue of the Rainbow magazine from '82 that was scanned in on archive.org. The scanner OCR was naturally not perfect, so I went through line by line and made sure it was accurate to the actual PDF of the magazine so I think the code is fine.

Share this post


Link to post
Share on other sites

Does the Mac use some unusual/different character to end a line? Something other than what the Coco is expecting?

 

It has been ~20 years since I last used a Mac, but I vaguely recall a similar problem moving text files from the Mac to the PC. The text mainly looked OK, but there was some odd EOL character or code that caused me problems. I know that I found software to automatically "reformat" the files, but the details are now very long forgotten.

Share this post


Link to post
Share on other sites

Does the Mac use some unusual/different character to end a line? Something other than what the Coco is expecting?

 

It has been ~20 years since I last used a Mac, but I vaguely recall a similar problem moving text files from the Mac to the PC. The text mainly looked OK, but there was some odd EOL character or code that caused me problems. I know that I found software to automatically "reformat" the files, but the details are now very long forgotten.

 

The Mac ( and the Apple ][ ) end a Line with the Carriage Return ( ASCII Code 13 )

UN*X ( and BSD and Linux ) end a Line with the Line Feed ( ASCII Code 10 )

MS-DOS, and Windows end a Line with the Carriage Return ( ASCII Code 13 ) followed with the Line Feed ( ASCII Code 10 )

 

MarkO

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...