Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've never worked in assembly, but I was just curious if SDK's exist for assembly programming. For instance, if I wanted to create a linked list, are there libraries available that have already done this, or is everything typically done from scratch?

share|improve this question
There are quite a few: C, C++, ... :) –  Mat Oct 15 '12 at 16:35
Something to keep in mind regarding the complexity of assembly language: while malloc, calloc and free are standard issue in the C language, there can be varying standards for these at the assembler level. Also, implementing dynamic memory without the use of a library is not exactly trivial. –  Peter Smith Oct 15 '12 at 18:09
add comment

closed as not a real question by gnat, Walter, Yusubov, ChrisF Oct 17 '12 at 20:24

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers

up vote 7 down vote accepted

At the assembly level, you could build out an "API" by using some Macros and fleshing out a set of assembly functions into a separate file which perform a particular generic task, which you could then call...

Complex functionality, including linked lists, etc., are frequently implemented in a higher level language and called from assembly, Like C, C++, etc. If you are starting out with ASM, but want to utilize more complex patterns and structures, calling a C library is the way to go.

The reason for this is because it quickly becomes an enormous job to manage the spaghetti of registers and addressing muck when you start dealing with an excess of stack frames.

However, if you are interested in implementing complex stuff, it has been done before: Linked Lists in ASM - the only thing you'd need to do is implement this as a macro.

The value of implementing complex functionality in ASM is quickly outweighed by the advantages of just using a higher level language to begin with (which, fyi, are already very fast). If your motivation is speed, my suspicion would be that there is a C library out there can come very close to what you need.

share|improve this answer
My motivation is purely curiosity. I agree, I would use a higher level language. I just wondered what types of tools existed in cases where you can't do that. –  ConditionRacer Oct 15 '12 at 17:23
ASM is low level - it would unusual to use any tools besides a debugger like gdb. As well, by definition anything that is implemented in a high level language is "technically" doable in assembly, since this is what everything is eventually translated into for the processor to execute. –  Ray Oct 15 '12 at 17:40
add comment

I might be wrong on this, but I guess there are SDKs regarding processors architectures, ABIs and other hardware stuff. Other than that, I guess there is no such thing.

Everything in an ASM tends to be ad-hoc, so there are no datastructures per se. Of course, you could design a couple of standard jumps one could make with some sort of programming contract of what you might expect to be in the stack and memory address, but that would be using C. No real advantage.

share|improve this answer
add comment

It looks like Spontaneous Assembly is still avialable. Some of it is aimed toward MS-DOS, which you probably don't care about. Other parts, however, are (or should be, anyway) reasonably independent of the target platform, as long as it runs on an x86 processor.

share|improve this answer
I've still got my copy of SA 2.0 at home. Excellent library, I didn't make super heavy use of it back in the day, but the parts I needed really helped speed up development work! Just thinking about it makes me want to drag my old 8088 machine out of the closet and start hacking on it again! :-) –  Brian Knoblauch Oct 16 '12 at 14:32
add comment

NASMX? MASM32? Check these "SDK"s which are just regular MACROs for Win32 Programming with ASSEMBLY language.(for x86 and x64)

For Linked List and other DATASTRUCTURES, you might have to code them yourself. Assembly language toolkits are much like C language toolkits - open and extensible.

share|improve this answer
add comment

Only to combine what I said with what @Prototype Stark said: When you have a SDK like Windows, you get plenty of libraries and those come as object code. The same kind you would get from a C/C++ compiler. Your favorite ASM linker will link to those libraries and turn everything into a nice executable (depending of your OS of choice).

And how can you use WinAPI with ASM? Well, you must follow the calling conventions. You can even specify this when you're compiling C code with some special keywords.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.