News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RichMasm: an editor that remembers your formatting

Started by jj2007, April 11, 2008, 11:46:58 PM

Previous topic - Next topic

jj2007

RichMasm is a special editor for working with assembler source code. It has been designed for long
source codes, and concentrates on effective navigation rather than on beauty and/or abundance of features.
The package includes a number of easy-to-use "skeletons", including dll and library examples, and
MasmBasic, a library that allows to use Basic syntax in assembler.
Download the package (updated 7 October 2009) at the bottom of the MasmBasic top post.


RichMasm has three main features for navigation:
1. The bookmarks: select some text and press Control D, as in your browser
2. The left & right arrows in the upper right corner provide you with a history of recent changes
3. Double-click on a word, e.g. on MyProc, press F3, and see a listbox of matches

Version 06 October 2009: MasmBasic added
Version 28 July 2009: fixed a little problem with the Find box
Version 22 July 2009: very simple DLL example added, works with ml/JWasm, link and polink; support for RTF JavaScript sources
Version 10 July 2009 has tooltips for URLs and context-sensitive help (within the limits of HtmlHelp)
Version 14 May 2009 features Last good version in the File menu, allowing you to revert to the last version that assembled without errors.
Version 31 March improves handling of linker warnings - see note on NoWarn option in Configure project.
Version 17 March 2009 has an AutoFormat entry in its menu, for harmonising blocks of obscurely formatted code.
Version 3 November adds support for tiny com apps - look for "8-byte Hello World programme" in the guide (inspired by this thread).
Version 30 October adds support to JWasm: If RichMasm finds \masm32\bin\JWASM.EXE, Japheth's tool will be automatically used (override with OPT_Assembler ml). Same applies for polink.
Version 8 October fixes a bug that occasionally showed an empty window when opening repeatedly docs from the same instance. My apologies :red
Version 7 October scratches the 50k size limit but also offers some goodies, especially for navigating through a long text - see below an example for the wildcard search sm*WM_ (sm is my equate for invoke SendMessage, ).
The new library example shows how to build MyLib.lib from several modules.
Full package attached below under the MasmBasic top post, feedback and suggestions welcome as always :bg

hutch--

jj,

I just downloaded it but when I try to run it in instantly GP faults. I am running win2000 sp4. Any idea of why this is happening ?
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

anuradha

it works fine with me .
runnig XP proffetional  Sp2

jj2007

#3
Quote from: hutch-- on April 12, 2008, 01:14:30 PM
I just downloaded it but when I try to run it in instantly GP faults. I am running win2000 sp4. Any idea of why this is happening ?

Hutch, I sent you a debug version by email. It might be a problem specific to Win2000.
While checking this, I stumbled over a problem:

.Repeat
         invoke GetMessage, ADDR msg, NULL, 0, 0
         invoke GetKeyState, VK_DOWN
.Until ax<8000h         ; GetKeystate needs a WORD

When debugging, it looped endlessly. My beta 0.9 seems not to be affected, and is fairly stable... mysteries of Windows!

Attached a new version which avoids this loop, and also has one more code snippet called "Controls skeleton".

Thanxalot for testing this.

hutch--

jj,

Solved the problem, your app requires GDIPLUS.DLL which I did not have installed. I added it back in and it displays correctly. Suggestion is to put a GDIPLUS detect routine in the startup code and advise the user if it is not available.

From a quick look it is certainly different.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jj2007

#5
Quote from: hutch-- on April 13, 2008, 02:15:43 AM
jj,

Solved the problem, your app requires GDIPLUS.DLL which I did not have installed. I added it back in and it displays correctly. Suggestion is to put a GDIPLUS detect routine in the startup code and advise the user if it is not available.


FIXED - see attachment, with other changes (e.g. Menu "File Open" is now as usual, while Control O is still the "either love it or hate it" way)

Quote
From a quick look it is certainly different.

Wow! I did not expect such a big complement from Sir Hutch, thanxalot! :cheekygreen:

EDIT:
Version of 7 July 2008 attached, now with DLL and LIB examples in the AutoCode section. Unzip to the root folder of your Masm32 drive with "use folder names".


EDIT(2):
Version of 18 September 2008 attached with next post.

What's new?
RichMasm is a special editor for working with assembler source code.
This is a beta, so you are using it at your own risk. Save frequently...
(If you really, really forgot to save, try to rename name.bak to name.asc).
RichMasm has been designed for long source codes, and concentrates on
effective navigation rather than on beauty and abundance of features.
An example: You wrote this great new CAT$ macro that is driving you mad...

Assembling: tmp_file.asm
tmp_file.asm(29) : error A2091: index value past end of string
MacroLoop(52): iteration 5: Macro Called From
  CAT$(96): Macro Called From
   MsgBox(1): Macro Called From
    tmp_file.asm(29): Main Line Code

So in line 96 of the macro, there is a problem. How do I get there, if the macro starts in line 231?
Either the hard way: 231+96-1=326; press Alt Goto, type 326, Enter...
Or the easy way: Place the cursor in the MACRO line and press Ctrl Shift Offset. From now on, the
line counter shows e.g. Line 326/96, meaning you are in line 326 of the doc and in line 96 of the macro.
To make things even easier, Alt Goto will now act relative to the start of the macro.

How to use Pelle's linker:
; OPT_Linker   polink

(you can specify quite a number of options embedded into the source through the OPT_ keyword; in general, you don't need any of them. For example, it is not necessary to tell RichMasm whether you want a CONSOLE or WINDOWS app - there is a pretty efficient autodetect routine that does it for you)

jj2007

#6
Version 18 September 2008 attached replaced by 21 30 September version attached with this post.

More stable, some bugfixes, hyperlinks.

For the fans of OllyDbg:

int 3      ; F6 assembles %file%.asm, links and starts \masm32\OllyDbg\ollydbg.exe %file%.exe
(you may have to press F9 yourself to start the debugging :bg)

; int 3      ; F6 assembles, links and starts %file%.exe without debugging

You can have multiple int 3's. If at least one (lowercase, int<space>3) is present, Olly will be launched, otherwise not. And of course, it will not be launched if Olly is not present at the exact location shown above in bold.

Remember RichMasm autodetects whether you have a console or windows app.

Farabi

This would be the smallest editor I ever seen. Looking forward for the next version.  :cheekygreen:
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

herge


Hi jj2007:

How do you set up help files?
I am having all sorts of trouble with
the help.

Regards herge
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy

jj2007

#9
Quote from: herge on September 19, 2008, 03:22:39 PM

Hi jj2007:

How do you set up help files?
I am having all sorts of trouble with
the help.

Regards herge

Check \masm32\RichMasm\menus.ini - entries can only work if the corresponding file is present. The format is shamelessly stolen from Quick Editor.

herge

 Hi jj2007:

This editor should be put in the  beta trash can!

Regards herge
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy

jj2007

Quote from: herge on September 19, 2008, 06:54:53 PM
This editor should be put in the  beta trash can!
Thanks for the nice feedback :8)
However, if you refer to the help files, remember it behaves exactly like Quick Editor... :bg

jj2007

#12
Quote from: Farabi on September 18, 2008, 01:00:51 PM
This would be the smallest editor I ever seen. Looking forward for the next version.  :cheekygreen:

Well, it's 50% bigger than qeditor.exe, but I won't enter in competition with Hutch.

New version is attached. I convinced RichEdit that hyperlinks are a useful feature, and that internally they should have the forum's format. In practice this means you can:

- insert a hyperlink in your source with Control K (e.g. a link to the post from which you copied all your good ideas :bg)
- select a code snippet
- press Control Shift C (i.e. plain text copy)
- switch to the Masm Forum
- press Control V to get a perfectly formatted code snippet including the url=http:// code

As Sir Hutch wrote earlier, RichMasm is certainly different :toothy

P.S.: In response to herge's problems, those help entries for which no file exists on disk will no longer be included in the menus. See also \masm32\RichMasm\menus.ini

EDIT: 23 September version attached here.

hutch--

JJ,

I have found one bug for you, when you start the editor and move the mouse over the "Autocode" menu entry, you get a RichMasm error saying the handle is invalid. The "Autocode" entry then disappears from the menu but you get the error msgbox if you move the mouse where it used to be.

The missing GDIPLUS warning works correctly and when I added it to the windows\system it detects it properly and I get the pictures as well.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jj2007

#14
Quote from: hutch-- on September 20, 2008, 11:33:27 PM
when you start the editor and move the mouse over the "Autocode" menu entry, you get a RichMasm error saying the handle is invalid.
Thanks, Hutch, this is indeed a fat bug. Question: Did you launch it with all files extracted to the root, option "using folder names" on? I have seen this problem when a menu had no files at all, so the only explanation I have it does not find any of the autocode files. They are hardcoded in menus.ini

MessageBox,\Masm32\RichMasm\messagebox.asc

I guess the format looks familiar to you :bg

EDIT: I fixed it, new attachment below. Now, it grays out the first file in the list if it is missing, instead of complaining. This should work (please confirm), although in practice the user should simply follow the instructions and extract all files to the root folder, thus creating the proper \masm32\RichMasm tree.