So, I just recently learned assembly (well, within the last few months), and now I am actually understanding it all, finally.

But there is a curse... whenever I try to program in a high-level language, I dislike it because it feels too weak in control and layout. So now, I only like programming in assembly.

Has anyone else experienced this "curse?"

I think it is kind of funny.
Posted on 2004-10-25 20:23:31 by לח&am
Well,

I still like programming in High Level Languages, but I feel always upset when I can't do some really cool ASM-tricks ;).

Still, when I programm ASM I often think "wow, these 200 lines would be one line in a High Level Language".

Claus.
Posted on 2004-10-25 21:45:16 by Claus von der Burchard
I get around the "curse" by telling myself exactly what assembly code will be generated by my high level statement as I'm writing it. Either that or by just using inline assembly in a high level language :)

Spara
Posted on 2004-10-25 22:58:40 by Sparafusile
I get around the "curse" by telling myself exactly what assembly code will be generated by my high level statement as I'm writing it. Either that or by just using inline assembly in a high level language :)

Spara


similar to my technique, lol, I mentally compile the program, wahahaha
Posted on 2004-10-26 19:03:21 by AmkG
Most languages allow parts to be done in assembly. Even .Net allows unmanaged code to be ditributed along with MSIL byte code. I would assume Java has a similar ability.

When I started doing VBA it took a month or so of coding to really be comfortable in the object thinking, and it still takes a few minutes to make the mental leap if I've been coding in assembly.

Try to keep your mind in the high-level type thinking when you are coding in assembly - it can be an interesting experience.
Posted on 2004-10-26 19:52:37 by bitRAKE
Try to keep your mind in the high-level type thinking when you are coding in assembly - it can be an interesting experience.


It is sort of hard. Assembly is so low level, I take for granted even the simplest things, like assigning one variable to another.

But the advantage I found of HLL in assembly is code organization. HLL teaches this, assembly doesn't.
Posted on 2004-10-26 22:39:10 by לח&am
But the advantage I found of HLL in assembly is code organization. HLL teaches this, assembly doesn't.
Absolutely. And we know it's hard to build anything very complex without being organized and everything in assembly is very big. The organization skills required to put together even a modest assembly language project is overwhelming to some. It is a discipline I continue to work on -- being creative - carried away even, but coming back to the firm structure of a decisive plan.

It is like being adrift in the ocean and having to pull bits of debris together to survive. Assembly gives you nothing - yet it is rigid enough to float on.
Posted on 2004-10-26 23:35:34 by bitRAKE
When I learned C and C++ after I learned assembly, I started slowly to prefer them above assembly, because of their easy reading structure, easier way to code, speed, code size and power. If you code regular win32apps you'll never need asm, so I never felt weak in C(++).
Posted on 2004-10-27 02:57:36 by lifewire
But the advantage I found of HLL in assembly is code organization. HLL teaches this, assembly doesn't.
Absolutely. And we know it's hard to build anything very complex without being organized and everything in assembly is very big. The organization skills required to put together even a modest assembly language project is overwhelming to some...

Thats why I think it's better to learn a well structured HLL language first. Than go for assembly. HLL usually will teach the code organization discipline, which will be useful later in assembly.
I personally learned ia32 assembly as my first language (well.. after z80 :-D ). And learning later Java (indeed there is a way to code in asm for JVM. But the instruction set of JVM is pretty much ugly and it wont give you any noticeable execution speed advantage so it's better not to go that way... Though if anyone still interested look for Jasmin package.), Object Pascal and C definitely brought some change in the way I looked at code organization in my assembly programs. I still mourn on time spent for learning the two first HLL`s though.. :(
Posted on 2004-10-27 07:16:57 by arafel
:-D

Hey Guys,

Whatever you do don't pull your hair out because you have mastered assembler. What it gives you that most HLL only programmers never get is an understanding of what a HLL actually does.

Now while from time to time you may suffer an attack of the "Urrrrgh YUK" or the occasional "puke", often a HLL has at least some endearing quality, even if its only the capacity to pelt something on the screen fast.

All you have to do is feel sorry for those poor unfortunates who don't have assembler behind them and who have to try and make sense of what they are doing in the absence of low level programming experience.

Something like fumbling around in the dark trying to work out WTF is happening. :P

Regards,

hutch at movsd dot com
Posted on 2004-10-31 01:08:14 by hutch--
I think in Asm when programming other languages most of the time, but I use inline Asm in Delphi quite a lot..
I'm generally screaming when using VB though, It's so feeble. :wink:

~Hk~
Posted on 2005-01-11 23:12:56 by HippieKiller
i think i'm addicted to asm :P in c++ i start almost every function with:
" _asm { "

and end with:
" } "

:-D
Posted on 2005-01-14 11:15:20 by ti_mo_n
I am use assembly only after I learn it , it is very powerful(fussy,too,but interesting).
Posted on 2005-08-01 12:21:17 by shaojf2001
ASM for algorithms, and this is until compilers get UBER A.I. that can write optimized parallel SSE interpretations of HLL algos.?

Eventually Microsoft will download the brains of the best ASM programmers and implement that combined nueral net into VisualStudio 11.5 service pack 9.
---------------------------
I'm disappointed in SSE3, DotProduct should have been an opcode, Sine and Cosine would have been nice too, and there's still no single/double accumulate ACUPS 4|3|2|1 = 0|0|0|4+3+2+1. There's accum and avg for integers :[

What the hell is ADDSUBPS ? give me a valid use for this and I'll give you a cookie!
---------------------------
We need to design our own processor and machine code I'm sick of Intel and AMD's garbage, just for the sake of backwards compatibility. Design something new instead of rehashing the same crap for the last 20years and add a emulator to support legacy code.
--------------------------

I WANT:
-2 processes to run in parallel on the same thread (ok this one's insane but they get better).
-32 256bit registers.
-A dam MODULUS opcode instead of pairing it with stupid slow DIVIDE.
-Built in hardware random INT and FLOAT generator on the chip.
-A MemCopy opcode (MemC esi,edi,16*20), RtlCopy can BYTE ME!, unrolled MOVDQA's loops too!
-A freaken M2M opcode we've been push mem pop mem'ing forever now what gives?!
-Exponentiation with imaginary number support.
-String opcodes that don't run SLOWER than doing it the long way.

I guess that's it

I put together some good rant
Posted on 2005-08-03 00:28:38 by r22
r22, seems to me you don't know much of microelectronics ands its marketing :P
The only thing about AMD64 that makes me unhappy is the low number of GP registers. I haven't bought a x64 yet, though with ARM cpus 16 registers are plain too few for me.
Well, it would be good if mmx could handle 16-bit 565 operations, but Intel didn't think much on it...

If you want all those features you require, get an Xbox360 or PS3 - they're dedicaded to games, while the PC isn't.
Posted on 2005-08-03 10:21:11 by Ultrano

I WANT:
-2 processes to run in parallel on the same thread (ok this one's insane but they get better).

If you meant two processors running the same thread in parallel, by definition this is not possible. :-)
If you mean concurrently executing the same code, this is certainly possible if the code is reentrante.
If you mean you want to be able to have the same code stream do multiple operations, that's what SIMD (i.e., MMX/SSE) does.
Perrhaps you could explain what you want?


-32 256bit registers.

That would be nice. And no differentiation between FP and INT registers (nor MMX/FPU/SSE/INT differentiation).


-A dam MODULUS opcode instead of pairing it with stupid slow DIVIDE.

Then you'd just have a slow MOD instruction. And have have to execute two instructions when you want both values.


-Built in hardware random INT and FLOAT generator on the chip.

Except when testing software you *really* want the results to be repeatable.  BTW, IIRC some chip sets include this facility by counting random changes due to thermal noise on a diode or some such.


-A MemCopy opcode (MemC esi,edi,16*20), RtlCopy can BYTE ME!, unrolled MOVDQA's loops too!

movsb/movsw/movsd are all pretty good except for large blocks (and still not bad then). What are you expecting to gain?


-A freaken M2M opcode we've been push mem pop mem'ing forever now what gives?!

Then why not ADD, SUB, etc., M2M?


-Exponentiation with imaginary number support.

How many people *really* need this? Silicon is expensive and you want to use it on functionality that most people will benefit from.
Lots of vector stuff would be a better bet, as that provides "imaginary" support.


-String opcodes that don't run SLOWER than doing it the long way.

I guess that's it

I put together some good rant


Too bad the NS32000 family died back at around 25MHz. Though it could use more registers, it had most of what you're asking for.
Cheers,
Randy Hyde
Posted on 2005-10-18 22:42:21 by rhyde

Except when testing software you *really* want the results to be repeatable.

Or when dealing with cryptographic stuff.


movsb/movsw/movsd are all pretty good except for large blocks (and still not bad then). What are you expecting to gain?

General-purpose and fast DMA could be nice.
Posted on 2005-10-21 15:41:42 by f0dder
hm, hilarious. asm practice allows to write better high-language constructs.
most compilers produce assembly effectively, if you practice assembly, you can "help" the compiler and write better code.

nothing stops you from one hudge main, using assembly like goto instructions.

professional programs operate by data table (procedure offset) rather than by program flow.
well probably old-fashioned basic has the restriction not to allow arrays containing line numbers...
however not impossible to resemble it.
Posted on 2005-12-01 07:18:58 by akidd86

So, I just recently learned assembly (well, within the last few months), and now I am actually understanding it all, finally.

But there is a curse... whenever I try to program in a high-level language, I dislike it because it feels too weak in control and layout. So now, I only like programming in assembly.

Has anyone else experienced this "curse?"

I think it is kind of funny.


The SAME "curse" happened to me too when I first learned assembly language :mrgreen:
Posted on 2005-12-04 06:13:01 by The Grey Beast
For myself the biggest nag in coding c(i learned after learning asm) was the type definitions in asm you call *almost* everything a dword.
Also it can be difficult to find your code sometimes inamonst all the C crust

For the most part it just feels like your 'hand-holding' the compiler which becomes tedious in itself .
I much prefer to code in masm making heavy use of macros.You can almost forget your in asm once you get used to using registers for variables and such....
The only time i ever resort to c these days is for maths stuff since i end up groaning every time i use the fpu!
Posted on 2006-07-02 11:54:15 by asmrixstar