Assembly Code
may I get an explanation for the 3 parts in this question
1. movl $Ar +38, %ecx
in above instruction movl trying to mov a long value into general purpose register ecx
here $Ar represent the value of Ar and $Ar +38 will return a value while adding 38 (a 32 bit number) into value of Ar
As the base address Ar=510 and 38 is a value which is goinig to be added in value of Ar , therefore the address will be same as 510 and only value will get updated .
Ans: 510510 i.e. no change in address
2. movw Ar,%cx
since movw just copy the value from Ar to register cx and therefore no memory access is needed.
Ans: -1 i.e. no excess of address is needed
3. movb Ar + 53(%eax,%ebx), %cl
here (%eax,%ebx) means (address of eax + address of ebx) that is 154+456=600
Now + 53(%eax,%ebx) or theoretically signed-offset value(address of eax + address of ebx)
means 600+ offset value = 600+53=653
now Ar will provide base address and (here StartByte) and address value result of +53(%eax,%ebx) will give end address (here EndByte)
Ans. 521653
Assembly Code may I get an explanation for the 3 parts in this question Given that . Ar is a label at address 510 EAX has the value 139 . EBX has the value 102 Which bytes in memory will be accessed...
1. Assume that you are given values in eax, ebx, ecx. Write an assembly code that does the following: eax = (ecx + edx ) - (eax + ebx) 2. Write a piece of code that copies the number inside al to ch. Example: Assume that Initially eax = 0x15DBCB19. At the end of your code ecx = 0x00001900. Your code must be as efficient as possible. 3. You are given eax = 0x5. Write one line of code in...