News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Another ASM editor

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

Previous topic - Next topic

NoCforMe

For those of you who thought my editor was dead and buried, it's baaaaaaaack ...

New version (2.7) has some nice features:

  • Added a text tagging panel. This is for open/close tags, like HTML. It'll add tags around selected text (like <b>text</b>). Tag text is saved in the .ini file.
  • Improved parsing (tokenization, actually) for cubbyhole & tag text: text can now contain embedded quotation marks, which are preserved in the .ini file (any double quotes are doubled in the .ini file, then converted back to single double quotes, if that makes sense).
  • Line numbering (turn on and off from the Format menu). There's also a goto line # command (from the Edit menu or Ctrl-G).

That's it. Complete source attached. Have fun playing with it.
Assembly language programming should be fun. That's why I do it.

Rockphorr

Good!

I wait for text-inserts tuning.
 :thup:

NoCforMe

Quote from: Rockphorr on August 02, 2023, 06:54:03 AMGood!

I wait for text-inserts tuning.
 :thup:

OK, I guess. But what is that ("text-inserts tuning")?

If it's something good then I must have it in my editor.
Assembly language programming should be fun. That's why I do it.

Rockphorr

Quote from: NoCforMe on August 15, 2023, 07:01:28 AM
Quote from: Rockphorr on August 02, 2023, 06:54:03 AMGood!

I wait for text-inserts tuning.
 :thup:

OK, I guess. But what is that ("text-inserts tuning")?

If it's something good then I must have it in my editor.

I think [inserts] menu should be linked with ini-file like so:

[CreateFint()]
INVOKE   CreateFont,
      fontHeight,      ;font height
      0,         ;avg. width (usually 0)
      0,         ;"escapement"
      0,         ;orientation
      FW_NORMAL,      ;weight
      FALSE,         ;italic
      FALSE,         ;underline
      FALSE,         ;strikeout
      ANSI_CHARSET,      ;char. set
      OUT_DEFAULT_PRECIS,   ;output precision
      CLIP_DEFAULT_PRECIS,   ;clip precision
      CLEARTYPE_QUALITY,   ;quality
      0,         ;pitch & family
      ADDR FontName      ;name of font


And users can add own code to insert.

I found that it is exist in EdAsm.cfg. Needs configure button to edit and apply changes.  Too far to use for user are "open folder" and "edit file" when no hints about where is it.

zedd

@ Rockphorr...

qeditor from the Masm32 SDK has similar functionality to that.
From a drop down menu, select an item (txt file), the text in the file selected will be inserted at the current caret position.

You can put a number of text files (*.txt) in a folder, and put an entry in "menus.ini" for that.  :biggrin:

Do you mean something like that?

Rockphorr

Quote from: zedd151 on October 06, 2023, 07:31:09 AM@ Rockphorr...

qeditor from the Masm32 SDK has similar functionality to that.
From a drop down menu, select an item (txt file), the text in the file selected will be inserted at the current caret position.

You can put a number of text files (*.txt) in a folder, and put an entry in "menus.ini" for that.  :biggrin:

Do you mean something like that?

Thanks, Yes i mean it. And menuitem that opens for change it from the editor. These features are hidden so  I need to discover a content of the editor folder.

After Windows 95 a distance to configure is right button click :)

jj2007

Quote from: zedd151 on October 06, 2023, 07:31:09 AMqeditor from the Masm32 SDK has similar functionality to that.
From a drop down menu, select an item (txt file), the text in the file selected will be inserted at the current caret position.

Extremely clumsy but it works, indeed.

Quote from: Rockphorr on October 06, 2023, 07:26:06 AMI found that it is exist in EdAsm.cfg

For RichMasm, it's \Masm32\MasmBasic\Res\Keywords.ini - over 100 shortcuts. You type e.g. cwx<space>, and you get
    invoke CreateWindowExW, WS_EX_CLIENTEDGE, wChr$("edit"), NULL,
      WS_CHILD or WS_VISIBLE or WS_BORDER or WS_VSCROLL or ES_MULTILINE,
      9, 9, 500, 200, hWnd, 103, wcx.hInstance, NULL; we have added an edit control
        mov hEdit, eax    ; you may need this global variable for further processing

You type .rep<space>, and you get a perfect .Repeat ... .Until loop, with a special char selected in the middle so that you can just continue typing inc ecx or whatever. I use that feature all the time, and I couldn't live without it.

NoCforMe

Quote from: Rockphorr on October 06, 2023, 07:26:06 AMI found that it [configuration file] is exist in EdAsm.cfg. Needs configure button to edit and apply changes.  Too far to use for user are "open folder" and "edit file" when no hints about where is it.

Well, I won't argue with you; what you're describing is a configuration editor within the editor, which would definitely be a nice feature. Lotsa work to implement. I'll keep it in mind for when I finish other projects and maybe get bored ...
Assembly language programming should be fun. That's why I do it.

NoCforMe

Quote from: Rockphorr on October 06, 2023, 07:26:06 AMNeeds configure button to edit and apply changes.  Too far to use for user are "open folder" and "edit file" when no hints about where is it.
Well, your wish is my command. This new version has just what you asked for: a built-in configuration editor so you can add and change configuration items without having to edit a stupid configuration file (and figure out where the hell that file is!).

Choose "Configuration editor" from the File menu. Complete package including source attached.

The config editor incorporates my LM (list management) module, described in this thread.
Assembly language programming should be fun. That's why I do it.

Rockphorr

Quote from: NoCforMe on February 15, 2024, 01:44:38 PM
Quote from: Rockphorr on October 06, 2023, 07:26:06 AMNeeds configure button to edit and apply changes.  Too far to use for user are "open folder" and "edit file" when no hints about where is it.
Well, your wish is my command. This new version has just what you asked for: a built-in configuration editor so you can add and change configuration items without having to edit a stupid configuration file (and figure out where the hell that file is!).

Choose "Configuration editor" from the File menu. Complete package including source attached.

The config editor incorporates my LM (list management) module, described in this thread.

More better !!! :thumbsup:  :thumbsup:  :thumbsup:

jj2007

Quote from: NoCforMe on February 15, 2024, 01:44:38 PMThis new version has just what you asked for

After clicking Format/Editing font, Ok, another click into the main edit window closes the program without saving your edits. Do you use this editor for your daily coding?

NoCforMe

#131
Yes I do, but I've never done that. Urg, that's definitely a bug (doing that brought up OllyDbug). Thanks for the bug report; I'll have "my people" look at this right away.

Bug caught and fixed. Stupid mistake, trying to use a pointer in a register after a function call that trashed it. JJ, you the man of the hour. I owe you one.

Updated version (2.8) attached to this post.
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on March 07, 2024, 12:35:17 PMthat's definitely a bug

... and it's definitely fixed :thumbsup:

Good work :thumbsup:

Two minor points:
- I can't get in love with the cubby holes (you might at least add tooltips explaining how to use them)
- Instead of choosing the font size, you might wish to look at storing the zoom parameter, like SimpleEditor does.

NoCforMe

Quote from: jj2007 on March 07, 2024, 09:37:30 PMTwo minor points:
- I can't get in love with the cubby holes (you might at least add tooltips explaining how to use them)
I'll admit they're a bit odd. I've grown to like them very much, as I use this editor all the time now. Tooltips would be nice.

I'll also admit that my (fake) bookmarks aren't anywhere near as useful as yours, which stay put. But because I'm not using all the capabilities of the RichEdit control, it'd be very difficult for me to implement "real", (i.e., sticky) bookmarks. They're still semi-useful.
Quote- Instead of choosing the font size, you might wish to look at storing the zoom parameter, like SimpleEditor does.
That would be another option. I've noticed that "zoom" factor inadvertently when I hit the wrong key and all of a sudden all my text is a different size ...
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on March 08, 2024, 05:56:12 AMI've noticed that "zoom" factor inadvertently when I hit the wrong key and all of a sudden all my text is a different size

Zoom happens when you hold Ctrl and play with the mousewheel.

SavZoom: push eax ; SaveSettings zoom
mov edx, esp ; this bloody message doesn't work
push eax ; most of the time, except on Close
invoke SendMessage, hRichEd, EM_GETZOOM, edx, esp
pop edx
pop ecx ; 0 if 100%
.if edx>50 && ecx!=curZoom  ; sometimes it goes to edx=8, ecx=8 in rtf files
mov curZoom, ecx
SetIni$ "Zoom", Str$(ecx)
.endif
retn

For inspiration; EM_GETZOOM is the other useful message.