News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Another ASM editor

Started by NoCforMe, September 03, 2022, 06:54:23 AM

Previous topic - Next topic

NoCforMe

It seems to be all the rage to create yet another editor for assembly code, so here's mine.

This is what I accomplished in a couple sittings over one day. It's not an editor yet, no open or save, but you can check out some features. Everything on the tool list at the right is implemented; try it out. You'll see what those buttons do.

"Cubbyholes"? That's my idea for a set of "bins" where you can stash bits of text and do the following by clicking on a button (4 buttons/bin):

  • Paste the text into the editor
  • Search the editor text in either direction
This would solve the frustrating problem of Notepad (and many, if not most, other editors) of only being able to hold one item at a time either on the clipboard or as a search term. I regularly want to be able to look for and paste 3 or 4 bits of text at a time.

This is just a fun project at this point; no delusions about making a "real" editor out of it. (For one thing, it's just a basic Win32 edit control with a bunch of fancy stuff attached to it.) OTOH, who knows? I could probably come up with something a whole lot better than Notepad if I stick to it.

I'd appreciate any comments about the interface design, and suggestions for improvement. Not talking about the appearance so much as the functionality and behavior. Thanks!

In case anyone's wondering, that tool list is based on a listbox, using custom draw and notifications, and some attached child controls (buttons). So the listbox cells act as buttons. One thing that isn't so good is that there's no feedback when you click on a cell to insert its text. Maybe buttons would be better? But it does make for nice easy programming. I could "flash" the cell (change FG & BG colors) momentarily to indicate it being clicked. Let me know your ideas.
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on September 03, 2022, 06:54:23 AM"Cubbyholes"? That's my idea for a set of "bins" where you can stash bits of text and do the following by clicking on a button (4 buttons/bin):

  • Paste the text into the editor
  • Search the editor text in either direction
This would solve the frustrating problem of Notepad (and many, if not most, other editors) of only being able to hold one item at a time either on the clipboard or as a search term. I regularly want to be able to look for and paste 3 or 4 bits of text at a time.

MS Office has the multiple clipboard feature. Sounds good, actually, I might steal the idea :biggrin:

Re multiple search terms, in RichMasm you just hit Ctrl F, then arrow up (or down) to scroll through the last 9 search terms used. They are stored with the document, so when you reopen it, these 9 search strings are still there. Another feature: select any word and hit F3 to find all matches.

Btw I can't see the caption of your editor, and there is no way to move it into visibility. Congrats, you have a nice high resolution monitor! You may consider this:

invoke SystemParametersInfo, SPI_GETWORKAREA, 0, addr rc, 0

zedd151

Quote from: NoCforMe on September 03, 2022, 06:54:23 AMIt seems to be all the rage to create yet another editor for assembly code...
In keeping with the trend, I'll release in the next day or so "SaMe editor" -  otherwise knows as "Still another Masm editor" :biggrin:
Or then again, maybe not.

I do have code though, for a coupla editors...

NoCforMe

Quote from: jj2007 on September 03, 2022, 07:10:56 AM
Btw I can't see the caption of your editor, and there is no way to move it into visibility. Congrats, you have a nice high resolution monitor! You may consider this:

invoke SystemParametersInfo, SPI_GETWORKAREA, 0, addr rc, 0

Thanks. That sounds like just the thing. Easily done.
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: swordfish on September 03, 2022, 07:44:53 AMIn keeping with the trend, I'll release in the next day or so "SaMe editor" -  otherwise knows as "Still another Masm editor"

I recommend TinyIDE - a 7,168 byte editor for *.asm, *.asc and *.rtf files. Source included, 1,100 lines of purest Masm32 SDK :thumbsup:

zedd151

Quote from: jj2007 on September 03, 2022, 08:52:14 AM
Quote from: swordfish on September 03, 2022, 07:44:53 AMIn keeping with the trend, I'll release in the next day or so "SaMe editor" -  otherwise knows as "Still another Masm editor"
I recommend TinyIDE
Thanks, but...
Oh, yeah I've got SimplEd. A dialog box based richedit editor. Have made a lot of additions and enhancements to it, mostly for formatting code in my particular (peculiar?) style. Another one that is the base code for one of my plugin builder (for qeditor) programs, and a coupla two or three more editors that are less noteworthy unless I've already sent them to the circular file so to speak.
I may post those that I have code for still, at some point after I make it ready. I.e., add commenting for the most part, and format it to be readable by most* and make it user-friendly. I was only kidding about the SaMe editor.  :tongue: 


Can't remember which one, but one of my editors highlights (change text color) whatever string is searched for when it's found. It doesn't support .rtf so the color change is only visible until file is closed. At some point I experimented with code highlighting. Registers and variables. Don't think I have that anymore though.

NoCforMe

Do you actually like Qeditor? I just tried it. Seems clunky, weird. Tried a bunch of the "tools", most of which offer no explanation of how they work (tried swapping 32-bit registers, it kept telling me that "x is not in selection" WTF???

All in all, it smells like a hobbyist-built project (yeah, like a lot of my stuff) with a lot of clever doodads hanging off it but maybe not the best user interface. Thing is, I don't try to pass off my creations as high-quality, untuitively useful tools.

So you can add plugins to it? How does that work?
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on September 03, 2022, 09:46:33 AMSo you can add plugins to it? How does that work?

Basically, you write a DLL that gets loaded by qEditor, with access to some essentials, such as the handle of the riched control. See also COM interface plugin (same principle, but for another editor).

zedd151

#8

Quote from: NoCforMe on September 03, 2022, 09:46:33 AM
Do you actually like Qeditor? I just tried it. Seems clunky, weird. Tried a bunch of the "tools", most of which offer no explanation of how they work (tried swapping 32-bit registers, it kept telling me that "x is not in selection" WTF??
For the 'Swap 32 bit registers' plugin and most others, you're supposed to select the code you want to change first; then select the 'Swap 32 bit registers' (or other) from the menu; then select whatever registers you want to swap; then click the 'swap' button in the case of 'Swap 32 bit registers'. And yes I like qeditor.




edit = typos

hutch--

David,

Code editors are like girlfriends, you pick what you like if it works for you. QE is a pure ASCII editor, programmable menus up to the limit of screen space, a scripting engine that actually works and it can routinely open files over 100 megabytes. Like any tool, you need to learn how it works but it does what I wrote it to do, create and edit assembler code. The programmable menus give you access to as many other tools as you need and it is FAST.  :tongue:

The new 64 bit version will do most of the same thing but will open over 700 megabyte files.

NoCforMe

Here's a new version. This is mainly to show how "cubbyholes" might work. (I couldn't think of a better name for them.) There are 5 slots which can hold text. The 4 buttons are for copy, paste, search down and search up. Only the 1st buttons work; they just copy some text into the cubbyhole to prove the concept works.

The idea is you can select text, then click on the Copy button to put that text in the cubbyhole. Then you can paste it by clicking that button, or search in either direction with the other 2 buttons. It's a lot of buttons, yes, but everything's right there on screen without having to open dialogs or menus.

This marks my first-ever use of Unicode. The odd characters in the buttons are Unicode (the three-line character is officially known as the "trigram for heaven", from the I Ching, I guess).

I'm not ready to go full Unicode; I'm too used to typing

ButtonClassname DB "button", 0

where I had to do this to get a Unicode window (with CreateWindowExW() ):

ButtonClassname DB 'b',0,'u',0,'t',0,'t',0,'o',0,'n',0,0,0

Not ready for that yet. Yeah, I know there are macros for this stuff, or I could roll my own. But it's a pain in the ass.

Yes, I know there's a problem with the resizing code here; the status bar gets covered up. We're working on it here at NoCforMe Laboratories, GmbH. (Resizing is tricky!)
Assembly language programming should be fun. That's why I do it.

zedd151


Here's your unicode string:ButtonClassname DW 'b','u','t','t','o','n', 0, 0  ; UNICODE == unicorn. :biggrin:
DW instead of DB. edit to add --> I just tested it, it works.

I like "cubby holes". It sounds better than "pigeon holes", for instance.

NoCforMe

Ah, 10 points to you. Didn't think of that. Probably how the macro would work. (You only need one pair of zeroes at the end.)
Assembly language programming should be fun. That's why I do it.

TimoVJL

A plugins might help to make those UNICODE strings, as masm don't support those strings in native way, like asmc, UAsm and poasm.
May the source be with you

zedd151

Quote from: TimoVJL on September 03, 2022, 09:57:50 PM
A plugins might help to make those UNICODE strings, as masm don't support those strings in native way, like asmc, UAsm and poasm.
Did someone say 'plugin'? Hehe.  :biggrin:  Good idea, I think I'll make one for converting ascii to unicode.  :cool:
Time to break out my PluginBuilder.  :cool: