Visual Studio 2010 Project

Started by GregL, May 16, 2010, 01:09:53 AM

Previous topic - Next topic

GregL

A "bare bones" console mode project for Visual Studio 2010 that uses MASM32.

oex

:lol that is so lame it is 190Kb zipped, I'm so glad I write proper code, I dont have the bandwidth for VS 10
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

Ghandi

.asm file = 292 bytes.
SQL database file = 413,696 bytes.

The size is just the project files, the actual source is identcal to what you'd use with MASM, because it is MASM just assembled via the VS IDE.

HR,
Ghandi

GregL

I thought I would do people a favor by providing a minimal project to get started with, you can easily rename the project, source code and output file names.  But, you can see the kind of thanks you get around here.

Personally, I am really liking using Visual Studio for MASM projects. They have improved it that much.

Quote from: oexI'm so glad I write proper code

Yes, you're so good.


oex

:lol I'm sorry, it was most definately not an insult against your code I'm sure it will be most valuable to people using VS10, rather the bulkyness of the later VS versions and having downloaded the file it seems the majority of it is some big db file, it was just an offhand remark.... VS creates many 'unnecessary' files in project root which is fine if you are using VS IDE however if you chop and change IDEs/Notepad or have to manage the directory structure manually it can get confusing with your own code in the folder on bigger projects

In the past I have had many problems with VS IDE so it is on my snipe list :lol

What is the need of that 400Kb file?
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

GregL

oex,

If you don't like Visual Studio, I don't want to argue about it with you.  As Ghandi already pointed out, the 400kb file is an SQL database file that contains all the project settings.  400kb is next to nothing anymore.  The .asm file can still be edited with any text editor and assembled and linked via the command line or batch files if you wish.

I was going to post a GUI "bare bones" MASM32 project too.  I have also been thinking about creating a tutorial about creating a MASM32 project in Visual Studio 2010,  although it has already been done elsewhere.  But after the reception this post has received, I don't know, maybe I should just forget it.

oex

Quote from: Greg Lyon on May 16, 2010, 04:33:48 AM
If you don't like Visual Studio, I don't want to argue about it with you.  As Ghandi already pointed out, the 400kb file is an SQL database file that contains all the project settings.  400kb is next to nothing anymore.  The .asm file can still be edited with any text editor and assembled and linked via the command line or batch files if you wish.

Each to their own :bg.... I havent used VS in a long time, many versions, I'm sure it's much better to use now that it was.

Quote from: Greg Lyon on May 16, 2010, 04:33:48 AM
But after the reception this post has received, I don't know, maybe I should just forget it.

Dont take any notice of my comments :lol.... It was far from meant as an insult directed at you or your code :/, simply a dig at M$.... You gotta admit 400Kb is a lot of settings, Bogdan's SOL OS is only 450Kb :lol

Adding your masm32 barebones code to that is like transporting a (VI)Pea from England to China on a London double decker bus :lol.... Let's just be glad M$ isnt in the transportation business, we'd have run out of Oil already
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

GregL

oex,

You must be one of those minimalists. 

I have been using Visual Studio for a long time too, since the late 1980's, it was MASM version 5.0 and 5.1 at that time. It has just recently become usable for MASM projects in my opinion with VS 2008 and VS 2010.


Vortex

Hi Greg,

Thanks for the example.

Ghandi

Thanks also Greg. Personally i have also been using VS and MASM together, coding the gui and such in C and functions in ASM as a module of the project. I didn't ever try VS2005 or VC6 with MASM, the ability to cross link C and ASM files has always been there but its whether or not the IDE supported it properly. Once again thanks and if you wouldn't mind i'd like to see the next example also.

OT:
Have you seen the ASM highlighter plugin for VS2008 at:

http://asmhighlighter.codeplex.com/

I know there are a few addins and solutions to provide colour highlighting but there is an interesting feature (imho):


Instruction Size Feature
The AsmHighlighter 1.1 version is adding a new useful features when ones want to quickly visualize the instruction size for each instructions.
You just have to format your code, Menu Edit/Advanced/Format Document (Ctrl+k, Ctrl+d) or Format Selection or current line (Ctrl+k, Ctrl+f), and an evaluation of the instruction's size will be inserted in the comment next to the instruction* as you can see below :
[picture]

For example, if you have the following code :

;!MYVAR=esi

mov dword [eax],0               ; First instruction
fld1                            ; FPU instruction
mov dword [MYVAR + eax], ebx    ; Test with defined
ret                             ; End of test

Pressing Ctrl+K,Ctrl+D will add the instruction size at the beginning of the instruction's comment :


;!MYVAR=esi

mov dword [eax],0               ;#6 First instruction
fld1                            ;#2 FPU instruction
mov dword [MYVAR + eax], ebx    ;#3 Test with defined
ret                             ;#1 End of test



HR,
Ghandi


TmX


clive

Quotehttp://asmhighlighter.codeplex.com/
I know there are a few addins and solutions to provide colour highlighting but there is an interesting feature (imho):
Instruction Size Feature

Instruction sizing seems like a mostly useless function, not sure I know anyone doing Windows coding that optimizes for size because it is pretty irrelevant to execution speed. Instruction timing/latency would be far more instructive, even if it ignored pairing/ooo.
It could be a random act of randomness. Those happen a lot as well.

Ghandi

Sorry Clive, i didn't mean this for optimizing. I just like the fact that if i want to know the size of an instruction, i can get it without having to search for a reference or assemble an application just so i can disassemble it to see the encoding. Definitely, something which could show clock cycles, latency and such information would be of more use, unfortunately there doesn't seem to be anything like it around that i've seen.

HR,
Ghandi

clive

No need to be sorry, I was just trying to understand the merit of the feature. It looks like a simple thing to do, which is why the author added it, but I don't see what one would use it for. Plus, it is line-by-line, so it is apt to be wrong for branches, or where the assembler can otherwise optimize/compress the opcode encoding. Providing some sort of static timing analysis would require a lot of work/effort. It's been a long while since I tinkered with VTune, but it used to be able to do some static analysis of object code.
It could be a random act of randomness. Those happen a lot as well.

oex

Quote from: Greg Lyon on May 16, 2010, 05:21:26 AM
You must be one of those minimalists. 

I think I have just found later versions of VS bulkier than needed.... I've classed all the frameworks etc in with java over the last 5-10 years, lots of weight but without much substance.... I do work towards a 0 dependancy policy in both my applications and the source.... Maybe I should get a pair of symbols, and a white room to code in :lol

Quote from: Greg Lyon on May 16, 2010, 05:21:26 AM
I have been using Visual Studio for a long time too, since the late 1980's, it was MASM version 5.0 and 5.1 at that time. It has just recently become usable for MASM projects in my opinion with VS 2008 and VS 2010.

I will have to give the empire another go sometime :bg
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv