Question: PLEASE CODE IN ASSEMBLY LANGUAGE ONLY ASMLIB.INC CSIS 1 1 8 B Final Exam Project - Dumping Registers One of the things missing from asmLib

PLEASE CODE IN ASSEMBLY LANGUAGE ONLY ASMLIB.INC CSIS 118B Final Exam Project -Dumping Registers One of the things missing from asmLib is the ability to display the values of all of the registers and the flags to the screen. In this assignment you are going to get a chance to do exactly that for me.You are to create a procedure called dumpRegisters that will dump the contents of each register to the screen. This includes the flags register and each independent flag. The output of your dumpRegisters procedure should look like this: Press any key to close this window... Notice the use of the tab macro? On the surface this seems like an easy chore for the most part but you need to be careful how you save and restore the registers. Remember these registers should match what is shown in the registers window of the debugger. Some Hopefully Helpful Things You should have your dumpRegisters procedure call a procedure called showRegister. You want to pass the name of the register along with the value of the register to be displayed. I found that it was probably best to use invoke for this. My prototype looks like this: showRegister PROTO, regName:PTR BYTE, regValue: DWORDShowflag MACRO flagName, shiftCount LOCAL flagstr, flagVal, L1To use this you can simply call showFlag, the flag to show and its bit position. Here is an example call ShowFlag CF,1This shows the carry flag at bit 1The esp, ip,and flags register will take a little bit of thought so you should be prepared to discuss this in the discussion board for this unit. You can use global variables here as needed but you really must pass parameters to the showRegister procedure. Ideally we would create this as its own module but for now I am OK with things simply being in the main.asm file
REQUIRED OUTPUT
EAX: 5afafc EBX: 9db000 ECX: 5ebdec EDX: 5ebdec ESI: 5ebdec EDI: 5ebdec EBP: 5afab0 ESP: 5afaa8 EIP: 763afa29 EFL: 246 CF=0 SF=0 ZF=1 OF=0 AF=0 PF=1 C:\Users\gstev\source\repos\AsmProject\AsmProject\Debug\AsmProject.exe (process 3468) exited with code 0. Press any key to close this window ...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!