84PCE:Syscalls:021D7C: Difference between revisions
From WikiTI
Jump to navigationJump to search
Created page with "SignExtendDE_broken 021D7C - SignExtendDE_broken == Synopsis == '''Hypothesized Official Name:''' Si..." |
No edit summary |
||
| Line 14: | Line 14: | ||
Here is what this routine calls, if you can find a particular use for it, go for it. | Here is what this routine calls, if you can find a particular use for it, go for it. | ||
<nowiki> push af | <nowiki> push af | ||
xor a | xor a | ||
ld (0D02AD7h), de | ld (0D02AD7h), de | ||
| Line 24: | Line 24: | ||
ld de, (0D02AD7h) | ld de, (0D02AD7h) | ||
pop af | pop af | ||
ret</nowiki> | ret </nowiki> | ||
Revision as of 01:39, 5 May 2015
Synopsis
Hypothesized Official Name: SignExtendDE_broken
Syscall Address: 021D7Ch
This is supposed to extend the signed 16-bit DE value to be 24-bit signed.
However, due to what looks like a copy-paste error by TI, this routine is pretty much useless.
It looks like they tried to use code from SignExtendBC, and forgot to change a byte.
Here is what this routine calls, if you can find a particular use for it, go for it.
push af xor a ld (0D02AD7h), de bit 7, b ; This should be d, not b jr z, _+ dec a _+: ld (0D02AD9h), a ld de, (0D02AD7h) pop af ret