# HG changeset patch # User Michael Pavone # Date 1672382675 28800 # Node ID bf1bb893f1047c64ae2a569ea4faa96c529b2df3 # Parent ff726f53d75aefad064abc2962db137a35aee131 Properly ignore low bits of SP start address in disassembler diff -r ff726f53d75a -r bf1bb893f104 dis.c --- a/dis.c Thu Dec 29 19:52:40 2022 -0800 +++ b/dis.c Thu Dec 29 22:44:35 2022 -0800 @@ -252,6 +252,7 @@ do_cd_labels = 1; } else { uint32_t sub_start =filebuf[0x40/2] << 16 | filebuf[0x42/2]; + sub_start &= ~0x7FF; 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);