Riddle #1
Here is a little riddle for you… no more then 30 seconds to answer :)
mov ecx, 0Ch mov dl, 1h mov dh, 1h L: xchg dh, dl add dl, dh movzx eax, dl loop L
Try to figure out what the code above is intended for, and let me know…
Enjoy ;)
p.s. Are you thinking about a bug? Well, it’s not a bug.


5 Responses Leave a comment
The pseudo code:
a = 1 b = 1 for(i = 12; i--; i==1) { b = a a = b + a }I’m not sure what the code is ‘intended for’. For me it just looks like a weird loop :)
Hi rastaganga,
thank you for your answer. I will say more about this riddle in the following days, now may be someone else want to play with it, so I don’t want to spoil ;)
Seems a fibonacci sequence calculator. Fibonacci(ecx) (for iterations of n>1). Am I right? Do I get a lollipop?
Hi dreyercito,
your answer hit the solution but it is not 100% right. You are missing something…
So no lollipop for you dude ;)
2^12