English Amiga Board


Go Back   English Amiga Board > Support > New to Emulation or Amiga scene

 
 
Thread Tools
Old 23 October 2011, 11:35   #1
Angelsoft
 
Posts: n/a
Windows text to AmigaBasic ?

Hi, noobie here

A long treasured ambition has been to type in some of the Amiga Basic listings that I have kept for years.

I now find I have a bit of time on my hands and have dug out a few books and magazines that have some interesting games/programs/routines.

However I was wondering if I may take a short cut, by scanning the relevant pages, use an OCR to turn them into text, then converting the resultant .txt file into something my Amiga Emulator will recognise.

This very last part, is where I need help, can anyone suggest a method please?
 
Old 23 October 2011, 11:41   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Text is text, it doesn't need to be converted. Given that AmigaBasic was made by Microsoft it would probably even get along with DOS-style CRLF instead of Unix-style LF which is used by Amiga, too.
thomas is offline  
Old 23 October 2011, 14:47   #3
Angelsoft
 
Posts: n/a
No go I'm afraid Thomas.

Here is what I did;

Scanned and proofread an Amiga basic program.
Copied it from Windows .txt file.
Pasted program into Amiga Wordpad.
Saved program in an empty .adf disk
Open file from Amiga Basic

I then get a message saying 'Bad file mode'


Any ideas. Thanks for the quick response though
 
Old 23 October 2011, 15:41   #4
s2325
Zone Friend
 
s2325's Avatar
 
Join Date: Jun 2006
Location: Gargore
Age: 43
Posts: 17,789
Maybe each line should have special character (square) at the end, just like in startup-sequence.
s2325 is offline  
Old 23 October 2011, 16:52   #5
Korodny
Zone Friend
 
Join Date: Sep 2001
Location: Germany
Posts: 812
Quote:
Originally Posted by Angelsoft View Post
I then get a message saying 'Bad file mode'
IIRC, AmigaBasic didn't save source code as pure ASCII. To save pure ASCII, you had to select "Export as..." or something like that from the menu.

Just guessing here, but to import your ASCII file into AmigaBasic you probably have to search for a menu item called "import".
Korodny is offline  
Old 23 October 2011, 17:02   #6
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
I just tried this:

I opened Windows editor (Notepad), entered

Code:
for i=1 to 10
   print i
next
and saved it as test.bas.

Then I ran AmigaBasic, select "open" from the menu and pointed it to test.bas. It loaded successfully, changed all keywords to upper case and ran successfully, too. So it does work with plain ASCII text.
thomas is offline  
Old 24 October 2011, 13:28   #7
discomeats
Just add brown sauce.
 
discomeats's Avatar
 
Join Date: May 2008
Location: North East Englandland
Posts: 170
amiga wordpad? yeah..don't use that for amiga basic it adds control codes and stuff that'll just confuse it, think of it as an even more ghetto version of windows wordpad

To save as ascii I think in the command window of amigabasic(or whatever it was called) use:

SAVE "filename",a

I'd suggest using ed on the amiga to edit ascii files if you don't have something better, though it is a little arcane it's quite functional (I like VI, I would say this).

Obviously any generic MS text editor notepad/edit will spew out what amigabasic eats.
discomeats is offline  
Old 24 October 2011, 17:17   #8
davideo
Amiga Tomcat
 
davideo's Avatar
 
Join Date: Sep 2007
Location: Boston Lincs
Posts: 1,500
@Angelsoft

I did the same thing. See this thread http://eab.abime.net/showthread.php?t=56446

The only thing is that AmigaBasic didn't like some of the text that was converted. Some characters stopped it compiling the program.

But once I'd located the relevant letter(s) it was good to go and they ran perfectly.

I really must update the original thread as I've got them all done now.

Dave G
davideo is offline  
Old 24 October 2011, 19:29   #9
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by discomeats View Post
I'd suggest using ed on the amiga to edit ascii files if you don't have something better, though it is a little arcane it's quite functional (I like VI, I would say this).
Just get CygnusEd from the EAB file server. Or use Micro Emacs (comes with Workbench!). Ed should be thrown away
Thorham is offline  
Old 24 October 2011, 21:31   #10
discomeats
Just add brown sauce.
 
discomeats's Avatar
 
Join Date: May 2008
Location: North East Englandland
Posts: 170
ED is awesomes!

and in later versions becomes even more awesomes!
discomeats is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing extra characters from windows text files source support.Apps 10 26 October 2014 02:38
AmigaBASIC Compilers Leandro Jardim request.Apps 4 22 May 2013 22:59
looking for AmigaBasic Interpreter phil321 New to Emulation or Amiga scene 41 19 December 2006 14:26
MOUSE(0) and AmigaBASIC ... MacTO Coders. General 3 01 September 2006 16:19
AmigaBASIC unprotector Minuous request.Apps 1 01 June 2005 23:28

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:44.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.28046 seconds with 15 queries