# Recursion key - # # # This is my solution to homework #4....

This preview shows pages 1–2. Sign up to view the full content.

################################################################################### ##### # This is my solution to homework #4. This homework asks students to translate a # recursive function to assembly language. It is critical that students follow the # conventions for saving registers or the code will not work. # # Peter Jensen # September 28, 2009 ################################################################################### ##### .data TextEnterN: .asciiz "Enter N between [1. .9]: " TextIllegal: .asciiz "Illegal input - number out of range - program aborted.\n" TextReachedEnd: .asciiz "Reached the end\n" TextInDepth: .asciiz "In recursion depth " TextSpace: .asciiz " " TextX: .asciiz "x" TextColon: .asciiz ":" TextReturn: .asciiz "\n" .text ################################################################################### ##### # Procedure main: # # Application that prompts the user for a value of N and then calls the recursive # function given in the assignment. # # Arguments

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/04/2009 for the course ECE 471 taught by Professor Someprofessor during the Spring '09 term at Cornell University (Engineering School).

### Page1 / 4

Recursion key - # # # This is my solution to homework #4....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online