⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inctestcond.pas

📁 一个不出名的GBA模拟器
💻 PAS
字号:
//////////////////////////////////////////////////////////////////////
//                                                                  //
// incTestCond.pas: Code to test an ARM/thumb opcode condition      //
//                                                                  //
// The contents of this file are subject to the Bottled Light       //
// Public License Version 1.0 (the "License"); you may not use this //
// file except in compliance with the License. You may obtain a     //
// copy of the License at http://www.bottledlight.com/BLPL/         //
//                                                                  //
// Software distributed under the License is distributed on an      //
// "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   //
// implied. See the License for the specific language governing     //
// rights and limitations under the License.                        //
//                                                                  //
// The Original Code is the Mappy VM Core, released April 1st, 2003 //
// The Initial Developer of the Original Code is Bottled Light,     //
// Inc. Portions created by Bottled Light, Inc. are Copyright       //
// (C) 2001 - 2003 Bottled Light, Inc. All Rights Reserved.         //
//                                                                  //
// Author(s):                                                       //
//   Michael Noland (joat), michael@bottledlight.com                //
//                                                                  //
// Changelog:                                                       //
//   1.0: First public release (April 1st, 2003)                    //
//                                                                  //
//////////////////////////////////////////////////////////////////////

  if rs = AL then
    cond := true
  else
    case rs of
      EQ: cond := zero;                                  // Equal
      NE: cond := not zero;                              // Not equal
      CS: cond := carry;                                 // Unsigned higher or same
      CC: cond := not carry;                             // Unsigned lower
      MI: cond := negative;                              // Negative
      PL: cond := not negative;                          // Positive or zero
      VS: cond := overflow;                              // Overflow
      VC: cond := not overflow;                          // No overflow
      HI: cond := carry and not zero;                    // Unsigned higher
      LS: cond := (not carry) or zero;                   // Unsigned lower or same
      GE: cond := negative = overflow;                   // Greater or equal
      LT: cond := negative <> overflow;                  // Less than
      GT: cond := (not zero) and (negative = overflow);  // Greater than
      LE: cond := zero or (negative <> overflow);        // Less than or equal
    else
      cond := false;
    end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -