-
Notifications
You must be signed in to change notification settings - Fork 2
/
disasm.rb
18 lines (17 loc) · 10 KB
/
disasm.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
botdisas.rb 0000644 0001750 0001750 00000001443 11641461636 012557 0 ustar diplom diplom require './disassembler.rb'
instr=File.open(ARGV[0]).lines.to_a.map{|x| x.strip}
instr=
[
"110000000000000010111110000000000000000011010100",
"111000000000000001011110000000000110111011000001",
"111000000000000010011111000000000000001011000100",
"011000000000000010011110000000000000000011000001",
"110111111111111111011000000000000000000000010100",
"110111111111111110011110000000000000000011011100",
"010000000000000000111010000000000000000011000001"
]
instr.each do |line|
cmd=Disassembler.bin_to_code(line)
puts Disassembler.disassemble(cmd)
end