Write assembly codes by using nios II instruction set to cal
 Write assembly codes by using nios II instruction set to calculate factorial of an integer (by using three digit number 704)
  Write assembly codes by using nios II instruction set to calculate factorial of an integer (by using three digit number 704)
Solution
DATA SEGMENT
 A DB 5
 DATA ENDS
 CODE SEGMENT
          ASSUME DS:DATA,CS:CODE
 START:
       MOV AX,DATA
       MOV DS,AX
       MOV AH,00
       MOV AL,A
 L1: DEC A
       MUL A
       MOV CL,A
       CMP CL,01
       JNZ L1
       MOV AH,4CH
       INT 21H
 CODE ENDS
 END START

