Wednesday 8 February 2017

X86 INSTRUCTIONS::: DATA TRANSFER INSTRUCTION:::4-MOVE SIGN EXTEND

Move sign extend : Syntax : movs src, dest #GAS Syntax movsx dest, src #Intel syntax The movs instruction copies the src operand in the dest operand and pads the remaining bits not provided by src with the sign bit (the MSB) of src. This instruction is useful for copying a signed small value to a bigger register. Operands src Register Memory dest Register Modified flags No FLAGS are modified by this instruction Example : .data byteval: .byte -24 # = 0xe8 .text .global _start _start: movsbw byteval, %ax # %ax is now -24 = 0xffe8 movswl %ax, %ebx # %ebx is now -24 = 0xffffffe8 movsbl byteval, %esi # %esi is now -24 = 0xffffffe8 # Linux sys_exit mov $1, %eax xorl %ebx, %ebx int $0x80

No comments:

Post a Comment

"Exploring the Intersections: Insights into Exam Prep, Science, Business,Tech,Web-dev,Admin&Health

काबिज नजूल : आबादी भूमि पर बने मकान को विक्रय करते समय बिक्रीनामा तैयार करने की प्रक्रिया-Occupied Nazul or populated land

काबिज नजूल अथवा आबादी भूमि पर बने मकान को विक्रय करते समय बिक्रीनामा तैयार करने की प्रक्रिया:   1. दस्तावेज इकट्ठा करना: विक्रेता और खरीदार ...