Given the following declarations, write an assembly program segment that prompts the user to enter a 6-character secret word and an encryption key (a digit from 1 to 9). Then encrypt the secret word entered by adding the encryption key value to each of the character in the secret word and show the result of the encryption.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter8: Data And Network Communication Technology
Section: Chapter Questions
Problem 41VE
icon
Related questions
Question
Given the following declarations, write an assembly program segment that prompts the user to
enter a 6-character secret word and an encryption key (a digit from I to 9). Then encrypt the
secret word entered by adding the encryption key value to each of the character in the secret
word and show the result of the encryption.
Transcribed Image Text:Given the following declarations, write an assembly program segment that prompts the user to enter a 6-character secret word and an encryption key (a digit from I to 9). Then encrypt the secret word entered by adding the encryption key value to each of the character in the secret word and show the result of the encryption.
Given Data Segment declarations:
DATA
BYTE "Enter secret word :", 0
BYTE 10, 13 , "Enter encryption key (1-9)
BYTE 10, 13, "The encrypted word is
BΥTE ?
MSGI
MSG2
MSG3
KEY
BUFFER BYTE 7 DUP(?)
(Note: KEY is a variable declared to store encryption key number entered by a user and BUFFER is an
array declared to store secret word value entered by a user.)
Output required:
Enter secret word
:ABCDEF
Enter encryption key(1-9) :2
The encrypted word is
:CDEFGH
Transcribed Image Text:Given Data Segment declarations: DATA BYTE "Enter secret word :", 0 BYTE 10, 13 , "Enter encryption key (1-9) BYTE 10, 13, "The encrypted word is BΥTE ? MSGI MSG2 MSG3 KEY BUFFER BYTE 7 DUP(?) (Note: KEY is a variable declared to store encryption key number entered by a user and BUFFER is an array declared to store secret word value entered by a user.) Output required: Enter secret word :ABCDEF Enter encryption key(1-9) :2 The encrypted word is :CDEFGH
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning