Author Topic: Assembler as Primary Language Support  (Read 5317 times)

PeterHouse

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Assembler as Primary Language Support
« on: January 20, 2010, 12:56:46 pm »
I write in assembler and recently switched to SE from CodeWrite.

The code is for different target microcontrollers with completely different assemblers, each having different features, rules, and keywords.  They all use the same file extension of .asm

Is there an easy way to change lexers, tagging support, etc. on the fly?  I could either put a meta statement in a comment on the first line of code in the file (like Crimson Editor) or just put some buttons on a menu to select the specific assembler language I am currently using.  Since at least one of the languages uses a "*" to begin comment and not the standard ";" putting a comment on the first line is problematic.

Any guidance on this would be appreciated.

Graeme

  • Senior Community Member
  • Posts: 2323
  • Hero Points: 305
Re: Assembler as Primary Language Support
« Reply #1 on: January 21, 2010, 11:47:30 am »
You can use the select_mode command on the document menu.  Slickedit seems to remember these settings across sessions so once you've set it for a particular file you shouldn't have to do it again.  You can probably record a macro that selects a particular mode and then run that macro from a single keystroke.  You could also have a command that does it for all open buffers or all files in a project.

I'm not sure why the * ; difference would be a problem but you could probably write a macro to look at the content of the first line and set the document mode by calling select_mode.  Hence the macro that you recorded as mentioned in paragraph one above could be modified to add the meta text at the start of the file as well, if there's none there already, and use * or ; according to the mode.
e.g.
switch (p_LangId)
{
    case 'unixasm' : // whatever
}

Graeme

Haryer

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
  • Unleash your mind
Assembler as Primary Language Support
« Reply #2 on: February 17, 2011, 01:39:37 pm »
Hello. Im complete translated all phpRaider revision language file to russian. Any1 interested?
--
 .       phpRaid. - ?

gcramer789@yahoo.com

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Assembler as Primary Language Support
« Reply #3 on: March 02, 2011, 10:54:54 am »
yes i also thing so that assembler as Primary language support. If any one is enough to know about this he will do dest in language