Just wanted to have some Z80 NOP squeezing chit chat
I am doing this to convert a signed 8 bit value in A into a signed 16 bit value in DE:
ld e,a ; 1 copy lo-byte
rlca ; 2 rotate sign into carry flag
ld a,0 ; 4 subtract from 0 ..
sbc a ; 5 with carry, effectively subtracting the carry flag from 0 => a is either 0 or -1
ld d,a ; 6 copy as hi-byte
; => signed offset value in de
Is there a faster way to do that? If not: :-P