Professional Documents
Culture Documents
U19EE007 1
loop1:
loop2:
mov a, r7 mov
r7, a subb a, r5
jnc exitloop2
mov a, @ r0 subb a, @
r1 ; r0-r1 jnc skipif
// swapping 2 numbers
mov a, @ r0 mov b, @ r1
mov @ r0, b mov @ r1, a
skipif:
mov a, r7
inc a mov r7,
a
JMP loop2
exitloop2: mov
r7, #0h
mov a, r6
inc a mov r6,
a
JMP loop1
U19EE007 2
exitloop1: ;
mov b, #2h
U19EE007 3
2. Write an assembly language programming in 8051 microcontrollers for to
arrange 10 bytes of hexadecimal numbers in descending order starting from the
internal memory location 30h.
U19EE007 4
3. Write an assembly language program in the 8051-micro controller for to find the
U19EE007 5
factorial of a number less than 5h. Store the results in the internal memory
U19EE007 6