News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

The future of windowss assembly programming

Started by zemtex, December 17, 2011, 01:47:42 PM

Previous topic - Next topic

zemtex

On the homepage of Menuet you can see they are playing Quake on it he-he
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

Ghostly

Quote from: zemtex on December 20, 2011, 09:28:57 AM

There are many big projects written in asm. Tons of operating systems are written in asm. Here is one of them, called Kolibri OS written in Fasm.
Hmm, I don't think menuet, kolibri, solar OS (am I missing any more?) translates to 'tons'. Apart from these OS'es which certainly counts as large projects I guess there's some assemblers written in asm which also fit's the bill. But those are still very few projects, compare that to projects written in a language like C (which ironically is called low-level these days by the script-kiddies and Java, C#-style programmers) and the amount of assembly projects are absolutely miniscule by comparison.

Quote from: zemtex on December 20, 2011, 09:28:57 AM
On the homepage of Menuet you can see they are playing Quake on it he-he
Which is a game written in 99.9% C with a tiny bit of floating point math in assembly for the performance critical parts, same goes for Quake 2 and Quake 3 (although there it's vectorized simd assembly iirc). This is how I see the current state and foreseeable future of asm, as a way to cram the most out of a performance hot spot while having the rest of the code in a high-level language. Granted, I don't have the skill/speed in assembly development these days for it to ever be practical for me to write a whole project in assembly code which may tint my view of things, but given the small amount of full assembly based projects out there it seems there are few who are capable of this.

Meanwhile I see assembly code continue to be employed in performance critical code, most of the encoder/decoders out there contain hand optimized assembly to get the best possible performance, compressors, hashing algorithms sometimes also rely on assembly code for speed optimizations, heck even for something as simple as jpeg decoding there's the popular jpeg-turbo which uses mmx,sse,sse2 assembly code to give a 2 to 4 times performance increase over the C jpeg library. Also it should be noted that these optimizations pretty much all concern SIMD vectorization which is pretty much THE area where compilers are still way behind the expert assembly programmers, compilers are progressing here aswell but all you need to do is download x264 and compile it with asm disabled to see that there's still ways to go before the compilers catch up there.

I hope I'm not coming across as negative against assembly because nothing could be further from the truth, this is just my reflection of where assembly programming stands today and what the future holds. Also, this is nothing but my own subjective view of things, YMMV and all that.

zemtex

If you were talking about operating systems, here are some examples of asm operating systems. (Just examples, there are plenty more)

DexOS, BOS – 32-bit DOS-like OSes
Derrick Operating System – A 32-bit protected mode OS
MenuetOS – 32- and 64-bit GUI operating systems
KolibriOS – 32-bit GUI operating system
Miraculix– 32-bit GUI operating system

If you look at these and try to grasp, we're talking operating systems here for a single assembly (FASM), if you consider that, it is pretty amazing.



It doesn't really matter, when it all gets down to the point, it's all assembly.  A c program is not worth anything if you don't convert it to assembly. But you are right that those who want to make money, they use c++. Those who want to learn and have fun use assembly. If you need to make money, you might as well choose a RAD type language, it has even much faster development than c++.

Write your programs in c++, then use performance monitoring, locate slow routines, compile the routines in c++, optimize them in assembly, put it back again. I think that is what asm is useful for mostly. (trying to hammer large spikes in your c++ programs)

I also believe that asm is excellent for writing libraries
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

KeepingRealBusy

To all who contributed to this thread: Every time I hear this lament, I think back to a very old story from the anthology "Nine Tomorrows" by Isaac Asimov named "Profession" (copyright 1957)The book is difficult to find, but worth the search.

Dave.

jj2007

Quote from: KeepingRealBusy on December 20, 2011, 11:06:46 PM"Nine Tomorrows" by Isaac Asimov named "Profession"

Someone has to program the Tapes that program the Educated, "men and women with capacity for original thought."

Nice story. I have a slightly more pessimistic version: Windows 7 needs 16GB of disk space, that is 2700 times the amount of Win 3.1. There are only marginal improvements since then, so it means that they accumulated an immense pile of C crap (remember our comparative advantage is that we can read and judge the disassembled assembly code of, say, WinWord.exe :green2). But deep deep under the surface of that dumping ground, a little engine called DOS is still running the whole thing, and only a handful of people know its secrets :wink

dedndave

you must have had a different version of win 3.1 than i had - lol
i think they got away from DOS pretty well at win 2000
although - some of the structures are still in there   :P

jj2007

Quote from: dedndave on December 21, 2011, 03:01:38 AM
i think they got away from DOS pretty well at win 2000

Try naming a file con under Windows XP :toothy

dedndave

well - that's a device name, like NUL, CLOCK$, LPT1:, COM1:, and so on

KeepingRealBusy

Quote from: jj2007 on December 21, 2011, 02:32:16 AM
Quote from: KeepingRealBusy on December 20, 2011, 11:06:46 PM"Nine Tomorrows" by Isaac Asimov named "Profession"

Someone has to program the Tapes that program the Educated, "men and women with capacity for original thought."

Nice story. I have a slightly more pessimistic version: Windows 7 needs 16GB of disk space, that is 2700 times the amount of Win 3.1. There are only marginal improvements since then, so it means that they accumulated an immense pile of C crap (remember our comparative advantage is that we can read and judge the disassembled assembly code of, say, WinWord.exe :green2). But deep deep under the surface of that dumping ground, a little engine called DOS is still running the whole thing, and only a handful of people know its secrets :wink

Jochen,

I think you missed the point of the story. The people "educated" by the "tapes" were not free thinkers, but only professional in the sense that they could operate complex machinery, but could not improve the machinery they were working with. The free thinkers could not be so "educated" because that "education" stifled the creativity capability. Further more, the candidates for the free thinkers could not be told this, they had to finally understand they they COULD think and invent on their own even though they were committed to "the institution of the feeble minded".

I agree with you. As my dad who was educated in 30's and 40's electronics said about the transistor age "Give me my horse!" My mainstay is MASM.

Dave.

Don57

I started programming chips in machine language over 35 years ago, then moved on to assembly in the late 80's, the back to chips about 10 years ago. As far a I can tell, military and custom scientific apps,  that require speed,  will allways require some sort of low level programing language. Will this change with the advent of quantum computers, I doubt it. The military and scientists will allways want to push the envelope, and maximize computational power to decrease run time.