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:
5fca0af
)
Fixed STX extended addressing
author
Nick Bannon
<
[email protected]
>
Sat, 29 Dec 2001 15:05:00 +0000
(15:05 +0000)
committer
Nick Bannon
<
[email protected]
>
Sat, 29 Dec 2001 15:05:00 +0000
(15:05 +0000)
ROM/makeasm.pl
patch
|
blob
|
history
diff --git
a/ROM/makeasm.pl
b/ROM/makeasm.pl
index
e2b43ae
..
dde0d0d
100755
(executable)
--- a/
ROM/makeasm.pl
+++ b/
ROM/makeasm.pl
@@
-77,7
+77,7
@@
my %onewitharg = ('63' => "COM\t\$%s,X",
'ED' => "STAD\t\$%s,X" );
'ED' => "STAD\t\$%s,X" );
-my %onewithword = ('FF' => "STX\t
\$%s
%s");
+my %onewithword = ('FF' => "STX\t%s");
LINE: while (<>) {
LINE: while (<>) {
@@
-136,7
+136,8
@@
sub instruction {
if (defined $onewitharg{$instruction}) {
$thing = substr($line,8,2);
if (defined $onewitharg{$instruction}) {
$thing = substr($line,8,2);
- printf "\t$onewitharg{$instruction}", $thing;
+
+ printf "\t$onewitharg{$instruction}", $thing;
$line =~ /$onewitharg{$instruction} [0-9A-F][0-9A-F](.*)$/i;
print "\t;$1\n";
return;
$line =~ /$onewitharg{$instruction} [0-9A-F][0-9A-F](.*)$/i;
print "\t;$1\n";
return;
@@
-145,10
+146,14
@@
sub instruction {
if (defined $onewithword{$instruction}) {
$thing = substr($line,8,2);
$thing2 = substr($line,11,2);
if (defined $onewithword{$instruction}) {
$thing = substr($line,8,2);
$thing2 = substr($line,11,2);
- printf "\t$onewithword{$instruction}", $thing, $thing2;
+ if (!($thing2 =~ /\s+/)) {
+ $curraddr = substr($line,0,4);
+ printf "FOO%s\tEQU\t\$%s%s\n", $curraddr,$thing,$thing2;
+ printf "\t$onewithword{$instruction}", ">FOO$curraddr";
$line =~ /$onewithword{$instruction} [0-9A-F][0-9A-F][0-9A-F][0-9A-F](.*)$/i;
print "\t;$1\n";
return;
$line =~ /$onewithword{$instruction} [0-9A-F][0-9A-F][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})/) {
}
if ($line =~ /^([A-F0-9]{4}) ((([A-F0-9]{2}) )*[A-F0-9]{2})/) {
UCC
git Repository :: git.ucc.asn.au