# HG changeset patch # User Michael Pavone # Date 1648350621 25200 # Node ID 0c0d4233d826ad262567159cadd387176e72c43c # Parent 62a53c052d9b819b63ec3ce42a652ee7afada82e Fix SP end address in disassembler diff -r 62a53c052d9b -r 0c0d4233d826 dis.c --- a/dis.c Sat Mar 26 02:01:55 2022 -0700 +++ b/dis.c Sat Mar 26 20:10:21 2022 -0700 @@ -341,7 +341,7 @@ do_cd_labels = 1; } else { uint32_t sub_start =filebuf[0x40/2] << 16 | filebuf[0x42/2]; - uint32_t sub_end =filebuf[0x44/2] << 16 | filebuf[0x46/2]; + uint32_t sub_end = sub_start + (filebuf[0x44/2] << 16 | filebuf[0x46/2]); if (sub_start > (boot_size - 0x20)) { fprintf(stderr, "System Program start offset is %X, but image is only %X bytes\n", sub_start, (uint32_t)boot_size); return 1;