Hi all,
Playing Syntax Highlighting in CodeEdit, the Christmas Edition (https://masm32.com/board/index.php?topic=10560.0).
It's Iczelion method, but more complete. Just no so fast, and some little glitches, specially scrollbar thumb (¿?).
When opening files from explorer have problems in Christmas Edition:
- cmd_tail fail, the I replace with old GetCL (adapted to 64 bits obviously), and Window Title, etc. that Hutch never completes in this edition.
- Hutch method to expand .png files don't work. Perhaps is posible to solve that, but more easy was to replace toolbar image with .bmp file (40 kb more than png).
Regards, HSE
I had wanted to change the font there to another one. But upon reassembling found that "include \masm32\macros\SmplMath\math.inc" of course is not on my computer.
Also the batch file needs a path adjustment manually done.
\masm64A\bin64\rc.exe rsrc.rc
\masm64A\bin64\ml64.exe /c /nologo %appname%.asm
\masm64A\bin64\polink.exe /SUBSYSTEM:WINDOWS /ENTRY:entry_point /LARGEADDRESSAWARE %appname%.obj rsrc.res
Does the program NEED math,inc?
Anyway, I will look at this again later on. Thanks for sharing. And yes a couple of glitches .... as you had mentioned.
Quote from: zedd151 on July 18, 2023, 05:47:23 AMDoes the program NEED SmplMath?
Syntax Highlighting is a fast translation from 32 bits, then you need push and pop registers, @While, and no much more I think.
@HSE:
so it does need math,inc for those macros then?
Why not put those macros in the source file in the project?, instead of needing that particular include file.
Quote from: zedd151 on July 18, 2023, 01:14:43 PMso it does need math.inc for those macros then?
Math.inc is the header. Several files in SmplMath package contains the macros, and a lot of them are very helpful when using ML64 (or any other).
Quote from: zedd151 on July 18, 2023, 01:14:43 PMWhy not put those macros in the source file in the project?
Is better to put in macros directory, because files are not so small and will be used in most of the projects (if your are not a martir of bare metal :biggrin: )
Usually it is normal to include everything that is needed in a project within the project, there may be others that wish to modify the project without having to download anything else. Just a suggestion by the way, it is your project, do as you see fit. :biggrin:
Quote from: zedd151 on July 18, 2023, 10:53:44 PMUsually it is normal to include everything that is needed in a project within the project
Are you drinking? :biggrin:
CodeEdit project requiere Masm64 SDK project, and nobody can even think that must be posted inside. You must obtain Masm64 SDK independently.
SmplMath is other project, and is obtained independently. You have to make a couple of clicks with mouse.
If you can't do that, don't worry, the project is not for you. :thumbsup:
You're a funny guy, HSE. Of course the Masm64 SDK is definitely NOT part of the project but rather the platform on which it is built. :joking: Your project as is, needs a bit of work. But I am not willing to download SimplMath for just one project. I hope that you understand.
This is all I have to say about that, good luck with the project! :thumbsup:
Regards, zedd.
Quote from: zedd151 on July 18, 2023, 11:20:38 PMBut I am not willing to download ...
That is discipline. I have projects from everybody in the forum :biggrin: :biggrin:
Good job HSE! :thumbsup:
Can you add the line numbers as well? :smiley:
Quote from: lingo on July 19, 2023, 12:15:07 AMCan you add the line numbers as well? :smiley:
It's not the idea now, CodeEdit must be fast and simple. Line numbers is something a little more complex, and for that I use KetilO's RadAsm 3 (source code also is available).
Quote from: lingo on July 19, 2023, 12:15:07 AMGood job HSE! :thumbsup:
Can you add the line numbers as well? :smiley:
Excellent idea. I don't know what they are good for, as I never felt a need for them since I quit line-numbered Basic dialects 40 years ago, but I wish you luck with this endeavour (https://masm32.com/board/index.php?topic=3079.msg91413#msg91413). Keep us posted :thumbsup:
Quote from: jj2007 on July 19, 2023, 02:06:03 AMbut I wish you luck with this endeavour (https://masm32.com/board/index.php?topic=3079.msg91413#msg91413).
Not bad, but not so easy :biggrin:
First, it's not possible with the buggy RichEdit control, at least not for sources with more than 65535 lines.
Second, if you want those line numbers to see where the error sits, please try RichMasm: if there is an error, RM jumps directly there and puts the cursor at the beginning of the line.
Quote from: jj2007 on July 19, 2023, 06:06:41 AMSecond, if you want those line numbers to see where the error sits
:thumbsup: Good point. Hutch have forgotten to implement "Go to Line".
I found some old codes that implement line number.
I was able to find one here in this board.
https://www.masmforum.com/archive2005/editbox_203.zip
Others are inside Radasm as you know. But I found other in my computer that I was not able to find again in this board, so I'm posting.
Attached.
Quote.. at least not for sources with more than 65535 lines..
:smiley:
Admin' EDIT: Link Deleted
Quote from: lingo on July 19, 2023, 07:05:41 AMQuote.. at least not for sources with more than 65535 lines..
:smiley:
Interesting. Which RichEdit version, how did you do it? Can you post the executable?
Hi mineiro!
Quote from: mineiro on July 19, 2023, 06:49:52 AMBut I found other in my computer that I was not able to find again in this board, so I'm posting.
:thumbsup: Fantastic!! That is RadAsm before to be RadAsm :biggrin: .
Thanks, HSE.
Hi all,
I don't want to lost time with line numbers, just happen that KetilO's code, reposted by mineiro, is too easy to plug :biggrin:
Update in first post.
Pretty good on the line numbers! :thumbsup:
But for line numbers > 99999, the left side of the line numbers are cut off, only enough space for 5 digits there.
Otherwise the line numbering looks good. Still has the scroll bar issue though, I see.
edit to add. Looks like some misalignment - between the line numbers, and the text... otherwise looks nice.
33 visible line numbers, only 31 lines of visible text
(https://i.postimg.cc/yW86c4TD/untitled.png) (https://postimg.cc/yW86c4TD)
click image to view full size
Used "winextra.inc' pasted multiple times for this example.
Quote from: zedd151 on July 21, 2023, 09:42:01 AMUsed "winextra.inc' pasted multiple times for this example.
:thumbsup: I also open that, but only once. I think is the bigger file.
Quote from: zedd151 on July 21, 2023, 09:42:01 AMLooks like some misalignment
I made code more simple and font height was incorrect :biggrin:
Updated.
Quote from: mineiro on July 19, 2023, 06:49:52 AMI found some old codes that implement line number.
Good job, mineiro :thumbsup:
RichEdit's built-in mechanism, i.e. PFM_NUMBERING (https://masm32.com/board/index.php?topic=6563.msg102379#msg102379) is broken, but drawing on the DC is a valid alternative.
Quote from: HSE on July 21, 2023, 10:06:02 AMI made code more simple and font height was incorrect :biggrin:
Updated.
Its okay, it IS still a Work In Progress after all.
Much better. Alignment is exact. :thumbsup:
(https://i.postimg.cc/Vrr8Z1Zg/untitled2.png) (https://postimg.cc/Vrr8Z1Zg)
Click to view full size
Posted wrong image at first, Now correct image. Oops!
Now time for you to fix the Scroll Issue... :wink2:
Quote from: jj2007 on July 21, 2023, 10:09:49 AMGood job, mineiro :thumbsup:
RichEdit's built-in mechanism, i.e. PFM_NUMBERING (https://masm32.com/board/index.php?topic=6563.msg102379#msg102379) is broken, but drawing on the DC is a valid alternative.
I remember an iczelion page that talks about using dc to paint more quickly. Like an overlay window (transparent window above text edit window, by subclassing) to hilite words.
I suppose that Ketil have based a bit of their hard work by looking to source code of iczelion "asmedit", maybe I'm wrong (both have used IDM_ prefix to name some controls and date differs). Have also "simed" by Ketil that it's a full editor (code folding, line numbers, syntax hilite, ...) using only raedt.dll and simed.exe, you can find in wayback machine.