Do an ALP to compare two eight bit numbers NUM1 and NUM2 stored in external memory locations 8000h and 8001h respectively. Reflect your result as: If NUM1<NUM2, SET LSB of data RAM location 2FH (bit address 78H). If NUM1>NUM2, SET MSB of location 2FH (bit address 7FH). If NUM1 = NUM2, then Clear both LSB & MSB of bit addressable ORG 0000H MOV DPTR,#8000H MOVX A,@DPTR MOV B,A INC DPTR MOVX A,@DPTR CJNE A,B,TARGET CLR 7FH CLR 78H SJMP BACK TARGET: JC NEXT SETB 78H SJMP BACK NEXT: SETB 7FH BACK: END
Comments
Post a Comment
if you have any doubts,please let me know