Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Write a short program that uses the XLAT instruction to convert the BCD numbers 0-9 into ASCII-coded numbers 30H-39H. Store the ASCII-coded data in a...

 Write a short program that uses the XLAT instruction to convert the BCD numbers 0–9 into

ASCII-coded numbers 30H–39H. Store the ASCII-coded data in a TABLE located within

the data segment. This is the program i wrote will it work or do i need to change something.  Thanks

TABLE  DB       30H,     31H,     32H,     33h,      34H      ;lookup table

            DB       35H,     36H,     37H,     38H,     39H

LOOK:  MOV AL,0         ;Load AL with 0 (a test number)

            MOV CL,0         ;Start counter

            ADD AL,CL       ;Add AL and counter

            MOV BX, OFFSET TABLE         ; Address lookup table

            XLAT                ;Convert

            INC CL             ;Increment CL

            CMP CL,9         ;compare to see if

            JBE                  ;Jump if CL <

            RET                  ;Return

            ENDP

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question