Provide the missing lines to implement a Jump Table in the Assembly Code below: (Note: no default case is required for e

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

Provide the missing lines to implement a Jump Table in the Assembly Code below: (Note: no default case is required for e

Post by answerhappygod »

Provide the missing lines to implement a Jump Table in the
Assembly Code below:
(Note: no default case is required for entries other than the three
shown)

BR main
odd: .equate 0
main: SUBSP 2,i
STRO msgIn,d ; cout << "Enter 1,3 or 5” << endl;
DECI odd,s
{your lines will be inserted here}
case1: STRO msg1,d
BR endCase
case3: STRO msg3,d
BR endCase
case5: STRO msg5,d
endCase: CHARO '\n',i
ADDSP 2,i
STOP
msgIn: .ASCII "Enter 1, 3 or 5 \x00"
msg1: .ASCII " One \x00"
msg3: .ASCII " Three \x00"
msg5: .ASCII " Five \x00"
.END
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply