ISSOtm / gb-asm-tutorial-old

An online Game Boy assembly programming tutorial
https://eldred.fr/gb-asm-tutorial/
54 stars 10 forks source link

Typo in Arithmetics > Comparaison #6

Closed oktomus closed 5 years ago

oktomus commented 5 years ago

From https://github.com/ISSOtm/gb-asm-tutorial/blob/master/src/arithmetics.html#L97 In

    ld a, 42

    cp 10 ; 42 - 10 = 32,  C reset (42 >= 10), Z reset (42 != 10)
    ; Notice how you can chain comparisons? That comes in handy at times
--> cp 57 ; 42 - 57 = 241, C set   (42 < 10) , Z reset (42 != 10)
    cp 42 ; 42 - 42 = 0,   C reset (42 >= 42), Z set   (42 == 42)

Shouldn't it be

cp 57 ; 42 - 57 = 241, C set   (42 < 57) , Z reset (42 != 57)

?

ISSOtm commented 5 years ago

Yep, indeed. Copy-paste mistake.