2011-11-11 23:25:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Asm6 < Formula
|
|
|
|
homepage 'http://home.comcast.net/~olimar/NES/'
|
2013-01-27 01:40:55 +00:00
|
|
|
url 'http://home.comcast.net/~olimar/NES/asm6.zip'
|
|
|
|
version '1.6'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '9fbc1eed740a16107730e7f996d7ddad8277eb4e'
|
2011-11-11 23:25:13 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "#{ENV.cc} -o asm6 asm6.c"
|
|
|
|
bin.install "asm6"
|
|
|
|
end
|
2014-02-03 20:31:09 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"a.asm").write <<-EOS
|
|
|
|
org $c000
|
|
|
|
jmp $fce2
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system bin/"asm6", "a.asm"
|
|
|
|
code = File.open("a.bin", "rb") { |f| f.read.unpack("C*") }
|
|
|
|
assert_equal [0x4c, 0xe2, 0xfc], code
|
|
|
|
end
|
2011-11-11 23:25:13 +00:00
|
|
|
end
|