Dripping reverse notes (10) (c language data type)

1. Several common calling conventions

cdecl: push to the stack from right to left. Just like plus(1,2) (for example, this is a function of adding two numbers), this function first pushes 2, and then pushes 1. When balancing the stack, it uses the outer flat stack. General functions do not add function conventions,
basically The default is this.

stdcall: This is basically the same as cdecl, except that the inner flat stack is used to balance the stack

fastcall: This is when passing multiple parameters, ECX/EDX transmits the first two, and the rest are pushed into the stack from right to left, which is also used in the inner flat stack

2. Integer type
char 8BIT 1 byte
short 16BIT 2 bytes
int 32BIT 4 bytes
long 32BIT 4 bytes
When the integer type used is smaller than the number to be output, take the lowest digit 3. When writing
signed and unsigned numbers
When unsigned k = 0xFF, the system defaults to int type.
If unsigned is not written, the system defaults to a signed number.
1) Both are stored in the memory in exactly the same way.
2) Pay attention when calculating, such as marking 0xFF as a signed number , the output is -1, and the unsigned number is 255 4. Floating point
type
float 32BIT 4 bytes
double 64BIT 8 bytes In the case of an infinite loop, such as 0.4, this can only depend on the accuracy
insert image description here
insert image description hereinsert image description here
insert image description here

Guess you like

Origin blog.csdn.net/m0_51295934/article/details/123056150