The MASM Forum

General => The Soap Box => Topic started by: jj2007 on January 28, 2019, 03:09:23 AM

Title: Editors
Post by: jj2007 on January 28, 2019, 03:09:23 AM
We haven't had a Holy War on editors for a long time - maybe we can design this thread to give an overview what's available. Contributors are kindly asked to refrain from trolling and to provide only screenshots of editors they consider worthwhile mentioning for assembly programming 8)

Note this is not the first thread concerning editors. See e.g. LordAdef's 3 code editors, my review (http://masm32.com/board/index.php?topic=6978.0).

This thread is intended to give a quick visual impression to newcomers looking for the "right" MASM editor.

The order of appearance does not imply any ranking.

If the author of an editor wants to add a few lines (max 10) to explain outstanding features, please PM me, and I will add them before the screenshot.

#1: qEditor - supplied with the Masm32 SDK (http://masm32.com/install.htm), you already have it at \Masm32\qeditor.exe

Advantages: Very simple, tailored to the needs of a beginner, very fast, ...
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 03:11:12 AM
#2: RadAsm (https://www.softpedia.com/get/Programming/File-Editors/RadASM.shtml#sgal_2)

Advantages: It supports a wide variety of programming languages and assemblers such has MASM, NASM, FASM, TASM, Borland C, C++, Bcet Basic, VC6 C/C++, Free Pascal and FreeBASIC.

(https://windows-cdn.softpedia.com/screenshots/RadASM_3.png)
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 03:12:32 AM
#3: EasyCode (http://www.easycode.cat/English/Help/GoAsm/ECEditor.htm)

Advantages: Each module (and window object in visual projects) has its own editor. The editor has a surprising speed and quickness and it can be splitted, so that you can have two windows in one

(http://www.easycode.cat/English/Help/GoAsm/ECEditor.gif)
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 03:13:39 AM
#4: RichMasm (http://masm32.com/board/index.php?topic=5314.0)

Advantages: Tailored to MASM programming, e.g. with integrated debugging (http://masm32.com/board/index.php?topic=5314.msg63302#msg63302); Unicode (Utf8); persistent bookmarks and history, individual highlighting (sources are stored as RTF); remarkable search features (http://masm32.com/board/index.php?topic=5314.msg57074#msg57074) (case-sensitive/insensitive, full word, wildcards), especially useful for big sources >10k lines. Resources can be embedded into the main source, see below. There are plug-ins to use RM with other programming languages (C/C++, Basic, ...). RM can export BBC code for formatted forum postings.

(http://www.webalice.it/jj2006/pics/RmRsrc.jpg)
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 03:33:20 AM
#5: Notepad++ (https://notepad-plus-plus.org/)

Advantages: Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages. Running in the MS Windows environment

(https://notepad-plus-plus.org/assets/images/notepad4ever.gif)
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 03:35:45 AM
#6: ACE - ASM Code Editor (http://masm32.com/board/index.php?topic=7630.0)

Advantages: Let the writing of your assembly programs be even more fun. No more retyping of variables and labels, ACE has you covered with autocomplete in many cases. Together with innovative GUI for input of ASM instructions, the editor makes it possible to write a whole line of code by pressing only a few keys.
It also offers easy navigation within code as well as editing enhancements.

(https://store-images.s-microsoft.com/image/apps.11121.14301375340333469.33bb371b-2353-46c3-afc0-f6958d9b53ca.a6772cef-fb14-4237-a839-a1edc0120c6f?w=672&h=378&q=80&mode=letterbox&background=%23FFE4E4E4&format=jpg)
Title: Re: Editors
Post by: guga on January 28, 2019, 03:57:36 AM
Honestly speaking....It has been some time since i last used masm editors, but....Radasm is still the best IMHO. Easy to use, good and clean interface, free, and no bugs i saw on the last version.

Also, your´s MasmBasic have some great tools, but i didn´t tried to learn it´s syntax yet to use on a regular basis.

If someone wants to choose... well...Radasm and MasmBasic are the way to go always :t :t :t :t
Title: Re: Editors
Post by: ragdog on January 28, 2019, 04:12:02 AM
My favourite Radasm 3 ,and MasmEd from ketilo ,Winasm Studio all open source.  :t

Many years ago have i beginning write my first code in Ms Notepad but Ultraedit or Notepad++ works well.
But you can code assembly in all editors like Pelles C or Visual Studio

But Radasm is perfect :t
Title: Re: Editors
Post by: felipe on January 28, 2019, 04:17:11 AM
qeditor is the best for me.  :bgrin:

This thread is intended to give a quick visual impression to newcomers looking for the "right" MASM editor.

I think if that's the case, this should go into the campus... :idea: Nice thread btw  :icon14:
Title: Re: Editors
Post by: felipe on January 28, 2019, 04:23:39 AM
Btw, uasm it's an active assembler in this forum too (i guess). I have never used it , it comes with an editor of some kind?  :idea:
Title: Re: Editors
Post by: jimg on January 28, 2019, 04:30:54 AM
WinAsm Studio forever :)
Title: Re: Editors
Post by: HSE on January 28, 2019, 07:14:58 AM
Features:

Sintax Highligthing
- qEditor: Not at all. But background and foreground colors and font are configurables.
- WinAsm, Radasm, Easy Code, Notepad++: fully configurable.
- RichMasm: Respond to some original author's ideas, poorly configurable.

Project Management
- WinAsm, Radasm,Easy Code: a project browser (a feature necessary to qualify like IDE).
- qEditor, Notepad++: use of batch files, called from a configurable menu.
- RichMasm: not supported.

Development
- qEditor: Not at present (perhaps will be replaced by a 64bit version in some future)
- Easy Code and RichMasm: Active.
- WinAsm and RadAsm: Not at present. Source codes are available. You can make modifications if you want (and if you understand the code, not so easy)
Title: Re: Editors
Post by: ragdog on January 28, 2019, 07:45:06 AM
Code: [Select]
WinAsm and RadAsm: Not at present. Source codes are available. You can make modifications if you want (and if you understand the code, not so easy)
Yes is a little complex l but a little study is ok for add new function.
But other ide like visual studio is more complex vs v13 ide  is coding in Microsoft Visual C++ 8
but Msbuild (Net) for compiling projects.

But for normal users is MasmEd ok is similar radasm
(https://s15.directupload.net/images/190127/rgyfnbl3.png)
Title: Re: Editors
Post by: felipe on January 28, 2019, 08:04:35 AM
qeditor have some great features like the buttons in the tool bar. Run is great when you are tired of using the keyboard. You can access the cmd easily with one button too. Making a new instance of the program with one button have been very usefull for me too (specially when creating a 64 bits version program from a 32 bits version). One of my favorites features is the f11 key, which allows you to access to the current folder where you program is. And this of course are just a few functionalities. I mean, you can use very cool tools on it, even a dissasembler...why i will need another editor in all my life?  :icon_mrgreen:  :greenclp:
Title: Re: Editors
Post by: HSE on January 28, 2019, 08:10:38 AM
I'm thinking that MasmEd is Radasm 1.0
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 09:51:51 AM
Project Management
- RichMasm: not soported.

Just in case you mean these Hello World "projects" that come along as zip archives with a dozen little files: You are right, RichMasm doesn't support that. But it manages the MasmBasic project (30,000+ lines of code) just fine.
Title: Re: Editors
Post by: HSE on January 28, 2019, 11:06:49 AM
not soported.
Sorry my English.

"Dozen little files" is very usual. There is a modified RadAsm because original "only" allow 256 files  :biggrin:. Just user's preferences.
Title: Re: Editors
Post by: hutch-- on January 28, 2019, 01:55:24 PM
Choosing an editor is something like choosing a girlfriend, the best choice is writing your own, the next best choice is finding one that does what you want, the worst choice is using an editor that does not do what you want. QE is my choice of an editor, it is not an IDE but a pure ascii editor and its intent is all grunt with no eye candy, I hate gimmicky things that don't have a use or add complexity for no reason, QE is fast, will load big files for a 32 bit editor, it has programmable menus and 2 script engines to automate template and other code generation.

I always did OK with tall athletic blondes but some folks like curvy brunettes, not like me to interfere with individual taste.  :P
Title: Re: Editors
Post by: ragdog on January 28, 2019, 06:55:47 PM
I'm thinking that MasmEd is Radasm 1.0

MasmEd is a other IDE from Ketilo it support only Masm ,Radasm support many other languages.
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 08:02:42 PM
QE is my choice of an editor, it is not an IDE but a pure ascii editor and its intent is all grunt with no eye candy

QE is cute, but it lacks a MRU menu and the F? key for "build and run". That's not eye candy, it's a necessity.
Title: Re: Editors
Post by: hutch-- on January 28, 2019, 08:52:26 PM
 :biggrin:

These are the joys of a multi instance editor but build and run are different options on the programmable menus. I like to see what a build does before I try and run it.
Title: Re: Editors
Post by: TimoVJL on January 28, 2019, 09:26:06 PM
I also like to see compiler messages ;)
TLIDE (http://masm32.com/board/index.php?topic=7483.msg81793#msg81793)
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 10:06:20 PM
I also like to see compiler messages ;)

Me too, but if it builds without errors, they should disappear after a few seconds to let me concentrate on my code again. And of course, they should not eat up my precious vertical*) space - Assembler is a vertical language.

*) My favourite quote: It is practically impossible to teach good programming to students that have had a prior exposure to Visual Crap: as potential programmers they are mentally mutilated beyond hope of regeneration.
Title: Re: Editors
Post by: aw27 on January 28, 2019, 11:13:54 PM
I don't use it frequently (for lazyness) but IMVAO (in my very arrogant opinion) the best editor (with integrated debugger) is VS. It can even be more charmful with the AsmHighlighter extension but I don't have it installed on this computer.

(https://www.dropbox.com/s/jtm9u68qq64f0pg/vstudio.png?dl=1)
Title: Re: Editors
Post by: jj2007 on January 28, 2019, 11:28:00 PM
I don't use it frequently (for lazyness)

Now that raises an obvious question: Does that mean that
a) you don't code much at all or
b) you don't use it much because VS causes you more work?

If b) which editor do you use instead?
Title: Re: Editors
Post by: aw27 on January 28, 2019, 11:43:58 PM
It requires a little more preparatory work, namely to make it work with the masm32 libraries instead of the default ones.  On the other hand, with VS we have the guarantee of using the latest and greatest Microsoft tools, so we will be the first to find the new bugs.
Usually, I use Notepad++.
Title: Re: Editors
Post by: felipe on January 29, 2019, 03:37:12 AM
if you use qeditor you will always see the compiler ASSEMBLER output  :biggrin:
Title: Re: Editors
Post by: TimoVJL on January 29, 2019, 04:55:51 AM
if you use qeditor you will always see the compiler ASSEMBLER output  :biggrin:
What that comment actually means ? What qeditor output? It is just a text editor :biggrin:
Title: Re: Editors
Post by: felipe on January 29, 2019, 05:09:02 AM
if you use qeditor you will always see the compiler ASSEMBLER output  :biggrin:
What that comment actually means ? What qeditor output? It is just a text editor :biggrin:
it means qeditor brings the output of the assembler for you. qeditor use .bat files but are an integrated part of it. you can add your owns too... :idea:
Title: Re: Editors
Post by: HSE on January 29, 2019, 08:40:14 AM
if you use qeditor you will always see the compiler ASSEMBLER output  :biggrin:
What that comment actually means ?
Timo, apparently you don't know qWord (a member of this forum). Assembly code is assembled, not compiled  :biggrin:

qEditor run the batch in a shell, and you can see assembler messages in a console. In that way screen space is not waisted, same principle explained by JJ.
Title: Re: Editors
Post by: aw27 on January 29, 2019, 01:50:25 PM
Actually this is mostly a semantic distinction. Nowadays, compilers don't produce assembly code to be passed to an Assembler. They generate the machine code directly. So a compiler is also an Assembler from the point of view of the end result -≥ machine code production. The trend is to bypass middlemen whenever possible and save money, the same as in real life.
The important distinction is between compilers/assemblers and interpreters, not between compilers and assemblers.  :biggrin:
Title: Re: Editors
Post by: felipe on January 29, 2019, 02:57:48 PM
Actually this is mostly a semantic distinction. Nowadays, compilers don't produce assembly code to be passed to an Assembler. They generate the machine code directly. So a compiler is also an Assembler from the point of view of the end result -≥ machine code production.

i don't think so, compilers that don't translate to assembly first, will translate to some sort of intermediate code anyway. especially if after that, the compiler will try to produce optimized code...:idea:
Title: Re: Editors
Post by: aw27 on January 29, 2019, 03:39:19 PM
i don't think so, compilers that don't translate to assembly first, will translate to some sort of intermediate code anyway. especially if after that, the compiler will try to produce optimized code...:idea:

Nope, you are wrong. Almost every compiler produces object code directly. Object code is machine code waiting to be linked with other modules, including ones produced by assemblers.  Of course, compilers can generate Assembly Language output, but will not use it for their production of the object code.
The fact that compilers transform HLL languages into machine code by stages, even through intermediate languages, is not relevant - users don't have access to that and must consider it a processing artifact.
Title: Re: Editors
Post by: hutch-- on January 29, 2019, 04:50:36 PM
32 bit CL.EXE used to have the option to output assembler code and while it was scruffy looking stuff, it generally worked OK. It was a reasonable way to get a C algo, output it as asm then optimised the asm as well as tidy it up.
Title: Re: Editors
Post by: aw27 on January 29, 2019, 05:05:36 PM
32 bit CL.EXE used to have the option to output assembler code and while it was scruffy looking stuff, it generally worked OK. It was a reasonable way to get a C algo, output it as asm then optimised the asm as well as tidy it up.
It still does. Sometimes we can get smaller executables simply by using an Assembler on that.
For speed is more difficult but some times possible.
It is not always possible, if I provide some pseudo code and tell an ASM programmer, even a good one, to code it without checking what a C/C++ compiler would do, most times the compiler will do better. So, trying to see first what the compiler does and optimize on it may be fruitful. Trying to beat it blindly will likely be a failure.  :biggrin:
Title: Re: Editors
Post by: TimoVJL on January 29, 2019, 05:37:23 PM
gcc still uses as.

@HSE
Quote
An assembler translates assembly code to machine code.
All assemblers are (simple) compilers, since they transform one language to another.
EDIT:
Quote
The word assembler is used to describe programs that translate directly between assembly language and machine code. Assembly language is a human readable representation of machine code.
Title: Re: Editors
Post by: HSE on January 29, 2019, 08:58:43 PM
Machine code is not a representation but the real thing, then is not a language.
Title: Re: Editors
Post by: daydreamer on January 30, 2019, 03:51:25 AM
Actually this is mostly a semantic distinction. Nowadays, compilers don't produce assembly code to be passed to an Assembler. They generate the machine code directly.
Use your webcam to take a picture of your favourite "compiler"  :greenclp:
Isn't that what an assembler programmer do? A compilers job
I like qeditor,but sometimes coded asm inline in VS,once tried eclipse for app tutorial,was slow
Title: Re: Editors
Post by: felipe on January 30, 2019, 06:32:42 AM
The fact that compilers transform HLL languages into machine code by stages, even through intermediate languages, is not relevant - users don't have access to that and must consider it a processing artifact.

There's where i disagree. precisesly that fact is what has enable compilers to jump from a sort of intermediate language to object code (without using assembly). i don't care about users here, we were talking about compilers... :idea:
Title: Re: Editors
Post by: felipe on January 30, 2019, 06:35:56 AM
if I provide some pseudo code and tell an ASM programmer, even a good one, to code it without checking what a C/C++ compiler would do, most times the compiler will do better. So, trying to see first what the compiler does and optimize on it may be fruitful. Trying to beat it blindly will likely be a failure.  :biggrin:

Nope, you are wrong.
Title: Re: Editors
Post by: aw27 on January 30, 2019, 07:14:17 AM
There's where i disagree. precisesly that fact is what has enable compilers to jump from a sort of intermediate language to object code (without using assembly). i don't care about users here, we were talking about compilers... :idea:

This the petroleum refinery paradigm. I say that gasoline comes from petroleum and you say no-no, gasoline is obtained from a light petroleum distillate.
Title: Re: Editors
Post by: aw27 on January 31, 2019, 04:30:00 AM
I also like to see compiler messages ;)
Me too, but if it builds without errors, they should disappear after a few seconds to let me concentrate on my code again.

Notepad++ can call a batch file to make the building. No further sophistication needed.
Title: Re: Editors
Post by: TimoVJL on January 31, 2019, 04:58:47 AM
NppExec is a nice plugin, a movable console window.

https://sourceforge.net/projects/npp-plugins/files/

EDIT:
goto errorline, use NppExec Console Filters HighLight mask %ABSFILE%(%LINE%) : error*
Title: Re: Editors
Post by: jj2007 on January 31, 2019, 05:18:38 AM
Notepad++ can call a batch file to make the building. No further sophistication needed.

Np++ has so many menus, I can't find the "build" entry. Btw if there is a build error, does it jump to the offending line in the source?
Title: Re: Editors
Post by: aw27 on January 31, 2019, 06:51:30 AM
Notepad++ can call a batch file to make the building. No further sophistication needed.

Np++ has so many menus, I can't find the "build" entry. Btw if there is a build error, does it jump to the offending line in the source?
There is a menu item Run, which you set to invoke a batch file for instance. You can give it a name and associate a hotkey too.  The batch file makes the build and should  Pause in the end to allow you to see what happened. When there is an error you are told the line number of the error. Notepad ++ numbers the lines on the side by default. So, you go there and fix. No automatic gear box, it is just a manual gearbox.  :t
Title: Re: Editors
Post by: aw27 on January 31, 2019, 06:58:13 AM
NppExec is a nice plugin, a movable console window.

https://sourceforge.net/projects/npp-plugins/files/

EDIT:
goto errorline, use NppExec Console Filters HighLight mask %ABSFILE%(%LINE%) : error*

I know there are plugins that do better than the standard action but i have not explored that yet.  :t
Title: Re: Editors
Post by: jj2007 on January 31, 2019, 07:15:15 AM
goto errorline, use NppExec Console Filters HighLight mask %ABSFILE%(%LINE%) : error*

When I'm in bug chasing mode, I couldn't live a minute without that feature. I see npp also has "Find all in current document", but the listbox is pretty useless for assembly code. It just shows the matches, but scrolling through the list doesn't make it jump to the occurrence in the doc. Maybe there's a plugin, too.

There are also "bookmarks" in Notepad++, but they are not permanent as with RM (http://masm32.com/board/index.php?topic=5314.0), and there is no title bar that allows to understand what they bookmark.

On the positive side, it does understand Utf8 :t
Title: Re: Editors
Post by: aw27 on January 31, 2019, 07:40:41 AM
Notepad++ is great, I don't want word processor features just a text editor. I have tried all sorts since Edlin and have settled with Notepad++. There are very decent Asm editors, but I prefer a generic text editor that I can use also for things other than programming and keep in different tabs.  An important feature of Notepad++ is that it saves the session so it auto loads the previous session content when i launch it.
Title: Re: Editors
Post by: HSE on January 31, 2019, 08:26:56 AM
When I'm in bug chasing mode, I couldn't live a minute without that feature. I see npp also has "Find all in current document", but the listbox is pretty useless for assembly code. It just shows the matches, but scrolling through the list doesn't make it jump to the occurrence in the doc. Maybe there's a plugin, too.
Don't need plugins, just little batchs like qEditor.
Until XP I used "grep", fantastic tool, but don't run in new Windows. Now I have to use JJsearch  :( ( :biggrin:)
Title: Re: Editors
Post by: TBRANSO1 on January 31, 2019, 08:32:16 AM
I haven't used a lot of these.

I played with QEditor, lots of features, looks DOSsy.

Not mentioned: VS Code, VS Studio, SASM, Visual MASM, Notepad++, Notepad, Vim, eMacs (I don't use those except where forced by logging into Linux servers).

I just started using WinDbg GUI preview (a pretty steep learning curve, but pretty nice when I am not using VS Studio).

I use VS Code with an ASM highlighter.

I use VS Studio, when I want to get into serious code writing and debugging, big learning curve, heavy.

I use Notepad++ here and there.

I use SASM, it has the NASM assembler built it or it links to the MASM32 for MASM, auto build features, and a debugger, that has access to the GNU debugger or OlyDbg.  It's a lightweight editor with simple features, for quick scripting.  I guess it was built by a Russian programmer, so I have it set to Russian language settings.

I mostly just write light scripts for C, C++, Java, Python, Ruby, Assembly in basic Notepad with the MS Dev Command Prompt.  The only thing that I hate is that my status bar doesn't work, so I can't determine line numbers unless I count them manually.

I would check out RadASM, but it seems that a lot of the links are dead or old.  Where can I get a safe version of the most recent one?

Oh, and I came across this app a few weeks ago, this is a really awesome opensource project, worth a look: https://gcc.godbolt.org/


Title: Re: Editors
Post by: ragdog on February 08, 2019, 04:38:23 AM
Quote
I would check out RadASM, but it seems that a lot of the links are dead or old.  Where can I get a safe version of the most recent one?
Look here in the Radasm section you can found links to the original radasm 2 and 3.


Title: Re: Editors
Post by: daydreamer on February 20, 2019, 04:21:47 PM
Whats wrong with pen & paper :P
Title: Re: Editors
Post by: K_F on February 26, 2019, 07:14:46 AM
Whats wrong with pen & paper :P
I do all of my 'algorithms' on pen and paper before applying it to the keyboard. ;)
Title: Re: Editors
Post by: LordAdef on February 26, 2019, 08:19:26 PM
well, I’ve been using Visual Code for a while now. It has lots of features I enjoy. I also own a copy of Sublime, but use it very rarely.


MasmBasic is a great one and I used it a lot. And still do.


QE is great too!


All of the above have different flavours.
Title: Re: Editors
Post by: LordAdef on February 27, 2019, 04:29:29 AM
(https://www.dropbox.com/s/iji8kd6zvx6jief/Sem%20t%C3%ADtulo.png?raw=1)
Title: Re: Editors
Post by: LordAdef on February 27, 2019, 04:31:06 AM
Above is a print screen of Visual Code.
Title: Re: Editors
Post by: daydreamer on February 27, 2019, 05:03:07 AM
I have used VC++ recently,I can open up different files that isnt compiled,just easy to switch for reference
Title: Re: Editors
Post by: Siekmanski on February 27, 2019, 05:34:50 AM
Alex, cool code  :biggrin:
Title: Re: Editors
Post by: LordAdef on February 27, 2019, 05:43:45 AM
Alex, cool code  :biggrin:

YES!!!!!
I was studying this beautiful code when I took the picture!
Title: Re: Editors
Post by: Vortex on February 27, 2019, 06:35:37 AM
Pelles IDE is a nice tool. Lightweighted and powerful.
Title: Re: Editors
Post by: aw27 on February 27, 2019, 09:26:39 AM
Adjusting the image size can be done by inserting width=nnn in the tag. For example, for 400 pixels wide:
Code: [Select]
[img width=400]myNiceImage.jpg[/img]
Title: Re: Editors
Post by: LordAdef on February 27, 2019, 05:27:40 PM
Adjusting the image size can be done by inserting width=nnn in the tag. For example, for 400 pixels wide:
Code: [Select]
[img width=400]myNiceImage.jpg[/img]


Thanks, I didn’t know that!
Title: Re: Editors
Post by: daydreamer on March 01, 2019, 07:07:05 AM
it would be interesting to test VC++ profiler with asm code,but does it need to be put it inline _asm
isnt there a trick to open .asm file and assemble and link it and run profiler?
most of our profiling is timings and clock cycles,interesting in memory and gpu profiling too

Title: Re: Editors
Post by: daydreamer on March 03, 2019, 07:17:34 AM
is there anyway to turn off vc++ automatic suggestions,when coding,they are only annoying when working inline asm?
 
Title: Re: Editors
Post by: daydreamer on March 08, 2019, 02:31:24 AM
howto turn off intellisense in VC++,to easier work with assembly,because the suggestions are made for C++,only annoying when you mostly type mnemonics and registers
tools>options>Text editor and deselect parameter information ,auto list members

read the old thread about visual studio code and masm language support package and when you install that,does it also make intellisense suggestions for menmonics and registers?
Title: Re: Editors
Post by: LordAdef on March 08, 2019, 03:41:57 AM
Hi, I'm only coding in Masm in Visual Code. There is a Masm language pack that works nicely for my needs. And I also tweaked it a bit.


I would assume C++ pack has no support for inline Asm, but this is only a guess.


If not, and if you wqnted to, you could change the language temporarily to Masm pack when coding you inline. It's eadily done selecting the language at the right bottom corner
Title: Re: Editors
Post by: aw27 on March 08, 2019, 03:56:27 AM
it would be interesting to test VC++ profiler with asm code,but does it need to be put it inline _asm
isnt there a trick to open .asm file and assemble and link it and run profiler?
most of our profiling is timings and clock cycles,interesting in memory and gpu profiling too
You don't need to do inline asm and you can't do inline 64-bit with Visual Studio anyway.
Try to search google "how to use Masm with Visual Studio". You can program in a Masm file directly from within the Visual Studio editor, which is very nice and colorful with the ASM Highlighter extension that has been mentioned a few times around here. Visual Studio will build it for you and you can debug it with the VS debugger.
Title: Re: Editors
Post by: LordAdef on March 08, 2019, 04:25:34 AM
There are some youtube videos showing what Luis has said above.
Title: Re: Editors
Post by: Vortex on March 08, 2019, 06:08:57 AM
Here is a 64-bit inline assembly example built with MinGW 64-bit Version 5.4.0 :

Code: [Select]
gcc -o InlineAsm.exe InlineAsm.c -masm=intel
Code: [Select]
#include <windows.h>

char* UpperCase(char* szText)
{
 asm(
  "mov   rax,rcx;"
  "sub   rax,1;"
"1:"
  "add   rax,1;"
  "movzx rdx,BYTE PTR [rax];"
  "test  rdx,rdx;"
  "je    2f;"
  "cmp   rdx,97;"
  "jb    1b;"
  "cmp   rdx,122;"
  "ja    1b;"
  "sub   BYTE PTR [rax],32;"
  "jmp   1b;"
"2:"
  "mov rax,rcx;"
/*  "ret;"*/
  );
}

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
 LPSTR lpCmdLine, int nCmdShow)
{
 char msg[]="inline assembly programming";
 MessageBox(0,UpperCase(msg),"Hello!",MB_OK);
 return 0;
}

Thanks to MichaelW for his example explaining the GCC Inline assembly syntax :

http://masm32.com/board/index.php?topic=4211.0
Title: Re: Editors
Post by: daydreamer on March 08, 2019, 06:14:21 AM
it would be interesting to test VC++ profiler with asm code,but does it need to be put it inline _asm
isnt there a trick to open .asm file and assemble and link it and run profiler?
most of our profiling is timings and clock cycles,interesting in memory and gpu profiling too
You don't need to do inline asm and you can't do inline 64-bit with Visual Studio anyway.
Try to search google "how to use Masm with Visual Studio". You can program in a Masm file directly from within the Visual Studio editor, which is very nice and colorful with the ASM Highlighter extension that has been mentioned a few times around here. Visual Studio will build it for you and you can debug it with the VS debugger.
thanks,checked it up

@Alex
what I wondered is there kinda same autofunction like intellisense in visual code,but targeted for masm programming,so instead of getting lots of suggestion of C++ classes,variables,functions,you have suggestions of opcodes and registers and also label names in .data/.code section?

thanks Erol for example
Title: Re: Editors
Post by: Caché GB on March 08, 2019, 06:30:34 AM
Hi daydreamer

Check out AsmDude by Henk-Jan Lebbink.

https://github.com/HJLebbink/asm-dude

It has syntax highlighting and code completion for assembly files.

Enjoy.

Title: Re: Editors
Post by: LordAdef on March 08, 2019, 06:53:21 AM

Yes, there is. You need to download the masm language pack. There are a couple, you need to choose.

it would be interesting to test VC++ profiler with asm code,but does it need to be put it inline _asm
isnt there a trick to open .asm file and assemble and link it and run profiler?
most of our profiling is timings and clock cycles,interesting in memory and gpu profiling too
You don't need to do inline asm and you can't do inline 64-bit with Visual Studio anyway.
Try to search google "how to use Masm with Visual Studio". You can program in a Masm file directly from within the Visual Studio editor, which is very nice and colorful with the ASM Highlighter extension that has been mentioned a few times around here. Visual Studio will build it for you and you can debug it with the VS debugger.
thanks,checked it up

@Alex
what I wondered is there kinda same autofunction like intellisense in visual code,but targeted for masm programming,so instead of getting lots of suggestion of C++ classes,variables,functions,you have suggestions of opcodes and registers and also label names in .data/.code section?

thanks Erol for example
Title: Re: Editors
Post by: daydreamer on March 30, 2019, 09:27:33 PM
VC++ editions for companies that you have to pay for includes training,but none seems useful for assembly programmers unless your job is to code in those HLL's or also know HLL's and are interested to train yourself into those areas
VC++ restrictions on 30 days can be changed if you register and login to 90days,the free version gets unlocked to be free and not a 30day trial

Kip Irvine shows a assembly template,researched that you can make your own custom templates,would be good to have dx9 and opengl assembler program template to start with and make masm version templates same as C++ existent templates
Title: Re: Editors
Post by: daydreamer on April 05, 2019, 03:35:30 AM
anyone has used and have experience with the insert code snippet together with make your own code snippet in VS or Visual Studio code or any other IDE?
if so would appreciate an example howto
because it would be useful to put together your own most used code parts
Title: Re: Editors
Post by: HSE on April 05, 2019, 03:46:46 AM
In RadAsm is just a directory with subdirectories, and there you save little files with pieces of code.
Title: Re: Editors
Post by: daydreamer on April 06, 2019, 06:25:40 AM
In RadAsm is just a directory with subdirectories, and there you save little files with pieces of code.
thanks
suggestion are push and pop sequences that for code that use all registers
most used winapi setting up,messagebox,richedit and all kinds of winapi UI controls
a version for each of the GDI and ddraw and direct2d ,that starts a block of graphics code and end code
GDI has its specific getDC and ddraw has lock and unlock surface with or without check for vertical retrace
there is probably several useful skeletons for d3d proc's that handle different the usual proc's,for example renderproc
one snippet is drawprimitives or a section with many drawprimitives
a workerthread skeleton proc,so you easily can start utilize more than one thread
Title: Insert code snippet
Post by: jj2007 on April 06, 2019, 02:12:51 PM
Below the current RichMasm (http://masm32.com/board/index.php?topic=5314.0) AutoCode menu - suggestions welcome.

In addition, there are over 100 keyboard shortcuts: you type two or three letters followed by a space, and they expand to a full word of sequence. For example:

ism<space> -> invoke SendMessage,

mb<space> -> MsgBox 0, "¨", "Hi", MB_OK (here, when hitting space, the red spot will be selected, so that you can type the text right away)

deb4<space> -> deb 4, "¨", eax

opi<space> -> Open "I", #

gcr<space> -> GuiControl MyRichEdit, "richedit", y=0+37, h=1000-35, text "This is a RichEdit control"

Some expand to multiple lines (again, the red spot will be selected):
.rep
.Repeat
    ¨
.Until 0

swi
Switch_ ecx
  Case_ 0
   ¨
  Default_
  nop
Endsw_

etc ... the full list is in \Masm32\MasmBasic\Res\Keywords.ini
Title: Re: Editors???and change to alternative compilers???
Post by: daydreamer on August 16, 2019, 02:43:50 AM
Hi
I read about you can tell the IDE use alternative compiler in Visual Studio
but if you manage to change 64bit compiler to one that supports inline asm,doesnt it become licence problem if you have to use a linux kinda compiler?

I dont like the compiler taking decisions on where placing variables like it wants,not what I expect from typical ASM placing of variables is where you find them and the next variable is right after the previous one
Title: Re: Editors???and change to alternative compilers???
Post by: aw27 on August 16, 2019, 03:23:51 AM
Hi
I read about you can tell the IDE use alternative compiler in Visual Studio
but if you manage to change 64bit compiler to one that supports inline asm,doesnt it become licence problem if you have to use a linux kinda compiler?

I dont like the compiler taking decisions on where placing variables like it wants,not what I expect from typical ASM placing of variables is where you find them and the next variable is right after the previous one
You can use the Intel System Studio compiler from inside Visual Studio to build x64 inline asm.
There is a free version, with 3-months now with 1-year renewable licenses (this is the one I got). I posted the link here sometime ago, but can't recall it now.
Test:

Code: [Select]
#include <stdio.h>

char myMessage[] = "Hello There";

int main()
{
__asm
{
mov rcx, offset myMessage
call printf
};
return 0;
}

Output:
Hello There
Title: Re: Editors???and change to alternative compilers???
Post by: daydreamer on August 17, 2019, 09:34:38 PM
Hi
I read about you can tell the IDE use alternative compiler in Visual Studio
but if you manage to change 64bit compiler to one that supports inline asm,doesnt it become licence problem if you have to use a linux kinda compiler?

I dont like the compiler taking decisions on where placing variables like it wants,not what I expect from typical ASM placing of variables is where you find them and the next variable is right after the previous one
You can use the Intel System Studio compiler from inside Visual Studio to build x64 inline asm.
There is a free version, with 3-months now with 1-year renewable licenses (this is the one I got). I posted the link here sometime ago, but can't recall it now.
Test:

Code: [Select]
#include <stdio.h>

char myMessage[] = "Hello There";

int main()
{
__asm
{
mov rcx, offset myMessage
call printf
};
return 0;
}

Output:
Hello There
thanks very much AW
I really like to write SIMD,but found a quirk with compiler put variables in memory like it want it,so I decided to go back to Assembly,because I can trust variables are exactly as I placed them
anyway Makes GDI macros for lesser typing/easier to convert C code by just remove parenthesis