0 Members and 2 Guests are viewing this topic.
ld b, 9 ;Really? You have to load 9 into B to subtract it? sub b jr c, loc_4E6B pop af ld b, 8 ;Ok, so you already have 9 in b. The logical thing to do now would be dec b. sub b ;Oh, but no, you do the same bloody thing again!!! ;I forgot to mention that this code is missing a ld a,a. :P
As for the add and adc, there seem to be quite a few programmers (not here, of course) who misused the add instruction. For example, the code for the Pac Man machine (yes, it was a z80 too.) has a lot of "ccf \ add b". They still have no excuse.
Actually, you'll notice that instead of doing the stupid subtraction with B, they should have just done CP 9 since they restore A
It is almost scary how good some of the programmers are, here. I think that if they all designed an OS, it would be ridiculously amazing and more stable (though the TI-OS is pretty stable).
In other news, Frey continues kicking unprecedented levels of ass.
Maybe it's deliberately obfuscated code?
Quote from: tangrs on September 30, 2011, 05:14:07 amMaybe it's deliberately obfuscated code?Perhaps, but...Actually, it seems just like TI to try and "protect" their code with something this stupid and heinous, but they don't seem smart enough to deliberately write bad code. I think they just produce things that make you give up all hope unintentionally. Or....