diff options
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/hex-to-bin.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ruby/hex-to-bin.rb b/ruby/hex-to-bin.rb new file mode 100644 index 0000000..528a50f --- /dev/null +++ b/ruby/hex-to-bin.rb @@ -0,0 +1,9 @@ +require_relative "../ruby/micronucleus.rb" + +# just converts a hex file to a binary file +program = HexProgram.new open ARGV.first + +File.open ARGV.first.split('/').last.sub(/\.hex$/, '') + '.raw', 'w' do |file| + file.write program.binary + file.close +end |