Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ARGV.each do |file_name|
- @file_name = "decompilled_"+file_name+".bf"
- @count = 0
- File.open(@file_name,'w') do |line|
- File.open(file_name) do |file|
- file.each_byte do |b|
- case b
- when 0x1
- line.write '+'
- when 0x2
- line.write '-'
- when 0x3
- line.write '>'
- when 0x4
- line.write '<'
- when 0x5
- line.write ','
- when 0x6
- line.write '.'
- end
- @count += 1
- if @count == 45
- line.puts
- @count = 0
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement