Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: ISSOtm on May 10, 2015, 12:19:58 pm

Title: To: (Asm programmes AND Notepad++ users)
Post by: ISSOtm on May 10, 2015, 12:19:58 pm
Hello Notepad++ users that are also z80 programmers, ISSOtm here !

I launched myself into assembly programming, and chose Npp as an editor because Windows default Notepad is too "default".
However, I missed the syntaxic coloration, and although choosing "Assembly" language properly colored the comments, the instructions were black.

Thanks to version 6.0 (5.0 ? Don't remember), we are now able to define languages by ourselves.
Quote from: Kevin
That already existed before 6.0 !
Yes, but it used to be extremely basic, sorry. Now we can define keywords as "prefixes", and much more.

So, if you use Notepad++, here are 5541 bytes for you : the z80 coloration file.
Do the following when you have downloaded the file :
If you're not happy with the name I've given, re-open the dialogue box, and select Language : Asm z80
Press "Rename", and enter the new name. Restart Npp to load changes.

I've put all instructions (including stuff like sll), and compiler instructions (like #define or .org). However tell me if you want me to add more.
Redistribution ? Of course you can ! As long as you mention my name.

Here is a screenshot taken of me working with the coloration on :
Title: Re: To: (Asm programmes AND Notepad++ users)
Post by: Geekboy1011 on May 10, 2015, 12:25:40 pm
I have to upload my custom one here as well. We have one that supports minor codefolding and some other things like proper numeral highlighting and such, Going out now, Ill edit or post it later. looks good tho from here!
Title: Re: To: (Asm programmes AND Notepad++ users)
Post by: ISSOtm on May 10, 2015, 12:37:20 pm
Wow, thanks for the quick reply.
I don't see what can be folded, though.

Numbers are properly highlighted (including A-F and a-f being only included when using a $ prefix or h suffix), however there are two bugs that I'm not able to correct due to UDL not allowing me to do so :
First, binary numbers aren't correctly highlighted : %10010110 is colored as intended, but %12345678 is too (whereas it shouldn't)
The other bug is that is a comma follows a number, it won't be highlighted (.db $FD , $CB colors both numbers, but .db $FD,$CB highlights none).
Title: Re: To: (Asm programmes AND Notepad++ users)
Post by: Iambian on May 10, 2015, 02:49:14 pm
Wow, thanks for the quick reply.
I don't see what can be folded, though.

Modules. See your assembler's documentation for more info. TASM and Brass support 'em. I dunno if Spasm does as well.

Quote
Numbers are properly highlighted (including A-F and a-f being only included when using a $ prefix or h suffix), however there are two bugs that I'm not able to correct due to UDL not allowing me to do so :
First, binary numbers aren't correctly highlighted : %10010110 is colored as intended, but %12345678 is too (whereas it shouldn't)
Not much can be done on that front, or at least until they update UDL.

Quote
The other bug is that is a comma follows a number, it won't be highlighted (.db $FD , $CB colors both numbers, but .db $FD,$CB highlights none).
I remember fighting that problem, but it seems solved on my end. Not sure what I did specifically, but I make sure that $ and , are listed as operators (Operators 1). This is also what I have for the Comment & Number section:
(http://i.imgur.com/CPWL38h.png)
Title: Re: To: (Asm programmes AND Notepad++ users)
Post by: Geekboy1011 on May 10, 2015, 03:47:57 pm
^ what he said we use the same file as we work together!