8085 program to convert ASCII code into HEX code Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report Problem - Write an assembly level language program to convert ASCII code to its respective HEX Code. Examples: Input: DATA: 31H in memory location 2050Output:DATA: 0BH in memory location 3050 Assume that starting address of program, input memory location, and output memory locations are 2000, 2050, and 3050 respectively. Algorithm - Input the content of 2050 in accumulator. Subtract 30H from accumulator. Compare the content of accumulator with 0AH. If content of accumulator is less than 0A then goto step 6 else goto step 5. Subtract 07H from accumulator. Store content of accumulator to memory location 3050. Terminate the program. Program - ADDRESSMNEMONICSCOMMENTS2000LDA 2050A<-[2050]2003SUI 30HA<-A-302005CPI 0AH2007JC 200DCheck for carry200BSUI 07HA<-A-07H200DSTA 3050[3050]<-A2010HLTStop executionExplanation - LDA 2050 load the content of memory location 2050 to accumulator. SUI 30H subtracts 30H immediately from accumulator. CPI 0AH compare immediately 0AH with the data of accumulator. JC 200D check for carry if yes then go to address 200D. SUI 07H subtracts 07H immediately from accumulator. STA 3050 store the content of accumulator to memory location 3050. HLT stops the execution of program. Comment More infoAdvertise with us Next Article 8085 program to convert a hexadecimal number into ASCII code A Akashkumar17 Follow Improve Article Tags : Computer Organization & Architecture system-programming ASCII microprocessor Similar Reads 8085 program to convert 8 bit BCD number into ASCII Code Problem â Write an assembly-level language program to convert 8-bit BCD number to its respective ASCII Code. Assumptions - Starting address of program: 2000 Input memory location: 2050 Output memory location: 3050 and 3051 ASCII Code for Digits 0 â 9 Example - Algorithm -  Input the content of 20 3 min read 8085 program to convert a hexadecimal number into ASCII code Problem: Write an assembly-level language program to convert the HEX code to its respective ASCII code. Assume that the starting address of the program and input memory location are 2000 and 2050 respectively. Example: Input: 2050 E4 (Hex data)Output:2051 34 (ASCII code for 4)2052 45 (ASCII code for 2 min read 8086 program to convert 8 bit BCD number into ASCII Code Problem â Write an assembly language program in 8086 microprocessor to convert 8-bit BCD number to its respective ASCII Code. Assumption â Starting address of the program: 400 Input memory location: 2000 Output memory location: 3000 Example : Input: DATA: 98H in memory location 2000Output:DATA: 38H 2 min read 8085 code to convert binary number to ASCII code Problem - Assembly level program in 8085 which converts a binary number into ASCII number. Example - Assumptions - Binary number which have to convert in ASCII value is stored at memory location 2050 and output will be displayed at memory location 3050 and 3051. Algorithm - Load the content of 2050. 5 min read 8086 program to convert 8 bit ASCII to BCD number Problem - Write a program to convert ASCII to BCD 8-bit number where the starting address is 2000 and the number is stored at 2050 memory address and store result in 3050 memory address. Example-Input : location: 2050 Data : 37Output : location: 3050 Data : 07 Algorithm â Move value at [2050] into A 1 min read 8086 program to convert binary to Grey code Prerequisite - Binary to/from Gray Code Problem - Write a program to convert Binary number to Grey code 8-bit number where starting address is 2000 and the number is stored at 2500 memory address and store result into 2600 memory address. Example â Algorithm â Move value at [2500] into AL Move AL in 1 min read Like