.area HOME (CODE)
.area CSEG (CODE)
MOV R1,#0x60;MEMORY ADDRESS TO STORE PACKED BCD
MOV R3,#0x20;COUNT OF ASCII
MOV DPTR,#0x0030
TOP:
MOV A,#0x00
MOVC A,@A+DPTR;FETCH FIRST ASCII
CLR C
SUBB A,#0x30
ANL A,#0x0F
MOV R0,A
INC DPTR
MOV A,#0x00
MOVC A,@A+DPTR;FETCH SECOND ASCII
CLR C
SUBB A,#0x30
SWAP A
ANL A,#0xF0
ORL A,0x00
MOV @R1,A;STORE BCD TO RAM
INC DPTR
INC R1
DJNZ R3,TOP
HERE: SJMP HERE

In the simulator there is no option to edit code segment and hence in place of read code segmnent with the help of DPTR i have direcltly given values 0x36 and 0x35.So the result will store 65 as BCD
I hope you can better understand the self explanatory code.Thank You
Q4. Write an 8051 assembly program (using Keil/edsim) to convert a series of ASCII numbers to...
Write a program to read the following numbers from ROM and place them in data RAM starting at address 0x50. Only, the last number in ROM is zero; the rest, are non-zero. (9 points) Org 0x600 MYDATA DB 0x12, 0x45, 0x58, ..., 0x00
write a program to find matrix B and C multiplication using assembly on 8051 Initialization: ORG 400H MATRIXA: DB 4, 6, 8, 1, 3. 6, 9, 3, 2 ORG 410H MATRIXB: DB 2,4,7, 4, 5,7, 3, 1,1 ORG 420H MATRIXB: DB 1, 3, 4.8, 7, 5, 3,8,9 ORG 430H RESULTDB 0, 0, 0, 0, 0, 0, 0, 0, 0 ORG 440H SIGR: DB 0, 0, 0, 0,0, 0, 0, 0, 0
write a program to find matrix B and C...