diff options
author | Juan J. Martinez <jjm@usebox.net> | 2021-11-02 08:52:07 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2021-11-02 08:52:07 +0000 |
commit | 8d8bc0cc4ae7c994713b30ce923421facbccaf68 (patch) | |
tree | 0c4e6e795bf3c0344c542a56022a8877025c32bf /tools | |
parent | 9a817b0e70b7accea009b51bf7112458d38ca54c (diff) | |
download | ubox-msx-lib-8d8bc0cc4ae7c994713b30ce923421facbccaf68.tar.gz ubox-msx-lib-8d8bc0cc4ae7c994713b30ce923421facbccaf68.zip |
Account INITIALIZED ROM
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/chksize | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/chksize b/tools/chksize index 2480a6b..0be40b4 100755 --- a/tools/chksize +++ b/tools/chksize @@ -8,7 +8,7 @@ def main(): sys.exit("usage: %s code_limit_hex data_limit_hex filename.map" % sys.argv[0]) - sizes = {"CODE": 0, "DATA": 0} + sizes = {"CODE": 0, "DATA": 0, "INITIALIZED": 0} with open(sys.argv[3], "r") as fd: for line in fd.readlines(): @@ -16,7 +16,12 @@ def main(): if "l__%s" % seg in line: sizes[seg] = int(line.split()[0], base=16) - print("\nROM: %(CODE)05d bytes\nRAM: %(DATA)05d bytes\n" % sizes) + sizes["ROM"] = sizes["CODE"] + sizes["INITIALIZED"] + + print("\nROM: CODE %(CODE)05d bytes\n" + " INIT %(INITIALIZED)05d bytes\n" + " Total %(ROM)05d bytes\n" + "RAM: %(DATA)05d bytes\n" % sizes) if sizes["CODE"] > int(sys.argv[1], 16): sys.exit("ROM is over the limit") |