Look at the logic program below. Set a breakpoint after each commented instruction. You can also single step through the

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Look at the logic program below. Set a breakpoint after each commented instruction. You can also single step through the

Post by answerhappygod »

Look at the logic program below. Set a breakpoint after eachcommented instruction. You can also single step through theprogram. Answer the questions in the program.
.data
sourceword: .word 0xABwordmask: .word 0xCFoperand: .long 0xAA
.text
.globl _start
_start: movw sourceword, %ax movw %ax, %bx xorw %cx, %cx# What's in ax?# What's in bx?# What's in cx?
andw wordmask, %ax# What's in ax? orw wordmask, %bx# What's in bx? xorw wordmask, %cx# What's in cx?
movl operand, %eax movl %eax, %ebx movl %eax, %ecx# What's in eax?# What's in ebx?# What's in ecx?
shll $3,%eax# What's in eax?
rorl $4,%ebx# What's in ebx?
sarl %ecx# Now what's in ecx?
done:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply