23 October 2011, 11:35 | #1 |
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? |
23 October 2011, 11:41 | #2 |
Registered User
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.
|
23 October 2011, 14:47 | #3 |
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 |
23 October 2011, 15:41 | #4 |
Zone Friend
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.
|
23 October 2011, 16:52 | #5 |
Zone Friend
Join Date: Sep 2001
Location: Germany
Posts: 812
|
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". |
23 October 2011, 17:02 | #6 |
Registered User
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 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. |
24 October 2011, 13:28 | #7 |
Just add brown sauce.
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. |
24 October 2011, 17:17 | #8 |
Amiga Tomcat
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 |
24 October 2011, 19:29 | #9 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
Just get CygnusEd from the EAB file server. Or use Micro Emacs (comes with Workbench!). Ed should be thrown away
|
24 October 2011, 21:31 | #10 |
Just add brown sauce.
Join Date: May 2008
Location: North East Englandland
Posts: 170
|
ED is awesomes!
and in later versions becomes even more awesomes! |
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 |
|
|