Delphi 내장 어셈블러[20] - Delphi의 Integer 유형

1879 단어
var
  I: Integer;
begin
  //Integer    4  (32 )     ,        ,      ,      0、       1
  //   Integer      : 01111111 11111111 11111111 111111112
  asm
    mov I, 01111111111111111111111111111111B;
  end;
  ShowMessage(IntToStr(I)); {2147483647}


  //                  + 1; Integer     :
  //01111111 11111111 11111111 111111112;     :     
  //10000000 00000000 00000000 000000002;    + 1    :
  //10000000 00000000 00000000 000000012
  asm
    mov I, 10000000000000000000000000000001B;
  end;
  ShowMessage(IntToStr(I)); {-2147483647}


  //  Integer         ?
  //   : 10000000 00000000 00000000 000000002
  asm
    mov I, 10000000000000000000000000000000B;
  end;
  ShowMessage(IntToStr(I)); {-2147483648}


  //11111111 11111111 11111111 111111112  ?
  asm
    mov I, 11111111111111111111111111111111B;
  end;
  ShowMessage(IntToStr(I)); {-1}


  //Integer     0      : 00000000 00000000 00000000 000000002
  asm
    mov I, 00000000000000000000000000000000B;
  end;
  ShowMessage(IntToStr(I)); {0}


  //Integer     10010      : 00000000 00000000 00000000 011001002
  asm
    mov I, 00000000000000000000000001100100B;
  end;
  ShowMessage(IntToStr(I)); {100}


  //  Integer     -10010:
  //00000000 00000000 00000000 01100100     :
  //11111111 11111111 11111111 10011011 ;    + 1    :
  //11111111 11111111 11111111 10011100
  asm
    mov I, 11111111111111111111111110011100B;
  end;
  ShowMessage(IntToStr(I)); {-100}
end;

 
 
 
 
 

 

 
  

좋은 웹페이지 즐겨찾기