Jump to content
IGNORED

Open FILE Source (Text / Listing) in Windows from an Atari File


Blues76

Recommended Posts

Hi,

 

I'm trying to convert the following listing from Atari Roots https://www.atariarchives.org/roots/chapter_7.php, The first two in the chapter (maybe the only two) to use in in Eclipse editor compiling with MADS. I know I will have to make some changes.

 

My problem is adding the new line (CR) to the file. I could do it by hand, which I think I will do for now, or I could write a small program to do it. However, there has to be something easier. I searched the forum but I couldn't find how to do this.

 

I don't think the files were saved in Linux because Sublime will open them fine. However, sublime and other editors just see it as a one line. I'm using Windows right now.

 

Maybe they were saved as atari text files?

 

Thanks,

Link to comment
Share on other sites

7 minutes ago, Blues76 said:

Hi,

 

I'm trying to convert the following listing from Atari Roots https://www.atariarchives.org/roots/chapter_7.php, The first two in the chapter (maybe the only two) to use in in Eclipse editor compiling with MADS. I know I will have to make some changes.

 

My problem is adding the new line (CR) to the file. I could do it by hand, which I think I will do for now, or I could write a small program to do it. However, there has to be something easier. I searched the forum but I couldn't find how to do this.

 

I don't think the files were saved in Linux because Sublime will open them fine. However, sublime and other editors just see it as a one line. I'm using Windows right now.

 

Maybe they were saved as atari text files?

 

Thanks,

I think it has to be ATARI text. It seems to be ">" character as EOL (at least it seems when I pasted) into Eclipse. I could write a program to replace that, remove the line numbers and clean the file.

 

Before I do, if there is anything done, I would rather use that.

 

Link to comment
Share on other sites

A couple of one liners for any unix variant.

On Windows, I always install Cygwin to get these functions. I've never been able to get on with powershell.

 

With "tr":

tr '\233' '\n' < ~/Downloads/PRNTSC1.SRC

Equivalent in sed (the king of all line editors)

sed 's#\x9b#\n#g' < ~/Downloads/PRNTSC1.SRC

 

Edited by fenrock
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, fenrock said:

A couple of one liners for any unix variant.

On Windows, I always install Cygwin to get these functions. I've never been able to get on with powershell.

 

With "tr":


tr '\233' '\n' < ~/Downloads/PRNTSC1.SRC

Equivalent in sed (the king of all line editors)


sed 's#\x9b#\n#g' < ~/Downloads/PRNTSC1.SRC

 

Great. I find using git-bash provides many of the functionalities (maybe not all of them) than Cygwin. I have used Cygwin.

 

That's great to know. I have a linux server at the university that I use and my mac (which is in my office right now). But it is great to have this for Windows as well, as I used it a lot.

 

Thanks

Link to comment
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...