Royce Simmons wrote: > I am looking for a ASCII to HEX conversion assembler routine. I need > to convert 2 ASCII characters to a single hex digit. Royce: Enter with your two ASCII characters in CHAR1 (tens' digit) and CHAR2 (ones' digit). Exits with CHAR1 and the CHAR2 modified, and the hex value in W. LIST R = DEC MOVLW '0' BTFSC CHAR1,6 MOVLW 'A'-10 SUBWF CHAR1 MOVLW '0' BTFSC CHAR2,6 MOVLW 'A'-10 SUBWF CHAR2 SWAPF CHAR1,W ADDWF CHAR2,W -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body