Added code for single byte instructions with immediate args
authorMark Tearle <[email protected]>
Fri, 23 Nov 2001 17:28:54 +0000 (17:28 +0000)
committerMark Tearle <[email protected]>
Fri, 23 Nov 2001 17:28:54 +0000 (17:28 +0000)
ROM/makeasm.pl

index bdc48a9..ad25bba 100755 (executable)
@@ -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);

UCC git Repository :: git.ucc.asn.au