views:

145

answers:

3

Basically, are there any?

I'm tempted to think they do exist. For example, a template method can be implemented as a series of "jumps", where the target of a jump is specified "externally". Singleton will be just a well-known location in memory/code, etc.

I'm by no means an assembly expert, so these examples might turn out to be completely impossible, but still.

+4  A: 

Assembly language is more about "tricks" than design patterns. While high-level design patterns can still be thought of and brought into play, most assembly guys are more concerned with clock cycles and exploiting tricks of instructions.

For example, in x86 it is quicker to do xor eax, eax, than it is to do mov eax, 0.

The point I am making (thanks for the downvotes!) is that with Assembly Language you want to focus more on the minor detail than you do the big design picture. Just as you wouldn't focus on fine details of execution speed in a high level language.

Dead account
There is no such thing as "clr eax" on x86. Maybe you wanted to say "mov eax, 0"?
PhiS
Thanks Phil, it's been along time since I was down at the metal.
Dead account
+1  A: 

Applicable to OO design patterns:

People usually implement higher level language constructs like inheritance polymorphism and use them as building blocks to implement their intentions in design patterns. But then, maybe it's easier to find a c or c++ compiler for the platform and use design patterns without hassle of implementing basic oo functionality.

Boris Pavlović
Design patterns are not specific to OOP, btw.
Michael Foukarakis
+3  A: 

First definition on Google: "a design pattern is a general reusable solution to a commonly occurring problem in software design".

By that standard I'd say they most definitely exist.

First one that springs to mind is a jump table.

Mike