EEC70 HOMEWORK 5 | SCored 100%
- HomeworkExp
- Rating : 24
- Grade : A+
- Questions : 0
- Solutions : 287
- Blog : 1
- Earned : $9883.30
EEC70 — COMPUTER STRUCTURE AND ASSEMBLY LANGUAGE
HOMEWORK 5
Consider the following program:
TITLE INVESTIGATE
INCLUDE Irvine32.inc
.code
main PROC
cld
call DumpRegs
std
call DumpRegs
call crlf
exit
main ENDP
END main
Executing the above program produces the following output:
EAX=7762494F EBX=7FFDE000 ECX=00000000 EDX=00401000
ESI=00000000 EDI=00000000 EBP=0018FF98 ESP=0018FF90
EIP=00401006 EFL=00000246 CF=0 SF=0 ZF=1 OF=0 AF=0 PF=1
EAX=7762494F EBX=7FFDE000 ECX=00000000 EDX=00401000
ESI=00000000 EDI=00000000 EBP=0018FF98 ESP=0018FF90
EIP=0040100C EFL=00000646 CF=0 SF=0 ZF=1 OF=0 AF=0 PF=1
Assume that string primitive instructions are not available, write few instructions that produce
the exact same behavior as the instruction:
rep movsw
Hint: You need to find the value of the direction flag and then proceed with the copying
accordingly.
[Solved] EEC70 HOMEWORK 5 | SCored 100%
- This Solution has been Purchased 1 time
- Average Rating for this solution is A+
- Submitted On 17 Mar, 2015 08:17:59
- HomeworkExp
- Rating : 24
- Grade : A+
- Questions : 0
- Solutions : 287
- Blog : 1
- Earned : $9883.30
MOV EAX, [DS+SI]; // copy from source location t...
EEC70 HOMEWORK 5 | SCored 100%
MOV EAX, [DS+SI]; // copy from source location to EAX.
LEA EBX, [ES+SI]; //load effective address of destination
MOV [EBX], EAX; /...