Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How could I change this assembly code around but still arrive at the same output? The output of this is: $ ./a.out AbCdEfGhIjKlMnOpQrStUvWxYz $ Text

How could I change this assembly code around but still arrive at the same output?

image text in transcribed

The output of this is:

$ ./a.out AbCdEfGhIjKlMnOpQrStUvWxYz $

Text version of code:

.intel_syntax noprefix

.data

n1:

.int 97

n2:

.int 122

.text

.globl main

main: mov ebx, DWORD PTR n1

loop: cmp ebx, DWORD PTR n2

jg end

cmp ebx, 97

jge ucase

add ebx, 32

mov edi, ebx

call putchar

inc ebx

jmp loop

ucase: sub ebx, 32

mov edi, ebx

call putchar

inc ebx

jmp loop

end: mov edi, 10

call putchar

mov eax, 0

ret

.intel_syntax noprefix .data 3 nl: 4 5 n2 .int 97 .int 122 7 8 .text 9 10 11 main: mov 12 loopmp 13 14 15 .globlmain ??? dge add mov call inc mp ebx, DWORD PTR nl ebx, DWORD PTR n2 end ebx, 97 ucase ebx, 32 edi, ebx putchar ebx loop 17 18 19 20 21 22 ucase sub 23 24 25 26 27 28 end: 29 30 31 mov call inc mp ebx, 32 edi, ebx putchar ebx loop mov call mov ret edi, 10 putchar eax, 0

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

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How would we like to see ourselves?

Answered: 1 week ago