Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create MY OWN CODEBLUE ASSEMBLEY LANGUAGE PROGRAM to compete and beat against the following: CarpetBomb: ;carpet bombing - put 1's through memory Loop: COPY #1,@MemPtr

Create MY OWN CODEBLUE ASSEMBLEY LANGUAGE PROGRAM to compete and beat against the following:

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago