Giter VIP home page Giter VIP logo

codeblocks-asxxxx-stm8-asm-lexer's Introduction

ASxxxx STM8 Assembly Code Syntax Highlighting Lexer for Code::Blocks IDE

This is a syntax highlighting lexer for the Code::Blocks IDE supporting the particular dialect of STM8 assembly code used by the ASxxxx assembler. SDCC's SDAS assemblers are also based on a fork of the ASxxxx assembler, so this also supports that.

Syntax features recognised are:

  • Comments
  • Instructions
  • Identifiers (labels, symbols, etc.)
  • Numbers
  • Operators
  • Strings
  • Registers (A, X, Y, etc.)
  • Directives ('dot' keywords, e.g. ".area")

Default highlighting colours are fairly arbitrary - you will probably want to customise them. Colours can be customised in Settings > Editor > Syntax highlighting.

By default, *.asm and *.s files are highlighted (although, several other highlighters also match *.asm, so you may need to select this one manually if C::B chooses the wrong one). Additional file extension masks can be specified in the settings window (as mentioned above).

Installation

  1. Copy both the .xml and .sample files to installation location:
    • Windows: Copy files to the %APPDATA%\CodeBlocks\share\codeblocks\lexers folder. You may need to create the lexers folder if it doesn't already exist.
    • Linux: Copy files to the ~/.codeblocks/share/codeblocks/lexers directory. You may need to create one or more of the sub-directories under ~/.codeblocks/. Ubuntu users should note that they seem instead to locate it at ~/.config/codeblocks/.
    • BSD / macOS: Sorry, no idea! I haven't used Code::Blocks on these platforms. If I had to guess, it would also probably be somewhere in the user's home directory.
  2. Restart (or start) Code::Blocks.

Once successfully installed, Code::Blocks should report in the status pane upon startup that the lexer was found and loaded without error. For example:

Scanning for lexers in C:\Users\<username>\AppData\Roaming\CodeBlocks\share\codeblocks/lexers/...
Found 1 lexers
Scanning for lexers in C:\Program Files\CodeBlocks\share\codeblocks/lexers/...
Found 61 lexers
...
Loading lexer_asxxxx_stm8
...

A new 'ASxxxx STM8 Assembly' entry should also appear in the list of supported syntax highlighting languages in the Editor settings window.

Resources

Other information that may be of use to anyone seeking to make modifications or create their own syntax highlighting lexer:

Licence

This work is licenced under the Creative Commons Attribution 4.0 International (CC BY 4.0) licence. For the full licence text, please see the LICENSE.txt file, or https://creativecommons.org/licenses/by/4.0/.

codeblocks-asxxxx-stm8-asm-lexer's People

Contributors

basilhussain avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.