git.ucc.asn.au
/
uccvend-snackrom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f043f6b
)
Added code for single byte instructions with immediate args
author
Mark Tearle
<
[email protected]
>
Fri, 23 Nov 2001 17:28:54 +0000
(17:28 +0000)
committer
Mark Tearle
<
[email protected]
>
Fri, 23 Nov 2001 17:28:54 +0000
(17:28 +0000)
ROM/makeasm.pl
patch
|
blob
|
history
diff --git
a/ROM/makeasm.pl
b/ROM/makeasm.pl
index
bdc48a9
..
ad25bba
100755
(executable)
--- a/
ROM/makeasm.pl
+++ b/
ROM/makeasm.pl
@@
-48,6
+48,24
@@
my %twobytesecond = ( '18 38' => 'PULY',
'18 3A' => 'ABY',
'18 3C' => 'PSHY');
'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
LINE: while (<>) {
# if blank line, print blank line
@@
-102,6
+120,14
@@
sub instruction {
return;
}
}
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);
if ($line =~ /^([A-F0-9]{4}) ((([A-F0-9]{2}) )*[A-F0-9]{2})/) {
@_=split(' ',$2);
UCC
git Repository :: git.ucc.asn.au