Info

The hedgehog was engaged in a fight with

Read More
Miscellaneous

What is the RDI register used for?

What is the RDI register used for?

Registers

Register Purpose Saved across calls
%rsi used to pass 2nd argument to functions No
%rdi used to pass 1st argument to functions No
%r8 used to pass 5th argument to functions No
%r9 used to pass 6th argument to functions No

What is RAX register?

rax is the 64-bit, “long” size register. It was added in 2003 during the transition to 64-bit processors. It was added in 1979 with the 8086 CPU, but is used in DOS or BIOS code to this day. al and ah are the 8-bit, “char” size registers. al is the low 8 bits, ah is the high 8 bits.

What does LEA instruction do?

The lea instruction places the address specified by its first operand into the register specified by its second operand. Note, the contents of the memory location are not loaded, only the effective address is computed and placed into the register.

What is Movabs?

; Most instructions cannot deal with 64-bit addresses: ; movabs is the AT name of the special form that accepts 64-bit immediates. ; ; Intel just puts it under MOV, and NASM just uses `mov`.

What does Syscall do in assembly?

Assembly language programs request operating system services using the syscall instruction. The syscall instruction transfers control to the operating system which then performs the requested service. Then control (usually) returns to the program. (This description leaves out many details).

What does Imul do in assembly?

Description. The single-operand form of imul executes a signed multiply of a byte, word, or long by the contents of the AL, AX, or EAX register and stores the product in the AX, DX:AX or EDX:EAX register respectively.

What does CMP do in assembly?

The CMP instruction compares two operands. It is generally used in conditional execution. This instruction basically subtracts one operand from the other for comparing whether the operands are equal or not.

What is the difference between LES and LDS instruction?

lds means Load pointer using DS and likewise les means Load pointer using ES.

What is the purpose of LEA instruction in 8086?

LEA − Used to load the address of operand into the provided register.

What does Movabs do in assembly?

In 64-bit code, ‘ movabs ‘ can be used to encode the ‘ mov ‘ instruction with the 64-bit displacement or immediate operand.

What is MOVW Assembly?

movw copies the first operand to the second operand, including data from a descriptor. The descriptor table entry for the selector contains the data for the register. The DS and ES registers can be loaded with a null selector without causing an exception.

What type of instruction is syscall?

2 Answers. syscall is an instruction in x86-64, and is used as part of the ABI for making system calls. (The 32-bit ABI uses int 80h or sysenter , and is also available in 64-bit mode, but using the 32-bit ABI from 64-bit code is a bad idea, especially for calls with pointer arguments.)