Author | Message | Time |
---|---|---|
Yoni | This is x86, 16-bit, under DOS. [code]0100 B50D mov ch, 0d 0102 BD29D2 mov bp, d229 0105 8BF9 mov di, cx 0107 51 push cx 0108 AD lodsw 0109 F7F5 div bp 010B AB stosw 010C E2FA loop 0108 010E 5E pop si 010F 8BCE mov cx, si 0111 FF04 inc word ptr [si] 0113 4D dec bp 0114 75ED jnz 0103 0116 AD lodsw 0117 B310 mov bl, 10 0119 D1C0 rol ax, 1 011B 50 push ax 011C 2401 and al, 01 011E 0430 add al, 30 0120 CD29 int 29 0122 58 pop ax 0123 4B dec bx 0124 75F3 jnz 0119 0126 E2EE loop 0116 0128 C3 ret[/code] Note: Under DOS, interrupt 29 prints the ASCII char in the AL register. The rest of it should be platform independent. Try to run it (in debug.exe or using whatever other method). The riddle is: What is the meaning of its output? Before someone "corrects" me: Yes, the instruction at address 0114 is correct. Enjoy. | February 11, 2003, 6:39 PM |
Yoni | Solved [Adron]. Anyone else? :) | February 11, 2003, 8:05 PM |
n00blar | Would I be correct in saying D2 is a rotate instruction? I can't remember???? | February 11, 2003, 11:24 PM |
Yoni | Use an assembler or a x86 reference to check. | February 12, 2003, 8:21 AM |