Calculating Prime Numbers in MIPS Assembly -



Calculating Prime Numbers in MIPS Assembly -

i working on programme calculates prime numbers 200 using recursion in mips assembly using pcspim. far, have populated array of numbers 1-200 , binary vector list consists of 1's successfully. concept struggling how utilize stack frame help process.

here have stack frame:

subu $sp,$sp,32 # set stack frame sw $ra, 28($sp) # save $ra register stack sw $fp, 24($sp) # save $fp register stack addu $fp, $sp, 28 # set $fp register end of stack

i don't understand how going help me find prime numbers. insight appreciated!

if you're familiar sieve of eratosthenes, don't need recursion find prime numbers. method much simpler , more memory-efficient using recursion, , don't need utilize stack.

i can't help "how going help me find prime numbers", because never specified algorithm you're using.

assembly mips pcspim

Comments

Popular posts from this blog

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -