top of page

TITLE Program Template     (template.asm)

INCLUDE Irvine32.inc
; (insert symbol definitions here)


.data
array dword 6
.code
main PROC
factorial proto num:dword
mov eax,1
invoke factorial,array
call writedec
    exit    ; exit to operating system
main ENDP

factorial proc,num:dword
cmp num,1
je l2
mul num
dec num
invoke factorial,num
l2:
ret
factorial endp

; (insert additional procedures here)
END main

bottom of page