ld bc,0 ; BC:=0; loop equ $ ; [main body of loop] inc bc ; BC:=BC+1; ld hl,-1000 ; loop to stop at 1000; add hl,bc ; HL:=HL+BC; jp nc,loop ; go to LOOP if carry is zero;