From ad9b95abe0f7009f44d98de5264eb526e1987664 Mon Sep 17 00:00:00 2001 From: Mark Tearle Date: Fri, 23 Nov 2001 17:28:54 +0000 Subject: [PATCH] Added code for single byte instructions with immediate args --- ROM/makeasm.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ROM/makeasm.pl b/ROM/makeasm.pl index bdc48a9..ad25bba 100755 --- a/ROM/makeasm.pl +++ b/ROM/makeasm.pl @@ -48,6 +48,24 @@ my %twobytesecond = ( '18 38' => 'PULY', '18 3A' => 'ABY', '18 3C' => 'PSHY'); +my %onewitharg = ( '80' => 'SUBA', + '81' => 'CMPA', + '82' => 'SBCA', + '84' => 'ANDA', + '85' => 'BITA', + '86' => 'LDAA', + '88' => 'EORA', + '8A' => 'ORA', + 'C0' => 'SUBB', + 'C1' => 'CMPB', + 'C2' => 'SBCB', + 'C4' => 'ANDB', + 'C5' => 'BITB', + 'C6' => 'LDAB', + 'C8' => 'EORB', + 'CA' => 'ORB' ); + + LINE: while (<>) { # if blank line, print blank line @@ -102,6 +120,14 @@ sub instruction { return; } } + + if (defined $onewitharg{$instruction}) { + $thing = substr($line,8,2); + print "\t$onewitharg{$instruction}\t#\$$thing"; + $line =~ /$onewitharg{$instruction} [0-9A-F][0-9A-F](.*)$/i; + print "\t;$1\n"; + return; + } if ($line =~ /^([A-F0-9]{4}) ((([A-F0-9]{2}) )*[A-F0-9]{2})/) { @_=split(' ',$2); -- 2.20.1