Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Machine Language

Name: Cudder !MhMRSATORI!vzR1SbE7g/KHqrb 2010-06-12 7:59

What machine language do you think this looks closest to?


00000797 cspush 2
00000799 push $1
00000801 finv &2:3, 0
00000804 push t.1
00000806 push t.2
00000808 gosub $54
00000810 cspop 2
00000812 push $1
00000814 push $2000
00000816 push $6
00000818 finv &22:0, 0
00000821 ret
00000822 cspush 1
00000824 mov r1, t.1
00000827 mov r0, $95
00000830 mov m1.r0, r1
00000833 mov r0, m1.r0
00000836 ret
00000837 mov r1, $0
00000840 mov r0, $96
00000843 mov m1.r0, r1
00000846 mov r0, m1.r0
00000849 ret
00000850 mov r1, $1
00000853 mov r0, $96
00000856 mov m1.r0, r1
00000859 mov r0, m1.r0
00000862 ret


Hard mode: Try to figure out what it does.

Name: Anonymous 2010-08-15 4:28

>>58
Kind of hard to do that without knowing the syntax and semantics.

Name: Anonymous 2010-08-15 4:38

>>59
Anyone who can't figure out what mov does shouldn't be posting here anyway.

Name: Anonymous 2010-08-15 4:49

>>60
Of course that's clear, but it's not like mov is everything there is to it. I'll start giving examples:
unk.r0
Which r0, what's the significance? Is it the same as r0 or different?
setnl
If I had to guess, it sets SOMETHING(the first operand??) to a TRUE or FALSE value (0,1?) if the first operand is not lower than the second one (immediate value).
lor
What is the difference between or and lor? Is LOR logical OR? The semantics are obviously not clear.
jp/jpz
Some kind of conditional jump, probably depending on a flag? If zero, if parity set? what? Again, unclear semantics.
mov r0, r0
mov r2, r2
Nops?

Also, labels don't point to any of the given code (jump and gosub labels)
gosub
I'm assuming it's some form of call, probably places the return value on a stack and jumps to that address.

So even if I can guess what some instructions MAY mean, without proper documentation (or in this case, the original executable which interprets these instructions, as Cudder is probably reversing some game's bytecode), it's not possible to properly interpret these instructions, unless you want me to give a dumb unoptimized asm->C conversion, but those are dumb and pointless (Reverse engineering something is supposed to give a meaning to the code, not translate mov a,b into a = b; ).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List