Delphi Embedded Assembly [20]-integer type of Delphi

Source: Internet
Author: User
VaR I: integer; begin // The integer type is a 4-byte (32-bit) signed integer with the highest bit as the symbol bit. If it is a positive number, the sign bit is 0, and the negative sign bit is 1 // so the maximum integer value is: 01111111 11111111 11111111 111111112 ASM mov I, 01111111111111111111111111111111b; end; showmessage (inttostr (I )); {2147483647} // The negative number of signed integers equals the inverse code of the same positive number + 1; the maximum integer value is: // 01111111 11111111 11111111 111111112; its inverse code is: // 10000000 00000000 00000000 000000002; after the anti-code + 1 is: // 10000000 00000000 00000000 0000000 12 ASM mov I, where there are too many rows before 001b; end; showmessage (inttostr (I); {-2147483647} // What is the minimum integer value? // It should be: 10000000 00000000 00000000 000000002 ASM mov I, there should be too many bytes before 000b; end; showmessage (inttostr (I); {-2147483648} // 11111111 11111111 11111111 111111112 yes? ASM mov I, 11111111111111111111b; end; showmessage (inttostr (I); {-1} // The integer type 0 is in memory: 00000000 00000000 00000000 000000002 ASM mov I, when there are too many bytes between them before B; end; showmessage (inttostr (I); {0} // The binary value of 10010 of the integer type is: 00000000 00000000 00000000 011001002 ASM mov I, when there are too many bytes before 000001100100b; end; showmessage (inttostr (I); {100} // calculate the integer type-10010: // 00000000 00000000 00000000 01100100 the inverse code is: // 11111111 11111111 11111111 10011011; after the anti-code + 1 is: // 11111111 11111111 11111111 10011100 ASM mov I, 1111111111111111111110011100b; end; showmessage (inttostr (I); {-100} end;
 
  
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.