The MASM Forum Archive 2004 to 2012

Specialised Projects => Compiler Based Assembler => Assembler With Microsoft Visual C => Topic started by: GregL on October 21, 2007, 10:41:12 PM

Title: Dumbing Down Visual C++
Post by: GregL on October 21, 2007, 10:41:12 PM
The Microsoft Visual C++ Team is encouraging Intrinsic functions and discouraging Inline assembly. They don't even mention separate MASM modules. Microsoft really seems to be trying to dumb down Visual C++. There are some good counter-arguments in the first comment.

New Intrinsic Support in Visual Studio 2008 (http://blogs.msdn.com/vcblog/archive/2007/10/18/new-intrinsic-support-in-visual-studio-2008.aspx)

Title: Re: Dumbing Down Visual C++
Post by: Mark Jones on October 22, 2007, 02:56:28 AM
In my college math class, the professor had been talking about factoring polynomials. So I wrote a small test piece to list all the even divisors for any given value, and calculate the prime factors. I presented this program to him, purely for entertainment value, and he basically told me that it was shit and I should instead learn C++ or calculate it manually.

Just goes to show you how ignorant even professors can be about assembly language programming.
Title: Re: Dumbing Down Visual C++
Post by: hutch-- on October 22, 2007, 02:48:06 PM
For programmers who have been around long enough there is this sense of Deja Vu to 12 or 13 years ago when Microsoft pronounced assembler and MASM to be dead. Time proved that assumption wrong as performance required the capacity to remain available. Every improvement in compilers makes the need to use assembler a little less but this is countered by the need for ever better performance as the tasks and data quantities keep getting larger.

It will not happen fast but it appears that x86-64 is only in its infancy and the initial format is messy and complicated with limited physical memory so it will be a long time before x86-64 has the flexibility and capacity of x86-32. A 64 bit machine is generally using twice the memory and twice the processor power to do the same thing as a 32 bit box and its main advantage is being able to address a vastly larger amount of memory.

The problem with this is memory is still relatively expensive and few boards support more than 8 gig of memory for a current 64 bit box. When you can routinely put a couple of terabytes of memory into a true flat memory model 64 bit system it will start to be powerful enough but that will not happen for a while yet.
Title: Re: Dumbing Down Visual C++
Post by: xanatose on October 22, 2007, 05:56:03 PM
And has there is more memory, programs will get more and more bloated. Until you will need a terabyte just for the OS :) Just kiding.

Title: Re: Dumbing Down Visual C++
Post by: GregL on October 22, 2007, 06:56:53 PM
From what I have seen and read, intensive graphics multimedia still require inline assembly or separate assembly modules because the intrinsics have problems or don't generate the best code.

If Microsoft isn't going to support inline assembly in x64 then it's all the more reason to use the Intel C++ Compiler, GCC or another compiler that does support it.

Title: Re: Dumbing Down Visual C++
Post by: drhowarddrfine on October 25, 2007, 01:54:36 PM
All I have to say is that my mother-in-law is glad she's got a 64-bit PC with 8gigs ram while she's searching Ebay.

Seriously, 90% of all users don't need all that and a 32-bit PC, maybe even less, would be good enough.
Title: Re: Dumbing Down Visual C++
Post by: jj2007 on October 25, 2007, 04:31:18 PM
Quote from: xanatose on October 22, 2007, 05:56:03 PM
And as there is more memory, programs will get more and more bloated. Until you will need a terabyte just for the OS :) Just kidding.

Here are the minimum installation requirements for various Windows versions.
Version   Ghz/RAM/OS on disk:
3.1     25/2mb/6mb
95     ?/4/50m
98     66MHz/16mb/200mb
NT     33/16/110m
ME     150/32/320m
2000   133/64/0.65 of 2g
XP      300/128/1.5g
Vista 1g/1g/15 of 40g

Vista Home Premium : Windows 3.1   40/500/2500

There were 13 years between 3.1 and Vista, so the growth rate was 1.8255^13=2500.
Vista needs 15 Giga, so one Terabyte is a factor of 66 away. 1.8255^7=67.5
So you will have your one Terabyte less than seven years from now, at current growth rates.
Just kidding?
:bg
Title: Re: Dumbing Down Visual C++
Post by: TNick on October 27, 2007, 05:23:44 PM
Not to mention that most software is following the same pattern... I can't stop wondering again: what the hell are they doing with all this memory and all this space and all this computation power??!! :dazzled: :dazzled: Just for fun, I have started a Explorer clone project. The exe has 79 Kb (with debug infos and all) and it is able to do the job with 1,3 Mb of memory ... and I didn't bothered too much about the size of exe and memory management.

Nick
Title: Re: Dumbing Down Visual C++
Post by: Ehtyar on October 27, 2007, 11:03:29 PM
After reading that post all i could think was...how pointless. It sounds like an awful lot of work just to get access to instructions that are lying right at your finger tips in asm. Why is MS so determined to get everyone into as high-a-level as possible? And what an insane amount of work this must be for the vc team....judging by that first reply it seems they weren't up to it in the first place.

Ehtyar.
Title: Re: Dumbing Down Visual C++
Post by: GregL on October 27, 2007, 11:27:37 PM
I wonder what the hell their goal is too. Why don't they want people writing assembly code? Is it a control thing?

Title: Re: Dumbing Down Visual C++
Post by: zooba on October 27, 2007, 11:44:14 PM
It's an obsession with portability, not necessarily at Microsoft, but in general (and particularly academia). For these people, 99% of the market isn't enough; their code must be able to compile on every CPU known to man, regardless of whether that is appropriate or not.

Having said that, SSE intrinsics would be good if the register allocation worked better.

Cheers,

Zooba :U
Title: Re: Dumbing Down Visual C++
Post by: drhowarddrfine on October 29, 2007, 02:30:31 AM
Quote from: zooba on October 27, 2007, 11:44:14 PM
their code must be able to compile on every CPU known to man, regardless of whether that is appropriate or not.
But if their code could compile on any cpu then that means it would compile for other OSes considering Windows only runs on Intel-like cpus.  No, if every language will compile on their OS, then you can't say your program won't work on Windows.  Also, it makes the interface to the OS easier.  It's called Unix-envy.   :green
Title: Re: Dumbing Down Visual C++
Post by: MichaelW on October 29, 2007, 06:20:44 AM
It's ultimately all about making money.
Title: Re: Dumbing Down Visual C++
Post by: Mark Jones on October 29, 2007, 01:34:40 PM
I agree Michael, the bigger and more complex they make both the OS and the hardware, the more people can get their fingers in the cash.
Title: Re: Dumbing Down Visual C++
Post by: Vortex on October 29, 2007, 04:45:59 PM
C/C++ development tools will bring more money compared to asm tools.
Title: Re: Dumbing Down Visual C++
Post by: bruce1948 on May 16, 2009, 06:45:42 PM
The code bloat is in part due to the insane desire to have all programming languages share the same runtime system.  The instruction set of the processor was designed for this purpose, so why does MS have to believe that a common runtime can improve on it.
In the 70's i worked with a machine called the CTL Modular 4 that had a 6 user multitasking system running in 256K. It had no GUI but does a GUI really require all that code bloat?
Title: Re: Dumbing Down Visual C++
Post by: Vortex on May 16, 2009, 07:01:24 PM
Try Pelles C (http://www.smorgasbordet.com/pellesc/). The installation is less then 35 Mb.
Title: Re: Dumbing Down Visual C++
Post by: dedndave on May 16, 2009, 07:11:34 PM
MS tends to bloat everything they write - not just compilers (incl OS's - and - just look at .NET - lol)
when they got to the assembler, they couldn't find enough stuff to bloat
that's why half of us are here   :bg