add hl,hl ; HL:=HL+HL; jr nc,done ; goto DONE if carry is zero; inc hl ; HL:=HL+1; done equ $ ; first line of routine DONE;