2012-03-28 16:32:49 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Dasm < Formula
|
|
|
|
homepage 'http://dasm-dillon.sourceforge.net'
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/dasm-dillon/dasm-dillon/2.20.11/dasm-2.20.11.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '6c1f0091e88fff8f814a92304286c1875fd64693'
|
2012-03-28 16:32:49 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "make"
|
2012-09-28 04:26:52 +00:00
|
|
|
prefix.install 'bin', 'doc'
|
2012-03-28 16:32:49 +00:00
|
|
|
end
|
2014-02-03 17:46:14 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"a.asm"
|
|
|
|
path.write <<-EOS
|
|
|
|
processor 6502
|
|
|
|
org $c000
|
|
|
|
jmp $fce2
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system bin/"dasm", path
|
|
|
|
code = File.open(testpath/"a.out", "rb") { |f| f.read.unpack("C*") }
|
|
|
|
assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code
|
|
|
|
end
|
2012-03-28 16:32:49 +00:00
|
|
|
end
|