Write an Assembly language Program
number in ascending order
to
sport in 8051 microprocessor
Answers
Answered by
1
Explanation:
8051 Program to arrange numbers in Ascending order is as follows:
MOV R4,#0AH
AGAIN: MOV R3,#0AH
MOV R0,#20H
CLR C
UP:MOV A,@R0
MOV R1,A
INC R0
MOV A,@R0
SUBB A,R1
JNC SKIP
MOV A,@R0
DEC R0
MOV @R0,A
MOV A,R1
INC R0
MOV @R0,A
SKIP:DJNZ R3,UP
DJNZ R4,AGAIN
RET
Similar questions