1. (5 points) Implement the following expression in assembly language: BX=-val2 + 7- (- val3 + vall) + (5/4)*3 Assume th
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. (5 points) Implement the following expression in assembly language: BX=-val2 + 7- (- val3 + vall) + (5/4)*3 Assume th
1. (5 points) Implement the following expression in assembly language: BX=-val2 + 7- (- val3 + vall) + (5/4)*3 Assume that vall, val2, and val3 are 8-bit integer variables Initialize vall with 12, val2 with 9, and val3 with 2 You are only allowed to use 16-bit registers to hold intermediate results, whenever needed. Use mov, add, sub, movzx, movzx, or neg instructions whenever needed. Use the debugger to verify your answer. o Submit the following: Save your source code as Lastname2.asm and upload the Lastname2.asm ▪ Screenshot showing that BX register contains the correct result.