Question: This week you use two of the programs listed below to battle against your own Assembly Language program. Your goal is to win the battle.

This week you use two of the programs listed below to battle against your own Assembly Language program. Your goal is to win the battle. Directions: Create a CodeBlue program in assembly language and debug it in the CodeBlue Wars visual environment detailed in the document. Once it is ready for battle, load one of the programs listed below to compete against. Run both a Single Battle and 100 Battles. Compete against at least two programs. Submit a Word document that includes the following information for each battle: Name of programs selected for battle The outcome of the single battle The outcome of 100 Battles Number of iterations Screenshot of the end of each battle A copy of your assembly language code, you may copy and paste directly from your text file Programs to compete against:

CarpetBomb:

;carpet bombing - put 1's through memory Loop: COPY #1,@MemPtr ;put a 1 at location pointed to by MemPtr ADD #1,MemPtr ;increment the pointer JUMP Loop ;and do it again MemPtr: DATA 1

Simple Relocate:

; simple relocate program COPY #-9,Loc ;offset from Loc to start of relocate program COPY #50,NewLoc ;offset from NewLoc to relocate program to Loop: COPY @Loc,@NewLoc ; move an instruction ADD #1,Loc ;increment ptr to next instruction ADD #1,NewLoc ;increment ptr to next location to move it to JUMPZ Done,Loc ;if Loc is 0 we are done JUMP Loop ;otherwise move next Done: COPY #50,NewLoc ;reset beginning of relocated program JUMP @NewLoc ;and jump to it Loc: DATA 0 ;ptr to progam to move NewLoc: DATA 0 ;ptr to location to move to 

Runner:

;simple progam that moves through memory copy 0,1

Simple Loop:

;sample program - simple loop Start: ADD #5, Temp ;dummy instruction inside loop ADD #-1,Counter ;decement loop counter JUMPZ NewLocation, Counter ;when counter = 0, done JUMP Start ;otherwise repeat loop Counter: DATA 10 ;loop counter Temp: DATA 0 NewLocation: COPY 0,1 ;dummy instruction after loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!