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")) }