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

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -