From 2382ddd7bbc4f6a79218b8c0b831978257b8b8e4 Mon Sep 17 00:00:00 2001 From: Simon Owen Date: Fri, 5 Sep 2008 16:48:07 +0000 Subject: [PATCH] Moved opcode table from &b000 to &c000 --- opdefs.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/opdefs.pl b/opdefs.pl index 12509b6..047b4e7 100644 --- a/opdefs.pl +++ b/opdefs.pl @@ -7,7 +7,7 @@ # http://simonowen.com/sam/apple1emu/ $source = 'apple1emu.asm'; -$codeend = 0xc000; +$codeend = 0xd000; # Assemble, outputting the symbols containing opcode implementation lengths $_ = `pyz80.py -s op_.*_len $source`; @@ -44,7 +44,7 @@ foreach $op (@todo) { MSB: # Work up through MSB values until we find a space - for ($msb = 0; ; $msb++) + for ($msb = 0 ; ; $msb++) { # Determine the extent of the opcode in the current MSB my $start = ($msb << 8) | $op; @@ -78,9 +78,7 @@ $base = $codeend - (($size + 0xff) & ~0xff); print "Size = $size, used = $used, slack = ", $size-$used, "\n"; # Output sorted list of calculated positions -foreach (sort { $a <=> $b } @todo) -{ - my $offset = $base + $off{$_}; +foreach (sort { $a <=> $b } @todo) { printf FILE "op_%02x: equ &%04x ; +$len{$_}\n", $_, $base+$off{$_}; }