flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Heap > New FASM syntax for Highlight

Author
Thread Post new topic Reply to topic
Tristano



Joined: 25 Jan 2017
Posts: 5
Location: Italy
New FASM syntax for Highlight
Hi, I wanted to drop a link to a language definition I've just published for André Simon's Highlight tool (CLI and GUI)]:



It shall be included soon into Highlight's distribution, in the meantime it can be downloaded from GitHub.

Any corrections and suggestions for improvements are welcome.

B.R.
Post 14 Mar 2017, 01:40
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2626
Location: dank orb
Decimal numbers can have a 'd' or 'D' post-fixed. (Which is redundant because decimal is default.) Additionally, numbers can be broken into parts with single-quotes or underline characters. This is particularly useful for binary numbers. For example,

dw 00'000'11''01'111'00b ; this is a valid 16-bit value

_________________
The generation of random numbers is too important to be left to chance - Robert R Coveyou
Post 14 Mar 2017, 04:28
View user's profile Send private message Visit poster's website Reply with quote
Tristano



Joined: 25 Jan 2017
Posts: 5
Location: Italy
Thanks a lot @bitRAKE!

I've fixed it, and now both missing features are implemented. If I've understood corretly, the usage of ' or _ to split long numbers applies to any type (hex, dec, octal, bin, ecc.), correct? That's how I implemented it now.

By the way: since I've created the highlighter syntax from the tokens found in Fasm source file TABLES.INC, there might still be some tokens left out -- ie: those using symbols combinations, like $$ or %t, etc.

For example, I'm not sure how to go about the "%t" symbol: currently it's ignored. Should I leave it as plain text? colorize it like operators, or what else?

Of course, some choices are arbitrary. For example, I chose to colorize $ and $$ just like labels, for two reasons: (1) like labels, they define an offset in the memory space; (2) they usually appear next to arythmetic operators like + or -, so a different coloring is preferable.

Since this type of highlighing is meant to produce documents (and there are no performance worries, unlike in live editors), the idea is to use colors to make sifting through source code visually easier by offering meaningful color to tokens associations.
Post 14 Mar 2017, 10:30
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2626
Location: dank orb
People have different reasons for using highlighting: some like to just follow code paths quickly - being able to identify IP/EIP/RIP modifying instructions. Others like to follow instructions that modify flags, or subsets of registers/instructions.

Thus far I like your thought process on the matter. Along the same reasoning %t is a symbol that equals a number - either of those choices seem valid.

Browsing code could be eased by linkages to symbol definitions, or other usages of a symbol. Modern tools generate code graphs and memory maps. Code can become quite complex - I welcome all such tools with open arms. Very Happy
Post 15 Mar 2017, 04:22
View user's profile Send private message Visit poster's website Reply with quote
filox



Joined: 13 Feb 2013
Posts: 10
Re: New FASM syntax for Highlight

Tristano wrote:
Hi, I wanted to drop a link to a language definition I've just published for André Simon's Highlight tool (CLI and GUI)]:



It shall be included soon into Highlight's distribution, in the meantime it can be downloaded from GitHub.

Any corrections and suggestions for improvements are welcome.

B.R.



Hi tristano, after copying files what i must do? i pases files like assembler... Sad
Post 03 Apr 2017, 14:27
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.