Hi guys, I'm a complete noob when it comes to assembly and MARIE.
I've been given a small project with some basic instructions and some sudo code!
i need to write a subroutine that 'will sum the numbers (1+2+3+4+...+N), where the user enters N'.
Write another subroutine that 'will multiply two numbers using repeated addition. For example, to multiply 20 and 5, you would need to calculate (20+20+20+20+20). Please use the instructions JNS and JumpI for the subroutine and return the result on a memory address'.
Write a MARIE assembly program that will calculate (N! = 1 x 2 x 3 x 4 ... x N), calling the subroutine that was created.
Sudo Code given:
Call subroutine to calculate 1+2+3+4+...+N
Call subroutine to calculate 1 x 2 x 3 x 4 x ... x N
Any help would be GREATLY appreciated!!!
It looks like you're new here. If you want to get involved, click one of these buttons!