NESMaker 6502 syntax highlight improvements.

Mugi

Member
This thing popped up in a conversation over at nintendo age and i figured that might aswell put this thing here in the off-chance that someone didnt realize this is editable.
the syntax highlight (the thing that makes the opcodes and whatnot show up as different colors in the script editor) can be edited from the asmlang.xml file located in the root folder of the software.

the default one does it job pretty decently, although there is definitely room for improvement in it, for starters, it is missing a lot of opcodes, so it doesnt always highlight what it should.
also, you might just want to change the colors and/or styling of the text if all else fails.

here's a copy of my asmlang.xml that has all the missing opcodes filled in and the color names have been relabeled so that you know what changes when you change them, instead of being "red" or "blue"
the colors are now things like "opcodes" or "labels"

Code:
<?xml version="1.0" encoding="utf-8" ?>
<doc>
  <brackets left="<" right=">" />
  <style name="comment" color="#D97B54"/>
  <style name="label" color="#FF80FF" fontStyle="Italic" />
  <style name="quote" color="#40FF40"/>
  <style name="opcode" color="#4B9BBE"/>
  <style name="Red" color="#FF4040" backColor="#f5f5e5" />

  <rule style="comment" options="Multiline">;.*$</rule>
  <rule style="label" options="Multiline">^.*:</rule>
  <rule style="label">.include|.incbin</rule>
  <rule style="quote">".*"</rule>
  <rule style="opcode">ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|\.db</rule>
  <folding start="<div" finish="</div>" options="IgnoreCase"/>
</doc>

the above produces the following color configuration, however, it is worth noting that my windows has a dark background by design. so change the color accordingly if you use this yourself,
my color setup most likely looks terrible on a white background.

shl.png
 

dale_coop

Moderator
Staff member
Cool thanks. Mihoshi shared one too some time ago: http://nesmakers.com/viewtopic.php?f=23&t=1019
 

Mugi

Member
heh, should have dug around more first i guess :p
but yeah, it's much nicer when it actually recognizes all the ops instead of skipping some :)
 
Top Bottom