Masm32 SDK description, downloads and other helpful links

Main Menu

A guide to the RichMasm editor

Started by jj2007, April 28, 2016, 10:09:34 PM

Previous topic - Next topic


here is the idea, let me know what you think about it:

Create a TreeView with a couple of parents:

Macros the code and populate the childs with.



Yes, that's possible. EM_FINDTEXT is your friend...

I just checked if you can create controls, too - yes, it works, see attachment.


The flat GdiPlus API has been added to RichMasm's bubble help feature - example below. See the RichMasm beta with bubble help for WinAPI post for details.


Work this RichMasm.ini part ?:ColFg=0AAAAAAh ; default text colour
Fg8=0B0B0B0h ; light gray
Fg16=0A0h ; dark red
Fg24=0A00000h ; dark blue
Fg32=0aaaah ; dark yellow
Fg40=0ffffffh ; white
Fg48=0FFFFFh ; green

Equations in Assembly: SmplMath


Yes it works. Open \Masm32\MasmBasic\Res\RichMasm.ini and edit as follows:

ColBg=0FFFFE0h ; default, turquois **** DO NOT CHANGE THE ORDER OF THESE ENTRIES! ****
ColFg=0 ; default text colour

New version:
ColBg=0 ; pitch black **** DO NOT CHANGE THE ORDER OF THESE ENTRIES! ****
ColFg=ffffh ; default text colour YELLOW in BGR notation!

Restart RichMasm to see the effect.


Sometimes I feel the need to embed an image into a source. Here, for example, an image showing the format of a REAL10 number is useful in the context of the Fcmp macro:

How is it done? In RichMasm,
- put the text cursor to the end of a comment
- click menu "Open" and select an image
- say "yes" to the "Insert image?" box
- say "OK" to the "Click and move now" box
- click into the image and move it
- when it's at the right position, click again 8)


Attached a slightly updated version of the AllOpcodes.rtf document. You can open it in WordPad or MS Word or any other editor that understands Rich Text Format.

Of course, I use RichMasm. If the rtf hangs around at \Masm32\RichMasm\Help\AllOpcodes.rtf, it will appear in RichMasm's Help menu: Select an instruction, e.g. add, then hover over the Help menu until it opens and click All Opcodes. The listbox will fill as follows:
ADDPD Packed Double-Precision Floating-Point Add
ADDPS Packed Single-Precision Floating-Point Add
ADDSD Scalar Double-Precision Floating-Point Add
ADDSS Scalar Single-Precision Floating-Point Add
ADDSUBPD Packed Double-FP Add/Subtract
ADDSUBPS Packed Single-FP Add/Subtract
HADDPD Packed Double-FP Horizontal Add
HADDPS Packed Single-FP Horizontal Add
PADDQ Packed Quadword Add
PADDSB/PADDSW Packed Add with Saturation
PADDSB/PADDSW Packed Add with Saturation
PADDUSB/PADDUSW Packed Add Unsigned with Saturation
PADDUSB/PADDUSW Packed Add Unsigned with Saturation
PMADDWD Packed Multiply and Add

Another technique that I often use for my libraries is to make a comment, e.g. ; opcodes, then select opcodes and press Ctrl K to insert a hyperlink. In this case, as shown in the screenshot below, it could be \masm32\RichMasm\help\AllOpcodes.rtf#fptan--, where the red part instructs RichMasm to open the rtf, then search immediately for the string fptan--. With one click on the link, you go straight to the entry where the fptan instruction is explained.


Hey guys, I'm running into issues with RichMasm in general, I have been trying to get this to work but, sadly, it's misbehaving for me, first of all, I have installed MASM32, and it installed just fine, I got everything successfully compiled and up to the ending success message... So following that, I got the latest MasmBasic from this post over here:

After I followed all the instructions line by line, I got to install it under `\Masm32\` where Masm32 is located and where it was recommended.

I open RichMasm and was excited enough to finally give it a try when, it started to misbehave... for starters, clicking links, won't follow the actual link, it will just open `\Res\` directory, for anything that I click on the green area... (Main Guide), so I said, what the heck, let me try now with another thing, I followed some steps on how to create a new simple Masm app, by going to `File -> New File/Masm Source` and tried that, with no avail, it simply won't work.. I'm frustrated, because I really wanted to give this a try... any ideas what I did wrong or what could possibly went wrong, or why does it simply works for me?

System Specs:
- OS: Windows 10 Pro (x64)
- Version: 1903
- Build: 18362.720


Hi Tio,

Sorry for that. It seems that your Windows version does something odd concerning links (note I don't blame your Windows installation, but it works on mine, including Windows 10, so I'd like to understand what's wrong...). Three short questions:

- when you hit F6 in the main help file, does it build and show the box "Wow, it works"?

- When you click the menu File/New Masm source, does it open a greenish box to the right that starts with Click to open a template, then hit F6 to run it:?

- is the editor at ?:\Masm32\MasmBasic\RichMasm.exe?

Thanks for your feedback :thup:


HI JJ!!! IT WORKS NOW!!! (uppercaps intended because I'm overly excited! hahaha)

All I had to do was to install FileFormatConverter downloaded from:

and everything works like a charm now!! WOOOW! I always skipped that little messagebox at the beginning of loading the actual `MbGuide.rtf` so I would never thought that was the only thing that would make it work!

I think this would be a good remark to bring up in a troubleshoot thread or something!

Thanks again!  :thumbsup:

Viva MasmBasic!


Great job, Tio - and thanks again for the feedback :thup:

I will have to investigate why the file converter is needed. All it does for RichMasm is actually provide a more advanced RichEd20.dll :cool:

Another candidate for the RichEd20.DLL bugs thread :tongue:


Quote from: jj2007 on April 03, 2020, 11:36:43 AM
Great job, Tio - and thanks again for the feedback :thup:

My pleasure! - I fell in love this project at first sight!

Quote from: jj2007 on April 03, 2020, 11:36:43 AM
I will have to investigate why the file converter is needed. All it does for RichMasm is actually provide a more advanced RichEd20.dll :cool:

Another candidate for the RichEd20.DLL bugs thread :tongue:



Let's say you have a typical resource file:
#include "resource.h"
IDI_APPLICATION ICON "\\Masm32\\MasmBasic\\icons\\Smiley.ico"
01 RT_MANIFEST "\\Masm32\\MasmBasic\\Res\\XpManifest.xml"
#define IDC_MENU 100
#define IDM_SAYHELLO 101
#define IDM_GETTEXT 102
#define IDM_CLEAR 103
#define IDM_EXIT 104
    POPUP "The menu"
        MENUITEM "Say Hello", IDM_SAYHELLO
        MENUITEM "Get Text", IDM_GETTEXT
        MENUITEM "Clear Edit Box", IDM_CLEAR
        MENUITEM "E&xit", IDM_EXIT

To work with it in the main code, you need this:

Wow, that's a lot of stupid typing, right? There is a less known function in RichMasm: select some text and press Ctrl N (N like "Number"). For example, 12345678h yields this:
Dec: 305419896
Hex: 12345678h

Now, if you select the #define block of text above, Ctrl N will rightly recognise that you want more than one number, and invite you to put the IDC_MENU=100 etc version on the clipboard.

The new RichMasm version comes with MasmBasic 19.9.23. Enjoy :thup: