English Amiga Board

Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

Thread Tools
Old 21 November 2019, 17:55   #1
Registered User

slademania's Avatar
Join Date: Oct 2019
Location: Spain
Posts: 10
develop AMOS code in PC/Mac

Hi to all, After a long time I have started to coding again in this fabulous
language. My question is :

Is there any text editor (for Windows or Mac OSx) to be able to write
Amos code (any type of syntax checker, etc) ? This code would be saved in
ASCII format and then imported into the AMOS own editor (with the "Merge ASCII" option.

This can be done with editors like NotePAD++, etc but I would like it to have
some kind of syntax control.

Thank you very much in advance...
slademania is offline  
Old 21 November 2019, 22:12   #2
Registered User
Dan's Avatar
Join Date: Nov 2004
Location: Germany
Posts: 543
What do you mean with syntax control exactly ?

You could have syntax coloring, as seen on this picture (with amiga guide files)

But for that, a list of Amos commands is needed, separated in commands, functions etc etc, for different colors.

And autocompletition of commands with the scite editor could be done, as well. (provided that someone makes the language definition file)

edit: The Amos-extensions have all their own syntax ...
Attached Thumbnails
Click image for larger version

Name:	ced-aguide.png
Views:	508
Size:	61.9 KB
ID:	65252  

Last edited by Dan; 21 November 2019 at 22:38.
Dan is offline  
Old 22 November 2019, 16:46   #3
Registered User

slademania's Avatar
Join Date: Oct 2019
Location: Spain
Posts: 10
Hi Dan, thanks for your fast reply.
By "control sintaxis" I mean that the editor itself recognizes the keywords with different
colors for example. Functions with one color, commands with other, strings with other color. Similar to how keywords are recognized in C++. Phyton, and other languages.

Looking at your hardcopy, this is the Crimson Editor and I can remember that this editor supported AMOS syntax. I tried to look for it but I can't find it anywhere.

Can you help me where to find it? If so, I would be eternally grateful

Thank you very much in advance
slademania is offline  
Old 22 November 2019, 23:36   #4
Registered User
Dan's Avatar
Join Date: Nov 2004
Location: Germany
Posts: 543
Uhm, the thing with Amos Pro is, that this basic language does, what other languages do not !

And that is, one command can be separated by a space char.
For example "RESERVE AS CHIP DATA" is a single command.

But if i enter this into the specification file of CED, it will treat it as 4 different statements, because it assumes that a space char is a separator.
So this will be colored too, but i think it would be better to have it as one command, because "DATA" and "AS" are used elsewhere too.
And i do not know if CEd can do it. (the manual indicates that it can't)

Anyway, i have used the HTML version of the manual to extract the commands, and attached is a 7zip file with the commands, in 13 different text files.
Attached Files
File Type: 7z AmosPro_CommandList.7z (3.1 KB, 94 views)

Last edited by Dan; 23 November 2019 at 00:07.
Dan is offline  
Old 23 November 2019, 07:27   #5
Registered User
Hewitson's Avatar
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 38
Posts: 3,747
I'd be surprised if vim can't do it. But even if it can't, you should still switch
Hewitson is offline  
Old 23 November 2019, 12:23   #6
Registered User
Dan's Avatar
Join Date: Nov 2004
Location: Germany
Posts: 543
As i said, most basic languages do not do commands separated by space, because they use space to separate the commands from the rest.

CED could do Amos pro syntax coloring, but not per whole command, as it is.

I mean, i could assemble a syntax coloring file, but for that i have to remove all the duplicates from the commands.

The trouble, which i'm pointing at, is simply this:

If you write, (as in my previous post), "RESERVE AS CHIP DATA", it would be colored.
But you can, as well, write "RESERVE AS AS AS CHIP DATA" or "RESERVE AS BOB DATA" and it would be colored too, but these are not a valid commands in amos pro.

Syntax coloring should be, well at least for me, a way to faster recognize keywords from other parts and so to easier identify (spelling) errors.

And AMOS has a large command set, containing 800+ commands (without extensions) so few words are used double or triple times (if not more).

Last edited by Dan; 23 November 2019 at 12:47.
Dan is offline  
Old 29 November 2019, 23:36   #7
Registered User
Dan's Avatar
Join Date: Nov 2004
Location: Germany
Posts: 543
I'v made a quick syntax file for the Crimson Editor.
Sure there may be a need of tweaking here and there, but it works, so far.

Not included are: Amal,Interface and extra extension syntax.

Like said in the previous post, it will color on the word basis, and not on the command basis.

Included in the attachment is an AutoHotkey Program, which, when used in Crimson Editor or Notepad, opens a dialog box,
in which you can type a letter, and it will display a list of available commands.

The CapsLock (and Shift CapsLock) activates the box, After typing a letter, you can use arrow up and down to scroll (or type more letters to get the whole command), and enter will select the command and copy it into the Editor.
(sometime focus may be lost and it will not work, but this is rare) - (The Editor has to have the focus)

I'v included the Compiled exe and SourceCode, because virus total shows 4~5 red alerts of which i'm pretty sure that they are false alarms.

So if you want, you can download autohotkey and compile it for yourself.

P.S. The Code for this AutoHotkey Script was used from this www.autohotkey.com forum post, and i'v removed the parameter box. (Usage instructions are over there too ^^)


Installing the Keywords in Ced:

Copy the AmosPro.key and AmosPro.spc into the "CrimsonEditor/spec" folder.

Then open CED, and open the menu: Tools/Preferences.

There, in the dialog box, open file, syntax type.
Choose an - empty - slot, then enter a description, Like "Amos Pro" or what ever you may recognize later.

Then the LangSpec and Keywords procedure is the same: Click on the ... (to the far right) and select the AmosPro.key and .spc file.

Click on apply or on Ok, then load an Amos ascii file, and from the "Document/Syntax Type" menue, chose the "Amos Pro" to activate the Coloring.

Alternatively, if you want CED to always apply this coloring on a extension, then make a new text file in the spec folder, with the following text:

And save it as "extension.asc" where you can change the asc to whatever extension your amos (ascii) source code has.
Attached Files
File Type: 7z AmosPro-CrimsonEditorSpec_And_CommandHelper.7z (326.7 KB, 84 views)

Last edited by Dan; 30 November 2019 at 00:14.
Dan 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
Copy code/text from PC/Notepad to AMOS Brick Nash Coders. AMOS 8 17 October 2018 10:05
Is there any way of modularize AMOS code? darkhog Coders. AMOS 9 05 April 2017 00:54
AMOS (Editor) Source Code SparkyNZ request.Apps 4 25 March 2017 01:49
Req: AMOS code for scrolling plasma thingy Dunny request.Other 7 20 September 2010 15:51
Amos PRO source code availability ? freddix request.Other 7 09 April 2010 22:22

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 09:25.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.07114 seconds with 14 queries