Daily programming challenge #12 Assembler

in daily •  8 years ago 

Difficulty: HARD!


Assembler is the programming language next to binary. 

Even though, you might never use it, it is always a good thing to learn it. So: find good tutorials for it and complete this challenge:


Complete Challenge #2 (Fibonacci) in Assembler.


A good starting point might be using Linux for it, as it has more tools to process ASM-Files (such as nasm and LD), but you might just use windows as well. Just remember: Assembler-code isn't compatible from one OS to the other.


EXTENSION: 

If you want to build a compiler, you might want to use the plattform, wich is compatible with most of the systems, LLVM. Learn LLVM and complete Challenge 2 again. (I know, it's boring, but then, if you already completed #5, you will be able to build a little compiler for a script-language.)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Almost all C++ compilers allow inline assembly. So you can do:

__asm
{
//assembly here
};

if you really don't want to have to deal with finding something that works well for debugging.

Hello :-)

Yes, you are right, most C++ compilers (and other Langs. e.G. Pascal) allow inline Assembly, but they don't allow the acces to registers and system-calls (atleast I was never able to find that out.)

For the first time assembly, it might be better to use
nasm, ld and for debugging GDB.

If I'm wrong tell me ;-)

Enjoy my programming challenges, linuxer4Fun