Question: Modify the sample program to subtract 1000 from the number stored at number. Hint: Copy number to EAX, and then use sub eax,1000 to subtract
fig3-1.asm - Notepad File Edit Format View Help Example assembly language program Author: R. Detmer 6/2013 adds 158 to number in memory ; Date: .586 .MODEL FLAT STACK 4096 ; reserve 4096-byte stack ; reserve storage for data .DATA number DWORD sum DWORD -105 ? .CODE main ; start of main program code PROC mov add eax, number eax, 158 sum, eax ; first number to EAX ; add 158 ; sum to memory mov eax, o ; exit with return code MOV ret ENDP main END ; end of source code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
