# argcount.s # This program prints out the value of argc, the number of # program arguments. SPIM provides that value in $a0 when # the program starts running. .data str: .asciiz "The argument count is " .text main: subu $sp,$sp,8 # stack frame sw $a0,0($sp) # save argc for later la $a0,str # address of intro string li $v0,4 # print_string syscall # lw $a0,0($sp) # get argc li $v0,1 # print_int syscall # addu $sp,$sp,8 # j $ra #