MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

darq
MAME Fan
Reged: 04/03/10
Posts: 41
Send PM


[OT] - Asm x86 Programmers' quiz.
#243071 - 01/08/11 02:38 PM



Code:


0100 66B844332211 MOV EAX, 11223344
0106 66BE00010000 MOV ESI, 0100
010C 668BFE MOV EDI, ESI
010F 66AD LODSD
0111 6605EA9CFE17 ADD EAX, 17FE9CEA
0117 66AB STOSD
0119 662D0314F526 SUB EAX, 26F51403
011F 66AB STOSD
0121 662D99379423 SUB EAX, 23943799
0127 66AB STOSD
0129 66054DC367C2 ADD EAX, C267C34D
012F 66AB STOSD
0131 EBD5 JMP 0108



Take a look at this code.
(It contains a very popular game.)

Without executing, answer these questions:

1) What's the purpose of this code?
2) Has this program an output? If so, which?

Maybe it is too easy for a mamedev, however do not cheat!



Bart T.
Reged: 01/07/06
Posts: 196
Send PM


Solution new [Re: darq]
#243145 - 01/09/11 01:11 AM


That's easy. It's supposed to print "PUCKMAN" to a DOS terminal.

Edited by Bart Trzynadlowski (01/09/11 01:13 AM)



Bart



darq
MAME Fan
Reged: 04/03/10
Posts: 41
Send PM


Re: Solution new [Re: Bart T.]
#243164 - 01/09/11 04:22 AM


> That's easy. It's supposed to print "PUCKMAN" to a DOS terminal.

Yes, correct. You won!
It was too stupid, wasn't it? :-D

After all the 'real' program was only 3 instructions.
...ah the old good dos function 09h.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 454 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2790