Ver Fonte

Added new Set8087CW and Get8087CW support functions.

Martijn Laan há 6 anos atrás
pai
commit
7d72445d45
4 ficheiros alterados com 20 adições e 2 exclusões
  1. 11 0
      ISHelp/isxfunc.xml
  2. 4 2
      Projects/ScriptFunc.pas
  3. 4 0
      Projects/ScriptFunc_R.pas
  4. 1 0
      whatsnew.htm

+ 11 - 0
ISHelp/isxfunc.xml

@@ -2611,6 +2611,17 @@ end;</pre></example>
         <description><p>Beeps.</p></description>
         <example><pre>Beep; //Beeps</pre></example>
       </function>
+      <function>
+        <name>Set8087CW</name>
+        <prototype>procedure Set8087CW(NewCW: Word);</prototype>
+        <description><p>Sets the FPU control word.</p></description>
+        <example><pre>Set8087CW($133f); //Disables all fpu exceptions }</pre></example>
+      </function>
+      <function>
+        <name>Get8087CW</name>
+        <prototype>function Get8087CW: Word;</prototype>
+        <description><p>Returns the current value of the FPU control word.</p></description>
+      </function>
     </subcategory>
     <subcategory>
       <function>

+ 4 - 2
Projects/ScriptFunc.pas

@@ -224,10 +224,12 @@ const
   );
 
   { System }
-  SystemTable: array [0..1] of AnsiString =
+  SystemTable: array [0..3] of AnsiString =
   (
     'function Random(const Range: Integer): Integer;',
-    'function FileSize(const Name: String; var Size: Integer): Boolean;'
+    'function FileSize(const Name: String; var Size: Integer): Boolean;',
+    'procedure Set8087CW(NewCW: Word);',
+    'function Get8087CW: Word;'
   );
 
   { SysUtils }

+ 4 - 0
Projects/ScriptFunc_R.pas

@@ -1134,6 +1134,10 @@ begin
     except
       Stack.SetBool(PStart, False);
     end;
+  end else if Proc.Name = 'SET8087CW' then begin
+    Set8087CW(Stack.GetInt(PStart));
+  end else if Proc.Name = 'GET8087CW' then begin
+    Stack.SetInt(PStart, Get8087CW);
   end else
     Result := False;
 end;

+ 1 - 0
whatsnew.htm

@@ -33,6 +33,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>Checkboxes displayed by lists now look better on high DPI systems.</li>
   <li>Compiler IDE change: The "Compiler Output" and "Debug Output" views now support multi selection, an extra <i>Select All</i> popup menu item and <i>Ctrl+C</i> and </i>Ctrl+A</i> keyboard shortcuts. The <i>Copy</i> action now only copies the selected lines instead of all lines.</li>
   <li>Inno Setup Preprocessor (ISPP) change: Added new predefined variable <tt>Tab</tt>.</li>
+  <li>Pascal Scripting change: Added new <tt>Set8087CW</tt> and <tt>Get8087CW</tt> support functions.</li>
   <li>Some messages have been added in this version: (<a href="https://github.com/jrsoftware/issrc/commit/dfdf02aef168be458b64e77afb20ae53a5b4f2ec">View differences in Default.isl</a>).
   <ul>
     <li>PrepareToInstallNeedsRestart: This message is used by the <i>Preparing to Install</i> wizard page if a restart is needed. If this message is not set by a translation, Setup will instead use FinishedRestartLabel and FinishedRestartMessage as before.</li>