Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This lab will be done using The Simple 8-Bit Assembler Simulator, available online Start off by using the Hello World! program that already exists at

This lab will be done using The Simple 8-Bit Assembler Simulator, available online

Start off by using the Hello World! program that already exists at the site as a baseline for this assignment. Feel free to reuse parts of it as you familiarize yourself with Assembly.

To begin with this lab, first replace the Hello World! portion of the code, with the following:

UGETGV UQWR KU DGUV

This is a shift-cipher, that was encrypted by shifting every letter two values to the RIGHT (for example, A would become C, B would become D, and so on.) Please adjust the Assembly code used in the original Hello World! program so that it shifts every letter BACK two values, to display the decrypted message. Remember, youll want to look at the ASCII encoding values discussed in the lecture for help on how to shift the values, and as one final hint youll likely be looking to add additional code to the .loop function to perform the shift.

IN ADDITION: Youll need to compensate for the spaces between the words, and use a conditional jump to avoid decrypting if the current character youre looking at is a SPACE. Remember, the ASCII reference has a very specific value for a blank space. So in your final decrypted message, the blank spaces between the words should still be blank spaces.

A copy of the original Hello World! website code is provided below:

; Simple example

; Writes Hello World to the output

JMP start

hello: DB \"Hello World!\" ; Variable

DB 0 ; String terminator

start:

MOV C, hello ; Point to var

MOV D, 232 ; Point to output

CALL print

HLT ; Stop execution

print: ; print(C:*from, D:*to)

PUSH A

PUSH B

MOV B, 0

.loop:

MOV A, [C] ; Get char from var

MOV [D], A ; Write to output

INC C

INC D

CMP B, [C] ; Check if end

JNZ .loop ; jump if not

POP B

POP A

RET

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions