push stack pointer in MIPS

204 Views Asked by At

I am aware of pushing a stack pointer but I am not sure of how to push all of the elements.

This is how I defined a stack pointer.

addi $sp, $sp, -24
sw $ra, 0($sp)
sw $s0, 4($sp) 
sw $s1, 8($sp) 
sw $s7, 12($sp) 
sw $s3, 16($sp) 
sw $s4, 20($sp) 

How can I push and remove them? Do I just

addi $sp, $sp, 24

Or loop for 6 times? Thank you for helping in advance.

0

There are 0 best solutions below