Sega Master System / Mark III / Game Gear
Home - Forums - Games - Scans - Maps - Cheats - Credits
When expanding a signed two's complement number to a larger number of bits, it is necessary to replicate the sign bit into the newly added bits to maintain the value. So, for example, 40 ($28) is extended to $0028, and -40 ($d8) is extended to $ffd8. There's a trick to do this using the SBC opcode.
Learn TI-83 Plus Assembly In 28 Days - Day 15 - Advanced Math