CODE_DATA_SEG SEGMENT ASSUME CS:CODE_DATA_SEG,DS:CODE_DATA_SEG ORG 100h DISP_LINE PROC NEAR MOV BX,0 MOV CX,16 HEX_LOOP: MOV DL,LINE[BX] PUSH CX MOV CL,4 SHR DL,CL POP CX CALL WRITE_DIGIT MOV DL,LINE[BX] AND DL,0Fh CALL WRITE_DIGIT MOV AH,02h MOV DL,' ' INT 21h INC BX LOOP HEX_LOOP INT 20h DISP_LINE ENDP WRITE_DIGIT PROC NEAR ADD DL,30h CMP DL,3Ah JB DIGIT_OK ADD DL,07h DIGIT_OK: MOV AH,02h INT 21h RET WRITE_DIGIT ENDP LINE DB 30h, 31h, 32h, 33h, 34h, 35h, 36h, 37h DB 38h, 39h, 3Ah, 3Bh, 3Ch, 3Dh, 3Eh, 3Fh CODE_DATA_SEG ENDS END DISP_LINE