max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
ui_primitives.adb | annexi-strayline/AURA | 13 | 12469 | ------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- Command Line Interface --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020-2021, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Ada.Calendar;
with Ada.Containers;
with Ada.Characters.Latin_1;
with Ada.Characters.Conversions;
with Ada.Strings.Fixed;
with CLI; use CLI;
with CLI.Widgets.Spinners;
with CLI.Widgets.Progress_Bars;
with Workers;
with Workers.Reporting;
with Registrar.Registration;
with Registrar.Queries;
with Registrar.Subsystems;
with Registrar.Library_Units;
with Registrar.Source_Files;
with Registrar.Implementation_Hashing;
with Repositories;
with Repositories.Cache;
with Progress;
with Unit_Names;
with User_Queries;
with User_Notices;
with Scheduling;
package body UI_Primitives is
------------------
-- Print_Banner --
------------------
procedure Print_Banner is
subtype Banner_Line is String (1 .. 60);
type Banner_Unit is array (Positive range <>) of Banner_Line;
Banner: constant Banner_Unit(1 .. 4)
:= (1 => " ,==== == == ====. ,==== Ada User Repository Annex ",
2 => ".==|==..==|==..==|==..==|==. Reference Implementation ",
3 => ":-----::--|--::----.::-----: Version 0.1 ",
4 => "|__|__||.___,||__|._||__|__| (C) 2020-2021 ANNEXI-STRAYLINE");
Banner_Color_Map: constant Banner_Unit(1 .. 4)
:= (1 => "511111551151155111115511111555555555555555555555555555555555",
2 => "622622662262266226226622622666666666666666666666666666666666",
3 => "733333773373377333337733333777777777777777777777777777777777",
4 => "844844884444488448448844844888888888888888888888888888888888");
type Style_Set is array (1 .. 8) of Text_Style;
Styles: Style_Set := (1 => Blue_FG + Bold,
2 => Blue_FG + Bold,
3 => Blue_FG + Bold,
4 => Magenta_FG,
5 => White_FG,
6 => White_FG,
7 => White_FG,
8 => White_FG);
function Map_To_Style (C: in Character) return Text_Style is
(case C is
when '1' => Styles(1),
when '2' => Styles(2),
when '3' => Styles(3),
when '4' => Styles(4),
when '5' => Styles(5),
when '6' => Styles(6),
when '7' => Styles(7),
when others => Styles(8));
Run_Start: Positive;
Run_End : Positive;
Run_Sample: Character;
begin
Clear_Line;
for L in Banner'Range loop
declare
Logo: Banner_Line renames Banner(L);
Map : Banner_Line renames Banner_Color_Map(L);
begin
Run_Start := Map'First;
while Run_Start <= Map'Last loop
Run_Sample := Map(Run_Start);
for I in Run_Start .. Map'Last loop
exit when Map(I) /= Run_Sample;
Run_End := I;
end loop;
Put (Message => Logo(Run_Start .. Run_End),
Style => Map_To_Style (Run_Sample));
Run_Start := Run_End + 1;
end loop;
end;
New_Line;
end loop;
New_Line;
end Print_Banner;
----------------
-- Print_Help --
----------------
procedure Print_Help is
begin
Put_Line (Message => "Usage: aura [command] [options]");
New_Line;
Put_Line ("If no command is specified, the command defaults to ""checkout""");
New_Line;
Put_Line (Message => "Available Commands", Style => Bold);
New_Line;
Put_Line (Message => "help", Style => Underline);
New_Line;
Put_Line (Message => "Display this message");
New_Line;
Put_Line (Message => "clean", Style => Underline);
New_Line;
Put_Line ("Removes all previous compilation objects, as well as all");
Put_Line ("previous run data, including the build option history");
New_Line;
Put_Line ("This DOES NOT remove any compiled executables or libraries,");
Put_Line ("however invoking aura build/library after aura clean will");
Put_Line ("force their recompilation");
New_Line;
Put (Message => "checkout", Style => Underline);
Put_Line (Message => " [subsystem name] [[subsystem name] [...]]",
Style => Bold);
New_Line;
Put_Line ("Attempts to identify and check-out all required subsystems, ");
Put_Line ("and also inducts those directly specified (including their ");
Put_Line ("dependencies), but does not execute compilation.");
New_Line;
Put (Message => "compile", Style => Underline);
Put_Line (Message => " [-no-pic] [-debug] [-assertions] "
& "[-optimize-1/2/3/size/debug]",
Style => Bold);
New_Line;
Put_Line ("-no-pic Explicitly disable PIC compilation");
Put_Line ("-debug Enable debugging information. It is recommended");
Put_Line (" that -optimize-debug also be used");
Put_Line ("-assertions Force all assertions on for all Ada units");
Put_Line ("-optimize Enable an optimization level. If not specified,");
Put_Line (" no optimization is applied.");
Put_Line (" -1/2/3: Optimization levels of increasing ");
Put_Line (" optimization.");
Put_Line (" -size : Optimize for size");
Put_Line (" -debug: Optimize for debugging");
New_Line;
Put_Line ("The selected compile options are presistent. Subsequent");
Put_Line ("invocations of aura compile with no other options causes");
Put_Line ("the same options of the previous run to be used.");
New_Line;
Put_Line ("If no options were stored (after aura clean, or a new project,");
Put_Line ("then the default options (no options) is used - which is to");
Put_Line ("ouput unoptimized position-independent without debug info.");
New_Line;
Put (Message => "build/run", Style => Underline);
Put_Line (Message =>" [main unit] [-no-pie] [-static-rt/-static] [-debug]"
& " [-assertions]",
Style => Bold);
Put_Line (Message => " [-optimize-1/2/3/size/debug]",
Style => Bold);
New_Line;
Put_Line ("Invokes checkout, then compile. If compilation succeeds, an");
Put_Line ("executable is generated. If the command is run, and the");
Put_Line ("build succeeds, the generated executable is executed.");
New_Line;
Put_Line ("The configuration invocation attempts to create a dynamically");
Put_Line ("linked, position-independent executable (ASLR-capable).");
New_Line;
Put_Line ("-no-pie Disables explicit pic compiler options during");
Put_Line (" compilation and pie linker options during");
Put_Line (" linking - implies the -no-pic compile option");
Put_Line ("-static-rt Attempts to statically link the Ada runtime");
Put_Line (" (and libgcc for GNAT) specifically");
Put_Line ("-static Attempts to force the executable to be fully");
Put_Line (" statically linked (including libc, pthreads,");
Put_Line (" etc.) Only use this option if you know what");
Put_Line (" you are doing. This option implies -no-pic");
Put_Line (" and -static-rt");
New_Line;
Put_Line ("All other parameters are passed to compile. Like compile,");
Put_Line ("these options are persistent between runs.");
New_Line;
Put_Line ("If a main unit is not given, the resulting executable");
Put_Line ("elaborates all root units on execution.");
New_Line;
Put_Line ("If a static executable is built, the required libraries for");
Put_Line ("linking must be at a path specified by the environment variable");
Put_Line ("LIBRARY_PATH, and must have the format ""library_name.a"".");
New_Line;
Put_Line ("The executable generated takes the name of the main unit, if");
Put_Line ("specified. If no main unit is specified, the executable takes ");
Put_Line ("the name of aura.out");
New_Line;
Put (Message => "library", Style => Underline);
Put_Line (Message => " [-no-pie] [-static-rt/-static] [-debug] "
& "[-optimize-1/2/3/size/debug]",
Style => Bold);
Put_Line (Message => " library_name.a/so/dylib/dll",
Style => Bold);
New_Line;
Put_Line ("[-optimize-1/2/3/size/debug] library_name.a/so/dylib/dll");
New_Line;
Put_Line ("Used to generate a stand-alone library that may be included in");
Put_Line ("other non-ada programs.");
New_Line;
Put_Line ("To create Ada-specific shared libraries, see the systemize command");
New_Line;
Put_Line ("Library Invokes fetch then compile. Before linking or archiving the");
Put_Line ("specified library");
New_Line;
Put_Line ("The created library does not have a main subprogram, but will have");
Put_Line ("symbols for C-exported adainit and adafinal C-convention subprograms.");
Put_Line ("These subprograms must be invoked before and after using the library,");
Put_Line ("Respectively");
New_Line;
Put_Line ("NOTE: Using multiple aura-built libraries in a single executable is not");
Put_Line ("possible due to the initialization/finalization subprograms. However a");
Put_Line ("feature to allow specific naming of those subprograms may be added in the");
Put_Line ("future.");
New_Line;
Put_Line ("The library type (static vs dynamic) is determined by the extension");
New_Line;
Put_Line ("If a static library (archive) is built, the required libraries for");
Put_Line ("linking must be either in the project root, or else must");
Put_Line ("be at a path specified by the environment variable");
Put_Line ("LIBRARY_PATH, and must have the format ""library_name.a"".");
New_Line;
Put_Line ("For static libraries (archives), -static is implied. This, in-");
Put_Line ("effect causes a static Ada runtime to be included in the archive");
New_Line;
Put_Line ("Additionally, when building static libraries, all Linker_Options");
Put_Line ("pragmas, together with required libraries will be output into a");
Put_Line ("separate file ""library_name.linkopt"". These options should be passed");
Put_Line ("to the linker or linker driver when using the static library");
New_Line;
Put_Line ("For dynamic libraries, if -static or -static-rt is NOT given, the");
Put_Line ("resulting library will have dynamic dependencies on the shared Ada");
Put_Line ("runtime. Care should be taken when using partition-specific pragmas");
Put_Line ("accross multiple such libraries, as they will have global effects");
Put_Line ("due to a single Ada runtime being shared amongst them.");
New_Line;
Put_Line ("Using -static or -static-rt when building a shared library will cause");
Put_Line ("the resulting library to contian it's own instance of the Ada runtime");
New_Line;
New_Line;
Put_Line ("If the "".so"" extension is given for library_name, then");
Put_Line ("even if ""-static"" is given, the produced library will be");
Put_Line ("a dynamic library.");
New_Line;
Put_Line ("The initialization (elaboration) and finalization are");
Put_Line ("registered with the linker for shared (default) or");
Put_Line ("-static-rt libraries. If -static is used, the adainit and");
Put_Line ("adafinal must be called by the user of the library");
New_Line;
Put_Line ("Options -static/-static-rt have no effect if buidling an");
Put_Line ("archive library");
New_Line;
New_Line;
Put (Message => "systemize", Style => Underline);
Put_Line (Message => " [-repo-add/show] [-debug] [-optmize-1/2/3/size/debug]",
Style => Bold);
Put_Line (Message => " destination_path",
Style => Bold);
New_Line;
Put_Line ("Systemize builds separate shared libraries for each AURA");
Put_Line ("subsystem, and then installs them into a read-only pre-");
Put_Line ("formatted ""System"" AURA Repository at destination_path");
New_Line;
Put_Line ("-repo-add A repository that points to the newly created");
Put_Line (" System Repository is added to the project");
New_Line;
Put_Line ("-repo-show The content needed to create a Repository Spec");
Put_Line (" for the newly created System Repository is output.");
Put_Line (" This is the default.");
New_Line;
Put_Line (Message => "General Options", Style => Underline);
Put_Line ("-v When common errors occur, output extra information");
Put_Line ("-q When common errors occur, output minimum information");
Put_Line ("-y Answer all queries automatically with the default response");
New_Line;
end Print_Help;
-------------
-- Put_Tag --
-------------
procedure Put_Tag (Tag: Tag_Type) is
Tag_Styles: constant array (Tag_Type) of Text_Style
:= (EXEC => Black_BG + Cyan_FG + Bold,
OK => Green_FG + Bold,
FAIL => Red_BG + White_FG,
WARN => Yellow_BG + Black_FG,
QUERY => Magenta_BG + White_FG,
INFO => Blue_BG + White_FG);
subtype Tag_String is String (1 .. 6);
Term_Tags: constant array (Tag_Type) of Tag_String
:= (EXEC => " EXEC ",
OK => " OK ",
FAIL => " FAIL ",
WARN => " WARN ",
QUERY => " QURY ",
INFO => " INFO ");
Pipe_Tags: constant array (Tag_Type) of Tag_String
:= (EXEC => "[EXEC]",
OK => "[OKAY]",
FAIL => "[FAIL]",
WARN => "[WARN]",
QUERY => "[QURY]",
INFO => "[INFO]");
begin
if Output_Is_Terminal then
Put (Message => Term_Tags (Tag), Style => Tag_Styles (Tag));
else
Put (Pipe_Tags(Tag));
end if;
end Put_Tag;
-------------------
-- Put_Empty_Tag --
-------------------
procedure Put_Empty_Tag is
begin
Put (String'(1 .. 6 => ' '));
end Put_Empty_Tag;
-----------------
-- Put_Divider --
-----------------
procedure Put_Divider is
begin
Put_Line (String'(1 .. Terminal_Width => '-'));
end Put_Divider;
------------------
-- Query_Driver --
------------------
procedure Query_Driver (Prompt : in String;
Default : in String;
Response: out String;
Last : out Natural)
is
use Ada.Characters.Latin_1;
begin
Clear_Line;
Put_Query_Tag;
Put (' ' & Prompt);
if Auto_Queries then
Put (Default);
Response := Default;
Last := Default'Last;
else
Get_Line (Item => Response,
Last => Last);
end if;
end;
------------------
-- Dump_Reports --
------------------
procedure Dump_Reports is
use Workers, Workers.Reporting;
R: Work_Report;
begin
for I in 1 .. Available_Reports loop
R := Retrieve_Report;
Put_Line ("-- Worker Report" & Count_Type'Image (I)
& " (" & Report_Kind'Image (R.Kind) & ')'
& " --");
Put_Line (To_String (R.Work_Order_Information));
if R.Kind = Error then
CLI.New_Line;
Put_Line (To_String (R.Exception_Information));
end if;
if Length (R.Worker_Note) > 0 then
CLI.New_Line;
Put_Line ("Worker Note: " & To_String (R.Worker_Note));
end if;
CLI.New_Line;
end loop;
end Dump_Reports;
-----------------------
-- Dump_Repositories --
-----------------------
procedure Dump_Repositories is
use Repositories;
All_Repos: constant Repository_Vectors.Vector
:= Extract_All;
I: Repository_Index := 1;
begin
New_Line;
Put_Line ("Repositories");
for Repo of All_Repos loop
New_Line;
Put_Line ("Repository" & Repository_Index'Image (I));
Put_Line (" Format : "
& Repository_Format'Image (Repo.Format));
Put_Line (" Location : " & UBS.To_String (Repo.Location));
Put_Line (" Snapshot : " & UBS.To_String (Repo.Snapshot));
Put_Line (" Cache_State : "
& Repository_Cache_State'Image (Repo.Cache_State));
Put_Line (" Cache_Path : " & UBS.To_String (Repo.Cache_Path));
if Repo.Format = Git then
Put_Line (" Tracking_Branch: "
& UBS.To_String (Repo.Tracking_Branch));
end if;
I := I + 1;
end loop;
end Dump_Repositories;
---------------------
-- Dump_Subsystems --
---------------------
procedure Dump_Subsystems is
use Ada.Containers;
use Registrar.Queries;
use Registrar.Subsystems;
use Registrar.Source_Files;
use Unit_Names;
Subsystems: Subsystem_Sets.Set := All_Subsystems;
begin
for SS of Subsystems loop
New_Line;
Put_Line (SS.Name.To_UTF8_String);
Put_Line (" AURA : " & Boolean'Image (SS.AURA));
Put_Line (" State : " & Subsystem_State'Image (SS.State));
if SS.State = Available and then SS.AURA then
Put_Line ("--- Config ---");
Put_Line (" External_Libraries:");
for Item of SS.Configuration.External_Libraries loop
Put (" " & Ada.Characters.Conversions
.To_String (WWU.To_Wide_Wide_String (Item.Name)));
Put_Line (" => " & UBS.To_String (Item.Value));
end loop;
Put_Line (" Ada_Compiler_Opts");
for Item of SS.Configuration.Ada_Compiler_Opts loop
Put (" " & Ada.Characters.Conversions
.To_String (WWU.To_Wide_Wide_String (Item.Name)));
Put_Line (" => " & UBS.To_String (Item.Value));
end loop;
Put_Line (" C_Compiler_Opts");
for Item of SS.Configuration.C_Compiler_Opts loop
Put (" " & Ada.Characters.Conversions
.To_String (WWU.To_Wide_Wide_String (Item.Name)));
Put_Line (" => " & UBS.To_String (Item.Value));
end loop;
Put_Line (" C_Definitions");
for Item of SS.Configuration.C_Definitions loop
Put (" " & Ada.Characters.Conversions
.To_String (WWU.To_Wide_Wide_String (Item.Name)));
Put_Line (" => " & UBS.To_String (Item.Value));
end loop;
Put_Line (" Codepaths");
for Item of SS.Configuration.Codepaths loop
Put (" " & Ada.Characters.Conversions
.To_String (WWU.To_Wide_Wide_String (Item.Name)));
Put_Line (" => " & UBS.To_String (Item.Value));
end loop;
Put_Line (" Information");
for Item of SS.Configuration.Information loop
Put (" " & Ada.Characters.Conversions
.To_String (WWU.To_Wide_Wide_String (Item.Name)));
Put_Line (" => " & UBS.To_String (Item.Value));
end loop;
end if;
end loop;
end Dump_Subsystems;
------------------------
-- Dump_Library_Units --
------------------------
procedure Dump_Library_Units is
use Ada.Containers;
use Registrar.Queries;
use Registrar.Library_Units;
use Registrar.Source_Files;
use Unit_Names;
Units: Library_Unit_Sets.Set := All_Library_Units;
begin
for Unit of Units loop
New_Line;
Put_Line (Unit.Name.To_UTF8_String);
Put_Line (" Subsystem : " & Unit.Name.Subsystem_Name.To_UTF8_String);
Put_Line (" State : " & Library_Unit_State'Image (Unit.State));
Put_Line (" Kind : " & Library_Unit_Kind'Image (Unit.Kind));
Put_Line (" Have Spec? : " & Boolean'Image (Unit.Spec_File /= null));
Put_Line (" Have Body? : " & Boolean'Image (Unit.Body_File /= null));
Put_Line (" Subunits : " & Count_Type'Image (Unit.Subunit_Bodies.Length));
Put_Line (" Spec Hash : " & Unit.Specification_Hash.To_String);
Put_Line (" Impl Hash : " & Unit.Implementation_Hash.To_String);
Put_Line (" Spec_File : " & (if Unit.Spec_File /= null then Unit.Spec_File.Hash.To_String
else ""));
Put_Line (" Body_File : " & (if Unit.Body_File /= null then Unit.Body_File.Hash.To_String
else ""));
end loop;
end Dump_Library_Units;
--
-- Trackers
--
Process_Title_Style: constant Text_Style := Blue_FG + Bold;
Progress_Bar_Template: constant CLI.Widgets.Progress_Bars.Progress_Bar
:= (Delimited => True,
Width => 10,
Fill_Char => ' ',
Fill_Style => White_BG,
Empty_Char => ' ',
Empty_Style => Neutral,
others => <>);
---------------------------
-- Internal_Prep_Tracker --
---------------------------
procedure Internal_Prep_Tracker
(Process_Title: in String;
Bar : in out CLI.Widgets.Progress_Bars.Progress_Bar;
Spinner_Only : in Boolean)
is
use CLI.Widgets.Progress_Bars;
begin
Clear_Line;
Put_Exec_Tag;
Put (' ');
Put (Message => Process_Title, Style => Process_Title_Style);
Put (' ');
if not Spinner_Only then
Render (Bar);
end if;
end Internal_Prep_Tracker;
------------------
-- Prep_Tracker --
------------------
procedure Prep_Tracker (Process_Title: in String;
Spinner_Only : in Boolean := False) is
use CLI.Widgets.Progress_Bars;
Zeroed_Bar: Progress_Bar := Progress_Bar_Template;
begin
if not Output_Is_Terminal then return; end if;
Internal_Prep_Tracker (Process_Title => Process_Title,
Bar => Zeroed_Bar,
Spinner_Only => Spinner_Only);
end Prep_Tracker;
------------------
-- Wait_Tracker --
------------------
procedure Wait_Tracker (Process_Title : in String;
Tracker : in out Progress.Progress_Tracker;
Failures : out Boolean;
Timedout : out Boolean;
Spinner_Only : in Boolean := False;
Process_Timeout: in Duration := 60.0)
is
use CLI.Widgets.Progress_Bars;
use CLI.Widgets.Spinners;
use type Ada.Calendar.Time;
use type Ada.Containers.Count_Type;
function Trim (Source: in String;
Side: in Ada.Strings.Trim_End := Ada.Strings.Both)
return String
renames Ada.Strings.Fixed.Trim;
Successful_Items_Style: Text_Style renames Neutral;
Failed_Items_Style : Text_Style renames Red_FG;
Total_Items_Style : Text_Style renames Neutral;
Timeout_Label_Style : constant Text_Style := Yellow_BG + Black_FG;
Bar : Progress_Bar := Progress_Bar_Template;
Spin : Spinner;
After_Bar: Positive;
Is_Term : constant Boolean := Output_Is_Terminal;
Deadline: constant Ada.Calendar.Time
:= Ada.Calendar.Clock + Process_Timeout;
Total_Items : Natural;
Completed_Items: Natural;
Failed_Items : Natural;
procedure Get_Totals is
begin
Total_Items := Tracker.Total_Items;
Completed_Items := Tracker.Completed_Items;
Failed_Items := Tracker.Failed_Items;
end Get_Totals;
procedure Prep_Output is
begin
Internal_Prep_Tracker (Process_Title, Bar, Spinner_Only);
Put (' ');
Render (Spin);
Put (' ');
After_Bar := Current_Column;
end Prep_Output;
procedure Term_Update is
begin
Get_Totals;
if not Spinner_Only then
Bar.Percent := Percentage (Tracker.Percent_Complete);
if not Failures and then Failed_Items > 0 then
Failures := True;
Set_Column (1);
Put_Fail_Tag;
end if;
Update (Bar);
Set_Column (After_Bar);
Clear_To_End;
Put (Message => Trim (Natural'Image (Completed_Items)),
Style => Successful_Items_Style);
if Failures then
Put (Message => " (+" & Trim (Natural'Image (Failed_Items))
& " Failed)",
Style => Failed_Items_Style);
end if;
Put (" of ");
Put (Message => Trim (Natural'Image (Total_Items)),
Style => Total_Items_Style);
Put (" work orders.");
if Timedout then
Put (Message => " * TIMEOUT *",
Style => Timeout_Label_Style);
end if;
end if;
Update (Spin);
end Term_Update;
begin
Failures := False;
Timedout := False;
if Is_Term then
Prep_Output;
null;
else
New_Line;
Put_Exec_Tag;
Put (' ' & Process_Title & " ...");
end if;
if Is_Term then
loop
Term_Update;
exit when Tracker.Is_Complete;
if Ada.Calendar.Clock > Deadline then
Set_Column (1);
Put_Fail_Tag;
Timedout := True;
Term_Update;
return;
else
select
Tracker.Wait_Complete;
or
delay Progress_Poll_Rate;
end select;
end if;
while User_Notices.Available_Notices > 0 loop
declare
use User_Notices;
Notice: constant Notice_Lines := Retrieve_Notice;
begin
Clear_Line;
Put_Info_Tag;
Put (' ');
for Line of Notice loop
Put_Line (UBS.To_String (Line));
Put (" ");
end loop;
end;
Clear_Line;
Prep_Output;
end loop;
if User_Queries.Query_Manager.Query_Pending then
Clear_Line;
User_Queries.Query_Manager.Take_Query (Query_Driver'Access);
Prep_Output;
end if;
end loop;
else
select
Tracker.Wait_Complete;
or
delay Process_Timeout;
Timedout := True;
end select;
Get_Totals;
Failures := (Failed_Items > 0);
New_Line;
if Timedout then
Put_Fail_Tag;
Put (" * TIMEOUT *");
elsif Failures then
Put_Fail_Tag;
else
Put_OK_Tag;
end if;
Put (Natural'Image (Completed_Items));
if Failures then
Put (" (+" & Trim (Natural'Image (Failed_Items)) & " Failed)");
end if;
Put_Line (" of"
& Natural'Image (Total_Items)
& " work orders completed.");
end if;
end Wait_Tracker;
---------------------------
-- Wait_Tracker_Or_Abort --
---------------------------
procedure Wait_Tracker_Or_Abort
(Process_Title : in String;
Tracker : in out Progress.Progress_Tracker;
Spinner_Only : in Boolean := False;
Process_Timeout: in Duration := 20.0)
is
Failures, Timedout: Boolean := False;
begin
Wait_Tracker (Process_Title => Process_Title,
Tracker => Tracker,
Failures => Failures,
Timedout => Timedout,
Process_Timeout => Process_Timeout);
if Failures or else Timedout then
New_Line;
raise Scheduling.Process_Failed;
end if;
end Wait_Tracker_Or_Abort;
--------------
-- Put_Info --
--------------
procedure Put_Info (Message: String) is
begin
case Output_Is_Terminal is
when True => Put (Message);
when False => Put_Line (Message);
end case;
end;
end UI_Primitives;
|
programs/oeis/153/A153786.asm | karttu/loda | 1 | 81403 | <reponame>karttu/loda<filename>programs/oeis/153/A153786.asm
; A153786: 6 times heptagonal numbers: a(n) = 3*n*(5*n-3).
; 0,6,42,108,204,330,486,672,888,1134,1410,1716,2052,2418,2814,3240,3696,4182,4698,5244,5820,6426,7062,7728,8424,9150,9906,10692,11508,12354,13230,14136,15072,16038,17034,18060,19116,20202,21318,22464,23640,24846,26082,27348,28644,29970,31326,32712,34128,35574,37050,38556,40092,41658,43254,44880,46536,48222,49938,51684,53460,55266,57102,58968,60864,62790,64746,66732,68748,70794,72870,74976,77112,79278,81474,83700,85956,88242,90558,92904,95280,97686,100122,102588,105084,107610,110166,112752,115368,118014,120690,123396,126132,128898,131694,134520,137376,140262,143178,146124,149100,152106,155142,158208,161304,164430,167586,170772,173988,177234,180510,183816,187152,190518,193914,197340,200796,204282,207798,211344,214920,218526,222162,225828,229524,233250,237006,240792,244608,248454,252330,256236,260172,264138,268134,272160,276216,280302,284418,288564,292740,296946,301182,305448,309744,314070,318426,322812,327228,331674,336150,340656,345192,349758,354354,358980,363636,368322,373038,377784,382560,387366,392202,397068,401964,406890,411846,416832,421848,426894,431970,437076,442212,447378,452574,457800,463056,468342,473658,479004,484380,489786,495222,500688,506184,511710,517266,522852,528468,534114,539790,545496,551232,556998,562794,568620,574476,580362,586278,592224,598200,604206,610242,616308,622404,628530,634686,640872,647088,653334,659610,665916,672252,678618,685014,691440,697896,704382,710898,717444,724020,730626,737262,743928,750624,757350,764106,770892,777708,784554,791430,798336,805272,812238,819234,826260,833316,840402,847518,854664,861840,869046,876282,883548,890844,898170,905526,912912,920328,927774
mov $1,$0
mul $0,15
sub $0,9
mul $1,$0
|
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sdcc_iy/tshc_cls_attr_fastcall.asm | jpoikela/z88dk | 640 | 25675 | <filename>libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sdcc_iy/tshc_cls_attr_fastcall.asm<gh_stars>100-1000
; void tshc_cls_attr(unsigned char attr)
SECTION code_clib
SECTION code_arch
PUBLIC _tshc_cls_attr_fastcall
EXTERN asm_tshc_cls_attr
defc _tshc_cls_attr_fastcall = asm_tshc_cls_attr
|
oeis/287/A287726.asm | neoneye/loda-programs | 11 | 8993 | ; A287726: Positions of 0 in A287725; complement of A287727.
; Submitted by <NAME>(w4)
; 2,7,11,16,21,25,30,34,39,44,48,53,58,62,67,71,76,81,85,90,94,99,104,108,113,118,122,127,131,136,141,145,150,155,159,164,168,173,178,182,187,191,196,201,205,210,215,219,224,228,233,238,242,247,251,256,261,265,270,275,279,284,288,293,298,302,307,312,316,321,325,330,335,339,344,348,353,358,362,367,372,376,381,385,390,395,399,404,409,413,418,422,427,432,436,441,445,450,455,459
mov $1,$0
mul $0,6
seq $1,283233 ; 2*A000201.
add $1,$0
mov $0,$1
div $0,2
add $0,1
|
programs/oeis/096/A096054.asm | neoneye/loda | 22 | 103215 | ; A096054: a(n) = (36^n/6)*B(2n,1/6)/B(2n) where B(n,x) is the n-th Bernoulli polynomial and B(k)=B(k,0) is the k-th Bernoulli number.
; 1,91,3751,138811,5028751,181308931,6529545751,235085301451,8463265086751,304679288612371,10968470088963751,394865064451017691,14215143591303768751,511745180725868773411,18422826609078989373751,663221758853362301815531,23875983327059668074930751,859535399849195505784960051,30943274395246464616850871751,1113957878234951561135183102971,40102483616512965704228440908751,1443689410194959150838500050420291,51972818767022960899386565554033751
mul $0,2
add $0,1
seq $0,59387 ; Jordan function J_n(6) (see A059379).
div $0,2
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sccz80/zx_px2bitmask.asm | jpoikela/z88dk | 38 | 8794 |
; uchar zx_px2bitmask(uchar x)
SECTION code_clib
SECTION code_arch
PUBLIC zx_px2bitmask
EXTERN asm_zx_px2bitmask
defc zx_px2bitmask = asm_zx_px2bitmask
|
libsrc/_DEVELOPMENT/adt/w_vector/c/sdcc_iy/w_vector_erase_callee.asm | jpoikela/z88dk | 640 | 85936 | <reponame>jpoikela/z88dk
; size_t w_vector_erase_callee(w_vector_t *v, size_t idx)
SECTION code_clib
SECTION code_adt_w_vector
PUBLIC _w_vector_erase_callee
EXTERN _w_array_erase_callee
defc _w_vector_erase_callee = _w_array_erase_callee
|
src/ch5/eatsyscall.asm | Moguf/AsmApp | 0 | 240174 | SECTION .data
EatMsg: db "Eat at Joe's",10
EatLen: equ $-EatMsg
SECTION .bss
SECTION .text
global _start
_start:
nop
mov eax,4
mov ebx,1
mov ecx,EatMsg
mov edx,EatLen
int 80H
mov eax,1
mov ebx,0
int 80H
|
projects/batfish/src/main/antlr4/org/batfish/grammar/f5_bigip_imish/F5BigipImish_route_map.g4 | loftwah/batfish | 0 | 7181 | <reponame>loftwah/batfish<gh_stars>0
parser grammar F5BigipImish_route_map;
import F5BigipImish_common;
options {
tokenVocab = F5BigipImishLexer;
}
rm_match
:
MATCH rmm_ip_address
;
rmm_ip_address
:
IP ADDRESS name = word NEWLINE
;
rm_set
:
SET rms_community
;
rms_community
:
COMMUNITY communities += standard_community+ NEWLINE
;
standard_community
:
STANDARD_COMMUNITY
;
s_route_map
:
ROUTE_MAP name = word action = line_action num = uint32 NEWLINE
(
rm_match
| rm_set
)*
; |
libsrc/stdio/get_16bit_ap_parameter.asm | ahjelm/z88dk | 640 | 94002 | <filename>libsrc/stdio/get_16bit_ap_parameter.asm
MODULE get_16bit_ap_parameter
SECTION code_clib
PUBLIC get_16bit_ap_parameter
EXTERN __printf_issccz80
; Change the arguments pointer, the delta is always 2, but is it +/-ve?
; Entry: de = ap
; Return: de = new ap
; hl = value
; Uses: ix
get_16bit_ap_parameter:
IF __CPU_GBZ80__
ld a,(de)
ld l,a
inc de
ld a,(de)
ld h,a
ELSE
ex de,hl
ld e,(hl)
inc hl
ld d,(hl)
ex de,hl ;de=ap+1 hl=to print
ENDIF
IF __CPU_INTEL__ | __CPU_GBZ80__
call __printf_issccz80
ELSE
bit 0,(ix+6) ;sccz80 flag
ENDIF
jr nz,change_ap_decrement
inc de
ret
change_ap_decrement:
dec de
dec de
dec de
ret
|
oeis/165/A165849.asm | neoneye/loda-programs | 11 | 245533 | ; A165849: Totally multiplicative sequence with a(p) = 28.
; Submitted by <NAME>
; 1,28,28,784,28,784,28,21952,784,784,28,21952,28,784,784,614656,28,21952,28,21952,784,784,28,614656,784,784,21952,21952,28,21952,28,17210368,784,784,784,614656,28,784,784,614656,28,21952,28,21952,21952,784,28,17210368,784,21952,784,21952,28,614656,784,614656,784,784,28,614656,28,784,21952,481890304,784,21952,28,21952,784,21952,28,17210368,28,784,21952,21952,784,21952,28,17210368,614656,784,28,614656,784,784,784,614656,28,614656,784,21952,784,784,784,481890304,28,21952,21952,614656
seq $0,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).
mov $2,28
pow $2,$0
mov $0,$2
|
test/Succeed/Issue3361.agda | cruhland/agda | 1,989 | 13710 | <reponame>cruhland/agda
-- Andreas, 2018-11-03, issue #3361
--
-- Empty variable blocks should trigger warning rather than parse error.
variable
-- Expected warning:
-- Empty variable block.
|
oeis/142/A142891.asm | neoneye/loda-programs | 11 | 245396 | <gh_stars>10-100
; A142891: Primes congruent to 4 mod 63.
; Submitted by <NAME>
; 67,193,571,823,1201,1327,1453,1579,1831,2083,2713,3217,3343,3469,3847,4099,4603,4729,5107,5233,5737,6367,6619,6871,6997,7753,7879,8761,8887,9013,9391,9643,9769,10273,10399,10651,10903,12037,12163,12289,12541,12919,13171,13297,14431,14557,14683,15061,15187,15313,15439,15817,16069,16447,16573,16699,17077,17203,17581,17707,17959,18211,19219,19471,19597,20101,20353,20479,20731,20857,20983,21487,21613,21739,21991,22369,22621,23251,23629,24007,24133,24763,24889,25771,27031,27283,27409,28669,28921
mov $1,12
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,21
sub $2,2
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,42
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,83
|
alloy4fun_models/trainstlt/models/0/WeJzzmY2kmPhAYTJL.als | Kaixi26/org.alloytools.alloy | 0 | 4683 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idWeJzzmY2kmPhAYTJL_prop1 {
(all s:Signal | s not in Green) until (some s:Signal | s in Green)
}
pred __repair { idWeJzzmY2kmPhAYTJL_prop1 }
check __repair { idWeJzzmY2kmPhAYTJL_prop1 <=> prop1o } |
WEEK-9/4.asm | ShruKin/Microprocessor-and-Microcontroller-Lab | 0 | 179209 | LXI H,8000
MOV C,M
INX H
MOV B,M
MOV A,B
LOOP: INX H
CMP M
JZ FOUND
DCR C
JNZ LOOP
LXI H,FFFF
SHLD 9000
JMP DONE
FOUND: SHLD 9000
DONE: HLT
|
assembly/loop.asm | JDaniloC/Projeto-IF674-2021 | 0 | 169748 | <gh_stars>0
# int a = ? [valor entre 0,100]
# int b = ? [valor entre 0,100]
# if (a == 0) {
# STORE b;
# } else {
# while (b != 0) {
# if (a > b) {
# a = a - b
# } else {
# b = b - a
# }
# }
# STORE a;
# }
.data
askFirstTxt: .asciiz "Digite o primeiro valor: "
askSecondTxt: .asciiz "Digite o segundo valor: "
storedValue: .word 0
.text
jal askFirstInput
move $s0, $v0
jal askSecondInput
move $s1, $v0
beq $s0, $zero, aIsZero
bne $s1, $zero, bIsNotZero
sw $s0, storedValue
j end
aIsZero:
sw $s1, storedValue
j end
bIsNotZero:
sle $t0, $s0, $s1
beq $t0, $zero, decreaseA
j decreaseB
decreaseA:
sub $s0, $s0, $s1
bne $s1, $zero, bIsNotZero
j storeA
decreaseB:
sub $s1, $s1, $s0
bne $s1, $zero, bIsNotZero
storeA:
sw $s0, storedValue
j end
askFirstInput:
li $v0, 4
la $a0, askFirstTxt
syscall
j askValue
askSecondInput:
li $v0, 4
la $a0, askSecondTxt
syscall
askValue:
li $v0, 5
syscall
jr $ra
end:
li $v0, 10
syscall
|
work/ff3_field_window.h.asm | ypyp-pprn-mnmn/ff3_hack | 4 | 174878 | ;; encoding: utf-8
;; ff3_field_window.h.asm
;;
;; description:
;; constant declarations for 'field.window' modules
;;
;; version:
;; 0.1.0
;==================================================================================================
;; # of frames waited before text lines scolled up.
;; referred by `field.stream_string_in_window`.
DEFINE_DEFAULT FIELD_WINDOW_SCROLL_FRAMES, $01 ;;originally 1
;; job availability flags.
;; referred by `field.get_max_available_job_id`.
;;all the value below are the same as the ogirinal.
DEFINE_DEFAULT JOB_AVAILABILITY.NO_CRYSTAL, $00
DEFINE_DEFAULT JOB_AVAILABILITY.WIND, $05
DEFINE_DEFAULT JOB_AVAILABILITY.FIRE, $09
DEFINE_DEFAULT JOB_AVAILABILITY.WATER, $10
DEFINE_DEFAULT JOB_AVAILABILITY.EARTH, $13
DEFINE_DEFAULT JOB_AVAILABILITY.EUREKA, $30
;; maximum level of player characters.
;; referred by:
;; 'textd_x.on_code_10','textd_x.on_code_11','textd_x.on_code_12','textd_x.on_code_13'
DEFINE_DEFAULT MAX_PLAYER_LV, 99
;; stomach window sizing.
DEFINE_DEFAULT STOMACH_LEFT_COLUMN_NAME, $01 ;;original = $01
DEFINE_DEFAULT STOMACH_RIGHT_COLUMN_NAME, $0f ;;original = $0f
DEFINE_DEFAULT STOMACH_LEFT_COLUMN_AMOUNT, $0b ;;original = $0a
DEFINE_DEFAULT STOMACH_RIGHT_COLUMN_AMOUNT, $19 ;;original = $18
;; ------------------------------------------------------------------------------------------------
;; offerred feature flags.
;_FEATURE_DEFERRED_RENDERING
;; ------------------------------------------------------------------------------------------------
;; shared variables.
DECLARE_WINDOW_VARIABLES .macro
.p_text_line = $1c
.menu_item_continue_building = $1e
.lines_drawn = $1f
.a_button_down = $24
.b_button_down = $25
.in_menu_mode = $37
.window_left = $38
.window_top = $39
.offset_x = $3a
.offset_y = $3b
.window_width = $3c
.window_height = $3d
.p_text = $3e
;; text driver variables.
.output_index = $90
.width_in_1st = $91
.text_id = $92
.text_bank = $93
.p_text_table = $94 ;;pointer to pointer table, which stores offset from $30000(18:8000) to the text
;; menu control variables.
.window_type = $96
.cursor_origin_x = $97 ;; usually calculated as: window.left - 1 (value including borders)
.cursor_origin_y = $98 ;; usually calculated as: window.top + 2 (value incluing borders)
;;
.tile_buffer_upper = $0780
.tile_buffer_lower = $07a0
.endm
.ifdef _FEATURE_DEFERRED_RENDERING
;; ------------------------------------------------------------------------------------------------
;; initialization flags.
render_x.NO_BORDERS = $80
render_x.PENDING_INIT = $40
render_x.RENDER_RUNNING = $20 ;;or 'completed'
render_x.SKIP_CONTENTS = $08
render_x.NEED_ATTRIBUTES = $04
render_x.NEED_TOP_BORDER = $02
render_x.NEED_BOTTOM_BORDER = $01
;; capacity limits.
;render_x.BUFFER_CAPACITY = $c0
;render_x.BUFFER_CAPACITY = $80
;render_x.ADDR_CAPACITY = $0c
;; the fuel denotes available cpu cycles for rendering,
;; in units of what required to put 1 byte onto vram (= 8 cpu cycle in current impl, thus shifted right by 3.)
;; since rendering occurred in NMI, there also need bookkeeping ops so that
;; approximately the cycles below will be available for the rendering,
;; at the begininng of each NMI.
;; 18 scanlines x 113.6 cpu cycles (= 341 ppu cycles)
;render_x.FULL_OF_FUEL = (2044 >> 3) ;;2044 = 18 * 113.6, 2158 = 19 * 113.6.
render_x.FULL_OF_FUEL = ((2158 * 8 / 9) >> 3) ;;2044 = 18 * 113.6, 2158 = 19 * 113.6.
;render_x.FUEL_FOR_OVERHEAD = ((65 >> 3) + 1)
render_x.FUEL_FOR_OVERHEAD = (((65 * 8 / 9) >> 3) + 1)
render_x.FUEL_LOOP_OVERHEAD = ((11 >> 3) + 1)
render_x.UNROLL_DEPTH = 3
;; ------------------------------------------------------------------------------------------------
;render_x.nmi.LOCALS_COUNT = $1
;render_x.nmi.STATE_VARIABLES_BASE = $c2
;render_x.nmi.STATE_VARIABLES_END = $d0
;; ------------------------------------------------------------------------------------------------
;; state controls
render_x.q.init_flags = $c0 ;;this address isn't touched by floor's logic
render_x.q.fuel = $c1 ;;if exhausted, then flush queue (await completion of pending rendering)
render_x.q.available_bytes = $c2
render_x.q.done_attrs = $c4 ;;2byte. 1bit per 16x16 row. lower first.
;; pre-calculated internal parameters.
render_x.q.strides = $c6
;; buffer and addresses are shared among for name table and attributes.
render_x.q.buffer = $7310 ;max 0xf0 bytes = 240 tiles.
render_x.temp_buffer = $07d0
.endif ;;_FEATURE_DEFERRED_RENDERING
|
IntelFspPkg/Library/SecFspSecPlatformLibNull/Ia32/SecCarInit.asm | DK519/DK_Project | 1 | 26319 | ;; @file
; SEC CAR function
;
; Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;;
;
; Define assembler characteristics
;
.586p
.xmm
.model flat, c
RET_ESI MACRO
movd esi, mm7 ; move ReturnAddress from MM7 to ESI
jmp esi
ENDM
.code
;-----------------------------------------------------------------------------
;
; Section: SecCarInit
;
; Description: This function initializes the Cache for Data, Stack, and Code
;
;-----------------------------------------------------------------------------
SecCarInit PROC NEAR PUBLIC
;
; Set up CAR
;
xor eax, eax
SecCarInitExit:
RET_ESI
SecCarInit ENDP
END
|
red_teaming_macos/download_exfiltrator/exfil_automater.scpt | CptOfEvilMinions/BlogProjects | 16 | 297 | <reponame>CptOfEvilMinions/BlogProjects
get items for newItems added to Finder
-- Get the name of the attached folder
tell application "Finder"
-- Define file extensions
set file_extensions to {"word doc", "powerpoint", "spreadsheet"}
-- Set the url of the server
set theURL to "http://<server_ip_addr>:<server_port>/"
-- Iterate over all new files in directory
repeat with anItem in theNewItems
-- Convert file obj to stirng
set theFilename to anItem as string
-- Convert macOS filepoath to POSIX style
set theFilenamePOSIX to POSIX path of theFilename
-- Iterate over all file extensions
repeat with file_ext in file_extensions
-- extract the file extension from file obj
set temp to text -3 thru -1 of theFilenamePOSIX
-- Check if there is a match for file extensions
if ((temp as string) is equal to file_ext as string) then
-- POST new file to server
do shell script "curl -X POST --upload-file " & quoted form of theFilenamePOSIX & " " & quoted form of theURL
end if
end repeat
end repeat
end tell
end adding folder items to |
Trash/test/Literals.g4 | studentmain/AntlrVSIX | 67 | 1246 | grammar Literals;
p : Hello World ;
Hello : 'hello';
World : 'world';
Foo : 'w_kdf';
WS : (' ' | '\n' | '\r')+ -> skip;
|
elan520-cpu_registers.ads | Jellix/elan520 | 0 | 371 | <filename>elan520-cpu_registers.ads
------------------------------------------------------------------------
-- Copyright (C) 2004-2020 by <<EMAIL>> --
-- --
-- This work is free. You can redistribute it and/or modify it under --
-- the terms of the Do What The Fuck You Want To Public License, --
-- Version 2, as published by Sam Hocevar. See the LICENSE file for --
-- more details. --
------------------------------------------------------------------------
pragma License (Unrestricted);
------------------------------------------------------------------------
-- AMD Élan(tm) SC 520 embedded microprocessor --
-- MMCR -> CPU Registers --
-- --
-- reference: Register Set Manual, Chapter 4 --
------------------------------------------------------------------------
package Elan520.CPU_Registers is
---------------------------------------------------------------------
-- Elan(tm) SC520 Microcontroller Revision Id (REVID) --
-- Memory Mapped, Read only --
-- MMCR Offset 00h --
---------------------------------------------------------------------
---------------------------------------------------------------------
-- sub types for Revision_Id
type CPU_Id is range 0 .. 2**8 - 1;
type Stepping is range 0 .. 2**4 - 1;
-- the only known constant so far, anything else is an unknown
-- processor type, check out http://www.amd.com for further types
PRODUCT_ID_ELAN_520 : constant CPU_Id := 2#0000_0000#;
---------------------------------------------------------------------
-- Revision ID at MMCR offset 16#00#
---------------------------------------------------------------------
MMCR_OFFSET_REVISION_ID : constant := 16#00#;
REVISION_ID_SIZE : constant := 16;
type Revision_Id is
record
Minor_Step : Stepping;
Major_Step : Stepping;
Product_Id : CPU_Id;
end record;
for Revision_Id use
record
Minor_Step at 0 range 0 .. 3;
Major_Step at 0 range 4 .. 7;
Product_Id at 0 range 8 .. 15;
end record;
for Revision_Id'Size use REVISION_ID_SIZE;
---------------------------------------------------------------------
-- Am5x86(r) CPU Control (CPUCTL) --
-- Memory-Mapped, Read/Write --
-- MMCR Offset 02h --
---------------------------------------------------------------------
---------------------------------------------------------------------
-- sub types for CPU control register
type CPU_Clock_Speed is (MHz_100, MHz_133);
for CPU_Clock_Speed use (MHz_100 => 2#01#, MHz_133 => 2#10#);
for CPU_Clock_Speed'Size use 2;
DEFAULT_CPU_CLOCK_SPEED : constant CPU_Clock_Speed := MHz_100;
type Cache_Write_Mode is (Write_Back, Write_Through);
for Cache_Write_Mode use (Write_Back => 0,
Write_Through => 1);
for Cache_Write_Mode'Size use 1;
DEFAULT_CACHE_WRITE_MODE :
constant Cache_Write_Mode := Write_Through;
---------------------------------------------------------------------
-- CPU Control at MMCR offset 16#02#
---------------------------------------------------------------------
MMCR_OFFSET_CPU_CONTROL : constant := 16#02#;
CPU_CONTROL_SIZE : constant := 8;
type CPU_Control is
record
Cpu_Clk_Spd : CPU_Clock_Speed;
Cache_Wr_Mode : Cache_Write_Mode;
end record;
for CPU_Control use
record
CPU_Clk_Spd at 0 range 0 .. 1;
Cache_Wr_Mode at 0 range 4 .. 4;
end record;
for CPU_Control'Size use CPU_CONTROL_SIZE;
end Elan520.CPU_Registers;
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2043.asm | ljhsiun2/medusa | 9 | 100368 | .global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r15
push %r9
push %rax
push %rdx
// Store
lea addresses_UC+0x5980, %r10
nop
cmp %r15, %r15
mov $0x5152535455565758, %r13
movq %r13, %xmm2
vmovups %ymm2, (%r10)
nop
nop
cmp $58826, %r9
// Faulty Load
lea addresses_normal+0xdb00, %r13
nop
sub $44505, %rax
mov (%r13), %edx
lea oracles, %rax
and $0xff, %rdx
shlq $12, %rdx
mov (%rax,%rdx,1), %rdx
pop %rdx
pop %rax
pop %r9
pop %r15
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
_inc/Nemesis Decompression.asm | kodishmediacenter/msu-md-sonic | 9 | 3568 | <gh_stars>1-10
; ---------------------------------------------------------------------------
; Nemesis decompression subroutine, decompresses art directly to VRAM
; Inputs:
; a0 = art address
; For format explanation see http://info.sonicretro.org/Nemesis_compression
; ---------------------------------------------------------------------------
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; Nemesis decompression to VRAM
NemDec:
movem.l d0-a1/a3-a5,-(sp)
lea (NemPCD_WriteRowToVDP).l,a3 ; write all data to the same location
lea (vdp_data_port).l,a4 ; specifically, to the VDP data port
bra.s NemDecMain
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; Nemesis decompression subroutine, decompresses art to RAM
; Inputs:
; a0 = art address
; a4 = destination RAM address
NemDecToRAM:
movem.l d0-a1/a3-a5,-(sp)
lea (NemPCD_WriteRowToRAM).l,a3 ; advance to the next location after each write
NemDecMain:
lea (v_ngfx_buffer).w,a1
move.w (a0)+,d2 ; get number of patterns
lsl.w #1,d2
bcc.s loc_146A ; branch if the sign bit isn't set
adda.w #NemPCD_WriteRowToVDP_XOR-NemPCD_WriteRowToVDP,a3 ; otherwise the file uses XOR mode
loc_146A:
lsl.w #2,d2 ; get number of 8-pixel rows in the uncompressed data
movea.w d2,a5 ; and store it in a5 because there aren't any spare data registers
moveq #8,d3 ; 8 pixels in a pattern row
moveq #0,d2
moveq #0,d4
bsr.w NemDec_BuildCodeTable
move.b (a0)+,d5 ; get first byte of compressed data
asl.w #8,d5 ; shift up by a byte
move.b (a0)+,d5 ; get second byte of compressed data
move.w #$10,d6 ; set initial shift value
bsr.s NemDec_ProcessCompressedData
movem.l (sp)+,d0-a1/a3-a5
rts
; End of function NemDec
; ---------------------------------------------------------------------------
; Part of the Nemesis decompressor, processes the actual compressed data
; ---------------------------------------------------------------------------
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
NemDec_ProcessCompressedData:
move.w d6,d7
subq.w #8,d7 ; get shift value
move.w d5,d1
lsr.w d7,d1 ; shift so that high bit of the code is in bit position 7
cmpi.b #%11111100,d1 ; are the high 6 bits set?
bcc.s NemPCD_InlineData ; if they are, it signifies inline data
andi.w #$FF,d1
add.w d1,d1
move.b (a1,d1.w),d0 ; get the length of the code in bits
ext.w d0
sub.w d0,d6 ; subtract from shift value so that the next code is read next time around
cmpi.w #9,d6 ; does a new byte need to be read?
bcc.s loc_14B2 ; if not, branch
addq.w #8,d6
asl.w #8,d5
move.b (a0)+,d5 ; read next byte
loc_14B2:
move.b 1(a1,d1.w),d1
move.w d1,d0
andi.w #$F,d1 ; get palette index for pixel
andi.w #$F0,d0
NemPCD_ProcessCompressedData:
lsr.w #4,d0 ; get repeat count
NemPCD_WritePixel:
lsl.l #4,d4 ; shift up by a nybble
or.b d1,d4 ; write pixel
subq.w #1,d3 ; has an entire 8-pixel row been written?
bne.s NemPCD_WritePixel_Loop ; if not, loop
jmp (a3) ; otherwise, write the row to its destination, by doing a dynamic jump to NemPCD_WriteRowToVDP, NemDec_WriteAndAdvance, NemPCD_WriteRowToVDP_XOR, or NemDec_WriteAndAdvance_XOR
; End of function NemDec_ProcessCompressedData
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
NemPCD_NewRow:
moveq #0,d4 ; reset row
moveq #8,d3 ; reset nybble counter
NemPCD_WritePixel_Loop:
dbf d0,NemPCD_WritePixel
bra.s NemDec_ProcessCompressedData
; ===========================================================================
NemPCD_InlineData:
subq.w #6,d6 ; 6 bits needed to signal inline data
cmpi.w #9,d6
bcc.s loc_14E4
addq.w #8,d6
asl.w #8,d5
move.b (a0)+,d5
loc_14E4:
subq.w #7,d6 ; and 7 bits needed for the inline data itself
move.w d5,d1
lsr.w d6,d1 ; shift so that low bit of the code is in bit position 0
move.w d1,d0
andi.w #$F,d1 ; get palette index for pixel
andi.w #$70,d0 ; high nybble is repeat count for pixel
cmpi.w #9,d6
bcc.s NemPCD_ProcessCompressedData
addq.w #8,d6
asl.w #8,d5
move.b (a0)+,d5
bra.s NemPCD_ProcessCompressedData
; End of function NemPCD_NewRow
; ===========================================================================
NemPCD_WriteRowToVDP:
move.l d4,(a4) ; write 8-pixel row
subq.w #1,a5
move.w a5,d4 ; have all the 8-pixel rows been written?
bne.s NemPCD_NewRow ; if not, branch
rts ; otherwise the decompression is finished
; ===========================================================================
NemPCD_WriteRowToVDP_XOR:
eor.l d4,d2 ; XOR the previous row by the current row
move.l d2,(a4) ; and write the result
subq.w #1,a5
move.w a5,d4
bne.s NemPCD_NewRow
rts
; ===========================================================================
NemPCD_WriteRowToRAM:
move.l d4,(a4)+
subq.w #1,a5
move.w a5,d4
bne.s NemPCD_NewRow
rts
; ===========================================================================
NemPCD_WriteRowToRAM_XOR:
eor.l d4,d2
move.l d2,(a4)+
subq.w #1,a5
move.w a5,d4
bne.s NemPCD_NewRow
rts
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; ---------------------------------------------------------------------------
; Part of the Nemesis decompressor, builds the code table (in RAM)
; ---------------------------------------------------------------------------
NemDec_BuildCodeTable:
move.b (a0)+,d0 ; read first byte
NemBCT_ChkEnd:
cmpi.b #$FF,d0 ; has the end of the code table description been reached?
bne.s NemBCT_NewPALIndex ; if not, branch
rts ; otherwise, this subroutine's work is done
; ===========================================================================
NemBCT_NewPALIndex:
move.w d0,d7
NemBCT_Loop:
move.b (a0)+,d0 ; read next byte
cmpi.b #$80,d0 ; sign bit being set signifies a new palette index
bcc.s NemBCT_ChkEnd ; a bmi could have been used instead of a compare and bcc
move.b d0,d1
andi.w #$F,d7 ; get palette index
andi.w #$70,d1 ; get repeat count for palette index
or.w d1,d7 ; combine the two
andi.w #$F,d0 ; get the length of the code in bits
move.b d0,d1
lsl.w #8,d1
or.w d1,d7 ; combine with palette index and repeat count to form code table entry
moveq #8,d1
sub.w d0,d1 ; is the code 8 bits long?
bne.s NemBCT_ShortCode ; if not, a bit of extra processing is needed
move.b (a0)+,d0 ; get code
add.w d0,d0 ; each code gets a word-sized entry in the table
move.w d7,(a1,d0.w) ; store the entry for the code
bra.s NemBCT_Loop ; repeat
; ===========================================================================
; the Nemesis decompressor uses prefix-free codes (no valid code is a prefix of a longer code)
; e.g. if 10 is a valid 2-bit code, 110 is a valid 3-bit code but 100 isn't
; also, when the actual compressed data is processed the high bit of each code is in bit position 7
; so the code needs to be bit-shifted appropriately over here before being used as a code table index
; additionally, the code needs multiple entries in the table because no masking is done during compressed data processing
; so if 11000 is a valid code then all indices of the form 11000XXX need to have the same entry
NemBCT_ShortCode:
move.b (a0)+,d0 ; get code
lsl.w d1,d0 ; get index into code table
add.w d0,d0 ; shift so that high bit is in bit position 7
moveq #1,d5
lsl.w d1,d5
subq.w #1,d5 ; d5 = 2^d1 - 1
NemBCT_ShortCode_Loop:
move.w d7,(a1,d0.w) ; store entry
addq.w #2,d0 ; increment index
dbf d5,NemBCT_ShortCode_Loop ; repeat for required number of entries
bra.s NemBCT_Loop
; End of function NemDec_BuildCodeTable
|
Projetos/F-Assembly/src/nasm/abs.nasm | juanjorgegarcia/Z01 | 0 | 8905 | ; Arquivo: Abs.nasm
; Curso: Elementos de Sistemas
; Criado por: <NAME>
; Data: 27/03/2017
; Copia o valor de RAM[1] para RAM[0] deixando o valor sempre positivo.
leaw $1,%A
movw (%A),%S
leaw $6,%A
jge %S
nop
negw %S
leaw $0,%A
movw %S,(%A)
nop
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1599.asm | ljhsiun2/medusa | 9 | 82936 | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x16f13, %rdi
nop
mfence
mov (%rdi), %r9d
nop
nop
cmp %r8, %r8
lea addresses_WT_ht+0x1b12b, %rbp
nop
xor $17651, %r15
movb (%rbp), %r13b
nop
nop
nop
nop
add $37162, %r9
lea addresses_UC_ht+0xc293, %rsi
lea addresses_D_ht+0x11f73, %rdi
nop
nop
nop
nop
inc %r13
mov $114, %rcx
rep movsw
nop
nop
nop
nop
nop
xor $1053, %rbp
lea addresses_UC_ht+0xe043, %r8
nop
nop
nop
nop
and %rsi, %rsi
mov (%r8), %ebp
nop
nop
dec %rsi
lea addresses_A_ht+0x6f3, %r13
inc %r9
mov $0x6162636465666768, %r15
movq %r15, %xmm1
movups %xmm1, (%r13)
sub $13489, %rdi
lea addresses_A_ht+0xceec, %rcx
nop
cmp $62254, %r13
movb $0x61, (%rcx)
xor $24470, %rcx
lea addresses_normal_ht+0x4813, %rbp
nop
cmp $35332, %r15
mov (%rbp), %r8d
nop
nop
xor %r15, %r15
lea addresses_D_ht+0x1aaf3, %rsi
lea addresses_UC_ht+0x11a13, %rdi
nop
nop
dec %r9
mov $101, %rcx
rep movsw
nop
and $27452, %rsi
lea addresses_UC_ht+0x17b6b, %r8
nop
nop
nop
sub %r15, %r15
movb (%r8), %r9b
sub %rdi, %rdi
lea addresses_normal_ht+0x1840d, %r8
nop
nop
xor %rdi, %rdi
mov $0x6162636465666768, %r9
movq %r9, (%r8)
sub %r15, %r15
lea addresses_normal_ht+0x2813, %rsi
lea addresses_D_ht+0x12f71, %rdi
nop
nop
and $10601, %r8
mov $37, %rcx
rep movsl
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0xb313, %rcx
mfence
mov (%rcx), %r8w
and %rbp, %rbp
lea addresses_A_ht+0x6513, %rsi
lea addresses_WC_ht+0xb713, %rdi
nop
nop
nop
nop
nop
dec %r8
mov $47, %rcx
rep movsb
nop
nop
sub $32467, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r8
push %r9
push %rax
push %rbp
push %rcx
// Store
lea addresses_UC+0xd1d3, %rax
nop
add %r8, %r8
movl $0x51525354, (%rax)
nop
nop
cmp $17990, %rbp
// Faulty Load
lea addresses_D+0xd713, %rcx
nop
nop
nop
inc %r10
mov (%rcx), %r9w
lea oracles, %rax
and $0xff, %r9
shlq $12, %r9
mov (%rax,%r9,1), %r9
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 2}}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': True}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': True}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
wordlos.asm | CrociDB/wordlos | 6 | 2906 | %define SCORE_POSITION 2620
%define SCORE_VALUE_POSITION 2634
%define KEYBOARD_ROW_POSITION1 2772 + 160 + 160
%define KEYBOARD_ROW_POSITION2 KEYBOARD_ROW_POSITION1 + 322
%define KEYBOARD_ROW_POSITION3 KEYBOARD_ROW_POSITION2 + 326
%define MESSAGE_POSITION 432
%define MESSAGE_COLOR_ERROR 0x04
%define MESSAGE_COLOR_SUCCESS 0x02
%define STATE_COLOR_EMPTY 0x78
%define STATE_COLOR_NOTINWORD 0x87
%define STATE_COLOR_INWORD 0xE7
%define STATE_COLOR_CORRECT 0x2F
%define KEYBOARD_COLOR_EMPTY 0x0F
%define KEYBOARD_COLOR_NOTINWORD 0x08
%define KEYBOARD_COLOR_INWORD 0x0E
%define KEYBOARD_COLOR_CORRECT 0x02
org 0x0100
; Set 80-25 text mode
mov ax, 0x0002
int 0x10
; disable blinking chars (so we get all 16 background colors)
mov ax, 0x1003
mov bx, 0
int 10h
mov ax, 0xb800 ; Segment for the video data
mov es, ax
cld
;;; GAME FLOW
start:
; Game title
mov ah, 0x0F
mov bp, c_title_string
mov cx, 72
call print_string
start_game:
; 1) reset board
mov bp, game_words
mov cx, 30 ; 6 words with 5 characters
_reset_board:
mov byte [bp], ' '
inc bp
loop _reset_board
; 2) reset letter status
mov bp, game_words_state
mov cx, 30 ; 6 words with 5 characters
_reset_board_state:
mov byte [bp], STATE_COLOR_EMPTY
inc bp
loop _reset_board_state
; 3) reset state
mov al, 0
mov byte [game_state_letter], al
mov byte [game_state_word], al
; 4) reset keyboard states
mov bp, game_keyboard_state
mov cx, 26
_reset_keyboard:
mov byte [bp], KEYBOARD_COLOR_EMPTY
inc bp
loop _reset_keyboard
; 5) randomize a word from the list
mov ah, 0x00 ; BIOS service to get system time
int 0x1a ; AX contains the value
mov bx, word [common_count] ; get the amount of words
mov ax, dx ; Copies the time fetched by interruption
xor dx, dx ; Resets DX because DIV will use DXAX
div bx ; AX = (DXAX) / bx ; DX = remainder
mov ax, dx ; moves the current word index to AX
mov bx, 5
mul bx
add ax, common_word_list
mov [game_selected_word], ax
; 6) copy selected word to the temp variable
main_loop:
call draw_board
call draw_keyboard
; clear message
mov bp, c_message_empty
mov ah, 0x08
mov cx, MESSAGE_POSITION
call print_string
; print score
mov ah, 0x08
mov bp, c_game_score
mov cx, SCORE_POSITION
call print_string
mov ax, [game_score]
mov di, SCORE_VALUE_POSITION
mov byte [general_value], 0x0F
call print_number
; Setting the cursor to the right position
mov cx, [game_state_letter] ; get current state (word:letter)
mov al, 4
mul cl
add al, 31
mov dl, al ; set current column
mov al, 2
mul ch
add al, 4
mov dh, al ; set current line
mov ah, 02h ;Set cursor position function
mov bh, 0 ;Page number
int 10h ;Interrupt call
check_input:
mov ah, 0 ; get keystroke
int 0x16 ; bios service to get input
cmp al, 0x08 ; 0x08 - backspace
je del_letter
cmp al, 0x0d ; 0x0d - Enter
je confirm_word ; for now, just loop
cmp al, 0x1b ; escape key
je exit
; Check if it's within the character range and check case
; A-Z: 0x41-0x5A
; a-z: 0x61-0x7A
cmp al, 0x41
jl check_input ; less than `A`
cmp al, 0x7a
jg check_input ; greater than `z`
cmp al, 0x61
jge add_letter ; it means it's already in range a-z
cmp al, 0x5a
jle lower_add_letter ; it's within A-Z, needs lower case
jmp check_input
lower_add_letter:
add al, 0x20 ; makes it lower case
add_letter:
mov cl, byte [game_state_letter]
cmp cl, 5
je main_loop
push ax
mov ax, [game_state_letter] ; copies the letter and the word
mov byte [game_w], ah
mov byte [game_l], al
xor ax, ax ; resetting AX
mov al, 5 ; 5 letter per word
mov bl, byte [game_w] ; get current word
mul bl ; multiply by the amount of words
add al, byte [game_l] ; adding the current letter
mov bx, game_words ; getting pointer to word list
add ax, bx ; adding pointer to offset
mov bp, ax ; setting to bp
pop ax
mov byte [bp], al
mov al, byte [game_l]
inc al
mov ah, byte [game_w]
mov byte [game_state_letter], al
mov byte [game_state_word], ah
jmp main_loop
del_letter:
mov al, byte [game_state_letter]
cmp al, 0 ; if it's already the first letter, skip
je main_loop
mov ax, [game_state_letter]
mov byte [game_w], ah
mov byte [game_l], al
xor ax, ax ; resetting AX
mov al, 5 ; 5 letter per word
mov bl, byte [game_w] ; get current word
mul bl ; multiply by the amount of words
add al, byte [game_l] ; adding the current letter
mov bx, game_words ; getting pointer to word list
add ax, bx ; adding pointer to offset
dec ax
mov bp, ax ; setting to bp
mov byte [bp], 0x20 ; setting space, "empty letter"
mov al, byte [game_state_letter]
dec al ; go back to the previous position
mov byte [game_state_letter], al
jmp main_loop
confirm_word:
mov al, byte [game_state_letter]
cmp al, 5 ; comparing if it's in the last letter
jne check_input
; 1) compare if it's in the word list
call check_valid_word
cmp ah, 0 ; if ah == 0, then word is valid
jne error_not_in_dictionary
; 2) compare with the selected word and set state
call update_word_state
cmp ah, 1 ; if ah == 1, then player found word
je win_word
; 4) check current game status
mov al, byte [game_state_word]
cmp al, 5 ; comparing if it's in the last word
je lost_word
; 3) increment word
mov al, byte [game_state_word]
inc al
mov byte [game_state_word], al
mov byte [game_state_letter], 0
jmp main_loop
error_not_in_dictionary:
mov bp, c_message_invalid
mov ah, MESSAGE_COLOR_ERROR
call message_state
jmp main_loop
win_word:
call draw_board
call draw_keyboard
; add score
xor ah, ah
mov al, byte [game_state_word] ; get current word level
shl ax, 1
add ax, c_score_board
mov bx, ax ; get address of current score info
mov ax, [game_score]
add ax, [bx]
mov [game_score], ax
; print score
mov di, SCORE_VALUE_POSITION
mov byte [general_value], 0x0F
call print_number
; show current score message
xor ah, ah
mov al, byte [game_state_word] ; get current word level
mov bx, 24 ; 24 chars/bytes per message
mul bx ; multiply the amount of chars by the current level to get right message
add ax, c_message_win ; add the address of the messages
mov bp, ax
mov ah, MESSAGE_COLOR_SUCCESS
call message_state
jmp start_game
lost_word:
call draw_board
call draw_keyboard
mov bp, [game_selected_word]
mov ah, MESSAGE_COLOR_SUCCESS
mov cx, MESSAGE_POSITION + 36
mov bx, 5
call print_string_fixed
mov bp, c_message_lost
mov ah, MESSAGE_COLOR_ERROR
call message_state
jmp start_game
exit:
int 0x20 ; exit
;;; GAME FUNCTIONS
;
; Message state
; This will show a message, then wait for input
; Params: BP - string addr
; AH - message color
;
message_state:
; 1) print message
mov cx, MESSAGE_POSITION
call print_string
; 2) wait for input
mov ah, 0 ; get keystroke
int 0x16 ; bios service to get input
ret
;
; Draws the keyboard with the current state for every letter
;
draw_keyboard:
mov ah, 0
mov al, 10
mov bx, KEYBOARD_ROW_POSITION1
call draw_keyboard_row
mov ah, 10
mov al, 19
mov bx, KEYBOARD_ROW_POSITION2
call draw_keyboard_row
mov ah, 19
mov al, 26
mov bx, KEYBOARD_ROW_POSITION3
call draw_keyboard_row
ret
;
; Draws one row of the keyboard
; Params: AH - range start
; AL - range end
; BX - position
draw_keyboard_row:
mov di, bx ; set the screen position
mov cx, ax ; copy range to CX to do the operations
sub cl, ch ; CL contains the size of the range
xor ch, ch ; now CX should the loop value
mov al, ah ; bring the range start AX
xor ah, ah
mov bp, c_keyboard_rows ; get the address of the string
add bp, ax ; add the char offset
mov bx, game_keyboard_state ; keyboard state
add bx, ax
_dkr_print:
mov ah, byte [bx]
mov al, byte [bp]
stosw
inc bp
inc bx
; add some spaces
mov al, ' '
stosw
mov al, ' '
stosw
loop _dkr_print
ret
; Draws the board with the current game state
; go word by word and print the data
;
draw_board:
mov cx, 6 ; 6 words
_print_word:
call print_word
loop _print_word
ret
;
; Print one word
; Params: cx - current word
;
print_word:
mov bx, cx ; save current word
push cx
mov cx, 5 ; 5 letters
_print_letter:
call print_letter
loop _print_letter
pop cx
ret
;
; Prints one letter
; Params: cx - current letter
; bx - current word
;
print_letter:
mov byte [game_l], cl
mov byte [game_w], bl
push cx ; draw_box function will change CX and BX, so we keep it
push bx
; pointer to the letter in board
; used for both letter data and state
push bx
xor ax, ax ; resetting AX
mov al, 5 ; 5 letter per word
mov bl, byte [game_w] ; get current word
dec bl ; bl -= 1
mul bl ; multiply by the amount of words
add al, byte [game_l] ; adding the current letter
dec al ; al -= 1
mov [game_letter_ptr], ax ; saving it to the pointer variable
mov bx, game_words_state ; getting pointer to the word/letters state
add ax, bx ; adding pointer to offset
mov bp, ax ; setting bp to the pointer
xor ax, ax ; resetting ax
mov ah, byte [bp] ; getting the state data
mov byte [game_letter_selected_color], ah
pop bx
push ax ; pushing the state as a color to the box function
push 0x0103 ; box dimensions
mov ax, 8
mul cx
add ax, 52
push ax
mov [game_pos], ax ; saving current column to be used later
mov ax, 160 * 2
mul bx
add ax, 160 * 2
push ax ; vertical position
add ax, [game_pos] ; adding column to line to use later
add ax, 2 ; ONE character offset, middle of the box
mov [game_pos], ax ; saving current cursor position
call draw_box
add sp, 8 ; returns the stack pointer, same as pop 4 times
; Print current letter
mov ax, [game_letter_ptr]
mov bx, game_words ; getting pointer to word list
add ax, bx ; adding pointer to offset
mov bp, ax ; setting to bp
mov ah, byte [game_letter_selected_color] ; setting the current state color
mov al, byte [bp] ; copying the character on the table to AL
sub al, 0x20
mov di, [game_pos] ; adding the cursor position offset to DI
mov [es:di], ax ; setting the current char in AX to video memory
pop bx
pop cx
ret
;
; Check if the input word is in the list of words
; Return: AH - 0 if word is valid
;
check_valid_word:
mov cx, [word_count] ; copy the amount of words
_check_valid_word_init:
; 1) get pointer to the current word
xor ax, ax ; resetting AX
mov al, 5 ; 5 letter per word
mov bl, byte [game_state_word] ; get current word
mul bl ; multiply by the amount of words
add ax, game_words ; ; adding the offset to the address
mov [general_ptr1], ax ; saving it to the pointer variable
; 2) get pointer to current word in list
mov ax, 5 ; 5 letter per word
mov bx, cx
dec bx
mul bx ; multiply by the amount of words
add ax, word_list ; adding the offset to the address
mov [general_ptr2], ax ; saving it to the pointer variable
; 3) in order to compare letter by letter, you must
push cx
mov cx, 5 ; 5 letters
_check_equal_letter:
mov ax, [general_ptr1] ; copy address of the first pointer
add ax, cx ; adding current letter offset
dec ax
mov bp, ax
xor ax, ax
mov al, byte [bp] ; get letter value
push ax ; store letter from pointer 1
mov ax, [general_ptr2] ; copy address of the second pointer
add ax, cx ; adding current letter offset
dec ax
mov bp, ax
pop ax ; restore previous letter value
mov ah, byte [bp] ; get letter value
cmp ah, al
jne _check_equal_letter_continue
loop _check_equal_letter ; loop letters
; ... if it got here, all words are the same, so it's good
pop cx
mov ah, 0
ret
_check_equal_letter_continue:
pop cx
loop _check_valid_word_init ; loop words
; ... if it got here, there are no similar words
mov ah, 1
ret
;
; Check the status letter by letter
; Return: AH: 0 if ok
; 1 if all right
;
update_word_state:
; copy the currently selected word to temp variable - we will operate on it
push cs
pop es
mov si, [game_selected_word]
lea di, [game_selected_temp_word]
mov cx, 5
rep movsb
; get access to the current word
mov ax, 5 ; 5 letter per word
mov bl, byte [game_state_word] ; get current word
mul bl ; multiply by the amount of words
add ax, game_words ; adding the offset to the address
mov [general_ptr1], ax ; saving it to the pointer variable
; copy currently entered word to temp variabel - we will operate on it
mov si, [general_ptr1]
lea di, [game_state_temp_word]
mov cx, 5
rep movsb
mov ax, 0xb800
mov es, ax
xor ax, ax
mov [general_counter], ax
; get access to the current word's state
mov ax, 5 ; 5 letter per word
mov bl, byte [game_state_word] ; get current word
mul bl ; multiply by the amount of words
add ax, game_words_state ; adding the offset to the address
mov [general_ptr2], ax ; saving it to the pointer variable
; for every letter:
mov cx, 0
; first we check the greens
_green_letter_iteration:
mov [general_value], cx
; 1) check if the same index letter is the same, then green
mov ax, [general_ptr1] ; pointer to the word
add ax, cx ; add letter offset
mov bp, ax
mov ah, byte [bp] ; copy letter to ah
push ax
lea ax, [game_selected_temp_word] ; pointer to the word
add ax, cx ; add letter offset
mov bp, ax
pop ax
mov al, byte [bp]
cmp ah, al ; check if the letters are the same
je _update_set_green
_update_green_loop:
inc cx
cmp cx, 5
jne _green_letter_iteration
; secondly we check the yellows
mov cx, 0
_yellow_letter_iteration:
mov [general_value], cx
lea bx, [game_state_temp_word]
add bx, [general_value]
mov bl, byte [bx]
cmp bl, 0
je _update_yellow_loop
mov cx, 0
_letter_in_word_iteration:
lea ax, [game_selected_temp_word] ; pointer to the entered word
add ax, cx ; add letter offset
mov bp, ax
mov al, byte [bp]
cmp bl, al ; check if the letters are the same
je _update_set_yellow
inc cx
cmp cx, 5
jne _letter_in_word_iteration
mov ax, [general_ptr2] ; pointer to the word
add ax, [general_value] ; add letter offset
mov bp, ax
mov byte [bp], STATE_COLOR_NOTINWORD
; set letter state
mov bx, [general_ptr1] ; pointer to the word
add bx, [general_value] ; add letter offset
mov ah, byte [bx] ; copy the character
mov al, KEYBOARD_COLOR_NOTINWORD
call set_letter_state
_update_yellow_loop:
mov cx, [general_value]
inc cx
cmp cx, 5
jne _yellow_letter_iteration
_return:
mov ax, [general_counter]
cmp ax, 5
je _return_win
mov ah, 0
ret
_return_win:
mov ah, 1
ret
_update_set_yellow:
; set this letter state to yellow
mov ax, [general_ptr2] ; pointer to the word
add ax, [general_value] ; add letter offset
mov bp, ax
mov byte [bp], STATE_COLOR_INWORD ; set 'letter in word' state
_skip_update_set_yellow:
; remove matched letter from the temp word storage
lea bx, [game_selected_temp_word]
add bx, cx
mov byte [bx], 0
lea bx, [game_state_temp_word]
add bx, [general_value]
mov byte [bx], 0
; set letter state
mov bx, [general_ptr1] ; pointer to the word
add bx, [general_value] ; add letter offset
mov ah, byte [bx] ; copy the character
mov al, KEYBOARD_COLOR_INWORD
call set_letter_state
jmp _update_yellow_loop
_update_set_green:
mov ax, [general_counter]
inc ax
mov [general_counter], ax
; set this letter state to green
mov ax, [general_ptr2] ; pointer to the word
add ax, cx ; add letter offset
mov bp, ax
mov byte [bp], STATE_COLOR_CORRECT ; set 'letter in right position' state
; remove matched letter from the temp word storage
lea bx, [game_selected_temp_word]
add bx, [general_value]
mov byte [bx], 0
lea bx, [game_state_temp_word]
add bx, [general_value]
mov byte [bx], 0
; set letter state
mov bx, [general_ptr1] ; pointer to the word
add bx, [general_value] ; add letter offset
mov ah, byte [bx] ; copy the character
mov al, KEYBOARD_COLOR_CORRECT
push cx
call set_letter_state
pop cx
jmp _update_green_loop
;
; Set Letter State function
; Params: AH - character
; AL - state
;
set_letter_state:
mov cx, 26
mov bp, c_keyboard_rows + 25
_find_letter_loop:
mov bl, byte [bp]
add bl, 32 ; making it lower case to test with
cmp bl, ah
je _set_letter
dec bp
loop _find_letter_loop
ret
_set_letter:
mov bp, game_keyboard_state
add bp, cx
dec bp
cmp al, KEYBOARD_COLOR_CORRECT
je _set_color
cmp al, KEYBOARD_COLOR_INWORD
je _check_if_not_green_already
cmp al, KEYBOARD_COLOR_NOTINWORD
je _check_if_empty
jmp _set_color
_check_if_not_green_already:
cmp byte [bp], KEYBOARD_COLOR_CORRECT
jne _set_color
jmp _set_letter_exit
_check_if_empty:
cmp byte [bp], KEYBOARD_COLOR_EMPTY
je _set_color
jmp _set_letter_exit
_set_color:
mov byte [bp], al
_set_letter_exit:
ret
;;; BASE LIBRARY
%include "lib.asm"
;;; GAME GLOBAL VARIABLES
game_selected_word: dw 0 ; pointer to the selected word in the list
game_selected_temp_word: times 5 db 0 ; selected word temporal storage
game_state_letter: db 0 ; current letter
game_state_word: db 0 ; current word
game_state_temp_word: times 5 db 0 ; current word temporary storage
game_words:
db " "
db " "
db " "
db " "
db " "
db " "
game_words_state:
times 30 db 0
game_keyboard_state:
times 26 db 0
game_score: dw 0 ; global game score
game_w: db 0 ; current word used in functions
game_l: db 0 ; current letter used in functions
game_pos: dw 0 ; current position used in functions
game_letter_ptr: dw 0 ; pointer for the ltter in general
game_letter_selected_color: db 0 ; ... selected state
general_ptr1: dw 0 ; just general pointer
general_ptr2: dw 0 ; just general pointer
general_value: dw 0 ; just a general-use value
general_counter: dw 0 ; just a general-use counter
;;; GAME CONSTANTS
c_title_string: db "WORDLOS",0
c_game_score: db "SCORE: ",0
; 24 chars
c_message_win:
db "WHAT A SHOT! 100 POINTS",0
db " IMPRESSIVE! 50 POINTS",0
db " INCREDIBLE! 10 POINTS",0
db " PRETTY GOOD! 5 POINTS",0
db " GOOD ENOUGH! 2 POINTS",0
db " NICE! 1 POINT",0
c_message_invalid:
db " WORD NOT IN DICTIONARY",0
c_message_lost:
db " THE WORD WAS: ",0
c_message_empty:
db " ",0
c_keyboard_rows:
db "QWERTYUIOPASDFGHJKLZXCVBNM"
c_score_board:
dw 100
dw 50
dw 10
dw 5
dw 2
dw 1
%include "words.asm"
|
Cubical/Algebra/CommRingSolver/HornerEval.agda | thomas-lamiaux/cubical | 0 | 6771 | {-# OPTIONS --safe #-}
module Cubical.Algebra.CommRingSolver.HornerEval where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat using (ℕ)
open import Cubical.Data.Int hiding (_+_ ; _·_ ; -_)
open import Cubical.Data.Vec
open import Cubical.Data.Bool
open import Cubical.Relation.Nullary.Base using (¬_; yes; no)
open import Cubical.Algebra.CommRingSolver.Utility
open import Cubical.Algebra.CommRingSolver.RawAlgebra
open import Cubical.Algebra.CommRingSolver.IntAsRawRing
open import Cubical.Algebra.CommRingSolver.HornerForms
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.Ring
private
variable
ℓ ℓ' : Level
eval : {A : RawAlgebra ℤAsRawRing ℓ'}
{n : ℕ} (P : IteratedHornerForms A n)
→ Vec ⟨ A ⟩ n → ⟨ A ⟩
eval {A = A} (const r) [] = RawAlgebra.scalar A r
eval {A = A} 0H (_ ∷ _) = RawAlgebra.0r A
eval {A = A} (P ·X+ Q) (x ∷ xs) =
let open RawAlgebra A
P' = (eval P (x ∷ xs))
Q' = eval Q xs
in if (isZero A P)
then Q'
else P' · x + Q'
module _ (R : CommRing ℓ) where
private
νR = CommRing→RawℤAlgebra R
open CommRingStr (snd R)
open RingTheory (CommRing→Ring R)
open IteratedHornerOperations νR
someCalculation : {x : fst R} → _ ≡ _
someCalculation {x = x} =
0r ≡⟨ sym (+IdR 0r) ⟩
0r + 0r ≡[ i ]⟨ 0LeftAnnihilates x (~ i) + 0r ⟩
0r · x + 0r ∎
evalIsZero : {n : ℕ} (P : IteratedHornerForms νR n)
→ (l : Vec (fst R) n)
→ isZero νR P ≡ true
→ eval P l ≡ 0r
evalIsZero (const (pos ℕ.zero)) [] isZeroP = refl
evalIsZero (const (pos (ℕ.suc n))) [] isZeroP = byBoolAbsurdity isZeroP
evalIsZero (const (negsuc _)) [] isZeroP = byBoolAbsurdity isZeroP
evalIsZero 0H (x ∷ xs) _ = refl
evalIsZero {n = ℕ.suc n} (P ·X+ Q) (x ∷ xs) isZeroPandQ with isZero νR P
... | true = eval Q xs ≡⟨ evalIsZero Q xs isZeroQ ⟩
0r ∎
where isZeroQ = snd (extractFromAnd _ _ isZeroPandQ)
... | false = byBoolAbsurdity isZeroP
where isZeroP = fst (extractFromAnd _ _ isZeroPandQ)
computeEvalSummandIsZero :
{n : ℕ}
(P : IteratedHornerForms νR (ℕ.suc n))
(Q : IteratedHornerForms νR n)
→ (xs : Vec (fst R) n)
→ (x : (fst R))
→ isZero νR P ≡ true
→ eval (P ·X+ Q) (x ∷ xs) ≡ eval Q xs
computeEvalSummandIsZero P Q xs x isZeroP with isZero νR P
... | true = refl
... | false = byBoolAbsurdity isZeroP
computeEvalNotZero :
{n : ℕ}
(P : IteratedHornerForms νR (ℕ.suc n))
(Q : IteratedHornerForms νR n)
→ (xs : Vec (fst R) n)
→ (x : (fst R))
→ ¬ (isZero νR P ≡ true)
→ eval (P ·X+ Q) (x ∷ xs) ≡ (eval P (x ∷ xs)) · x + eval Q xs
computeEvalNotZero P Q xs x notZeroP with isZero νR P
... | true = byBoolAbsurdity (sym (¬true→false true notZeroP))
... | false = refl
combineCasesEval :
{n : ℕ} (P : IteratedHornerForms νR (ℕ.suc n)) (Q : IteratedHornerForms νR n)
(x : (fst R)) (xs : Vec (fst R) n)
→ eval (P ·X+ Q) (x ∷ xs)
≡ (eval P (x ∷ xs)) · x + eval Q xs
combineCasesEval P Q x xs with isZero νR P ≟ true
... | yes p =
eval (P ·X+ Q) (x ∷ xs) ≡⟨ computeEvalSummandIsZero P Q xs x p ⟩
eval Q xs ≡⟨ sym (+IdL _) ⟩
0r + eval Q xs ≡[ i ]⟨ 0LeftAnnihilates x (~ i) + eval Q xs ⟩
0r · x + eval Q xs ≡[ i ]⟨ (evalIsZero P (x ∷ xs) p (~ i)) · x + eval Q xs ⟩
(eval P (x ∷ xs)) · x + eval Q xs ∎
... | no p = computeEvalNotZero P Q xs x p
compute+ₕEvalBothZero :
(n : ℕ) (P Q : IteratedHornerForms νR (ℕ.suc n))
(r s : IteratedHornerForms νR n)
(x : (fst R)) (xs : Vec (fst R) n)
→ (isZero νR (P +ₕ Q) and isZero νR (r +ₕ s)) ≡ true
→ eval ((P ·X+ r) +ₕ (Q ·X+ s)) (x ∷ xs) ≡ eval ((P +ₕ Q) ·X+ (r +ₕ s)) (x ∷ xs)
compute+ₕEvalBothZero n P Q r s x xs bothZero with isZero νR (P +ₕ Q) and isZero νR (r +ₕ s) | bothZero
... | true | p =
eval {A = νR} 0H (x ∷ xs) ≡⟨ refl ⟩
0r ≡⟨ someCalculation ⟩
0r · x + 0r ≡⟨ step1 ⟩
(eval (P +ₕ Q) (x ∷ xs)) · x + eval (r +ₕ s) xs ≡⟨ step2 ⟩
eval ((P +ₕ Q) ·X+ (r +ₕ s)) (x ∷ xs) ∎
where step1 : 0r · x + 0r ≡ (eval (P +ₕ Q) (x ∷ xs)) · x + eval (r +ₕ s) xs
step1 i = (evalIsZero (P +ₕ Q) (x ∷ xs) (fst (extractFromAnd _ _ (bothZero))) (~ i)) · x
+ (evalIsZero (r +ₕ s) xs (snd (extractFromAnd _ _ (bothZero))) (~ i))
step2 = sym (combineCasesEval (P +ₕ Q) (r +ₕ s) x xs)
... | false | p = byBoolAbsurdity p
compute+ₕEvalNotBothZero :
(n : ℕ) (P Q : IteratedHornerForms νR (ℕ.suc n))
(r s : IteratedHornerForms νR n)
(x : (fst R)) (xs : Vec (fst R) n)
→ (isZero νR (P +ₕ Q) and isZero νR (r +ₕ s)) ≡ false
→ eval ((P ·X+ r) +ₕ (Q ·X+ s)) (x ∷ xs) ≡ eval ((P +ₕ Q) ·X+ (r +ₕ s)) (x ∷ xs)
compute+ₕEvalNotBothZero n P Q r s _ _ notBothZero
with isZero νR (P +ₕ Q) and isZero νR (r +ₕ s) | notBothZero
... | true | p = byBoolAbsurdity (sym p)
... | false | p = refl
|
u7si/eop1-varArgsDispatcher.asm | JohnGlassmyer/UltimaHacks | 68 | 92190 | %include "include/u7si-all-includes.asm"
%define eopSegmentName eop1
%include "../u7-common/patch-eop-varArgsDispatcher.asm"
|
transformy/tables/gen/0052.asm | mborik/regression | 3 | 82970 | xor a
ld hl, basescradr + #0c77
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0c88
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #01cb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #02ca
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #0888), a
ld (basescradr + #0897), a
ld (basescradr + #0997), a
ld (basescradr + #09a8), a
ld (basescradr + #0a77), a
ld (basescradr + #0af0), a
ld (basescradr + #0ba8), a
ld (basescradr + #0e57), a
ld (basescradr + #0ef1), a
ld (basescradr + #1033), a
ld (basescradr + #1212), a
ld (basescradr + #1234), a
ld (basescradr + #1434), a
ld (basescradr + #1613), a
ld a, 10
ld (basescradr + #03ca), a
ld (basescradr + #0b49), a
ld (basescradr + #0f49), a
ld a, 170
ld hl, basescradr + #03cb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #03eb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #07cb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #07ea
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0b0a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0b2a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0b4a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0b6a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0b89
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ba9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0bc9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0f0a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0f2a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0f4a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0f6a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0f89
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0fa9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld a, 31
ld (basescradr + #04ca), a
ld (basescradr + #0869), a
ld (basescradr + #0e49), a
ld a, 255
ld hl, basescradr + #02eb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #06cb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #06ea
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a0a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a2a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a4a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a6a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a8a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0aa9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ac9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0cc9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e0a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e2a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e4a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e6a
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e89
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ea9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ec9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #04d1), a
ld (basescradr + #080a), a
ld (basescradr + #0830), a
ld (basescradr + #0850), a
ld (basescradr + #0870), a
ld (basescradr + #088f), a
ld (basescradr + #08af), a
ld (basescradr + #08cf), a
ld (basescradr + #0c10), a
ld (basescradr + #0c30), a
ld (basescradr + #0c50), a
ld (basescradr + #0c70), a
ld (basescradr + #0c8f), a
ld (basescradr + #0caf), a
ld a, 46
ld (basescradr + #05ca), a
ld (basescradr + #0d69), a
ld a, 236
ld (basescradr + #01f3), a
ld (basescradr + #05d2), a
ld (basescradr + #08d0), a
ld (basescradr + #0c31), a
ld (basescradr + #0cd0), a
ld (basescradr + #0d96), a
ld (basescradr + #1135), a
ld a, 63
ld (basescradr + #00ea), a
ld (basescradr + #06ca), a
ld (basescradr + #0a69), a
ld (basescradr + #0c69), a
ld a, 102
ld d,a
ld e,a
ld (basescradr + #02f2), de
ld hl, basescradr + #06f2
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a12
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a32
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a52
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a71
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0a91
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ab1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ad1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0af1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e12
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e32
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e52
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e71
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0e91
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0eb1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ed1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0ef2
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #1213
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #1614), de
ld (basescradr + #06d2), a
ld a, 42
ld (basescradr + #03ea), a
ld (basescradr + #07ca), a
ld (basescradr + #0b69), a
ld (basescradr + #0f69), a
ld a, 254
ld (basescradr + #00f1), a
ld (basescradr + #02f1), a
ld (basescradr + #06f1), a
ld (basescradr + #0890), a
ld (basescradr + #0a11), a
ld (basescradr + #0a90), a
ld (basescradr + #0ab0), a
ld (basescradr + #0e70), a
ld (basescradr + #0e90), a
ld a, 204
ld d,a
ld e,a
ld (basescradr + #04f2), de
ld hl, basescradr + #0812
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0832
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0851
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0871
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0891
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #08b1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #08d1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #08f1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0c12
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0c32
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0c51
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0c71
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0c91
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0cb1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0cd1
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #0cf2
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #1013
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #1414), de
ld (basescradr + #00f2), a
ld (basescradr + #1035), a
ld a, 110
ld (basescradr + #01ea), a
ld (basescradr + #05ea), a
ld (basescradr + #0989), a
ld a, 127
ld (basescradr + #02ea), a
ld (basescradr + #04ea), a
ld (basescradr + #0889), a
ld (basescradr + #0a89), a
ld (basescradr + #0e69), a
ld a, 252
ld (basescradr + #04f1), a
ld (basescradr + #0811), a
ld (basescradr + #0831), a
ld (basescradr + #08b0), a
ld (basescradr + #0c11), a
ld (basescradr + #0c90), a
ld (basescradr + #0cb0), a
ld a, 192
ld (basescradr + #04f4), a
ld (basescradr + #0815), a
ld (basescradr + #0837), a
ld (basescradr + #0857), a
ld (basescradr + #08d6), a
ld (basescradr + #08f6), a
ld (basescradr + #0957), a
ld (basescradr + #09f6), a
ld (basescradr + #0c16), a
ld (basescradr + #0c37), a
ld (basescradr + #0c57), a
ld a, 232
ld (basescradr + #05f4), a
ld (basescradr + #0915), a
ld (basescradr + #09b6), a
ld (basescradr + #0d16), a
ld a, 168
ld (basescradr + #07f1), a
ld (basescradr + #0b11), a
ld (basescradr + #0b90), a
ld (basescradr + #0bb0), a
ld (basescradr + #0f90), a
ld a, 238
ld hl, basescradr + #0dc9
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #090a), a
ld (basescradr + #1115), a
ld (basescradr + #1515), a
ld a, 1
ld (basescradr + #08a8), a
ld (basescradr + #0aa8), a
ld (basescradr + #0c09), a
ld (basescradr + #0ca8), a
ld (basescradr + #0e09), a
ld a, 246
ld (basescradr + #0a31), a
ld (basescradr + #0e11), a
ld (basescradr + #0eb0), a
ld a, 160
ld (basescradr + #0b31), a
ld (basescradr + #0bd0), a
ld (basescradr + #0f11), a
ld (basescradr + #0fb0), a
ld a, 3
ld (basescradr + #0829), a
ld (basescradr + #08c8), a
ld (basescradr + #0a29), a
ld (basescradr + #0ea8), a
ld a, 2
ld (basescradr + #0929), a
ld (basescradr + #09c8), a
ld (basescradr + #0b29), a
ld (basescradr + #0bc8), a
ld (basescradr + #0da8), a
ld (basescradr + #0f29), a
ld (basescradr + #0fa8), a
ld a, 224
ld (basescradr + #0937), a
ld (basescradr + #0d37), a
ld (basescradr + #0dd6), a
ld a, 96
ld (basescradr + #0a37), a
ld (basescradr + #0ab6), a
ld (basescradr + #0ad6), a
ld (basescradr + #0e37), a
ld (basescradr + #0eb6), a
ld a, 7
ld (basescradr + #0ac8), a
ld (basescradr + #0c29), a
ld (basescradr + #0cc8), a
ld (basescradr + #0e29), a
ld (basescradr + #0ec8), a
ld a, 6
ld (basescradr + #0d29), a
ld (basescradr + #0dc8), a
ld a, 230
ld (basescradr + #0a51), a
ld (basescradr + #0ad0), a
ld (basescradr + #0e31), a
ld (basescradr + #0e51), a
ld (basescradr + #0ed0), a
ld a, 128
ld (basescradr + #0877), a
ld (basescradr + #0977), a
ld (basescradr + #0b51), a
ld (basescradr + #0cf6), a
ld (basescradr + #0d57), a
ld (basescradr + #0df6), a
ld (basescradr + #0f31), a
ld (basescradr + #0f51), a
ld a, 15
ld (basescradr + #0a49), a
ld (basescradr + #0c49), a
ld a, 64
ld (basescradr + #0a57), a
ld (basescradr + #0af6), a
ld (basescradr + #0ed6), a
ld (basescradr + #1535), a
ld a, 14
ld (basescradr + #0969), a
ld a, 100
ld (basescradr + #0e96), a
ld (basescradr + #1235), a
ld a, 200
ld (basescradr + #08b6), a
ld (basescradr + #0cb6), a
ld a, 4
ld (basescradr + #08f0), a
ld (basescradr + #0cf1), a
ld (basescradr + #1012), a
ld a, 68
ld (basescradr + #09e9), a
ld (basescradr + #09f0), a
ld (basescradr + #0dea), a
ld (basescradr + #0df1), a
ld (basescradr + #110b), a
ld (basescradr + #112d), a
ld (basescradr + #150c), a
ld a, 70
ld (basescradr + #1112), a
ld (basescradr + #1134), a
ld (basescradr + #1513), a
ld a, 12
ld (basescradr + #1034), a
ld (basescradr + #1413), a
ld (basescradr + #1435), a
ret
|
examples/object_hierarchy/widgets.ads | glencornell/ada-object-framework | 0 | 21770 | <reponame>glencornell/ada-object-framework
with Aof.Core.Objects;
with Aof.Core.Properties;
package Widgets is
type Widget is new Aof.Core.Objects.Object with
record
-- Properties:
X : Aof.Core.Properties.Naturals.Property;
Y : Aof.Core.Properties.Naturals.Property;
Width : Aof.Core.Properties.Naturals.Property;
Height : Aof.Core.Properties.Naturals.Property;
end record;
type Widget_Ptr is access all Widget'Class;
-- Slots:
procedure Paint_Event (This : in out Widget'Class);
end Widgets;
|
.build/ada/asis-gela-elements-defs-accs.ads | faelys/gela-asis | 4 | 18060 |
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the Maxim Reznik, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
package Asis.Gela.Elements.Defs.Accs is
---------------------------------------
-- Anonymous_Access_To_Variable_Node --
---------------------------------------
type Anonymous_Access_To_Variable_Node is
new Access_Definition_Node with private;
type Anonymous_Access_To_Variable_Ptr is
access all Anonymous_Access_To_Variable_Node;
for Anonymous_Access_To_Variable_Ptr'Storage_Pool use Lists.Pool;
function New_Anonymous_Access_To_Variable_Node
(The_Context : ASIS.Context)
return Anonymous_Access_To_Variable_Ptr;
function Anonymous_Access_To_Object_Subtype_Mark
(Element : Anonymous_Access_To_Variable_Node) return Asis.Name;
procedure Set_Anonymous_Access_To_Object_Subtype_Mark
(Element : in out Anonymous_Access_To_Variable_Node;
Value : in Asis.Name);
function Access_Definition_Kind (Element : Anonymous_Access_To_Variable_Node)
return Asis.Access_Definition_Kinds;
function Children (Element : access Anonymous_Access_To_Variable_Node)
return Traverse_List;
function Clone
(Element : Anonymous_Access_To_Variable_Node;
Parent : Asis.Element)
return Asis.Element;
procedure Copy
(Source : in Asis.Element;
Target : access Anonymous_Access_To_Variable_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element);
---------------------------------------
-- Anonymous_Access_To_Constant_Node --
---------------------------------------
type Anonymous_Access_To_Constant_Node is
new Anonymous_Access_To_Variable_Node with private;
type Anonymous_Access_To_Constant_Ptr is
access all Anonymous_Access_To_Constant_Node;
for Anonymous_Access_To_Constant_Ptr'Storage_Pool use Lists.Pool;
function New_Anonymous_Access_To_Constant_Node
(The_Context : ASIS.Context)
return Anonymous_Access_To_Constant_Ptr;
function Access_Definition_Kind (Element : Anonymous_Access_To_Constant_Node)
return Asis.Access_Definition_Kinds;
function Clone
(Element : Anonymous_Access_To_Constant_Node;
Parent : Asis.Element)
return Asis.Element;
procedure Copy
(Source : in Asis.Element;
Target : access Anonymous_Access_To_Constant_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element);
----------------------------------------
-- Anonymous_Access_To_Procedure_Node --
----------------------------------------
type Anonymous_Access_To_Procedure_Node is
new Access_Definition_Node with private;
type Anonymous_Access_To_Procedure_Ptr is
access all Anonymous_Access_To_Procedure_Node;
for Anonymous_Access_To_Procedure_Ptr'Storage_Pool use Lists.Pool;
function New_Anonymous_Access_To_Procedure_Node
(The_Context : ASIS.Context)
return Anonymous_Access_To_Procedure_Ptr;
function Access_To_Subprogram_Parameter_Profile
(Element : Anonymous_Access_To_Procedure_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List;
procedure Set_Access_To_Subprogram_Parameter_Profile
(Element : in out Anonymous_Access_To_Procedure_Node;
Value : in Asis.Element);
function Access_To_Subprogram_Parameter_Profile_List
(Element : Anonymous_Access_To_Procedure_Node) return Asis.Element;
function Access_Definition_Kind (Element : Anonymous_Access_To_Procedure_Node)
return Asis.Access_Definition_Kinds;
function Children (Element : access Anonymous_Access_To_Procedure_Node)
return Traverse_List;
function Clone
(Element : Anonymous_Access_To_Procedure_Node;
Parent : Asis.Element)
return Asis.Element;
procedure Copy
(Source : in Asis.Element;
Target : access Anonymous_Access_To_Procedure_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element);
--------------------------------------------------
-- Anonymous_Access_To_Protected_Procedure_Node --
--------------------------------------------------
type Anonymous_Access_To_Protected_Procedure_Node is
new Anonymous_Access_To_Procedure_Node with private;
type Anonymous_Access_To_Protected_Procedure_Ptr is
access all Anonymous_Access_To_Protected_Procedure_Node;
for Anonymous_Access_To_Protected_Procedure_Ptr'Storage_Pool use Lists.Pool;
function New_Anonymous_Access_To_Protected_Procedure_Node
(The_Context : ASIS.Context)
return Anonymous_Access_To_Protected_Procedure_Ptr;
function Access_Definition_Kind (Element : Anonymous_Access_To_Protected_Procedure_Node)
return Asis.Access_Definition_Kinds;
function Clone
(Element : Anonymous_Access_To_Protected_Procedure_Node;
Parent : Asis.Element)
return Asis.Element;
procedure Copy
(Source : in Asis.Element;
Target : access Anonymous_Access_To_Protected_Procedure_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element);
---------------------------------------
-- Anonymous_Access_To_Function_Node --
---------------------------------------
type Anonymous_Access_To_Function_Node is
new Anonymous_Access_To_Procedure_Node with private;
type Anonymous_Access_To_Function_Ptr is
access all Anonymous_Access_To_Function_Node;
for Anonymous_Access_To_Function_Ptr'Storage_Pool use Lists.Pool;
function New_Anonymous_Access_To_Function_Node
(The_Context : ASIS.Context)
return Anonymous_Access_To_Function_Ptr;
function Access_To_Function_Result_Subtype
(Element : Anonymous_Access_To_Function_Node) return Asis.Definition;
procedure Set_Access_To_Function_Result_Subtype
(Element : in out Anonymous_Access_To_Function_Node;
Value : in Asis.Definition);
function Access_Definition_Kind (Element : Anonymous_Access_To_Function_Node)
return Asis.Access_Definition_Kinds;
function Children (Element : access Anonymous_Access_To_Function_Node)
return Traverse_List;
function Clone
(Element : Anonymous_Access_To_Function_Node;
Parent : Asis.Element)
return Asis.Element;
procedure Copy
(Source : in Asis.Element;
Target : access Anonymous_Access_To_Function_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element);
-------------------------------------------------
-- Anonymous_Access_To_Protected_Function_Node --
-------------------------------------------------
type Anonymous_Access_To_Protected_Function_Node is
new Anonymous_Access_To_Function_Node with private;
type Anonymous_Access_To_Protected_Function_Ptr is
access all Anonymous_Access_To_Protected_Function_Node;
for Anonymous_Access_To_Protected_Function_Ptr'Storage_Pool use Lists.Pool;
function New_Anonymous_Access_To_Protected_Function_Node
(The_Context : ASIS.Context)
return Anonymous_Access_To_Protected_Function_Ptr;
function Access_Definition_Kind (Element : Anonymous_Access_To_Protected_Function_Node)
return Asis.Access_Definition_Kinds;
function Clone
(Element : Anonymous_Access_To_Protected_Function_Node;
Parent : Asis.Element)
return Asis.Element;
procedure Copy
(Source : in Asis.Element;
Target : access Anonymous_Access_To_Protected_Function_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element);
private
type Anonymous_Access_To_Variable_Node is
new Access_Definition_Node with
record
Anonymous_Access_To_Object_Subtype_Mark : aliased Asis.Name;
end record;
type Anonymous_Access_To_Constant_Node is
new Anonymous_Access_To_Variable_Node with
record
null;
end record;
type Anonymous_Access_To_Procedure_Node is
new Access_Definition_Node with
record
Access_To_Subprogram_Parameter_Profile : aliased Primary_Parameter_Lists.List;
end record;
type Anonymous_Access_To_Protected_Procedure_Node is
new Anonymous_Access_To_Procedure_Node with
record
null;
end record;
type Anonymous_Access_To_Function_Node is
new Anonymous_Access_To_Procedure_Node with
record
Access_To_Function_Result_Subtype : aliased Asis.Definition;
end record;
type Anonymous_Access_To_Protected_Function_Node is
new Anonymous_Access_To_Function_Node with
record
null;
end record;
end Asis.Gela.Elements.Defs.Accs;
|
data/mapObjects/PokemonTower7F.asm | AmateurPanda92/pokemon-rby-dx | 9 | 163353 | PokemonTower7F_Object:
db $1 ; border block
db 1 ; warps
warp 9, 16, 1, POKEMON_TOWER_6F
db 0 ; signs
db 4 ; objects
object SPRITE_ROCKET, 9, 11, STAY, RIGHT, 1, OPP_ROCKET, 19
object SPRITE_ROCKET, 12, 9, STAY, LEFT, 2, OPP_ROCKET, 20
object SPRITE_ROCKET, 9, 7, STAY, RIGHT, 3, OPP_ROCKET, 21
object SPRITE_MR_FUJI, 10, 3, STAY, DOWN, 4 ; person
; warp-to
warp_to 9, 16, POKEMON_TOWER_7F_WIDTH ; POKEMON_TOWER_6F
|
Assembly/Project/Spc700/pl1a-1.asm | Myself086/Project-Nested | 338 | 88770 |
// Old
//.db 0xB3,0x44,0x44,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB
// New
// [b3] 5444abbbbbbbbbbb
.db 0xb3, 0x54, 0x44, 0xab, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb
|
vendor/stdlib/src/Data/Star.agda | isabella232/Lemmachine | 56 | 1302 | <reponame>isabella232/Lemmachine<filename>vendor/stdlib/src/Data/Star.agda
------------------------------------------------------------------------
-- The reflexive transitive closures of McBride, Norell and Jansson
------------------------------------------------------------------------
-- This module could be placed under Relation.Binary. However, since
-- its primary purpose is to be used for _data_ it has been placed
-- under Data instead.
module Data.Star where
open import Relation.Binary
open import Data.Function
infixr 5 _◅_
-- Reflexive transitive closure.
data Star {I : Set} (T : Rel I) : Rel I where
ε : Reflexive (Star T)
_◅_ : ∀ {i j k} (x : T i j) (xs : Star T j k) → Star T i k
-- The type of _◅_ is Trans T (Star T) (Star T); I expanded
-- the definition in order to be able to name the arguments (x
-- and xs).
-- Append/transitivity.
infixr 5 _◅◅_
_◅◅_ : ∀ {I} {T : Rel I} → Transitive (Star T)
ε ◅◅ ys = ys
(x ◅ xs) ◅◅ ys = x ◅ (xs ◅◅ ys)
-- Sometimes you want to view cons-lists as snoc-lists. Then the
-- following "constructor" is handy. Note that this is _not_ snoc for
-- cons-lists, it is just a synonym for cons (with a different
-- argument order).
infixl 5 _▻_
_▻_ : ∀ {I} {T : Rel I} {i j k} →
Star T j k → T i j → Star T i k
_▻_ = flip _◅_
-- A corresponding variant of append.
infixr 5 _▻▻_
_▻▻_ : ∀ {I} {T : Rel I} {i j k} →
Star T j k → Star T i j → Star T i k
_▻▻_ = flip _◅◅_
-- A generalised variant of map which allows the index type to change.
gmap : ∀ {I} {T : Rel I} {J} {U : Rel J} →
(f : I → J) → T =[ f ]⇒ U → Star T =[ f ]⇒ Star U
gmap f g ε = ε
gmap f g (x ◅ xs) = g x ◅ gmap f g xs
map : ∀ {I} {T U : Rel I} → T ⇒ U → Star T ⇒ Star U
map = gmap id
-- TransFlip is used to state the type signature of gfold.
TransFlip : ∀ {a} → Rel a → Rel a → Rel a → Set
TransFlip P Q R = ∀ {i j k} → Q j k → P i j → R i k
-- A generalised variant of fold.
gfold : ∀ {I J T} (f : I → J) P →
Trans T (P on₁ f) (P on₁ f) →
TransFlip (Star T) (P on₁ f) (P on₁ f)
gfold f P _⊕_ ∅ ε = ∅
gfold f P _⊕_ ∅ (x ◅ xs) = x ⊕ gfold f P _⊕_ ∅ xs
fold : ∀ {I T} (P : Rel I) →
Trans T P P → Reflexive P → Star T ⇒ P
fold P _⊕_ ∅ = gfold id P _⊕_ ∅
gfoldl : ∀ {I J T} (f : I → J) P →
Trans (P on₁ f) T (P on₁ f) →
Trans (P on₁ f) (Star T) (P on₁ f)
gfoldl f P _⊕_ ∅ ε = ∅
gfoldl f P _⊕_ ∅ (x ◅ xs) = gfoldl f P _⊕_ (∅ ⊕ x) xs
foldl : ∀ {I T} (P : Rel I) →
Trans P T P → Reflexive P → Star T ⇒ P
foldl P _⊕_ ∅ = gfoldl id P _⊕_ ∅
concat : ∀ {I} {T : Rel I} → Star (Star T) ⇒ Star T
concat {T = T} = fold (Star T) _◅◅_ ε
-- If the underlying relation is symmetric, then the reflexive
-- transitive closure is also symmetric.
revApp : ∀ {I} {T U : Rel I} → Sym T U →
∀ {i j k} → Star T j i → Star U j k → Star U i k
revApp rev ε ys = ys
revApp rev (x ◅ xs) ys = revApp rev xs (rev x ◅ ys)
reverse : ∀ {I} {T U : Rel I} → Sym T U → Sym (Star T) (Star U)
reverse rev xs = revApp rev xs ε
-- Reflexive transitive closures form a (generalised) monad.
-- return could also be called singleton.
return : ∀ {I} {T : Rel I} → T ⇒ Star T
return x = x ◅ ε
-- A generalised variant of the Kleisli star (flip bind, or
-- concatMap).
kleisliStar : ∀ {I J} {T : Rel I} {U : Rel J} (f : I → J) →
T =[ f ]⇒ Star U → Star T =[ f ]⇒ Star U
kleisliStar f g = concat ∘ gmap f g
_⋆ : ∀ {I} {T U : Rel I} →
T ⇒ Star U → Star T ⇒ Star U
_⋆ = kleisliStar id
infixl 1 _>>=_
_>>=_ : ∀ {I} {T U : Rel I} {i j} →
Star T i j → T ⇒ Star U → Star U i j
m >>= f = (f ⋆) m
-- Note that the monad-like structure above is not an indexed monad
-- (as defined in Category.Monad.Indexed). If it were, then _>>=_
-- would have a type similar to
--
-- ∀ {I} {T U : Rel I} {i j k} →
-- Star T i j → (T i j → Star U j k) → Star U i k.
-- ^^^^^
-- Note, however, that there is no scope for applying T to any indices
-- in the definition used in Category.Monad.Indexed.
|
Palmtree.Math.Core.Implements/vs_build/x64_Release/pmc_compare.asm | rougemeilland/Palmtree.Math.Core.Implements | 0 | 243695 | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
PUBLIC Compare_Imp
PUBLIC Initialize_Compare
PUBLIC PMC_Compare_I_X
PUBLIC PMC_Compare_L_X
PUBLIC PMC_Compare_X_I
PUBLIC PMC_Compare_X_L
PUBLIC PMC_Compare_X_X
EXTRN CheckNumber:PROC
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_I_X DD imagerel $LN29
DD imagerel $LN29+232
DD imagerel $unwind$PMC_Compare_I_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_L_X DD imagerel $LN61
DD imagerel $LN61+236
DD imagerel $unwind$PMC_Compare_L_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_I DD imagerel $LN29
DD imagerel $LN29+149
DD imagerel $unwind$PMC_Compare_X_I
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_L DD imagerel $LN61
DD imagerel $LN61+153
DD imagerel $unwind$PMC_Compare_X_L
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_X DD imagerel $LN31
DD imagerel $LN31+245
DD imagerel $unwind$PMC_Compare_X_X
pdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_X DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_L DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_I DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_L_X DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_I_X DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_X_L_Imp
_TEXT SEGMENT
u$ = 8
v$ = 16
w$ = 24
PMC_Compare_X_L_Imp PROC ; COMDAT
; 152 : if (u->IS_ZERO)
test BYTE PTR [rcx+40], 2
mov r9, rcx
je SHORT $LN2@PMC_Compar
; 153 : {
; 154 : // u が 0 である場合
; 155 : if (v == 0)
; 156 : {
; 157 : // v が 0 である場合
; 158 : *w = 0;
; 159 : }
; 160 : else
; 161 : {
; 162 : // v が 0 でない場合
; 163 : *w = -1;
; 164 : }
; 165 : }
neg rdx
$LN36@PMC_Compar:
; 258 : *w = 1;
; 259 : else if (u->BLOCK[0] < v)
; 260 : *w = -1;
; 261 : else
; 262 : *w = 0;
; 263 : }
; 264 : }
; 265 : }
; 266 : }
sbb eax, eax
mov DWORD PTR [r8], eax
ret 0
$LN2@PMC_Compar:
; 166 : else if (v == 0)
test rdx, rdx
je SHORT $LN52@PMC_Compar
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 644 : _BitScanReverse64(&pos, x);
bsr rax, rdx
; 645 : #elif defined(__GNUC__)
; 646 : _UINT64_T pos;
; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x));
; 648 : #else
; 649 : #error unknown compiler
; 650 : #endif
; 651 : #else
; 652 : #error unknown platform
; 653 : #endif
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 63 ; 0000003fH
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; 242 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_UNIT((__UNIT_TYPE)v);
movsxd rax, ecx
mov ecx, 64 ; 00000040H
sub rcx, rax
; 243 : if (u_bit_count > v_bit_count)
cmp QWORD PTR [r9+16], rcx
ja SHORT $LN52@PMC_Compar
; 244 : {
; 245 : // 明らかに u > v である場合
; 246 : *w = 1;
; 247 : }
; 248 : else if (u_bit_count < v_bit_count)
jae SHORT $LN34@PMC_Compar
; 258 : *w = 1;
; 259 : else if (u->BLOCK[0] < v)
; 260 : *w = -1;
; 261 : else
; 262 : *w = 0;
; 263 : }
; 264 : }
; 265 : }
; 266 : }
mov DWORD PTR [r8], -1
ret 0
$LN34@PMC_Compar:
; 249 : {
; 250 : // 明らかに u < v である場合
; 251 : *w = -1;
; 252 : }
; 253 : else
; 254 : {
; 255 : // u > 0 && v > 0 かつ u のビット長と v のビット長が等しく、かつ v が 1 ワードで表現できる場合
; 256 : // ⇒ u と v はともに 1 ワードで表現できる
; 257 : if (u->BLOCK[0] > v)
mov rax, QWORD PTR [r9+56]
cmp QWORD PTR [rax], rdx
jbe SHORT $LN36@PMC_Compar
$LN52@PMC_Compar:
; 258 : *w = 1;
; 259 : else if (u->BLOCK[0] < v)
; 260 : *w = -1;
; 261 : else
; 262 : *w = 0;
; 263 : }
; 264 : }
; 265 : }
; 266 : }
mov DWORD PTR [r8], 1
ret 0
PMC_Compare_X_L_Imp ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_X_I_Imp
_TEXT SEGMENT
u$ = 8
v$ = 16
w$ = 24
PMC_Compare_X_I_Imp PROC ; COMDAT
; 62 : if (u->IS_ZERO)
test BYTE PTR [rcx+40], 2
mov r9, rcx
je SHORT $LN2@PMC_Compar
; 63 : {
; 64 : // u が 0 である場合
; 65 : if (v == 0)
; 66 : {
; 67 : // v が 0 である場合
; 68 : *w = 0;
; 69 : }
; 70 : else
; 71 : {
; 72 : // v が 0 でない場合
; 73 : *w = -1;
; 74 : }
; 75 : }
neg edx
$LN12@PMC_Compar:
; 101 : *w = 1;
; 102 : else if (u->BLOCK[0] < v)
; 103 : *w = -1;
; 104 : else
; 105 : *w = 0;
; 106 : }
; 107 : }
; 108 : }
sbb eax, eax
mov DWORD PTR [r8], eax
ret 0
$LN2@PMC_Compar:
; 76 : else if (v == 0)
test edx, edx
je SHORT $LN20@PMC_Compar
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 601 : _BitScanReverse(&pos, x);
bsr eax, edx
; 602 : #elif defined(__GNUC__)
; 603 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 604 : #else
; 605 : #error unknown compiler
; 606 : #endif
; 607 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 31
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; 85 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_32(v);
movsxd rax, ecx
mov ecx, 32 ; 00000020H
sub rcx, rax
; 86 : if (u_bit_count > v_bit_count)
cmp QWORD PTR [r9+16], rcx
ja SHORT $LN20@PMC_Compar
; 87 : {
; 88 : // 明らかに u > v である場合
; 89 : *w = 1;
; 90 : }
; 91 : else if (u_bit_count < v_bit_count)
jae SHORT $LN10@PMC_Compar
; 101 : *w = 1;
; 102 : else if (u->BLOCK[0] < v)
; 103 : *w = -1;
; 104 : else
; 105 : *w = 0;
; 106 : }
; 107 : }
; 108 : }
mov DWORD PTR [r8], -1
ret 0
$LN10@PMC_Compar:
; 92 : {
; 93 : // 明らかに u < v である場合
; 94 : *w = -1;
; 95 : }
; 96 : else
; 97 : {
; 98 : // u > 0 && v > 0 かつ u のビット長と v のビット長が等しい場合
; 99 : // ⇒ u と v はともに 1 ワードで表現できる
; 100 : if (u->BLOCK[0] > v)
mov rax, QWORD PTR [r9+56]
mov ecx, edx
cmp QWORD PTR [rax], rcx
jbe SHORT $LN12@PMC_Compar
$LN20@PMC_Compar:
; 101 : *w = 1;
; 102 : else if (u->BLOCK[0] < v)
; 103 : *w = -1;
; 104 : else
; 105 : *w = 0;
; 106 : }
; 107 : }
; 108 : }
mov DWORD PTR [r8], 1
ret 0
PMC_Compare_X_I_Imp ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _LZCNT_ALT_UNIT
_TEXT SEGMENT
x$ = 8
_LZCNT_ALT_UNIT PROC ; COMDAT
; 630 : if (x == 0)
test rcx, rcx
jne SHORT $LN2@LZCNT_ALT_
; 631 : return (sizeof(x) * 8);
mov eax, 64 ; 00000040H
; 655 : }
ret 0
$LN2@LZCNT_ALT_:
; 632 : #ifdef _M_IX86
; 633 : _UINT32_T pos;
; 634 : #ifdef _MSC_VER
; 635 : _BitScanReverse(&pos, x);
; 636 : #elif defined(__GNUC__)
; 637 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 638 : #else
; 639 : #error unknown compiler
; 640 : #endif
; 641 : #elif defined(_M_X64)
; 642 : #ifdef _MSC_VER
; 643 : _UINT32_T pos;
; 644 : _BitScanReverse64(&pos, x);
bsr rcx, rcx
; 645 : #elif defined(__GNUC__)
; 646 : _UINT64_T pos;
; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x));
; 648 : #else
; 649 : #error unknown compiler
; 650 : #endif
; 651 : #else
; 652 : #error unknown platform
; 653 : #endif
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov eax, 63 ; 0000003fH
sub eax, ecx
; 655 : }
ret 0
_LZCNT_ALT_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _LZCNT_ALT_32
_TEXT SEGMENT
x$ = 8
_LZCNT_ALT_32 PROC ; COMDAT
; 597 : if (x == 0)
test ecx, ecx
jne SHORT $LN2@LZCNT_ALT_
; 598 : return (sizeof(x) * 8);
mov eax, 32 ; 00000020H
; 608 : }
ret 0
$LN2@LZCNT_ALT_:
; 599 : _UINT32_T pos;
; 600 : #ifdef _MSC_VER
; 601 : _BitScanReverse(&pos, x);
bsr ecx, ecx
; 602 : #elif defined(__GNUC__)
; 603 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 604 : #else
; 605 : #error unknown compiler
; 606 : #endif
; 607 : return (sizeof(x) * 8 - 1 - pos);
mov eax, 31
sub eax, ecx
; 608 : }
ret 0
_LZCNT_ALT_32 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FROMDWORDTOWORD
_TEXT SEGMENT
value$ = 8
result_high$ = 16
_FROMDWORDTOWORD PROC ; COMDAT
; 183 : *result_high = (_UINT32_T)(value >> 32);
mov rax, rcx
shr rax, 32 ; 00000020H
mov DWORD PTR [rdx], eax
; 184 : return ((_UINT32_T)value);
mov eax, ecx
; 185 : }
ret 0
_FROMDWORDTOWORD ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_X_X
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Compare_X_X PROC ; COMDAT
; 309 : {
$LN31:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
; 310 : if (u == NULL)
test rcx, rcx
je $LN29@PMC_Compar
; 311 : return (PMC_STATUS_ARGUMENT_ERROR);
; 312 : if (v == NULL)
test rdx, rdx
je $LN29@PMC_Compar
; 313 : return (PMC_STATUS_ARGUMENT_ERROR);
; 314 : if (w == NULL)
test r8, r8
je $LN29@PMC_Compar
; 316 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
; 317 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
; 318 : PMC_STATUS_CODE result;
; 319 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
call CheckNumber
test eax, eax
jne $LN1@PMC_Compar
; 320 : return (result);
; 321 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov rcx, rdi
call CheckNumber
test eax, eax
jne $LN1@PMC_Compar
; 322 : return (result);
; 323 : if (nu->IS_ZERO)
mov eax, DWORD PTR [rdi+40]
and eax, 2
test BYTE PTR [rbx+40], 2
je SHORT $LN7@PMC_Compar
; 324 : {
; 325 : *w = nv->IS_ZERO ? 0 : -1;
neg eax
sbb eax, eax
neg eax
dec eax
; 349 : }
; 350 : }
; 351 : return (PMC_STATUS_OK);
mov DWORD PTR [rsi], eax
xor eax, eax
; 352 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN7@PMC_Compar:
; 326 : }
; 327 : else if (nv->IS_ZERO)
test eax, eax
jne SHORT $LN25@PMC_Compar
; 328 : {
; 329 : *w = 1;
; 330 : }
; 331 : else
; 332 : {
; 333 : __UNIT_TYPE u_bit_count = nu->UNIT_BIT_COUNT;
mov rax, QWORD PTR [rbx+16]
; 334 : __UNIT_TYPE v_bit_count = nv->UNIT_BIT_COUNT;
; 335 : if (u_bit_count > v_bit_count)
cmp rax, QWORD PTR [rdi+16]
ja SHORT $LN25@PMC_Compar
; 336 : {
; 337 : // 明らかに u > v である場合
; 338 : *w = 1;
; 339 : }
; 340 : else if (u_bit_count < v_bit_count)
jb SHORT $LN26@PMC_Compar
; 341 : {
; 342 : // 明らかに u < v である場合
; 343 : *w = -1;
; 344 : }
; 345 : else
; 346 : {
; 347 : // u > 0 && v > 0 かつ u のビット長と v のビット長が等しい場合
; 348 : *w = Compare_Imp(nu->BLOCK, nv->BLOCK, nu->UNIT_WORD_COUNT);
mov rcx, QWORD PTR [rbx+8]
; 40 : u += count;
mov rax, QWORD PTR [rbx+56]
lea r8, QWORD PTR [rax+rcx*8]
; 41 : v += count;
mov rax, QWORD PTR [rdi+56]
lea r9, QWORD PTR [rax+rcx*8]
; 42 : while (count > 0)
test rcx, rcx
je SHORT $LN18@PMC_Compar
$LL17@PMC_Compar:
; 43 : {
; 44 : --u;
; 45 : --v;
; 46 : --count;
; 47 :
; 48 : if (*u > *v)
mov rax, QWORD PTR [r8-8]
lea r8, QWORD PTR [r8-8]
lea r9, QWORD PTR [r9-8]
dec rcx
cmp rax, QWORD PTR [r9]
ja SHORT $LN25@PMC_Compar
; 49 : return (1);
; 50 : else if (*u < *v)
jb SHORT $LN26@PMC_Compar
; 42 : while (count > 0)
test rcx, rcx
jne SHORT $LL17@PMC_Compar
$LN18@PMC_Compar:
; 51 : return (-1);
; 52 : else
; 53 : {
; 54 : }
; 55 : }
; 56 : return (0);
xor eax, eax
$LN16@PMC_Compar:
; 349 : }
; 350 : }
; 351 : return (PMC_STATUS_OK);
mov DWORD PTR [rsi], eax
xor eax, eax
; 352 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN26@PMC_Compar:
; 349 : }
; 350 : }
; 351 : return (PMC_STATUS_OK);
mov eax, -1
jmp SHORT $LN16@PMC_Compar
$LN25@PMC_Compar:
mov eax, 1
jmp SHORT $LN16@PMC_Compar
$LN29@PMC_Compar:
; 315 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_Compar:
; 352 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Compare_X_X ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_X_L
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Compare_X_L PROC ; COMDAT
; 289 : {
$LN61:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
; 290 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(v) * 8)
; 291 : {
; 292 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない
; 293 : return (PMC_STATUS_INTERNAL_ERROR);
; 294 : }
; 295 : if (u == NULL)
test rcx, rcx
je SHORT $LN58@PMC_Compar
; 296 : return (PMC_STATUS_ARGUMENT_ERROR);
; 297 : if (w == NULL)
test r8, r8
je SHORT $LN58@PMC_Compar
; 299 : PMC_STATUS_CODE result;
; 300 : if ((result = CheckNumber((NUMBER_HEADER*)u)) != PMC_STATUS_OK)
call CheckNumber
test eax, eax
jne SHORT $LN1@PMC_Compar
; 152 : if (u->IS_ZERO)
test BYTE PTR [rdi+40], 2
je SHORT $LN8@PMC_Compar
; 153 : {
; 154 : // u が 0 である場合
; 155 : if (v == 0)
neg rbx
$LN42@PMC_Compar:
; 301 : return (result);
; 302 : _INT32_T w_temp;
; 303 : PMC_Compare_X_L_Imp((NUMBER_HEADER*)u, v, &w_temp);
; 304 : *w = w_temp;
sbb eax, eax
$LN44@PMC_Compar:
mov DWORD PTR [rsi], eax
; 305 : return (PMC_STATUS_OK);
xor eax, eax
; 306 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN8@PMC_Compar:
; 166 : else if (v == 0)
test rbx, rbx
je SHORT $LN59@PMC_Compar
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 644 : _BitScanReverse64(&pos, x);
bsr rax, rbx
; 645 : #elif defined(__GNUC__)
; 646 : _UINT64_T pos;
; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x));
; 648 : #else
; 649 : #error unknown compiler
; 650 : #endif
; 651 : #else
; 652 : #error unknown platform
; 653 : #endif
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 63 ; 0000003fH
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; 242 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_UNIT((__UNIT_TYPE)v);
movsxd rax, ecx
mov ecx, 64 ; 00000040H
sub rcx, rax
; 243 : if (u_bit_count > v_bit_count)
cmp QWORD PTR [rdi+16], rcx
ja SHORT $LN59@PMC_Compar
; 244 : {
; 245 : // 明らかに u > v である場合
; 246 : *w = 1;
; 247 : }
; 248 : else if (u_bit_count < v_bit_count)
jae SHORT $LN40@PMC_Compar
; 249 : {
; 250 : // 明らかに u < v である場合
; 251 : *w = -1;
mov eax, -1
; 252 : }
jmp SHORT $LN44@PMC_Compar
$LN40@PMC_Compar:
; 253 : else
; 254 : {
; 255 : // u > 0 && v > 0 かつ u のビット長と v のビット長が等しく、かつ v が 1 ワードで表現できる場合
; 256 : // ⇒ u と v はともに 1 ワードで表現できる
; 257 : if (u->BLOCK[0] > v)
mov rax, QWORD PTR [rdi+56]
cmp QWORD PTR [rax], rbx
jbe SHORT $LN42@PMC_Compar
$LN59@PMC_Compar:
; 301 : return (result);
; 302 : _INT32_T w_temp;
; 303 : PMC_Compare_X_L_Imp((NUMBER_HEADER*)u, v, &w_temp);
; 304 : *w = w_temp;
mov eax, 1
jmp SHORT $LN44@PMC_Compar
$LN58@PMC_Compar:
; 298 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_Compar:
; 306 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Compare_X_L ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_X_I
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Compare_X_I PROC ; COMDAT
; 131 : {
$LN29:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov ebx, edx
mov rsi, r8
mov rdi, rcx
; 132 : if (__UNIT_TYPE_BIT_COUNT < sizeof(v) * 8)
; 133 : {
; 134 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない
; 135 : return (PMC_STATUS_INTERNAL_ERROR);
; 136 : }
; 137 : if (u == NULL)
test rcx, rcx
je SHORT $LN26@PMC_Compar
; 138 : return (PMC_STATUS_ARGUMENT_ERROR);
; 139 : if (w == NULL)
test r8, r8
je SHORT $LN26@PMC_Compar
; 141 : PMC_STATUS_CODE result;
; 142 : if ((result = CheckNumber((NUMBER_HEADER*)u)) != PMC_STATUS_OK)
call CheckNumber
test eax, eax
jne SHORT $LN1@PMC_Compar
; 62 : if (u->IS_ZERO)
test BYTE PTR [rdi+40], 2
je SHORT $LN8@PMC_Compar
; 63 : {
; 64 : // u が 0 である場合
; 65 : if (v == 0)
; 66 : {
; 67 : // v が 0 である場合
; 68 : *w = 0;
; 69 : }
; 70 : else
; 71 : {
; 72 : // v が 0 でない場合
; 73 : *w = -1;
; 74 : }
; 75 : }
neg ebx
$LN18@PMC_Compar:
; 143 : return (result);
; 144 : _INT32_T w_temp;
; 145 : PMC_Compare_X_I_Imp((NUMBER_HEADER*)u, v, &w_temp);
; 146 : *w = w_temp;
sbb eax, eax
$LN20@PMC_Compar:
mov DWORD PTR [rsi], eax
; 147 : return (PMC_STATUS_OK);
xor eax, eax
; 148 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN8@PMC_Compar:
; 76 : else if (v == 0)
test ebx, ebx
je SHORT $LN27@PMC_Compar
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 601 : _BitScanReverse(&pos, x);
bsr eax, ebx
; 602 : #elif defined(__GNUC__)
; 603 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 604 : #else
; 605 : #error unknown compiler
; 606 : #endif
; 607 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 31
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; 85 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_32(v);
movsxd rax, ecx
mov ecx, 32 ; 00000020H
sub rcx, rax
; 86 : if (u_bit_count > v_bit_count)
cmp QWORD PTR [rdi+16], rcx
ja SHORT $LN27@PMC_Compar
; 87 : {
; 88 : // 明らかに u > v である場合
; 89 : *w = 1;
; 90 : }
; 91 : else if (u_bit_count < v_bit_count)
jae SHORT $LN16@PMC_Compar
; 92 : {
; 93 : // 明らかに u < v である場合
; 94 : *w = -1;
mov eax, -1
; 95 : }
jmp SHORT $LN20@PMC_Compar
$LN16@PMC_Compar:
; 96 : else
; 97 : {
; 98 : // u > 0 && v > 0 かつ u のビット長と v のビット長が等しい場合
; 99 : // ⇒ u と v はともに 1 ワードで表現できる
; 100 : if (u->BLOCK[0] > v)
mov rax, QWORD PTR [rdi+56]
cmp QWORD PTR [rax], rbx
jbe SHORT $LN18@PMC_Compar
$LN27@PMC_Compar:
; 143 : return (result);
; 144 : _INT32_T w_temp;
; 145 : PMC_Compare_X_I_Imp((NUMBER_HEADER*)u, v, &w_temp);
; 146 : *w = w_temp;
mov eax, 1
jmp SHORT $LN20@PMC_Compar
$LN26@PMC_Compar:
; 140 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_Compar:
; 148 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Compare_X_I ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_L_X
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Compare_L_X PROC ; COMDAT
; 269 : {
$LN61:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
; 270 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(u) * 8)
; 271 : {
; 272 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない
; 273 : return (PMC_STATUS_INTERNAL_ERROR);
; 274 : }
; 275 : if (v == NULL)
test rdx, rdx
je $LN58@PMC_Compar
; 276 : return (PMC_STATUS_ARGUMENT_ERROR);
; 277 : if (w == NULL)
test r8, r8
je $LN58@PMC_Compar
; 279 : PMC_STATUS_CODE result;
; 280 : if ((result = CheckNumber((NUMBER_HEADER*)v)) != PMC_STATUS_OK)
mov rcx, rdx
call CheckNumber
test eax, eax
jne $LN1@PMC_Compar
; 152 : if (u->IS_ZERO)
test BYTE PTR [rdi+40], 2
je SHORT $LN8@PMC_Compar
; 153 : {
; 154 : // u が 0 である場合
; 155 : if (v == 0)
test rbx, rbx
setne al
; 281 : return (result);
; 282 : _INT32_T w_temp;
; 283 : PMC_Compare_X_L_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 284 : *w = -w_temp;
mov DWORD PTR [rsi], eax
; 285 : return (PMC_STATUS_OK);
xor eax, eax
; 286 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN8@PMC_Compar:
; 166 : else if (v == 0)
test rbx, rbx
je SHORT $LN59@PMC_Compar
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 644 : _BitScanReverse64(&pos, x);
bsr rax, rbx
; 645 : #elif defined(__GNUC__)
; 646 : _UINT64_T pos;
; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x));
; 648 : #else
; 649 : #error unknown compiler
; 650 : #endif
; 651 : #else
; 652 : #error unknown platform
; 653 : #endif
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 63 ; 0000003fH
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; 242 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_UNIT((__UNIT_TYPE)v);
movsxd rax, ecx
mov ecx, 64 ; 00000040H
sub rcx, rax
; 243 : if (u_bit_count > v_bit_count)
cmp QWORD PTR [rdi+16], rcx
ja SHORT $LN59@PMC_Compar
; 244 : {
; 245 : // 明らかに u > v である場合
; 246 : *w = 1;
; 247 : }
; 248 : else if (u_bit_count < v_bit_count)
jae SHORT $LN40@PMC_Compar
; 249 : {
; 250 : // 明らかに u < v である場合
; 251 : *w = -1;
mov eax, 1
; 281 : return (result);
; 282 : _INT32_T w_temp;
; 283 : PMC_Compare_X_L_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 284 : *w = -w_temp;
mov DWORD PTR [rsi], eax
; 285 : return (PMC_STATUS_OK);
xor eax, eax
; 286 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN40@PMC_Compar:
; 257 : if (u->BLOCK[0] > v)
mov rax, QWORD PTR [rdi+56]
mov rcx, QWORD PTR [rax]
cmp rcx, rbx
jbe SHORT $LN42@PMC_Compar
$LN59@PMC_Compar:
; 281 : return (result);
; 282 : _INT32_T w_temp;
; 283 : PMC_Compare_X_L_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 284 : *w = -w_temp;
mov eax, -1
mov DWORD PTR [rsi], eax
; 285 : return (PMC_STATUS_OK);
xor eax, eax
; 286 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN42@PMC_Compar:
; 259 : else if (u->BLOCK[0] < v)
xor eax, eax
cmp rcx, rbx
setb al
; 281 : return (result);
; 282 : _INT32_T w_temp;
; 283 : PMC_Compare_X_L_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 284 : *w = -w_temp;
mov DWORD PTR [rsi], eax
; 285 : return (PMC_STATUS_OK);
xor eax, eax
; 286 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN58@PMC_Compar:
; 278 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_Compar:
; 286 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Compare_L_X ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT PMC_Compare_I_X
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Compare_I_X PROC ; COMDAT
; 111 : {
$LN29:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov edi, ecx
mov rsi, r8
mov rbx, rdx
; 112 : if (__UNIT_TYPE_BIT_COUNT < sizeof(u) * 8)
; 113 : {
; 114 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない
; 115 : return (PMC_STATUS_INTERNAL_ERROR);
; 116 : }
; 117 : if (v == NULL)
test rdx, rdx
je $LN26@PMC_Compar
; 118 : return (PMC_STATUS_ARGUMENT_ERROR);
; 119 : if (w == NULL)
test r8, r8
je $LN26@PMC_Compar
; 121 : PMC_STATUS_CODE result;
; 122 : if ((result = CheckNumber((NUMBER_HEADER*)v)) != PMC_STATUS_OK)
mov rcx, rdx
call CheckNumber
test eax, eax
jne $LN1@PMC_Compar
; 62 : if (u->IS_ZERO)
test BYTE PTR [rbx+40], 2
je SHORT $LN8@PMC_Compar
; 63 : {
; 64 : // u が 0 である場合
; 65 : if (v == 0)
; 66 : {
; 67 : // v が 0 である場合
; 68 : *w = 0;
; 69 : }
; 70 : else
; 71 : {
; 72 : // v が 0 でない場合
; 73 : *w = -1;
; 74 : }
; 75 : }
test edi, edi
setne al
; 123 : return (result);
; 124 : _INT32_T w_temp;
; 125 : PMC_Compare_X_I_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 126 : *w = -w_temp;
mov DWORD PTR [rsi], eax
; 127 : return (PMC_STATUS_OK);
xor eax, eax
; 128 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN8@PMC_Compar:
; 76 : else if (v == 0)
test edi, edi
je SHORT $LN27@PMC_Compar
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 601 : _BitScanReverse(&pos, x);
bsr eax, edi
; 602 : #elif defined(__GNUC__)
; 603 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 604 : #else
; 605 : #error unknown compiler
; 606 : #endif
; 607 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 31
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; 85 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_32(v);
movsxd rax, ecx
mov ecx, 32 ; 00000020H
sub rcx, rax
; 86 : if (u_bit_count > v_bit_count)
cmp QWORD PTR [rbx+16], rcx
ja SHORT $LN27@PMC_Compar
; 87 : {
; 88 : // 明らかに u > v である場合
; 89 : *w = 1;
; 90 : }
; 91 : else if (u_bit_count < v_bit_count)
jae SHORT $LN16@PMC_Compar
; 92 : {
; 93 : // 明らかに u < v である場合
; 94 : *w = -1;
mov eax, 1
; 123 : return (result);
; 124 : _INT32_T w_temp;
; 125 : PMC_Compare_X_I_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 126 : *w = -w_temp;
mov DWORD PTR [rsi], eax
; 127 : return (PMC_STATUS_OK);
xor eax, eax
; 128 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN16@PMC_Compar:
; 100 : if (u->BLOCK[0] > v)
mov rax, QWORD PTR [rbx+56]
mov rdx, QWORD PTR [rax]
cmp rdx, rdi
jbe SHORT $LN18@PMC_Compar
$LN27@PMC_Compar:
; 123 : return (result);
; 124 : _INT32_T w_temp;
; 125 : PMC_Compare_X_I_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 126 : *w = -w_temp;
mov eax, -1
mov DWORD PTR [rsi], eax
; 127 : return (PMC_STATUS_OK);
xor eax, eax
; 128 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN18@PMC_Compar:
; 102 : else if (u->BLOCK[0] < v)
xor eax, eax
cmp rdx, rdi
setb al
; 123 : return (result);
; 124 : _INT32_T w_temp;
; 125 : PMC_Compare_X_I_Imp((NUMBER_HEADER*)v, u, &w_temp);
; 126 : *w = -w_temp;
mov DWORD PTR [rsi], eax
; 127 : return (PMC_STATUS_OK);
xor eax, eax
; 128 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN26@PMC_Compar:
; 120 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_Compar:
; 128 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Compare_I_X ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT Initialize_Compare
_TEXT SEGMENT
feature$ = 8
Initialize_Compare PROC ; COMDAT
; 356 : return (PMC_STATUS_OK);
xor eax, eax
; 357 : }
ret 0
Initialize_Compare ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_compare.c
; COMDAT Compare_Imp
_TEXT SEGMENT
u$ = 8
v$ = 16
count$ = 24
Compare_Imp PROC ; COMDAT
; 40 : u += count;
lea rax, QWORD PTR [r8*8]
add rcx, rax
; 41 : v += count;
add rdx, rax
; 42 : while (count > 0)
test r8, r8
je SHORT $LN3@Compare_Im
npad 13
$LL2@Compare_Im:
; 43 : {
; 44 : --u;
; 45 : --v;
; 46 : --count;
; 47 :
; 48 : if (*u > *v)
mov rax, QWORD PTR [rcx-8]
lea rcx, QWORD PTR [rcx-8]
lea rdx, QWORD PTR [rdx-8]
dec r8
cmp rax, QWORD PTR [rdx]
ja SHORT $LN10@Compare_Im
; 50 : else if (*u < *v)
jb SHORT $LN11@Compare_Im
; 42 : while (count > 0)
test r8, r8
jne SHORT $LL2@Compare_Im
$LN3@Compare_Im:
; 52 : else
; 53 : {
; 54 : }
; 55 : }
; 56 : return (0);
xor eax, eax
; 57 : }
ret 0
$LN11@Compare_Im:
; 51 : return (-1);
mov eax, -1
; 57 : }
ret 0
$LN10@Compare_Im:
; 49 : return (1);
mov eax, 1
; 57 : }
ret 0
Compare_Imp ENDP
_TEXT ENDS
END
|
examples/loop.asm | rdeioris/impostor | 2 | 16272 | <filename>examples/loop.asm
.ORG $C000
; check overflow
LDX #$00;
DEX
CLI ; enable IRQ
; activate timer
LDA #$ef
STA $b000
loop:
JMP loop
nmi:
RTI
reset:
RTI
irq:
RTI
.SEGMENT "VECTORS"
.WORD nmi ; $fffa
.WORD reset ; $fffc
.WORD irq ; $fffe
|
archive/agda-1/PairUnifier.agda | m0davis/oscar | 0 | 10746 |
module PairUnifier where
record PairUnifier {t} {T : Set t} (t₁ t₂ : T) : Set t where
field
|
35_Window_Events/LWindow.asm | DebugBSD/SDLExamples | 3 | 241410 | <reponame>DebugBSD/SDLExamples
include LWindow.inc
.code
; Constructor
LWindow_ctor proc uses rsi, pWindow:PTR LWindow
mov rsi, pWindow
; Window data
mov (LWindow PTR[rsi]).m_pWindow, 0
; Window dimensions
mov (LWindow PTR[rsi]).m_Width, 0
mov (LWindow PTR[rsi]).m_Height, 0
; Window focus
mov (LWindow PTR[rsi]).m_MouseFocus, 0
mov (LWindow PTR[rsi]).m_KeyboardFocus, 0
mov (LWindow PTR[rsi]).m_FullScreen, 0
mov (LWindow PTR[rsi]).m_Minimized, 0
ret
LWindow_ctor endp
; Destructor
LWindow_dtor proc uses rsi, pWindow:PTR LWindow
mov (LWindow PTR[rsi]).m_pWindow, 0
; Window dimensions
mov (LWindow PTR[rsi]).m_Width, 0
mov (LWindow PTR[rsi]).m_Height, 0
; Window focus
mov (LWindow PTR[rsi]).m_MouseFocus, 0
mov (LWindow PTR[rsi]).m_KeyboardFocus, 0
mov (LWindow PTR[rsi]).m_FullScreen, 0
mov (LWindow PTR[rsi]).m_Minimized, 0
ret
LWindow_dtor endp
; Init window
LWindow_init proc uses rsi, pWindow:PTR LWindow
invoke SDL_CreateWindow,
addr WINDOW_TITLE,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
SCREEN_WIDTH,
SCREEN_HEIGHT,
SDL_WINDOW_SHOWN
.if rax==0
jmp EXIT
.endif
mov rsi, pWindow
mov (LWindow PTR[rsi]).m_pWindow, rax
mov (LWindow PTR[rsi]).m_MouseFocus, 1
mov (LWindow PTR[rsi]).m_KeyboardFocus, 1
mov (LWindow PTR[rsi]).m_Width, SCREEN_WIDTH
mov (LWindow PTR[rsi]).m_Height, SCREEN_HEIGHT
EXIT:
ret
LWindow_init endp
; Create Renderer
LWindow_createRenderer proc uses rsi, pWindow:PTR LWindow
; Create the renderer
mov rsi, pWindow
invoke SDL_CreateRenderer, (LWindow PTR [rsi]).m_pWindow, -1, SDL_RENDERER_ACCELERATED OR SDL_RENDERER_PRESENTVSYNC
ret
LWindow_createRenderer endp
;Handle Input events
LWindow_handleEvent proc uses rax rbx rsi rdi r10, pWindow:PTR LWindow, evt:PTR SDL_Event
mov rsi, pWindow
mov rdi, evt
.if (SDL_Event PTR [rdi]).type_ == SDL_WINDOWEVENT
; Caption update flag
xor r10, r10
.if (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_SIZE_CHANGED
mov eax, (SDL_Event PTR [rdi]).window.data1
mov ebx, (SDL_Event PTR [rdi]).window.data2
mov (LWindow PTR [rsi]).m_Width, eax
mov (LWindow PTR [rsi]).m_Height, ebx
invoke SDL_RenderPresent, gRenderer
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_EXPOSED
invoke SDL_RenderPresent, gRenderer
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_ENTER
mov (LWindow PTR [rsi]).m_MouseFocus, 1
mov r10, 1
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_LEAVE
mov (LWindow PTR [rsi]).m_MouseFocus, 0
mov r10, 1
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_FOCUS_GAINED
mov (LWindow PTR [rsi]).m_KeyboardFocus, 1
mov r10, 1
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_FOCUS_LOST
mov (LWindow PTR [rsi]).m_KeyboardFocus, 0
mov r10, 1
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_MINIMIZED
mov (LWindow PTR [rsi]).m_Minimized, 1
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_MAXIMIZED
mov (LWindow PTR [rsi]).m_Minimized, 0
.elseif (SDL_Event PTR [rdi]).window.event == SDL_WINDOWEVENT_RESTORED
mov (LWindow PTR [rsi]).m_Minimized, 0
.endif
.if r10==1
; Update window caption with new data
.endif
.elseif (SDL_Event PTR [rdi]).type_ == SDL_KEYDOWN && (SDL_Event PTR [rdi]).key.keysym.sym == SDLK_RETURN
.if (LWindow PTR [rsi]).m_Fullscreen == 1
invoke SDL_SetWindowFullscreen, (LWindow PTR [rsi]).m_pWindow, SDL_FALSE
mov (LWindow PTR [rsi]).m_Fullscreen, 0
.else
invoke SDL_SetWindowFullscreen, (LWindow PTR [rsi]).m_pWindow, SDL_TRUE
mov (LWindow PTR [rsi]).m_Fullscreen, 1
mov (LWindow PTR [rsi]).m_Minimized, 0
.endif
.endif
ret
LWindow_handleEvent endp
|
data/pokemon/base_stats/roselia.asm | AtmaBuster/pokeplat-gen2 | 6 | 83971 | db 0 ; species ID placeholder
db 50, 60, 45, 65, 100, 80
; hp atk def spd sat sdf
db GRASS, POISON ; type
db 150 ; catch rate
db 152 ; base exp
db NO_ITEM, POISON_BARB ; items
db GENDER_F50 ; gender ratio
db 20 ; step cycles to hatch
INCBIN "gfx/pokemon/roselia/front.dimensions"
db GROWTH_MEDIUM_SLOW ; growth rate
dn EGG_FAIRY, EGG_PLANT ; egg groups
db 70 ; happiness
; tm/hm learnset
tmhm TOXIC, BULLET_SEED, HIDDEN_POWER, SUNNY_DAY, PROTECT, RAIN_DANCE, GIGA_DRAIN, FRUSTRATION, SOLARBEAM, RETURN, SHADOW_BALL, DOUBLE_TEAM, SLUDGE_BOMB, FACADE, SECRET_POWER, FACADE, SECRET_POWER, REST, ATTRACT, ENERGY_BALL, ENDURE, FLASH, SWORDS_DANCE, PSYCH_UP, CAPTIVATE, SLEEP_TALK, NATURAL_GIFT, POISON_JAB, GRASS_KNOT, SWAGGER, SUBSTITUTE, CUT, FURY_CUTTER, MUD_SLAP, SEED_BOMB, SNORE, SWIFT, SYNTHESIS
; end
|
programs/oeis/234/A234272.asm | jmorken/loda | 1 | 171349 | <gh_stars>1-10
; A234272: G.f.: (1+4*x+x^2)/(1-4*x+x^2).
; 1,8,32,120,448,1672,6240,23288,86912,324360,1210528,4517752,16860480,62924168,234836192,876420600,3270846208,12206964232,45557010720,170021078648,634527303872,2368088136840,8837825243488,32983212837112,123095026104960,459396891582728,1714492540225952,6398573269321080
mov $1,4
lpb $0
sub $0,1
add $2,$1
add $2,$1
add $1,$2
lpe
mov $1,1
mov $3,$2
trn $3,1
add $1,$3
|
libsrc/_DEVELOPMENT/adt/w_vector/c/sdcc_iy/w_vector_init_callee.asm | meesokim/z88dk | 0 | 170356 |
; w_vector_t *w_vector_init_callee(void *p, size_t capacity, size_t max_size)
SECTION code_adt_w_vector
PUBLIC _w_vector_init_callee
_w_vector_init_callee:
pop hl
pop de
pop bc
ex (sp),hl
INCLUDE "adt/w_vector/z80/asm_w_vector_init.asm"
|
P6/data_P6/testpoint/testpoint16.asm | alxzzhou/BUAA_CO_2020 | 1 | 242212 | ori $1, $0, 7
ori $2, $0, 1
ori $3, $0, 11
ori $4, $0, 9
sw $2, 0($0)
sw $3, 4($0)
sw $4, 8($0)
sw $4, 12($0)
sw $3, 16($0)
sw $3, 20($0)
sw $2, 24($0)
sw $4, 28($0)
sw $1, 32($0)
sw $3, 36($0)
sw $2, 40($0)
sw $2, 44($0)
sw $4, 48($0)
sw $1, 52($0)
sw $3, 56($0)
sw $2, 60($0)
sw $1, 64($0)
sw $3, 68($0)
sw $1, 72($0)
sw $4, 76($0)
sw $4, 80($0)
sw $4, 84($0)
sw $3, 88($0)
sw $1, 92($0)
sw $2, 96($0)
sw $4, 100($0)
sw $3, 104($0)
sw $1, 108($0)
sw $4, 112($0)
sw $2, 116($0)
sw $2, 120($0)
sw $4, 124($0)
lbu $3, 0($2)
mtlo $2
mflo $2
mfhi $4
TAG1:
srav $4, $4, $4
mult $4, $4
mtlo $4
and $1, $4, $4
TAG2:
lui $1, 2
mfhi $4
lui $4, 11
mfhi $3
TAG3:
sltu $1, $3, $3
lh $1, 0($3)
lui $3, 13
lui $3, 7
TAG4:
nor $1, $3, $3
mflo $1
sw $1, 0($1)
mthi $1
TAG5:
sw $1, 0($1)
sw $1, 0($1)
bgtz $1, TAG6
multu $1, $1
TAG6:
srlv $1, $1, $1
lh $1, 0($1)
lui $4, 3
bne $4, $1, TAG7
TAG7:
addiu $3, $4, 4
mult $3, $4
divu $4, $4
lui $4, 11
TAG8:
beq $4, $4, TAG9
mflo $1
ori $4, $4, 3
lb $1, 0($4)
TAG9:
xor $2, $1, $1
xor $2, $1, $2
multu $2, $1
sltu $2, $2, $1
TAG10:
mult $2, $2
beq $2, $2, TAG11
sb $2, 0($2)
lui $3, 15
TAG11:
sltiu $4, $3, 7
sltiu $3, $3, 12
mflo $4
multu $3, $4
TAG12:
mult $4, $4
bgtz $4, TAG13
subu $2, $4, $4
bne $4, $4, TAG13
TAG13:
lw $2, 0($2)
blez $2, TAG14
multu $2, $2
divu $2, $2
TAG14:
bne $2, $2, TAG15
sw $2, 0($2)
blez $2, TAG15
mflo $4
TAG15:
multu $4, $4
bgtz $4, TAG16
mthi $4
sra $3, $4, 2
TAG16:
addu $4, $3, $3
mult $3, $4
mult $3, $4
nor $2, $4, $3
TAG17:
bgtz $2, TAG18
xor $3, $2, $2
lbu $1, 0($3)
mthi $2
TAG18:
mult $1, $1
xori $4, $1, 10
mflo $3
lui $3, 14
TAG19:
bltz $3, TAG20
sll $0, $0, 0
mthi $1
bne $1, $1, TAG20
TAG20:
sb $1, 0($1)
mtlo $1
bgez $1, TAG21
lui $1, 2
TAG21:
sra $2, $1, 14
mtlo $2
lui $4, 11
beq $2, $4, TAG22
TAG22:
xor $1, $4, $4
sb $4, 0($1)
sll $0, $0, 0
srlv $3, $1, $1
TAG23:
sb $3, 0($3)
lhu $1, 0($3)
sh $1, 0($1)
mult $1, $3
TAG24:
lhu $4, 0($1)
mfhi $3
lui $3, 13
beq $3, $4, TAG25
TAG25:
mflo $4
mult $4, $4
lui $3, 5
sltu $2, $4, $3
TAG26:
sb $2, 0($2)
div $2, $2
slti $2, $2, 14
andi $2, $2, 7
TAG27:
mtlo $2
addu $2, $2, $2
mult $2, $2
lui $4, 1
TAG28:
lui $2, 11
addiu $1, $2, 7
andi $1, $2, 2
mflo $4
TAG29:
bne $4, $4, TAG30
sw $4, 0($4)
srav $2, $4, $4
lb $2, 0($2)
TAG30:
mflo $2
bgez $2, TAG31
mflo $1
sb $2, 0($1)
TAG31:
lw $1, 0($1)
srav $2, $1, $1
lb $3, 0($2)
sb $2, 0($1)
TAG32:
srlv $2, $3, $3
xori $1, $2, 13
sh $1, 0($3)
lw $1, 0($3)
TAG33:
sb $1, 0($1)
sllv $2, $1, $1
mult $2, $2
bne $1, $1, TAG34
TAG34:
lui $1, 15
lui $4, 7
sll $0, $0, 0
mthi $2
TAG35:
beq $4, $4, TAG36
mfhi $4
mflo $2
divu $2, $2
TAG36:
lui $4, 5
lui $1, 8
bne $2, $4, TAG37
sll $0, $0, 0
TAG37:
beq $1, $1, TAG38
mtlo $1
bgez $1, TAG38
div $1, $1
TAG38:
lui $1, 12
srav $4, $1, $1
bltz $1, TAG39
mfhi $2
TAG39:
lui $1, 6
sll $0, $0, 0
lui $2, 7
mfhi $4
TAG40:
multu $4, $4
mflo $4
mtlo $4
blez $4, TAG41
TAG41:
mflo $4
bltz $4, TAG42
sll $0, $0, 0
lui $2, 7
TAG42:
lui $2, 4
sll $0, $0, 0
xori $2, $2, 3
multu $2, $2
TAG43:
bgez $2, TAG44
sll $0, $0, 0
beq $2, $2, TAG44
mtlo $2
TAG44:
sll $0, $0, 0
divu $2, $2
lui $2, 9
sll $0, $0, 0
TAG45:
lui $2, 10
lui $2, 5
or $4, $2, $2
sll $0, $0, 0
TAG46:
sll $0, $0, 0
bne $2, $2, TAG47
sll $0, $0, 0
mflo $1
TAG47:
bne $1, $1, TAG48
lui $1, 11
div $1, $1
mflo $4
TAG48:
bne $4, $4, TAG49
slt $1, $4, $4
lhu $1, 0($1)
mfhi $4
TAG49:
sh $4, 0($4)
addiu $1, $4, 10
addu $3, $1, $1
bne $1, $3, TAG50
TAG50:
divu $3, $3
mult $3, $3
mflo $4
sra $1, $4, 10
TAG51:
mthi $1
bgez $1, TAG52
lh $2, 0($1)
mtlo $1
TAG52:
mtlo $2
lui $3, 2
sll $0, $0, 0
sb $2, 0($2)
TAG53:
mthi $3
lui $4, 14
mthi $4
sll $0, $0, 0
TAG54:
sll $0, $0, 0
blez $4, TAG55
lui $1, 7
mtlo $4
TAG55:
sll $0, $0, 0
lui $2, 12
subu $4, $2, $3
div $2, $1
TAG56:
sll $0, $0, 0
mflo $3
lui $2, 3
mflo $2
TAG57:
mtlo $2
beq $2, $2, TAG58
mtlo $2
xori $1, $2, 10
TAG58:
bne $1, $1, TAG59
sll $0, $0, 0
sll $1, $1, 8
srl $2, $1, 4
TAG59:
mthi $2
bne $2, $2, TAG60
sll $4, $2, 9
mfhi $3
TAG60:
addu $2, $3, $3
srav $2, $3, $2
sll $0, $0, 0
lui $1, 6
TAG61:
mtlo $1
divu $1, $1
mflo $3
sll $0, $0, 0
TAG62:
mtlo $1
sll $0, $0, 0
bltz $3, TAG63
subu $3, $3, $3
TAG63:
mfhi $2
multu $3, $2
sw $3, 0($2)
lb $3, 0($2)
TAG64:
lui $2, 14
lui $3, 9
mflo $4
and $1, $2, $4
TAG65:
sltiu $4, $1, 1
multu $4, $1
sub $1, $1, $1
lui $4, 3
TAG66:
sll $4, $4, 8
sll $0, $0, 0
div $4, $4
sll $0, $0, 0
TAG67:
mfhi $2
bne $2, $2, TAG68
mtlo $2
mult $2, $2
TAG68:
mthi $2
beq $2, $2, TAG69
mthi $2
bne $2, $2, TAG69
TAG69:
lui $2, 15
mfhi $4
mthi $2
sll $0, $0, 0
TAG70:
lui $2, 15
bltz $1, TAG71
lui $4, 7
xori $2, $1, 9
TAG71:
lbu $3, 0($2)
sltu $4, $3, $2
slti $2, $2, 8
mtlo $4
TAG72:
mfhi $1
sll $0, $0, 0
lh $3, 0($2)
mflo $1
TAG73:
mflo $1
lui $3, 2
addu $3, $3, $3
blez $1, TAG74
TAG74:
sll $0, $0, 0
mthi $3
beq $3, $3, TAG75
slt $2, $3, $1
TAG75:
mthi $2
bne $2, $2, TAG76
nor $4, $2, $2
add $4, $2, $4
TAG76:
mult $4, $4
sll $2, $4, 2
sltu $1, $2, $4
lui $3, 5
TAG77:
xori $1, $3, 7
sll $0, $0, 0
lui $4, 8
bgez $1, TAG78
TAG78:
slt $3, $4, $4
sll $0, $0, 0
slti $1, $3, 11
mtlo $4
TAG79:
lb $2, 0($1)
mult $2, $2
mtlo $1
sltu $2, $2, $1
TAG80:
sra $2, $2, 0
xor $3, $2, $2
sb $3, 0($2)
lb $3, 0($2)
TAG81:
beq $3, $3, TAG82
sltu $3, $3, $3
beq $3, $3, TAG82
sltiu $2, $3, 5
TAG82:
blez $2, TAG83
mfhi $4
mtlo $2
bltz $4, TAG83
TAG83:
mflo $3
lui $3, 11
beq $3, $4, TAG84
lbu $1, 0($4)
TAG84:
sh $1, 0($1)
lui $2, 9
multu $2, $1
mult $2, $2
TAG85:
divu $2, $2
mfhi $1
bgez $1, TAG86
sll $2, $1, 7
TAG86:
bgez $2, TAG87
srav $3, $2, $2
lui $1, 6
lhu $3, 0($3)
TAG87:
lhu $3, 0($3)
sra $2, $3, 5
sb $3, 0($3)
lbu $1, 0($3)
TAG88:
addu $2, $1, $1
blez $1, TAG89
multu $2, $1
lbu $2, 0($1)
TAG89:
sra $3, $2, 2
lui $2, 9
mtlo $3
mfhi $1
TAG90:
lui $1, 11
lui $4, 11
lui $3, 13
lui $2, 15
TAG91:
sll $0, $0, 0
sll $0, $0, 0
blez $2, TAG92
sll $0, $0, 0
TAG92:
multu $2, $2
blez $2, TAG93
mtlo $2
bgez $2, TAG93
TAG93:
sra $2, $2, 13
srlv $1, $2, $2
sra $3, $2, 3
mult $1, $2
TAG94:
mthi $3
mthi $3
lw $2, 0($3)
bgez $2, TAG95
TAG95:
lhu $3, 0($2)
bne $2, $3, TAG96
lbu $3, 0($3)
mflo $1
TAG96:
bltz $1, TAG97
mthi $1
bne $1, $1, TAG97
srl $1, $1, 10
TAG97:
multu $1, $1
lbu $1, 0($1)
addiu $3, $1, 12
lui $4, 12
TAG98:
bne $4, $4, TAG99
addu $4, $4, $4
sll $0, $0, 0
mthi $4
TAG99:
bgtz $4, TAG100
sll $0, $0, 0
divu $4, $4
bgtz $4, TAG100
TAG100:
sll $0, $0, 0
mthi $4
beq $4, $4, TAG101
sll $0, $0, 0
TAG101:
sh $1, 0($1)
mfhi $1
subu $3, $1, $1
mfhi $4
TAG102:
multu $4, $4
bgtz $4, TAG103
srl $3, $4, 9
beq $4, $4, TAG103
TAG103:
addiu $4, $3, 11
blez $4, TAG104
mfhi $1
mtlo $1
TAG104:
lui $2, 3
mflo $4
sll $0, $0, 0
lhu $4, -3072($3)
TAG105:
lh $3, 0($4)
nor $1, $3, $3
multu $3, $4
mthi $4
TAG106:
beq $1, $1, TAG107
lui $1, 14
lui $1, 15
beq $1, $1, TAG107
TAG107:
sll $0, $0, 0
sll $0, $0, 0
bltz $4, TAG108
sll $0, $0, 0
TAG108:
mthi $3
mflo $2
lui $4, 6
sh $3, 0($3)
TAG109:
lui $3, 1
srav $4, $4, $4
divu $3, $4
mflo $4
TAG110:
sra $4, $4, 12
mtlo $4
bne $4, $4, TAG111
sw $4, 0($4)
TAG111:
bgez $4, TAG112
sb $4, 0($4)
lh $4, 0($4)
addiu $2, $4, 6
TAG112:
mtlo $2
lui $3, 12
multu $2, $3
sll $0, $0, 0
TAG113:
sll $0, $0, 0
sll $0, $0, 0
mflo $4
sw $3, 0($4)
TAG114:
bne $4, $4, TAG115
mfhi $1
mflo $3
beq $3, $4, TAG115
TAG115:
lui $1, 10
lui $3, 10
lui $2, 0
slt $2, $1, $3
TAG116:
mfhi $1
mthi $1
mfhi $1
ori $3, $1, 8
TAG117:
lh $1, 0($3)
bne $3, $3, TAG118
addu $4, $1, $1
mult $1, $1
TAG118:
multu $4, $4
and $2, $4, $4
bgez $2, TAG119
or $3, $2, $2
TAG119:
mult $3, $3
div $3, $3
lui $2, 12
xori $2, $2, 15
TAG120:
mult $2, $2
lui $1, 11
divu $2, $1
sll $0, $0, 0
TAG121:
mflo $2
nor $1, $2, $2
srl $1, $2, 0
subu $4, $1, $1
TAG122:
bgez $4, TAG123
mfhi $3
divu $4, $4
slti $3, $3, 7
TAG123:
lui $2, 10
sra $4, $3, 9
sll $0, $0, 0
sll $0, $0, 0
TAG124:
addu $4, $4, $4
beq $4, $4, TAG125
lui $3, 0
multu $4, $3
TAG125:
lhu $4, 0($3)
mflo $1
sw $1, 0($3)
mfhi $4
TAG126:
beq $4, $4, TAG127
addu $1, $4, $4
bltz $4, TAG127
sh $1, 0($4)
TAG127:
multu $1, $1
bltz $1, TAG128
divu $1, $1
lui $4, 9
TAG128:
sllv $1, $4, $4
xor $3, $1, $1
blez $4, TAG129
sub $1, $1, $3
TAG129:
sll $0, $0, 0
mult $1, $1
mflo $1
mflo $1
TAG130:
beq $1, $1, TAG131
lui $1, 3
sub $4, $1, $1
bne $4, $4, TAG131
TAG131:
mthi $4
lui $3, 3
bgtz $4, TAG132
xori $3, $4, 15
TAG132:
sll $0, $0, 0
slt $3, $3, $3
multu $3, $3
mflo $1
TAG133:
andi $1, $1, 4
lui $3, 15
slt $4, $1, $1
xor $1, $1, $3
TAG134:
multu $1, $1
div $1, $1
bgez $1, TAG135
sltiu $3, $1, 9
TAG135:
lh $1, 0($3)
mtlo $1
lb $4, 0($3)
lui $1, 11
TAG136:
mfhi $1
sltiu $3, $1, 5
lui $3, 8
srl $4, $1, 1
TAG137:
sh $4, 0($4)
mthi $4
mfhi $4
bgez $4, TAG138
TAG138:
sb $4, 0($4)
sw $4, 0($4)
lui $3, 13
sll $0, $0, 0
TAG139:
bltz $3, TAG140
divu $3, $3
lui $1, 14
lui $1, 11
TAG140:
subu $2, $1, $1
sw $1, 0($2)
addiu $3, $1, 4
lui $1, 5
TAG141:
subu $4, $1, $1
lui $4, 2
mflo $3
mflo $2
TAG142:
mtlo $2
mtlo $2
sb $2, 0($2)
bne $2, $2, TAG143
TAG143:
lb $3, 0($2)
lb $1, 0($2)
lui $3, 0
mult $2, $3
TAG144:
mflo $2
mtlo $3
sllv $4, $2, $2
lui $4, 13
TAG145:
sll $0, $0, 0
nor $4, $3, $3
srav $2, $3, $4
addiu $1, $4, 8
TAG146:
mfhi $2
bgtz $2, TAG147
lh $4, 0($2)
sb $2, 0($1)
TAG147:
and $1, $4, $4
lw $1, -256($1)
mthi $1
lui $2, 7
TAG148:
or $2, $2, $2
sltu $3, $2, $2
sll $4, $2, 11
sll $0, $0, 0
TAG149:
srav $4, $4, $4
multu $4, $4
sll $0, $0, 0
multu $4, $4
TAG150:
mtlo $1
mult $1, $1
sll $0, $0, 0
lui $3, 2
TAG151:
mfhi $4
lui $3, 8
lb $1, 0($4)
bgez $4, TAG152
TAG152:
srl $1, $1, 13
blez $1, TAG153
sb $1, 0($1)
mflo $3
TAG153:
sll $2, $3, 9
andi $3, $2, 2
andi $1, $3, 12
lui $4, 9
TAG154:
lui $2, 9
slti $1, $4, 12
sll $0, $0, 0
or $3, $1, $4
TAG155:
mflo $1
mfhi $4
mfhi $1
sra $3, $1, 14
TAG156:
bne $3, $3, TAG157
sh $3, 0($3)
lui $4, 11
mfhi $2
TAG157:
mfhi $2
sb $2, 0($2)
lb $1, 0($2)
sra $3, $2, 7
TAG158:
bgez $3, TAG159
mflo $1
mthi $3
mult $1, $3
TAG159:
sll $0, $0, 0
nor $4, $1, $1
lui $3, 12
lui $3, 7
TAG160:
mthi $3
sll $0, $0, 0
addiu $3, $3, 13
sll $0, $0, 0
TAG161:
bltz $3, TAG162
sll $0, $0, 0
sll $0, $0, 0
mthi $3
TAG162:
bne $3, $3, TAG163
lui $2, 8
subu $2, $2, $3
sll $0, $0, 0
TAG163:
sll $0, $0, 0
slti $3, $3, 8
bne $3, $3, TAG164
sh $3, 0($3)
TAG164:
addu $4, $3, $3
mfhi $4
mfhi $2
beq $4, $3, TAG165
TAG165:
lui $1, 10
lui $2, 2
beq $2, $1, TAG166
mfhi $1
TAG166:
blez $1, TAG167
sll $0, $0, 0
mtlo $1
mfhi $1
TAG167:
sllv $3, $1, $1
bgez $1, TAG168
sll $0, $0, 0
sw $2, 0($2)
TAG168:
mflo $4
lui $3, 14
sll $0, $0, 0
mflo $2
TAG169:
bgez $2, TAG170
lui $4, 13
divu $4, $4
bne $2, $2, TAG170
TAG170:
sll $0, $0, 0
sll $0, $0, 0
lui $2, 0
beq $4, $2, TAG171
TAG171:
mflo $4
lb $2, 0($2)
bgtz $4, TAG172
sltu $1, $2, $2
TAG172:
mthi $1
beq $1, $1, TAG173
sllv $2, $1, $1
mtlo $2
TAG173:
bne $2, $2, TAG174
xor $2, $2, $2
mult $2, $2
beq $2, $2, TAG174
TAG174:
multu $2, $2
lui $1, 6
lbu $4, 0($2)
lui $2, 15
TAG175:
beq $2, $2, TAG176
sll $0, $0, 0
mult $2, $2
lui $1, 14
TAG176:
mfhi $2
sb $1, 0($2)
sb $2, 0($2)
mtlo $2
TAG177:
lui $1, 7
sh $1, 0($2)
mfhi $3
sll $0, $0, 0
TAG178:
bltz $3, TAG179
addi $4, $3, 7
bltz $4, TAG179
lui $2, 12
TAG179:
xor $3, $2, $2
bltz $2, TAG180
mtlo $3
lui $2, 15
TAG180:
sltiu $3, $2, 11
mflo $4
mfhi $3
mthi $3
TAG181:
slti $2, $3, 8
srl $3, $2, 9
andi $1, $3, 4
srlv $3, $3, $3
TAG182:
mfhi $3
mult $3, $3
mthi $3
bne $3, $3, TAG183
TAG183:
mfhi $4
lbu $1, 0($3)
lui $3, 1
lui $2, 4
TAG184:
sll $0, $0, 0
div $2, $2
bltz $2, TAG185
srav $1, $2, $2
TAG185:
sllv $1, $1, $1
slt $1, $1, $1
mfhi $3
sw $1, 0($1)
TAG186:
lui $2, 14
lui $1, 2
mfhi $3
mult $3, $2
TAG187:
bltz $3, TAG188
sub $4, $3, $3
slt $1, $3, $3
bltz $1, TAG188
TAG188:
sb $1, 0($1)
beq $1, $1, TAG189
mflo $2
lui $2, 13
TAG189:
sub $3, $2, $2
bne $2, $3, TAG190
lui $1, 4
ori $4, $3, 6
TAG190:
mthi $4
xor $4, $4, $4
bgtz $4, TAG191
multu $4, $4
TAG191:
and $1, $4, $4
lui $4, 0
sltu $1, $4, $4
mflo $3
TAG192:
xor $1, $3, $3
sllv $3, $1, $3
beq $3, $1, TAG193
xor $3, $3, $3
TAG193:
lui $3, 3
mflo $4
sll $0, $0, 0
mflo $3
TAG194:
addiu $2, $3, 0
bne $3, $3, TAG195
srlv $3, $3, $2
mthi $2
TAG195:
lbu $1, 0($3)
multu $1, $3
mult $1, $3
lh $3, 0($1)
TAG196:
beq $3, $3, TAG197
mflo $4
lh $1, 0($3)
divu $1, $3
TAG197:
multu $1, $1
bne $1, $1, TAG198
addi $4, $1, 4
multu $1, $1
TAG198:
beq $4, $4, TAG199
lui $2, 14
mtlo $2
multu $4, $4
TAG199:
mflo $2
multu $2, $2
mult $2, $2
lh $4, 0($2)
TAG200:
mthi $4
mfhi $3
bgtz $3, TAG201
sltu $1, $4, $3
TAG201:
mflo $4
subu $4, $4, $1
mtlo $1
lui $3, 8
TAG202:
lui $3, 13
srlv $4, $3, $3
sll $0, $0, 0
mfhi $3
TAG203:
mflo $4
srav $4, $3, $4
mult $4, $4
sw $4, 0($3)
TAG204:
beq $4, $4, TAG205
lui $4, 10
sh $4, 0($4)
sb $4, 0($4)
TAG205:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
subu $3, $2, $4
TAG206:
sll $0, $0, 0
slti $2, $3, 1
ori $4, $2, 2
sll $0, $0, 0
TAG207:
lbu $4, 0($4)
mthi $4
multu $4, $4
mult $4, $4
TAG208:
mthi $4
mthi $4
bgez $4, TAG209
mfhi $2
TAG209:
lhu $4, 0($2)
mthi $2
lw $1, 0($2)
lui $2, 9
TAG210:
mflo $3
beq $3, $3, TAG211
lh $2, 0($3)
bltz $2, TAG211
TAG211:
multu $2, $2
lh $4, 0($2)
beq $4, $4, TAG212
sh $2, 0($4)
TAG212:
mfhi $1
multu $4, $1
mtlo $4
lui $2, 13
TAG213:
sll $0, $0, 0
sll $0, $0, 0
lui $4, 13
sll $0, $0, 0
TAG214:
mtlo $4
nor $1, $4, $4
slt $1, $4, $4
mfhi $2
TAG215:
mtlo $2
mflo $2
xor $3, $2, $2
lui $3, 15
TAG216:
bne $3, $3, TAG217
nor $4, $3, $3
mtlo $3
sll $0, $0, 0
TAG217:
div $4, $4
bgtz $4, TAG218
mtlo $4
mfhi $1
TAG218:
lhu $1, 0($1)
multu $1, $1
lbu $2, 0($1)
lui $4, 15
TAG219:
mthi $4
lui $3, 14
mflo $4
mthi $4
TAG220:
beq $4, $4, TAG221
xori $2, $4, 14
srav $1, $4, $2
bltz $4, TAG221
TAG221:
andi $1, $1, 1
lui $1, 4
lui $3, 9
sll $0, $0, 0
TAG222:
sll $0, $0, 0
subu $4, $3, $3
multu $3, $4
multu $4, $3
TAG223:
nor $4, $4, $4
mult $4, $4
lb $1, 1($4)
mult $4, $1
TAG224:
lb $1, 0($1)
blez $1, TAG225
lh $1, 0($1)
slt $4, $1, $1
TAG225:
div $4, $4
sb $4, 1($4)
sw $4, 1($4)
lh $2, 1($4)
TAG226:
sll $0, $0, 0
addu $2, $4, $4
addiu $1, $4, 15
srlv $2, $1, $4
TAG227:
mthi $2
addiu $1, $2, 2
mflo $3
beq $2, $3, TAG228
TAG228:
mfhi $1
addu $2, $3, $1
bltz $1, TAG229
xori $4, $3, 14
TAG229:
mtlo $4
blez $4, TAG230
mthi $4
lbu $4, 0($4)
TAG230:
mult $4, $4
beq $4, $4, TAG231
mflo $2
mfhi $2
TAG231:
sw $2, 0($2)
slt $4, $2, $2
bgtz $2, TAG232
multu $4, $4
TAG232:
lui $2, 6
sll $0, $0, 0
lui $3, 1
mult $2, $4
TAG233:
slti $1, $3, 6
bne $3, $1, TAG234
mthi $3
bgez $1, TAG234
TAG234:
slt $1, $1, $1
blez $1, TAG235
lw $3, 0($1)
lui $2, 11
TAG235:
multu $2, $2
ori $3, $2, 6
bltz $2, TAG236
sll $1, $3, 1
TAG236:
lui $3, 11
div $3, $3
mfhi $2
sll $0, $0, 0
TAG237:
bgtz $4, TAG238
sh $4, 0($4)
mthi $4
mthi $4
TAG238:
mflo $1
bgez $1, TAG239
mtlo $1
xori $4, $1, 14
TAG239:
blez $4, TAG240
lbu $4, 0($4)
addi $1, $4, 8
divu $4, $1
TAG240:
divu $1, $1
lui $3, 4
sllv $3, $1, $1
mflo $3
TAG241:
beq $3, $3, TAG242
mflo $3
srav $2, $3, $3
srlv $4, $3, $3
TAG242:
beq $4, $4, TAG243
mthi $4
mflo $1
mthi $1
TAG243:
lbu $3, 0($1)
bne $3, $3, TAG244
lw $3, 0($3)
xor $1, $1, $3
TAG244:
lbu $1, 0($1)
multu $1, $1
lbu $3, 0($1)
sb $1, 0($3)
TAG245:
mflo $1
bne $3, $3, TAG246
sb $3, 0($1)
slt $4, $1, $1
TAG246:
srlv $1, $4, $4
mthi $4
mfhi $4
sb $1, 0($4)
TAG247:
sh $4, 0($4)
slt $1, $4, $4
beq $4, $4, TAG248
mfhi $2
TAG248:
sra $1, $2, 3
bgez $1, TAG249
mtlo $2
slti $4, $2, 5
TAG249:
mthi $4
mult $4, $4
lw $4, 0($4)
lui $2, 4
TAG250:
bgez $2, TAG251
mflo $4
mfhi $1
multu $2, $2
TAG251:
bltz $1, TAG252
mult $1, $1
addiu $1, $1, 9
lbu $2, 0($1)
TAG252:
xor $3, $2, $2
mult $3, $2
lbu $1, 0($3)
lui $2, 5
TAG253:
lui $2, 15
sltiu $2, $2, 7
bne $2, $2, TAG254
mflo $2
TAG254:
mult $2, $2
addiu $2, $2, 7
mfhi $3
mthi $3
TAG255:
srav $1, $3, $3
lhu $4, 0($1)
mult $4, $1
lui $1, 0
TAG256:
lui $1, 3
bgtz $1, TAG257
mfhi $1
sb $1, 0($1)
TAG257:
sltu $3, $1, $1
lui $4, 4
sll $0, $0, 0
sra $1, $1, 13
TAG258:
sw $1, 0($1)
multu $1, $1
lb $1, 0($1)
addi $2, $1, 12
TAG259:
srl $1, $2, 10
lui $1, 9
bltz $1, TAG260
lui $3, 9
TAG260:
srl $4, $3, 0
sltiu $3, $3, 4
lh $3, 0($3)
sb $3, 0($3)
TAG261:
sb $3, 0($3)
lbu $4, 0($3)
bgez $4, TAG262
mtlo $3
TAG262:
addiu $1, $4, 3
srl $1, $1, 9
lui $3, 9
blez $3, TAG263
TAG263:
divu $3, $3
blez $3, TAG264
lui $2, 9
subu $4, $3, $2
TAG264:
multu $4, $4
multu $4, $4
bltz $4, TAG265
mflo $2
TAG265:
bne $2, $2, TAG266
lui $1, 10
beq $1, $2, TAG266
mflo $2
TAG266:
srav $1, $2, $2
bgez $1, TAG267
multu $1, $2
blez $2, TAG267
TAG267:
sw $1, 0($1)
ori $2, $1, 11
mult $1, $1
mflo $4
TAG268:
bne $4, $4, TAG269
sh $4, 0($4)
lui $1, 7
sw $1, 0($4)
TAG269:
sll $0, $0, 0
mtlo $3
sll $0, $0, 0
bgez $3, TAG270
TAG270:
xor $3, $3, $3
lui $2, 15
beq $3, $3, TAG271
lui $2, 7
TAG271:
bne $2, $2, TAG272
sll $0, $0, 0
mfhi $2
multu $2, $2
TAG272:
bgez $2, TAG273
lui $1, 15
xori $2, $2, 8
bne $1, $2, TAG273
TAG273:
or $3, $2, $2
lbu $4, 0($2)
mtlo $2
blez $4, TAG274
TAG274:
srl $2, $4, 2
multu $4, $2
lhu $2, 0($4)
mthi $4
TAG275:
lui $4, 10
srav $3, $4, $4
sll $0, $0, 0
srlv $1, $3, $3
TAG276:
bgtz $1, TAG277
sll $0, $0, 0
mfhi $2
mult $2, $2
TAG277:
mflo $2
mflo $4
subu $3, $2, $2
lb $2, 0($2)
TAG278:
mtlo $2
mult $2, $2
multu $2, $2
sltiu $4, $2, 14
TAG279:
lui $3, 12
bltz $3, TAG280
mfhi $2
lhu $1, 0($2)
TAG280:
bltz $1, TAG281
mthi $1
sw $1, 0($1)
mfhi $3
TAG281:
mtlo $3
mthi $3
mthi $3
mult $3, $3
TAG282:
lh $4, 0($3)
lb $1, 0($3)
lui $1, 14
addiu $3, $3, 7
TAG283:
addiu $1, $3, 7
mthi $1
sh $3, 0($1)
beq $1, $3, TAG284
TAG284:
lh $3, 0($1)
sllv $3, $3, $1
xor $4, $3, $3
mtlo $4
TAG285:
sh $4, 0($4)
bne $4, $4, TAG286
lui $1, 6
sll $3, $1, 5
TAG286:
divu $3, $3
mthi $3
mthi $3
sll $0, $0, 0
TAG287:
srl $3, $3, 10
lui $2, 0
mtlo $3
lbu $4, 0($2)
TAG288:
multu $4, $4
mtlo $4
srl $4, $4, 6
ori $3, $4, 15
TAG289:
mthi $3
multu $3, $3
srlv $4, $3, $3
sub $4, $4, $4
TAG290:
lbu $2, 0($4)
addiu $3, $4, 3
beq $4, $3, TAG291
lbu $2, 0($2)
TAG291:
mfhi $1
sllv $4, $2, $1
mtlo $1
bne $2, $2, TAG292
TAG292:
mult $4, $4
nor $3, $4, $4
mtlo $4
sra $4, $4, 8
TAG293:
lbu $3, 0($4)
beq $3, $3, TAG294
lh $1, 0($4)
or $1, $4, $3
TAG294:
mflo $3
lhu $4, 0($3)
sh $1, 0($3)
mfhi $3
TAG295:
srl $2, $3, 12
mult $3, $3
lhu $1, 0($2)
sw $2, 0($2)
TAG296:
addi $3, $1, 11
bltz $1, TAG297
srav $2, $3, $1
mtlo $2
TAG297:
mthi $2
lbu $2, 0($2)
mult $2, $2
mfhi $4
TAG298:
srlv $1, $4, $4
nor $3, $1, $4
mfhi $1
bltz $4, TAG299
TAG299:
mflo $1
lhu $4, 0($1)
xori $4, $1, 14
srl $4, $1, 0
TAG300:
srl $2, $4, 10
mult $4, $2
sw $2, 0($4)
mthi $4
TAG301:
addu $3, $2, $2
addu $3, $2, $3
bne $2, $3, TAG302
lh $1, 0($3)
TAG302:
beq $1, $1, TAG303
multu $1, $1
bne $1, $1, TAG303
divu $1, $1
TAG303:
mtlo $1
mfhi $2
mtlo $2
beq $2, $2, TAG304
TAG304:
subu $3, $2, $2
srav $2, $2, $3
multu $2, $2
sh $3, 0($3)
TAG305:
multu $2, $2
mflo $2
srlv $4, $2, $2
bne $4, $2, TAG306
TAG306:
slti $2, $4, 8
sw $4, 0($4)
mtlo $2
mthi $4
TAG307:
mthi $2
mtlo $2
bgez $2, TAG308
addu $4, $2, $2
TAG308:
mflo $2
mflo $3
sltiu $4, $4, 13
mflo $1
TAG309:
sb $1, 0($1)
lbu $2, 0($1)
lui $3, 3
bgez $1, TAG310
TAG310:
mfhi $2
bne $3, $3, TAG311
subu $4, $3, $2
bltz $2, TAG311
TAG311:
sll $2, $4, 14
bne $2, $4, TAG312
mtlo $2
sb $4, 0($4)
TAG312:
bgez $2, TAG313
mult $2, $2
mtlo $2
divu $2, $2
TAG313:
div $2, $2
sll $0, $0, 0
bne $2, $3, TAG314
sll $0, $0, 0
TAG314:
lui $4, 8
bne $3, $4, TAG315
mfhi $2
slti $4, $2, 14
TAG315:
sll $0, $0, 0
mflo $2
lui $3, 13
mtlo $2
TAG316:
sll $0, $0, 0
sll $0, $0, 0
lui $1, 1
div $3, $3
TAG317:
sll $0, $0, 0
bltz $1, TAG318
addiu $2, $4, 3
sll $0, $0, 0
TAG318:
mflo $1
mfhi $4
bgtz $1, TAG319
lbu $2, 0($4)
TAG319:
mthi $2
addiu $4, $2, 10
lbu $2, 0($2)
addi $4, $2, 2
TAG320:
mult $4, $4
bltz $4, TAG321
nor $2, $4, $4
nor $3, $2, $2
TAG321:
lui $1, 2
slti $4, $3, 15
bne $4, $4, TAG322
srlv $1, $1, $4
TAG322:
lui $2, 10
sll $0, $0, 0
xor $3, $2, $1
mthi $1
TAG323:
sll $0, $0, 0
bltz $3, TAG324
mfhi $1
divu $1, $3
TAG324:
lui $2, 14
srlv $2, $1, $1
bne $2, $2, TAG325
mtlo $2
TAG325:
div $2, $2
div $2, $2
mult $2, $2
mult $2, $2
TAG326:
mthi $2
lui $2, 12
beq $2, $2, TAG327
slt $3, $2, $2
TAG327:
lhu $3, 0($3)
mult $3, $3
bltz $3, TAG328
lui $1, 6
TAG328:
mfhi $4
srl $3, $4, 5
bgez $1, TAG329
mthi $1
TAG329:
sll $2, $3, 9
bltz $3, TAG330
lui $3, 3
lui $3, 0
TAG330:
mtlo $3
lui $1, 5
mtlo $3
sh $3, 0($3)
TAG331:
sll $0, $0, 0
addu $1, $1, $2
blez $1, TAG332
divu $2, $1
TAG332:
slt $2, $1, $1
sw $2, 0($2)
beq $2, $1, TAG333
lui $3, 3
TAG333:
mult $3, $3
div $3, $3
srl $4, $3, 10
mthi $4
TAG334:
or $3, $4, $4
bgez $4, TAG335
mtlo $4
mfhi $1
TAG335:
lui $1, 9
mflo $1
bltz $1, TAG336
nor $2, $1, $1
TAG336:
sltu $2, $2, $2
sb $2, 0($2)
srl $4, $2, 3
lui $2, 15
TAG337:
bne $2, $2, TAG338
lui $3, 2
lui $2, 8
sll $0, $0, 0
TAG338:
sltiu $1, $2, 6
sll $0, $0, 0
lhu $1, 0($1)
beq $1, $1, TAG339
TAG339:
mult $1, $1
beq $1, $1, TAG340
mfhi $2
lb $4, 0($1)
TAG340:
bgtz $4, TAG341
sllv $1, $4, $4
mthi $1
lui $3, 6
TAG341:
andi $4, $3, 6
sll $0, $0, 0
beq $3, $3, TAG342
sll $0, $0, 0
TAG342:
bgez $1, TAG343
mfhi $4
sh $4, 0($4)
sh $4, 0($1)
TAG343:
mult $4, $4
addu $4, $4, $4
multu $4, $4
sw $4, 0($4)
TAG344:
lbu $2, 0($4)
bgez $4, TAG345
lbu $4, 0($4)
mtlo $4
TAG345:
andi $1, $4, 13
bne $4, $1, TAG346
mfhi $2
blez $2, TAG346
TAG346:
sh $2, 0($2)
multu $2, $2
xori $1, $2, 6
mfhi $1
TAG347:
andi $1, $1, 10
ori $2, $1, 13
mflo $2
bne $1, $1, TAG348
TAG348:
lb $1, 0($2)
ori $2, $1, 14
sh $2, 0($1)
srl $2, $2, 13
TAG349:
bltz $2, TAG350
mtlo $2
bne $2, $2, TAG350
lui $3, 10
TAG350:
bltz $3, TAG351
lui $2, 6
mtlo $2
blez $3, TAG351
TAG351:
or $3, $2, $2
div $2, $2
sll $0, $0, 0
mflo $3
TAG352:
div $3, $3
beq $3, $3, TAG353
srl $2, $3, 6
srl $2, $2, 9
TAG353:
mtlo $2
mtlo $2
blez $2, TAG354
multu $2, $2
TAG354:
sll $2, $2, 9
lui $1, 3
lui $1, 5
lb $4, 0($2)
TAG355:
bgtz $4, TAG356
sra $4, $4, 5
mtlo $4
lbu $4, 0($4)
TAG356:
beq $4, $4, TAG357
mult $4, $4
addu $4, $4, $4
lui $4, 15
TAG357:
lb $2, 0($4)
beq $2, $2, TAG358
lui $3, 0
beq $2, $3, TAG358
TAG358:
multu $3, $3
beq $3, $3, TAG359
lh $4, 0($3)
divu $4, $4
TAG359:
mtlo $4
mtlo $4
sh $4, 0($4)
lui $1, 8
TAG360:
srl $3, $1, 6
mtlo $1
sll $0, $0, 0
xori $1, $3, 15
TAG361:
mult $1, $1
sh $1, -8207($1)
sra $4, $1, 10
lh $4, 0($4)
TAG362:
div $4, $4
sb $4, 0($4)
mult $4, $4
lui $4, 13
TAG363:
or $4, $4, $4
blez $4, TAG364
sll $0, $0, 0
sll $0, $0, 0
TAG364:
sll $0, $0, 0
bgez $4, TAG365
sll $0, $0, 0
lw $2, 0($4)
TAG365:
bgtz $2, TAG366
sll $3, $2, 7
mult $3, $3
lb $1, 0($2)
TAG366:
slti $4, $1, 5
nor $1, $4, $1
sb $4, 8208($1)
sh $4, 8208($1)
TAG367:
mfhi $3
sltu $3, $3, $3
mtlo $3
mfhi $4
TAG368:
srl $3, $4, 15
sll $1, $4, 1
sw $4, 0($3)
beq $4, $4, TAG369
TAG369:
sw $1, 0($1)
sh $1, 0($1)
sh $1, 0($1)
lh $3, 0($1)
TAG370:
lb $2, 0($3)
slt $4, $3, $3
bgez $4, TAG371
mthi $4
TAG371:
and $2, $4, $4
and $1, $4, $2
addi $4, $1, 9
mthi $1
TAG372:
mfhi $1
lui $2, 1
blez $1, TAG373
multu $4, $1
TAG373:
bne $2, $2, TAG374
mfhi $1
slti $3, $2, 3
beq $2, $3, TAG374
TAG374:
srav $2, $3, $3
mult $3, $3
mult $2, $2
mult $2, $3
TAG375:
sub $3, $2, $2
lbu $2, 0($3)
mthi $3
blez $3, TAG376
TAG376:
lui $1, 10
slt $1, $2, $1
mtlo $1
lui $1, 9
TAG377:
sltu $2, $1, $1
lhu $4, 0($2)
blez $1, TAG378
multu $2, $4
TAG378:
mflo $4
lw $4, 0($4)
bne $4, $4, TAG379
sra $1, $4, 0
TAG379:
mfhi $2
mtlo $2
subu $1, $1, $2
sb $1, 0($1)
TAG380:
multu $1, $1
lui $1, 5
lui $1, 12
srl $1, $1, 12
TAG381:
addiu $2, $1, 3
bne $1, $2, TAG382
subu $3, $1, $2
divu $1, $3
TAG382:
subu $2, $3, $3
mfhi $2
lw $4, 0($2)
beq $2, $4, TAG383
TAG383:
sb $4, 0($4)
sltiu $2, $4, 12
lbu $1, 0($4)
lui $1, 14
TAG384:
divu $1, $1
mtlo $1
addu $1, $1, $1
mfhi $3
TAG385:
mflo $1
mult $1, $1
bgtz $3, TAG386
lh $4, 0($3)
TAG386:
sll $2, $4, 13
mflo $4
xori $4, $2, 7
sb $4, 0($4)
TAG387:
bgez $4, TAG388
sllv $3, $4, $4
lui $1, 2
lui $3, 12
TAG388:
blez $3, TAG389
xori $2, $3, 12
andi $1, $2, 0
and $4, $1, $3
TAG389:
sw $4, 0($4)
mflo $4
mtlo $4
multu $4, $4
TAG390:
sltu $2, $4, $4
addu $3, $2, $2
sltiu $3, $3, 9
slti $2, $2, 13
TAG391:
div $2, $2
lbu $4, 0($2)
mfhi $3
lhu $4, 0($4)
TAG392:
mflo $3
bgez $3, TAG393
andi $1, $3, 8
srl $1, $4, 5
TAG393:
mthi $1
mult $1, $1
mflo $1
lui $3, 0
TAG394:
lui $4, 9
mflo $1
andi $1, $1, 5
multu $4, $1
TAG395:
multu $1, $1
lhu $4, 0($1)
subu $3, $4, $4
mult $4, $3
TAG396:
mflo $1
bne $3, $3, TAG397
mfhi $2
blez $1, TAG397
TAG397:
multu $2, $2
mthi $2
sw $2, 0($2)
mflo $2
TAG398:
xor $3, $2, $2
mtlo $3
bne $3, $3, TAG399
mflo $1
TAG399:
mtlo $1
bgez $1, TAG400
lui $1, 0
lui $3, 11
TAG400:
multu $3, $3
and $4, $3, $3
multu $4, $3
mfhi $4
TAG401:
sll $2, $4, 2
sw $2, 0($2)
slt $4, $2, $4
bltz $4, TAG402
TAG402:
mfhi $1
bltz $1, TAG403
sw $4, 0($1)
nor $1, $4, $4
TAG403:
sllv $3, $1, $1
divu $1, $3
blez $1, TAG404
or $4, $3, $3
TAG404:
multu $4, $4
xori $1, $4, 5
andi $4, $1, 1
mthi $4
TAG405:
subu $3, $4, $4
bgez $4, TAG406
mflo $1
blez $1, TAG406
TAG406:
srlv $1, $1, $1
lbu $2, 0($1)
bgtz $1, TAG407
lbu $2, 0($1)
TAG407:
lbu $3, 0($2)
beq $3, $2, TAG408
lh $4, 0($2)
mtlo $2
TAG408:
multu $4, $4
mfhi $2
lb $2, 0($2)
sw $2, 0($4)
TAG409:
sw $2, 0($2)
mtlo $2
mflo $1
mtlo $1
TAG410:
sb $1, 0($1)
beq $1, $1, TAG411
sh $1, 0($1)
lb $4, 0($1)
TAG411:
mthi $4
mult $4, $4
sw $4, 0($4)
add $1, $4, $4
TAG412:
sh $1, 0($1)
ori $4, $1, 6
beq $1, $1, TAG413
sh $1, 0($1)
TAG413:
lbu $4, 0($4)
mult $4, $4
multu $4, $4
mthi $4
TAG414:
slt $3, $4, $4
mflo $2
mtlo $4
sll $4, $2, 5
TAG415:
srlv $2, $4, $4
bne $4, $4, TAG416
lui $2, 6
multu $2, $2
TAG416:
mult $2, $2
div $2, $2
bne $2, $2, TAG417
mtlo $2
TAG417:
divu $2, $2
sll $0, $0, 0
mfhi $2
beq $2, $2, TAG418
TAG418:
sw $2, 0($2)
bne $2, $2, TAG419
mthi $2
andi $2, $2, 14
TAG419:
bne $2, $2, TAG420
sb $2, 0($2)
bne $2, $2, TAG420
sw $2, 0($2)
TAG420:
lui $3, 7
bgtz $2, TAG421
mtlo $3
divu $2, $3
TAG421:
lui $3, 12
mflo $2
lui $4, 12
mult $2, $4
TAG422:
subu $2, $4, $4
sll $1, $4, 10
mtlo $4
nor $2, $4, $4
TAG423:
mthi $2
and $1, $2, $2
lui $4, 9
bgez $4, TAG424
TAG424:
lui $1, 15
ori $2, $1, 7
mult $4, $1
mflo $1
TAG425:
multu $1, $1
sw $1, 0($1)
lui $1, 8
sll $0, $0, 0
TAG426:
bgez $1, TAG427
divu $1, $1
sh $1, 0($1)
sb $1, 0($1)
TAG427:
srav $2, $1, $1
divu $1, $2
sltu $1, $1, $1
lui $2, 2
TAG428:
beq $2, $2, TAG429
lui $3, 12
bltz $3, TAG429
mfhi $4
TAG429:
div $4, $4
bne $4, $4, TAG430
mflo $1
sll $0, $0, 0
TAG430:
mtlo $3
sll $0, $0, 0
lui $4, 7
bne $3, $3, TAG431
TAG431:
sll $0, $0, 0
mthi $4
sll $0, $0, 0
addiu $3, $4, 0
TAG432:
lui $2, 12
sll $0, $0, 0
bne $2, $2, TAG433
mtlo $2
TAG433:
lui $1, 6
divu $1, $1
blez $1, TAG434
mflo $1
TAG434:
lui $4, 15
lb $1, 0($1)
mflo $2
ori $2, $2, 15
TAG435:
sb $2, 0($2)
mfhi $3
slti $2, $3, 13
lui $1, 3
TAG436:
sll $0, $0, 0
sll $0, $0, 0
subu $1, $1, $4
sll $0, $0, 0
TAG437:
ori $2, $1, 12
mfhi $4
lui $4, 6
beq $2, $2, TAG438
TAG438:
sll $0, $0, 0
addiu $1, $4, 7
srl $4, $4, 1
sll $0, $0, 0
TAG439:
mflo $3
sltiu $3, $4, 5
div $4, $4
lh $3, 0($3)
TAG440:
mtlo $3
lui $2, 9
bne $2, $2, TAG441
mtlo $2
TAG441:
bltz $2, TAG442
andi $2, $2, 10
mflo $4
bne $2, $4, TAG442
TAG442:
mult $4, $4
bne $4, $4, TAG443
lui $1, 14
sll $0, $0, 0
TAG443:
sra $3, $1, 13
sb $1, 0($3)
sll $0, $0, 0
sll $0, $0, 0
TAG444:
bgez $4, TAG445
sll $4, $4, 6
bgtz $4, TAG445
lui $3, 5
TAG445:
mflo $3
mfhi $1
or $4, $3, $1
beq $4, $3, TAG446
TAG446:
xor $2, $4, $4
lui $4, 0
srl $2, $2, 1
mflo $1
TAG447:
multu $1, $1
lui $2, 8
divu $1, $2
bne $2, $1, TAG448
TAG448:
addu $1, $2, $2
addiu $3, $2, 0
div $2, $2
sll $0, $0, 0
TAG449:
mtlo $1
mtlo $1
lui $1, 6
sll $0, $0, 0
TAG450:
lui $2, 3
mthi $2
lui $2, 11
sra $2, $1, 4
TAG451:
mfhi $3
blez $3, TAG452
lui $3, 13
mflo $1
TAG452:
mthi $1
mthi $1
mfhi $3
sll $0, $0, 0
TAG453:
srav $1, $3, $3
bne $1, $3, TAG454
div $1, $1
div $3, $1
TAG454:
slt $4, $1, $1
multu $1, $1
mfhi $4
srlv $3, $4, $1
TAG455:
lui $1, 3
mtlo $3
sll $0, $0, 0
xori $4, $3, 10
TAG456:
lui $4, 13
mtlo $4
mtlo $4
and $3, $4, $4
TAG457:
div $3, $3
sltu $2, $3, $3
sh $2, 0($2)
srav $3, $3, $3
TAG458:
or $3, $3, $3
mflo $4
mtlo $3
sllv $4, $4, $4
TAG459:
addiu $3, $4, 8
lui $2, 6
srav $4, $4, $3
nor $3, $4, $3
TAG460:
bgtz $3, TAG461
srl $3, $3, 14
sll $0, $0, 0
sll $0, $0, 0
TAG461:
sll $0, $0, 0
addu $3, $1, $1
sll $0, $0, 0
xor $3, $1, $1
TAG462:
bltz $3, TAG463
addi $1, $3, 12
lh $3, 0($1)
mtlo $3
TAG463:
bgez $3, TAG464
or $3, $3, $3
lui $3, 4
sh $3, 0($3)
TAG464:
mflo $2
and $3, $2, $2
sltu $2, $3, $3
mfhi $2
TAG465:
lui $2, 2
blez $2, TAG466
lui $4, 14
sll $0, $0, 0
TAG466:
mflo $4
sltu $3, $4, $4
srav $2, $4, $4
mthi $2
TAG467:
bltz $2, TAG468
lui $4, 0
addu $4, $2, $4
xor $3, $4, $4
TAG468:
lui $3, 0
lw $4, 0($3)
mult $3, $3
lw $1, 0($3)
TAG469:
and $4, $1, $1
mtlo $4
xori $1, $4, 11
multu $1, $4
TAG470:
mult $1, $1
lb $3, 0($1)
bgez $1, TAG471
sb $3, 0($1)
TAG471:
bne $3, $3, TAG472
mflo $4
lui $1, 1
sll $0, $0, 0
TAG472:
bltz $1, TAG473
sll $0, $0, 0
sll $0, $0, 0
xori $1, $1, 2
TAG473:
sll $0, $0, 0
beq $1, $1, TAG474
divu $1, $1
bgez $1, TAG474
TAG474:
multu $1, $1
beq $1, $1, TAG475
divu $1, $1
mflo $2
TAG475:
bltz $2, TAG476
lh $3, 0($2)
xori $3, $3, 6
mfhi $2
TAG476:
bne $2, $2, TAG477
lb $4, 0($2)
lui $4, 12
multu $4, $2
TAG477:
sra $3, $4, 4
mthi $4
xori $4, $4, 9
sll $0, $0, 0
TAG478:
multu $4, $4
sll $0, $0, 0
blez $4, TAG479
sll $0, $0, 0
TAG479:
bltz $4, TAG480
sll $0, $0, 0
mflo $4
bne $4, $4, TAG480
TAG480:
mthi $4
srav $3, $4, $4
mfhi $3
mtlo $3
TAG481:
mult $3, $3
mtlo $3
bgez $3, TAG482
sll $0, $0, 0
TAG482:
bgtz $3, TAG483
mult $3, $3
sw $3, 0($3)
mfhi $1
TAG483:
blez $1, TAG484
divu $1, $1
lui $2, 4
mfhi $4
TAG484:
mthi $4
multu $4, $4
lhu $4, 0($4)
addiu $3, $4, 1
TAG485:
bltz $3, TAG486
addiu $1, $3, 2
lui $3, 11
lbu $4, 0($1)
TAG486:
slt $2, $4, $4
bgez $2, TAG487
mtlo $4
mfhi $2
TAG487:
addu $2, $2, $2
lui $3, 8
lb $2, 0($2)
divu $2, $3
TAG488:
mtlo $2
mfhi $3
bgez $3, TAG489
lui $2, 14
TAG489:
lui $1, 1
mflo $4
mthi $4
addu $1, $2, $2
TAG490:
mthi $1
addiu $2, $1, 12
slti $4, $1, 2
bgez $2, TAG491
TAG491:
sb $4, 0($4)
sll $2, $4, 1
bgtz $2, TAG492
mfhi $3
TAG492:
lui $4, 4
nor $3, $4, $3
bgtz $3, TAG493
lui $1, 14
TAG493:
lui $1, 13
sll $0, $0, 0
bgez $3, TAG494
sll $0, $0, 0
TAG494:
div $3, $3
lui $4, 4
multu $3, $3
mthi $3
TAG495:
div $4, $4
lui $1, 1
xor $1, $4, $4
lb $4, 0($1)
TAG496:
multu $4, $4
mult $4, $4
lui $3, 15
mflo $1
TAG497:
beq $1, $1, TAG498
mthi $1
mtlo $1
srl $1, $1, 0
TAG498:
mfhi $3
bgez $3, TAG499
lui $3, 0
mtlo $1
TAG499:
sb $3, 0($3)
and $2, $3, $3
bgez $3, TAG500
lb $2, 0($2)
TAG500:
ori $4, $2, 1
bne $2, $4, TAG501
lbu $4, 0($2)
bgtz $4, TAG501
TAG501:
mthi $4
srl $1, $4, 5
sh $4, 0($4)
bltz $1, TAG502
TAG502:
lui $4, 4
lbu $4, 0($1)
beq $1, $4, TAG503
lui $4, 12
TAG503:
sll $0, $0, 0
lui $3, 11
lui $3, 14
divu $3, $3
TAG504:
bltz $3, TAG505
lui $3, 6
beq $3, $3, TAG505
mtlo $3
TAG505:
sll $0, $0, 0
mflo $1
lui $2, 7
xori $3, $2, 7
TAG506:
lui $1, 3
lui $3, 3
mthi $3
sll $0, $0, 0
TAG507:
lui $1, 10
srl $2, $1, 13
beq $3, $2, TAG508
lui $4, 4
TAG508:
bgtz $4, TAG509
sll $0, $0, 0
sb $4, 0($2)
mfhi $2
TAG509:
mflo $3
div $2, $2
lui $1, 2
mult $1, $2
TAG510:
mflo $1
mult $1, $1
addiu $2, $1, 6
mthi $1
TAG511:
sll $0, $0, 0
addu $2, $2, $2
bne $2, $2, TAG512
sll $0, $0, 0
TAG512:
sll $0, $0, 0
sll $0, $0, 0
bltz $2, TAG513
lui $2, 3
TAG513:
lui $1, 7
bgtz $1, TAG514
mflo $1
lhu $3, 0($1)
TAG514:
sll $0, $0, 0
mthi $3
div $2, $2
srl $4, $3, 14
TAG515:
bltz $4, TAG516
lw $1, 0($4)
mflo $4
bne $4, $4, TAG516
TAG516:
sb $4, 0($4)
mfhi $3
sb $4, 0($3)
sh $4, 0($3)
TAG517:
mtlo $3
srl $3, $3, 7
sll $1, $3, 10
lh $2, 0($1)
TAG518:
mfhi $1
and $1, $1, $2
xori $3, $1, 13
lui $3, 12
TAG519:
bgez $3, TAG520
sll $0, $0, 0
addi $2, $3, 12
lui $4, 13
TAG520:
lui $1, 2
sb $4, 0($4)
and $1, $1, $4
sra $4, $1, 7
TAG521:
mflo $1
sltiu $2, $4, 8
sltiu $3, $2, 12
addiu $2, $3, 5
TAG522:
divu $2, $2
lui $1, 4
sh $2, 0($2)
subu $1, $2, $2
TAG523:
mtlo $1
multu $1, $1
mflo $2
lui $4, 8
TAG524:
bne $4, $4, TAG525
mtlo $4
mfhi $1
bne $1, $1, TAG525
TAG525:
mult $1, $1
srl $2, $1, 0
mthi $2
sra $1, $1, 6
TAG526:
sb $1, 0($1)
lui $4, 6
mtlo $4
lui $1, 9
TAG527:
mflo $1
lui $1, 1
bltz $1, TAG528
sra $2, $1, 4
TAG528:
mfhi $2
lh $2, 0($2)
lui $1, 5
blez $2, TAG529
TAG529:
mtlo $1
addu $2, $1, $1
lui $1, 7
or $3, $2, $1
TAG530:
mfhi $1
lui $2, 2
sll $0, $0, 0
ori $3, $1, 14
TAG531:
mult $3, $3
div $3, $3
lui $4, 12
slt $1, $4, $4
TAG532:
sh $1, 0($1)
lb $2, 0($1)
multu $2, $1
mflo $1
TAG533:
sh $1, 0($1)
multu $1, $1
lui $2, 9
mthi $1
TAG534:
or $1, $2, $2
ori $2, $1, 5
sll $0, $0, 0
sll $0, $0, 0
TAG535:
mtlo $3
lh $3, 0($3)
lui $1, 11
mfhi $3
TAG536:
xor $3, $3, $3
srav $3, $3, $3
bgtz $3, TAG537
lui $1, 1
TAG537:
sll $0, $0, 0
or $4, $1, $1
mtlo $4
mthi $1
TAG538:
divu $4, $4
addiu $4, $4, 8
mfhi $4
lui $2, 6
TAG539:
mthi $2
bltz $2, TAG540
mtlo $2
sll $0, $0, 0
TAG540:
bgez $4, TAG541
sll $3, $4, 3
lui $2, 4
srlv $3, $3, $2
TAG541:
sw $3, 0($3)
addi $1, $3, 2
addi $1, $3, 10
beq $1, $1, TAG542
TAG542:
sltu $3, $1, $1
divu $3, $1
sh $1, 0($3)
bltz $3, TAG543
TAG543:
lui $2, 1
lbu $3, 0($3)
multu $3, $2
lh $4, 0($3)
TAG544:
multu $4, $4
srlv $4, $4, $4
lui $2, 6
bgtz $4, TAG545
TAG545:
addiu $4, $2, 15
or $4, $2, $4
sll $0, $0, 0
lui $2, 0
TAG546:
mult $2, $2
lui $2, 2
mtlo $2
lui $2, 8
TAG547:
mflo $2
mflo $4
mtlo $2
sll $0, $0, 0
TAG548:
mthi $1
sltiu $2, $1, 2
sllv $1, $2, $1
add $1, $1, $1
TAG549:
mult $1, $1
sh $1, 0($1)
lh $3, 0($1)
bgez $3, TAG550
TAG550:
sw $3, 0($3)
mflo $2
beq $3, $2, TAG551
multu $2, $3
TAG551:
sh $2, 0($2)
lh $2, 0($2)
xor $4, $2, $2
lbu $3, 0($4)
TAG552:
beq $3, $3, TAG553
lui $4, 2
sw $4, 0($3)
bne $3, $4, TAG553
TAG553:
lui $3, 7
mult $4, $4
sll $0, $0, 0
sll $0, $0, 0
TAG554:
beq $1, $1, TAG555
lui $4, 11
beq $4, $1, TAG555
sltu $1, $1, $1
TAG555:
sll $2, $1, 13
blez $2, TAG556
sb $2, 0($1)
slt $3, $1, $1
TAG556:
sll $0, $0, 0
mtlo $3
mtlo $3
mtlo $3
TAG557:
beq $3, $3, TAG558
sltiu $4, $3, 4
ori $1, $3, 13
sub $3, $1, $4
TAG558:
divu $3, $3
bltz $3, TAG559
sll $0, $0, 0
sltiu $3, $3, 12
TAG559:
lw $1, 0($3)
sw $3, 0($3)
lb $3, 0($1)
blez $3, TAG560
TAG560:
ori $1, $3, 9
lbu $4, 0($1)
mfhi $3
beq $4, $3, TAG561
TAG561:
mtlo $3
mthi $3
slti $1, $3, 4
bgtz $3, TAG562
TAG562:
lui $1, 11
sll $2, $1, 9
mult $1, $1
srl $2, $2, 12
TAG563:
mthi $2
slti $1, $2, 15
lb $3, 0($1)
mtlo $3
TAG564:
slti $3, $3, 13
multu $3, $3
lui $2, 10
mfhi $2
TAG565:
multu $2, $2
mthi $2
mthi $2
blez $2, TAG566
TAG566:
addiu $3, $2, 13
mflo $1
bne $3, $1, TAG567
mthi $1
TAG567:
blez $1, TAG568
mtlo $1
sw $1, 0($1)
lui $1, 13
TAG568:
multu $1, $1
mfhi $2
lhu $2, 0($1)
sb $2, 0($2)
TAG569:
mthi $2
beq $2, $2, TAG570
lhu $1, 0($2)
srav $1, $1, $2
TAG570:
mfhi $3
sll $2, $1, 14
mtlo $1
mthi $1
TAG571:
mult $2, $2
sltiu $4, $2, 13
mtlo $4
bne $4, $2, TAG572
TAG572:
lb $2, 0($4)
bne $2, $4, TAG573
multu $2, $2
slt $2, $2, $2
TAG573:
mflo $4
lh $2, 0($4)
or $4, $2, $2
bgtz $2, TAG574
TAG574:
multu $4, $4
lui $3, 7
xor $4, $4, $4
multu $4, $3
TAG575:
sh $4, 0($4)
sb $4, 0($4)
lh $3, 0($4)
mult $4, $4
TAG576:
mthi $3
sra $1, $3, 5
blez $1, TAG577
nor $4, $3, $1
TAG577:
sh $4, 1($4)
mthi $4
lui $4, 15
div $4, $4
TAG578:
lui $2, 1
sll $0, $0, 0
mult $4, $2
sll $0, $0, 0
TAG579:
lui $2, 12
srl $3, $2, 3
beq $2, $2, TAG580
mthi $3
TAG580:
sll $0, $0, 0
multu $3, $3
sll $0, $0, 0
beq $3, $3, TAG581
TAG581:
multu $3, $3
beq $3, $3, TAG582
sll $0, $0, 0
mthi $3
TAG582:
sll $0, $0, 0
bne $2, $2, TAG583
lui $4, 1
bne $4, $2, TAG583
TAG583:
sll $0, $0, 0
lui $2, 15
sltiu $4, $4, 14
multu $2, $4
TAG584:
slt $1, $4, $4
mtlo $4
beq $4, $4, TAG585
mthi $1
TAG585:
beq $1, $1, TAG586
and $4, $1, $1
lui $2, 11
bne $1, $1, TAG586
TAG586:
divu $2, $2
mthi $2
subu $3, $2, $2
bne $3, $2, TAG587
TAG587:
nor $1, $3, $3
sw $3, 1($1)
bltz $1, TAG588
sllv $2, $1, $3
TAG588:
mfhi $4
sll $0, $0, 0
lui $2, 11
divu $2, $2
TAG589:
bne $2, $2, TAG590
mult $2, $2
multu $2, $2
mtlo $2
TAG590:
sll $0, $0, 0
lui $4, 7
mflo $2
bltz $2, TAG591
TAG591:
addiu $4, $2, 11
sll $0, $0, 0
srlv $1, $2, $4
lh $4, -352($1)
TAG592:
mult $4, $4
mfhi $2
sw $4, 0($2)
mflo $2
TAG593:
srlv $2, $2, $2
sw $2, 0($2)
mfhi $3
sb $2, 0($3)
TAG594:
multu $3, $3
mflo $2
mthi $2
beq $2, $3, TAG595
TAG595:
lb $3, 0($2)
mult $3, $2
lbu $4, 0($2)
bgtz $3, TAG596
TAG596:
mfhi $3
multu $3, $4
lui $3, 8
lbu $3, 0($4)
TAG597:
mfhi $4
multu $4, $3
sh $4, 0($4)
sh $3, 0($4)
TAG598:
lui $3, 11
lui $1, 8
sb $4, 0($4)
bne $4, $3, TAG599
TAG599:
mfhi $2
mtlo $2
and $3, $1, $2
mflo $4
TAG600:
sh $4, 0($4)
bne $4, $4, TAG601
multu $4, $4
bne $4, $4, TAG601
TAG601:
mult $4, $4
lh $3, 0($4)
beq $4, $4, TAG602
sra $3, $3, 6
TAG602:
mult $3, $3
sh $3, 0($3)
mtlo $3
lw $1, 0($3)
TAG603:
mult $1, $1
mflo $2
lb $1, 0($2)
lw $1, 0($1)
TAG604:
sh $1, 0($1)
mthi $1
bgtz $1, TAG605
mflo $3
TAG605:
sra $4, $3, 7
sra $2, $4, 15
lbu $3, 0($2)
lui $1, 14
TAG606:
bne $1, $1, TAG607
sll $0, $0, 0
add $3, $2, $1
mthi $1
TAG607:
lui $4, 5
addiu $1, $3, 3
sll $0, $0, 0
mthi $4
TAG608:
mult $1, $1
mtlo $1
sllv $1, $1, $1
mfhi $4
TAG609:
sll $0, $0, 0
sh $4, -196($4)
bne $4, $3, TAG610
sw $4, -196($4)
TAG610:
lui $1, 4
mflo $1
mtlo $1
mtlo $1
TAG611:
andi $1, $1, 9
sllv $3, $1, $1
lui $2, 14
bgez $3, TAG612
TAG612:
mtlo $2
mtlo $2
bltz $2, TAG613
xori $4, $2, 12
TAG613:
srav $3, $4, $4
mflo $3
multu $3, $3
divu $3, $3
TAG614:
bltz $3, TAG615
sll $0, $0, 0
multu $3, $3
sll $0, $0, 0
TAG615:
mtlo $1
mthi $1
lb $1, 0($1)
lui $3, 3
TAG616:
mflo $2
sb $3, 0($2)
mult $2, $2
lui $4, 2
TAG617:
addu $2, $4, $4
srav $3, $4, $4
lui $1, 11
mthi $2
TAG618:
sll $0, $0, 0
mtlo $1
subu $3, $1, $1
slti $1, $1, 0
TAG619:
srl $2, $1, 0
lui $1, 12
slt $3, $1, $2
divu $2, $1
TAG620:
nor $2, $3, $3
sltiu $1, $3, 8
bgtz $2, TAG621
sw $1, 1($2)
TAG621:
blez $1, TAG622
lb $4, 0($1)
lh $2, 0($4)
slt $4, $2, $4
TAG622:
multu $4, $4
lhu $2, 0($4)
mflo $4
slt $1, $2, $4
TAG623:
xori $4, $1, 7
xori $3, $4, 13
bne $4, $1, TAG624
lhu $3, 0($3)
TAG624:
lw $1, 0($3)
multu $1, $1
addiu $2, $3, 6
lbu $4, 0($1)
TAG625:
bgez $4, TAG626
lui $4, 8
mfhi $2
bgez $2, TAG626
TAG626:
lb $4, 0($2)
subu $3, $2, $4
divu $3, $4
lb $4, 0($4)
TAG627:
lui $4, 8
bltz $4, TAG628
multu $4, $4
beq $4, $4, TAG628
TAG628:
lui $1, 0
xori $4, $4, 3
sw $1, 0($1)
mfhi $1
TAG629:
sh $1, 0($1)
beq $1, $1, TAG630
divu $1, $1
bltz $1, TAG630
TAG630:
sh $1, 0($1)
srav $4, $1, $1
nor $3, $1, $4
div $1, $4
TAG631:
lui $4, 8
bgtz $3, TAG632
sb $3, 65($3)
lui $4, 7
TAG632:
mfhi $2
bgez $4, TAG633
sll $0, $0, 0
mthi $1
TAG633:
bne $1, $1, TAG634
mthi $1
lw $2, 0($1)
mfhi $4
TAG634:
sw $4, 0($4)
mtlo $4
mfhi $4
sh $4, 0($4)
TAG635:
lh $3, 0($4)
sltu $4, $3, $4
ori $3, $3, 10
multu $4, $4
TAG636:
sra $4, $3, 6
sb $4, 0($4)
bgtz $3, TAG637
multu $3, $4
TAG637:
nor $4, $4, $4
subu $3, $4, $4
bne $4, $4, TAG638
mthi $3
TAG638:
bne $3, $3, TAG639
lhu $1, 0($3)
sb $1, -447($1)
srav $2, $1, $3
TAG639:
lui $4, 11
andi $2, $4, 2
ori $2, $4, 1
mflo $2
TAG640:
lh $2, 0($2)
lbu $2, 0($2)
blez $2, TAG641
sb $2, -191($2)
TAG641:
bgez $2, TAG642
lhu $2, -191($2)
lb $1, 0($2)
bgtz $1, TAG642
TAG642:
lui $1, 6
bne $1, $1, TAG643
mthi $1
subu $4, $1, $1
TAG643:
bgtz $4, TAG644
lbu $2, 0($4)
blez $4, TAG644
lw $4, -191($2)
TAG644:
mfhi $3
sw $3, -447($4)
or $2, $3, $3
lui $4, 12
TAG645:
bgtz $4, TAG646
xori $4, $4, 1
bne $4, $4, TAG646
mfhi $4
TAG646:
lui $1, 4
mthi $1
beq $1, $1, TAG647
div $4, $1
TAG647:
xori $1, $1, 15
srav $2, $1, $1
lui $4, 1
addiu $3, $1, 6
TAG648:
mthi $3
sll $0, $0, 0
bne $2, $3, TAG649
srlv $2, $2, $2
TAG649:
lh $2, 0($2)
mtlo $2
lui $3, 6
mtlo $2
TAG650:
lui $4, 3
blez $4, TAG651
mflo $2
srav $1, $2, $3
TAG651:
mtlo $1
sw $1, 0($1)
lw $4, 0($1)
blez $1, TAG652
TAG652:
mtlo $4
mthi $4
addiu $4, $4, 1
mfhi $4
TAG653:
bne $4, $4, TAG654
addi $2, $4, 4
bne $4, $4, TAG654
lbu $4, 0($2)
TAG654:
mflo $4
mflo $1
bltz $1, TAG655
xor $1, $4, $1
TAG655:
blez $1, TAG656
mfhi $2
mult $2, $1
lui $2, 10
TAG656:
lb $4, 0($2)
sra $1, $4, 13
mtlo $1
lw $4, 0($2)
TAG657:
srl $4, $4, 7
mflo $4
lui $1, 3
sw $4, 0($4)
TAG658:
sll $0, $0, 0
mult $1, $1
bne $1, $1, TAG659
mthi $1
TAG659:
mfhi $1
xori $2, $1, 3
bltz $1, TAG660
div $2, $1
TAG660:
or $1, $2, $2
subu $4, $2, $2
lw $3, 0($4)
mtlo $1
TAG661:
lui $3, 0
mult $3, $3
lui $3, 15
lui $3, 1
TAG662:
blez $3, TAG663
mfhi $1
sll $0, $0, 0
mflo $4
TAG663:
subu $3, $4, $4
beq $4, $4, TAG664
addi $2, $4, 15
sllv $4, $4, $3
TAG664:
mult $4, $4
lui $2, 9
srl $2, $2, 9
sb $4, 0($4)
TAG665:
bne $2, $2, TAG666
sb $2, -1152($2)
bgez $2, TAG666
sw $2, -1152($2)
TAG666:
divu $2, $2
beq $2, $2, TAG667
lui $3, 9
srav $3, $3, $2
TAG667:
mthi $3
nor $4, $3, $3
beq $3, $3, TAG668
mfhi $4
TAG668:
blez $4, TAG669
lui $2, 0
mflo $2
bne $2, $2, TAG669
TAG669:
mtlo $2
beq $2, $2, TAG670
mflo $3
bne $3, $2, TAG670
TAG670:
slti $2, $3, 11
lb $2, 0($3)
sltu $4, $2, $2
sb $4, 0($3)
TAG671:
mthi $4
slti $2, $4, 14
mfhi $3
mult $2, $2
TAG672:
multu $3, $3
mflo $4
mthi $3
sub $3, $3, $3
TAG673:
lui $3, 0
bne $3, $3, TAG674
lh $2, 0($3)
bltz $3, TAG674
TAG674:
sltiu $1, $2, 8
bgez $2, TAG675
divu $1, $2
and $1, $1, $1
TAG675:
bgtz $1, TAG676
sltiu $1, $1, 1
mtlo $1
subu $4, $1, $1
TAG676:
lh $3, 0($4)
slti $2, $3, 1
beq $4, $2, TAG677
mtlo $4
TAG677:
mthi $2
mthi $2
multu $2, $2
multu $2, $2
TAG678:
mflo $4
mtlo $4
multu $2, $2
mflo $1
TAG679:
multu $1, $1
xori $2, $1, 9
mfhi $3
bgtz $2, TAG680
TAG680:
mthi $3
mthi $3
sw $3, 0($3)
lw $2, 0($3)
TAG681:
mtlo $2
lh $1, 0($2)
lb $2, 0($1)
mtlo $2
TAG682:
lui $3, 12
mfhi $3
mfhi $2
sw $3, 0($2)
TAG683:
beq $2, $2, TAG684
sb $2, 0($2)
bgtz $2, TAG684
mflo $1
TAG684:
sh $1, 0($1)
lui $1, 4
bne $1, $1, TAG685
lui $2, 10
TAG685:
sll $0, $0, 0
beq $2, $2, TAG686
sll $0, $0, 0
sub $4, $2, $2
TAG686:
mflo $3
lb $2, 0($4)
lui $4, 8
multu $3, $3
TAG687:
lui $3, 8
bne $4, $3, TAG688
multu $3, $3
sll $0, $0, 0
TAG688:
mthi $3
sll $0, $0, 0
sll $0, $0, 0
sllv $4, $1, $1
TAG689:
sll $0, $0, 0
multu $4, $4
sra $2, $4, 3
sll $0, $0, 0
TAG690:
bne $4, $4, TAG691
mthi $4
beq $4, $4, TAG691
mfhi $4
TAG691:
mfhi $4
blez $4, TAG692
mflo $3
beq $4, $3, TAG692
TAG692:
mult $3, $3
sw $3, 0($3)
mfhi $3
multu $3, $3
TAG693:
sb $3, 0($3)
and $4, $3, $3
mfhi $4
sll $1, $3, 12
TAG694:
sh $1, 0($1)
sw $1, 0($1)
lb $4, 0($1)
bgtz $1, TAG695
TAG695:
mult $4, $4
mtlo $4
sw $4, 0($4)
lui $2, 0
TAG696:
srl $3, $2, 13
blez $2, TAG697
lui $1, 4
beq $3, $3, TAG697
TAG697:
mthi $1
bltz $1, TAG698
mfhi $2
lui $1, 15
TAG698:
multu $1, $1
xor $1, $1, $1
srlv $4, $1, $1
slti $4, $4, 0
TAG699:
sb $4, 0($4)
multu $4, $4
mthi $4
sb $4, 0($4)
TAG700:
bgtz $4, TAG701
mthi $4
bgez $4, TAG701
sub $1, $4, $4
TAG701:
srav $1, $1, $1
sb $1, 0($1)
lw $2, 0($1)
mfhi $4
TAG702:
sw $4, 0($4)
ori $1, $4, 6
sh $4, 0($1)
lui $3, 6
TAG703:
mult $3, $3
bne $3, $3, TAG704
andi $2, $3, 1
lui $3, 8
TAG704:
lui $2, 11
sll $0, $0, 0
mtlo $2
mtlo $3
TAG705:
lui $1, 4
multu $1, $1
sll $0, $0, 0
bgtz $1, TAG706
TAG706:
mflo $3
addu $4, $1, $3
slti $3, $4, 11
beq $4, $1, TAG707
TAG707:
mthi $3
bgez $3, TAG708
subu $1, $3, $3
multu $3, $3
TAG708:
beq $1, $1, TAG709
sll $2, $1, 13
mfhi $4
sw $2, 0($4)
TAG709:
sll $0, $0, 0
slti $4, $4, 12
lui $4, 10
andi $1, $2, 9
TAG710:
sh $1, 0($1)
bne $1, $1, TAG711
mtlo $1
nor $2, $1, $1
TAG711:
sh $2, 1($2)
subu $2, $2, $2
beq $2, $2, TAG712
addu $1, $2, $2
TAG712:
sb $1, 0($1)
lw $3, 0($1)
bne $1, $1, TAG713
mflo $1
TAG713:
bne $1, $1, TAG714
sb $1, 0($1)
addiu $2, $1, 4
sb $2, 0($1)
TAG714:
mthi $2
lbu $4, 0($2)
bltz $4, TAG715
addiu $4, $2, 2
TAG715:
addu $3, $4, $4
sw $4, 0($3)
sb $4, 0($3)
srl $3, $3, 4
TAG716:
sb $3, 0($3)
lui $1, 8
sw $3, 0($3)
bltz $1, TAG717
TAG717:
sltiu $3, $1, 11
addu $4, $1, $3
sll $0, $0, 0
divu $4, $4
TAG718:
lb $1, 0($2)
lui $2, 14
blez $1, TAG719
mtlo $2
TAG719:
lui $3, 3
lui $2, 15
divu $2, $2
sltiu $1, $3, 15
TAG720:
mthi $1
addiu $4, $1, 9
mflo $1
bgez $1, TAG721
TAG721:
andi $1, $1, 2
mthi $1
addi $2, $1, 0
addi $4, $1, 1
TAG722:
or $2, $4, $4
sb $2, 0($4)
mfhi $4
beq $4, $2, TAG723
TAG723:
mfhi $2
bne $2, $2, TAG724
lhu $2, 0($4)
bne $4, $4, TAG724
TAG724:
sb $2, -256($2)
bne $2, $2, TAG725
mtlo $2
slt $1, $2, $2
TAG725:
mthi $1
sw $1, 0($1)
multu $1, $1
slt $3, $1, $1
TAG726:
bgtz $3, TAG727
sub $1, $3, $3
sw $1, 0($1)
and $4, $3, $1
TAG727:
sb $4, 0($4)
andi $2, $4, 13
sh $4, 0($4)
multu $2, $4
TAG728:
sb $2, 0($2)
beq $2, $2, TAG729
mthi $2
multu $2, $2
TAG729:
add $2, $2, $2
mfhi $2
lw $3, 0($2)
bgez $2, TAG730
TAG730:
mfhi $2
mflo $3
mfhi $2
mthi $3
TAG731:
lw $2, 0($2)
mult $2, $2
bgtz $2, TAG732
andi $3, $2, 3
TAG732:
subu $3, $3, $3
ori $2, $3, 13
lui $2, 3
mtlo $3
TAG733:
blez $2, TAG734
or $1, $2, $2
lui $1, 15
mtlo $1
TAG734:
bne $1, $1, TAG735
andi $3, $1, 8
multu $3, $1
mthi $3
TAG735:
lbu $3, 0($3)
and $1, $3, $3
beq $1, $1, TAG736
mfhi $3
TAG736:
lui $1, 0
lhu $1, 0($3)
lui $3, 7
bltz $3, TAG737
TAG737:
xor $2, $3, $3
mfhi $3
bne $3, $2, TAG738
multu $3, $3
TAG738:
mflo $4
beq $3, $3, TAG739
mthi $3
lw $3, 0($4)
TAG739:
blez $3, TAG740
lb $2, 0($3)
beq $3, $3, TAG740
lui $3, 5
TAG740:
add $2, $3, $3
lui $3, 12
sll $0, $0, 0
mfhi $3
TAG741:
sw $3, 0($3)
lhu $2, 0($3)
lui $4, 12
lui $2, 11
TAG742:
srlv $2, $2, $2
beq $2, $2, TAG743
mfhi $2
mtlo $2
TAG743:
bltz $2, TAG744
sb $2, 0($2)
mfhi $1
or $1, $1, $1
TAG744:
mthi $1
lui $2, 10
mthi $2
lh $1, 0($1)
TAG745:
ori $1, $1, 6
mthi $1
lui $3, 10
divu $1, $3
TAG746:
sll $0, $0, 0
mthi $3
mult $3, $3
beq $3, $3, TAG747
TAG747:
nor $2, $3, $3
mult $3, $3
bgez $3, TAG748
multu $3, $2
TAG748:
mflo $3
bne $2, $3, TAG749
mthi $2
mthi $2
TAG749:
mthi $3
mthi $3
mthi $3
mult $3, $3
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop |
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i7-7700_9_0xca.log_21829_1556.asm | ljhsiun2/medusa | 9 | 165438 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x1ede4, %rcx
cmp %r11, %r11
mov $0x6162636465666768, %r14
movq %r14, %xmm6
vmovups %ymm6, (%rcx)
nop
nop
nop
nop
nop
sub %rbx, %rbx
lea addresses_A_ht+0x2264, %rdx
nop
and $50158, %rsi
vmovups (%rdx), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %r14
dec %rcx
lea addresses_normal_ht+0x3424, %rsi
lea addresses_D_ht+0x11d90, %rdi
clflush (%rsi)
clflush (%rdi)
nop
xor %r12, %r12
mov $5, %rcx
rep movsb
nop
and %rdi, %rdi
lea addresses_WC_ht+0xf164, %rcx
nop
nop
cmp $19092, %rdi
movw $0x6162, (%rcx)
cmp $55205, %r11
lea addresses_A_ht+0xa426, %rsi
lea addresses_WT_ht+0x304, %rdi
nop
nop
nop
nop
nop
add $44655, %r11
mov $39, %rcx
rep movsb
nop
cmp %r14, %r14
lea addresses_A_ht+0xa6e4, %rsi
lea addresses_D_ht+0x9834, %rdi
nop
nop
nop
and %rbx, %rbx
mov $110, %rcx
rep movsl
nop
nop
nop
nop
xor $62048, %rdx
lea addresses_UC_ht+0x1b1e4, %r11
nop
nop
nop
nop
nop
add %rsi, %rsi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm3
vmovups %ymm3, (%r11)
cmp $21132, %rdi
lea addresses_WC_ht+0xc63e, %rdi
nop
nop
nop
nop
cmp $41852, %rcx
mov (%rdi), %edx
nop
xor $49176, %rbx
lea addresses_WT_ht+0x18c5c, %rsi
lea addresses_normal_ht+0x67e4, %rdi
clflush (%rdi)
cmp $49767, %r12
mov $24, %rcx
rep movsq
nop
nop
nop
sub %rdx, %rdx
lea addresses_A_ht+0x9ee4, %rbx
sub $52876, %rcx
movb (%rbx), %r11b
nop
nop
nop
nop
add %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rsi
// Load
lea addresses_PSE+0x10654, %rbp
add $59902, %r9
movb (%rbp), %r15b
nop
nop
nop
dec %r9
// Store
lea addresses_WC+0x3c24, %rax
nop
nop
nop
nop
nop
dec %rcx
movl $0x51525354, (%rax)
nop
add %r9, %r9
// Store
lea addresses_US+0xf424, %rbp
nop
nop
nop
nop
nop
xor %rbx, %rbx
movb $0x51, (%rbp)
nop
nop
nop
nop
nop
and $53810, %rsi
// Load
mov $0x6b31e40000000ae4, %rsi
nop
nop
nop
nop
nop
xor $34997, %r15
movb (%rsi), %r9b
nop
nop
and %rbp, %rbp
// Load
lea addresses_normal+0x17ee4, %rsi
nop
nop
nop
nop
and $14383, %r15
mov (%rsi), %r9
nop
nop
nop
sub %rcx, %rcx
// Faulty Load
lea addresses_US+0x116e4, %rsi
nop
nop
cmp %rbp, %rbp
vmovntdqa (%rsi), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %rbx
lea oracles, %rcx
and $0xff, %rbx
shlq $12, %rbx
mov (%rcx,%rbx,1), %rbx
pop %rsi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WC'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_US'}}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': True, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': True, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'44': 3286, '45': 10973, '49': 7509, '00': 60, 'fd': 1}
fd 44 45 45 49 45 49 45 45 45 49 45 49 45 45 44 49 45 49 45 49 44 45 45 49 44 49 45 45 49 45 49 49 44 45 45 49 49 44 45 45 45 44 45 49 49 45 45 49 49 45 45 45 45 45 45 45 45 49 49 44 49 45 49 49 45 49 45 45 49 45 45 45 49 45 45 45 44 49 45 45 45 44 45 45 49 45 44 45 45 49 45 49 45 44 45 45 45 45 45 49 45 45 49 45 45 45 45 45 49 45 44 45 45 45 49 44 45 49 49 44 44 45 45 45 45 45 49 49 44 49 45 49 49 49 45 49 44 45 49 44 49 44 49 45 45 49 44 45 49 45 44 49 44 45 45 45 49 44 49 49 45 45 45 49 49 45 49 49 44 45 49 44 44 45 45 49 49 45 45 44 49 44 44 49 49 45 45 49 45 44 45 49 45 45 45 49 45 49 45 49 45 45 49 45 45 49 45 49 44 44 49 45 44 44 45 45 49 49 45 45 49 45 45 45 45 49 45 45 45 45 44 49 45 49 45 45 45 45 49 45 49 45 49 44 49 45 45 49 45 49 44 44 49 45 49 45 49 49 45 49 44 45 45 45 49 44 45 44 45 00 49 49 49 45 45 45 45 44 49 44 49 45 49 45 45 49 45 45 49 49 45 45 49 44 49 44 45 44 49 45 49 45 49 45 49 45 49 44 45 45 45 49 45 49 45 49 49 45 45 45 45 45 45 45 44 49 44 45 49 45 45 44 49 45 45 44 44 49 45 45 45 45 45 44 45 45 49 45 45 44 49 49 44 45 44 49 45 44 44 49 45 45 45 44 49 44 49 45 49 44 45 45 45 45 45 45 45 45 45 45 45 44 45 45 49 45 45 49 49 45 45 45 44 45 45 44 49 49 45 45 45 44 44 44 49 49 49 45 44 49 45 45 49 49 49 44 45 45 45 49 49 45 45 45 45 49 45 45 49 49 44 49 45 45 49 45 45 45 49 45 45 44 45 45 45 49 44 49 49 49 45 45 45 49 49 44 45 49 45 45 45 45 45 45 45 45 49 45 49 45 44 49 49 49 45 45 45 45 45 44 49 45 45 45 45 49 49 45 49 45 49 44 45 45 49 45 45 49 44 45 45 45 44 49 44 44 49 45 49 44 45 45 45 49 49 44 49 44 49 49 45 49 45 45 45 49 45 49 44 49 45 45 49 44 49 45 44 49 45 49 44 49 44 44 45 45 49 44 45 45 45 45 49 45 45 44 49 44 49 45 45 45 49 45 45 49 49 45 45 45 45 49 49 49 49 45 49 45 49 45 49 45 49 45 45 44 49 45 45 49 44 49 45 49 45 45 45 45 45 45 45 49 49 45 45 49 45 49 45 45 44 00 45 49 44 45 45 44 49 45 45 49 45 45 44 45 45 49 45 49 45 49 45 45 45 45 49 49 49 45 49 44 45 49 44 49 45 45 45 45 45 49 45 45 49 49 45 45 49 49 45 45 44 45 44 49 44 49 49 49 45 49 45 45 49 45 49 45 45 45 45 45 49 49 45 49 49 45 45 45 44 45 45 44 49 45 45 49 44 49 49 45 49 49 44 45 49 45 45 49 45 44 44 49 45 49 49 44 49 44 45 45 44 45 49 49 44 45 49 45 45 45 49 45 45 45 49 44 45 45 45 44 49 44 44 49 45 45 49 49 49 49 49 44 49 45 44 45 44 49 45 49 44 45 45 44 49 45 45 44 49 49 45 45 44 44 45 45 44 44 49 45 49 45 45 45 49 49 45 49 49 44 00 49 49 45 45 49 45 49 45 44 49 45 45 49 49 45 49 45 49 45 49 49 45 45 45 45 45 45 49 45 45 45 44 45 45 45 45 49 45 45 45 45 44 45 45 45 49 49 45 44 45 45 49 45 49 45 45 45 45 49 49 45 45 45 49 49 45 49 49 45 49 45 49 49 45 49 49 45 45 45 45 49 45 45 44 45 45 49 45 49 45 45 45 44 49 45 45 49 45 45 45 49 45 49 45 45 45 49 49 45 49 45 45 45 45 44 49 49 45 44 44 49 49 45 45 49 49 44 44 45 45 45 45 45 49 44 44 49 44 44 44 45 49 49 44 49 45 49 49 44 49 49 45 45 45 45 45 49 45 45 49 44 49 45 45 45 44 49 49 45 45 45 49 49 45 45 49 44 45 49 45 45 49 45 44 45 49 44 49 45 49 45 49 45 49 44 45 44 44 49 45 49 45 45 49 45 49
*/
|
programs/oeis/295/A295774.asm | neoneye/loda | 22 | 242342 | ; A295774: a(n) is the minimum size of a restricted planar additive basis for the square [0,2n]^2.
; 1,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92
mul $0,4
pow $1,$0
add $1,$0
mov $0,$1
|
alloy4fun_models/trashltl/models/6/ZbE54qAswcoSwggTR.als | Kaixi26/org.alloytools.alloy | 0 | 2974 | <filename>alloy4fun_models/trashltl/models/6/ZbE54qAswcoSwggTR.als<gh_stars>0
open main
pred idZbE54qAswcoSwggTR_prop7 {
always some f : File | f in Protected
}
pred __repair { idZbE54qAswcoSwggTR_prop7 }
check __repair { idZbE54qAswcoSwggTR_prop7 <=> prop7o } |
alloy4fun_models/trashltl/models/9/dteZokrrJnbgFKCPh.als | Kaixi26/org.alloytools.alloy | 0 | 2665 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred iddteZokrrJnbgFKCPh_prop10 {
always all f:File | f in Protected implies always f in Protected
}
pred __repair { iddteZokrrJnbgFKCPh_prop10 }
check __repair { iddteZokrrJnbgFKCPh_prop10 <=> prop10o } |
sources/isal/igzip/options.asm | intel/qpl | 11 | 168465 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (C) 2022 Intel Corporation
;
; SPDX-License-Identifier: MIT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
default rel
%ifndef __OPTIONS_ASM__
%define __OPTIONS_ASM__
; Options:dir
; m - reschedule mem reads
; e b - bitbuff style
; t s x - compare style
; h - limit hash updates
; l - use longer huffman table
; f - fix cache read
%ifndef IGZIP_HIST_SIZE
%define IGZIP_HIST_SIZE (32 * 1024)
%endif
%if (IGZIP_HIST_SIZE > (32 * 1024))
%undef IGZIP_HIST_SIZE
%define IGZIP_HIST_SIZE (32 * 1024)
%endif
%ifdef LONGER_HUFFTABLE
%if (IGZIP_HIST_SIZE > 8 * 1024)
%undef IGZIP_HIST_SIZE
%define IGZIP_HIST_SIZE (8 * 1024)
%endif
%endif
; (h) limit hash update
%define LIMIT_HASH_UPDATE
; (f) fix cache read problem
%define FIX_CACHE_READ
%define ISAL_DEF_MAX_HDR_SIZE 328
%ifidn __OUTPUT_FORMAT__, elf64
%ifndef __NASM_VER__
%define WRT_OPT wrt ..sym
%else
%define WRT_OPT
%endif
%else
%define WRT_OPT
%endif
%endif ; ifndef __OPTIONS_ASM__
|
VirtualBox-5.0.0/src/VBox/VMM/testcase/tstAsmStructsAsm.asm | egraba/vbox_openbsd | 1 | 163925 | ; $Id: tstAsmStructsAsm.asm $
;; @file
; Assembly / C structure layout testcase.
;
; Make yasm/nasm create absolute symbols for the structure definition
; which we can parse and make code from using objdump and sed.
;
;
; Copyright (C) 2006-2015 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
%ifdef RT_ARCH_AMD64
BITS 64
%endif
%include "CPUMInternal.mac"
%include "HMInternal.mac"
%include "TRPMInternal.mac"
%include "VMMInternal.mac"
%include "VBox/vmm/cpum.mac"
%include "VBox/vmm/vm.mac"
%include "VBox/vmm/hm_vmx.mac"
%include "VBox/sup.mac"
%include "VMMSwitcher.mac"
%ifdef DO_GLOBALS
%include "tstAsmStructsAsm.mac"
%endif
.text
.data
.bss
|
vbox/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-big-template.asm | Nurzamal/rest_api_docker | 0 | 23947 | ; $Id: bootsector2-vbinstst-big-template.asm 69111 2017-10-17 14:26:02Z vboxsync $
;; @file
; Boot Sector 2 with big instruction test image template. For use with
; bootsector2-vbinstst-kernel.asm. Requires:
; VBoxManage setextradata bs-vbinstst-64-1 VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled 1
;
;
; Copyright (C) 2007-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; The contents of this file may alternatively be used under the terms
; of the Common Development and Distribution License Version 1.0
; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
; VirtualBox OSE distribution, in which case the provisions of the
; CDDL are applicable instead of those of the GPL.
;
; You may elect to license modified versions of this file under the
; terms and conditions of either the GPL or the CDDL or both.
;
;
; Set up the assembler environment.
;
%include "bootsector2-first.mac"
%include "bootsector2-api.mac"
%include "bootsector2-template-footer.mac"
%ifdef BS2_BIG_IMAGE_LM64
%define TMPL_LM64
%include "bootsector2-template-header.mac"
BITS 64
%elifdef BS2_BIG_IMAGE_PAE32
%define TMPL_PAE32
%include "bootsector2-template-header.mac"
BITS 32
%elifdef BS2_BIG_IMAGE_PP32
%define TMPL_PP32
%include "bootsector2-template-header.mac"
BITS 32
%else
%error Do not know which mode to run in.
mov bad,instr
%endif
ORG BS2_BIG_LOAD_ADDR
;
; The entry point is the first byte in the image.
;
bs2_big_image_start:
entrypoint:
mov xAX, .s_szTestName
call [TMPL_NM_CMN(g_pfnTestInit) xWrtRIP]
call TMPL_NM(TestInstrMain)
call [TMPL_NM_CMN(g_pfnTestTerm) xWrtRIP]
.hltloop:
hlt
jmp .hltloop
.s_szTestName:
db BS2_BIG_IMAGE_GEN_TEST_NAME, 0
;
; Instantiate the template code.
;
%include "BS2_BIG_IMAGE_GEN_SOURCE_FILE"
|
alloy4fun_models/trashltl/models/13/jCTTFzpqyL48XBn2s.als | Kaixi26/org.alloytools.alloy | 0 | 2271 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idjCTTFzpqyL48XBn2s_prop14 {
all f : Protected & Trash | after f not in Protected
}
pred __repair { idjCTTFzpqyL48XBn2s_prop14 }
check __repair { idjCTTFzpqyL48XBn2s_prop14 <=> prop14o } |
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_21829_1102.asm | ljhsiun2/medusa | 9 | 82856 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %rbx
push %rdx
push %rsi
lea addresses_WC_ht+0xf008, %r10
nop
add %rsi, %rsi
movl $0x61626364, (%r10)
nop
xor %rbx, %rbx
pop %rsi
pop %rdx
pop %rbx
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_normal+0x10e48, %rdi
inc %r10
movb $0x51, (%rdi)
nop
nop
nop
nop
nop
cmp $8627, %rbp
// REPMOV
lea addresses_A+0x658, %rsi
lea addresses_D+0xaa14, %rdi
dec %r10
mov $26, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $40451, %rdi
// Store
lea addresses_RW+0x19048, %r10
nop
nop
nop
nop
xor $34591, %r12
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
movups %xmm0, (%r10)
nop
nop
nop
and $49601, %rbp
// Faulty Load
lea addresses_normal+0x10e48, %rsi
nop
nop
nop
nop
add $48742, %r12
movb (%rsi), %r13b
lea oracles, %r10
and $0xff, %r13
shlq $12, %r13
mov (%r10,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_A'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_D'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'51': 21829}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
|
programs/oeis/010/A010875.asm | neoneye/loda | 22 | 166102 | <gh_stars>10-100
; A010875: a(n) = n mod 6.
; 0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3
mod $0,6
|
gcc-gcc-7_3_0-release/gcc/ada/scil_ll.adb | best08618/asylo | 7 | 12890 | <reponame>best08618/asylo
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S C I L _ L L --
-- --
-- B o d y --
-- --
-- Copyright (C) 2010-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Opt; use Opt;
with Sinfo; use Sinfo;
with System.HTable; use System.HTable;
package body SCIL_LL is
procedure Copy_SCIL_Node (Target : Node_Id; Source : Node_Id);
-- Copy the SCIL field from Source to Target (it is used as the argument
-- for a call to Set_Reporting_Proc in package atree).
type Header_Num is range 1 .. 4096;
function Hash (N : Node_Id) return Header_Num;
-- Hash function for Node_Ids
--------------------------
-- Internal Hash Tables --
--------------------------
package Contract_Only_Body_Flag is new Simple_HTable
(Header_Num => Header_Num,
Element => Boolean,
No_Element => False,
Key => Node_Id,
Hash => Hash,
Equal => "=");
-- This table records the value of flag Is_Contract_Only_Flag of tree nodes
package Contract_Only_Body_Nodes is new Simple_HTable
(Header_Num => Header_Num,
Element => Node_Id,
No_Element => Empty,
Key => Node_Id,
Hash => Hash,
Equal => "=");
-- This table records the value of attribute Contract_Only_Body of tree
-- nodes.
package SCIL_Nodes is new Simple_HTable
(Header_Num => Header_Num,
Element => Node_Id,
No_Element => Empty,
Key => Node_Id,
Hash => Hash,
Equal => "=");
-- This table records the value of attribute SCIL_Node of tree nodes
--------------------
-- Copy_SCIL_Node --
--------------------
procedure Copy_SCIL_Node (Target : Node_Id; Source : Node_Id) is
begin
Set_SCIL_Node (Target, Get_SCIL_Node (Source));
end Copy_SCIL_Node;
----------------------------
-- Get_Contract_Only_Body --
----------------------------
function Get_Contract_Only_Body (N : Node_Id) return Node_Id is
begin
if CodePeer_Mode
and then Present (N)
then
return Contract_Only_Body_Nodes.Get (N);
else
return Empty;
end if;
end Get_Contract_Only_Body;
-------------------
-- Get_SCIL_Node --
-------------------
function Get_SCIL_Node (N : Node_Id) return Node_Id is
begin
if Generate_SCIL
and then Present (N)
then
return SCIL_Nodes.Get (N);
else
return Empty;
end if;
end Get_SCIL_Node;
----------
-- Hash --
----------
function Hash (N : Node_Id) return Header_Num is
begin
return Header_Num (1 + N mod Node_Id (Header_Num'Last));
end Hash;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
SCIL_Nodes.Reset;
Contract_Only_Body_Nodes.Reset;
Contract_Only_Body_Flag.Reset;
Set_Reporting_Proc (Copy_SCIL_Node'Access);
end Initialize;
---------------------------
-- Is_Contract_Only_Body --
---------------------------
function Is_Contract_Only_Body (E : Entity_Id) return Boolean is
begin
return Contract_Only_Body_Flag.Get (E);
end Is_Contract_Only_Body;
----------------------------
-- Set_Contract_Only_Body --
----------------------------
procedure Set_Contract_Only_Body (N : Node_Id; Value : Node_Id) is
begin
pragma Assert (CodePeer_Mode
and then Present (N)
and then Is_Contract_Only_Body (Value));
Contract_Only_Body_Nodes.Set (N, Value);
end Set_Contract_Only_Body;
-------------------------------
-- Set_Is_Contract_Only_Body --
-------------------------------
procedure Set_Is_Contract_Only_Body (E : Entity_Id) is
begin
Contract_Only_Body_Flag.Set (E, True);
end Set_Is_Contract_Only_Body;
-------------------
-- Set_SCIL_Node --
-------------------
procedure Set_SCIL_Node (N : Node_Id; Value : Node_Id) is
begin
pragma Assert (Generate_SCIL);
if Present (Value) then
case Nkind (Value) is
when N_SCIL_Dispatch_Table_Tag_Init =>
pragma Assert (Nkind (N) = N_Object_Declaration);
null;
when N_SCIL_Dispatching_Call =>
pragma Assert (Nkind (N) in N_Subprogram_Call);
null;
when N_SCIL_Membership_Test =>
pragma Assert (Nkind_In (N, N_Identifier,
N_And_Then,
N_Or_Else,
N_Expression_With_Actions));
null;
when others =>
pragma Assert (False);
raise Program_Error;
end case;
end if;
SCIL_Nodes.Set (N, Value);
end Set_SCIL_Node;
end SCIL_LL;
|
oeis/249/A249166.asm | neoneye/loda-programs | 11 | 84621 | <filename>oeis/249/A249166.asm<gh_stars>10-100
; A249166: Odd integers concatenated with themselves.
; Submitted by <NAME>(s1)
; 11,33,55,77,99,1111,1313,1515,1717,1919,2121,2323,2525,2727,2929,3131,3333,3535,3737,3939,4141,4343,4545,4747,4949,5151,5353,5555,5757,5959,6161,6363,6565,6767,6969,7171,7373,7575,7777,7979,8181,8383,8585,8787
mul $0,2
mov $1,$0
add $0,1
add $1,6
mov $2,$0
lpb $1
mul $0,10
div $1,16
lpe
add $0,$2
|
src/lithium-legacy_filters.ads | faelys/lithium3 | 1 | 14652 | ------------------------------------------------------------------------------
-- Copyright (c) 2015, <NAME> --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Lithium.Legacy_Filters provides a standard filter matching the legacy --
-- comment formatting. --
------------------------------------------------------------------------------
with Ada.Streams;
with Natools.S_Expressions.Lockable;
with Natools.Web.Filters;
package Lithium.Legacy_Filters is
pragma Preelaborate;
type Filter is new Natools.Web.Filters.Filter with private;
overriding procedure Apply
(Object : in Filter;
Output : in out Ada.Streams.Root_Stream_Type'Class;
Data : in Ada.Streams.Stream_Element_Array);
function Create
(Arguments : in out Natools.S_Expressions.Lockable.Descriptor'Class)
return Natools.Web.Filters.Filter'Class;
private
type Filter is new Natools.Web.Filters.Filter with null record;
end Lithium.Legacy_Filters;
|
Cubical/Algebra/Polynomials/Multivariate/Equiv-Polyn-nPoly.agda | howsiyu/cubical | 0 | 415 | {-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.Multivariate.Equiv-Polyn-nPoly where
open import Cubical.Foundations.Everything
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open import Cubical.Data.Vec
open import Cubical.Data.Sigma
open import Cubical.Algebra.Ring
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.Polynomials.Univariate.Base
open import Cubical.Algebra.CommRing.Instances.UnivariatePoly
open import Cubical.Algebra.Polynomials.Multivariate.Base
open import Cubical.Algebra.Polynomials.Multivariate.Properties
open import Cubical.Algebra.CommRing.Instances.MultivariatePoly
open import Cubical.Algebra.Polynomials.Multivariate.Equiv.Poly0-A
open import Cubical.Algebra.Polynomials.Multivariate.Equiv.Poly1-Poly
open import Cubical.Algebra.Polynomials.Multivariate.Equiv.Comp-Poly
open import Cubical.Algebra.Polynomials.Multivariate.Equiv.Induced-Poly
open Nth-Poly-structure
open CommRingEquivs renaming (compCommRingEquiv to _∘-ecr_ ; invCommRingEquiv to inv-ecr)
private variable
ℓ : Level
-----------------------------------------------------------------------------
-- Definition
nPoly : (A' : CommRing ℓ) → (n : ℕ) → CommRing ℓ
nPoly A' zero = A'
nPoly A' (suc n) = UnivariatePoly (nPoly A' n)
Equiv-Polyn-nPoly : (A' : CommRing ℓ) → (n : ℕ) → CommRingEquiv (PolyCommRing A' n) (nPoly A' n)
Equiv-Polyn-nPoly A' zero = CRE-Poly0-A A'
Equiv-Polyn-nPoly A' (suc n) = inv-ecr _ _ (CRE-PolyN∘M-PolyN+M A' 1 n)
∘-ecr (lift-equiv-poly _ _ (Equiv-Polyn-nPoly A' n) 1
∘-ecr CRE-Poly1-Poly: (nPoly A' n))
|
oeis/197/A197148.asm | neoneye/loda-programs | 11 | 170872 | <gh_stars>10-100
; A197148: Decimal expansion of the x-intercept of the shortest segment from the x axis through (1,1) to the line y=3x.
; Submitted by <NAME>
; 1,6,0,4,7,9,3,6,1,8,4,6,2,1,3,9,9,0,7,3,7,8,3,1,7,9,5,0,7,1,7,9,6,1,8,4,6,7,1,5,4,4,9,2,1,9,9,9,1,2,8,6,0,7,7,8,6,3,6,2,9,2,2,1,4,9,2,1,6,3,7,2,6,1,9,1,2,6,0,4,2,1,6,6,7,9,9,7,0,2,2,8,4,7,0,1,4,7,7,2
mov $1,1
mov $2,1
mov $3,$0
mul $3,4
lpb $3
add $5,$2
add $1,$5
add $2,$1
mul $1,2
sub $3,1
mul $5,3
lpe
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
|
test/Succeed/fol-theorems/LocalHints.agda | asr/apia | 10 | 8426 | ------------------------------------------------------------------------------
-- Testing the use of local hints
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module LocalHints where
postulate
D : Set
zero : D
data N : D → Set where
zN : N zero
postulate 0-N : N zero
{-# ATP prove 0-N zN #-}
|
aosvs/paru_32.ads | SMerrony/dgemua | 2 | 318 | <reponame>SMerrony/dgemua
-- MIT License
-- Copyright (c) 2021 <NAME>
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and-or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
-- Adapted from parts of AOS-VS 7.73 PARU.32.SR definitions file
with Interfaces; use Interfaces;
with DG_Types; use DG_Types;
package PARU_32 is
-- System Error Codes
ERICM : constant Word_T := 8#01#; -- ILLEGAL SYSTEM COMMAND
ERFNO : constant Word_T := 8#02#; -- CHANNEL NOT OPEN
EROPR : constant Word_T := 8#03#; -- CHANNEL ALREADY OPEN
ERSAL : constant Word_T := 8#04#; -- SHARED I-O REQ NOT MAP SLOT ALIGNED
ERMEM : constant Word_T := 8#05#; -- INSUFFICIENT MEMORY AVAILABLE
ERADR : constant Word_T := 8#06#; -- ILLEGAL STARTING ADDRESS
EROVN : constant Word_T := 8#07#; -- ILLEGAL OVERLAY NUMBER
ERTIM : constant Word_T := 8#010#; -- ILLEGAL TIME ARGUMENT
ERNOT : constant Word_T := 8#011#; -- NO TASK CONTROL BLOCK AVAILABLE
ERXMT : constant Word_T := 8#012#; -- SIGNAL TO ADDRESS ALREADY IN USE
ERQTS : constant Word_T := 8#013#; -- ERROR IN QTASK REQUEST
ERTID : constant Word_T := 8#014#; -- TASK I.D. ERROR
ERDCH : constant Word_T := 8#015#; -- DATA CHANNEL MAP FULL
ERMPR : constant Word_T := 8#016#; -- SYSTEM CALL PARAMETER ADDRESS ERROR
ERABT : constant Word_T := 8#017#; -- TASK NOT FOUND FOR ABORT
ERIRB : constant Word_T := 8#020#; -- INSUFFICIENT ROOM IN BUFFER
ERSPC : constant Word_T := 8#021#; -- FILE SPACE EXHAUSTED
ERSFT : constant Word_T := 8#022#; -- USER STACK FAULT
ERDDE : constant Word_T := 8#023#; -- DIRECTORY DOES NOT EXIST
ERIFC : constant Word_T := 8#024#; -- ILLEGAL FILENAME CHARACTER
ERFDE : constant Word_T := 8#025#; -- FILE DOES NOT EXIST
ERNAE : constant Word_T := 8#026#; -- FILE NAME ALREADY EXISTS
ERNAD : constant Word_T := 8#027#; -- NON-DIRECTORY ARGUMENT IN PATHNAME
EREOF : constant Word_T := 8#030#; -- END OF FILE
ERDID : constant Word_T := 8#031#; -- DIRECTORY DELETE ERROR
ERWAD : constant Word_T := 8#032#; -- WRITE ACCESS DENIED
ERRAD : constant Word_T := 8#033#; -- READ ACCESS DENIED
ERAWD : constant Word_T := 8#034#; -- APPEND AND-OR WRITE ACCESS DENIED
ERNMC : constant Word_T := 8#035#; -- NO CHANNELS AVAILABLE
ERSRL : constant Word_T := 8#036#; -- RELEASE OF NON-ACTIVE SHARED SLOT
ERPRP : constant Word_T := 8#037#; -- ILLEGAL PRIORITY
ERBMX : constant Word_T := 8#040#; -- ILLEGAL MAX SIZE ON PROCESS CREATE
ERPTY : constant Word_T := 8#041#; -- ILLEGAL PROCESS TYPE
ERCON : constant Word_T := 8#042#; -- CONSOLE DEVICE SPECIFICATION ERROR
ERNSW : constant Word_T := 8#043#; -- SWAP FILE SPACE EXHAUSTED
ERIBS : constant Word_T := 8#044#; -- DEVICE ALREADY IN SYSTEM
ERDNM : constant Word_T := 8#045#; -- ILLEGAL DEVICE CODE
ERSHP : constant Word_T := 8#046#; -- ERROR ON SHARED PARTITION SET
ERRMP : constant Word_T := 8#047#; -- ERROR ON REMAP CALL
ERGSG : constant Word_T := 8#050#; -- ILLEGAL AGENT GATE CALL
ERPRN : constant Word_T := 8#051#; -- NUMBER OF PROCESSES EXCEEDS MAX
ERNEF : constant Word_T := 8#052#; -- IPC MESSAGE EXCEEDS BUFFER LENGTH
ERIVP : constant Word_T := 8#053#; -- INVALID PORT NUMBER
ERNMS : constant Word_T := 8#054#; -- NO MATCHING SEND
ERNOR : constant Word_T := 8#055#; -- NO OUTSTANDING RECEIVE
ERIOP : constant Word_T := 8#056#; -- ILLEGAL ORIGIN PORT
ERIDP : constant Word_T := 8#057#; -- ILLEGAL DESTINATION PORT
ERSEN : constant Word_T := 8#060#; -- INVALID SHARED LIBRARY REFERENCE
ERIRL : constant Word_T := 8#061#; -- ILLEGAL RECORD LENGTH SPECIFIED(=0)
ERARC : constant Word_T := 8#062#; -- ATTEMPT TO RELEASE CONSOLE DEVICE
ERDAI : constant Word_T := 8#063#; -- DEVICE ALREADY IN USE
ERARU : constant Word_T := 8#064#; -- ATTEMPT TO RELEASE UNASSIGNED DEVICE
ERACU : constant Word_T := 8#065#; -- ATTEMPT TO CLOSE UNOPEN CHANNEL-DEVICE
ERITC : constant Word_T := 8#066#; -- I-O TERMINATED BY CLOSE
ERLTL : constant Word_T := 8#067#; -- LINE TOO LONG
ERPAR : constant Word_T := 8#070#; -- PARITY ERROR
EREXC : constant Word_T := 8#071#; -- RESDENT PROC TRIED TO PUSH (.EXEC)
ERNDR : constant Word_T := 8#072#; -- NOT A DIRECTORY
ERNSA : constant Word_T := 8#073#; -- SHARED I-O REQUEST NOT TO SHARED AREA
ERSNM : constant Word_T := 8#074#; -- ATTEMPT TO CREATE > MAX #; SONS
ERFIL : constant Word_T := 8#075#; -- FILE READ ERROR
ERDTO : constant Word_T := 8#076#; -- DEVICE TIMEOUT
ERIOT : constant Word_T := 8#077#; -- WRONG TYPE I-O FOR OPEN TYPE
ERFTL : constant Word_T := 8#0100#; -- FILENAME TOO LONG
ERBOF : constant Word_T := 8#0101#; -- POSITIONING BEFORE BEGINNING OF FILE
ERPRV : constant Word_T := 8#0102#; -- CALLER NOT PRIVILEGED FOR THIS ACTION
ERSIM : constant Word_T := 8#0103#; -- SIMULTANEOUS REQUESTS ON SAME CHANNEL
ERIFT : constant Word_T := 8#0104#; -- ILLEGAL FILE TYPE
ERNRD : constant Word_T := 8#0105#; -- INSUFFICIENT ROOM IN DIRECTORY
ERILO : constant Word_T := 8#0106#; -- ILLEGAL OPEN
ERPRH : constant Word_T := 8#0107#; -- ATTEMPT TO ACCESS PROC NOT IN HIERARCHY
ERBLR : constant Word_T := 8#0110#; -- ATTEMPT TO BLOCK UNBLOCKABLE PROC
ERPRE : constant Word_T := 8#0111#; -- INVALID SYSTEM CALL PARAMETER
ERGES : constant Word_T := 8#0112#; -- ATTEMPT TO START MULTIPLE AGENTS
ERCIU : constant Word_T := 8#0113#; -- CHANNEL IN USE
ERICB : constant Word_T := 8#0114#; -- INSUFFICIENT CONTIGUOUS DISK BLOCKS
ERSTO : constant Word_T := 8#0115#; -- STACK OVERFLOW
ERIBM : constant Word_T := 8#0116#; -- INCONSISTENT BIT MAP DATA
ERBSZ : constant Word_T := 8#0117#; -- ILLEGAL BLOCK SIZE FOR DEVICE
ERXMZ : constant Word_T := 8#0120#; -- ATTEMPT TO XMT ILLEGAL MESSAGE
ERPUF : constant Word_T := 8#0121#; -- PHYSICAL UNIT FAILURE
ERPWL : constant Word_T := 8#0122#; -- PHYSICAL WRITE LOCK
ERUOL : constant Word_T := 8#0123#; -- PHYSICAL UNIT OFFLINE
ERIOO : constant Word_T := 8#0124#; -- ILLEGAL OPEN OPTION FOR FILE TYPE
ERNDV : constant Word_T := 8#0125#; -- TOO MANY OR TOO FEW DEVICE NAMES
ERMIS : constant Word_T := 8#0126#; -- DISK AND FILE SYS REV #'S DON'T MATCH
ERIDD : constant Word_T := 8#0127#; -- INCONSISTENT DIB DATA
ERILD : constant Word_T := 8#0130#; -- INCONSISTENT LD
ERIDU : constant Word_T := 8#0131#; -- INCOMPLETE LD
ERIDT : constant Word_T := 8#0132#; -- ILLEGAL DEVICE NAME TYPE
ERPDF : constant Word_T := 8#0133#; -- ERROR IN PROCESS UST DEFINITION
ERVIU : constant Word_T := 8#0134#; -- LD IN USE, CANNOT RELEASE
ERSRE : constant Word_T := 8#0135#; -- SEARCH LIST RESOLUTION ERROR
ERCGF : constant Word_T := 8#0136#; -- CAN'T GET IPC DATA FROM FATHER
ERILB : constant Word_T := 8#0137#; -- ILLEGAL LIBRARY NUMBER GIVEN
ERRFM : constant Word_T := 8#0140#; -- ILLEGAL RECORD FORMAT
ERARG : constant Word_T := 8#0141#; -- TOO MANY OR TOO FEW ARGUMENTS TO PMGR
ERIGM : constant Word_T := 8#0142#; -- ILLEGAL gtmes PARAMETERS
ERICL : constant Word_T := 8#0143#; -- ILLEGAL CLI MESSAGE
ERMRD : constant Word_T := 8#0144#; -- MESSAGE RECEIVE DISABLED
ERNAC : constant Word_T := 8#0145#; -- NOT A CONSOLE DEVICE
ERMIL : constant Word_T := 8#0146#; -- ATTEMPT TO EXCEED MAX INDEX LEVEL
ERICN : constant Word_T := 8#0147#; -- ILLEGAL CHANNEL
ERNRR : constant Word_T := 8#0150#; -- NO RECEIVER WAITING
ERSRR : constant Word_T := 8#0151#; -- SHORT RECEIVE REQUEST
ERTIN : constant Word_T := 8#0152#; -- TRANSMITTER INOPERATIVE
ERUNM : constant Word_T := 8#0153#; -- ILLEGAL USER NAME
ERILN : constant Word_T := 8#0154#; -- ILLEGAL LINK #
ERDPE : constant Word_T := 8#0155#; -- DISK POSITIONING ERROR
ERTXT : constant Word_T := 8#0156#; -- MSG TEXT LONGER THAN SPEC'D.
ERSTR : constant Word_T := 8#0157#; -- SHORT TRANSMISSION
ERHIS : constant Word_T := 8#0160#; -- ERROR ON HISTOGRAM INIT-DELETE
ERIRV : constant Word_T := 8#0161#; -- ILLEGAL RETRY VALUE
ERASS : constant Word_T := 8#0162#; -- ASSIGN ERROR - ALREADY YOUR DEVICE
ERPET : constant Word_T := 8#0163#; -- MAG TAPE REQ PAST LOGICAL END OF TAPE
ERSTS : constant Word_T := 8#0164#; -- STACK TOO SMALL (task)
ERTMT : constant Word_T := 8#0165#; -- TOO MANY TASKS REQUESTED (task)
ERSOC : constant Word_T := 8#0166#; -- SPOOLER OPEN RETRY COUNT EXCEEDED
ERACL : constant Word_T := 8#0167#; -- ILLEGAL ACL
ERWPB : constant Word_T := 8#0170#; -- stmap BUFFER INVALID OR WRITE PROTECTED
ERINP : constant Word_T := 8#0171#; -- IPC FILE NOT OPENED BY ANOTHER PROC
ERFPU : constant Word_T := 8#0172#; -- FPU HARDWARE NOT INSTALLED
ERPNM : constant Word_T := 8#0173#; -- ILLEGAL PROCESS NAME
ERPNU : constant Word_T := 8#0174#; -- PROCESS NAME ALREADY IN USE
ERDCT : constant Word_T := 8#0175#; -- DISCONNECT ERROR (MODEM CONTROLLED)
ERIPR : constant Word_T := 8#0176#; -- NONBLOCKING PROC REQUEST ERROR
ERSNI : constant Word_T := 8#0177#; -- SYSTEM NOT INSTALLED
ERLVL : constant Word_T := 8#0200#; -- MAX DIRECTORY TREE DEPTH EXCEEDED
ERROO : constant Word_T := 8#0201#; -- RELEASING OUT-OF-USE OVERLAY
ERRDL : constant Word_T := 8#0202#; -- RESOURCE DEADLOCK
EREO1 : constant Word_T := 8#0203#; -- FILE IS OPEN, CAN'T EXCLUSIVE OPEN
EREO2 : constant Word_T := 8#0204#; -- FILE IS EXCLUSIVE OPENED, CAN'T OPEN
ERIPD : constant Word_T := 8#0205#; -- INIT PRIVILEGE DENIED
ERMIM : constant Word_T := 8#0206#; -- MULTIPLE imsg CALLS TO SAME DCT
ERLNK : constant Word_T := 8#0207#; -- ILLEGAL LINK
ERIDF : constant Word_T := 8#0210#; -- ILLEGAL DUMP FORMAT
ERXNA : constant Word_T := 8#0211#; -- EXEC NOT AVAILABLE (MOUNT, ETC.)
ERXUF : constant Word_T := 8#0212#; -- EXEC REQUEST FUNCTION UNKNOWN
ERESO : constant Word_T := 8#0213#; -- ONLY EXEC'S SONS CAN DO THAT
ERRBO : constant Word_T := 8#0214#; -- REFUSED BY OPERATOR
ERWMT : constant Word_T := 8#0215#; -- VOLUME NOT MOUNTED
ERISV : constant Word_T := 8#0216#; -- ILLEGAL SWITCH VALUE (>65K DECIMAL)
-- THE NEXT FOUR ERROR CODES MUST BE CONTIGUOUSLY NUMBERED
ERIFN : constant Word_T := 8#0217#; -- INPUT FILE DOES NOT EXIST
EROFN : constant Word_T := 8#0220#; -- OUTPUT FILE DOES NOT EXIST
ERLFN : constant Word_T := 8#0221#; -- LIST FILE DOES NOT EXIST
ERDFN : constant Word_T := 8#0222#; -- DATA FILE DOES NOT EXIST
ERGFE : constant Word_T := 8#0223#; -- RECURSIVE GENERIC FILE OPEN FAILURE
ERNMW : constant Word_T := 8#0224#; -- NO MESSAGE WAITING
ERNUD : constant Word_T := 8#0225#; -- USER DATA AREA DOES NOT EXIST
ERDVC : constant Word_T := 8#0226#; -- ILLEGAL DEVICE TYPE FROM VSGEN
ERRST : constant Word_T := 8#0227#; -- RESTART OF SYSTEM CALL
ERFUR : constant Word_T := 8#0230#; -- PROBABLY FATAL HARDWARE RUNTIME ERROR
ERCFT : constant Word_T := 8#0231#; -- USER COMMERCIAL STACK FAULT
ERFFT : constant Word_T := 8#0232#; -- USER FLOATING POINT STACK FAULT
ERUAE : constant Word_T := 8#0233#; -- USER DATA AREA ALREADY EXISTS
ERISO : constant Word_T := 8#0234#; -- ILLEGAL SCREEN_EDIT REQUEST (PMGR)
ERDDH : constant Word_T := 8#0235#; -- "send" DESTINATION DEVICE HELD BY "^S"
EROVR : constant Word_T := 8#0236#; -- DATA OVERRUN ERROR
ERCPD : constant Word_T := 8#0237#; -- CONTROL POINT DIRECTORY MAX SIZE EXCEEDED
ERNSD : constant Word_T := 8#0240#; -- SYS OR BOOT DISK NOT PART OF MASTER LD
ERUSY : constant Word_T := 8#0241#; -- UNIVERSAL SYSTEM, YOU CAN'T DO THAT
EREAD : constant Word_T := 8#0242#; -- EXECUTE ACCESS DENIED
ERFIX : constant Word_T := 8#0243#; -- CAN'T INIT LD, RUN FIXUP ON IT
ERFAD : constant Word_T := 8#0244#; -- FILE ACCESS DENIED
ERDAD : constant Word_T := 8#0245#; -- DIRECTORY ACCESS DENIED
ERIAD : constant Word_T := 8#0246#; -- ATTEMPT TO DEFINE > 1 SPECIAL PROC
ERIND : constant Word_T := 8#0247#; -- NO SPECIAL PROCESS IS DEFINED
ERPRO : constant Word_T := 8#0250#; -- ATTEMPT TO ISSUE MCA REQUEST WITH
-- DIRECT I-O IN PROGRESS
ERDIO : constant Word_T := 8#0251#; -- ATTEMPT TO ISSUE MCA DIRECT I-O WITH
-- OUTSTANDING REQUESTS
ERLTK : constant Word_T := 8#0252#; -- LAST TASK WAS KILLED
ERLRF : constant Word_T := 8#0253#; -- RESOURCE LOAD OR RELEASE FAILURE
ERNNL : constant Word_T := 8#0254#; -- ZERO LENGTH FILENAME SPECIFIED
-- FOLLOWING ARE AOS-VS ONLY ERROR CODES
-- THEY ARE IN A SEPARATE GROUP FROM THE AOS ERROR CODES
-- THEY ARE IN GROUP 77, HENCE CODES ARE 77*1000+X
ERXXX : constant Word_T := 8#077# * 8#01000#; -- FIRST CODE FOR AOS-VS
-- HARDWARE POINTER VALIDATION ERRORS
ERVWP : constant Word_T := ERXXX ; -- INVALID ADDRESS PASSED AS SYSTEM CALL ARGUMENT
ERVBP : constant Word_T := ERVWP + 1; -- INVALID BYTE POINTER PASSED AS SYS CALL ARGUMENT
ERDPT : constant Word_T := ERVBP + 1; -- DIFFERENT TYPE PROCESS(32-16 BIT) WITHOUT PRIVILEGE
ERRAL : constant Word_T := ERDPT + 1; -- RING ALREADY LOADED
ERRNI : constant Word_T := ERRAL + 1; -- RING NUMBER INVALID
ERRTB : constant Word_T := ERRNI + 1; -- RING TOO BIG
ERWSM : constant Word_T := ERRTB + 1; -- SET WKG SET MIN, NOT PRIVILEGED
ERTNE : constant Word_T := ERWSM + 1; -- PMGR- TRACING NOT ENABLED
ERTAE : constant Word_T := ERTNE + 1; -- PMGR- TRACING ALREADY ENABLED
ERNUF : constant Word_T := ERTAE + 1; -- PMGR- TRACING FILE NOT A USER DATA FILE
ERRNA : constant Word_T := ERNUF + 1; -- PMGR- REQUESTOR NOT TRACING AUTHORIZED
ERPNL : constant Word_T := ERRNA + 1; -- PMGR- PATHNAME LENGTH AREA
ERSNF : constant Word_T := ERPNL + 1; -- SYMBOL NOT FOUND IN .ST FILE
ERSNR : constant Word_T := ERSNF + 1; -- SOURCE NOT RESIDENT ON lmap
ERDNR : constant Word_T := ERSNR + 1; -- DESTINATION NOT RESIDENT ON lmap
ERIBP : constant Word_T := ERDNR + 1; -- BKPT SEEN IN USER PROGRAM WHEN DEBUG NOT INIT'ED
ERBST : constant Word_T := ERIBP + 1; -- BAD SYMBOL TABLE FORMAT SEEN (gtna CALL)
ERPDO : constant Word_T := ERBST + 1; -- PAGE FILE DIRECTORY OVERFLOW
ERMWT : constant Word_T := ERPDO + 1; -- MORE THAN ONE WS TRACE DEFINED ON TARGET
ERHWT : constant Word_T := ERMWT + 1; -- BOTH TRACE AND HISTOGRAM CALLED, OR > 1 TRACE
ERDTC : constant Word_T := ERHWT + 1; -- DIFFERENT TYPE CHAIN
ERWST : constant Word_T := ERDTC + 1; -- NO WS TRACE DEFINED ON THIS TARGET
ERWSS : constant Word_T := ERWST + 1; -- INVALID WKG SET MAX-MIN
ERWSB : constant Word_T := ERWSS + 1; -- INVALID WORKING SET TRACE BUFFER
ERWSF : constant Word_T := ERWSB + 1; -- WORKING SET NOT SWAPPABLE
ERAWM : constant Word_T := ERWSF + 1; -- TRYING TO WIRE MORE PAGES THAN WS MAX
ERTPW : constant Word_T := ERAWM + 1; -- TOO MANY PAGES WIRED
ERACC : constant Word_T := ERTPW + 1; -- ACCESS DENIED ON valad
ERRNL : constant Word_T := ERACC + 1; -- RING NOT LOADED
ERTAL : constant Word_T := ERRNL + 1; -- TOO MANY ARGUMENTS ON LCALL
ERXBL : constant Word_T := ERTAL + 1; -- ixit FROM BASE LEVEL
ERPPR : constant Word_T := ERXBL + 1; -- PMGR PANIC REQUESTED BY NON-PMGR PROCESS
ERSCI : constant Word_T := ERPPR + 1; -- SYSTEM CALL AT INTERRUPT LEVEL
ERNIP : constant Word_T := ERSCI + 1; -- PMGR -- NOT AN IAC PMGR
ERNID : constant Word_T := ERNIP + 1; -- PMGR -- NOT AN IAC-DRIVEN DEVICE
ERSGO : constant Word_T := ERNID + 1; -- signl ALREADY OUTSTANDING
ERUFR : constant Word_T := ERSGO + 1; -- UNKNOWN REQUEST FUNCTION
ERIFS : constant Word_T := ERUFR + 1; -- ILLEGAL FED STRING
ERA1O : constant Word_T := ERIFS + 1; -- ATTEMPT TO 1ST OPEN AN OPEN FILE
ERIFI : constant Word_T := ERA1O + 1; -- INVALID PROTECTED FILE ID
ERAPU : constant Word_T := ERIFI + 1; -- ATTEMPT TO PASS UNHELD ACCESS PRIVILEGES
ERNBK : constant Word_T := ERAPU + 1; -- NO BREAKFILE ENABLED FOR THIS RING
ERCDS : constant Word_T := ERNBK + 1; -- PMGR: MODEM DISCONNECT IN PROGRESS - CAN'T OPEN
ERTNF : constant Word_T := ERCDS + 1; -- TASK IS NOT FAULTING
ERNMT : constant Word_T := ERTNF + 1; -- MAP TARGET DOES NOT EXIST
ERMTE : constant Word_T := ERNMT + 1; -- MAP TARGET (ALREADY) MAPPED ELSEWHERE
ERMSI : constant Word_T := ERMTE + 1; -- MAP SPECIFICATION ILLEGAL FOR TARGET
ERRAU : constant Word_T := ERMSI + 1; -- MAP REGION ALREADY IN USE
ERJAI : constant Word_T := ERRAU + 1; -- JP ALREADY INITIALIZED
ERJNI : constant Word_T := ERJAI + 1; -- JP NOT INITIALIZED
ERLNE : constant Word_T := ERJNI + 1; -- LP DOES NOT EXIST
ERLAI : constant Word_T := ERLNE + 1; -- LP ALREADY EXISTS
ERLJP : constant Word_T := ERLAI + 1; -- ATTEMPT TO RELEASE LAST JP ATTACHED TO AN LP
ERIJP : constant Word_T := ERLJP + 1; -- INVALID JPID
ERILP : constant Word_T := ERIJP + 1; -- INVALID LPID
ERJST : constant Word_T := ERILP + 1; -- JP RUNNING ONE OR MORE SYSTEM TASKS
ERJAA : constant Word_T := ERJST + 1; -- JP ALREADY ATTACHED TO LP
ERJNA : constant Word_T := ERJAA + 1; -- JP NOT ATTACHED TO LP
ERMLP : constant Word_T := ERJNA + 1; -- ATTEMPT TO EXCEED MAXIMUM LP COUNT
ERJPA : constant Word_T := ERMLP + 1; -- CANNOT DELETE LP WITH JP ATTACHED
ERITI : constant Word_T := ERJPA + 1; -- INVALID TIME INTERVAL
ERICI : constant Word_T := ERITI + 1; -- INVALID CLASS ID
ERCPC : constant Word_T := ERICI + 1; -- INVALID CLASS PERCENTAGE
ERIHL : constant Word_T := ERCPC + 1; -- INVALID HIERARCHICAL LEVEL
ERCLU : constant Word_T := ERIHL + 1; -- CLASS IN USE
ERIMP : constant Word_T := ERCLU + 1; -- ILLEGAL BIT MAP
ERILV : constant Word_T := ERIMP + 1; -- ILLEGAL LOCALITY VALUE
ERLP0 : constant Word_T := ERILV + 1; -- CANNOT DELETE LP 0
ERNMP : constant Word_T := ERLP0 + 1; -- NOT A MULTI-PROCESSOR SYSTEM
ERCNE : constant Word_T := ERNMP + 1; -- CLASS DOES NOT EXIST
ERHLP : constant Word_T := ERCNE + 1; -- ILLEGAL HIERARCHY LEVEL - PERCENTAGE PAIR
ERICD : constant Word_T := ERHLP + 1; -- ILLEGAL FUNCTION CODE
ERJPS : constant Word_T := ERICD + 1; -- JP IS IN A BAD STATE
ERCMM : constant Word_T := ERJPS + 1; -- MICROCODE IS INCOMPATIBLE WITH CURRENT SYSTEM
ERMCR : constant Word_T := ERCMM + 1; -- INCORRECT MICROCODE REVISION
ERMFF : constant Word_T := ERMCR + 1; -- MICROCODE FILE FORMAT ERROR
ERUCP : constant Word_T := ERMFF + 1; -- INVALID CPU MODEL NUMBER
ERCSO : constant Word_T := ERUCP + 1; -- CLASS SCHEDULING IS ENABLED
ERHLT : constant Word_T := ERCSO + 1; -- NON-SEQUENTIAL HIERARCHY LEVELS DESIGNATED
ERPOR : constant Word_T := ERHLT + 1; -- PID IS OUT OF RANGE FOR THIS PROCESS
ERPNO : constant Word_T := ERPOR + 1; -- PROCESS NOT AN OPERATOR
ERBCE : constant Word_T := ERPNO + 1; -- MAX BLOCK COUNT EXCEEDED
ERDEB : constant Word_T := ERBCE + 1; -- DAEMON ERROR IN ERROR BUFFER
ERDRF : constant Word_T := ERDEB + 1; -- DAEMON RESOURCE FAILURE
ERLAS : constant Word_T := ERDRF + 1; -- LOG ALREADY STARTED
ERCL0 : constant Word_T := ERLAS + 1; -- CANNOT DELETE CLASS 0
ERPVM : constant Word_T := ERCL0 + 1; -- UNKNOWN PRIVILEGE MODE
ERPVX : constant Word_T := ERPVM + 1; -- PRIVILEGE HELD EXCLUSIVELY BY OTHER PROCESS
ERPVO : constant Word_T := ERPVX + 1; -- PRIVILEGE CANNOT BE HELD EXCLUSIVELY
ERPVP : constant Word_T := ERPVO + 1; -- OTHER PROCESSES USING PRIVILEGE
ERWCP : constant Word_T := ERPVP + 1; -- WORKING SET CHANGE ONLY PARTLY DONE
ERFRD : constant Word_T := ERWCP + 1; -- FAULT RECURSION DEPTH EXCEEDED
ERALP : constant Word_T := ERFRD + 1; -- PROCESS'S CLASS NOT SCHEDULABLE ON AN ACTIVE LP
ERCLL : constant Word_T := ERALP + 1; -- INVALID CELL COUNT
ERNML : constant Word_T := ERCLL + 1; -- NO MICROCODE LOADED IN THIS JP
EREGN : constant Word_T := ERNML + 1; -- END OF GET NEXT SEQUENCE
ERCTD : constant Word_T := EREGN + 1; -- CORRUPTED TASK CONTROL BLOCK DATA DETECTED
ERIWR : constant Word_T := ERCTD + 1; -- INVALID WINDOW REFERENCE.
ERWNN : constant Word_T := ERIWR + 1; -- MAXIMUM NUMBER OF WINDOWS EXCEEDED.
ERWMD : constant Word_T := ERWNN + 1; -- WINDOW MARKED FOR DELETION.
ERIGP : constant Word_T := ERWMD + 1; -- INVALID GRAPHICS PARAMETER.
ERIPP : constant Word_T := ERIGP + 1; -- INVALID POINTER DEVICE PARAMETER.
ERIVS : constant Word_T := ERIPP + 1; -- INVALID VIEW OR SCAN PORT.
ERIWO : constant Word_T := ERIVS + 1; -- INVALID WINDOWING OPERATION.
ERIWP : constant Word_T := ERIWO + 1; -- INVALID WINDOWING PARAMETER.
ERADE : constant Word_T := ERIWP + 1; -- ASSOCIATION DOES NOT EXIST.
ERUWE : constant Word_T := ERADE + 1; -- UNKNOWN WINDOWING SUBSYSTEM ERROR
ERNSP : constant Word_T := ERUWE + 1; -- HARDWARE-MICROCODE DOES NOT SUPPORT PIXEL MAPS
ERIFL : constant Word_T := ERNSP + 1; -- IAC FAILURE
ERTMO : constant Word_T := ERIFL + 1; -- TOO MANY OPENS ON THIS DEVICE.
-- USER STATUS TABLE (UST) TEMPLATE
UST : constant Word_T := 8#0400#; -- START OF USER STATUS AREA
USTEZ : constant Word_T := 0; -- EXTENDED VARIABLE WORD COUNT
USTES : constant Word_T := USTEZ + 1; -- EXTENDED VARIABLE PAGE 0 START
USTSS : constant Word_T := USTES + 1; -- SYMBOLS START
USTSE : constant Word_T := USTSS + 2; -- SYMBOLS END
USTDA : constant Word_T := USTSE + 2; -- DEB ADDR OR -1
USTRV : constant Word_T := USTDA + 2; -- REVISION OF PROGRAM
USTTC : constant Word_T := USTRV + 2; -- NUMBER OF TASKS (1 TO 32.)
USTBL : constant Word_T := USTTC + 1; -- # IMPURE BLKS
USTST : constant Word_T := USTBL + 3; -- SHARED STARTING BLK #
-- USTST IS USTBL+3 BECAUSE THE 16. BIT USER'S
-- USTOD IS HIDDEN UNDERNEATH
USTIT : constant Word_T := USTST + 2; -- INTERRUPT ADDRESS
USTSZ : constant Word_T := USTIT + 2; -- SHARED SIZE IN BLKS
USTPR : constant Word_T := USTSZ + 2; -- PROGRAM FILE TYPE (16 OR 32 BIT)
USTSH : constant Word_T := USTPR + 5; -- PHYSICAL STARTING PAGE OF SHARED AREA IN .PR
USTEN : constant Word_T := USTPR + 8#021#; -- END OF USER UST
USTPL : constant Word_T := USTEN + 6; -- PROGRAM LOCALITY
-- LOGICAL RECORD FORMAT TYPES
ORDY : constant Word_T := 1; -- DYNAMIC
ORDS : constant Word_T := 2; -- DATA SENSITIVE
ORFX : constant Word_T := 3; -- FIXED LENGTH
ORVR : constant Word_T := 4; -- VARIABLE LENGTH
ORUN : constant Word_T := 5; -- UNDEFINED
ORVB : constant Word_T := 6; -- IBM VARIABLE BLOCK - VARIABLE RECORD
-- Record Format Field definitions
RTDY : constant Word_T := 1; -- DYNAMIC
RTDS : constant Word_T := 2; -- DATA SENSITIVE
RTFX : constant Word_T := 3; -- FIXED LENGTH
RTVR : constant Word_T := 4; -- VARIABLE LENGTH
RTUN : constant Word_T := 5; -- UNDEFINED
RTVB : constant Word_T := 6; -- IBM VARIABLE BLOCK - VARIABLE RECORD
-- GENERAL USER I-O PACKET USED FOR open-read-write-close
ICH : constant Phys_Addr_T := 0; -- CHANNEL NUMBER
ISTI : constant Phys_Addr_T := ICH + 1; -- STATUS WORD (IN)
ISTO : constant Phys_Addr_T := ISTI + 1; -- RIGHT=FILE TYPE, LEFT=RESERVED
IMRS : constant Phys_Addr_T := ISTO + 1; -- PHYSICAL RECORD SIZE - 1 (BYTES)
IBAD : constant Phys_Addr_T := IMRS + 1; -- BYTE POINTER TO BUFFER
IBAL : constant Phys_Addr_T := IBAD + 1; -- LOW ORDER BITS OF ibad
IRES : constant Phys_Addr_T := IBAL + 1; -- RESERVED
IRCL : constant Phys_Addr_T := IRES + 1; -- RECORD LENGTH
IRLR : constant Phys_Addr_T := IRCL + 1; -- RECORD LENGTH (RETURNED)
IRNW : constant Phys_Addr_T := IRLR + 1; -- RESERVED
IRNH : constant Phys_Addr_T := IRNW + 1; -- RECORD NUMBER (HIGH)
IRNL : constant Phys_Addr_T := IRNH + 1; -- RECORD NUMBER (LOW)
IFNP : constant Phys_Addr_T := IRNL + 1; -- BYTE POINTER TO FILE NAME
IFNL : constant Phys_Addr_T := IFNP + 1; -- LOW ORDER BITS OF ifnp
IDEL : constant Phys_Addr_T := IFNL + 1; -- DELIMITER TABLE ADDRESS
IDLL : constant Phys_Addr_T := IDEL + 1; -- LOWER BITS OF idel
IOSZ : constant Phys_Addr_T := IDLL + 1; -- LENGTH OF STANDARD I-O PACKET
ETSP : constant Phys_Addr_T := IDLL + 1; -- SCREEN MANAGEMENT PACKET
ETSL : constant Phys_Addr_T := ETSP + 1; -- LOWER PORTION OF etsp
ETFT : constant Phys_Addr_T := ETSL + 1; -- SELECTED FIELD TRANSLATION PACKET
ETFL : constant Phys_Addr_T := ETFT + 1; -- LOWER PORTION OF etft
ETLT : constant Phys_Addr_T := ETFL + 1; -- LABELED TAPE PACKET
ETLL : constant Phys_Addr_T := ETLT + 1; -- LOWER PORTION OF etlt
ENET : constant Phys_Addr_T := ETLL + 1; -- RESERVED
ENEL : constant Phys_Addr_T := ENET + 1; -- RESERVED
IBLT : constant Phys_Addr_T := ENEL + 1; -- LENGTH OF EXTENDED PACKET
-- isti FLAGS: BIT DEFINITIONS
IPLB : constant Natural := 0; -- PACKET LENGTH BIT (0 : constant Natural :=> SHORT PACKET)
ICFB : constant Natural := 1; -- CHANGE FORMAT BIT (0 : constant Natural :=> DEFAULT)
ICDM : constant Natural := 1; -- DUMP MODE BIT (ON close ONLY)
IPTB : constant Natural := 2; -- POSITIONING TYPE (0 : constant Natural :=> RELATIVE)
IBIB : constant Natural := 3; -- BINARY I-O
IFOB : constant Natural := 4; -- FORCE OUTPUT
IOEX : constant Natural := 5; -- EXCLUSIVE OPEN
IIPS : constant Natural := 6; -- IPC NO WAIT BIT
PDLM : constant Natural := 7; -- PRIORITY REQUEST
APBT : constant Natural := 8; -- OPEN FILE FOR APPENDING
OF1B : constant Natural := 9; -- OPEN TYPE BIT 1
OF2B : constant Natural := 10; -- OPEN TYPE BIT 2
OPIB : constant Natural := 11; -- OPEN FOR INPUT
OPOB : constant Natural := 12; -- OPEN FOR OUTPUT
RF1B : constant Natural := 13; -- RECORD FORMAT BIT 1
RF2B : constant Natural := 14; -- RECORD FORMAT BIT 2
RF3B : constant Natural := 15; -- RECORD FORMAT BIT 3
-- isti FLAGS: MASK DEFINITIONS
IPKL : constant Word_T := Shift_Right (16#8000#, IPLB); -- EXTENDED PACKET (IF SET)
ICRF : constant Word_T := Shift_Right (16#8000#, ICFB); -- CHANGE RECORD FORMAT (IF SET)
CDMP : constant Word_T := Shift_Right (16#8000#, ICDM); -- SET DUMP BIT (ONLY ON close)
IPST : constant Word_T := Shift_Right (16#8000#, IPTB); -- RECORD POSITIONING TYPE (1 - ABSOLUTE)
IBIN : constant Word_T := Shift_Right (16#8000#, IBIB); -- BINARY I-O
IFOP : constant Word_T := Shift_Right (16#8000#, IFOB); -- FORCE OUTPUT
IEXO : constant Word_T := Shift_Right (16#8000#, IOEX); -- EXCLUSIVE OPEN
IIPC : constant Word_T := Shift_Right (16#8000#, IIPS); -- IPC NO WAIT BIT
PDEL : constant Word_T := Shift_Right (16#8000#, PDLM); -- PRIORITY OPEN-I-O
APND : constant Word_T := Shift_Right (16#8000#, APBT); -- OPEN FILE FOR APPENDING
OFCR : constant Word_T := Shift_Right (16#8000#, OF1B); -- ATTEMPT CREATE BEFORE OPEN
OFCE : constant Word_T := Shift_Right (16#8000#, OF2B); -- CORRECT ERROR ON CREATE OR OPEN
OFIN : constant Word_T := Shift_Right (16#8000#, OPIB); -- OPEN FOR INPUT
OFOT : constant Word_T := Shift_Right (16#8000#, OPOB); -- OPEN FOR OUTPUT
OFIO : constant Word_T := OFIN + OFOT ; -- OPEN FOR INPUT AND OUTPUT
-- PACKET TO GET INITIAL MESSAGE (?GTMES)
GREQ : constant Phys_Addr_T := 0; -- REQUEST TYPE (SEE BELOW)
GNUM : constant Phys_Addr_T := GREQ + 1; -- ARGUMENT NUMBER
GSW : constant Phys_Addr_T := GNUM + 1; -- BYTE PTR TO POSSIBLE SWITCH
GSW1 : constant Phys_Addr_T := GSW + 1; -- LOWER PORTION OF gsw
GRES : constant Phys_Addr_T := GSW1 + 1; -- BYTE PTR TO AREA TO RECEIVE
GREL : constant Phys_Addr_T := GRES + 1; -- LOWER PORTION OF gres
-- SWITCH
GTLN : constant Phys_Addr_T := GREL + 1; -- PACKET LENGTH
-- REQUEST TYPES (greq)
GMES : constant Word_T := 0; -- GET ENTIRE MESSAGE
GCMD : constant Word_T := GMES + 1; -- GET CLI COMMAND
GCNT : constant Word_T := GCMD + 1; -- GET ARGUMENT COUNT
GARG : constant Word_T := GCNT + 1; -- GET ARGUMENT
GTSW : constant Word_T := GARG + 1; -- TEST SWITCH
GSWS : constant Word_T := GTSW + 1; -- TEST SWITCHES
GDLC : constant Word_T := 16#8000#; --1B0 DISABLE LOWER TO UPPERCASE CONVERSION
-- FLAGS RETURNED ON gflg TYPE CALLS
GFCF : constant Word_T := 16#8000#; -- 1B0 -- CLI FORMAT
-- BY CONVENTION, PROGRAMS CALLABLE FROM EXEC USE BITS 1 & 2
-- IF gfcf IS 0.
GFEX : constant Word_T := 16#4000#; --1B1 -- FROM EXEC IF ON
--IF gfex IS ON, gfxb GIVES JOB'S BATCH-INTERACTIVE STATUS
GFXB : constant Word_T := 16#2000#; --1B2 -- ON=BATCH, OFF=INTERACTIVE
-- IN ADDITION, IF CLI IS INVOKED WITH gfcf 0, BOTH gfxb & gfex
-- EQUAL TO ZERO => EXECUTE COMMAND PASSED IN MESSAGE AND RETURN.
-- PERIPHERAL DEVICE CHARACTERISTICS
-- The following parameters are for the characteristic packet offsets
ch1 : constant Word_T := 0 ; -- word 1 (offset 0)
ch2 : constant Word_T := 1 ; -- word 2 (offset 1)
ch3 : constant Word_T := 2 ; -- word 3 (offset 2)
ch4 : constant Word_T := 3 ; -- word 4 (offset 3)
ch5 : constant Word_T := 4 ; -- word 5 (offset 4)
ch6 : constant Word_T := 5 ; -- word 6 (offset 5)
ch7 : constant Word_T := 6 ; -- word 7 (offset 6)
ch8 : constant Word_T := 7 ; -- word 8 (offset 7)
ch9 : constant Word_T := 8 ; -- word 9 (offset 8)
ch10 : constant Word_T := 9 ; -- word 10 (offset 9)
ch11 : constant Word_T := 10; -- word 11 (offset 10)
ch12 : constant Word_T := 11; -- word 12 (offset 11)
ch13 : constant Word_T := 12; -- word 13 (offset 12)
ch14 : constant Word_T := 13; -- word 14 (offset 13)
ch15 : constant Word_T := 14; -- word 15 (offset 14)
-- Packet length parameters
clmin : constant Integer := 3 ; -- MIN LENGTH OF CHARACTERISTICS PACKET
clmax : constant Integer := 15; -- MAX LENGTH OF CHARACTERISTICS PACKET
bmlth : constant Integer := 20; -- LENGTH OF INQUIRE PACKET
-- ch1 - offset 0
cst : constant Word_T := 2#10000000_00000000#; -- SIMULATE TABS
csff : constant Word_T := 2#01000000_00000000#; -- SIMULATE FORM FEEDS
cepi : constant Word_T := 2#00100000_00000000#; -- REQUIRE EVEN PARITY ON INPUT
c8bt : constant Word_T := 2#00010000_00000000#; -- ALLOW 8 DATA BITS-CHARACTER
cspo : constant Word_T := 2#00001000_00000000#; -- SET PARITY ON OUTPUT (EVEN ONLY)
craf : constant Word_T := 2#00000100_00000000#; -- SEND RUBOUTS AFTER FORM FEEDS
crat : constant Word_T := 2#00000010_00000000#; -- SEND RUBOUTS AFTER TABS
crac : constant Word_T := 2#00000001_00000000#; -- SEND RUBOUTS AFTER CR AND NL
cnas : constant Word_T := 2#00000000_10000000#; -- NON ANSI STANDARD DEVICE
cott : constant Word_T := 2#00000000_01000000#; -- CONVERT ESC CHARACTER (FOR OLD TTY'S)
ceol : constant Word_T := 2#00000000_00100000#; -- DO NOT AUTO CR-LF AT END OF LINE
cuco : constant Word_T := 2#00000000_00010000#; -- OUTPUT UPPER CASE ONLY DEVICE
cmri : constant Word_T := 2#00000000_00001000#; -- MONITOR RING INDICATOR ON MODEM CONTROL LINE
cff : constant Word_T := 2#00000000_00000100#; -- FORM FEED ON OPEN
-- THE FOLLOWING TWO BITS MUST NOT BE MOVED :
ceb0 : constant Word_T := 2#00000000_00000010#; -- ECHO MODE BIT 0
ceb1 : constant Word_T := 2#00000000_00000001#; -- ECHO MODE BIT 1
-- ECHO MODES :
-- 0= NO ECHO
-- 1= STRAIGHT ECHO
-- 2= ECHO CONTROL CHARS AS ^B ^F (ETC.), ESC AS $
-- 3= (RESERVED FOR FUTURE USE)
ceos : constant Word_T := Shift_Right(16#8000#, 15); -- STRAIGHT ECHO BIT MASK
ceoc : constant Word_T := Shift_Right(16#8000#, 14); -- CNTRL SPECIAL ECHO BIT MASK
-- ch2 - offset 1
culc : constant Word_T := 2#10000000_00000000#; -- INPUT UPPER-LOWER CASE DEVICE
cpm : constant Word_T := 2#01000000_00000000#; -- DEVICE IS IN PAGE MODE
cnrm : constant Word_T := 2#00100000_00000000#; -- DISABLE MESSAGE RECEPTION
cmod : constant Word_T := 2#00010000_00000000#; -- DEVICE ON MODEM INTERFACE
-- THE FOLLOWING FOUR BITS MUST NOT BE MOVED :
cdt0 : constant Word_T := 2#00001000_00000000#; -- DEVICE TYPE BIT 0 (>>4)
cdt1 : constant Word_T := 2#00000100_00000000#; -- DEVICE TYPE BIT 1
cdt2 : constant Word_T := 2#00000010_00000000#; -- DEVICE TYPE BIT 2
cdt3 : constant Word_T := 2#00000001_00000000#; -- DEVICE TYPE BIT 3
cto : constant Word_T := 2#00000000_10000000#; -- DEVICE TIME-OUTS ENABLED
ctsp : constant Word_T := 2#00000000_01000000#; -- CRA- NO TRAILING BLANK SUPPRESSION
cpbn : constant Word_T := 2#00000000_00100000#; -- CRA- PACKED FORMATE ON BINARY READ
cesc : constant Word_T := 2#00000000_00010000#; -- ESC CHARACTER PRODUCES INTERRUPT
cwrp : constant Word_T := 2#00000000_00001000#; -- HARDWARE WRAPS AROUND ON LINE TOO LONG
cfkt : constant Word_T := 2#00000000_00000100#; -- FUNCTION KEYS ARE INPUT DELIMITERS
cnnl : constant Word_T := 2#00000000_00000010#; -- CRA- NO NEW-LINE CHARACTERS APPENDED
-- 15 -- BIT 15 USED IN PARU.16.SR FOR TRA-TPA
-- DEFINE DEVICE TYPE MASK.
dtype : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 6) + Shift_Right(16#8000#, 7);
tty : constant Word_T := 0; -- 4010A CONSOLE DEVICE TYPE
crt1 : constant Word_T := Shift_Right(16#8000#, 7); -- 4010I CONSOLE DEVICE TYPE
crt2 : constant Word_T := Shift_Right(16#8000#, 6); -- 6012 CONSOLE DEVICE TYPE
crt3 : constant Word_T := Shift_Right(16#8000#, 6) + Shift_Right(16#8000#, 7); -- 605X CONSOLE DEVICE TYPE
crt4 : constant Word_T := Shift_Right(16#8000#, 5); -- ANOTHER CONSOLE DEVICE TYPE
crt5 : constant Word_T := Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 7); -- PSEUDO 6012 DEVICE
crt6 : constant Word_T := Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 6); -- 6130 CONSOLE DEVICE TYPE
crt7 : constant Word_T := Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 6) + Shift_Right(16#8000#, 7); -- USER DEFINED DEVICE
crt8 : constant Word_T := Shift_Right(16#8000#, 4); -- USER DEFINED DEVICE
crt9 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 7); -- USER DEFINED DEVICE
crt10 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 6); -- USER DEFINED DEVICE
crt11 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 6) + Shift_Right(16#8000#, 7); -- USER DEFINED DEVICE
crt12 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 5); -- USER DEFINED DEVICE
crt13 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 7); -- USER DEFINED DEVICE
crt14 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 6); -- USER DEFINED DEVICE
crt15 : constant Word_T := Shift_Right(16#8000#, 4) + Shift_Right(16#8000#, 5) + Shift_Right(16#8000#, 6) + Shift_Right(16#8000#, 7);
-- ch3 - offset 2
--
-- HIGH BYTE IS LPP (LINES PER PAGE)
-- LOW BYTE IS CPL (CHARACTERS PER LINE)
cpgsz : constant Word_T := ch3; -- Page size
-- ch4 - offset 3
cval : constant Integer := 0; -- INDICATES THAT THE CONTENTS OF THIS
-- OFFSET ARE VALID(USED ON RETURN
-- FROM gechr.) IN GENERAL, cval: constant Integer := 1
-- FOR AN IAC SYSTEM, AND cval OTHERWISE.
br0bit : constant Integer := 1; -- BAUD RATE FIELD (BIT 0)
ctck : constant Integer := 2; -- INTERNAL TRANSMITER CLOCK
crck : constant Integer := 3; -- INTERNAL RECIEVER CLOCK
br1bit : constant Integer := 4; -- BAUD RATE FIELD (BIT 1)
br2bit : constant Integer := 5; -- BAUD RATE FIELD (BIT 2)
br3bit : constant Integer := 6; -- BAUD RATE FIELD (BIT 3)
br4bit : constant Integer := 7; -- BAUD RATE FIELD (BIT 4)
cst0 : constant Integer := 8; -- STOP BIT 0
cst1 : constant Integer := 9; -- STOP BIT 1
cpty : constant Integer := 10; -- ODD-EVEN PARITY
cpen : constant Integer := 11; -- PARITY DISABLED-ENABLED
clt0 : constant Integer := 12; -- DATA LENGTH BITS
clt1 : constant Integer := 13; -- DATA LENGTH BITS
brfct : constant Integer := 14; -- BAUD RATE FACTOR 16X
hrdflc : constant Integer := 15; -- HARDWARE FLOW CONTROL (CTS)
chofc : constant Integer := hrdflc; -- HARDWARE OUTPUT FLOW CONTROL
-- SPLIT BAUD RATE VALUES:
-- csben = 16#8000#>>ctck + 16#8000#>>brfct -- ENABLE SPLIT BAUD
-- csbds = 16#8000#>>ctck + 16#8000#>>crck + 16#8000#>>brfct -- DISABLE SPLIT BAUD
-- STOP BIT FIELD VALUES ARE:
-- csmsk = 16#8000#>>cst0 + 16#8000#>>cst1 -- STOP BIT FIELD MASK
-- cs10= 0bcst0+16#8000# >> cst1 -- 1 STOP BIT
-- cs15= 16#8000# >> cst0+0bcst1 -- 1.5 STOP BITS
-- cs20= 16#8000# >> cst0+16#8000# >> cst1 -- 2 STOP BITS
-- PARITY BIT FIELD VALUES ARE:
-- cpmsk= 16#8000# >> cpen+16#8000# >> cpty -- PARITY FIELD MASK
-- cpr0= 0bcpen -- DISABLE PARITY CHECKING
-- cpr1= 1bcpen+0bcpty -- ENABLE ODD PARITY
-- cpr2= 1bcpen+1bcpty -- ENABLE EVEN PARITY
-- -- BAUD RATES ARE:
-- brmsk= 16#8000# >> br0bt)!17B(br4bit) -- BAUD RATE MASK
-- cr50= 0B(br0bit)+0.B(br4bit) -- 50
-- cr75= 0B(br0bit)+1.B(br4bit) -- 75
-- cr110= 0B(br0bit)+2.B(br4bit) -- 110
-- cr134= 0B(br0bit)+3.B(br4bit) -- 134.5
-- cr150= 0B(br0bit)+4.B(br4bit) -- 150
-- cr300= 0B(br0bit)+5.B(br4bit) -- 300
-- cr600= 0B(br0bit)+6.B(br4bit) -- 600
-- cr12h= 0B(br0bit)+7.B(br4bit) -- 1200
-- cr18h= 0B(br0bit)+8.B(br4bit) -- 1800
-- cr20h= 0B(br0bit)+9.B(br4bit) -- 2000
-- cr24h= 0B(br0bit)+10.B(br4bit) -- 2400
-- cr36h= 0B(br0bit)+11.B(br4bit) -- 3600
-- cr48h= 0B(br0bit)+12.B(br4bit) -- 4800
-- cr72h= 0B(br0bit)+13.B(br4bit) -- 7200
-- cr96h= 0B(br0bit)+14.B(br4bit) -- 9600
-- cr19k= 0B(br0bit)+15.B(br4bit) -- 19200
-- cr45= 16#8000# >> br0bt)+0.B(br4bit) -- 45.5
-- cr38k= 16#8000# >> br0bt)+1.B(br4bit) -- 38400
-- 2- 15 -- - RESERVED
-- -- DATA LENGTH FIELD VALUES ARE:
-- clmsk= 1bclt0+1bclt1 -- DATA LENGTH FIELD MASK
-- cln5= 0bclt0+0bclt1 -- 5 BITS
-- cln6= 0bclt0+1bclt1 -- 6 BITS
-- cln7= 1bclt0+0bclt1 -- 7 BITS
-- cln8= 1bclt0+1bclt1 -- 8 BITS
-- ch5 - offset 4
-- shco = 0 -- SHARED CONSOLE OWNERSHIP CHARACTERISTIC
-- xofc = 1 -- XON XOFF OUTPUT FLOW CONTROL
-- xifc = 2 -- XON XOFF INPUT FLOW CONTROL
-- c16b = 3 -- Enable double byte handling (16 bit characters)
-- bmdev = 4 -- BITMAP DEVICE
-- trpe = 5 -- TERMINATE READ ON POINTER EVENT
-- cwin = 6 -- WINDOW CHARACTERISTIC
-- cacc = 7 -- ENFORCE ACCESS CONTROL
-- cctd = 8 -- PORT IS IN A CONTENDED ENVIRONMENT (PBX, TERMSERVER)
-- csrds = 9 -- SUPRESS RECEIVER DISABLE
-- cxlt = 10 -- TRANSLATE (ANSI TERMINAL)
-- cabd = 11 -- [1] DO AUTOBAUD MATCH IF SET
-- callout = 12 -- CALL OUT (PBX SUPPORT)
-- cbk0 = 13 -- BREAK FUNCTION BIT 0
-- cbk1 = 14 -- BREAK FUNCTION BIT 1
-- cbk2 = 15 -- BREAK FUNCTION BIT 2
-- -- BREAK FUNCTION FIELD DEFINITION:
-- cbkm= 1bcbk0+1bcbk1+1bcbk2 -- MASK
-- cbbm= 0B(cbk2) -- BREAK BINARY MODE
-- cbds= 16#8000# >> cbk2 -- FORCE DISCONNECT
-- cbca= 2B(cbk2) -- SEND ^C^A SEQUENCE
-- cbcb= 3B(cbk2) -- SEND ^C^B SEQUENCE
-- cbcf= 4B(cbk2) -- SEND ^C^F SEQUENCE
-- 5B(cbk2) -- - RESERVED
-- 6B(cbk2) -- - RESERVED
-- 7B(cbk2) -- - RESERVED
-- ch6 - offset 5
-- -- (MODEM ENHANCEMENTS)
-- cmdop = ch6 -- Modem options
-- cdmc = 0 -- RESERVED
-- cmdua = cdmc + 1 -- DIRECT USER ACCESS TO MODEM
-- -- (DON'T PEND FIRST WRITE)
-- chdpx = cmdua + 1 -- HALF DUPLEX
-- csmcd = chdpx + 1 -- SUPPRESS MONITORING CD
-- -- (FOR MODEM CONNECTION)
-- crtscd = csmcd + 1 -- ON HALF DUPLEX, DON'T RAISE
-- -- RTS UNTIL CD DROPS
-- chifc = crtscd + 1 -- HARDWARE INPUT FLOW CONTROL
-- -- ch7 - offset 6
-- ctcc = ch7 -- Time (in msec) to wait for CD on a modem
-- -- connect
-- -- ch8 - offset 7
-- ctcd = ch8 -- Time (in msec) to wait for CD if it drops
-- -- ch9 - offset 8
-- ctdw = ch9 -- Time (in msec) to wait after connection
-- -- before allowing I-O
-- -- ch10 - offset 9
-- cthc = ch10 -- Time (in msec) to wait after disconnect
-- -- for modem to settle
-- -- ch11 - offset 10
-- ctlt = ch11 -- Time (in msec) to wait before turning
-- -- the line around (from XMIT to REC) for
-- -- half duplex
-- -- ch12 - offset 11
-- -- (Console Type)
-- --
-- -- HIGH BYTE IS RESERVED (=0)
-- -- LOW BYTE IS CONSOLE TYPE
-- cctype = ch12 -- Console type
-- -- Mask for accessing just console type
-- cctypmsk = 377 -- mask for just console type
-- -- These are the current values for console types
-- cdcc = 0 -- Direct Connect
-- clnc = cdcc + 1 -- Term Server
-- ctnc = clnc + 1 -- TELNET Consoles
-- cpdc = ctnc + 1 -- PAD Consoles
-- cvrc = cpdc + 1 -- Virtual (SVTA-like) Consoles
-- cpxc = cvrc + 1 -- PBX Consoles (PIM)
-- cpcc = cpxc + 1 -- PC-TS Consoles
-- cbmc = cpcc + 1 -- Bitmapped (Windowing) Console
-- ctpc = cbmc + 1 -- T1 Primary Rate Console(IIC)
-- -- ch13 - offset 12
-- -- (Language Front-end Processor)
-- clfp = ch13 -- LFP options
-- ckg0 = 0 -- G1-G0 double-byte handling
-- ckhw = 1 -- Kanji half-wide characters
-- cnlx = 2 -- Native language translation
-- DEVICE TYPES : (FOR RUBOUT ECHO & CURSOR CONTROLS)
--
-- PIBC2 CHARACTERS TO :
-- DEVICE MODEL MOVE MOVE ERASE RUBOUT
-- TYPE : # : LEFT: RIGHT: LINE: ECHO:
--
-- 0 4010A (NONE) (NONE) (NONE) SHIFT O
-- 0 6040 (NONE) (NONE) (NONE) SHIFT O
-- 1 4010I ^Z ^Y ^K ^Z,SPACE,^Z
-- 2 6012 ^Y ^X ^K ^Y,SPACE,^Y
-- 3 6052 ^Y ^X ^K ^Y,SPACE,^Y
-- 4 ---- ESC,D ESC,C ESC,K ESC,D,SPACE,ESC,D
-- 5 ----
-- 6 6130 ^Y ^X ^K ^Z,SPACE,^Z
-- 7-15 (FOR FUTURE EXPANSION)
-- EXEC
-- FUNCTION CODES
XFMLT : constant Word_T := 8#02#; -- MOUNT A LABELED TAPE
XFMUN : constant Word_T := 8#01#; -- MOUNT A UNIT
XFDUN : constant Word_T := 8#03#; -- DISMOUNT A UNIT OR LABELED TAPE
XFOTH : constant Word_T := 8#04#; -- SUBMIT A BATCH JOB FOR OTHER USER
XFSUB : constant Word_T := 8#05#; -- SUBMIT A BATCH JOB
XFLPT : constant Word_T := 8#06#; -- SUBMIT A PRINT FILE
XFPTP : constant Word_T := 8#07#; -- SUBMIT A PAPER TAPE PUNCH FILE
XFXTS : constant Word_T := 8#010#; -- Status report, Large PID
XFPLT : constant Word_T := 8#011#; -- SUBMIT A PLOT FILE
XFHAM : constant Word_T := 8#012#; -- SUBMIT A HAMLET FILE
XFSNA : constant Word_T := 8#013#; -- SUBMIT AN SNA/RJE FILE
XFFTA : constant Word_T := 8#014#; -- SUBMIT A FTA REQUEST
XFXUN : constant Word_T := 8#015#; -- EXTENDED MOUNT A UNIT
XFXML : constant Word_T := 8#016#; -- EXTENDED MOUNT A LABELED TAPE
XFHOL : constant Word_T := 8#017#; -- HOLD A QUEUE ENTRY
XFUNH : constant Word_T := 8#020#; -- UNHOLD A QUEUE ENTRY
XFCAN : constant Word_T := 8#021#; -- CANCEL A QUEUE ENTRY
XFSTS : constant Word_T := 8#022#; -- OBTAIN RELATIONSHIP TO EXEC
XFQST : constant Word_T := 8#023#; -- GET QUEUE TYPE FROM QUEUE NAME
-- THE FOLLOWING FUNCTIONS ARE RESERVED FOR INTERNAL USE
XFLO : constant Word_T := 8#024#; -- LABELED TAPE OPEN
XFLC : constant Word_T := 8#025#; -- LABELED TAPE CLOSE
XFME : constant Word_T := 8#026#; -- MOUNT ERROR
XFNV : constant Word_T := 8#027#; -- MOUNT NEXT VOLUME
XF30R : constant Word_T := 8#030#; -- Reserved
XFSV : constant Word_T := 8#031#; -- MOUNT SPECIFIC VOLUME
XFMNT : constant Word_T := 8#032#; -- Submit a job to a MOUNT queue
XFBAT : constant Word_T := 8#033#; -- Submit a job to a BATCH queue
XFMOD : constant Word_T := 8#034#; -- Modify parameters of a queued job
XFSQT : constant Word_T := 8#035#; -- Get queue type by sequence number
XFNQN : constant Word_T := 8#036#; -- Get list of queue names
XFQDS : constant Word_T := 8#037#; -- Given a queuename,
-- Get info on all jobs in queue
XFXDU : constant Word_T := 8#040#; -- Extended Dismount
-- END OF INTERNAL FUNCTIONS
-- PACKET OFFSETS FOR xfxts
XFP1 : constant Phys_Addr_T := 2; -- FIRST PARAMETER
XFP2 : constant Phys_Addr_T := 3; -- SECOND PARAMETER
XFP2L : constant Phys_Addr_T := XFP2 + 1; -- LOWER PORTION OF xfp2
XFP3 : constant Phys_Addr_T := XFP2L + 1; -- 3RD PARAMETER - RESERVED
XFP4 : constant Phys_Addr_T := XFP3 + 1; -- 15-BIT PID
-- PACKET TO GET SYSTEM INFORMATION (sinfo)
SIRN : constant Phys_Addr_T := 0; -- SYSTEM REV, LEFT BYTE=MAJOR, RIGHT BYTE=MINOR
SIRS : constant Phys_Addr_T := SIRN + 1; -- RESERVED
SIMM : constant Phys_Addr_T := SIRS + 1; -- LENGTH OF PHYSICAL MEMORY (HPAGE)
SIML : constant Phys_Addr_T := SIMM + 1; -- LOWER PORTION OF simm
SILN : constant Phys_Addr_T := SIML + 1; -- BYTE POINTER TO RECEIVE MASTER LDU NAME
SILL : constant Phys_Addr_T := SILN + 1; -- LOWER PORTION OF siln
SIID : constant Phys_Addr_T := SILL + 1; -- BYTE POINTER TO RECEIVE SYSTEM IDENTIFIER
SIIL : constant Phys_Addr_T := SIID + 1; -- LOWER PORTION OF siid
SIPL : constant Phys_Addr_T := SIIL + 1; -- UNEXTENDED PACKET LENGTH
SIOS : constant Phys_Addr_T := SIIL + 1; -- BYTE POINTER TO EXECUTING OP SYS PATHNAME
SIOL : constant Phys_Addr_T := SIOS + 1; -- LOWER PORTION OF sios
SSIN : constant Phys_Addr_T := SIOL + 1; -- SYSTEM IMPLEMENTATION NUMBER (savs FOR AOSVS)
SIEX : constant Phys_Addr_T := SSIN + 6; -- EXTENDED PACKET LENGTH (INCLUDE 3 DOUBLE
-- WORDS FOR FUTURE EXPANSIONS)
SAVS : constant Word_T := 2; -- AOS/VS
-- SYSTEM RECORD I/O PACKET FOR ALL DISK AND MAG. TAPEAND MCA REQUESTS FROM EITHER THE AGENT OR USER CONTEXTS. USED FOR rdb/wrb, prdb/PWRB, spage AND allocate
-- Used for ?SPAGE, ?RDB, ?WDB
PSTI : constant Phys_Addr_T := 0; -- RECORD COUNT (RIGHT), STATUS IN (LEFT)
PSTO : constant Phys_Addr_T := PSTI + 1; -- RESERVED (LEFT) PRIORITY (RIGHT)
PCAD : constant Phys_Addr_T := PSTO + 1; -- WORD ADDRESS FOR DATA
PCDL : constant Phys_Addr_T := PCAD + 1; -- LOW ORDER PORTION OF pcad
PRNH : constant Phys_Addr_T := PCDL + 1; -- RECORD NUMBER (HIGH) LINK # (MCA)
PRNL : constant Phys_Addr_T := PRNH + 1; -- RECORD NUMBER (LOW) RETRY COUNT (MCA)
PRCL : constant Phys_Addr_T := PRNL + 1; -- MAX LENGTH OF EACH RECORD (MAG TAPE)
-- BYTE COUNT IN LAST BLOCK (DISK WRITES)
-- BYTE COUNT (MCA)
PRES : constant Phys_Addr_T := PRCL + 1; -- RESERVED WORD
PBLT : constant Phys_Addr_T := PRES + 1; -- PACKET SIZE
-- PACKET FOR DIRECTORY ENTRY CREATION (create)
CFTYP : constant Phys_Addr_T := 0; -- ENTRY TYPE (RH) AND RECORD FORMAT (LH)
CPOR : constant Phys_Addr_T := 1; -- PORT NUMBER (IPC TYPES ONLY)
CHFS : constant Phys_Addr_T := 1; -- HASH FRAME SIZE (DIRECTORY TYPES ONLY)
CHID : constant Phys_Addr_T := 1; -- HOST ID (frem TYPE FILES ONLY )
CCPS : constant Phys_Addr_T := 1; -- FILE CONTROL PARAMETER (OTHERS)
CTIM : constant Phys_Addr_T := 2; -- POINTER TO TIME BLOCK
CTIL : constant Phys_Addr_T := CTIM + 1; -- LOWER PORTION OF ctim
CACP : constant Phys_Addr_T := CTIL + 1; -- POINTER TO INITIAL ACL
CACL : constant Phys_Addr_T := CACP + 1; -- LOWER PORTION OF cacp
CMSH : constant Phys_Addr_T := CACL + 1; -- MAX SPACE ALLOCATED (fcpd)
CMSL : constant Phys_Addr_T := CMSH + 1; -- MAX SPACE ALLOCATED (LOW)
CDEH : constant Phys_Addr_T := CACL + 1; -- RESERVED
CDEL : constant Phys_Addr_T := CDEH + 1; -- FILE ELEMENT SIZE
CMIL : constant Phys_Addr_T := CDEL + 1; -- MAXIMUM INDEX LEVEL DEPTH
CMRS : constant Phys_Addr_T := CMIL + 1; -- RESERVED
CLTH : constant Phys_Addr_T := CMRS + 1; -- LENGTH OF THE PARAMETER BLOCK
-- ENTRY TYPE RANGES
SMIN :constant Word_T := 0; -- SYSTEM MINIMUM
SMAX :constant Word_T := 63; -- SYSTEM MAXIMUM
DMIN :constant Word_T := smax + 1; -- DGC MINIMUM
DMAX :constant Word_T := 127; -- DGC MAXIMUM
UMIN :constant Word_T := dmax + 1; -- USER MINIMUM
UMAX :constant Word_T := 255; -- USER MAXIMUM
-- SYSTEM ENTRY TYPES
-- MISC
FLNK : constant Word_T := SMIN; -- LINK
FSDF : constant Word_T := FLNK + 1; -- SYSTEM DATA FILE
FMTF : constant Word_T := FSDF + 1; -- MAG TAPE FILE
FGFN : constant Word_T := FMTF + 1; -- GENERIC FILE NAME
-- DIRECTORIES (DO NOT CHANGE THEIR ORDER)
FDIR : constant Word_T := 10; -- DISK DIRECTORY
FLDU : constant Word_T := FDIR + 1; -- LD ROOT DIRECTORY
FCPD : constant Word_T := FLDU + 1; -- CONTROL POINT DIRECTORY
FMTV : constant Word_T := FCPD + 1; -- MAG TAPE VOLUME
FMDR : constant Word_T := FMTV + 1; -- RESERVED FOR RT32(MEM DIRS), NOT LEGAL FOR AOS
FGNR : constant Word_T := FMDR + 1; -- RESERVED FOR RT32, NOT LEGAL FOR AOS
LDIR : constant Word_T := FDIR; -- LOW DIR TYPE
HDIR : constant Word_T := FGNR; -- HIGH DIR TYPE
LCPD : constant Word_T := FLDU; -- LOW CONTROL POINT DIR TYPE
HCPD : constant Word_T := FCPD; -- HIGH CONTROL POINT DIR TYPE
-- UNITS
FDKU : constant Word_T := 20; -- DISK UNIT
FMCU : constant Word_T := FDKU + 1; -- MULTIPROCESSOR COMMUNICATIONS UNIT
FMTU : constant Word_T := FMCU + 1; -- MAG TAPE UNIT
FLPU : constant Word_T := FMTU + 1; -- DATA CHANNEL LINE PRINTER
FLPD : constant Word_T := FLPU + 1; -- DATA CHANNEL LP2 UNIT
FLPE : constant Word_T := FLPD + 1; -- DATA CHANNEL LINE PRINTER (LASER)
FPGN : constant Word_T := FLPE + 1; -- RESERVED FOR RT32(PROCESS GROUP)
FLTU : constant Word_T := FLPU + 1; -- LABELLED MAG TAPE UNIT
-- ***** NO LONGER USED *****
LUNT : constant Word_T := FDKU; -- LOW UNIT TYPE
HUNT : constant Word_T := FPGN; -- HIGH UNIT TYPE
-- IPC ENTRY TYPES
FIPC : constant Word_T := 30; -- IPC PORT ENTRY
-- DGC ENTRY TYPES
FUDF : constant Word_T := DMIN; -- USER DATA FILE
FPRG : constant Word_T := FUDF + 1; -- PROGRAM FILE
FUPF : constant Word_T := FPRG + 1; -- USER PROFILE FILE
FSTF : constant Word_T := FUPF + 1; -- SYMBOL TABLE FILE
FTXT : constant Word_T := FSTF + 1; -- TEXT FILE
FLOG : constant Word_T := FTXT + 1; -- SYSTEM LOG FILE (ACCOUNTING FILE)
FNCC : constant Word_T := FLOG + 1; -- FORTRAN CARRIAGE CONTROL FILE
FLCC : constant Word_T := FNCC + 1; -- FORTRAN CARRIAGE CONTROL FILE
FFCC : constant Word_T := FLCC + 1; -- FORTRAN CARRIAGE CONTROL FILE
FOCC : constant Word_T := FFCC + 1; -- FORTRAN CARRIAGE CONTROL FILE
FPRV : constant Word_T := FOCC + 1; -- AOS/VS PROGRAM FILE
FWRD : constant Word_T := FPRV + 1; -- WORD PROCESSING
FAFI : constant Word_T := FWRD + 1; -- APL FILE
FAWS : constant Word_T := FAFI + 1; -- APL WORKSPACE FILE
FBCI : constant Word_T := FAWS + 1; -- BASIC CORE IMAGE FILE
FDCF : constant Word_T := FBCI + 1; -- DEVICE CONFIGURATION FILE (NETWORKING)
FLCF : constant Word_T := FDCF + 1; -- LINK CONFIGURATION FILE (NETWORKING)
FLUG : constant Word_T := FLCF + 1; -- LOGICAL UNIT GROUP FILE (SNA)
FRTL : constant Word_T := FLUG + 1; -- AOS/RT32 RESERVED FILE TYPE RANGE (LO)
FRTH : constant Word_T := FRTL + 4; -- AOS/RT32 RESERVED FILE TYPE RANGE (HI)
FUNX : constant Word_T := FRTH + 1; -- VS/UNIX FILE
FBBS : constant Word_T := FUNX + 1; -- BUSINESS BASIC SYMBOL FILE
FVLF : constant Word_T := FBBS + 1; -- BUSINESS BASIC VOLUME LABEL FILE
FDBF : constant Word_T := FVLF + 1; -- BUSINESS BASIC DATA BASE FILE
-- CEO FILE TYPES
FGKM : constant Word_T := FDBF + 1; -- DG GRAPHICS KERNAL METAFILE
FVDM : constant Word_T := FGKM + 1; -- VIRTUAL DEVICE METAFILE
FNAP : constant Word_T := FVDM + 1; -- NAPLPS STANDARD GRAPH FILE
FTRV : constant Word_T := FNAP + 1; -- TRENDVIEW COMMAND FILE
FSPD : constant Word_T := FTRV + 1; -- SPREADSHEET FILE
FQRY : constant Word_T := FSPD + 1; -- PRESENT QUERY MACRO
FDTB : constant Word_T := FQRY + 1; -- PHD DATA TABLE
FFMT : constant Word_T := FDTB + 1; -- PHD FORMAT FILE
FWPT : constant Word_T := FFMT + 1; -- TEXT INTERCHANGE FORMAT
FDIF : constant Word_T := FWPT + 1; -- DATA INTERCHANGE FORMAT
FVIF : constant Word_T := FDIF + 1; -- VOICE IMAGE FILE
FIMG : constant Word_T := FVIF + 1; -- FACSIMILE IMAGE
FPRF : constant Word_T := FIMG + 1; -- PRINT READY FILE
-- MORE DGC ENTRY TYPES
FPIP : constant Word_T := FPRF + 1; -- PIPE FILE
FTTX : constant Word_T := FPIP + 1; -- TELETEX FILE
FDXF : constant Word_T := FTTX + 1; -- RESERVED FOR DXA
FDXR : constant Word_T := FDXF + 1; -- RESERVED FOR DXA
FCWP : constant Word_T := FDXR + 1; -- CEO WORD PROCESSOR FILE
FCWT : constant Word_T := FCWP; -- CEOwrite WORD PROCESSOR FILE
FRPT : constant Word_T := FCWP + 1; -- PHD REPORT FILE
-- INTERPROCESS COMMUNICATION SYSTEM (IPC) PARAMETERS
--
-- HIGHEST LEGAL LOCAL PORT NUMBER
IMPRT : constant Natural := 2047; -- MAX LEGAL USER LOCAL PORT #
MXLPN : constant Natural := 4095; -- MAX LEGAL LOCAL PORT #
-- IPC MESSAGE HEADER
ISFL : constant Phys_Addr_T := 0; -- SYSTEM FLAGS
IUFL : constant Phys_Addr_T := 1; -- USER FLAGS
-- PORT NUMBERS FOR ?ISEND
IDPH : constant Phys_Addr_T := 2; -- DESTINATION PORT NUMBER (HIGH)
IDPL : constant Phys_Addr_T := 3; -- DESTINATION PORT NUMBER (LOW)
IOPN : constant Phys_Addr_T := 4; -- ORIGIN PORT NUMBER
-- PORT NUMBERS FOR ?IREC
IOPH : constant Phys_Addr_T := 2; -- ORIGIN PORT NUMBER (HIGH)
IOPL : constant Phys_Addr_T := 3; -- ORIGIN PORT NUMBER (LOW)
IDPN : constant Phys_Addr_T := 4; -- DESTINATION PORT NUMBER
ILTH : constant Phys_Addr_T := 5; -- LENGTH OF MESSAGE OR BUFFER (IN WORDS)
IPTR : constant Phys_Addr_T := 6; -- POINTER TO MESSAGE/BUFFER
IPTL : constant Phys_Addr_T := IPTR+1; -- LOWER PORTION OF IPTR
IPLTH : constant Phys_Addr_T := IPTL+1; -- LENGTH OF HEADER
IRSV : constant Phys_Addr_T := IPTL+1; -- RESERVED
IRLT : constant Phys_Addr_T := IRSV+1; -- IS.R RECEIVE BUFFER LENGTH
IRPT : constant Phys_Addr_T := IRLT+1; -- IS.R RECEIVE BUFFER POINTER
IRPL : constant Phys_Addr_T := IRPT+1; -- LOWER PORTION OF IRPT
IPRLTH : constant Phys_Addr_T := IRPL+1; -- LENGTH OF ?IS.R HEADER
-- PACKET FOR TASK DEFINITION (?TASK)
DLNK : constant Phys_Addr_T := 0; -- NON-ZERO = SHORT PACKET, ZERO = EXTENDED
DLNL : constant Phys_Addr_T := DLNK + 1; -- 1 LOWER PORTION OF ?DLNK
DLNKB : constant Phys_Addr_T := DLNL + 1; -- 2 BACKWARDS LINK (UPPER PORTION)
DLNKBL : constant Phys_Addr_T := DLNKB + 1; -- 3 BACKWARDS LINK (LOWER PORTION)
DPRI : constant Phys_Addr_T := DLNKBL + 1; --4 PRIORITY, ZERO TO USE CALLER'S
DID : constant Phys_Addr_T := DPRI + 1; -- 5 I.D., ZERO FOR NONE
DPC : constant Phys_Addr_T := DID + 1; -- 6 STARTING ADDRESS OR RESOURCE ENTRY
DPCL : constant Phys_Addr_T := DPC + 1; -- 7 LOWER PORTION OF ?DPC
DAC2 : constant Phys_Addr_T := DPCL + 1; -- 8 INITIAL AC2 CONTENTS
DCL2 : constant Phys_Addr_T := DAC2 + 1; -- 9 LOWER PORTION OF ?DAC2
DSTB : constant Phys_Addr_T := DCL2 + 1; -- 10 STACK BASE, MINUS ONE FOR NO STACK
DSTL : constant Phys_Addr_T := DSTB + 1; -- 11 LOWER PORTION OF ?DSTB
DSFLT : constant Phys_Addr_T := DSTL + 1; -- 12 STACK FAULT ROUTINE ADDR OR -1 IF SAME AS CURRENT
DSSZ : constant Phys_Addr_T := DSFLT + 1;-- 13 STACK SIZE, IGNORED IF NO STACK
DSSL : constant Phys_Addr_T := DSSZ + 1; -- 14 LOWER PORTION OF ?DSSZ
DFLGS : constant Phys_Addr_T := DSSL + 1; -- 15 FLAGS
-- DFL0 : constant Phys_Addr_T := 1B0 -- RESERVED FOR SYSTEM
-- DFLRC : constant Phys_Addr_T := 1B1 -- RESOURCE CALL TASK
-- DFL15 : constant Phys_Addr_T := 1B15 -- RESERVED FOR SYSTEM
DRES : constant Phys_Addr_T := DFLGS + 1; -- 16 RESERVED FOR SYSTEM
DNUM : constant Phys_Addr_T := DRES + 1; -- 17 NUMBER OF TASKS TO CREATE
DSLTH : constant Phys_Addr_T := DNUM + 1; -- LENGTH OF SHORT PACKET
DSH : constant Phys_Addr_T := DNUM + 1; -- STARTING HOUR, -1 IF IMMEDIATE
DSMS : constant Phys_Addr_T := DSH + 1; -- STARTING SECOND IN HOUR, IGNORED IF IMMEDIATE
DCC : constant Phys_Addr_T := DSMS + 1; -- NUMBER OF TIMES TO CREATE TASK(S)
DCI : constant Phys_Addr_T := DCC + 1; -- CREATION INCREMENT IN SECONDS
DXLTH :constant Phys_Addr_T := DCI + 1; -- LENGTH OF EXTENDED PACKET
-- ?RNGPR PACKET OFFSETS
--
RNGBP : constant Phys_Addr_T := 0; -- BYTE POINTER TO BUFFER (2 WORDS)
RNGNM : constant Phys_Addr_T := RNGBP + 2; -- RING # OF RING TO CHECK
RNGLB : constant Phys_Addr_T := RNGNM + 1; -- BUFFER BYTE LENGTH
RNGPL : constant Phys_Addr_T := RNGLB + 1; -- PACKET LENGTH
-- ?UIDSTAT
UUID : constant Phys_Addr_T := 0; -- Unique task identifier
UTSTAT : constant Phys_Addr_T := UUID + 1; -- Task Status Word
UTID : constant Phys_Addr_T := UTSTAT + 1; -- Standard Task ID
UTPRI : constant Phys_Addr_T := UTID + 1; -- Task Prioroty
end PARU_32; |
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1128.asm | ljhsiun2/medusa | 9 | 21544 | <filename>Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1128.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xd249, %rax
nop
xor %rbx, %rbx
mov (%rax), %r15w
nop
nop
nop
inc %rdi
lea addresses_WT_ht+0xfe61, %rbx
nop
nop
xor $56302, %r12
movl $0x61626364, (%rbx)
nop
sub %rbx, %rbx
lea addresses_UC_ht+0x155d1, %r12
nop
nop
nop
nop
and $56091, %rcx
mov (%r12), %r14d
nop
nop
nop
dec %rbx
lea addresses_WC_ht+0x1ce80, %rcx
nop
nop
nop
nop
nop
xor %r14, %r14
mov $0x6162636465666768, %rax
movq %rax, (%rcx)
nop
nop
nop
nop
nop
sub $31930, %rbx
lea addresses_UC_ht+0x41d1, %rsi
lea addresses_WT_ht+0x14391, %rdi
nop
nop
nop
nop
nop
sub %rax, %rax
mov $5, %rcx
rep movsb
nop
nop
nop
nop
cmp %rax, %rax
lea addresses_UC_ht+0xee31, %rsi
lea addresses_WT_ht+0x100ab, %rdi
nop
nop
nop
xor $36248, %r12
mov $61, %rcx
rep movsb
nop
nop
nop
nop
add $10125, %rdi
lea addresses_A_ht+0x5151, %rsi
lea addresses_A_ht+0x882f, %rdi
nop
nop
nop
add $57933, %r12
mov $12, %rcx
rep movsq
nop
cmp %rcx, %rcx
lea addresses_WC_ht+0x12dd1, %rbx
nop
nop
nop
nop
nop
cmp $16161, %r12
mov $0x6162636465666768, %rax
movq %rax, %xmm2
and $0xffffffffffffffc0, %rbx
movntdq %xmm2, (%rbx)
nop
nop
sub $56689, %r15
lea addresses_WT_ht+0x11e51, %r14
and %r12, %r12
movl $0x61626364, (%r14)
nop
nop
mfence
lea addresses_A_ht+0x1a5d1, %rax
nop
nop
nop
nop
and %rcx, %rcx
movl $0x61626364, (%rax)
nop
and $33667, %rbx
lea addresses_WT_ht+0x31d1, %rsi
lea addresses_D_ht+0x11295, %rdi
nop
nop
nop
and %rax, %rax
mov $33, %rcx
rep movsl
lfence
lea addresses_UC_ht+0x1ec91, %r14
nop
nop
nop
nop
nop
inc %r15
movb (%r14), %al
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_normal_ht+0x7851, %rsi
lea addresses_normal_ht+0xb1f1, %rdi
nop
cmp $44843, %r14
mov $87, %rcx
rep movsq
dec %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r9
push %rax
push %rbx
push %rsi
// Store
lea addresses_normal+0x11dd1, %r10
nop
nop
nop
nop
nop
and %r13, %r13
mov $0x5152535455565758, %rsi
movq %rsi, (%r10)
nop
nop
nop
nop
nop
and %rsi, %rsi
// Store
lea addresses_UC+0x2f71, %r11
nop
nop
nop
nop
xor $1529, %rbx
mov $0x5152535455565758, %rsi
movq %rsi, %xmm2
vmovups %ymm2, (%r11)
sub $29989, %r9
// Store
lea addresses_A+0x91d1, %r10
add $65374, %rbx
mov $0x5152535455565758, %rax
movq %rax, %xmm1
vmovups %ymm1, (%r10)
nop
nop
nop
xor %rsi, %rsi
// Store
lea addresses_WT+0x139d1, %r13
nop
nop
nop
xor $61279, %rax
mov $0x5152535455565758, %r11
movq %r11, (%r13)
nop
nop
nop
nop
xor $58566, %r10
// Store
lea addresses_PSE+0xbfd1, %rbx
nop
nop
add $62166, %rax
movw $0x5152, (%rbx)
nop
nop
nop
nop
and %r9, %r9
// Load
lea addresses_RW+0x1c781, %r13
nop
nop
nop
add $48863, %r10
mov (%r13), %r9w
nop
nop
xor %r9, %r9
// Store
lea addresses_PSE+0x21d1, %rax
nop
nop
nop
nop
nop
dec %r10
movl $0x51525354, (%rax)
nop
nop
nop
xor $48805, %r13
// Store
lea addresses_A+0x91d1, %r11
nop
nop
nop
cmp %r9, %r9
mov $0x5152535455565758, %rbx
movq %rbx, %xmm0
movups %xmm0, (%r11)
nop
nop
nop
cmp %r11, %r11
// Store
lea addresses_normal+0xc9d1, %rbx
dec %r10
mov $0x5152535455565758, %rax
movq %rax, %xmm6
movups %xmm6, (%rbx)
cmp $11706, %rsi
// Store
lea addresses_WC+0x167d1, %r10
add $2278, %r13
movw $0x5152, (%r10)
nop
sub $37604, %r10
// Store
lea addresses_normal+0xa731, %rbx
nop
nop
inc %r13
mov $0x5152535455565758, %rsi
movq %rsi, %xmm1
vmovups %ymm1, (%rbx)
nop
sub %r9, %r9
// Store
lea addresses_RW+0x1bb45, %rsi
clflush (%rsi)
sub %r13, %r13
movl $0x51525354, (%rsi)
sub $9579, %r11
// Load
lea addresses_PSE+0x5851, %r10
cmp %rbx, %rbx
mov (%r10), %r13d
nop
nop
nop
xor %r13, %r13
// Load
lea addresses_normal+0x1f3d1, %r10
clflush (%r10)
nop
nop
nop
nop
nop
cmp %rsi, %rsi
vmovups (%r10), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r9
nop
nop
and $30243, %rax
// Store
lea addresses_normal+0xef1, %r11
nop
nop
nop
and $42348, %r9
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%r11)
nop
nop
nop
nop
xor $12052, %r13
// Faulty Load
lea addresses_A+0x91d1, %rsi
clflush (%rsi)
nop
nop
nop
xor $48065, %r13
mov (%rsi), %r11
lea oracles, %r10
and $0xff, %r11
shlq $12, %r11
mov (%r10,%r11,1), %r11
pop %rsi
pop %rbx
pop %rax
pop %r9
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 9}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': True, 'size': 2, 'type': 'addresses_RW', 'congruent': 3}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC', 'congruent': 9}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 1}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 9}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 5}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A_ht', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 4}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 9}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': True, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 7, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 9}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 6}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
libsrc/_DEVELOPMENT/sound/bit/c/sccz80/bit_beepfx_di.asm | meesokim/z88dk | 0 | 242423 | <filename>libsrc/_DEVELOPMENT/sound/bit/c/sccz80/bit_beepfx_di.asm
; void bit_beepfx_di(void *effect)
SECTION code_sound_bit
PUBLIC bit_beepfx_di
EXTERN asm_bit_beepfx_di
bit_beepfx_di:
push hl
pop ix
jp asm_bit_beepfx_di
|
oeis/267/A267210.asm | neoneye/loda-programs | 11 | 28674 | <filename>oeis/267/A267210.asm
; A267210: Decimal representation of the middle column of the "Rule 109" elementary cellular automaton starting with a single ON (black) cell.
; 1,3,7,14,29,59,118,237,475,950,1901,3803,7606,15213,30427,60854,121709,243419,486838,973677,1947355,3894710,7789421,15578843,31157686,62315373,124630747,249261494,498522989,997045979,1994091958,3988183917,7976367835,15952735670,31905471341,63810942683,127621885366,255243770733,510487541467,1020975082934,2041950165869,4083900331739,8167800663478,16335601326957,32671202653915,65342405307830,130684810615661,261369621231323,522739242462646,1045478484925293,2090956969850587,4181913939701174
mov $1,2
pow $1,$0
mul $1,13
sub $1,10
div $1,7
add $1,1
mov $0,$1
|
libsrc/math/genmath/c/sccz80/odd.asm | jpoikela/z88dk | 640 | 28004 | <filename>libsrc/math/genmath/c/sccz80/odd.asm
; Small C+ Math Library - Support routine
; Negate a fp number push address
SECTION code_fp
PUBLIC odd
EXTERN minusfa
;
; negate FA, and push address of MINUSFA
; called to evaluate functions f(x) when the argument is
; negative and f() satisfies f(-x)=-f(x)
.odd CALL minusfa
LD HL,minusfa
EX (SP),HL
JP (HL)
;
|
src/main/antlr/DocumentGrammar.g4 | raulmrebane/LaTeXEE | 7 | 7253 | grammar DocumentGrammar;
document
: (proof | theorem | declaration | lemma | fileInclusion | formula | .)*?
;
proof
: '\\begin{proof}' (formula | declaration | lemma | . )*? '\\end{proof}'
;
theorem
: '\\begin{theorem}' (formula | declaration | lemma | .)*? '\\end{theorem}'
;
lemma
: '\\begin{lemma}' (formula | declaration | .)*? '\\end{lemma}'
;
BLOCK_COMMENT
: '\\begin{comment}' .*? '\\end{comment}' -> skip
;
LineCommentLiteral
: UnterminatedLineCommentLiteral ('\r'|'\n')
;
UnterminatedLineCommentLiteral
: '%' (~[\\n] | '\\' (. | EOF))*?
;
formula
: FormulaLiteral
| MACROFORMULA
;
fileInclusion
: FILEINCLUSION
;
declaration
: '\\declare' BraceLiteral
;
MACROFORMULA
: BEGINFRAGMENT .*? ENDFRAGMENT
;
fragment BEGINFRAGMENT
: '\\begin{equation}'
;
fragment ENDFRAGMENT
: '\\end{equation}'
;
FILEINCLUSION
: '\\InputIfFileExists{' .*? '}'
;
BraceLiteral
: UnterminatedBraceLiteral '}'
;
UnterminatedBraceLiteral
: '{' (~[\\}] | '\\' (. | EOF)|BraceLiteral)*
;
FormulaLiteral
: UnterminatedFormulaLiteral '$'
;
UnterminatedFormulaLiteral
: '$' ('$' (~[\\$] | '\\' (. | EOF))* '$'|(~[\\$] | '\\' (. | EOF))*)
;
BugFixLiteral
: '\\$'
| '\\{' //the other brace is handled in UnterminatedBraceLiteral
| '\\n'
| '\\r'
| '\\%'
;
OTHER : .->skip;
|
supported_grammars/pegjs/Pegjs.g4 | kaby76/Domemtech.TrashBase | 1 | 1810 | grammar Pegjs;
grammar_ : initializer? rule+ EOF;
initializer : CodeBlock eos ;
eos : ';' | ;
rule : identifier StringLiteral? '=' expression eos ;
expression : choiceexpression ;
choiceexpression : actionexpression ('/' actionexpression)* ;
actionexpression : sequenceexpression CodeBlock? ;
sequenceexpression : labeledexpression labeledexpression* ;
labeledexpression : '@' labelidentifier? prefixedexpression
| labelidentifier prefixedexpression
| prefixedexpression
;
labelidentifier : identifier ':' ;
prefixedexpression : prefixedoperator suffixedexpression
| suffixedexpression
;
prefixedoperator : '$'
| '&'
| '!'
;
suffixedexpression : primaryexpression suffixedoperator
| primaryexpression
;
suffixedoperator : '?'
| '*'
| '+'
;
primaryexpression : literalMatcher
| CharacterClassMatcher
| AnyMatcher
| rulereferenceexpression
| semanticpredicateexpression
| '(' expression ')'
;
rulereferenceexpression : identifier /* {! stringliteral? '=' }? */ ;
semanticpredicateexpression : semanticpredicateoperator CodeBlock ;
semanticpredicateoperator : '&' | '!' ;
identifier : Identifier;
Identifier : Identifierstart Identifierpart* ;
WhiteSpace : [\t\n\r\f \u00a0\ufeff] -> channel(HIDDEN);
fragment LineTerminator : [\n\r\u2028\u2029] ;
fragment LineTerminatorSequence : '\n' | '\r' '\n' | '\r' | '\u2028' | '\u2029' ;
fragment SourceCharacter : ~[\n\r\u2028\u2029] ;
Comment : (MultiLineComment | SingleLineComment) -> channel(HIDDEN);
fragment MultiLineComment : '/*' .*? '*/' ;
fragment SingleLineComment : '//' SourceCharacter* ;
fragment Identifierstart : UnicodeLetter | '$' | '_' | '\\' UnicodeEscapeSequence ;
fragment Identifierpart : Identifierstart | UnicodeCombiningMark | UnicodeDigit | UnicodeConnectorPunctuation | '\u200c' | '\u200d' ;
fragment UnicodeLetter : [\p{Lu}] | [\p{Ll}] | [\p{Lt}] | [\p{Lm}] | [\p{Lo}] | [\p{Nl}] ;
fragment UnicodeCombiningMark : [\p{Mn}] | [\p{Mc}] ;
fragment UnicodeDigit : [\p{Nd}] ;
fragment UnicodeConnectorPunctuation : [\p{Pc}] ;
CharacterClassMatcher : '[' CharacterPart*? ']' 'i'? ;
fragment CharacterPart : (~(']' | '\\')) | '\\' . ;
fragment EscapeSequence : SingleEscapeSequence | '0' | HexEscapeSequence | UnicodeEscapeSequence ;
fragment SingleEscapeCharacter : '\'' | '"' | '\\' | 'b' | 'f' | 'n' | 'r' | 't' | 'v' | ']' | . ;
fragment EscapeCharacter : SingleEscapeCharacter | DecimalDigit | 'x' | 'u' ;
fragment HexEscapeSequence : 'x' HexDigit HexDigit ;
fragment UnicodeEscapeSequence : 'u' HexDigit HexDigit HexDigit HexDigit ;
DecimalDigit : [0-9] ;
HexDigit : [0-9a-fA-F] ;
AnyMatcher : '.' ;
CodeBlock : CB ;
fragment CB : '{' CBAux* '}' ;
fragment CBAux : (~('{' | '}')) | CB ;
literalMatcher : StringLiteral 'i'? ;
StringLiteral : '"' DoubleStringCharacters? '"' | '\'' SingleStringCharacters? '\'' ;
fragment DoubleStringCharacters : DoubleStringCharacter+ ;
fragment DoubleStringCharacter : ~["\\\r\n] | DoubleEscapeSequence ;
fragment DoubleEscapeSequence : '\\' [bvtnfr"'\\] | OctalEscape | UnicodeEscape ;
fragment SingleStringCharacters : SingleStringCharacter+ ;
fragment SingleStringCharacter : ~['\\\r\n] | SingleEscapeSequence ;
fragment SingleEscapeSequence : '\\' [bvtnfr"'\\] | OctalEscape | UnicodeEscape ;
fragment OctalDigit : [0-7] ;
fragment OctalEscape : '\\' OctalDigit | '\\' OctalDigit OctalDigit | '\\' ZeroToThree OctalDigit OctalDigit ;
fragment ZeroToThree : [0-3] ;
fragment UnicodeEscape : '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit ;
|
programs/oeis/275/A275365.asm | neoneye/loda | 22 | 242905 | <reponame>neoneye/loda<gh_stars>10-100
; A275365: a(1)=2, a(2)=2; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
; 0,2,2,4,2,6,2,8,2,10,2,12,2,14,2,16,2,18,2,20,2,22,2,24,2,26,2,28,2,30,2,32,2,34,2,36,2,38,2,40,2,42,2,44,2,46,2,48,2,50,2,52,2,54,2,56,2,58,2,60,2,62,2,64,2,66,2,68,2,70,2,72,2,74,2,76,2,78,2,80,2,82,2,84,2,86,2,88,2,90,2,92,2,94,2,96,2,98,2,100
lpb $0
add $0,1
mov $1,$0
mod $0,2
lpe
mov $0,$1
|
programs/oeis/022/A022794.asm | karttu/loda | 0 | 17972 | <filename>programs/oeis/022/A022794.asm
; A022794: Place where n-th 1 occurs in A023132.
; 1,2,3,5,7,9,12,15,18,22,26,30,35,40,45,51,57,64,71,78,86,94,102,111,120,129,139,149,159,170,181,192,204,216,229,242,255,269,283,297,312,327,342,358,374,390,407,424,441,459,477,496,515,534,554,574
mov $14,$0
mov $16,$0
add $16,1
lpb $16,1
clr $0,14
mov $0,$14
sub $16,1
sub $0,$16
mov $13,$0
add $13,1
lpb $13,1
mov $0,$11
sub $13,1
sub $0,$13
mov $1,$0
mod $1,17
gcd $1,3
div $1,2
add $12,$1
lpe
add $15,$12
lpe
mov $1,$15
|
engine/events/hidden_objects/route_15_binoculars.asm | opiter09/ASM-Machina | 1 | 3431 | <reponame>opiter09/ASM-Machina
Route15GateLeftBinoculars:
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
tx_pre Route15UpstairsBinocularsText
ld a, ARTICUNO
ld [wcf91], a
call PlayCry
jp DisplayMonFrontSpriteInBox
Route15UpstairsBinocularsText::
text_far _Route15UpstairsBinocularsText
text_end
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1342.asm | ljhsiun2/medusa | 9 | 163251 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %rax
push %rsi
lea addresses_normal_ht+0x16512, %rax
nop
nop
nop
nop
nop
inc %r11
mov (%rax), %esi
inc %r14
pop %rsi
pop %rax
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r9
push %rax
push %rbx
// Store
lea addresses_UC+0x9a6a, %r10
nop
xor %r14, %r14
movl $0x51525354, (%r10)
nop
sub %r10, %r10
// Faulty Load
lea addresses_WT+0x1e8a2, %rbx
xor $22002, %r9
movb (%rbx), %r11b
lea oracles, %r14
and $0xff, %r11
shlq $12, %r11
mov (%r14,%r11,1), %r11
pop %rbx
pop %rax
pop %r9
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_UC', 'congruent': 3}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 3}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
alloy4fun_models/trashltl/models/5/kwEbjdKvDMMyfFxmu.als | Kaixi26/org.alloytools.alloy | 0 | 2710 | <gh_stars>0
open main
pred idkwEbjdKvDMMyfFxmu_prop6 {
always all f : File | f not in Trash until f in Trash
}
pred __repair { idkwEbjdKvDMMyfFxmu_prop6 }
check __repair { idkwEbjdKvDMMyfFxmu_prop6 <=> prop6o } |
oeis/278/A278681.asm | neoneye/loda-programs | 11 | 15253 | ; A278681: Pisot sequence T(3,16).
; Submitted by <NAME>(s4)
; 3,16,85,451,2392,12686,67280,356818,1892376,10036172,53226604,282286052,1497097488,7939821584,42108658448,223322287224,1184384537744,6281355751296,33313023614352,176674843181968,936990907061504,4969309405367264,26354616443092800,139771093164846816,741272730213321216,3931322622695991104
mov $4,2
lpb $4
mov $1,3
mov $2,5
mov $3,8
mov $4,1
lpb $0
sub $0,1
div $3,$2
mov $2,$1
mul $1,5
add $1,$3
mul $3,$1
lpe
lpe
mov $0,$1
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_916.asm | ljhsiun2/medusa | 9 | 29727 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1d915, %r10
clflush (%r10)
xor $63946, %rax
mov $0x6162636465666768, %rdi
movq %rdi, (%r10)
nop
nop
nop
and %rdi, %rdi
lea addresses_WT_ht+0x22d5, %rsi
lea addresses_normal_ht+0x12145, %rdi
nop
nop
nop
nop
nop
cmp $64715, %r12
mov $116, %rcx
rep movsw
nop
nop
nop
nop
and %rax, %rax
lea addresses_UC_ht+0x198d5, %rax
nop
nop
nop
nop
nop
dec %r11
mov (%rax), %r12
nop
nop
nop
cmp %rdi, %rdi
lea addresses_WC_ht+0x1d83f, %rcx
nop
nop
nop
nop
nop
xor $14294, %r12
movb (%rcx), %r11b
nop
nop
nop
nop
add $52004, %rdi
lea addresses_WC_ht+0xc8d5, %r11
clflush (%r11)
nop
inc %rcx
movl $0x61626364, (%r11)
nop
nop
nop
mfence
lea addresses_A_ht+0x1d8d5, %rcx
and %rax, %rax
mov (%rcx), %di
nop
nop
and $30610, %r12
lea addresses_WC_ht+0x105dd, %rsi
lea addresses_WC_ht+0xcc5d, %rdi
nop
add $63003, %rdx
mov $73, %rcx
rep movsq
nop
nop
nop
inc %r12
lea addresses_A_ht+0x18415, %r12
nop
nop
nop
and $11327, %r11
mov $0x6162636465666768, %rdi
movq %rdi, (%r12)
nop
sub $35899, %rsi
lea addresses_D_ht+0x15d8d, %r12
nop
cmp $44930, %r10
mov (%r12), %r11w
nop
nop
nop
add $45515, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rcx
// Store
lea addresses_PSE+0x108d5, %rcx
clflush (%rcx)
xor %r14, %r14
mov $0x5152535455565758, %r12
movq %r12, %xmm1
vmovups %ymm1, (%rcx)
xor $51236, %rcx
// Store
lea addresses_UC+0x105d5, %r14
add %r12, %r12
movw $0x5152, (%r14)
nop
nop
nop
cmp %r12, %r12
// Store
lea addresses_WT+0x13d75, %r14
xor $56448, %r13
movl $0x51525354, (%r14)
nop
nop
and $905, %r14
// Faulty Load
lea addresses_RW+0x6ad5, %r10
nop
nop
nop
nop
cmp $6555, %r14
mov (%r10), %ecx
lea oracles, %r14
and $0xff, %rcx
shlq $12, %rcx
mov (%r14,%rcx,1), %rcx
pop %rcx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
extern/gnat_sdl/gnat_sdl2/src/mm3dnow_h.ads | AdaCore/training_material | 15 | 11483 | <filename>extern/gnat_sdl/gnat_sdl2/src/mm3dnow_h.ads
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package mm3dnow_h is
-- Copyright (C) 2004-2017 Free Software Foundation, Inc.
-- This file is part of GCC.
-- GCC is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3, or (at your option)
-- any later version.
-- GCC is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- Under Section 7 of GPL version 3, you are granted additional
-- permissions described in the GCC Runtime Library Exception, version
-- 3.1, as published by the Free Software Foundation.
-- You should have received a copy of the GNU General Public License and
-- a copy of the GCC Runtime Library Exception along with this program;
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-- <http://www.gnu.org/licenses/>.
-- Implemented from the mm3dnow.h (of supposedly AMD origin) included with
-- MSVC 7.1.
-- skipped func _m_femms
-- skipped func _m_pavgusb
-- skipped func _m_pf2id
-- skipped func _m_pfacc
-- skipped func _m_pfadd
-- skipped func _m_pfcmpeq
-- skipped func _m_pfcmpge
-- skipped func _m_pfcmpgt
-- skipped func _m_pfmax
-- skipped func _m_pfmin
-- skipped func _m_pfmul
-- skipped func _m_pfrcp
-- skipped func _m_pfrcpit1
-- skipped func _m_pfrcpit2
-- skipped func _m_pfrsqrt
-- skipped func _m_pfrsqit1
-- skipped func _m_pfsub
-- skipped func _m_pfsubr
-- skipped func _m_pi2fd
-- skipped func _m_pmulhrw
-- skipped func _m_prefetch
-- _MM_HINT_T0
-- skipped func _m_from_float
-- skipped func _m_to_float
-- skipped func _m_pf2iw
-- skipped func _m_pfnacc
-- skipped func _m_pfpnacc
-- skipped func _m_pi2fw
-- skipped func _m_pswapd
end mm3dnow_h;
|
zMIPS/Program1.asm | MattPhilpot/RandomHomework | 0 | 172761 | <filename>zMIPS/Program1.asm
#mips "Hello World"
#<NAME>
.data
the_string: .asciiz "Hello World!\n" #.asciiz - specifies a string terminated in null
.text
main:
la $a0, the_string #la - load address, which in this case is a string
li $v0, 4 #li - loads the last immediate
syscall #syscall - calls the last kernal
li $v0, 10 #li - return
syscall |
source/nodes/program-nodes-discrete_range_vectors.ads | optikos/oasis | 0 | 30741 | <filename>source/nodes/program-nodes-discrete_range_vectors.ads
-- Copyright (c) 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Nodes.Generic_Vectors;
with Program.Elements.Discrete_Ranges;
package Program.Nodes.Discrete_Range_Vectors is new
Program.Nodes.Generic_Vectors
(Program.Elements.Discrete_Ranges.Discrete_Range_Vector);
pragma Preelaborate (Program.Nodes.Discrete_Range_Vectors);
|
LibraBFT/Yasm/Properties.agda | lisandrasilva/bft-consensus-agda-1 | 0 | 12911 | {- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2020 Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import LibraBFT.Prelude
open import LibraBFT.Lemmas
open import LibraBFT.Base.PKCS
open import LibraBFT.Base.Types
open import LibraBFT.Abstract.Types
open import LibraBFT.Yasm.Base
open import LibraBFT.Yasm.AvailableEpochs using (AvailableEpochs) renaming (lookup'' to EC-lookup)
import LibraBFT.Yasm.AvailableEpochs as AE
-- This module provides some definitions and properties that facilitate
-- proofs of properties about a distributed system modeled by Yasm.System
-- paramaterized by some SystemParameters.
module LibraBFT.Yasm.Properties (parms : SystemParameters) where
open import LibraBFT.Yasm.System parms
open SystemParameters parms
open EpochConfig
-- A ValidPartForPK collects the assumptions about what a /part/ in the outputs of an honest verifier
-- satisfies: (i) the epoch field is consistent with the existent epochs and (ii) the verifier is
-- a member of the associated epoch config, and (iii) has the given PK in that epoch.
record ValidPartForPK {e}(𝓔s : AvailableEpochs e)(part : Part)(pk : PK) : Set₁ where
constructor mkValidPartForPK
field
vp-epoch : part-epoch part < e
vp-ec : EpochConfig
vp-ec-≡ : AE.lookup'' 𝓔s vp-epoch ≡ vp-ec
vp-member : Member vp-ec
vp-key : getPubKey vp-ec vp-member ≡ pk
open ValidPartForPK public
-- A valid part remains valid when new epochs are added
ValidPartForPK-stable-epoch : ∀{e part pk}{𝓔s : AvailableEpochs e}(𝓔 : EpochConfigFor e)
→ ValidPartForPK 𝓔s part pk
→ ValidPartForPK (AE.append 𝓔 𝓔s) part pk
ValidPartForPK-stable-epoch {pk = pk} {𝓔s} 𝓔 (mkValidPartForPK e ec refl emem vpk) = record
{ vp-epoch = ≤-step e
; vp-ec = ec
; vp-ec-≡ = AE.lookup''-≤-step-lemma 𝓔s 𝓔 e
; vp-member = emem
; vp-key = vpk
}
-- A valid part remains valid
ValidPartForPK-stable : ∀{e e'}{st : SystemState e}{st' : SystemState e'}
→ Step* st st' → ∀{part pk}
→ ValidPartForPK (availEpochs st) part pk
→ ValidPartForPK (availEpochs st') part pk
ValidPartForPK-stable step-0 v = v
ValidPartForPK-stable (step-s st (step-epoch 𝓔)) v
= ValidPartForPK-stable-epoch 𝓔 (ValidPartForPK-stable st v)
ValidPartForPK-stable (step-s st (step-peer _)) v
= ValidPartForPK-stable st v
-- We say that an implementation produces only valid parts iff all parts of every message in the
-- output of a 'StepPeerState' are either: (i) a valid new part (i.e., the part is valid and has
-- not been included in a previously sent message with the same signature), or (ii) the part been
-- included in a previously sent message with the same signature.
StepPeerState-AllValidParts : Set₁
StepPeerState-AllValidParts = ∀{e s m part pk outs α}{𝓔s : AvailableEpochs e}{st : SystemState e}
→ (r : ReachableSystemState st)
→ Meta-Honest-PK pk
→ StepPeerState α 𝓔s (msgPool st) (Map-lookup α (peerStates st)) s outs
→ m ∈ outs → part ⊂Msg m → (ver : WithVerSig pk part)
-- NOTE: this doesn't DIRECTLY imply that nobody else has sent a
-- message with the same signature just that the author of the part
-- hasn't.
→ (ValidPartForPK 𝓔s part pk × ¬ (MsgWithSig∈ pk (ver-signature ver) (msgPool st)))
⊎ MsgWithSig∈ pk (ver-signature ver) (msgPool st)
-- A /part/ was introduced by a specific step when:
IsValidNewPart : ∀{e e'}{pre : SystemState e}{post : SystemState e'} → Signature → PK → Step pre post → Set₁
IsValidNewPart _ _ (step-epoch _) = Lift (ℓ+1 0ℓ) ⊥
-- said step is a /step-peer/ and
IsValidNewPart {pre = pre} sig pk (step-peer pstep)
-- the part has never been seen before
= ¬ (MsgWithSig∈ pk sig (msgPool pre))
× Σ (MsgWithSig∈ pk sig (msgPool (StepPeer-post pstep)))
(λ m → ValidPartForPK (availEpochs pre) (msgPart m) pk)
-- When we can prove that the implementation provided by 'parms' at the
-- top of this module satisfies 'StepPeerState-AllValidParts', we can
-- prove a number of useful structural properties:
-- TODO-2: Refactor into a file (LibraBFT.Yasm.Properties.Structural) later on
-- if this grows too large.
module Structural (sps-avp : StepPeerState-AllValidParts) where
-- We can unwind the state and highlight the step where a part was
-- originally sent. This 'unwind' function combined with Any-Step-elim
-- enables a powerful form of reasoning. The 'honestVoteEpoch' below
-- exemplifies this well.
unwind : ∀{e}{st : SystemState e}(tr : ReachableSystemState st)
→ ∀{p m σ pk} → Meta-Honest-PK pk
→ p ⊂Msg m → (σ , m) ∈ msgPool st → (ver : WithVerSig pk p)
→ Any-Step ((IsValidNewPart (ver-signature ver) pk)) tr
unwind (step-s tr (step-epoch _)) hpk p⊂m m∈sm sig
= step-there (unwind tr hpk p⊂m m∈sm sig)
unwind (step-s tr (step-peer {pid = β} {outs = outs} {pre = pre} sp)) hpk p⊂m m∈sm sig
with Any-++⁻ (List-map (β ,_) outs) {msgPool pre} m∈sm
...| inj₂ furtherBack = step-there (unwind tr hpk p⊂m furtherBack sig)
...| inj₁ thisStep
with sp
...| step-cheat fm isCheat
with thisStep
...| here refl
with isCheat p⊂m sig
...| inj₁ abs = ⊥-elim (hpk abs)
...| inj₂ sentb4
with unwind tr {p = msgPart sentb4} hpk (msg⊆ sentb4) (msg∈pool sentb4) (msgSigned sentb4)
...| res rewrite msgSameSig sentb4 = step-there res
unwind (step-s tr (step-peer {pid = β} {outs = outs} {pre = pre} sp)) hpk p⊂m m∈sm sig
| inj₁ thisStep
| step-honest x
with Any-satisfied-∈ (Any-map⁻ thisStep)
...| (m , refl , m∈outs)
with sps-avp tr hpk x m∈outs p⊂m sig
...| inj₂ sentb4 with unwind tr {p = msgPart sentb4} hpk (msg⊆ sentb4) (msg∈pool sentb4) (msgSigned sentb4)
...| res rewrite msgSameSig sentb4 = step-there res
unwind (step-s tr (step-peer {pid = β} {outs = outs} {pre = pre} sp)) {p} hpk p⊂m m∈sm sig
| inj₁ thisStep
| step-honest x
| (m , refl , m∈outs)
| inj₁ (valid-part , notBefore) =
step-here tr (notBefore , MsgWithSig∈-++ˡ (mkMsgWithSig∈ _ _ p⊂m β thisStep sig refl)
, valid-part)
-- Unwind is inconvenient to use by itself because we have to do
-- induction on Any-Step-elim. The 'honestPartValid' property below
-- provides a fairly general result conveniently: for every part
-- verifiable with an honest PK, there is a msg with the same
-- signature that is valid for some pid.
honestPartValid : ∀ {e st} → ReachableSystemState {e} st → ∀ {pk nm v sender}
→ Meta-Honest-PK pk
→ v ⊂Msg nm → (sender , nm) ∈ msgPool st → (ver : WithVerSig pk v)
→ Σ (MsgWithSig∈ pk (ver-signature ver) (msgPool st))
(λ msg → (ValidPartForPK (availEpochs st) (msgPart msg) pk))
honestPartValid {e} {st} r {pk = pk} hpk v⊂m m∈pool ver
-- We extract two pieces of important information from the place where the part 'v'
-- was first sent: (a) there is a message with the same signature /in the current pool/
-- and (b) its epoch is less than e.
= Any-Step-elim (λ { {st = step-epoch _} ()
; {st = step-peer ps} (_ , new , valid) tr
→ MsgWithSig∈-Step* tr new
, ValidPartForPK-stable tr
(subst (λ P → ValidPartForPK _ P pk)
(MsgWithSig∈-Step*-part tr new) valid)
})
(unwind r hpk v⊂m m∈pool ver)
-- Unforgeability is also an important property stating that every part that is
-- verified with an honest public key has either been sent by α or is a replay
-- of another message sent before.
ext-unforgeability'
: ∀{e α m part pk}{st : SystemState e} → ReachableSystemState st
-- If a message m has been sent by α, containing part
→ (α , m) ∈ msgPool st → part ⊂Msg m
-- And the part can be verified with an honest public key,
→ (sig : WithVerSig pk part) → Meta-Honest-PK pk
-- then either the part is a valid part by α (meaning that α can
-- sign the part itself) or a message with the same signature has
-- been sent previously.
→ ValidPartForPK (availEpochs st) part pk
⊎ MsgWithSig∈ pk (ver-signature sig) (msgPool st)
ext-unforgeability' (step-s st (step-epoch 𝓔)) m∈sm p⊆m sig hpk
= ⊎-map (ValidPartForPK-stable-epoch 𝓔) id (ext-unforgeability' st m∈sm p⊆m sig hpk)
ext-unforgeability' {part = part} (step-s st (step-peer {pid = β} {outs = outs} {pre = pre} sp)) m∈sm p⊆m sig hpk
with Any-++⁻ (List-map (β ,_) outs) {msgPool pre} m∈sm
...| inj₂ furtherBack = MsgWithSig∈-++ʳ <⊎$> (ext-unforgeability' st furtherBack p⊆m sig hpk)
...| inj₁ thisStep
with sp
...| step-cheat fm isCheat
with thisStep
...| here refl
with isCheat p⊆m sig
...| inj₁ abs = ⊥-elim (hpk abs)
...| inj₂ sentb4 = inj₂ (MsgWithSig∈-++ʳ sentb4)
ext-unforgeability' {m = m} {part = part} (step-s st (step-peer {pid = β} {outs = outs} {pre = pre} sp)) m∈sm p⊆m sig hpk
| inj₁ thisStep
| step-honest x
with Any-satisfied-∈ (Any-map⁻ thisStep)
...| (m , refl , m∈outs) = ⊎-map proj₁ MsgWithSig∈-++ʳ (sps-avp st hpk x m∈outs p⊆m sig)
-- The ext-unforgeability' property can be collapsed in a single clause.
-- TODO-2: so far, ext-unforgeability is used only to get a MsgWithSig∈ that is passed to
-- msgWithSigSentByAuthor, which duplicates some of the reasoning in the proof of
-- ext-unforgeability'; should these properties possibly be combined into one simpler proof?
ext-unforgeability
: ∀{e α₀ m part pk}{st : SystemState e} → ReachableSystemState st
→ (α₀ , m) ∈ msgPool st → part ⊂Msg m
→ (sig : WithVerSig pk part) → Meta-Honest-PK pk
→ MsgWithSig∈ pk (ver-signature sig) (msgPool st)
ext-unforgeability {_} {α₀} {m} {st = st} rst m∈sm p⊂m sig hpk
with ext-unforgeability' rst m∈sm p⊂m sig hpk
...| inj₁ p
= mkMsgWithSig∈ _ _ p⊂m α₀ m∈sm sig refl
...| inj₂ sentb4 = sentb4
¬cheatForgeNew : ∀ {e pid pk vsig mst outs m}{st : SystemState e}
→ (sp : StepPeer st pid mst outs)
→ outs ≡ m ∷ []
→ (ic : isCheat sp)
→ Meta-Honest-PK pk
→ MsgWithSig∈ pk vsig ((pid , m) ∷ msgPool st)
→ MsgWithSig∈ pk vsig (msgPool st)
¬cheatForgeNew sc@(step-cheat fm isCheat) refl _ hpk mws
with msg∈pool mws
...| there m∈pool = mkMsgWithSig∈ (msgWhole mws) (msgPart mws) (msg⊆ mws) (msgSender mws) m∈pool (msgSigned mws) (msgSameSig mws)
...| here m∈pool
with isCheat (subst (msgPart mws ⊂Msg_) (cong proj₂ m∈pool) (msg⊆ mws)) (msgSigned mws)
...| inj₁ dis = ⊥-elim (hpk dis)
...| inj₂ mws' rewrite msgSameSig mws = mws'
msgWithSigSentByAuthor : ∀ {e pk sig}{st : SystemState e}
→ ReachableSystemState st
→ Meta-Honest-PK pk
→ MsgWithSig∈ pk sig (msgPool st)
→ Σ (MsgWithSig∈ pk sig (msgPool st))
λ mws → ValidPartForPK (availEpochs st) (msgPart mws) pk
msgWithSigSentByAuthor step-0 _ ()
msgWithSigSentByAuthor (step-s {pre = pre} preach (step-epoch 𝓔)) hpk mws
rewrite step-epoch-does-not-send pre 𝓔
with msgWithSigSentByAuthor preach hpk mws
...| mws' , vpb = mws' , ValidPartForPK-stable {st = pre} (step-s step-0 (step-epoch 𝓔)) vpb
msgWithSigSentByAuthor {pk = pk} (step-s {pre = pre} preach (step-peer theStep@(step-cheat fm cheatCons))) hpk mws
with (¬cheatForgeNew theStep refl unit hpk mws)
...| mws'
with msgWithSigSentByAuthor preach hpk mws'
...| mws'' , vpb'' = MsgWithSig∈-++ʳ mws'' , vpb''
msgWithSigSentByAuthor {e} (step-s {pre = pre} preach (step-peer {pid = pid} {outs = outs} (step-honest sps))) hpk mws
with Any-++⁻ (List-map (pid ,_) outs) {msgPool pre} (msg∈pool mws)
...| inj₂ furtherBack
with msgWithSigSentByAuthor preach hpk (MsgWithSig∈-transp mws furtherBack)
...| mws' , vpb' = MsgWithSig∈-++ʳ mws' , vpb'
msgWithSigSentByAuthor {e} (step-s {pre = pre} preach (step-peer {pid = pid} {outs = outs} (step-honest sps))) hpk mws
| inj₁ thisStep
with Any-satisfied-∈ (Any-map⁻ thisStep)
...| (m' , refl , m∈outs)
with sps-avp preach hpk sps m∈outs (msg⊆ mws) (msgSigned mws)
...| inj₁ (vpbα₀ , _) = mws , vpbα₀
...| inj₂ mws'
with msgWithSigSentByAuthor preach hpk mws'
...| mws'' , vpb'' rewrite sym (msgSameSig mws) = MsgWithSig∈-++ʳ mws'' , vpb''
|
Structure/Relator.agda | Lolirofle/stuff-in-agda | 6 | 3669 | <reponame>Lolirofle/stuff-in-agda
module Structure.Relator where
import Lvl
open import Functional using (_∘₂_)
open import Functional.Dependent
open import Lang.Instance
open import Logic
open import Logic.Propositional
open import Structure.Setoid
open import Structure.Relator.Names
open import Structure.Relator.Properties
open import Syntax.Function
open import Type
-- TODO: It seems possible to define UnaryRelator as a special case of Function, so let's do that
private variable ℓₒ ℓₒ₁ ℓₒ₂ ℓₒ₃ ℓₗ ℓₗ₁ ℓₗ₂ ℓₗ₃ ℓₗ₄ : Lvl.Level
module Names where
module _ {A : Type{ℓₒ}} ⦃ _ : Equiv{ℓₗ₁}(A) ⦄ (P : A → Stmt{ℓₗ₂}) where
Substitution₁ = ∀{x y : A} → (x ≡ y) → P(x) → P(y)
module _ {A : Type{ℓₒ₁}} ⦃ _ : Equiv{ℓₗ₁}(A) ⦄ {B : Type{ℓₒ₂}} ⦃ _ : Equiv{ℓₗ₂}(B) ⦄ (_▫_ : A → B → Stmt{ℓₗ₃}) where
Substitution₂ = ∀{x₁ y₁ : A}{x₂ y₂ : B} → (x₁ ≡ y₁) → (x₂ ≡ y₂) → (x₁ ▫ x₂) → (y₁ ▫ y₂)
module _ {A : Type{ℓₒ₁}} ⦃ _ : Equiv{ℓₗ₁}(A) ⦄ {B : Type{ℓₒ₂}} ⦃ _ : Equiv{ℓₗ₂}(B) ⦄ {C : Type{ℓₒ₃}} ⦃ _ : Equiv{ℓₗ₃}(C) ⦄ (_▫_▫_ : A → B → C → Stmt{ℓₗ₄}) where
Substitution₃ = ∀{x₁ y₁ : A}{x₂ y₂ : B}{x₃ y₃ : C} → (x₁ ≡ y₁) → (x₂ ≡ y₂) → (x₃ ≡ y₃) → (x₁ ▫ x₂ ▫ x₃) → (y₁ ▫ y₂ ▫ y₃)
-- The unary relator `P` "(behaves like)/is a relator" in the context of `_≡_` from the Equiv instance.
module _ {A : Type{ℓₒ}} ⦃ _ : Equiv{ℓₗ₁}(A) ⦄ (P : A → Stmt{ℓₗ₂}) where
record UnaryRelator : Stmt{ℓₒ Lvl.⊔ ℓₗ₁ Lvl.⊔ ℓₗ₂} where
constructor intro
field
substitution : Names.Substitution₁(P)
substitution-sym : ∀{x y : A} → (x ≡ y) → P(x) ← P(y)
substitution-sym = substitution ∘ Structure.Relator.Properties.symmetry(_≡_)
substitution-equivalence : ∀{x y : A} → (x ≡ y) → (P(x) ↔ P(y))
substitution-equivalence xy = [↔]-intro (substitution-sym xy) (substitution xy)
substitute₁ₗ = inst-fn UnaryRelator.substitution-sym
substitute₁ᵣ = inst-fn UnaryRelator.substitution
substitute₁ₗᵣ = inst-fn UnaryRelator.substitution-equivalence
substitute₁ = substitute₁ᵣ
unaryRelator = resolve UnaryRelator
-- The binary relator `_▫_` "(behaves like)/is a relator" in the context of `_≡_` from the Equiv instance.
module _ {A : Type{ℓₒ₁}} ⦃ _ : Equiv{ℓₗ₁}(A) ⦄ {B : Type{ℓₒ₂}} ⦃ _ : Equiv{ℓₗ₂}(B) ⦄ (_▫_ : A → B → Stmt{ℓₗ₃}) where
open Structure.Relator.Properties
record BinaryRelator : Stmt{ℓₒ₁ Lvl.⊔ ℓₒ₂ Lvl.⊔ ℓₗ₁ Lvl.⊔ ℓₗ₂ Lvl.⊔ ℓₗ₃} where
constructor intro
field
substitution : Names.Substitution₂(_▫_)
left : ∀{x} → UnaryRelator(_▫ x)
left = intro(\p → substitution p (reflexivity(_≡_)))
right : ∀{x} → UnaryRelator(x ▫_)
right = intro(\p → substitution (reflexivity(_≡_)) p)
substitutionₗ = \{a x y} → UnaryRelator.substitution(left {a}) {x}{y}
substitutionᵣ = \{a x y} → UnaryRelator.substitution(right{a}) {x}{y}
substitution-sym : ∀{x₁ y₁ : A}{x₂ y₂ : B} → (x₁ ≡ y₁) → (x₂ ≡ y₂) → ((x₁ ▫ x₂) ← (y₁ ▫ y₂))
substitution-sym xy1 xy2 = substitution (Structure.Relator.Properties.symmetry(_≡_) xy1) (Structure.Relator.Properties.symmetry(_≡_) xy2)
substitution-equivalence : ∀{x₁ y₁ : A}{x₂ y₂ : B} → (x₁ ≡ y₁) → (x₂ ≡ y₂) → ((x₁ ▫ x₂) ↔ (y₁ ▫ y₂))
substitution-equivalence xy1 xy2 = [↔]-intro (substitution-sym xy1 xy2) (substitution xy1 xy2)
substitute₂ = inst-fn BinaryRelator.substitution
substitute₂ₗ = inst-fn BinaryRelator.substitutionₗ
substitute₂ᵣ = inst-fn BinaryRelator.substitutionᵣ
substitute₂ₗᵣ = inst-fn BinaryRelator.substitution-equivalence
binaryRelator = resolve BinaryRelator
module _ {A : Type{ℓₒ₁}} ⦃ _ : Equiv{ℓₗ₁}(A) ⦄ {B : Type{ℓₒ₂}} ⦃ _ : Equiv{ℓₗ₂}(B) ⦄ {C : Type{ℓₒ₃}} ⦃ _ : Equiv{ℓₗ₃}(C) ⦄ (_▫_▫_ : A → B → C → Stmt{ℓₗ₄}) where
open Structure.Relator.Properties
record TrinaryRelator : Stmt{ℓₒ₁ Lvl.⊔ ℓₒ₂ Lvl.⊔ ℓₒ₃ Lvl.⊔ ℓₗ₁ Lvl.⊔ ℓₗ₂ Lvl.⊔ ℓₗ₃ Lvl.⊔ ℓₗ₄} where
constructor intro
field
substitution : Names.Substitution₃(_▫_▫_)
unary₁ : ∀{y z} → UnaryRelator(_▫ y ▫ z)
unary₁ = intro(\p → substitution p (reflexivity(_≡_)) (reflexivity(_≡_)))
unary₂ : ∀{x z} → UnaryRelator(x ▫_▫ z)
unary₂ = intro(\p → substitution (reflexivity(_≡_)) p (reflexivity(_≡_)))
unary₃ : ∀{x y} → UnaryRelator(x ▫ y ▫_)
unary₃ = intro(\p → substitution (reflexivity(_≡_)) (reflexivity(_≡_)) p)
binary₁₂ : ∀{z} → BinaryRelator(_▫_▫ z)
binary₁₂ = intro(\p q → substitution p q (reflexivity(_≡_)))
binary₁₃ : ∀{y} → BinaryRelator(_▫ y ▫_)
binary₁₃ = intro(\p q → substitution p (reflexivity(_≡_)) q)
binary₂₃ : ∀{x} → BinaryRelator(x ▫_▫_)
binary₂₃ = intro(\p q → substitution (reflexivity(_≡_)) p q)
substitution-unary₁ = \{a b x y} → UnaryRelator.substitution(unary₁ {a}{b}) {x}{y}
substitution-unary₂ = \{a b x y} → UnaryRelator.substitution(unary₂ {a}{b}) {x}{y}
substitution-unary₃ = \{a b x y} → UnaryRelator.substitution(unary₃ {a}{b}) {x}{y}
substitution-binary₁₂ = \{a x₁ x₂ y₁ y₂} → BinaryRelator.substitution(binary₁₂ {a}) {x₁}{x₂}{y₁}{y₂}
substitution-binary₁₃ = \{a x₁ x₂ y₁ y₂} → BinaryRelator.substitution(binary₁₃ {a}) {x₁}{x₂}{y₁}{y₂}
substitution-binary₂₃ = \{a x₁ x₂ y₁ y₂} → BinaryRelator.substitution(binary₂₃ {a}) {x₁}{x₂}{y₁}{y₂}
substitute₃ = inst-fn TrinaryRelator.substitution
substitute₃-unary₁ = inst-fn TrinaryRelator.substitution-unary₁
substitute₃-unary₂ = inst-fn TrinaryRelator.substitution-unary₂
substitute₃-unary₃ = inst-fn TrinaryRelator.substitution-unary₃
substitute₃-binary₁₂ = inst-fn TrinaryRelator.substitution-binary₁₂
substitute₃-binary₁₃ = inst-fn TrinaryRelator.substitution-binary₁₃
substitute₃-binary₂₃ = inst-fn TrinaryRelator.substitution-binary₂₃
trinaryRelator = resolve TrinaryRelator
|
tpantlr2-code/code/reference/Main.g4 | cgonul/antlr-poc | 10 | 6330 | grammar Main;
import A;
tokens { Z }
@members {foo}
s : a ;
b : C ;
|
alloy4fun_models/trashltl/models/11/LLbwfddmxEFcmZLYv.als | Kaixi26/org.alloytools.alloy | 0 | 1741 | open main
pred idLLbwfddmxEFcmZLYv_prop12 {
eventually all f:File | f in Trash
}
pred __repair { idLLbwfddmxEFcmZLYv_prop12 }
check __repair { idLLbwfddmxEFcmZLYv_prop12 <=> prop12o } |
src/gl/interface/gl-objects-renderbuffers.ads | Roldak/OpenGLAda | 79 | 5938 | <gh_stars>10-100
-- part of OpenGLAda, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "COPYING"
with GL.Pixels;
with GL.Low_Level.Enums;
package GL.Objects.Renderbuffers is
pragma Preelaborate;
type Renderbuffer_Target (<>) is tagged limited private;
procedure Allocate (Object : Renderbuffer_Target;
Format : Pixels.Internal_Format;
Width, Height : Size;
Samples : Size := 0);
function Width (Object : Renderbuffer_Target) return Size;
function Height (Object : Renderbuffer_Target) return Size;
function Internal_Format (Object : Renderbuffer_Target)
return Pixels.Internal_Format;
function Red_Size (Object : Renderbuffer_Target) return Size;
function Green_Size (Object : Renderbuffer_Target) return Size;
function Blue_Size (Object : Renderbuffer_Target) return Size;
function Alpha_Size (Object : Renderbuffer_Target) return Size;
function Depth_Size (Object : Renderbuffer_Target) return Size;
function Stencil_Size (Object : Renderbuffer_Target) return Size;
function Raw_Kind (Object : Renderbuffer_Target)
return Low_Level.Enums.Renderbuffer_Kind;
Active_Renderbuffer : constant Renderbuffer_Target;
type Renderbuffer is new GL_Object with private;
procedure Bind (Target : Renderbuffer_Target; Object : Renderbuffer'Class);
function Current (Target : Renderbuffer_Target) return Renderbuffer'Class;
No_Renderbuffer : constant Renderbuffer;
private
type Renderbuffer is new GL_Object with null record;
overriding
procedure Internal_Create_Id (Object : Renderbuffer; Id : out UInt);
overriding
procedure Internal_Release_Id (Object : Renderbuffer; Id : UInt);
type Renderbuffer_Target (Kind : Low_Level.Enums.Renderbuffer_Kind) is
tagged limited null record;
Active_Renderbuffer : constant Renderbuffer_Target
:= Renderbuffer_Target'(Kind => Low_Level.Enums.Renderbuffer);
No_Renderbuffer : constant Renderbuffer :=
Renderbuffer'(Ada.Finalization.Controlled with Reference =>
Reference_To_Null_Object'Access);
end GL.Objects.Renderbuffers;
|
programs/oeis/173/A173308.asm | karttu/loda | 1 | 17458 | <filename>programs/oeis/173/A173308.asm
; A173308: 17*n*(n+1).
; 0,34,102,204,340,510,714,952,1224,1530,1870,2244,2652,3094,3570,4080,4624,5202,5814,6460,7140,7854,8602,9384,10200,11050,11934,12852,13804,14790,15810,16864,17952,19074,20230,21420,22644,23902,25194,26520,27880,29274,30702,32164,33660,35190,36754,38352,39984,41650,43350,45084,46852,48654,50490,52360,54264,56202,58174,60180,62220,64294,66402,68544,70720,72930,75174,77452,79764,82110,84490,86904,89352,91834,94350,96900,99484,102102,104754,107440,110160,112914,115702,118524,121380,124270,127194,130152,133144,136170,139230,142324,145452,148614,151810,155040,158304,161602,164934,168300,171700,175134,178602,182104,185640,189210,192814,196452,200124,203830,207570,211344,215152,218994,222870,226780,230724,234702,238714,242760,246840,250954,255102,259284,263500,267750,272034,276352,280704,285090,289510,293964,298452,302974,307530,312120,316744,321402,326094,330820,335580,340374,345202,350064,354960,359890,364854,369852,374884,379950,385050,390184,395352,400554,405790,411060,416364,421702,427074,432480,437920,443394,448902,454444,460020,465630,471274,476952,482664,488410,494190,500004,505852,511734,517650,523600,529584,535602,541654,547740,553860,560014,566202,572424,578680,584970,591294,597652,604044,610470,616930,623424,629952,636514,643110,649740,656404,663102,669834,676600,683400,690234,697102,704004,710940,717910,724914,731952,739024,746130,753270,760444,767652,774894,782170,789480,796824,804202,811614,819060,826540,834054,841602,849184,856800,864450,872134,879852,887604,895390,903210,911064,918952,926874,934830,942820,950844,958902,966994,975120,983280,991474,999702,1007964,1016260,1024590,1032954,1041352,1049784,1058250
sub $1,$0
bin $1,2
mul $1,34
|
src/org/LibTest/Console1861.asm | fourstix/1802PixieVideoTTY | 1 | 2668 | <gh_stars>1-10
IF UseConsole == "TRUE"
; =========================================================================================
; =========================================================================================
ToDecimal: GLO RF
STR R2
LDI lo(TD_lookup)
PLO RD
LDI hi(TD_lookup)
PHI RD
DEC RE
TD_loop1: INC RE
LDI 00H
STR RE
LDN RD
TD_loop2: SD
BNF TD_overflow
STR R2
LDN RE
ADI 01H
STR RE
BR TD_loop2
TD_overflow: LDA RD
SHR
BNF TD_loop1
DEC RD
DEC RD
SEP R5
TD_lookup: db 0064H, 000AH, 0001H
;------------------------------------------------------------------------------------------
ENDIF |
programs/oeis/319/A319117.asm | neoneye/loda | 22 | 179631 | <filename>programs/oeis/319/A319117.asm
; A319117: Sign of the n-th Maclaurin coefficient of 1/(exp(x) + exp(1)/2).
; 1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1
mov $1,$0
mul $0,432
mov $2,$1
mul $1,2
mov $3,$2
sub $3,$1
sub $3,$0
div $3,32
mov $1,$3
mod $1,2
mov $0,$1
mul $0,2
add $0,1
|
src/main/antlr4/Jua.g4 | PizzaCrust/Jua | 1 | 1916 | <gh_stars>1-10
grammar Jua;
Q_NAME: [a-zA-Z][a-zA-Z0-9]*;
STRING: '"' ~('"')* '"';
INTEGER: [0-9];
DOUBLE: INTEGER '.' (INTEGER)*;
primitive
:
| STRING
| DOUBLE
| INTEGER
| Q_NAME
;
expression
:
| primitive
| invocation
| staticInvocation
| staticVarReference
;
args
:
| expression (',' expression)*
;
invocation : Q_NAME '(' args ')'
;
staticInvocation : Q_NAME '.' Q_NAME '(' args ')'
;
varDeclare :
| 'var' Q_NAME
| 'var' Q_NAME '=' expression
;
potentialAssignationNames:
| Q_NAME
| staticVarReference
;
varAssign
: potentialAssignationNames '=' expression
;
staticVarReference
: Q_NAME '.' Q_NAME
;
bodyExpression
:
| staticInvocation
| invocation
| varDeclare
| varAssign
;
body
:
| bodyExpression (';' bodyExpression)*
;
functionArgs
:
| Q_NAME (',' Q_NAME)*
;
function
: 'func' Q_NAME '(' functionArgs ')' '{' body '}'
;
classBodyExpr
:
| varDeclare
| constructor
| function
;
superInvocation
: 'super(' args ')'
;
constructorBody
: superInvocation body
;
constructor
: 'constructor(' functionArgs ')' '{' constructorBody '}'
;
classBody
:
| classBodyExpr (';' classBodyExpr)*
;
class_declare
:
| 'class' Q_NAME '{' classBody '}'
| 'class' Q_NAME ':' Q_NAME (',' Q_NAME)* '{' classBody '}'
;
WS: [ \t\u000C\r\n]+ -> skip; |
oeis/052/A052008.asm | neoneye/loda-programs | 11 | 21351 | <reponame>neoneye/loda-programs<filename>oeis/052/A052008.asm
; A052008: a(n) = 'n with digits sorted in ascending order' + 'n with digits sorted in descending order'.
; Submitted by <NAME>
; 0,2,4,6,8,10,12,14,16,18,11,22,33,44,55,66,77,88,99,110,22,33,44,55,66,77,88,99,110,121,33,44,55,66,77,88,99,110,121,132,44,55,66,77,88,99,110,121,132,143,55,66,77,88,99,110,121,132,143,154,66,77,88,99,110,121,132,143,154,165,77,88,99,110,121,132,143,154,165,176,88,99,110,121,132,143,154,165,176,187,99,110,121,132,143,154,165,176,187,198
mov $1,$0
seq $0,4185 ; Arrange digits of n in increasing order, then (for n>0) omit the zeros.
seq $1,4186 ; Arrange digits of n in decreasing order.
add $0,$1
|
bddisasm_test/simd/mmx_64.asm | andreaswimmer/bddisasm | 675 | 29774 | <reponame>andreaswimmer/bddisasm
bits 64
cvttps2pi mm0,xmm7
cvttpd2pi mm0,xmm7
cvtps2pi mm0,xmm7
cvtpd2pi mm0,xmm7
punpcklbw mm0,mm7
punpcklwd mm0,mm7
punpckldq mm0,mm7
packsswb mm0,mm7
pcmpgtb mm0,mm7
pcmpgtw mm0,mm7
pcmpgtd mm0,mm7
packuswb mm0,mm7
punpckhbw mm0,mm7
punpckhwd mm0,mm7
punpckhdq mm0,mm7
packssdw mm0,mm7
movd mm0,edx
movq mm0,rdx
movq mm0,mm7
pshufw mm0,mm7,10
pcmpeqb mm0,mm7
pcmpeqw mm0,mm7
pcmpeqd mm0,mm7
movq rdx,mm0
movq mm7,mm0
pinsrw mm0,esi,10
pinsrw mm0,[rbx],10
psrlw mm0,mm7
psrld mm0,mm7
psrlq mm0,mm7
paddq mm0,mm7
pmullw mm0,mm7
movdq2q mm0,xmm7
psubusb mm0,mm7
psubusw mm0,mm7
pminub mm0,mm7
pand mm0,mm7
paddusb mm0,mm7
paddusw mm0,mm7
pmaxub mm0,mm7
pandn mm0,mm7
pavgb mm0,mm7
psraw mm0,mm7
psrad mm0,mm7
pavgw mm0,mm7
pmulhuw mm0,mm7
pmulhw mm0,mm7
movntq [rbx],mm0
psubsb mm0,mm7
psubsw mm0,mm7
pminsw mm0,mm7
por mm0,mm7
paddsb mm0,mm7
paddsw mm0,mm7
pmaxsw mm0,mm7
pxor mm0,mm7
psllw mm0,mm7
pslld mm0,mm7
psllq mm0,mm7
pmuludq mm0,mm7
pmaddwd mm0,mm7
psadbw mm0,mm7
maskmovq mm0,mm7
psubb mm0,mm7
psubw mm0,mm7
psubd mm0,mm7
psubq mm0,mm7
paddb mm0,mm7
paddw mm0,mm7
paddd mm0,mm7
cvttps2pi mm0,xmm15
cvttpd2pi mm0,xmm15
cvtps2pi mm0,xmm15
cvtpd2pi mm0,xmm15
punpcklbw mm0,[rbx]
punpcklwd mm0,[rbx]
punpckldq mm0,[rbx]
packsswb mm0,[rbx]
pcmpgtb mm0,[rbx]
pcmpgtw mm0,[rbx]
pcmpgtd mm0,[rbx]
packuswb mm0,[rbx]
punpckhbw mm0,[rbx]
punpckhwd mm0,[rbx]
punpckhdq mm0,[rbx]
packssdw mm0,[rbx]
movd mm0,[rbx]
movq mm0,[rbx]
movq mm0,[rbx]
pshufw mm0,[rbx],10
pcmpeqb mm0,[rbx]
pcmpeqw mm0,[rbx]
pcmpeqd mm0,[rbx]
movq [rbx],mm0
movq [rbx],mm0
pinsrw mm0,r15d,10
pinsrw mm0,[rbx],10
psrlw mm0,[rbx]
psrld mm0,[rbx]
psrlq mm0,[rbx]
paddq mm0,[rbx]
pmullw mm0,[rbx]
movdq2q mm0,xmm15
psubusb mm0,[rbx]
psubusw mm0,[rbx]
pminub mm0,[rbx]
pand mm0,[rbx]
paddusb mm0,[rbx]
paddusw mm0,[rbx]
pmaxub mm0,[rbx]
pandn mm0,[rbx]
pavgb mm0,[rbx]
psraw mm0,[rbx]
psrad mm0,[rbx]
pavgw mm0,[rbx]
pmulhuw mm0,[rbx]
pmulhw mm0,[rbx]
movntq [rbx],mm0
psubsb mm0,[rbx]
psubsw mm0,[rbx]
pminsw mm0,[rbx]
por mm0,[rbx]
paddsb mm0,[rbx]
paddsw mm0,[rbx]
pmaxsw mm0,[rbx]
pxor mm0,[rbx]
psllw mm0,[rbx]
pslld mm0,[rbx]
psllq mm0,[rbx]
pmuludq mm0,[rbx]
pmaddwd mm0,[rbx]
psadbw mm0,[rbx]
maskmovq mm0,mm7
psubb mm0,[rbx]
psubw mm0,[rbx]
psubd mm0,[rbx]
psubq mm0,[rbx]
paddb mm0,[rbx]
paddw mm0,[rbx]
paddd mm0,[rbx]
pshufb mm3,mm4
phaddw mm3,mm4
phaddd mm3,mm4
phaddsw mm3,mm4
pmaddubsw mm3,mm4
phsubw mm3,mm4
phsubd mm3,mm4
phsubsw mm3,mm4
psignb mm3,mm4
psignw mm3,mm4
psignd mm3,mm4
pmulhrsw mm3,mm4
pabsb mm3,mm4
pabsw mm3,mm4
pabsd mm3,mm4
pshufb mm7,[rbx]
phaddw mm7,[rbx]
phaddd mm7,[rbx]
phaddsw mm7,[rbx]
pmaddubsw mm7,[rbx]
phsubw mm7,[rbx]
phsubd mm7,[rbx]
phsubsw mm7,[rbx]
psignb mm7,[rbx]
psignw mm7,[rbx]
psignd mm7,[rbx]
pmulhrsw mm7,[rbx]
pabsb mm7,[rbx]
pabsw mm7,[rbx]
pabsd mm7,[rbx]
palignr mm1,mm2,10
palignr mm1,[rbx],10 |
alloy4fun_models/trashltl/models/13/DTmWmRcXKqFcg67wE.als | Kaixi26/org.alloytools.alloy | 0 | 3077 | <filename>alloy4fun_models/trashltl/models/13/DTmWmRcXKqFcg67wE.als
open main
pred idDTmWmRcXKqFcg67wE_prop14 {
all f : File | f in Trash' implies after f not in Protected
}
pred __repair { idDTmWmRcXKqFcg67wE_prop14 }
check __repair { idDTmWmRcXKqFcg67wE_prop14 <=> prop14o } |
Cubical/Structures/Functorial.agda | RobertHarper/cubical | 0 | 6938 | <filename>Cubical/Structures/Functorial.agda
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Functorial where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Path
open import Cubical.Foundations.SIP
private
variable
ℓ ℓ₁ : Level
-- Standard notion of structure from a "functorial" action
-- We don't need all the functor axioms, only F id ≡ id
FunctorialEquivStr : {S : Type ℓ → Type ℓ₁}
→ (∀ {X Y} → (X → Y) → S X → S Y)
→ StrEquiv S ℓ₁
FunctorialEquivStr F (X , s) (Y , t) e = F (e .fst) s ≡ t
functorialUnivalentStr : {S : Type ℓ → Type ℓ₁}
(F : ∀ {X Y} → (X → Y) → S X → S Y)
→ (∀ {X} s → F (idfun X) s ≡ s)
→ UnivalentStr S (FunctorialEquivStr F)
functorialUnivalentStr F η =
SNS→UnivalentStr
(FunctorialEquivStr F)
(λ s t → pathToEquiv (cong (_≡ t) (η s)))
|
nasm assembly/library/substr find and replace.asm | AI-Factor-y/NASM-library | 0 | 6868 | <gh_stars>0
replace_sub_str:
;; usage
;-----------
; replaces every substring of the string which is equal to rsst_find
; string in ebx , string to find in rsst_find
; string to replace in rsst_replace
; new string in rsst_string
section .bss
rsst_string: resb 100
rsst_find: resb 100
rsst_replace: resb 100
rsst_i: resd 1
rsst_j: resd 1
rsst_k: resd 1
rsst_flag: resd 1
rsst_x: resd 1
section .text
push rax
push rbx
push rcx
push rdx
mov dword[rsst_i],0
mov dword[rsst_j],0
mov dword[rsst_k],0
mov dword[rsst_x],0
mov dword[rsst_flag],0
rsst_loop1:
mov eax, [rsst_i]
mov cl,byte[ebx+eax]
cmp cl,0
je exit_rsst_loop1
;; check for first occurence
mov dword[rsst_j],0
mov eax, [rsst_i]
mov dword[rsst_k],eax
rsst_loop2:
mov eax, [rsst_i]
mov cl,byte[ebx+eax]
push rbx
mov ebx, rsst_find
mov eax,[rsst_j]
mov dl, byte[ebx+eax]
pop rbx
cmp cl,dl
jne rsst_exit_loop2
cmp cl,0
je rsst_exit_loop2
mov eax, [rsst_j]
mov dword[num],eax
inc dword[rsst_i]
inc dword[rsst_j]
jmp rsst_loop2
rsst_exit_loop2:
push rbx
mov ebx, rsst_find
mov eax,[rsst_j]
mov dl, byte[ebx+eax]
pop rbx
cmp dl,0
jne rsst_else_case
;; replace the string
mov dword[rsst_j],0
rsst_loop_3:
mov eax, [rsst_j]
push rbx
mov ebx, rsst_replace
mov cl, byte[ebx+eax]
pop rbx
cmp cl,0
je exit_rsst_loop3
mov eax, [rsst_x]
push rbx
mov ebx, rsst_string
mov byte[ebx+eax],cl
pop rbx
inc dword[rsst_x]
inc dword[rsst_j]
jmp rsst_loop_3
exit_rsst_loop3:
jmp rsst_cont_loop_1
rsst_else_case:
mov eax, [rsst_k]
mov [rsst_i],eax
mov cl, byte[ebx+eax]
push rbx
mov eax, [rsst_x]
mov ebx, rsst_string
mov byte[ebx+eax],cl
pop rbx
inc dword[rsst_i]
inc dword[rsst_x]
rsst_cont_loop_1:
jmp rsst_loop1
exit_rsst_loop1:
pop rdx
pop rcx
pop rbx
pop rax
ret
|
oeis/081/A081901.asm | neoneye/loda-programs | 11 | 95998 | <filename>oeis/081/A081901.asm
; A081901: A sequence related to binomial(n+5, 5).
; Submitted by <NAME>
; 1,8,49,262,1286,5944,26262,111996,464103,1877904,7446735,29021490,111405780,422003520,1579757580,5851519704,21468622077,78087814776,281798184573,1009617794334,3593281988754,12710491403112,44705999907666,156414048864948,544562500963779,1887215083472448,6512124267587259,22380281329827402,76622003529149376,261385146858727728,888656628510445032,3011561963550945936,10174827098620669113,34277304714136084584,115157586765254416137,385870865215186423350,1289757642046546891230,4300711616710014813720
mov $1,1
mov $2,1
mov $3,$0
mov $0,5
mov $4,1
lpb $3
add $0,1
mul $1,$3
mul $1,$0
mul $2,2
sub $3,1
add $5,$4
div $1,$5
add $2,$1
add $4,2
lpe
mov $0,$2
|
tests/nasm/paddd.asm | Tuna0128/Tuna0128.github.io | 12,700 | 14764 | <gh_stars>1000+
global _start
section .data
align 16
quad1:
dq 0x00ad80ad0fffffff
quad2:
dq 0x71ae01ff0f00ffbe
quad3:
dq 0xf100808080f0ff42
quad4:
dq 0xffffffffffffffff
mydword:
dd 0xcafebabe
myaddress:
dq 0x00adbeefc0de00ce
%include "header.inc"
movq mm0, [quad1]
movq mm1, [quad2]
movq mm2, [quad3]
movq mm3, [quad2]
movq mm4, [quad4]
paddd mm0, [quad2]
paddd mm0, [quad1]
paddd mm1, mm2
paddd mm2, [quad1]
paddd mm3, [quad1]
paddd mm4, [quad4]
%include "footer.inc"
|
oeis/097/A097815.asm | neoneye/loda-programs | 11 | 170701 | <gh_stars>10-100
; A097815: E.g.f. exp(4x)/(1-4x).
; Submitted by <NAME>
; 1,8,80,1024,16640,333824,8015872,224460800,7182811136,258581463040,10343259570176,455103425282048,21844964430315520,1135938150443515904,63612536425105326080,3816752185507393306624,244272139872477466591232
mov $2,4
pow $2,$0
lpb $0
mul $1,$0
sub $0,1
add $1,$2
add $2,$1
lpe
mov $0,$2
|
Task/Extreme-floating-point-values/Ada/extreme-floating-point-values-2.ada | LaudateCorpus1/RosettaCodeData | 1 | 4432 | with Ada.Text_IO; use Ada.Text_IO;
procedure IEEE is -- Non portable, bad, never do this!
Zero : Float := 0.0;
PInf : Float := 1.0 / Zero;
NInf : Float := -PInf;
PZero : Float := 1.0 / PInf;
NZero : Float := 1.0 / NInf;
NaN : Float := 0.0 / Zero;
begin
Put_Line (" -oo = " & Float'Image (NInf));
Put_Line (" +oo = " & Float'Image (PInf));
Put_Line (" NaN = " & Float'Image (NaN));
Put_Line (" -0 = " & Float'Image (NZero));
Put_Line (" -oo < first " & Boolean'Image (NInf < Float'First));
Put_Line (" +oo > last " & Boolean'Image (PInf > Float'Last));
Put_Line (" NaN = NaN " & Boolean'Image (NaN = NaN));
Put_Line (" -0 = 0 " & Boolean'Image (NZero = 0.0));
Put_Line (" +0 = 0 " & Boolean'Image (PZero = 0.0));
Put_Line (" +0 < least positive " & Boolean'Image (PZero < Float'Succ (Zero)));
Put_Line (" -0 > biggest negative " & Boolean'Image (NZero > Float'Pred (Zero)));
-- Validness checks
Put_Line ("Valid -oo is " & Boolean'Image (NInf'Valid));
Put_Line ("Valid +oo is " & Boolean'Image (PInf'Valid));
Put_Line ("Valid NaN is " & Boolean'Image (NaN'Valid));
end IEEE;
|
oeis/128/A128138.asm | neoneye/loda-programs | 11 | 86029 | <reponame>neoneye/loda-programs
; A128138: A000012 * A128132.
; Submitted by <NAME>(s4)
; 1,0,2,0,1,3,0,1,2,4,0,1,2,3,5,0,1,2,3,4,6,0,1,2,3,4,5,7,0,1,2,3,4,5,6,8,0,1,2,3,4,5,6,7,9,0,1,2,3,4,5,6,7,8,10,0,1,2,3,4,5,6,7,8,9,11,0,1,2,3,4,5,6,7,8,9,10,12,0,1,2,3
lpb $0
add $1,1
sub $0,$1
lpe
sub $1,$0
add $1,1
cmp $1,1
add $1,$0
mov $0,$1
|
cpm2/RomWBW/Source/HBIOS/simrtc.asm | grancier/z180 | 0 | 86750 | ;
;==================================================================================================
; SIMH RTC DRIVER
;==================================================================================================
;
SIMRTC_IO .EQU $FE ; SIMH IO PORT
SIMRTC_CLKREAD .EQU 7 ; READ CLOCK COMMAND
SIMRTC_CLKWRITE .EQU 8 ; WRITE CLOCK COMMAND
SIMRTC_BUFSIZ .EQU 6 ; SIX BYTE BUFFER (YYMMDDHHMMSS)
;
; RTC DEVICE INITIALIZATION ENTRY
;
SIMRTC_INIT:
CALL NEWLINE ; FORMATTING
PRTS("SIMRTC: $")
;
; DISPLAY CURRENT TIME
LD HL,SIMRTC_BUF
PUSH HL
CALL SIMRTC_GETTIM0
POP HL
CALL PRTDT
;
XOR A ; SIGNAL SUCCESS
RET
;
; RTC DEVICE FUNCTION DISPATCH ENTRY
; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR
; B: FUNCTION (IN)
;
SIMRTC_DISPATCH:
LD A,B ; GET REQUESTED FUNCTION
AND $0F ; ISOLATE SUB-FUNCTION
JP Z,SIMRTC_GETTIM ; GET TIME
DEC A
JP Z,SIMRTC_SETTIM ; SET TIME
DEC A
JP Z,SIMRTC_GETBYT ; GET NVRAM BYTE VALUE
DEC A
JP Z,SIMRTC_SETBYT ; SET NVRAM BYTE VALUE
DEC A
JP Z,SIMRTC_GETBLK ; GET NVRAM DATA BLOCK VALUES
DEC A
JP Z,SIMRTC_SETBLK ; SET NVRAM DATA BLOCK VALUES
CALL PANIC
;
; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR
;
SIMRTC_GETBYT:
SIMRTC_SETBYT:
SIMRTC_GETBLK:
SIMRTC_SETBLK:
CALL PANIC
;
; RTC GET TIME
; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR
; HL: DATE/TIME BUFFER (OUT)
; BUFFER FORMAT IS BCD: YYMMDDHHMMSS
; 24 HOUR TIME FORMAT IS ASSUMED
;
SIMRTC_GETTIM:
; GET THE TIME INTO TEMP BUF
PUSH HL ; SAVE PTR TO CALLS BUFFER
CALL SIMRTC_GETTIM0 ; GET TIME TO WORK BUFFER
;
; NOW COPY TO REAL DESTINATION (INTERBANK SAFE)
LD A,BID_BIOS ; COPY FROM BIOS BANK
LD (HB_SRCBNK),A ; SET IT
LD A,(HB_INVBNK) ; COPY TO CURRENT USER BANK
LD (HB_DSTBNK),A ; SET IT
LD HL,SIMRTC_BUF ; SOURCE ADR
POP DE ; DEST ADR
LD BC,SIMRTC_BUFSIZ ; LENGTH
CALL HB_BNKCPY ; COPY THE CLOCK DATA
;
LD DE,60 ; DELAY 60 * 16US = ~1MS
CALL VDELAY ; SLOW DOWN SIMH FOR CLOCK TICKING TEST
XOR A ; SIGNAL SUCCESS
RET ; AND RETURN
;
SIMRTC_GETTIM0:
LD HL,SIMRTC_BUF
LD A,SIMRTC_CLKREAD ; READ CLOCK COMMAND
OUT (SIMRTC_IO),A ; SEND IT TO SIMH
LD B,SIMRTC_BUFSIZ ; SETUP TO GET 6 BYTES
LD C,SIMRTC_IO ; FROM SIMH PORT
INIR ; GET BYTES TO (HL)
RET
;
; RTC SET TIME
; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR
; HL: DATE/TIME BUFFER (IN)
; BUFFER FORMAT IS BCD: YYMMDDHHMMSSWW
; 24 HOUR TIME FORMAT IS ASSUMED
;
SIMRTC_SETTIM:
; COPY TO TEMP BUF
LD A,(HB_INVBNK) ; COPY FROM CURRENT USER BANK
LD (HB_SRCBNK),A ; SET IT
LD A,BID_BIOS ; COPY TO BIOS BANK
LD (HB_DSTBNK),A ; SET IT
LD DE,SIMRTC_BUF ; DEST ADR
LD BC,SIMRTC_BUFSIZ ; LENGTH
CALL HB_BNKCPY ; COPY THE CLOCK DATA
;
LD HL,SIMRTC_BUF ; POINT TO TEMP BUF
LD A,SIMRTC_CLKWRITE ; WRITE CLOCK COMMAND
OUT (SIMRTC_IO),A ; SEND COMMAND TO SIMH
LD A,L ; LOW BYTE OF BUFFER ADDRESS
OUT (SIMRTC_IO),A ; SEND IT
LD A,H ; HIGH BYTE OF BUFFER ADDRESS
OUT (SIMRTC_IO),A ; SEND IT
;
XOR A ; SIGNAL SUCCESS
RET ; AND RETURN
;
; WORKING VARIABLES
;
SIMRTC_BUF: ; ALL IN BCD!!!
SIMRTC_YR .DB 0
SIMRTC_MO .DB 0
SIMRTC_DT .DB 0
SIMRTC_HH .DB 0
SIMRTC_MM .DB 0
SIMRTC_SS .DB 0
|
test/Common/Coinduction.agda | KDr2/agda | 0 | 10557 | {-# OPTIONS --cubical-compatible --guardedness #-}
module Common.Coinduction where
open import Agda.Builtin.Coinduction public
private
my-♯ : ∀ {a} {A : Set a} → A → ∞ A
my-♯ x = ♯ x
|
oeis/186/A186196.asm | neoneye/loda-programs | 11 | 170136 | <reponame>neoneye/loda-programs
; A186196: a(n)=(-1)^n*(-2)^C(n,2)*A001045(n+1).
; Submitted by <NAME>(s4)
; 1,-1,-6,40,704,-21504,-1409024,178257920,45902462976,-23433341566976,-24030926136672256,49179307930885816320,201512232261203141853184,-1650485975228872480767606784,-27044038098228417485446267797504
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $5,$0
add $5,1
mov $6,0
mov $9,$0
lpb $5
mov $0,$9
sub $5,1
sub $0,$5
mov $7,$0
lpb $7
mov $7,0
sub $8,$3
lpe
mov $3,$8
mul $3,3
add $3,3027
add $6,$3
lpe
lpe
mov $0,$6
div $0,3027
|
Etapa 01/Aula 02 - Estrutura dos Programas/codes/hello.asm | bellorini/unioeste | 6 | 240019 | <filename>Etapa 01/Aula 02 - Estrutura dos Programas/codes/hello.asm
; Aula 01 - Introdução
; hello.asm
; Meu primeiro assembly!
; nasm -f elf64 hello.asm ; ld hello.o -o hello.x
section .data
strOla : db "Ola", 10
strOlaL: equ $ - strOla
section .text
global _start
_start:
mov rax, 1
mov rdi, 1
lea rsi, [strOla]
mov edx, strOlaL
syscall
mov rax, 60
mov rdi, 0
syscall
|
oeis/232/A232637.asm | neoneye/loda-programs | 11 | 242922 | ; A232637: Odious numbers of order 2: a(n) = A000069(A000069(n)).
; Submitted by <NAME>
; 1,2,7,13,14,21,25,26,31,37,41,42,49,50,55,61,62,69,73,74,81,82,87,93,97,98,103,109,110,117,121,122,127,133,137,138,145,146,151,157,161,162,167,173,174,181,185,186,193,194,199,205,206,213,217,218,223,229,233,234,241,242,247,253,254,261,265,266,273,274,279,285,289,290,295,301,302,309,313,314,321,322,327,333,334,341,345,346,351,357,361,362,369,370,375,381,385,386,391,397
mov $1,56
lpb $1
seq $0,69 ; Odious numbers: numbers with an odd number of 1's in their binary expansion.
sub $0,1
div $1,9
lpe
add $0,1
|
Benchmarks/Exception Service.asm | RyanWangGit/MIPS_CPU | 60 | 98530 | # block interruptions
addi $k0,$zero,1
mtc0 $k0,$1
addi $gp,$zero,0x400 # base pointer
add $fp,$gp,$sp
# store EPC value
mfc0 $k0,$0
sw $k0,($fp)
addi $fp,$fp,4
addi $sp,$sp,4
# retrive block number
mfc0 $k1,$2
# retrive cause number
mfc0 $k0,$3
# set block number
mtc0 $k0,$2
# protect environment
sw $s0,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
sw $s4,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
sw $s5,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
sw $s6,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
sw $a0,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
sw $v0,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
sw $k1,($fp)
addi $sp,$sp,4
addi $fp,$fp,4
# calc display number
add $s6,$zero,$k0
addi $s6,$s6,1
# unblock interruptions
addi $k0,$zero,0
mtc0 $k0,$1
# start of program
addi $s4,$zero,5
addi $s5,$zero,1
IntLoop:
add $s0,$zero,$s6
IntLeftShift:
add $a0,$0,$s0 #display $s0
addi $v0,$0,34 # display hex
syscall # we are out of here.
sll $s0, $s0, 4
bne $s0, $zero, IntLeftShift
sub $s4,$s4,$s5
bne $s4, $zero, IntLoop
# end of test program
# block interruptions
addi $k0,$zero,1
mtc0 $k0,$1
# restore environment
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $k1,($fp)
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $v0,($fp)
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $a0,($fp)
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $s6,($fp)
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $s5,($fp)
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $s4,($fp)
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $s0,($fp)
# reset block register
mtc0 $k1,$2
# restore EPC value
addi $fp,$fp,-4
addi $sp,$sp,-4
lw $k0,($fp)
mtc0 $k0,$0
# unblock interruptions
addi $k0,$zero,0
mtc0 $k0,$1
eret
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.