2011-11-11 23:25:13 +00:00
|
|
|
class Asm6 < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "6502 assembler"
|
2015-12-19 05:28:42 +00:00
|
|
|
homepage "https://web.archive.org/web/20150601152433/http://home.comcast.net/~olimar/NES/"
|
|
|
|
url "https://web.archive.org/web/20150601152433/http://home.comcast.net/~olimar/NES/asm6.zip"
|
2015-08-03 12:55:31 +00:00
|
|
|
version "1.6"
|
|
|
|
sha256 "b37956f37815a75a6712c0d1f8eea06d1207411921c2e7ff46a133f35f0b3e1d"
|
2011-11-11 23:25:13 +00:00
|
|
|
|
|
|
|
def install
|
2015-12-19 05:49:31 +00:00
|
|
|
system ENV.cc, "-o", "asm6", "asm6.c"
|
2011-11-11 23:25:13 +00:00
|
|
|
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
|