Yes. But that would only mean you would have to process 8 bits at a time.
Originally Posted by Bubba
DEFB inserts the bytes following it (as many as you require) at the point it occurs in the program. I used bit representation here because it suits the purpose.
DEFB 01110010b, 11001001b
You'd then just load a byte at a time to one of the registers (register A, the Accumulator, would be the ideal one) and process each bit individually with the BIT instruction which sets or resets the zero flag according to the value of the bit tested.
You could even operate on 16 bits at a time and stored data with DEFW. The Z80 features register pairs which do provide some 16bit functionality. Loading data into them is as trivial as with 8 bit registers, But since BIT only operates on an 8 bit register (BIT n, r), there wouldn't be much gain here.
It was great! I wish I was back there again. Real job satisfaction! Your code either runs lickedy-split, or it's crap. I like that clarity.
Originally Posted by Sebastiani