ce12_w08_hw5 - CMPE 12 Winter 2008 Homework 5: Due February...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPE 12 Winter 2008 Name:________________ Homework 5: Due February 20 Email:________________ Alex was taking a short break during one of the lab sections when she overheard one of the lab tutors (who will remain unnamed) mutter “What's the deal with these labs? Team Fortress 2 is not that amazing.” This blasphemy will not stand, so Eric quickly made this program: .ORIG x3000 . INIT: LEA R0, INPUT LD R3, SEARCH LD R4, SPACE LOOP: ADD R0, R0, #1 LDR R1, R0, #-1 BR DONE NOT R1, R1 LDR R2, R3, #0 ADD R1, R1, R2 BRnp LOOP ERASECHAR: STR R4, R0, #-1 ADD R3, R3, #1 BR LOOP DONE: LEA R0, INPUT PUTS HALT INPUT: .STRINGZ "Team Fortress 2 is not that amazing." SEARCH: .STRINGZ "not" SPACE: .FILL x20 .END The purpose of this program is to correct the given sentence. It does this by searching for a string within
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/06/2009 for the course CMPE 12 taught by Professor Diblas during the Fall '08 term at University of California, Santa Cruz.

Ask a homework question - tutors are online