# Execution begins at address 0 .pos 0 init: irmovl Stack, %esp # Set up Stack pointer irmovl Stack, %ebp # Set up base pointer jmp Main # Execute main program .align 4 # Array A (5 elements) a: .long 2 .long 4 .long 5 .long 1 .long 0 # Array b b: .long 3 .long 1 .long 2 .long 0 .long 6 Main: irmovl $5,%eax # length of arrays pushl %eax # Push length of array irmovl a,%edx # put address of array a in edx pushl %edx # Push address of array irmovl b,%edx # put address of array b in edx pushl %edx # Push address of array call DotProd # DotProd(a,b,5) halt # Your code for DotProd subroutine goes here: # ------------------------------------------- .pos 0x400 Stack: # The stack starts at 0x400