Jump to content



2

Copying text from a BASIC listing to the PC


27 replies to this topic

#1 therealbountybob OFFLINE  

therealbountybob

    River Patroller

  • 3,235 posts
  • Lost
  • Location:In Space

Posted Sat Jul 18, 2009 4:19 AM

I have APE. I want to be able to paste some of my BASIC code here for getting some help but cannot see a way of doing this apart from screen shotting from the emulator. HELP :)

#2 spookt OFFLINE  

spookt

    Stargunner

  • 1,524 posts
  • This is SPARTA(DOS)
  • Location:North East UK

Posted Sat Jul 18, 2009 4:22 AM

Hmm, can't you LIST it to one of the H: devices in the emulator? Should give you a text file. One of them even handles ATASCII to ASCII conversion I think. Sorry don't have a windows machine here to try it but I've done it in the past. How about printer support in the emulator? Doesn't that create txt files?

#3 Rybags ONLINE  

Rybags

    Quadrunner

  • 10,312 posts
  • Location:Australia

Posted Sat Jul 18, 2009 5:00 AM

LIST "H6:filename.TXT" performs conversion to normal ASCII.

Or just setup the "P:" device so it gets sent to Notepad.

#4 therealbountybob OFFLINE  

therealbountybob

    River Patroller

  • 3,235 posts
  • Lost
  • Location:In Space

Posted Sat Jul 18, 2009 5:05 AM

View Postspookt, on Sat Jul 18, 2009 4:22 AM, said:

Hmm, can't you LIST it to one of the H: devices in the emulator? Should give you a text file. One of them even handles ATASCII to ASCII conversion I think. Sorry don't have a windows machine here to try it but I've done it in the past. How about printer support in the emulator? Doesn't that create txt files?
Thanks spookt, I've just tried this by enabling "H: Patch for hard disk access" (atari800win+) and then listing the file using LIST "H:TEST"
It has produced a PC file but the lines are not truncated
e.g.
10 REM
20 ? "HELLO"
Becomes:
10 REM ›20 ? "HELLO"›

[edit just seen other post will give that a try, thanks Rybags
The H6 method works fine. Thanks again. Jason
10 REM
20 ? "WASUUP"

Edited by therealbountybob, Sat Jul 18, 2009 5:27 AM.


#5 atariksi OFFLINE  

atariksi

    Quadrunner

  • 5,337 posts

Posted Sat Jul 18, 2009 5:47 AM

View Posttherealbountybob, on Sat Jul 18, 2009 7:05 AM, said:

View Postspookt, on Sat Jul 18, 2009 4:22 AM, said:

Hmm, can't you LIST it to one of the H: devices in the emulator? Should give you a text file. One of them even handles ATASCII to ASCII conversion I think. Sorry don't have a windows machine here to try it but I've done it in the past. How about printer support in the emulator? Doesn't that create txt files?
Thanks spookt, I've just tried this by enabling "H: Patch for hard disk access" (atari800win+) and then listing the file using LIST "H:TEST"
It has produced a PC file but the lines are not truncated
e.g.
10 REM
20 ? "HELLO"
Becomes:
10 REM ›20 ? "HELLO"›

[edit just seen other post will give that a try, thanks Rybags
The H6 method works fine. Thanks again. Jason
10 REM
20 ? "WASUUP"

It converted the "HELLO" to "WASUUP". PCs prefer WASUUP.

#6 therealbountybob OFFLINE  

therealbountybob

    River Patroller

  • 3,235 posts
  • Lost
  • Location:In Space

Posted Sat Jul 18, 2009 5:53 AM

View Postatariksi, on Sat Jul 18, 2009 5:47 AM, said:

View Posttherealbountybob, on Sat Jul 18, 2009 7:05 AM, said:

View Postspookt, on Sat Jul 18, 2009 4:22 AM, said:

Hmm, can't you LIST it to one of the H: devices in the emulator? Should give you a text file. One of them even handles ATASCII to ASCII conversion I think. Sorry don't have a windows machine here to try it but I've done it in the past. How about printer support in the emulator? Doesn't that create txt files?
Thanks spookt, I've just tried this by enabling "H: Patch for hard disk access" (atari800win+) and then listing the file using LIST "H:TEST"
It has produced a PC file but the lines are not truncated
e.g.
10 REM
20 ? "HELLO"
Becomes:
10 REM ›20 ? "HELLO"›

[edit just seen other post will give that a try, thanks Rybags
The H6 method works fine. Thanks again. Jason
10 REM
20 ? "WASUUP"

It converted the "HELLO" to "WASUUP". PCs prefer WASUUP.
Aaaahh :idea:

#7 Synthpopalooza OFFLINE  

Synthpopalooza

    Moonsweeper

  • 299 posts
  • Location:knoxville, TN

Posted Tue Jul 21, 2009 12:51 PM

There is a program called MemoPad (at joyfulcoder.net) which will read and convert text files between ascii/atascii. I believe this will serve your purposes quite well!

#8 joyfulcoder OFFLINE  

joyfulcoder

    Space Invader

  • 48 posts
  • Location:Western Mass

Posted Wed Jul 22, 2009 8:27 AM

View PostSynthpopalooza, on Tue Jul 21, 2009 1:51 PM, said:

There is a program called MemoPad (at joyfulcoder.net) which will read and convert text files between ascii/atascii. I believe this will serve your purposes quite well!

Thank you for the MemoPad plug. MemoPad is actually on my .com site. The full URL is joyfulcoder.com/memopad/

#9 therealbountybob OFFLINE  

therealbountybob

    River Patroller

  • 3,235 posts
  • Lost
  • Location:In Space

Posted Mon Nov 30, 2009 9:24 AM

View Postjoyfulcoder, on Wed Jul 22, 2009 8:27 AM, said:

View PostSynthpopalooza, on Tue Jul 21, 2009 1:51 PM, said:

There is a program called MemoPad (at joyfulcoder.net) which will read and convert text files between ascii/atascii. I believe this will serve your purposes quite well!

Thank you for the MemoPad plug. MemoPad is actually on my .com site. The full URL is joyfulcoder.com/memopad/
I was going to ask how to take some basic code listed in a post and transfer this to the Atari but I remembered this thread; I have just used the MemoPad program above and convered this nicely :)

Great work Joyful coder, here's a long overdue :thumbsup:

#10 Marsupilami OFFLINE  

Marsupilami

    Star Raider

  • 68 posts

Posted Mon Nov 30, 2009 11:05 AM

Hi,

you can also use this software :

Atari800 TEXT Converter / Atari800 TEXT Extractor.

You'll find it here http://dskcenter.free.fr/ATARI800/

#11 invisible kid OFFLINE  

invisible kid

    Star Raider

  • 68 posts
  • Location:New Jersey, U.S.A.

Posted Mon Nov 30, 2009 11:13 AM

Yet another way is atari800 has an option to compile an executable that runs in text mode in a terminal. I have only used this in Linux, but assume it works in a Windows term as well. It does not do graphics modes but text mode programs work fine. You can cut and paste freely into and out of the term window.

#12 MrFish ONLINE  

MrFish

    Stargunner

  • 1,309 posts
  • Schindleria Praematurus
  • Location:127.0.0.1

Posted Tue Dec 1, 2009 12:40 AM

I don't know which "emulator" you are using. But, as rybags said, you can set up the "P:" device (printer) to output directly to notepad, or whatever. As a matter of fact, I use this when just "listing" any file on the Atari in emulation. You get a better view of your file.

The nice thing about it is, you never have to actually save the output at all. It opens up directly in notepad. You can copy and paste from it and close it without a trace.

Here's what the setting looks like in Atari800WinPLus (Select Menu: Atari -> Settings):

Atari Settings.png

After that's been setup, you can just type the following command (or any relevant variation) to shoot it into notepad:

L. "p:
Have Fun...

Edited by MrFish, Tue Dec 1, 2009 12:58 AM.


#13 atariksi OFFLINE  

atariksi

    Quadrunner

  • 5,337 posts

Posted Tue Dec 1, 2009 4:35 PM

View Posttherealbountybob, on Sat Jul 18, 2009 5:53 AM, said:

View Postatariksi, on Sat Jul 18, 2009 5:47 AM, said:

View Posttherealbountybob, on Sat Jul 18, 2009 7:05 AM, said:

View Postspookt, on Sat Jul 18, 2009 4:22 AM, said:

Hmm, can't you LIST it to one of the H: devices in the emulator? Should give you a text file. One of them even handles ATASCII to ASCII conversion I think. Sorry don't have a windows machine here to try it but I've done it in the past. How about printer support in the emulator? Doesn't that create txt files?
Thanks spookt, I've just tried this by enabling "H: Patch for hard disk access" (atari800win+) and then listing the file using LIST "H:TEST"
It has produced a PC file but the lines are not truncated
e.g.
10 REM
20 ? "HELLO"
Becomes:
10 REM ›20 ? "HELLO"›

[edit just seen other post will give that a try, thanks Rybags
The H6 method works fine. Thanks again. Jason
10 REM
20 ? "WASUUP"

It converted the "HELLO" to "WASUUP". PCs prefer WASUUP.
Aaaahh :idea:

What about doing the reverse-- suppose you have the following in notepad on PC:

10 ?"WASSUUP is bad English"
20 REM GOTO 10

and you want to get it into Atari. ENTER "C:" works after you replace CR/LF with 155 but any faster method for BASIC?

#14 Stephen ONLINE  

Stephen

    River Patroller

  • 3,240 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Tue Dec 1, 2009 7:20 PM

View Postatariksi, on Tue Dec 1, 2009 4:35 PM, said:


What about doing the reverse-- suppose you have the following in notepad on PC:

10 ?"WASSUUP is bad English"
20 REM GOTO 10

and you want to get it into Atari. ENTER "C:" works after you replace CR/LF with 155 but any faster method for BASIC?
Not that I know of - when coding on the real machine (which I rarely do these days), I use the LIST / ENTER method. Two possible solutions - 1, write a BASIC tokenizer on the PC. 2 - you could always ENTER the program on the emulator, save it, then LOAD it on the real machine. I doubt that would really save time though.

Stephen Anderson

#15 UNIXcoffee928 OFFLINE  

UNIXcoffee928

    Dragonstomper

  • 946 posts
  • Location:Sosaria, USA

Posted Wed Dec 2, 2009 9:04 AM

Very Easy. Just use the  ConTEXT programmer's file editor with Memopad.

You can assign the whole function of EOL conversion directly to a single Function-Key press in ConTEXT. The function Key launches Memopad & passes it the file currently being edited in the ConTEXT editor.

Looks like this: 

ConTEXT-Memopad.jpg

Edit your Memopad.ini file to open the Memopad window at the screen co-ords that you want.

I have an ATARI BASIC automatic code syntax highlighter that I made for ConTEXT. I'll upload it later if anyone wants it.

In ConTEXT, under Environment Options --> Execute Keys:

Setup a Function Key for BAS & LST, pass %n to Memopad.

Does the whole thing automagically. If you have any questions, just ask.

Edited by UNIXcoffee928, Wed Dec 2, 2009 9:05 AM.


#16 Marsupilami OFFLINE  

Marsupilami

    Star Raider

  • 68 posts

Posted Wed Dec 2, 2009 12:12 PM

View PostUNIXcoffee928, on Wed Dec 2, 2009 9:04 AM, said:

Very Easy. Just use the  ConTEXT programmer's file editor with Memopad.
Ok but how do you manage the "special" ATASCII chars ?

I have the same problem: I have a lot of old newspapers full of basic programms i'd like to transfer to my A8.

Since i'm lazy :ponder: , that what i do:

- Scan then OCR the programm to a .txt
- Convert the .txt to ATASCII with atari800win
- Spend my nights to enter the special chars with atari800win :roll:
But it's time consumming and not really easy...

MemoPad is a good piece of software, it just needs the ability to edit files...

In fact, the Atari scene is really missing a good programming tool, something like the Commodore 64 .prg Generator

Posted Image

Any volonteer ? :D

#17 bf2k+ OFFLINE  

bf2k+

    Stargunner

  • 1,461 posts
  • Location:Boot Factory BBS 2k+

Posted Wed Dec 2, 2009 7:59 PM

View PostUNIXcoffee928, on Wed Dec 2, 2009 9:04 AM, said:

Very Easy. Just use the ConTEXT programmer's file editor with Memopad.

I just installed Context and Memopad. Man that is really cool... I'd like the Syntax highlighter.

Edited by bf2k+, Wed Dec 2, 2009 8:01 PM.


#18 UNIXcoffee928 OFFLINE  

UNIXcoffee928

    Dragonstomper

  • 946 posts
  • Location:Sosaria, USA

Posted Thu Dec 3, 2009 9:49 AM

Here is the highlighter file for ATARI BASIC:

Attached File  ATARI-BASIC.zip   1.1K   43 downloads

Keywords #1 contains COMMANDS

Keywords #2 contains FUNCTIONS

Keywords #3 contains OPERATORS


I built the Highlighter file from the table in De Re Atari, located here:

http://www.atariarch...ere/chapt10.php


You can directly edit the highlighter file, for major tweaks (BASIC XE, etc), otherwise, for just changing the colors, it's fastest to do it directly through the palette editor in ConTEXT, itself.

You may want to fiddle with "Keywords3", to get it to correctly override the built-in Operator finder. I haven't gotten around to it. If you can't get it to override, just move STEP & THEN into the Keywords1 commands, and delete the line of data in Keywords3, to let it handle operators normally (as native operators).

Glad that you like ConTEXT! After I got turned on to it, it became my Primary Windows Editor, replacing the aged "Programmer's File Editor" (PFE32), which was my former favorite. (PFE32 is still good for dealing with GIGANTAMONGOUS files, despite it's sore-thumb of missing CTRL-A for selecting all). 

ConTEXT is wonderful, also, because of it's unlimited tabbing feature. You can have multiple files open in new tabs, and re-arrange the tabs. This is particularly wonderful, when you set ConTEXT as your NOTEPAD.EXE replacement... the end effect, when you print with P: in an Atari Emulator, is that each file printed WILL AUTOMATICALLY APPEAR AS A NEW TAB in ConTEXT!!!

Another great feature is that ConTEXT supports VERTICAL SELECTION! That's right, hold the ALT key, and select columns. This feature lets you manipulate text VERY quickly, and I hadn't seen it anywhere since the old-days in CygnusEd for the Amiga (which was, and still is one of the fastest text editors ever devised.).

That should keep you busy for a while. ConTEXT is an editor that you can live in, like emacs.

I will also recommend installing the Digital Mars C Compiler. This will allow you to compile standard ANSI code right in ConTEXT.

As for managing Atari Special Characters... It is a tough one... the fastest thing that I could tell you is to write a program on the Atari that changes the characters to their CHR$ equivalent. The program would read a *.BAS file, and parse it looking for, and replacing the special characters, then write a separate output file with the contents changed. You will run into a problem with the Atari's fixed line length for statements, though, particularly on those long lines filled with special characters, in magazine programs.

There is a perl script that will de-tokenize an Atari BASIC file. (A) right way to do the above would be to write a c program use that perl script to detokenize the BASIC file, then perform the data manipulation described above, right on a modern machine. A workaround for the fixed line-length problem would be to have the program create sequential files, like libraries, and insert file read commands in the lines looking for the special characters. However, this will result in disk accesses, when your BASIC program runs.

I'm sure that there are other right ways to do it. some being more right than others. The biggest problem IS that ATASCII just simply is not ASCII, and it has very specific codes that cause conflicts with standard ASCII... this is why it makes sense to me to just toss the traditional use of special characters in BASIC, and, instead, use the proper control-codes, for all future programs, and for lifecycle maintenance of legacy programs. That's just my take on things, though.

OK, have fun with ConTEXT!

#19 Stephen ONLINE  

Stephen

    River Patroller

  • 3,240 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Thu Dec 3, 2009 10:04 AM

Any chance of integrating your MemoPad with Notepad++?

Stephen Anderson

#20 paladina OFFLINE  

paladina

    Star Raider

  • 68 posts

Posted Fri Dec 4, 2009 3:29 PM

Fuu...I think for the best editing is Pixlator :thumbsup:

http://www.mipro-onl...tari_xl_xe.html

For transfer, there is ATR PlungIn for Total Commander

http://gury.atari8.info/pc_files.htm

And other way is Atadim.

1.In basic simply save the program as .LST ( LIST"D:PROGR.LST" )
2. Then via Total Commander with plugin open ATR file, copy the PROGR.LST to pc harddisk
3. Load PROGR.LST to the Pixlator, in this editor you can see the Atari SYMBOLS!... or is there any oher and better editor?

Paladina :D

#21 MrFish ONLINE  

MrFish

    Stargunner

  • 1,309 posts
  • Schindleria Praematurus
  • Location:127.0.0.1

Posted Sat Dec 5, 2009 4:18 PM

View Postpaladina, on Fri Dec 4, 2009 3:29 PM, said:

Fuu...I think for the best editing is Pixlator :thumbsup:

http://www.mipro-onl...tari_xl_xe.html

For transfer, there is ATR PlungIn for Total Commander

http://gury.atari8.info/pc_files.htm

And other way is Atadim.


Hmmm... I had never seen this before (Pixlator). Thanks for sharing paladina. This has some useful features.

I never cared too much for Total Commander. Although, functionally I guess it works well.

Atadim is great. My only complaint is that it is "drag-n-drop" only.

Edited by MrFish, Sat Dec 5, 2009 4:18 PM.


#22 rdea6 OFFLINE  

rdea6

    Dragonstomper

  • 910 posts
  • Location:Arizona USA

Posted Sat Dec 5, 2009 4:36 PM

View PostMrFish, on Sat Dec 5, 2009 4:18 PM, said:

<SNIP>
Atadim is great. My only complaint is that it is "drag-n-drop" only.
I have started using the 'Send To' feature of Windows Explorer. Opens Atadim with the ATR that you 'Send To' it.

Yea, I agree it would be nice if Atadim had a open file dialogue 'Button'.Posted Image

#23 MrFish ONLINE  

MrFish

    Stargunner

  • 1,309 posts
  • Schindleria Praematurus
  • Location:127.0.0.1

Posted Sat Dec 5, 2009 5:26 PM

View Postrdea6, on Sat Dec 5, 2009 4:36 PM, said:

View PostMrFish, on Sat Dec 5, 2009 4:18 PM, said:

<SNIP>
Atadim is great. My only complaint is that it is "drag-n-drop" only.
I have started using the 'Send To' feature of Windows Explorer. Opens Atadim with the ATR that you 'Send To' it.

Yea, I agree it would be nice if Atadim had a open file dialogue 'Button'.Posted Image

Yea... you can also use the "Open With" funtion to open directly. Once you open a single ATR from "Open with", using Atadim, it will always appear on the "Open with" context menu. Only thing is, I don't always to want dig a file out of it's multi-nested location so I can right click on it. I can easily get at them from a file dialog by having a "custom places bar" set up using TweakUI.

Edited by MrFish, Sat Dec 5, 2009 6:06 PM.


#24 sup8pdct OFFLINE  

sup8pdct

    Moonsweeper

  • 429 posts
  • Location:australia

Posted Sun Dec 6, 2009 6:06 AM

View PostMarsupilami, on Wed Dec 2, 2009 12:12 PM, said:


- Convert the .txt to ATASCII with atari800win


I have found a problem with the atari800win+ ASCI-ATASCI converter.
IF the CR-LF combo is split on a 4K boundry, It doesn't get converted.
ie $0D (CR) is at $1FFF and $0A (LF) is at $2000.
Causes al sorts of problems when files don't assemble properly in Mac65

James

#25 Stephen ONLINE  

Stephen

    River Patroller

  • 3,240 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Sun Dec 6, 2009 10:12 AM

View Postsup8pdct, on Sun Dec 6, 2009 6:06 AM, said:

View PostMarsupilami, on Wed Dec 2, 2009 12:12 PM, said:


- Convert the .txt to ATASCII with atari800win


I have found a problem with the atari800win+ ASCI-ATASCI converter.
IF the CR-LF combo is split on a 4K boundry, It doesn't get converted.
ie $0D (CR) is at $1FFF and $0A (LF) is at $2000.
Causes al sorts of problems when files don't assemble properly in Mac65

James
Interesting - it has the same "feature" as the Antic display RAM counters :) Damn 12-bit counters.

Stephen Anderson




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users