blob: f186597c864606473dcf040069a5365bc4a7ca88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package ixee.re.disasm
object main extends App {
def disassemble(bytes: Seq[String]): Seq[Option[Instruction]] = bytes.map(Instruction(_))
val bytes = """
3140 0044 1542 5c01
75f3 35d0 085a 3f40
0000 0f93 0724 8245
5c01 2f83 9f4f 0c46
0024 f923 3f40 2200
0f93 0624 8245 5c01
1f83 cf43 0024 fa23
b012 2045 0f43 32d0
f000 fd3f 3040 0a46
3012 7f00 b012 7a45
2153 3041 0412 0441
2453 2183 c443 fcff
3e40 fcff 0e54 0e12
0f12 3012 7d00 b012
7a45 5f44 fcff 8f11
""".replace("\n", " ").split(" ").filter(_ != "")
println(disassemble(bytes).flatten.mkString("\n"))
}
|