; WRITE OUT LINES 0-9 IN ASCII. ; .ORG 0000h LD HL, 0080h + 32 ; MIDDLE OF FIRST LINE. LD B, 0 ; INITIALIZE COUNT. LD C, 39h ; LAST ASCII (9). LD DE, 64 ; LINE INCREMENT. LOOP: LD A, B ; GET CURRENT COUNT. OR 30h ; CONVERT TO ASCII. LD (HL), A ; STORE ON SCREEN. ADD HL, DE ; BUMP LINE POINTER. INC B ; BUMP COUNT. CP C ; TEST FOR END. JP NZ, LOOP ; GO IF NOT DONE. ;LOOP1: JP LOOP1 ; LOOP HERE AT END. HALT .END