aboutsummaryrefslogtreecommitdiff
path: root/size.pl
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-17 00:42:34 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-17 00:42:34 -0500
commitb9c1931a80c5d700ba356f9090e9a72f075377f7 (patch)
tree975acab9ea0ddb958485948ecd0b9ac9ea09fa53 /size.pl
parent24a2c856400918329e105b1f3ca2bd2ec386c9b0 (diff)
downloadtaipan-b9c1931a80c5d700ba356f9090e9a72f075377f7.tar.gz
fix final_stats() negative finalcash and score
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;