; School of Computer Engineering
; K.N. Toosi University of Technology

%include "asm_io.inc"

segment .text

global asm_main

asm_main:
        enter 0,0
        pusha
        ;; ==========================

        ;; pow(m,n)
        push 4       ; push n
        push 3       ; push m

        call pow
        add  esp, 8

        call print_int
        call print_nl

        ;; ==========================
        popa
        leave
        ret

pow:
        push ebp
        mov  ebp, esp

        push ecx
        push edx        
      
        mov ecx, [ebp+12]
        mov eax, 1
loop1:  
        imul dword [ebp+8]
        loop loop1

        pop edx
        pop ecx

        pop ebp
        ret