Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Basic symbols (procedure) recognition in ASM files

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
raff Posted - Nov 15 2016 : 06:13:35 AM
Hi,

My project consists of many C++ files and several ASM source code files. I can see that I can jump to function definitions in C++ (with Goto command) so it's easy to navigate over the C++ files jumping from function to function.

My problem is that my ASM procedures are not recognized and I cannot jump from C++ to my defined ASM procedure. I'm using the MASM format to define my ASM procedures, example:

MyFunction proc Param1, Param2

   ; My code goes here 

MyFunction endp


Is it possible to add in VA that feature that at least it recognizes ASM procedures as symbols? So I can jump from C++ to my ASM procedures directly (like it can be done from C++ to C++ functions)

Thanks!

7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 13 2016 : 4:08:50 PM
I am not sure what most of your MASM format code looks like, but based on your initial sample, the following VS2015 Regex find and replace will add a hashtag, using the function name, to each function in your ASM file:

Find string:
^\b(_\w+|[\w-[0-9_]]\w*)\b proc

Replace string:
; //#$1\n$1 proc

this won't update your C++ code, but should help quite a bit.
sean Posted - Dec 13 2016 : 10:33:22 AM
quote:
Originally posted by raff

Even if I have a Hashtag in each ASM function it won't jump from the CPP source code file with a "Goto" command (or similar) when I click on the ASM function name from my CPP source code file, correct?



Correct. You would need to add a hashtag to your C++ caller; then you could go from the hashtag in C++ to the hashtag in ASM.
foxmuldr Posted - Dec 13 2016 : 09:39:24 AM
quote:
Originally posted by accord
foxmuldr: I didn't find a way to do this in asm or txt files, this is all I found: https://msdn.microsoft.com/en-us/library/zy61y8b8.aspx



Thanks. I also found this which already has assembly keywords:
http://kipirvine.com/asm/gettingStartedVS2013/index.htm

If you search for "usertype.dat" you will find one with MASM assembler keywords. It just needs saved to your "C:\Program Files\Microsoft Visual Studio <major.minor>\Common7\IDE\" folder.

The only downside is they're all one color. They also only work in source files recognized by Visual Studio. You can go into Tools -> Options and select File Exensions and add "asm" as a "Microsoft Visual C++" editor and it syntax highlights.

Best regards,
Rick C. Hodgin
accord Posted - Dec 13 2016 : 09:16:09 AM
I have added your votes to the feature request to support VA Hashtags in all text files.

case=94833

Once this implemented, you will be able to specify ASM files as text files and VA Hashtags will work:
https://docs.wholetomato.com/default.asp?W353

You will need to use the ExtPlainText registry entry.

foxmuldr: I didn't find a way to do this in asm or txt files, this is all I found: https://msdn.microsoft.com/en-us/library/zy61y8b8.aspx
foxmuldr Posted - Dec 12 2016 : 09:03:04 AM
I second this as I use assembly often as well.

Perhaps provide an editbox where we could create a list of keywords to highlight in the various colors, one editbox per highlight color option.

Best regards,
Rick C. Hodgin
raff Posted - Nov 15 2016 : 3:11:35 PM
Thanks for your reply.

I'm using separate ASM source code files. First of all I think that tha hashtag is not recognized in ASM source code files. I have tried and they appear in the Hashtag list when appearing in a .CPP file, but not in an ASM file. I have put it as:

; // #MyAsmFunction
MyAsmFunction proc Param1

...

MyAsmFunction endp

Unfortunately, I have hundreds of ASM functions. Even if I have a Hashtag in each ASM function it won't jump from the CPP source code file with a "Goto" command (or similar) when I click on the ASM function name from my CPP source code file, correct? Anyway, the HashTag is not recognized when defined in a ASM source code file.

Any other solution or workaround to jump from my CPP to my ASM source code when I click on the function name or a goto-definition-key-combination?

Thanks!

feline Posted - Nov 15 2016 : 1:36:45 PM
At the risk of asking a silly question, is your ASM code in your cpp files, or in separate files? If the code is in cpp files, I am wondering if you could use macros to help define the functions, and perhaps use a "fake" macro definition that VA uses to generate something that VA can process and understand.

Alternatively, if you only have a small number of ASM functions, have you considered adding VA Hashtag comments to mark these functions, since you can jump to and search the hashtags:

http://docs.wholetomato.com/default.asp?W574

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000