Saturday, June 29, 2013

Write a program to find the factorial of 5 in 8086.



model small
·         stack 32h
·         data
·         code
main proc
                        mov ax, 01h
                        mov bx, 01h
      loop1:
                    mul bx
                        inc bx
                        cmp bx, 06h
                        jne loop1
                        main endp
                        end main
output: 120

1 comment: