gbdev / gb-opcodes

https://gbdev.io/gb-opcodes/optables/
Creative Commons Zero v1.0 Universal
24 stars 10 forks source link

Clearify sub a and cp a #19

Closed basxto closed 3 years ago

basxto commented 3 years ago

sub a never borrows

ISSOtm commented 3 years ago

The question I'm asking is: do we prioritize consistency with other instructions (sub a and cp a aren't special forms or anything), or technical correctness (this change isn't wrong)?

I'm personally more inclined towards the former for accessibility reasons; a newcomer may be confused as to why this operand is different from the others. (Also, if we're going for technical correctness, sbc a, a preserves the carry flag, for example.)

basxto commented 3 years ago

sub a and cp a already have a special form

Otherwise sub a, cp a and xor a should all be changed from 1 to Z

sbc a, a preserves the carry flag, for example.

Z 1 H - might be a possibility, yes

avivace commented 3 years ago

technical correctness

There is not a strong requirement for formal consistency, so I'd go for technical correctness