aboutsummaryrefslogtreecommitdiff
path: root/size.pl
diff options
context:
space:
mode:
Diffstat (limited to 'size.pl')
-rw-r--r--size.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/size.pl b/size.pl
index 0ec2c4a..0b25617 100644
--- a/size.pl
+++ b/size.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl -w
+my $code_start = oct(shift) || die "no code start addr";
my $stack_size = oct(shift) || die "no stack size";
open MAP, "<taipan.map" or die $!;
@@ -12,8 +13,9 @@ while(<MAP>) {
close MAP;
$free = (0xbc20 - $stack_size) - $bss_end + 1;
+$code_size = $bss_start - $code_start;
-printf "===> code ends at \$%04x\n", ($bss_start - 1);
+printf "===> code ends at \$%04x (%d, %.1fK)\n", ($bss_start - 1), $code_size, $code_size / 1024;
printf "===> BSS ends at \$%04x\n", $bss_end;
printf "===> stack starts at \$%04x\n", 0xbc20 - $stack_size;
printf "===> free code space \$%04x (%d, %.1fK)\n", $free, $free, $free / 1024;