How to edit simple Basic programs outside atari800 emulator?

All discussions about the Atari 8bit range of machines.

Moderators: Mug UK, Silver Surfer, Moderator Team

dvh
Atarian
Atarian
Posts: 1
Joined: Tue Sep 16, 2014 7:43 am

How to edit simple Basic programs outside atari800 emulator?

Postby dvh » Tue Sep 16, 2014 7:54 am

Hi.

I currently write simple Basic programs in this way: First I start atari800 emulator:

atari800 -xlxe_rom ATARIXL.ROM -basic_rom ATARIBAS.ROM -basic

This shows the "READY" screen where I can write Basic program. Then I can use Alt+S to save emulator state, later Alt+L to load state. This works and generally is usable for very simple Basic programming.

But I would like to write those Basic programs outside emulator in some normal text editor on my PC (linux) and then "convert" them into something that can be loaded into emulator and run.

How can I do that? Thanks.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2145
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: How to edit simple Basic programs outside atari800 emula

Postby lp » Tue Sep 16, 2014 9:09 am

If I remember correctly one uses the ENTER command to read text files into Atari basic. However, the Atari 8-bits don't use standard ASCII for text files, so the line endings are weird and not the normal cr/lf one would expect. This makes it difficult to write them in a plain text editor on some other OS and import them. Been a while since I used the Atari 8-bit emu, but this is the problem as I remember it.

Scottinnh
Atari freak
Atari freak
Posts: 61
Joined: Sun Nov 14, 2010 3:08 pm

Re: How to edit simple Basic programs outside atari800 emulator?

Postby Scottinnh » Sun Jan 31, 2016 10:26 pm

Very old thread, I know, but sometime after this post, this software appeared:
http://joyfulcoder.com/memopad/
http://atariage.com/forums/topic/245258 ... computers/

It's for Windows, but might run under WINE. I know of no other ATASCII related editing tools (though I have not looked very hard). I did see some thread recently about providing an "IDE" to support 8-bit development, but I have no idea if this included BASIC.

There is also a Perl-based "detokenizer". Again, it's a converter not an editor.



off-topic Atari BASIC rant:
I too am also interested somewhat in writing code for the 8-bits, although personally I would avoid BASIC...
Assembler or C (Lightspeed C for example)have real world benefits in learning (ie, jobs), plus you can apply C and assembler experience to other processors like the Atmel micro, used on Arduino. Interestingly, the Arduino provides interesting opportunity for development of new Atari devices (such as the SD-card disk emulator devices, for example Ardiono2SIO).

Atari BASIC is my first language, but it's arguably not a very good implementation BASIC: no JIT compilation like what Turbo Basic gave us later, plus no bitmasking, not much direct access to Atari features like P/M graphics, and an awful editor (you could easily create a line too long to edit, for example). When you get close to running out of RAM (or you want something to run on the 400) you have to conduct all sorts of hackery on the BASIC code (creative variable usage) in order to increase free RAM, at the cost of code maintainability.
Atari since 1983 (1200XL, later ST). Now a Linux freak who uses a Mac at work.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2145
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: How to edit simple Basic programs outside atari800 emulator?

Postby lp » Sun Jan 31, 2016 10:50 pm

Has to be better than Atari BASIC and now its free.
http://advan.atarinet.com/

jruark56
Atari freak
Atari freak
Posts: 53
Joined: Sun Nov 09, 2008 2:58 am

Re: How to edit simple Basic programs outside atari800 emulator?

Postby jruark56 » Sun Feb 07, 2016 11:43 pm

dvh,

In case you are still looking for answers here, one stop-gap measure for linux would be to write your Atari basic program in the editor of your choice and save as text, if needed. Once you have your text file, open it with a hex editor and replace all of the newline or cr/lf pairs with a decimal 155 (9B in hex). You can then use the ENTER command from the Atari to read in this data using basic and then save or list it to your physical disk or ATR image.

Remember that Atari basic requires line numbers, so your text file must include them.
Russ Ruark Jr.


Social Media

     

Return to “The Atari 8bit corner”

Who is online

Users browsing this forum: No registered users and 1 guest