Class: Asm6502::Output
- Inherits:
-
Object
- Object
- Asm6502::Output
- Defined in:
- lib/asm6502.rb
Class Method Summary collapse
Class Method Details
.[](path, &block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/asm6502.rb', line 19 def self.[](path, &block) File.open(path, 'w+') do |f| @@mem = [] block.call f.write(@@mem.drop_while(&:nil?).reverse.drop_while(&:nil?).reverse.map(&:to_i).pack("c*")) end end |