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
bugs/bug08.ada
daveshields/AdaEd
3
16162
I think there is a problem of memory deallocation. For instance when you run the following program, after a moment you get an error of 'swap space' ... In fact, the compiler don't seem to deallocate the locals variables. ------------------------- procedure test2 is procedure x is c : integer; begin c := 1; end; begin while true loop x; end loop; end test2;
base/runtime/ini.asm
zbyti/Mad-Pascal
7
5377
.proc iniEAX_ECX_WORD mva :STACKORIGIN,x ecx mva :STACKORIGIN+STACKWIDTH,x ecx+1 mva :STACKORIGIN-1,x eax mva :STACKORIGIN-1+STACKWIDTH,x eax+1 mva #$00 ecx+2 sta ecx+3 sta eax+2 sta eax+3 rts .endp .proc iniEAX_ECX_CARD mva :STACKORIGIN,x ecx mva :STACKORIGIN+STACKWIDTH,x ecx+1 mva :STACKORIGIN+STACKWIDTH*2,x ecx+2 mva :STACKORIGIN+STACKWIDTH*3,x ecx+3 mva :STACKORIGIN-1,x eax mva :STACKORIGIN-1+STACKWIDTH,x eax+1 mva :STACKORIGIN-1+STACKWIDTH*2,x eax+2 mva :STACKORIGIN-1+STACKWIDTH*3,x eax+3 rts .endp
clients/ada-server/generated/src/server/-skeletons.adb
cliffano/pokeapi-clients
0
25504
<reponame>cliffano/pokeapi-clients -- -- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -- -- The version of the OpenAPI document: 20220523 -- -- -- NOTE: This package is auto generated by OpenAPI-Generator 5.4.0. -- https://openapi-generator.tech -- Do not edit the class manually. pragma Warnings (Off, "*is not referenced"); with Swagger.Streams; with Swagger.Servers.Operation; package body .Skeletons is pragma Style_Checks ("-mr"); pragma Warnings (Off, "*use clause for package*"); use Swagger.Streams; package body Skeleton is package API_Ability_List is new Swagger.Servers.Operation (Handler => Ability_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/ability/"); -- procedure Ability_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Ability_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Ability_List; package API_Ability_Read is new Swagger.Servers.Operation (Handler => Ability_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/ability/{id}/"); -- procedure Ability_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Ability_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Ability_Read; package API_Berry_List is new Swagger.Servers.Operation (Handler => Berry_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry/"); -- procedure Berry_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Berry_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_List; package API_Berry_Read is new Swagger.Servers.Operation (Handler => Berry_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry/{id}/"); -- procedure Berry_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Berry_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Read; package API_Berry_Firmness_List is new Swagger.Servers.Operation (Handler => Berry_Firmness_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-firmness/"); -- procedure Berry_Firmness_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Berry_Firmness_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Firmness_List; package API_Berry_Firmness_Read is new Swagger.Servers.Operation (Handler => Berry_Firmness_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-firmness/{id}/"); -- procedure Berry_Firmness_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Berry_Firmness_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Firmness_Read; package API_Berry_Flavor_List is new Swagger.Servers.Operation (Handler => Berry_Flavor_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-flavor/"); -- procedure Berry_Flavor_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Berry_Flavor_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Flavor_List; package API_Berry_Flavor_Read is new Swagger.Servers.Operation (Handler => Berry_Flavor_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-flavor/{id}/"); -- procedure Berry_Flavor_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Berry_Flavor_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Flavor_Read; package API_Characteristic_List is new Swagger.Servers.Operation (Handler => Characteristic_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/characteristic/"); -- procedure Characteristic_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Characteristic_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Characteristic_List; package API_Characteristic_Read is new Swagger.Servers.Operation (Handler => Characteristic_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/characteristic/{id}/"); -- procedure Characteristic_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Characteristic_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Characteristic_Read; package API_Contest_Effect_List is new Swagger.Servers.Operation (Handler => Contest_Effect_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-effect/"); -- procedure Contest_Effect_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Contest_Effect_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Effect_List; package API_Contest_Effect_Read is new Swagger.Servers.Operation (Handler => Contest_Effect_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-effect/{id}/"); -- procedure Contest_Effect_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Contest_Effect_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Effect_Read; package API_Contest_Type_List is new Swagger.Servers.Operation (Handler => Contest_Type_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-type/"); -- procedure Contest_Type_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Contest_Type_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Type_List; package API_Contest_Type_Read is new Swagger.Servers.Operation (Handler => Contest_Type_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-type/{id}/"); -- procedure Contest_Type_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Contest_Type_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Type_Read; package API_Egg_Group_List is new Swagger.Servers.Operation (Handler => Egg_Group_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/egg-group/"); -- procedure Egg_Group_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Egg_Group_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Egg_Group_List; package API_Egg_Group_Read is new Swagger.Servers.Operation (Handler => Egg_Group_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/egg-group/{id}/"); -- procedure Egg_Group_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Egg_Group_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Egg_Group_Read; package API_Encounter_Condition_List is new Swagger.Servers.Operation (Handler => Encounter_Condition_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition/"); -- procedure Encounter_Condition_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Encounter_Condition_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_List; package API_Encounter_Condition_Read is new Swagger.Servers.Operation (Handler => Encounter_Condition_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition/{id}/"); -- procedure Encounter_Condition_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Encounter_Condition_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_Read; package API_Encounter_Condition_Value_List is new Swagger.Servers.Operation (Handler => Encounter_Condition_Value_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition-value/"); -- procedure Encounter_Condition_Value_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Encounter_Condition_Value_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_Value_List; package API_Encounter_Condition_Value_Read is new Swagger.Servers.Operation (Handler => Encounter_Condition_Value_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition-value/{id}/"); -- procedure Encounter_Condition_Value_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Encounter_Condition_Value_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_Value_Read; package API_Encounter_Method_List is new Swagger.Servers.Operation (Handler => Encounter_Method_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-method/"); -- procedure Encounter_Method_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Encounter_Method_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Method_List; package API_Encounter_Method_Read is new Swagger.Servers.Operation (Handler => Encounter_Method_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-method/{id}/"); -- procedure Encounter_Method_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Encounter_Method_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Method_Read; package API_Evolution_Chain_List is new Swagger.Servers.Operation (Handler => Evolution_Chain_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-chain/"); -- procedure Evolution_Chain_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Evolution_Chain_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Chain_List; package API_Evolution_Chain_Read is new Swagger.Servers.Operation (Handler => Evolution_Chain_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-chain/{id}/"); -- procedure Evolution_Chain_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Evolution_Chain_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Chain_Read; package API_Evolution_Trigger_List is new Swagger.Servers.Operation (Handler => Evolution_Trigger_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-trigger/"); -- procedure Evolution_Trigger_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Evolution_Trigger_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Trigger_List; package API_Evolution_Trigger_Read is new Swagger.Servers.Operation (Handler => Evolution_Trigger_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-trigger/{id}/"); -- procedure Evolution_Trigger_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Evolution_Trigger_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Trigger_Read; package API_Gender_List is new Swagger.Servers.Operation (Handler => Gender_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/gender/"); -- procedure Gender_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Gender_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Gender_List; package API_Gender_Read is new Swagger.Servers.Operation (Handler => Gender_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/gender/{id}/"); -- procedure Gender_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Gender_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Gender_Read; package API_Generation_List is new Swagger.Servers.Operation (Handler => Generation_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/generation/"); -- procedure Generation_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Generation_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Generation_List; package API_Generation_Read is new Swagger.Servers.Operation (Handler => Generation_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/generation/{id}/"); -- procedure Generation_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Generation_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Generation_Read; package API_Growth_Rate_List is new Swagger.Servers.Operation (Handler => Growth_Rate_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/growth-rate/"); -- procedure Growth_Rate_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Growth_Rate_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Growth_Rate_List; package API_Growth_Rate_Read is new Swagger.Servers.Operation (Handler => Growth_Rate_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/growth-rate/{id}/"); -- procedure Growth_Rate_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Growth_Rate_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Growth_Rate_Read; package API_Item_List is new Swagger.Servers.Operation (Handler => Item_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item/"); -- procedure Item_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Item_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_List; package API_Item_Read is new Swagger.Servers.Operation (Handler => Item_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item/{id}/"); -- procedure Item_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Item_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Read; package API_Item_Attribute_List is new Swagger.Servers.Operation (Handler => Item_Attribute_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-attribute/"); -- procedure Item_Attribute_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Item_Attribute_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Attribute_List; package API_Item_Attribute_Read is new Swagger.Servers.Operation (Handler => Item_Attribute_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-attribute/{id}/"); -- procedure Item_Attribute_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Item_Attribute_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Attribute_Read; package API_Item_Category_List is new Swagger.Servers.Operation (Handler => Item_Category_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-category/"); -- procedure Item_Category_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Item_Category_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Category_List; package API_Item_Category_Read is new Swagger.Servers.Operation (Handler => Item_Category_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-category/{id}/"); -- procedure Item_Category_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Item_Category_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Category_Read; package API_Item_Fling_Effect_List is new Swagger.Servers.Operation (Handler => Item_Fling_Effect_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-fling-effect/"); -- procedure Item_Fling_Effect_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Item_Fling_Effect_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Fling_Effect_List; package API_Item_Fling_Effect_Read is new Swagger.Servers.Operation (Handler => Item_Fling_Effect_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-fling-effect/{id}/"); -- procedure Item_Fling_Effect_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Item_Fling_Effect_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Fling_Effect_Read; package API_Item_Pocket_List is new Swagger.Servers.Operation (Handler => Item_Pocket_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-pocket/"); -- procedure Item_Pocket_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Item_Pocket_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Pocket_List; package API_Item_Pocket_Read is new Swagger.Servers.Operation (Handler => Item_Pocket_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-pocket/{id}/"); -- procedure Item_Pocket_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Item_Pocket_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Pocket_Read; package API_Language_List is new Swagger.Servers.Operation (Handler => Language_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/language/"); -- procedure Language_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Language_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Language_List; package API_Language_Read is new Swagger.Servers.Operation (Handler => Language_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/language/{id}/"); -- procedure Language_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Language_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Language_Read; package API_Location_List is new Swagger.Servers.Operation (Handler => Location_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location/"); -- procedure Location_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Location_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_List; package API_Location_Read is new Swagger.Servers.Operation (Handler => Location_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location/{id}/"); -- procedure Location_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Location_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_Read; package API_Location_Area_List is new Swagger.Servers.Operation (Handler => Location_Area_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location-area/"); -- procedure Location_Area_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Location_Area_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_Area_List; package API_Location_Area_Read is new Swagger.Servers.Operation (Handler => Location_Area_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location-area/{id}/"); -- procedure Location_Area_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Location_Area_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_Area_Read; package API_Machine_List is new Swagger.Servers.Operation (Handler => Machine_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/machine/"); -- procedure Machine_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Machine_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Machine_List; package API_Machine_Read is new Swagger.Servers.Operation (Handler => Machine_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/machine/{id}/"); -- procedure Machine_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Machine_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Machine_Read; package API_Move_List is new Swagger.Servers.Operation (Handler => Move_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move/"); -- procedure Move_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_List; package API_Move_Read is new Swagger.Servers.Operation (Handler => Move_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move/{id}/"); -- procedure Move_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Read; package API_Move_Ailment_List is new Swagger.Servers.Operation (Handler => Move_Ailment_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-ailment/"); -- procedure Move_Ailment_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_Ailment_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Ailment_List; package API_Move_Ailment_Read is new Swagger.Servers.Operation (Handler => Move_Ailment_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-ailment/{id}/"); -- procedure Move_Ailment_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Ailment_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Ailment_Read; package API_Move_Battle_Style_List is new Swagger.Servers.Operation (Handler => Move_Battle_Style_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-battle-style/"); -- procedure Move_Battle_Style_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_Battle_Style_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Battle_Style_List; package API_Move_Battle_Style_Read is new Swagger.Servers.Operation (Handler => Move_Battle_Style_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-battle-style/{id}/"); -- procedure Move_Battle_Style_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Battle_Style_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Battle_Style_Read; package API_Move_Category_List is new Swagger.Servers.Operation (Handler => Move_Category_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-category/"); -- procedure Move_Category_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_Category_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Category_List; package API_Move_Category_Read is new Swagger.Servers.Operation (Handler => Move_Category_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-category/{id}/"); -- procedure Move_Category_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Category_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Category_Read; package API_Move_Damage_Class_List is new Swagger.Servers.Operation (Handler => Move_Damage_Class_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-damage-class/"); -- procedure Move_Damage_Class_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_Damage_Class_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Damage_Class_List; package API_Move_Damage_Class_Read is new Swagger.Servers.Operation (Handler => Move_Damage_Class_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-damage-class/{id}/"); -- procedure Move_Damage_Class_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Damage_Class_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Damage_Class_Read; package API_Move_Learn_Method_List is new Swagger.Servers.Operation (Handler => Move_Learn_Method_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-learn-method/"); -- procedure Move_Learn_Method_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_Learn_Method_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Learn_Method_List; package API_Move_Learn_Method_Read is new Swagger.Servers.Operation (Handler => Move_Learn_Method_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-learn-method/{id}/"); -- procedure Move_Learn_Method_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Learn_Method_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Learn_Method_Read; package API_Move_Target_List is new Swagger.Servers.Operation (Handler => Move_Target_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-target/"); -- procedure Move_Target_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Move_Target_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Target_List; package API_Move_Target_Read is new Swagger.Servers.Operation (Handler => Move_Target_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-target/{id}/"); -- procedure Move_Target_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Move_Target_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Target_Read; package API_Nature_List is new Swagger.Servers.Operation (Handler => Nature_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/nature/"); -- procedure Nature_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Nature_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Nature_List; package API_Nature_Read is new Swagger.Servers.Operation (Handler => Nature_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/nature/{id}/"); -- procedure Nature_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Nature_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Nature_Read; package API_Pal_Park_Area_List is new Swagger.Servers.Operation (Handler => Pal_Park_Area_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pal-park-area/"); -- procedure Pal_Park_Area_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pal_Park_Area_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pal_Park_Area_List; package API_Pal_Park_Area_Read is new Swagger.Servers.Operation (Handler => Pal_Park_Area_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pal-park-area/{id}/"); -- procedure Pal_Park_Area_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pal_Park_Area_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pal_Park_Area_Read; package API_Pokeathlon_Stat_List is new Swagger.Servers.Operation (Handler => Pokeathlon_Stat_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokeathlon-stat/"); -- procedure Pokeathlon_Stat_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokeathlon_Stat_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokeathlon_Stat_List; package API_Pokeathlon_Stat_Read is new Swagger.Servers.Operation (Handler => Pokeathlon_Stat_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokeathlon-stat/{id}/"); -- procedure Pokeathlon_Stat_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokeathlon_Stat_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokeathlon_Stat_Read; package API_Pokedex_List is new Swagger.Servers.Operation (Handler => Pokedex_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokedex/"); -- procedure Pokedex_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokedex_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokedex_List; package API_Pokedex_Read is new Swagger.Servers.Operation (Handler => Pokedex_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokedex/{id}/"); -- procedure Pokedex_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokedex_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokedex_Read; package API_Pokemon_List is new Swagger.Servers.Operation (Handler => Pokemon_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon/"); -- procedure Pokemon_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokemon_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_List; package API_Pokemon_Read is new Swagger.Servers.Operation (Handler => Pokemon_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon/{id}/"); -- procedure Pokemon_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokemon_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Read; package API_Pokemon_Color_List is new Swagger.Servers.Operation (Handler => Pokemon_Color_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-color/"); -- procedure Pokemon_Color_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokemon_Color_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Color_List; package API_Pokemon_Color_Read is new Swagger.Servers.Operation (Handler => Pokemon_Color_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-color/{id}/"); -- procedure Pokemon_Color_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokemon_Color_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Color_Read; package API_Pokemon_Form_List is new Swagger.Servers.Operation (Handler => Pokemon_Form_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-form/"); -- procedure Pokemon_Form_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokemon_Form_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Form_List; package API_Pokemon_Form_Read is new Swagger.Servers.Operation (Handler => Pokemon_Form_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-form/{id}/"); -- procedure Pokemon_Form_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokemon_Form_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Form_Read; package API_Pokemon_Habitat_List is new Swagger.Servers.Operation (Handler => Pokemon_Habitat_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-habitat/"); -- procedure Pokemon_Habitat_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokemon_Habitat_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Habitat_List; package API_Pokemon_Habitat_Read is new Swagger.Servers.Operation (Handler => Pokemon_Habitat_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-habitat/{id}/"); -- procedure Pokemon_Habitat_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokemon_Habitat_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Habitat_Read; package API_Pokemon_Shape_List is new Swagger.Servers.Operation (Handler => Pokemon_Shape_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-shape/"); -- procedure Pokemon_Shape_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokemon_Shape_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Shape_List; package API_Pokemon_Shape_Read is new Swagger.Servers.Operation (Handler => Pokemon_Shape_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-shape/{id}/"); -- procedure Pokemon_Shape_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokemon_Shape_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Shape_Read; package API_Pokemon_Species_List is new Swagger.Servers.Operation (Handler => Pokemon_Species_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-species/"); -- procedure Pokemon_Species_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Pokemon_Species_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Species_List; package API_Pokemon_Species_Read is new Swagger.Servers.Operation (Handler => Pokemon_Species_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-species/{id}/"); -- procedure Pokemon_Species_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Pokemon_Species_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Species_Read; package API_Region_List is new Swagger.Servers.Operation (Handler => Region_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/region/"); -- procedure Region_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Region_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Region_List; package API_Region_Read is new Swagger.Servers.Operation (Handler => Region_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/region/{id}/"); -- procedure Region_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Region_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Region_Read; package API_Stat_List is new Swagger.Servers.Operation (Handler => Stat_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/stat/"); -- procedure Stat_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Stat_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Stat_List; package API_Stat_Read is new Swagger.Servers.Operation (Handler => Stat_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/stat/{id}/"); -- procedure Stat_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Stat_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Stat_Read; package API_Super_Contest_Effect_List is new Swagger.Servers.Operation (Handler => Super_Contest_Effect_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/super-contest-effect/"); -- procedure Super_Contest_Effect_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Super_Contest_Effect_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Super_Contest_Effect_List; package API_Super_Contest_Effect_Read is new Swagger.Servers.Operation (Handler => Super_Contest_Effect_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/super-contest-effect/{id}/"); -- procedure Super_Contest_Effect_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Super_Contest_Effect_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Super_Contest_Effect_Read; package API_Type_List is new Swagger.Servers.Operation (Handler => Type_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/type/"); -- procedure Type_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Type_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Type_List; package API_Type_Read is new Swagger.Servers.Operation (Handler => Type_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/type/{id}/"); -- procedure Type_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Type_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Type_Read; package API_Version_List is new Swagger.Servers.Operation (Handler => Version_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version/"); -- procedure Version_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Version_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_List; package API_Version_Read is new Swagger.Servers.Operation (Handler => Version_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version/{id}/"); -- procedure Version_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Version_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_Read; package API_Version_Group_List is new Swagger.Servers.Operation (Handler => Version_Group_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version-group/"); -- procedure Version_Group_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Impl.Version_Group_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_Group_List; package API_Version_Group_Read is new Swagger.Servers.Operation (Handler => Version_Group_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version-group/{id}/"); -- procedure Version_Group_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Impl : Implementation_Type; Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Impl.Version_Group_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_Group_Read; procedure Register (Server : in out Swagger.Servers.Application_Type'Class) is begin Swagger.Servers.Register (Server, API_Ability_List.Definition); Swagger.Servers.Register (Server, API_Ability_Read.Definition); Swagger.Servers.Register (Server, API_Berry_List.Definition); Swagger.Servers.Register (Server, API_Berry_Read.Definition); Swagger.Servers.Register (Server, API_Berry_Firmness_List.Definition); Swagger.Servers.Register (Server, API_Berry_Firmness_Read.Definition); Swagger.Servers.Register (Server, API_Berry_Flavor_List.Definition); Swagger.Servers.Register (Server, API_Berry_Flavor_Read.Definition); Swagger.Servers.Register (Server, API_Characteristic_List.Definition); Swagger.Servers.Register (Server, API_Characteristic_Read.Definition); Swagger.Servers.Register (Server, API_Contest_Effect_List.Definition); Swagger.Servers.Register (Server, API_Contest_Effect_Read.Definition); Swagger.Servers.Register (Server, API_Contest_Type_List.Definition); Swagger.Servers.Register (Server, API_Contest_Type_Read.Definition); Swagger.Servers.Register (Server, API_Egg_Group_List.Definition); Swagger.Servers.Register (Server, API_Egg_Group_Read.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_List.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_Read.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_Value_List.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_Value_Read.Definition); Swagger.Servers.Register (Server, API_Encounter_Method_List.Definition); Swagger.Servers.Register (Server, API_Encounter_Method_Read.Definition); Swagger.Servers.Register (Server, API_Evolution_Chain_List.Definition); Swagger.Servers.Register (Server, API_Evolution_Chain_Read.Definition); Swagger.Servers.Register (Server, API_Evolution_Trigger_List.Definition); Swagger.Servers.Register (Server, API_Evolution_Trigger_Read.Definition); Swagger.Servers.Register (Server, API_Gender_List.Definition); Swagger.Servers.Register (Server, API_Gender_Read.Definition); Swagger.Servers.Register (Server, API_Generation_List.Definition); Swagger.Servers.Register (Server, API_Generation_Read.Definition); Swagger.Servers.Register (Server, API_Growth_Rate_List.Definition); Swagger.Servers.Register (Server, API_Growth_Rate_Read.Definition); Swagger.Servers.Register (Server, API_Item_List.Definition); Swagger.Servers.Register (Server, API_Item_Read.Definition); Swagger.Servers.Register (Server, API_Item_Attribute_List.Definition); Swagger.Servers.Register (Server, API_Item_Attribute_Read.Definition); Swagger.Servers.Register (Server, API_Item_Category_List.Definition); Swagger.Servers.Register (Server, API_Item_Category_Read.Definition); Swagger.Servers.Register (Server, API_Item_Fling_Effect_List.Definition); Swagger.Servers.Register (Server, API_Item_Fling_Effect_Read.Definition); Swagger.Servers.Register (Server, API_Item_Pocket_List.Definition); Swagger.Servers.Register (Server, API_Item_Pocket_Read.Definition); Swagger.Servers.Register (Server, API_Language_List.Definition); Swagger.Servers.Register (Server, API_Language_Read.Definition); Swagger.Servers.Register (Server, API_Location_List.Definition); Swagger.Servers.Register (Server, API_Location_Read.Definition); Swagger.Servers.Register (Server, API_Location_Area_List.Definition); Swagger.Servers.Register (Server, API_Location_Area_Read.Definition); Swagger.Servers.Register (Server, API_Machine_List.Definition); Swagger.Servers.Register (Server, API_Machine_Read.Definition); Swagger.Servers.Register (Server, API_Move_List.Definition); Swagger.Servers.Register (Server, API_Move_Read.Definition); Swagger.Servers.Register (Server, API_Move_Ailment_List.Definition); Swagger.Servers.Register (Server, API_Move_Ailment_Read.Definition); Swagger.Servers.Register (Server, API_Move_Battle_Style_List.Definition); Swagger.Servers.Register (Server, API_Move_Battle_Style_Read.Definition); Swagger.Servers.Register (Server, API_Move_Category_List.Definition); Swagger.Servers.Register (Server, API_Move_Category_Read.Definition); Swagger.Servers.Register (Server, API_Move_Damage_Class_List.Definition); Swagger.Servers.Register (Server, API_Move_Damage_Class_Read.Definition); Swagger.Servers.Register (Server, API_Move_Learn_Method_List.Definition); Swagger.Servers.Register (Server, API_Move_Learn_Method_Read.Definition); Swagger.Servers.Register (Server, API_Move_Target_List.Definition); Swagger.Servers.Register (Server, API_Move_Target_Read.Definition); Swagger.Servers.Register (Server, API_Nature_List.Definition); Swagger.Servers.Register (Server, API_Nature_Read.Definition); Swagger.Servers.Register (Server, API_Pal_Park_Area_List.Definition); Swagger.Servers.Register (Server, API_Pal_Park_Area_Read.Definition); Swagger.Servers.Register (Server, API_Pokeathlon_Stat_List.Definition); Swagger.Servers.Register (Server, API_Pokeathlon_Stat_Read.Definition); Swagger.Servers.Register (Server, API_Pokedex_List.Definition); Swagger.Servers.Register (Server, API_Pokedex_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Color_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Color_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Form_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Form_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Habitat_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Habitat_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Shape_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Shape_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Species_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Species_Read.Definition); Swagger.Servers.Register (Server, API_Region_List.Definition); Swagger.Servers.Register (Server, API_Region_Read.Definition); Swagger.Servers.Register (Server, API_Stat_List.Definition); Swagger.Servers.Register (Server, API_Stat_Read.Definition); Swagger.Servers.Register (Server, API_Super_Contest_Effect_List.Definition); Swagger.Servers.Register (Server, API_Super_Contest_Effect_Read.Definition); Swagger.Servers.Register (Server, API_Type_List.Definition); Swagger.Servers.Register (Server, API_Type_Read.Definition); Swagger.Servers.Register (Server, API_Version_List.Definition); Swagger.Servers.Register (Server, API_Version_Read.Definition); Swagger.Servers.Register (Server, API_Version_Group_List.Definition); Swagger.Servers.Register (Server, API_Version_Group_Read.Definition); end Register; end Skeleton; package body Shared_Instance is -- procedure Ability_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Ability_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Ability_List; package API_Ability_List is new Swagger.Servers.Operation (Handler => Ability_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/ability/"); -- procedure Ability_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Ability_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Ability_Read; package API_Ability_Read is new Swagger.Servers.Operation (Handler => Ability_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/ability/{id}/"); -- procedure Berry_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Berry_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_List; package API_Berry_List is new Swagger.Servers.Operation (Handler => Berry_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry/"); -- procedure Berry_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Berry_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Read; package API_Berry_Read is new Swagger.Servers.Operation (Handler => Berry_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry/{id}/"); -- procedure Berry_Firmness_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Berry_Firmness_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Firmness_List; package API_Berry_Firmness_List is new Swagger.Servers.Operation (Handler => Berry_Firmness_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-firmness/"); -- procedure Berry_Firmness_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Berry_Firmness_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Firmness_Read; package API_Berry_Firmness_Read is new Swagger.Servers.Operation (Handler => Berry_Firmness_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-firmness/{id}/"); -- procedure Berry_Flavor_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Berry_Flavor_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Flavor_List; package API_Berry_Flavor_List is new Swagger.Servers.Operation (Handler => Berry_Flavor_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-flavor/"); -- procedure Berry_Flavor_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Berry_Flavor_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Berry_Flavor_Read; package API_Berry_Flavor_Read is new Swagger.Servers.Operation (Handler => Berry_Flavor_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/berry-flavor/{id}/"); -- procedure Characteristic_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Characteristic_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Characteristic_List; package API_Characteristic_List is new Swagger.Servers.Operation (Handler => Characteristic_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/characteristic/"); -- procedure Characteristic_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Characteristic_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Characteristic_Read; package API_Characteristic_Read is new Swagger.Servers.Operation (Handler => Characteristic_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/characteristic/{id}/"); -- procedure Contest_Effect_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Contest_Effect_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Effect_List; package API_Contest_Effect_List is new Swagger.Servers.Operation (Handler => Contest_Effect_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-effect/"); -- procedure Contest_Effect_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Contest_Effect_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Effect_Read; package API_Contest_Effect_Read is new Swagger.Servers.Operation (Handler => Contest_Effect_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-effect/{id}/"); -- procedure Contest_Type_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Contest_Type_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Type_List; package API_Contest_Type_List is new Swagger.Servers.Operation (Handler => Contest_Type_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-type/"); -- procedure Contest_Type_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Contest_Type_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Contest_Type_Read; package API_Contest_Type_Read is new Swagger.Servers.Operation (Handler => Contest_Type_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/contest-type/{id}/"); -- procedure Egg_Group_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Egg_Group_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Egg_Group_List; package API_Egg_Group_List is new Swagger.Servers.Operation (Handler => Egg_Group_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/egg-group/"); -- procedure Egg_Group_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Egg_Group_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Egg_Group_Read; package API_Egg_Group_Read is new Swagger.Servers.Operation (Handler => Egg_Group_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/egg-group/{id}/"); -- procedure Encounter_Condition_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Encounter_Condition_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_List; package API_Encounter_Condition_List is new Swagger.Servers.Operation (Handler => Encounter_Condition_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition/"); -- procedure Encounter_Condition_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Encounter_Condition_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_Read; package API_Encounter_Condition_Read is new Swagger.Servers.Operation (Handler => Encounter_Condition_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition/{id}/"); -- procedure Encounter_Condition_Value_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Encounter_Condition_Value_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_Value_List; package API_Encounter_Condition_Value_List is new Swagger.Servers.Operation (Handler => Encounter_Condition_Value_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition-value/"); -- procedure Encounter_Condition_Value_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Encounter_Condition_Value_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Condition_Value_Read; package API_Encounter_Condition_Value_Read is new Swagger.Servers.Operation (Handler => Encounter_Condition_Value_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-condition-value/{id}/"); -- procedure Encounter_Method_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Encounter_Method_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Method_List; package API_Encounter_Method_List is new Swagger.Servers.Operation (Handler => Encounter_Method_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-method/"); -- procedure Encounter_Method_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Encounter_Method_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Encounter_Method_Read; package API_Encounter_Method_Read is new Swagger.Servers.Operation (Handler => Encounter_Method_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/encounter-method/{id}/"); -- procedure Evolution_Chain_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Evolution_Chain_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Chain_List; package API_Evolution_Chain_List is new Swagger.Servers.Operation (Handler => Evolution_Chain_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-chain/"); -- procedure Evolution_Chain_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Evolution_Chain_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Chain_Read; package API_Evolution_Chain_Read is new Swagger.Servers.Operation (Handler => Evolution_Chain_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-chain/{id}/"); -- procedure Evolution_Trigger_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Evolution_Trigger_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Trigger_List; package API_Evolution_Trigger_List is new Swagger.Servers.Operation (Handler => Evolution_Trigger_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-trigger/"); -- procedure Evolution_Trigger_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Evolution_Trigger_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Evolution_Trigger_Read; package API_Evolution_Trigger_Read is new Swagger.Servers.Operation (Handler => Evolution_Trigger_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/evolution-trigger/{id}/"); -- procedure Gender_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Gender_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Gender_List; package API_Gender_List is new Swagger.Servers.Operation (Handler => Gender_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/gender/"); -- procedure Gender_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Gender_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Gender_Read; package API_Gender_Read is new Swagger.Servers.Operation (Handler => Gender_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/gender/{id}/"); -- procedure Generation_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Generation_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Generation_List; package API_Generation_List is new Swagger.Servers.Operation (Handler => Generation_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/generation/"); -- procedure Generation_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Generation_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Generation_Read; package API_Generation_Read is new Swagger.Servers.Operation (Handler => Generation_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/generation/{id}/"); -- procedure Growth_Rate_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Growth_Rate_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Growth_Rate_List; package API_Growth_Rate_List is new Swagger.Servers.Operation (Handler => Growth_Rate_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/growth-rate/"); -- procedure Growth_Rate_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Growth_Rate_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Growth_Rate_Read; package API_Growth_Rate_Read is new Swagger.Servers.Operation (Handler => Growth_Rate_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/growth-rate/{id}/"); -- procedure Item_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Item_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_List; package API_Item_List is new Swagger.Servers.Operation (Handler => Item_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item/"); -- procedure Item_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Item_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Read; package API_Item_Read is new Swagger.Servers.Operation (Handler => Item_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item/{id}/"); -- procedure Item_Attribute_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Item_Attribute_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Attribute_List; package API_Item_Attribute_List is new Swagger.Servers.Operation (Handler => Item_Attribute_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-attribute/"); -- procedure Item_Attribute_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Item_Attribute_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Attribute_Read; package API_Item_Attribute_Read is new Swagger.Servers.Operation (Handler => Item_Attribute_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-attribute/{id}/"); -- procedure Item_Category_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Item_Category_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Category_List; package API_Item_Category_List is new Swagger.Servers.Operation (Handler => Item_Category_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-category/"); -- procedure Item_Category_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Item_Category_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Category_Read; package API_Item_Category_Read is new Swagger.Servers.Operation (Handler => Item_Category_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-category/{id}/"); -- procedure Item_Fling_Effect_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Item_Fling_Effect_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Fling_Effect_List; package API_Item_Fling_Effect_List is new Swagger.Servers.Operation (Handler => Item_Fling_Effect_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-fling-effect/"); -- procedure Item_Fling_Effect_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Item_Fling_Effect_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Fling_Effect_Read; package API_Item_Fling_Effect_Read is new Swagger.Servers.Operation (Handler => Item_Fling_Effect_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-fling-effect/{id}/"); -- procedure Item_Pocket_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Item_Pocket_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Pocket_List; package API_Item_Pocket_List is new Swagger.Servers.Operation (Handler => Item_Pocket_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-pocket/"); -- procedure Item_Pocket_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Item_Pocket_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Item_Pocket_Read; package API_Item_Pocket_Read is new Swagger.Servers.Operation (Handler => Item_Pocket_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/item-pocket/{id}/"); -- procedure Language_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Language_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Language_List; package API_Language_List is new Swagger.Servers.Operation (Handler => Language_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/language/"); -- procedure Language_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Language_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Language_Read; package API_Language_Read is new Swagger.Servers.Operation (Handler => Language_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/language/{id}/"); -- procedure Location_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Location_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_List; package API_Location_List is new Swagger.Servers.Operation (Handler => Location_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location/"); -- procedure Location_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Location_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_Read; package API_Location_Read is new Swagger.Servers.Operation (Handler => Location_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location/{id}/"); -- procedure Location_Area_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Location_Area_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_Area_List; package API_Location_Area_List is new Swagger.Servers.Operation (Handler => Location_Area_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location-area/"); -- procedure Location_Area_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Location_Area_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Location_Area_Read; package API_Location_Area_Read is new Swagger.Servers.Operation (Handler => Location_Area_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/location-area/{id}/"); -- procedure Machine_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Machine_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Machine_List; package API_Machine_List is new Swagger.Servers.Operation (Handler => Machine_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/machine/"); -- procedure Machine_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Machine_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Machine_Read; package API_Machine_Read is new Swagger.Servers.Operation (Handler => Machine_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/machine/{id}/"); -- procedure Move_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_List; package API_Move_List is new Swagger.Servers.Operation (Handler => Move_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move/"); -- procedure Move_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Read; package API_Move_Read is new Swagger.Servers.Operation (Handler => Move_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move/{id}/"); -- procedure Move_Ailment_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_Ailment_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Ailment_List; package API_Move_Ailment_List is new Swagger.Servers.Operation (Handler => Move_Ailment_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-ailment/"); -- procedure Move_Ailment_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Ailment_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Ailment_Read; package API_Move_Ailment_Read is new Swagger.Servers.Operation (Handler => Move_Ailment_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-ailment/{id}/"); -- procedure Move_Battle_Style_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_Battle_Style_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Battle_Style_List; package API_Move_Battle_Style_List is new Swagger.Servers.Operation (Handler => Move_Battle_Style_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-battle-style/"); -- procedure Move_Battle_Style_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Battle_Style_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Battle_Style_Read; package API_Move_Battle_Style_Read is new Swagger.Servers.Operation (Handler => Move_Battle_Style_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-battle-style/{id}/"); -- procedure Move_Category_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_Category_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Category_List; package API_Move_Category_List is new Swagger.Servers.Operation (Handler => Move_Category_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-category/"); -- procedure Move_Category_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Category_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Category_Read; package API_Move_Category_Read is new Swagger.Servers.Operation (Handler => Move_Category_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-category/{id}/"); -- procedure Move_Damage_Class_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_Damage_Class_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Damage_Class_List; package API_Move_Damage_Class_List is new Swagger.Servers.Operation (Handler => Move_Damage_Class_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-damage-class/"); -- procedure Move_Damage_Class_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Damage_Class_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Damage_Class_Read; package API_Move_Damage_Class_Read is new Swagger.Servers.Operation (Handler => Move_Damage_Class_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-damage-class/{id}/"); -- procedure Move_Learn_Method_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_Learn_Method_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Learn_Method_List; package API_Move_Learn_Method_List is new Swagger.Servers.Operation (Handler => Move_Learn_Method_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-learn-method/"); -- procedure Move_Learn_Method_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Learn_Method_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Learn_Method_Read; package API_Move_Learn_Method_Read is new Swagger.Servers.Operation (Handler => Move_Learn_Method_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-learn-method/{id}/"); -- procedure Move_Target_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Move_Target_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Target_List; package API_Move_Target_List is new Swagger.Servers.Operation (Handler => Move_Target_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-target/"); -- procedure Move_Target_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Move_Target_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Move_Target_Read; package API_Move_Target_Read is new Swagger.Servers.Operation (Handler => Move_Target_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/move-target/{id}/"); -- procedure Nature_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Nature_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Nature_List; package API_Nature_List is new Swagger.Servers.Operation (Handler => Nature_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/nature/"); -- procedure Nature_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Nature_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Nature_Read; package API_Nature_Read is new Swagger.Servers.Operation (Handler => Nature_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/nature/{id}/"); -- procedure Pal_Park_Area_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pal_Park_Area_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pal_Park_Area_List; package API_Pal_Park_Area_List is new Swagger.Servers.Operation (Handler => Pal_Park_Area_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pal-park-area/"); -- procedure Pal_Park_Area_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pal_Park_Area_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pal_Park_Area_Read; package API_Pal_Park_Area_Read is new Swagger.Servers.Operation (Handler => Pal_Park_Area_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pal-park-area/{id}/"); -- procedure Pokeathlon_Stat_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokeathlon_Stat_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokeathlon_Stat_List; package API_Pokeathlon_Stat_List is new Swagger.Servers.Operation (Handler => Pokeathlon_Stat_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokeathlon-stat/"); -- procedure Pokeathlon_Stat_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokeathlon_Stat_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokeathlon_Stat_Read; package API_Pokeathlon_Stat_Read is new Swagger.Servers.Operation (Handler => Pokeathlon_Stat_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokeathlon-stat/{id}/"); -- procedure Pokedex_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokedex_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokedex_List; package API_Pokedex_List is new Swagger.Servers.Operation (Handler => Pokedex_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokedex/"); -- procedure Pokedex_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokedex_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokedex_Read; package API_Pokedex_Read is new Swagger.Servers.Operation (Handler => Pokedex_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokedex/{id}/"); -- procedure Pokemon_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokemon_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_List; package API_Pokemon_List is new Swagger.Servers.Operation (Handler => Pokemon_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon/"); -- procedure Pokemon_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokemon_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Read; package API_Pokemon_Read is new Swagger.Servers.Operation (Handler => Pokemon_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon/{id}/"); -- procedure Pokemon_Color_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokemon_Color_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Color_List; package API_Pokemon_Color_List is new Swagger.Servers.Operation (Handler => Pokemon_Color_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-color/"); -- procedure Pokemon_Color_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokemon_Color_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Color_Read; package API_Pokemon_Color_Read is new Swagger.Servers.Operation (Handler => Pokemon_Color_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-color/{id}/"); -- procedure Pokemon_Form_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokemon_Form_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Form_List; package API_Pokemon_Form_List is new Swagger.Servers.Operation (Handler => Pokemon_Form_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-form/"); -- procedure Pokemon_Form_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokemon_Form_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Form_Read; package API_Pokemon_Form_Read is new Swagger.Servers.Operation (Handler => Pokemon_Form_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-form/{id}/"); -- procedure Pokemon_Habitat_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokemon_Habitat_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Habitat_List; package API_Pokemon_Habitat_List is new Swagger.Servers.Operation (Handler => Pokemon_Habitat_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-habitat/"); -- procedure Pokemon_Habitat_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokemon_Habitat_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Habitat_Read; package API_Pokemon_Habitat_Read is new Swagger.Servers.Operation (Handler => Pokemon_Habitat_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-habitat/{id}/"); -- procedure Pokemon_Shape_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokemon_Shape_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Shape_List; package API_Pokemon_Shape_List is new Swagger.Servers.Operation (Handler => Pokemon_Shape_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-shape/"); -- procedure Pokemon_Shape_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokemon_Shape_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Shape_Read; package API_Pokemon_Shape_Read is new Swagger.Servers.Operation (Handler => Pokemon_Shape_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-shape/{id}/"); -- procedure Pokemon_Species_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Pokemon_Species_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Species_List; package API_Pokemon_Species_List is new Swagger.Servers.Operation (Handler => Pokemon_Species_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-species/"); -- procedure Pokemon_Species_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Pokemon_Species_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Pokemon_Species_Read; package API_Pokemon_Species_Read is new Swagger.Servers.Operation (Handler => Pokemon_Species_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/pokemon-species/{id}/"); -- procedure Region_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Region_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Region_List; package API_Region_List is new Swagger.Servers.Operation (Handler => Region_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/region/"); -- procedure Region_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Region_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Region_Read; package API_Region_Read is new Swagger.Servers.Operation (Handler => Region_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/region/{id}/"); -- procedure Stat_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Stat_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Stat_List; package API_Stat_List is new Swagger.Servers.Operation (Handler => Stat_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/stat/"); -- procedure Stat_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Stat_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Stat_Read; package API_Stat_Read is new Swagger.Servers.Operation (Handler => Stat_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/stat/{id}/"); -- procedure Super_Contest_Effect_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Super_Contest_Effect_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Super_Contest_Effect_List; package API_Super_Contest_Effect_List is new Swagger.Servers.Operation (Handler => Super_Contest_Effect_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/super-contest-effect/"); -- procedure Super_Contest_Effect_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Super_Contest_Effect_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Super_Contest_Effect_Read; package API_Super_Contest_Effect_Read is new Swagger.Servers.Operation (Handler => Super_Contest_Effect_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/super-contest-effect/{id}/"); -- procedure Type_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Type_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Type_List; package API_Type_List is new Swagger.Servers.Operation (Handler => Type_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/type/"); -- procedure Type_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Type_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Type_Read; package API_Type_Read is new Swagger.Servers.Operation (Handler => Type_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/type/{id}/"); -- procedure Version_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Version_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_List; package API_Version_List is new Swagger.Servers.Operation (Handler => Version_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version/"); -- procedure Version_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Version_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_Read; package API_Version_Read is new Swagger.Servers.Operation (Handler => Version_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version/{id}/"); -- procedure Version_Group_List (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Limit : Swagger.Nullable_Integer; Offset : Swagger.Nullable_Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit); Swagger.Servers.Get_Query_Parameter (Req, "offset", Offset); Server.Version_Group_List (Limit, Offset, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_Group_List; package API_Version_Group_List is new Swagger.Servers.Operation (Handler => Version_Group_List, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version-group/"); -- procedure Version_Group_Read (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type) is Id : Integer; Result : Swagger.UString; begin Swagger.Servers.Get_Path_Parameter (Req, 1, Id); Server.Version_Group_Read (Id, Result, Context); if Context.Get_Status = 200 then Stream.Start_Document; Swagger.Streams.Serialize (Stream, "", Result); Stream.End_Document; end if; end Version_Group_Read; package API_Version_Group_Read is new Swagger.Servers.Operation (Handler => Version_Group_Read, Method => Swagger.Servers.GET, URI => URI_Prefix & "/api/v2/version-group/{id}/"); procedure Register (Server : in out Swagger.Servers.Application_Type'Class) is begin Swagger.Servers.Register (Server, API_Ability_List.Definition); Swagger.Servers.Register (Server, API_Ability_Read.Definition); Swagger.Servers.Register (Server, API_Berry_List.Definition); Swagger.Servers.Register (Server, API_Berry_Read.Definition); Swagger.Servers.Register (Server, API_Berry_Firmness_List.Definition); Swagger.Servers.Register (Server, API_Berry_Firmness_Read.Definition); Swagger.Servers.Register (Server, API_Berry_Flavor_List.Definition); Swagger.Servers.Register (Server, API_Berry_Flavor_Read.Definition); Swagger.Servers.Register (Server, API_Characteristic_List.Definition); Swagger.Servers.Register (Server, API_Characteristic_Read.Definition); Swagger.Servers.Register (Server, API_Contest_Effect_List.Definition); Swagger.Servers.Register (Server, API_Contest_Effect_Read.Definition); Swagger.Servers.Register (Server, API_Contest_Type_List.Definition); Swagger.Servers.Register (Server, API_Contest_Type_Read.Definition); Swagger.Servers.Register (Server, API_Egg_Group_List.Definition); Swagger.Servers.Register (Server, API_Egg_Group_Read.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_List.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_Read.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_Value_List.Definition); Swagger.Servers.Register (Server, API_Encounter_Condition_Value_Read.Definition); Swagger.Servers.Register (Server, API_Encounter_Method_List.Definition); Swagger.Servers.Register (Server, API_Encounter_Method_Read.Definition); Swagger.Servers.Register (Server, API_Evolution_Chain_List.Definition); Swagger.Servers.Register (Server, API_Evolution_Chain_Read.Definition); Swagger.Servers.Register (Server, API_Evolution_Trigger_List.Definition); Swagger.Servers.Register (Server, API_Evolution_Trigger_Read.Definition); Swagger.Servers.Register (Server, API_Gender_List.Definition); Swagger.Servers.Register (Server, API_Gender_Read.Definition); Swagger.Servers.Register (Server, API_Generation_List.Definition); Swagger.Servers.Register (Server, API_Generation_Read.Definition); Swagger.Servers.Register (Server, API_Growth_Rate_List.Definition); Swagger.Servers.Register (Server, API_Growth_Rate_Read.Definition); Swagger.Servers.Register (Server, API_Item_List.Definition); Swagger.Servers.Register (Server, API_Item_Read.Definition); Swagger.Servers.Register (Server, API_Item_Attribute_List.Definition); Swagger.Servers.Register (Server, API_Item_Attribute_Read.Definition); Swagger.Servers.Register (Server, API_Item_Category_List.Definition); Swagger.Servers.Register (Server, API_Item_Category_Read.Definition); Swagger.Servers.Register (Server, API_Item_Fling_Effect_List.Definition); Swagger.Servers.Register (Server, API_Item_Fling_Effect_Read.Definition); Swagger.Servers.Register (Server, API_Item_Pocket_List.Definition); Swagger.Servers.Register (Server, API_Item_Pocket_Read.Definition); Swagger.Servers.Register (Server, API_Language_List.Definition); Swagger.Servers.Register (Server, API_Language_Read.Definition); Swagger.Servers.Register (Server, API_Location_List.Definition); Swagger.Servers.Register (Server, API_Location_Read.Definition); Swagger.Servers.Register (Server, API_Location_Area_List.Definition); Swagger.Servers.Register (Server, API_Location_Area_Read.Definition); Swagger.Servers.Register (Server, API_Machine_List.Definition); Swagger.Servers.Register (Server, API_Machine_Read.Definition); Swagger.Servers.Register (Server, API_Move_List.Definition); Swagger.Servers.Register (Server, API_Move_Read.Definition); Swagger.Servers.Register (Server, API_Move_Ailment_List.Definition); Swagger.Servers.Register (Server, API_Move_Ailment_Read.Definition); Swagger.Servers.Register (Server, API_Move_Battle_Style_List.Definition); Swagger.Servers.Register (Server, API_Move_Battle_Style_Read.Definition); Swagger.Servers.Register (Server, API_Move_Category_List.Definition); Swagger.Servers.Register (Server, API_Move_Category_Read.Definition); Swagger.Servers.Register (Server, API_Move_Damage_Class_List.Definition); Swagger.Servers.Register (Server, API_Move_Damage_Class_Read.Definition); Swagger.Servers.Register (Server, API_Move_Learn_Method_List.Definition); Swagger.Servers.Register (Server, API_Move_Learn_Method_Read.Definition); Swagger.Servers.Register (Server, API_Move_Target_List.Definition); Swagger.Servers.Register (Server, API_Move_Target_Read.Definition); Swagger.Servers.Register (Server, API_Nature_List.Definition); Swagger.Servers.Register (Server, API_Nature_Read.Definition); Swagger.Servers.Register (Server, API_Pal_Park_Area_List.Definition); Swagger.Servers.Register (Server, API_Pal_Park_Area_Read.Definition); Swagger.Servers.Register (Server, API_Pokeathlon_Stat_List.Definition); Swagger.Servers.Register (Server, API_Pokeathlon_Stat_Read.Definition); Swagger.Servers.Register (Server, API_Pokedex_List.Definition); Swagger.Servers.Register (Server, API_Pokedex_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Color_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Color_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Form_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Form_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Habitat_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Habitat_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Shape_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Shape_Read.Definition); Swagger.Servers.Register (Server, API_Pokemon_Species_List.Definition); Swagger.Servers.Register (Server, API_Pokemon_Species_Read.Definition); Swagger.Servers.Register (Server, API_Region_List.Definition); Swagger.Servers.Register (Server, API_Region_Read.Definition); Swagger.Servers.Register (Server, API_Stat_List.Definition); Swagger.Servers.Register (Server, API_Stat_Read.Definition); Swagger.Servers.Register (Server, API_Super_Contest_Effect_List.Definition); Swagger.Servers.Register (Server, API_Super_Contest_Effect_Read.Definition); Swagger.Servers.Register (Server, API_Type_List.Definition); Swagger.Servers.Register (Server, API_Type_Read.Definition); Swagger.Servers.Register (Server, API_Version_List.Definition); Swagger.Servers.Register (Server, API_Version_Read.Definition); Swagger.Servers.Register (Server, API_Version_Group_List.Definition); Swagger.Servers.Register (Server, API_Version_Group_Read.Definition); end Register; protected body Server is -- procedure Ability_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Ability_List (Limit, Offset, Result, Context); end Ability_List; -- procedure Ability_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Ability_Read (Id, Result, Context); end Ability_Read; -- procedure Berry_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Berry_List (Limit, Offset, Result, Context); end Berry_List; -- procedure Berry_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Berry_Read (Id, Result, Context); end Berry_Read; -- procedure Berry_Firmness_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Berry_Firmness_List (Limit, Offset, Result, Context); end Berry_Firmness_List; -- procedure Berry_Firmness_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Berry_Firmness_Read (Id, Result, Context); end Berry_Firmness_Read; -- procedure Berry_Flavor_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Berry_Flavor_List (Limit, Offset, Result, Context); end Berry_Flavor_List; -- procedure Berry_Flavor_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Berry_Flavor_Read (Id, Result, Context); end Berry_Flavor_Read; -- procedure Characteristic_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Characteristic_List (Limit, Offset, Result, Context); end Characteristic_List; -- procedure Characteristic_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Characteristic_Read (Id, Result, Context); end Characteristic_Read; -- procedure Contest_Effect_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Contest_Effect_List (Limit, Offset, Result, Context); end Contest_Effect_List; -- procedure Contest_Effect_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Contest_Effect_Read (Id, Result, Context); end Contest_Effect_Read; -- procedure Contest_Type_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Contest_Type_List (Limit, Offset, Result, Context); end Contest_Type_List; -- procedure Contest_Type_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Contest_Type_Read (Id, Result, Context); end Contest_Type_Read; -- procedure Egg_Group_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Egg_Group_List (Limit, Offset, Result, Context); end Egg_Group_List; -- procedure Egg_Group_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Egg_Group_Read (Id, Result, Context); end Egg_Group_Read; -- procedure Encounter_Condition_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Encounter_Condition_List (Limit, Offset, Result, Context); end Encounter_Condition_List; -- procedure Encounter_Condition_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Encounter_Condition_Read (Id, Result, Context); end Encounter_Condition_Read; -- procedure Encounter_Condition_Value_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Encounter_Condition_Value_List (Limit, Offset, Result, Context); end Encounter_Condition_Value_List; -- procedure Encounter_Condition_Value_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Encounter_Condition_Value_Read (Id, Result, Context); end Encounter_Condition_Value_Read; -- procedure Encounter_Method_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Encounter_Method_List (Limit, Offset, Result, Context); end Encounter_Method_List; -- procedure Encounter_Method_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Encounter_Method_Read (Id, Result, Context); end Encounter_Method_Read; -- procedure Evolution_Chain_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Evolution_Chain_List (Limit, Offset, Result, Context); end Evolution_Chain_List; -- procedure Evolution_Chain_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Evolution_Chain_Read (Id, Result, Context); end Evolution_Chain_Read; -- procedure Evolution_Trigger_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Evolution_Trigger_List (Limit, Offset, Result, Context); end Evolution_Trigger_List; -- procedure Evolution_Trigger_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Evolution_Trigger_Read (Id, Result, Context); end Evolution_Trigger_Read; -- procedure Gender_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Gender_List (Limit, Offset, Result, Context); end Gender_List; -- procedure Gender_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Gender_Read (Id, Result, Context); end Gender_Read; -- procedure Generation_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Generation_List (Limit, Offset, Result, Context); end Generation_List; -- procedure Generation_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Generation_Read (Id, Result, Context); end Generation_Read; -- procedure Growth_Rate_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Growth_Rate_List (Limit, Offset, Result, Context); end Growth_Rate_List; -- procedure Growth_Rate_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Growth_Rate_Read (Id, Result, Context); end Growth_Rate_Read; -- procedure Item_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_List (Limit, Offset, Result, Context); end Item_List; -- procedure Item_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Read (Id, Result, Context); end Item_Read; -- procedure Item_Attribute_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Attribute_List (Limit, Offset, Result, Context); end Item_Attribute_List; -- procedure Item_Attribute_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Attribute_Read (Id, Result, Context); end Item_Attribute_Read; -- procedure Item_Category_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Category_List (Limit, Offset, Result, Context); end Item_Category_List; -- procedure Item_Category_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Category_Read (Id, Result, Context); end Item_Category_Read; -- procedure Item_Fling_Effect_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Fling_Effect_List (Limit, Offset, Result, Context); end Item_Fling_Effect_List; -- procedure Item_Fling_Effect_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Fling_Effect_Read (Id, Result, Context); end Item_Fling_Effect_Read; -- procedure Item_Pocket_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Pocket_List (Limit, Offset, Result, Context); end Item_Pocket_List; -- procedure Item_Pocket_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Item_Pocket_Read (Id, Result, Context); end Item_Pocket_Read; -- procedure Language_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Language_List (Limit, Offset, Result, Context); end Language_List; -- procedure Language_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Language_Read (Id, Result, Context); end Language_Read; -- procedure Location_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Location_List (Limit, Offset, Result, Context); end Location_List; -- procedure Location_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Location_Read (Id, Result, Context); end Location_Read; -- procedure Location_Area_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Location_Area_List (Limit, Offset, Result, Context); end Location_Area_List; -- procedure Location_Area_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Location_Area_Read (Id, Result, Context); end Location_Area_Read; -- procedure Machine_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Machine_List (Limit, Offset, Result, Context); end Machine_List; -- procedure Machine_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Machine_Read (Id, Result, Context); end Machine_Read; -- procedure Move_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_List (Limit, Offset, Result, Context); end Move_List; -- procedure Move_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Read (Id, Result, Context); end Move_Read; -- procedure Move_Ailment_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Ailment_List (Limit, Offset, Result, Context); end Move_Ailment_List; -- procedure Move_Ailment_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Ailment_Read (Id, Result, Context); end Move_Ailment_Read; -- procedure Move_Battle_Style_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Battle_Style_List (Limit, Offset, Result, Context); end Move_Battle_Style_List; -- procedure Move_Battle_Style_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Battle_Style_Read (Id, Result, Context); end Move_Battle_Style_Read; -- procedure Move_Category_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Category_List (Limit, Offset, Result, Context); end Move_Category_List; -- procedure Move_Category_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Category_Read (Id, Result, Context); end Move_Category_Read; -- procedure Move_Damage_Class_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Damage_Class_List (Limit, Offset, Result, Context); end Move_Damage_Class_List; -- procedure Move_Damage_Class_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Damage_Class_Read (Id, Result, Context); end Move_Damage_Class_Read; -- procedure Move_Learn_Method_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Learn_Method_List (Limit, Offset, Result, Context); end Move_Learn_Method_List; -- procedure Move_Learn_Method_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Learn_Method_Read (Id, Result, Context); end Move_Learn_Method_Read; -- procedure Move_Target_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Target_List (Limit, Offset, Result, Context); end Move_Target_List; -- procedure Move_Target_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Move_Target_Read (Id, Result, Context); end Move_Target_Read; -- procedure Nature_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Nature_List (Limit, Offset, Result, Context); end Nature_List; -- procedure Nature_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Nature_Read (Id, Result, Context); end Nature_Read; -- procedure Pal_Park_Area_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pal_Park_Area_List (Limit, Offset, Result, Context); end Pal_Park_Area_List; -- procedure Pal_Park_Area_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pal_Park_Area_Read (Id, Result, Context); end Pal_Park_Area_Read; -- procedure Pokeathlon_Stat_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokeathlon_Stat_List (Limit, Offset, Result, Context); end Pokeathlon_Stat_List; -- procedure Pokeathlon_Stat_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokeathlon_Stat_Read (Id, Result, Context); end Pokeathlon_Stat_Read; -- procedure Pokedex_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokedex_List (Limit, Offset, Result, Context); end Pokedex_List; -- procedure Pokedex_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokedex_Read (Id, Result, Context); end Pokedex_Read; -- procedure Pokemon_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_List (Limit, Offset, Result, Context); end Pokemon_List; -- procedure Pokemon_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Read (Id, Result, Context); end Pokemon_Read; -- procedure Pokemon_Color_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Color_List (Limit, Offset, Result, Context); end Pokemon_Color_List; -- procedure Pokemon_Color_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Color_Read (Id, Result, Context); end Pokemon_Color_Read; -- procedure Pokemon_Form_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Form_List (Limit, Offset, Result, Context); end Pokemon_Form_List; -- procedure Pokemon_Form_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Form_Read (Id, Result, Context); end Pokemon_Form_Read; -- procedure Pokemon_Habitat_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Habitat_List (Limit, Offset, Result, Context); end Pokemon_Habitat_List; -- procedure Pokemon_Habitat_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Habitat_Read (Id, Result, Context); end Pokemon_Habitat_Read; -- procedure Pokemon_Shape_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Shape_List (Limit, Offset, Result, Context); end Pokemon_Shape_List; -- procedure Pokemon_Shape_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Shape_Read (Id, Result, Context); end Pokemon_Shape_Read; -- procedure Pokemon_Species_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Species_List (Limit, Offset, Result, Context); end Pokemon_Species_List; -- procedure Pokemon_Species_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Pokemon_Species_Read (Id, Result, Context); end Pokemon_Species_Read; -- procedure Region_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Region_List (Limit, Offset, Result, Context); end Region_List; -- procedure Region_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Region_Read (Id, Result, Context); end Region_Read; -- procedure Stat_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Stat_List (Limit, Offset, Result, Context); end Stat_List; -- procedure Stat_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Stat_Read (Id, Result, Context); end Stat_Read; -- procedure Super_Contest_Effect_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Super_Contest_Effect_List (Limit, Offset, Result, Context); end Super_Contest_Effect_List; -- procedure Super_Contest_Effect_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Super_Contest_Effect_Read (Id, Result, Context); end Super_Contest_Effect_Read; -- procedure Type_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Type_List (Limit, Offset, Result, Context); end Type_List; -- procedure Type_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Type_Read (Id, Result, Context); end Type_Read; -- procedure Version_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Version_List (Limit, Offset, Result, Context); end Version_List; -- procedure Version_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Version_Read (Id, Result, Context); end Version_Read; -- procedure Version_Group_List (Limit : in Swagger.Nullable_Integer; Offset : in Swagger.Nullable_Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Version_Group_List (Limit, Offset, Result, Context); end Version_Group_List; -- procedure Version_Group_Read (Id : in Integer; Result : out Swagger.UString; Context : in out Swagger.Servers.Context_Type) is begin Impl.Version_Group_Read (Id, Result, Context); end Version_Group_Read; end Server; end Shared_Instance; end .Skeletons;
data/tilesets/kanto_collision.asm
Trap-Master/spacworld97-thingy
0
160516
<reponame>Trap-Master/spacworld97-thingy tilecoll FLOOR, FLOOR, WALL, FLOOR ; 00 tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 01 tilecoll WALL, WALL, WALL, DOOR ; 02 tilecoll WALL, WALL, WALL, WALL ; 03 tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 04 tilecoll LADDER, LADDER, LADDER, LADDER ; 05 tilecoll FLOOR, FLOOR, CAVE, WALL ; 06 tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 07 tilecoll WALL, FLOOR, FLOOR, FLOOR ; 08 tilecoll WALL, WALL, WALL, WALL ; 09 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 0b tilecoll WALL, WALL, WALL, WALL ; 0c tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 0d tilecoll WALL, WALL, WALL, WALL ; 0e tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 0f tilecoll WALL, WALL, WALL, WALL ; 10 tilecoll WALL, WALL, WALL, WALL ; 11 tilecoll WALL, WALL, DOOR, WALL ; 12 tilecoll WALL, WALL, WALL, WALL ; 13 tilecoll WALL, WATER, WALL, WALL ; 14 tilecoll WATER, WALL, WALL, WALL ; 15 tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 16 tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 17 tilecoll WALL, WATER, WALL, WATER ; 18 tilecoll WATER, WALL, WATER, WALL ; 19 tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1a tilecoll FLOOR, WALL, WALL, WALL ; 1b tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 1c tilecoll WATER, WATER, WATER, WATER ; 1d tilecoll WATER, WATER, WATER, WATER ; 1e tilecoll WATER, WATER, WATER, WATER ; 1f tilecoll FLOOR, FLOOR, WALL, WALL ; 20 tilecoll FLOOR, WALL, FLOOR, WALL ; 21 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 tilecoll WALL, FLOOR, WALL, WALL ; 24 tilecoll FLOOR, WALL, WALL, WALL ; 25 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 tilecoll WALL, FLOOR, WALL, FLOOR ; 28 tilecoll FLOOR, WALL, FLOOR, WALL ; 29 tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2a tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2b tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c tilecoll WALL, WALL, WALL, WALL ; 2d tilecoll WALL, WALL, WALL, WALL ; 2e tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 2f tilecoll WALL, WALL, WALL, WALL ; 30 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 tilecoll HEADBUTT_TREE, CUT_TREE, HEADBUTT_TREE, FLOOR ; 32 tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, CUT_TREE ; 33 tilecoll CUT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 34 tilecoll FLOOR, CUT_TREE, HEADBUTT_TREE, FLOOR ; 35 tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 36 tilecoll WALL, WALL, WALL, WALL ; 37 tilecoll WALL, WALL, WALL, WALL ; 38 tilecoll WALL, WALL, WALL, WALL ; 39 tilecoll WALL, WALL, DOOR, WALL ; 3a tilecoll UP_WALL, WALL, FLOOR, WALL ; 3b tilecoll WALL, DOOR, FLOOR, FLOOR ; 3c tilecoll WALL, WALL, FLOOR, FLOOR ; 3d tilecoll WALL, UP_WALL, WALL, FLOOR ; 3e tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 3f tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 40 tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 41 tilecoll WALL, WALL, WALL, WALL ; 42 tilecoll WATER, WATER, WATER, WATER ; 43 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 44 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 45 tilecoll WALL, FLOOR, WALL, CUT_TREE ; 46 tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 47 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 48 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 49 tilecoll WALL, WALL, FLOOR, FLOOR ; 4a tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 4b tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 4c tilecoll FLOOR, WALL, FLOOR, WALL ; 4d tilecoll WALL, FLOOR, WALL, FLOOR ; 4e tilecoll FLOOR, WALL, WALL, WALL ; 4f tilecoll WALL, FLOOR, WALL, WALL ; 50 tilecoll WALL, WALL, FLOOR, FLOOR ; 51 tilecoll FLOOR, FLOOR, WALL, WALL ; 52 tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 53 tilecoll WATER, WATER, WATER, WATER ; 54 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 55 tilecoll FLOOR, FLOOR, WALL, WALL ; 56 tilecoll FLOOR, FLOOR, WALL, WALL ; 57 tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 58 tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 59 tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 5a tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 5b tilecoll FLOOR, HOP_DOWN, FLOOR, WALL ; 5c tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5d tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5e tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 5f tilecoll FLOOR, HEADBUTT_TREE, CUT_TREE, HEADBUTT_TREE ; 60 tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 61 tilecoll WALL, WALL, WALL, FLOOR ; 62 tilecoll WALL, WALL, FLOOR, WALL ; 63 tilecoll WALL, WALL, WALL, WALL ; 64 tilecoll WALL, WALL, DOOR, WALL ; 65 tilecoll WALL, WALL, WALL, WALL ; 66 tilecoll WATER, WATER, WATER, WATER ; 67 tilecoll WALL, WALL, WALL, WALL ; 68 tilecoll WALL, WALL, WALL, WALL ; 69 tilecoll WATER, WALL, WATER, WALL ; 6a tilecoll WATER, WATER, WALL, WALL ; 6b tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 6c tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 6d tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 6e tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 6f tilecoll FLOOR, WALL, CAVE, WALL ; 70 tilecoll WALL, WALL, WALL, WALL ; 71 tilecoll WALL, WALL, WALL, WALL ; 72 tilecoll WALL, WALL, WALL, WALL ; 73 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 74 tilecoll WALL, WALL, WALL, DOOR ; 75 tilecoll WALL, WALL, WALL, WALL ; 76 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 77 tilecoll WATER, WATER, WATER, WATER ; 78 tilecoll FLOOR, FLOOR, FLOOR, WALL ; 79 tilecoll WALL, WALL, WALL, WALL ; 7a tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7b tilecoll WALL, WALL, WALL, DOOR ; 7c tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 7d tilecoll WALL, WALL, WALL, WALL ; 7e tilecoll WALL, WALL, FLOOR, FLOOR ; 7f tilecoll WALL, WALL, WALL, WALL ; 80 tilecoll WALL, WALL, WALL, WALL ; 81 tilecoll WALL, WALL, WALL, WALL ; 82 tilecoll FLOOR, FLOOR, WALL, WALL ; 83 tilecoll WALL, WALL, WALL, WALL ; 84 tilecoll WALL, WALL, WALL, WALL ; 85 tilecoll WALL, WALL, WALL, WALL ; 86 tilecoll WALL, WALL, WALL, WALL ; 87 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 88 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 89 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 8a tilecoll WALL, WALL, WALL, WALL ; 8b tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 8c tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 8d tilecoll WALL, WALL, WALL, DOOR ; 8e tilecoll WALL, WALL, WALL, WALL ; 8f tilecoll WALL, WALL, WALL, WALL ; 90 tilecoll WALL, WALL, WALL, WALL ; 91 tilecoll WALL, WALL, WALL, WALL ; 92 tilecoll WALL, WALL, WALL, WALL ; 93 tilecoll WALL, WALL, DOOR, WALL ; 94 tilecoll WALL, WALL, WALL, WALL ; 95 tilecoll WALL, WALL, WALL, WALL ; 96 tilecoll WALL, WALL, WALL, WALL ; 97 tilecoll WALL, WALL, WALL, WALL ; 98 tilecoll WALL, WALL, WALL, WALL ; 99 tilecoll WALL, WALL, WALL, WALL ; 9a tilecoll WALL, WALL, WALL, WALL ; 9b tilecoll WALL, WALL, WALL, WALL ; 9c tilecoll WALL, WALL, WALL, WALL ; 9d tilecoll WALL, WALL, WALL, WALL ; 9e tilecoll WALL, WALL, WALL, WALL ; 9f tilecoll WALL, WALL, WALL, WALL ; a0 tilecoll WALL, WALL, WALL, WALL ; a1 tilecoll WALL, WALL, WALL, WALL ; a2 tilecoll WALL, WALL, WALL, WALL ; a3 tilecoll WALL, WALL, WALL, WALL ; a4 tilecoll WALL, FLOOR, FLOOR, FLOOR ; a5 tilecoll WALL, WALL, WALL, WALL ; a6 tilecoll WALL, WALL, WALL, WALL ; a7 tilecoll WALL, WALL, WALL, WALL ; a8 tilecoll FLOOR, WALL, FLOOR, WALL ; a9 tilecoll WALL, WALL, WALL, DOOR ; aa tilecoll WALL, WALL, WALL, WALL ; ab tilecoll WALL, WALL, WALL, WALL ; ac tilecoll WALL, WALL, WALL, WALL ; ad tilecoll WALL, WALL, WALL, WALL ; ae tilecoll WALL, WALL, WALL, WALL ; af tilecoll WALL, WALL, WALL, WALL ; b0 tilecoll WALL, WALL, WALL, WALL ; b1 tilecoll WALL, WALL, WALL, WALL ; b2 tilecoll WALL, WALL, WALL, WALL ; b3 tilecoll WALL, WALL, WALL, DOOR ; b4 tilecoll WALL, WALL, DOOR, WALL ; b5 tilecoll WALL, WALL, WALL, WALL ; b6 tilecoll WALL, WALL, WALL, WALL ; b7 tilecoll WALL, WALL, WALL, WALL ; b8 tilecoll WALL, WALL, WALL, WALL ; b9 tilecoll WALL, WALL, WALL, WALL ; ba tilecoll WALL, WALL, WALL, WALL ; bb tilecoll WALL, WALL, WALL, WALL ; bc tilecoll WALL, WALL, WALL, WALL ; bd tilecoll WALL, WALL, WALL, WALL ; be tilecoll WALL, WALL, DOOR, DOOR ; bf tilecoll WALL, WALL, WALL, WALL ; c0 tilecoll WATERFALL, WATERFALL, WATERFALL, WATERFALL ; c1 tilecoll WALL, WALL, WALL, WALL ; c2 tilecoll WALL, WALL, WALL, WALL ; c3 tilecoll WALL, WALL, WALL, WALL ; c4 tilecoll WALL, WALL, WALL, WALL ; c5 tilecoll WALL, WALL, WALL, WALL ; c6 tilecoll WALL, WALL, WALL, WALL ; c7 tilecoll WALL, WALL, WALL, WALL ; c8 tilecoll WALL, WALL, WALL, WALL ; c9 tilecoll WALL, WALL, WALL, WALL ; ca tilecoll WALL, WALL, WALL, WALL ; cb tilecoll WALL, WALL, WALL, WALL ; cc tilecoll WALL, WALL, WALL, WALL ; cd tilecoll WALL, WALL, WALL, WALL ; ce tilecoll WALL, WALL, WALL, DOOR ; cf tilecoll WALL, WALL, WALL, WALL ; d0 tilecoll WALL, WALL, WALL, WALL ; d1 tilecoll WALL, WALL, WALL, WALL ; d2 tilecoll WALL, WALL, WALL, WALL ; d3 tilecoll WALL, WALL, WALL, WALL ; d4 tilecoll WALL, WALL, DOOR, DOOR ; d5 tilecoll WALL, WALL, WALL, WALL ; d6 tilecoll WALL, WALL, WALL, WALL ; d7 tilecoll WALL, WALL, WALL, WALL ; d8 tilecoll WALL, WALL, WALL, WALL ; d9 tilecoll WALL, WALL, WALL, WALL ; da tilecoll WALL, WALL, WALL, WALL ; db tilecoll WALL, WALL, WALL, WALL ; dc tilecoll WALL, WALL, WALL, WALL ; dd tilecoll WALL, WALL, WALL, WALL ; de tilecoll WALL, WALL, WALL, WALL ; df tilecoll WALL, WALL, WALL, WALL ; e0 tilecoll WALL, WALL, WALL, WALL ; e1 tilecoll WALL, WALL, WALL, WALL ; e2 tilecoll WALL, WALL, WALL, WALL ; e3 tilecoll FLOOR, WALL, FLOOR, WALL ; e4 tilecoll WALL, WALL, WALL, WALL ; e5 tilecoll WALL, WALL, WALL, WALL ; e6 tilecoll WALL, WALL, WALL, WALL ; e7 tilecoll FLOOR, WALL, FLOOR, WALL ; e8 tilecoll WALL, WALL, WALL, WALL ; e9 tilecoll WALL, WALL, WALL, DOOR ; ea tilecoll WALL, WALL, WALL, WALL ; eb tilecoll WALL, WALL, WALL, WALL ; ec tilecoll WALL, WALL, WALL, WALL ; ed tilecoll WALL, WALL, WALL, WALL ; ee tilecoll WALL, WALL, WALL, WALL ; ef tilecoll FLOOR, FLOOR, WALL, WALL ; f0 tilecoll FLOOR, WALL, FLOOR, FLOOR ; f1 tilecoll WALL, DOOR, FLOOR, FLOOR ; f2 tilecoll WALL, WALL, FLOOR, FLOOR ; f3 tilecoll WALL, WALL, WALL, WALL ; f4 tilecoll WALL, WALL, DOOR, WALL ; f5 tilecoll WALL, WALL, WALL, WALL ; f6 tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; f7 tilecoll WALL, WALL, WALL, WALL ; f8 tilecoll WALL, WALL, WALL, WALL ; f9 tilecoll WALL, WALL, WALL, WALL ; fa tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; fb tilecoll WALL, WALL, WALL, WALL ; fc tilecoll WALL, WALL, WALL, WALL ; fd tilecoll WATER, WATER, WATER, WATER ; fe tilecoll WATER, WATER, WATER, WATER ; ff
x86-64/programs/arguments.asm
ShineyDev/assembly
1
171090
; --------------------------------------------------------------------- ; /x86-64/programs/arguments.asm ; ; An x86-64 assembly which writes argc and argv to STDOUT. ; ; Requires: ; write ; --------------------------------------------------------------------- global _start extern write extern write_cstring extern write_integer section .text _start: mov r12, [rsp] ; argc mov rdi, 1 mov rsi, r12 call write_integer mov rdi, 1 mov rsi, lf_ mov rdx, 1 call write xor r13, r13 _start_argv_loop: inc r13 mov rdi, 1 mov rsi, [rsp+8*r13] ; argv[0..] call write_cstring mov rdi, 1 mov rsi, lf_ mov rdx, 1 call write cmp r13, r12 jne _start_argv_loop mov rax, 60 mov rdi, 0 syscall section .data lf_: db 0x0A
Library/Chart/CObject/cobjectNotify.asm
steakknife/pcgeos
504
103781
<reponame>steakknife/pcgeos COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: cobjectNotify.asm AUTHOR: <NAME> ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 5/28/92 Initial version. DESCRIPTION: $Id: cobjectNotify.asm,v 1.1 97/04/04 17:46:28 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ChartObjectNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Deal with notification from the GrObj. Convert an etype to a message. PASS: *ds:si = ChartObjectClass object ds:di = ChartObjectClass instance data es = Segment of ChartObjectClass. bp = GrObjActionNotificationType RETURN: nothing DESTROYED: ax,cx,dx,bp REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/21/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ChartObjectNotify method dynamic ChartObjectClass, MSG_GROBJ_ACTION_NOTIFICATION .enter ; convert action type to a message, and call. shl bp, 1 mov ax, cs:NotifyTable[bp] tst ax jz done call ObjCallInstanceNoLock done: .leave ret ChartObjectNotify endm NotifyTable word \ 0, ; NULL MSG_CHART_OBJECT_GROBJ_SELECTED, ; GOANT_SELECTED MSG_CHART_OBJECT_GROBJ_UNSELECTED, ; GOANT_UNSELECTED 0, ; GOANT_CREATED MSG_CHART_OBJECT_GROBJ_MOVED, ; GOANT_MOVED MSG_CHART_OBJECT_GROBJ_RESIZED, ; GOANT_RESIZED 0, ; GOANT_ROTATED 0, ; GOANT_SKEWED 0, ; GOANT_TRANSFORMED MSG_CHART_OBJECT_GROBJ_ATTRED, ; GOANT_ATTRED 0, ; GOANT_SPEC_MODIFIED 0, ; GOANT_PASTED MSG_CHART_OBJECT_GROBJ_DELETED, ; GOANT_DELETED 0, ; GOANT_WRAP_CHANGED 0, ; GOANT_UNDO_GEOMETRY 0, ; GOANT_UNDO_DELETE 0, ; GOANT_REDO_DELETE 0, ; GOANT_PRE_MOVE 0, ; GOANT_PRE_RESIZE 0, ; GOANT_PRE_ROTATE 0, ; GOANT_PRE_SKEW 0, ; GOANT_PRE_TRANSFORM 0, ; GOANT_PRE_SPEC_MODIFY 0, ; GOANT_QUERY_DELETE 0 ; GOANT_PRE_WRAP_CHANGE .assert (length NotifyTable eq GrObjActionNotificationType) COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ChartObjectGrObjSelected %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: deal with the fact that a grobj was selected PASS: *ds:si = ChartObjectClass object ds:di = ChartObjectClass instance data es = Segment of ChartObjectClass. RETURN: nothing DESTROYED: ax REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: It's possible that multiple objects will tell this grobj KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/21/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ChartObjectGrObjSelected method dynamic ChartObjectClass, MSG_CHART_OBJECT_GROBJ_SELECTED call ObjIncInteractibleCount inc ds:[di].COI_selection EC < ERROR_Z INVALID_SELECTION_COUNT > FALL_THRU SelectedCommon ChartObjectGrObjSelected endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SelectedCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Common routine to handle gained/lost selection CALLED BY: PASS: ax - message *ds:si - object RETURN: nothing DESTROYED: si PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 6/ 4/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SelectedCommon proc far .enter ; ; send message to ChartGroup, unless this IS the chart ; group! cmp si, offset TemplateChartGroup je done mov si, offset TemplateChartGroup call ObjCallInstanceNoLock done: .leave ret SelectedCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ChartObjectGrObjUnselected %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Handle notification that one of the objects under this object's control has lost the selection PASS: *ds:si = ChartObjectClass object ds:di = ChartObjectClass instance data es = Segment of ChartObjectClass. RETURN: DESTROYED: ax REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/21/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ChartObjectGrObjUnselected method dynamic ChartObjectClass, MSG_CHART_OBJECT_GROBJ_UNSELECTED call ObjDecInteractibleCount dec ds:[di].COI_selection EC < ERROR_S INVALID_SELECTION_COUNT > GOTO SelectedCommon ChartObjectGrObjUnselected endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ChartObjectGrObjResized %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Handle notification that a GrObj has been resized. PASS: *ds:si = ChartObjectClass object ds:di = ChartObjectClass instance data es = Segment of ChartObjectClass. ^lcx:dx = od of grobj RETURN: nothing DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: Get the size of the grobject, and update our own instance data. Mark geometry invalid so stuff gets updated. KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/10/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ChartObjectGrObjResized method dynamic ChartObjectClass, MSG_CHART_OBJECT_GROBJ_RESIZED uses ax,cx,dx,bp .enter push cx, dx mov ax, MSG_META_SUSPEND call UtilCallChartBody pop cx, dx ; ; GrObj has moved, most likely: ; mov ax, MSG_CHART_OBJECT_GROBJ_MOVED call ObjCallInstanceNoLock ; ; Get the GrObj's new size -- use the PARENT bounds because ; the object itself might be rotated. ; sub sp, size RectDWord mov bp, sp push si movOD bxsi, cxdx mov ax, MSG_GO_GET_DW_PARENT_BOUNDS mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop si DerefChartObject ds, si, di ; Get width movdw bxax, ss:[bp].RD_right subdw bxax, ss:[bp].RD_left abs ax mov cx, ax xchg ax, ds:[di].COI_size.P_x sub cx, ax ; difference in X movdw bxax, ss:[bp].RD_bottom subdw bxax, ss:[bp].RD_top abs ax mov dx, ax xchg ax, ds:[di].COI_size.P_y sub dx, ax add sp, size RectDWord tst dx jnz recalc jcxz done recalc: mov ax, MSG_CHART_OBJECT_RECALC_SIZE call UtilCallChartGroup done: mov ax, MSG_META_UNSUSPEND call UtilCallChartBody .leave ret ChartObjectGrObjResized endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ChartObjectGrObjAttred %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Handle an attr-change PASS: *ds:si - ChartObjectClass object ds:di - ChartObjectClass instance data es - segment of ChartObjectClass RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 1/19/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ChartObjectGrObjAttred method dynamic ChartObjectClass, MSG_CHART_OBJECT_GROBJ_ATTRED .enter ; ; Suspend the body and unsuspend it via the queue, in case ; multiple objects are having their attributes changed. ; push cx, dx mov ax, MSG_META_SUSPEND call UtilCallChartBody pop cx, dx mov ax, MSG_META_UNSUSPEND call UtilCallChartBodyForceQueue ; ; If it's a text object, mark our image invalid ; push si movOD bxsi, cxdx mov cx, segment TextGuardianClass mov dx, offset TextGuardianClass mov ax, MSG_META_IS_OBJECT_IN_CLASS mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop si jnc done mov ax, MSG_CHART_OBJECT_MARK_INVALID mov cl, mask COS_IMAGE_INVALID or mask COS_GEOMETRY_INVALID call ObjCallInstanceNoLock done: .leave ret ChartObjectGrObjAttred endm
oeis/076/A076562.asm
neoneye/loda-programs
11
172348
; A076562: a(1)=3; a(n>1)= greatest prime divisor of a(n-1) + n. ; Submitted by <NAME> ; 3,5,2,3,2,2,3,11,5,5,2,7,5,19,17,11,7,5,3,23,11,11,17,41,11,37,2,5,17,47,13,5,19,53,11,47,7,5,11,17,29,71,19,7,13,59,53,101,5,11,31,83,17,71,7,7,2,5,2,31,23,17,5,23,11,11,13,3,3,73,3,5,13,29,13,89,83,23,17,97,89,19,17,101,31,13,5,31,5,19,11,103,7,101,7,103,5,103,101,67 mov $5,$0 mov $6,$0 add $6,3 lpb $6 mov $0,$5 add $0,$2 mov $2,2 sub $6,1 sub $0,$6 add $0,1 lpb $0 mov $3,$0 lpb $3 mov $4,$0 mod $4,$2 add $2,1 cmp $4,0 cmp $4,0 sub $3,$4 lpe lpb $0 dif $0,$2 lpe lpe lpe mov $0,$2
out/Sub/Equality.agda
JoeyEremondi/agda-soas
39
5397
{- This second-order equational theory was created from the following second-order syntax description: syntax Sub | S type L : 0-ary T : 0-ary term vr : L -> T sb : L.T T -> T theory (C) x y : T |> sb (a. x[], y[]) = x[] (L) x : T |> sb (a. vr(a), x[]) = x[] (R) a : L x : L.T |> sb (b. x[b], vr(a[])) = x[a[]] (A) x : (L,L).T y : L.T z : T |> sb (a. sb (b. x[a,b], y[a]), z[]) = sb (b. sb (a. x[a, b], z[]), sb (a. y[a], z[])) -} module Sub.Equality where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Families.Build open import SOAS.ContextMaps.Inductive open import Sub.Signature open import Sub.Syntax open import SOAS.Metatheory.SecondOrder.Metasubstitution S:Syn open import SOAS.Metatheory.SecondOrder.Equality S:Syn private variable α β γ τ : ST Γ Δ Π : Ctx infix 1 _▹_⊢_≋ₐ_ -- Axioms of equality data _▹_⊢_≋ₐ_ : ∀ 𝔐 Γ {α} → (𝔐 ▷ S) α Γ → (𝔐 ▷ S) α Γ → Set where C : ⁅ T ⁆ ⁅ T ⁆̣ ▹ ∅ ⊢ sb 𝔞 𝔟 ≋ₐ 𝔞 L : ⁅ T ⁆̣ ▹ ∅ ⊢ sb (vr x₀) 𝔞 ≋ₐ 𝔞 R : ⁅ L ⁆ ⁅ L ⊩ T ⁆̣ ▹ ∅ ⊢ sb (𝔟⟨ x₀ ⟩) (vr 𝔞) ≋ₐ 𝔟⟨ 𝔞 ⟩ A : ⁅ L · L ⊩ T ⁆ ⁅ L ⊩ T ⁆ ⁅ T ⁆̣ ▹ ∅ ⊢ sb (sb (𝔞⟨ x₁ ◂ x₀ ⟩) (𝔟⟨ x₀ ⟩)) 𝔠 ≋ₐ sb (sb (𝔞⟨ x₀ ◂ x₁ ⟩) 𝔠) (sb (𝔟⟨ x₀ ⟩) 𝔠) open EqLogic _▹_⊢_≋ₐ_ open ≋-Reasoning
samples/exec_file.asm
skwirl42/robco-processor
0
14787
.struct exec_header total_length 2 segment_count 2 exec_start_address 2 .endstruct .struct exec_segment_header location 2 length 2 is_exec 1 .endstruct
wof/lcs/enemy/C7.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
25646
copyright zengfr site:http://github.com/zengfr/romhack 0016A8 tst.b ($c7,A1) [enemy+88] 0016AC bmi $16b2 [enemy+C7] 0016DE tst.b ($c7,A1) [enemy+82] 0016E2 bmi $1700 [enemy+C7] 003DFA move.b #$1, ($ac,A0) [enemy+C7] 0045C8 cmpi.b #$1, D6 [enemy+C7] 0045DA bra $45f4 [enemy+C7] 0045E8 bra $45f4 [enemy+C7] 0045F4 btst D6, (-$1c59,A5) [enemy+C7] 004A6C bmi $4a76 [enemy+C7] 008114 bmi $812c [enemy+C7] 0082B2 bmi $82c0 [enemy+C7] 047112 move.b #$1, ($ac,A0) [enemy+C7] 0494CE move.b #$1, ($ac,A0) [enemy+C7] 049984 move.b #$1, ($ac,A0) [enemy+C7] copyright zengfr site:http://github.com/zengfr/romhack
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-ngrear.adb
djamal2727/Main-Bearing-Analytical-Model
0
3631
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ADA.NUMERICS.GENERIC_REAL_ARRAYS -- -- -- -- B o d y -- -- -- -- Copyright (C) 2006-2020, 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. -- -- -- ------------------------------------------------------------------------------ -- This version of Generic_Real_Arrays avoids the use of BLAS and LAPACK. One -- reason for this is new Ada 2012 requirements that prohibit algorithms such -- as Strassen's algorithm, which may be used by some BLAS implementations. In -- addition, some platforms lacked suitable compilers to compile the reference -- BLAS/LAPACK implementation. Finally, on some platforms there are more -- floating point types than supported by BLAS/LAPACK. with Ada.Containers.Generic_Anonymous_Array_Sort; use Ada.Containers; with System; use System; with System.Generic_Array_Operations; use System.Generic_Array_Operations; package body Ada.Numerics.Generic_Real_Arrays is package Ops renames System.Generic_Array_Operations; function Is_Non_Zero (X : Real'Base) return Boolean is (X /= 0.0); procedure Back_Substitute is new Ops.Back_Substitute (Scalar => Real'Base, Matrix => Real_Matrix, Is_Non_Zero => Is_Non_Zero); function Diagonal is new Ops.Diagonal (Scalar => Real'Base, Vector => Real_Vector, Matrix => Real_Matrix); procedure Forward_Eliminate is new Ops.Forward_Eliminate (Scalar => Real'Base, Real => Real'Base, Matrix => Real_Matrix, Zero => 0.0, One => 1.0); procedure Swap_Column is new Ops.Swap_Column (Scalar => Real'Base, Matrix => Real_Matrix); procedure Transpose is new Ops.Transpose (Scalar => Real'Base, Matrix => Real_Matrix); function Is_Symmetric (A : Real_Matrix) return Boolean is (Transpose (A) = A); -- Return True iff A is symmetric, see RM G.3.1 (90). function Is_Tiny (Value, Compared_To : Real) return Boolean is (abs Compared_To + 100.0 * abs (Value) = abs Compared_To); -- Return True iff the Value is much smaller in magnitude than the least -- significant digit of Compared_To. procedure Jacobi (A : Real_Matrix; Values : out Real_Vector; Vectors : out Real_Matrix; Compute_Vectors : Boolean := True); -- Perform Jacobi's eigensystem algorithm on real symmetric matrix A function Length is new Square_Matrix_Length (Real'Base, Real_Matrix); -- Helper function that raises a Constraint_Error is the argument is -- not a square matrix, and otherwise returns its length. procedure Rotate (X, Y : in out Real; Sin, Tau : Real); -- Perform a Givens rotation procedure Sort_Eigensystem (Values : in out Real_Vector; Vectors : in out Real_Matrix); -- Sort Values and associated Vectors by decreasing absolute value procedure Swap (Left, Right : in out Real); -- Exchange Left and Right function Sqrt is new Ops.Sqrt (Real); -- Instant a generic square root implementation here, in order to avoid -- instantiating a complete copy of Generic_Elementary_Functions. -- Speed of the square root is not a big concern here. ------------ -- Rotate -- ------------ procedure Rotate (X, Y : in out Real; Sin, Tau : Real) is Old_X : constant Real := X; Old_Y : constant Real := Y; begin X := Old_X - Sin * (Old_Y + Old_X * Tau); Y := Old_Y + Sin * (Old_X - Old_Y * Tau); end Rotate; ---------- -- Swap -- ---------- procedure Swap (Left, Right : in out Real) is Temp : constant Real := Left; begin Left := Right; Right := Temp; end Swap; -- Instantiating the following subprograms directly would lead to -- name clashes, so use a local package. package Instantiations is function "+" is new Vector_Elementwise_Operation (X_Scalar => Real'Base, Result_Scalar => Real'Base, X_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "+"); function "+" is new Matrix_Elementwise_Operation (X_Scalar => Real'Base, Result_Scalar => Real'Base, X_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "+"); function "+" is new Vector_Vector_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Right_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "+"); function "+" is new Matrix_Matrix_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Matrix => Real_Matrix, Right_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "+"); function "-" is new Vector_Elementwise_Operation (X_Scalar => Real'Base, Result_Scalar => Real'Base, X_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "-"); function "-" is new Matrix_Elementwise_Operation (X_Scalar => Real'Base, Result_Scalar => Real'Base, X_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "-"); function "-" is new Vector_Vector_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Right_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "-"); function "-" is new Matrix_Matrix_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Matrix => Real_Matrix, Right_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "-"); function "*" is new Scalar_Vector_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Right_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "*"); function "*" is new Scalar_Matrix_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Right_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "*"); function "*" is new Vector_Scalar_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "*"); function "*" is new Matrix_Scalar_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "*"); function "*" is new Outer_Product (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Right_Vector => Real_Vector, Matrix => Real_Matrix); function "*" is new Inner_Product (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Right_Vector => Real_Vector, Zero => 0.0); function "*" is new Matrix_Vector_Product (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Matrix => Real_Matrix, Right_Vector => Real_Vector, Result_Vector => Real_Vector, Zero => 0.0); function "*" is new Vector_Matrix_Product (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Matrix => Real_Matrix, Result_Vector => Real_Vector, Zero => 0.0); function "*" is new Matrix_Matrix_Product (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Matrix => Real_Matrix, Right_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Zero => 0.0); function "/" is new Vector_Scalar_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "/"); function "/" is new Matrix_Scalar_Elementwise_Operation (Left_Scalar => Real'Base, Right_Scalar => Real'Base, Result_Scalar => Real'Base, Left_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "/"); function "abs" is new L2_Norm (X_Scalar => Real'Base, Result_Real => Real'Base, X_Vector => Real_Vector, "abs" => "+"); -- While the L2_Norm by definition uses the absolute values of the -- elements of X_Vector, for real values the subsequent squaring -- makes this unnecessary, so we substitute the "+" identity function -- instead. function "abs" is new Vector_Elementwise_Operation (X_Scalar => Real'Base, Result_Scalar => Real'Base, X_Vector => Real_Vector, Result_Vector => Real_Vector, Operation => "abs"); function "abs" is new Matrix_Elementwise_Operation (X_Scalar => Real'Base, Result_Scalar => Real'Base, X_Matrix => Real_Matrix, Result_Matrix => Real_Matrix, Operation => "abs"); function Solve is new Matrix_Vector_Solution (Real'Base, 0.0, Real_Vector, Real_Matrix); function Solve is new Matrix_Matrix_Solution (Real'Base, 0.0, Real_Matrix); function Unit_Matrix is new Generic_Array_Operations.Unit_Matrix (Scalar => Real'Base, Matrix => Real_Matrix, Zero => 0.0, One => 1.0); function Unit_Vector is new Generic_Array_Operations.Unit_Vector (Scalar => Real'Base, Vector => Real_Vector, Zero => 0.0, One => 1.0); end Instantiations; --------- -- "+" -- --------- function "+" (Right : Real_Vector) return Real_Vector renames Instantiations."+"; function "+" (Right : Real_Matrix) return Real_Matrix renames Instantiations."+"; function "+" (Left, Right : Real_Vector) return Real_Vector renames Instantiations."+"; function "+" (Left, Right : Real_Matrix) return Real_Matrix renames Instantiations."+"; --------- -- "-" -- --------- function "-" (Right : Real_Vector) return Real_Vector renames Instantiations."-"; function "-" (Right : Real_Matrix) return Real_Matrix renames Instantiations."-"; function "-" (Left, Right : Real_Vector) return Real_Vector renames Instantiations."-"; function "-" (Left, Right : Real_Matrix) return Real_Matrix renames Instantiations."-"; --------- -- "*" -- --------- -- Scalar multiplication function "*" (Left : Real'Base; Right : Real_Vector) return Real_Vector renames Instantiations."*"; function "*" (Left : Real_Vector; Right : Real'Base) return Real_Vector renames Instantiations."*"; function "*" (Left : Real'Base; Right : Real_Matrix) return Real_Matrix renames Instantiations."*"; function "*" (Left : Real_Matrix; Right : Real'Base) return Real_Matrix renames Instantiations."*"; -- Vector multiplication function "*" (Left, Right : Real_Vector) return Real'Base renames Instantiations."*"; function "*" (Left, Right : Real_Vector) return Real_Matrix renames Instantiations."*"; function "*" (Left : Real_Vector; Right : Real_Matrix) return Real_Vector renames Instantiations."*"; function "*" (Left : Real_Matrix; Right : Real_Vector) return Real_Vector renames Instantiations."*"; -- Matrix Multiplication function "*" (Left, Right : Real_Matrix) return Real_Matrix renames Instantiations."*"; --------- -- "/" -- --------- function "/" (Left : Real_Vector; Right : Real'Base) return Real_Vector renames Instantiations."/"; function "/" (Left : Real_Matrix; Right : Real'Base) return Real_Matrix renames Instantiations."/"; ----------- -- "abs" -- ----------- function "abs" (Right : Real_Vector) return Real'Base renames Instantiations."abs"; function "abs" (Right : Real_Vector) return Real_Vector renames Instantiations."abs"; function "abs" (Right : Real_Matrix) return Real_Matrix renames Instantiations."abs"; ----------------- -- Determinant -- ----------------- function Determinant (A : Real_Matrix) return Real'Base is M : Real_Matrix := A; B : Real_Matrix (A'Range (1), 1 .. 0); R : Real'Base; begin Forward_Eliminate (M, B, R); return R; end Determinant; ----------------- -- Eigensystem -- ----------------- procedure Eigensystem (A : Real_Matrix; Values : out Real_Vector; Vectors : out Real_Matrix) is begin Jacobi (A, Values, Vectors, Compute_Vectors => True); Sort_Eigensystem (Values, Vectors); end Eigensystem; ----------------- -- Eigenvalues -- ----------------- function Eigenvalues (A : Real_Matrix) return Real_Vector is begin return Values : Real_Vector (A'Range (1)) do declare Vectors : Real_Matrix (1 .. 0, 1 .. 0); begin Jacobi (A, Values, Vectors, Compute_Vectors => False); Sort_Eigensystem (Values, Vectors); end; end return; end Eigenvalues; ------------- -- Inverse -- ------------- function Inverse (A : Real_Matrix) return Real_Matrix is (Solve (A, Unit_Matrix (Length (A), First_1 => A'First (2), First_2 => A'First (1)))); ------------ -- Jacobi -- ------------ procedure Jacobi (A : Real_Matrix; Values : out Real_Vector; Vectors : out Real_Matrix; Compute_Vectors : Boolean := True) is -- This subprogram uses <NAME>'s iterative method -- for computing eigenvalues and eigenvectors and is based on -- Rutishauser's implementation. -- The given real symmetric matrix is transformed iteratively to -- diagonal form through a sequence of appropriately chosen elementary -- orthogonal transformations, called Jacobi rotations here. -- The Jacobi method produces a systematic decrease of the sum of the -- squares of off-diagonal elements. Convergence to zero is quadratic, -- both for this implementation, as for the classic method that doesn't -- use row-wise scanning for pivot selection. -- The numerical stability and accuracy of Jacobi's method make it the -- best choice here, even though for large matrices other methods will -- be significantly more efficient in both time and space. -- While the eigensystem computations are absolutely foolproof for all -- real symmetric matrices, in presence of invalid values, or similar -- exceptional situations it might not. In such cases the results cannot -- be trusted and Constraint_Error is raised. -- Note: this implementation needs temporary storage for 2 * N + N**2 -- values of type Real. Max_Iterations : constant := 50; N : constant Natural := Length (A); subtype Square_Matrix is Real_Matrix (1 .. N, 1 .. N); -- In order to annihilate the M (Row, Col) element, the -- rotation parameters Cos and Sin are computed as -- follows: -- Theta = Cot (2.0 * Phi) -- = (Diag (Col) - Diag (Row)) / (2.0 * M (Row, Col)) -- Then Tan (Phi) as the smaller root (in modulus) of -- T**2 + 2 * T * Theta = 1 (or 0.5 / Theta, if Theta is large) function Compute_Tan (Theta : Real) return Real is (Real'Copy_Sign (1.0 / (abs Theta + Sqrt (1.0 + Theta**2)), Theta)); function Compute_Tan (P, H : Real) return Real is (if Is_Tiny (P, Compared_To => H) then P / H else Compute_Tan (Theta => H / (2.0 * P))); pragma Annotate (CodePeer, False_Positive, "divide by zero", "H, P /= 0"); function Sum_Strict_Upper (M : Square_Matrix) return Real; -- Return the sum of all elements in the strict upper triangle of M ---------------------- -- Sum_Strict_Upper -- ---------------------- function Sum_Strict_Upper (M : Square_Matrix) return Real is Sum : Real := 0.0; begin for Row in 1 .. N - 1 loop for Col in Row + 1 .. N loop Sum := Sum + abs M (Row, Col); end loop; end loop; return Sum; end Sum_Strict_Upper; M : Square_Matrix := A; -- Work space for solving eigensystem Threshold : Real; Sum : Real; Diag : Real_Vector (1 .. N); Diag_Adj : Real_Vector (1 .. N); -- The vector Diag_Adj indicates the amount of change in each value, -- while Diag tracks the value itself and Values holds the values as -- they were at the beginning. As the changes typically will be small -- compared to the absolute value of Diag, at the end of each iteration -- Diag is computed as Diag + Diag_Adj thus avoiding accumulating -- rounding errors. This technique is due to Rutishauser. begin if Compute_Vectors and then (Vectors'Length (1) /= N or else Vectors'Length (2) /= N) then raise Constraint_Error with "incompatible matrix dimensions"; elsif Values'Length /= N then raise Constraint_Error with "incompatible vector length"; elsif not Is_Symmetric (M) then raise Constraint_Error with "matrix not symmetric"; end if; -- Note: Only the locally declared matrix M and vectors (Diag, Diag_Adj) -- have lower bound equal to 1. The Vectors matrix may have -- different bounds, so take care indexing elements. Assignment -- as a whole is fine as sliding is automatic in that case. Vectors := (if not Compute_Vectors then (1 .. 0 => (1 .. 0 => 0.0)) else Unit_Matrix (Vectors'Length (1), Vectors'Length (2))); Values := Diagonal (M); Sweep : for Iteration in 1 .. Max_Iterations loop -- The first three iterations, perform rotation for any non-zero -- element. After this, rotate only for those that are not much -- smaller than the average off-diagnal element. After the fifth -- iteration, additionally zero out off-diagonal elements that are -- very small compared to elements on the diagonal with the same -- column or row index. Sum := Sum_Strict_Upper (M); exit Sweep when Sum = 0.0; Threshold := (if Iteration < 4 then 0.2 * Sum / Real (N**2) else 0.0); -- Iterate over all off-diagonal elements, rotating any that have -- an absolute value that exceeds the threshold. Diag := Values; Diag_Adj := (others => 0.0); -- Accumulates adjustments to Diag for Row in 1 .. N - 1 loop for Col in Row + 1 .. N loop -- If, before the rotation M (Row, Col) is tiny compared to -- Diag (Row) and Diag (Col), rotation is skipped. This is -- meaningful, as it produces no larger error than would be -- produced anyhow if the rotation had been performed. -- Suppress this optimization in the first four sweeps, so -- that this procedure can be used for computing eigenvectors -- of perturbed diagonal matrices. if Iteration > 4 and then Is_Tiny (M (Row, Col), Compared_To => Diag (Row)) and then Is_Tiny (M (Row, Col), Compared_To => Diag (Col)) then M (Row, Col) := 0.0; elsif abs M (Row, Col) > Threshold then Perform_Rotation : declare Tan : constant Real := Compute_Tan (M (Row, Col), Diag (Col) - Diag (Row)); Cos : constant Real := 1.0 / Sqrt (1.0 + Tan**2); Sin : constant Real := Tan * Cos; Tau : constant Real := Sin / (1.0 + Cos); Adj : constant Real := Tan * M (Row, Col); begin Diag_Adj (Row) := Diag_Adj (Row) - Adj; Diag_Adj (Col) := Diag_Adj (Col) + Adj; Diag (Row) := Diag (Row) - Adj; Diag (Col) := Diag (Col) + Adj; M (Row, Col) := 0.0; for J in 1 .. Row - 1 loop -- 1 <= J < Row Rotate (M (J, Row), M (J, Col), Sin, Tau); end loop; for J in Row + 1 .. Col - 1 loop -- Row < J < Col Rotate (M (Row, J), M (J, Col), Sin, Tau); end loop; for J in Col + 1 .. N loop -- Col < J <= N Rotate (M (Row, J), M (Col, J), Sin, Tau); end loop; for J in Vectors'Range (1) loop Rotate (Vectors (J, Row - 1 + Vectors'First (2)), Vectors (J, Col - 1 + Vectors'First (2)), Sin, Tau); end loop; end Perform_Rotation; end if; end loop; end loop; Values := Values + Diag_Adj; end loop Sweep; -- All normal matrices with valid values should converge perfectly. if Sum /= 0.0 then raise Constraint_Error with "eigensystem solution does not converge"; end if; end Jacobi; ----------- -- Solve -- ----------- function Solve (A : Real_Matrix; X : Real_Vector) return Real_Vector renames Instantiations.Solve; function Solve (A, X : Real_Matrix) return Real_Matrix renames Instantiations.Solve; ---------------------- -- Sort_Eigensystem -- ---------------------- procedure Sort_Eigensystem (Values : in out Real_Vector; Vectors : in out Real_Matrix) is procedure Swap (Left, Right : Integer); -- Swap Values (Left) with Values (Right), and also swap the -- corresponding eigenvectors. Note that lowerbounds may differ. function Less (Left, Right : Integer) return Boolean is (Values (Left) > Values (Right)); -- Sort by decreasing eigenvalue, see RM G.3.1 (76). procedure Sort is new Generic_Anonymous_Array_Sort (Integer); -- Sorts eigenvalues and eigenvectors by decreasing value procedure Swap (Left, Right : Integer) is begin Swap (Values (Left), Values (Right)); Swap_Column (Vectors, Left - Values'First + Vectors'First (2), Right - Values'First + Vectors'First (2)); end Swap; begin Sort (Values'First, Values'Last); end Sort_Eigensystem; --------------- -- Transpose -- --------------- function Transpose (X : Real_Matrix) return Real_Matrix is begin return R : Real_Matrix (X'Range (2), X'Range (1)) do Transpose (X, R); end return; end Transpose; ----------------- -- Unit_Matrix -- ----------------- function Unit_Matrix (Order : Positive; First_1 : Integer := 1; First_2 : Integer := 1) return Real_Matrix renames Instantiations.Unit_Matrix; ----------------- -- Unit_Vector -- ----------------- function Unit_Vector (Index : Integer; Order : Positive; First : Integer := 1) return Real_Vector renames Instantiations.Unit_Vector; end Ada.Numerics.Generic_Real_Arrays;
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/g-calend.ads
djamal2727/Main-Bearing-Analytical-Model
0
16577
<filename>Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/g-calend.ads ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . C A L E N D A R -- -- -- -- S p e c -- -- -- -- Copyright (C) 1999-2020, 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. -- -- -- ------------------------------------------------------------------------------ -- This package extends Ada.Calendar to handle Hour, Minute, Second, -- Second_Duration and Day_Of_Week and Day_In_Year from Calendar.Time. -- Second_Duration precision depends on the target clock precision. -- -- GNAT.Calendar provides the same kind of abstraction found in Ada.Calendar. -- It provides Split and Time_Of to build and split a Time data. And it -- provides accessor functions to get only one of Hour, Minute, Second, -- Second_Duration. Other functions are to access more advanced values like -- Day_Of_Week, Day_In_Year and Week_In_Year. with Ada.Calendar.Formatting; with Interfaces.C; package GNAT.Calendar is type Day_Name is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); pragma Ordered (Day_Name); subtype Hour_Number is Natural range 0 .. 23; subtype Minute_Number is Natural range 0 .. 59; subtype Second_Number is Natural range 0 .. 59; subtype Second_Duration is Ada.Calendar.Day_Duration range 0.0 .. 1.0; subtype Day_In_Year_Number is Positive range 1 .. 366; subtype Week_In_Year_Number is Positive range 1 .. 53; No_Time : constant Ada.Calendar.Time; -- A constant set to the first date that can be represented by the type -- Time. It can be used to indicate an uninitialized date. function Hour (Date : Ada.Calendar.Time) return Hour_Number; function Minute (Date : Ada.Calendar.Time) return Minute_Number; function Second (Date : Ada.Calendar.Time) return Second_Number; function Sub_Second (Date : Ada.Calendar.Time) return Second_Duration; -- Hour, Minute, Second and Sub_Second returns the complete time data for -- the Date (H:M:S.SS). See Ada.Calendar for Year, Month, Day accessors. -- Second_Duration precision depends on the target clock precision. function Day_Of_Week (Date : Ada.Calendar.Time) return Day_Name; -- Return the day name function Day_In_Year (Date : Ada.Calendar.Time) return Day_In_Year_Number; -- Return the day number in the year. (1st January is day 1 and 31st -- December is day 365 or 366 for leap year). procedure Split (Date : Ada.Calendar.Time; Year : out Ada.Calendar.Year_Number; Month : out Ada.Calendar.Month_Number; Day : out Ada.Calendar.Day_Number; Hour : out Hour_Number; Minute : out Minute_Number; Second : out Second_Number; Sub_Second : out Second_Duration); -- Split a standard Ada.Calendar.Time value in date data (Year, Month, Day) -- and Time data (Hour, Minute, Second, Sub_Second). procedure Split_At_Locale (Date : Ada.Calendar.Time; Year : out Ada.Calendar.Year_Number; Month : out Ada.Calendar.Month_Number; Day : out Ada.Calendar.Day_Number; Hour : out Hour_Number; Minute : out Minute_Number; Second : out Second_Number; Sub_Second : out Second_Duration); -- Split a standard Ada.Calendar.Time value in date data (Year, Month, Day) -- and Time data (Hour, Minute, Second, Sub_Second). This version of Split -- utilizes the time zone and DST bias of the locale (equivalent to Clock). -- Due to this simplified behavior, the implementation does not require -- expensive system calls on targets such as Windows. -- WARNING: Split_At_Locale is no longer aware of historic events and may -- produce inaccurate results over DST changes which occurred in the past. function Time_Of (Year : Ada.Calendar.Year_Number; Month : Ada.Calendar.Month_Number; Day : Ada.Calendar.Day_Number; Hour : Hour_Number; Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration := 0.0) return Ada.Calendar.Time; -- Return an Ada.Calendar.Time data built from the date and time values function Time_Of_At_Locale (Year : Ada.Calendar.Year_Number; Month : Ada.Calendar.Month_Number; Day : Ada.Calendar.Day_Number; Hour : Hour_Number; Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration := 0.0) return Ada.Calendar.Time; -- Return an Ada.Calendar.Time data built from the date and time values. -- This version of Time_Of utilizes the time zone and DST bias of the -- locale (equivalent to Clock). Due to this simplified behavior, the -- implementation does not require expensive system calls on targets such -- as Windows. -- WARNING: Split_At_Locale is no longer aware of historic events and may -- produce inaccurate results over DST changes which occurred in the past. function Week_In_Year (Date : Ada.Calendar.Time) return Week_In_Year_Number; -- Return the week number as defined in ISO 8601. A week always starts on -- a Monday and the first week of a particular year is the one containing -- the first Thursday. A year may have 53 weeks when January 1st is a -- Wednesday and the year is leap or January 1st is a Thursday. Note that -- the last days of December may belong to the first week on the next year -- and conversely, the first days of January may belong to the last week -- of the last year. procedure Year_Week_In_Year (Date : Ada.Calendar.Time; Year : out Ada.Calendar.Year_Number; Week : out Week_In_Year_Number); -- Return the week number as defined in ISO 8601 along with the year in -- which the week occurs. -- C timeval conversion -- C timeval represent a duration (used in Select for example). This -- structure is composed of a number of seconds and a number of micro -- seconds. The timeval structure is not exposed here because its -- definition is target dependent. Interface to C programs is done via a -- pointer to timeval structure. type timeval is private; function To_Duration (T : not null access timeval) return Duration; function To_Timeval (D : Duration) return timeval; private -- This is a dummy declaration that should be the largest possible timeval -- structure of all supported targets. type timeval is array (1 .. 3) of Interfaces.C.long; function Julian_Day (Year : Ada.Calendar.Year_Number; Month : Ada.Calendar.Month_Number; Day : Ada.Calendar.Day_Number) return Integer; -- Compute Julian day number -- -- The code of this function is a modified version of algorithm 199 from -- the Collected Algorithms of the ACM. The author of algorithm 199 is -- <NAME>. No_Time : constant Ada.Calendar.Time := Ada.Calendar.Formatting.Time_Of (Ada.Calendar.Year_Number'First, Ada.Calendar.Month_Number'First, Ada.Calendar.Day_Number'First, Time_Zone => 0); -- Use Time_Zone => 0 to be the same binary representation in any timezone end GNAT.Calendar;
kill.asm
Tookerton21/Xv6_OS
0
176721
_kill: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char **argv) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 53 push %ebx e: 51 push %ecx f: 83 ec 10 sub $0x10,%esp 12: 89 cb mov %ecx,%ebx int i; if(argc < 2){ 14: 83 3b 01 cmpl $0x1,(%ebx) 17: 7f 17 jg 30 <main+0x30> printf(2, "usage: kill pid...\n"); 19: 83 ec 08 sub $0x8,%esp 1c: 68 7b 08 00 00 push $0x87b 21: 6a 02 push $0x2 23: e8 9d 04 00 00 call 4c5 <printf> 28: 83 c4 10 add $0x10,%esp exit(); 2b: e8 de 02 00 00 call 30e <exit> } for(i=1; i<argc; i++) 30: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp) 37: eb 2d jmp 66 <main+0x66> kill(atoi(argv[i])); 39: 8b 45 f4 mov -0xc(%ebp),%eax 3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 43: 8b 43 04 mov 0x4(%ebx),%eax 46: 01 d0 add %edx,%eax 48: 8b 00 mov (%eax),%eax 4a: 83 ec 0c sub $0xc,%esp 4d: 50 push %eax 4e: e8 e4 01 00 00 call 237 <atoi> 53: 83 c4 10 add $0x10,%esp 56: 83 ec 0c sub $0xc,%esp 59: 50 push %eax 5a: e8 df 02 00 00 call 33e <kill> 5f: 83 c4 10 add $0x10,%esp if(argc < 2){ printf(2, "usage: kill pid...\n"); exit(); } for(i=1; i<argc; i++) 62: 83 45 f4 01 addl $0x1,-0xc(%ebp) 66: 8b 45 f4 mov -0xc(%ebp),%eax 69: 3b 03 cmp (%ebx),%eax 6b: 7c cc jl 39 <main+0x39> kill(atoi(argv[i])); exit(); 6d: e8 9c 02 00 00 call 30e <exit> 00000072 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 72: 55 push %ebp 73: 89 e5 mov %esp,%ebp 75: 57 push %edi 76: 53 push %ebx asm volatile("cld; rep stosb" : 77: 8b 4d 08 mov 0x8(%ebp),%ecx 7a: 8b 55 10 mov 0x10(%ebp),%edx 7d: 8b 45 0c mov 0xc(%ebp),%eax 80: 89 cb mov %ecx,%ebx 82: 89 df mov %ebx,%edi 84: 89 d1 mov %edx,%ecx 86: fc cld 87: f3 aa rep stos %al,%es:(%edi) 89: 89 ca mov %ecx,%edx 8b: 89 fb mov %edi,%ebx 8d: 89 5d 08 mov %ebx,0x8(%ebp) 90: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 93: 90 nop 94: 5b pop %ebx 95: 5f pop %edi 96: 5d pop %ebp 97: c3 ret 00000098 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 98: 55 push %ebp 99: 89 e5 mov %esp,%ebp 9b: 83 ec 10 sub $0x10,%esp char *os; os = s; 9e: 8b 45 08 mov 0x8(%ebp),%eax a1: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) a4: 90 nop a5: 8b 45 08 mov 0x8(%ebp),%eax a8: 8d 50 01 lea 0x1(%eax),%edx ab: 89 55 08 mov %edx,0x8(%ebp) ae: 8b 55 0c mov 0xc(%ebp),%edx b1: 8d 4a 01 lea 0x1(%edx),%ecx b4: 89 4d 0c mov %ecx,0xc(%ebp) b7: 0f b6 12 movzbl (%edx),%edx ba: 88 10 mov %dl,(%eax) bc: 0f b6 00 movzbl (%eax),%eax bf: 84 c0 test %al,%al c1: 75 e2 jne a5 <strcpy+0xd> ; return os; c3: 8b 45 fc mov -0x4(%ebp),%eax } c6: c9 leave c7: c3 ret 000000c8 <strcmp>: int strcmp(const char *p, const char *q) { c8: 55 push %ebp c9: 89 e5 mov %esp,%ebp while(*p && *p == *q) cb: eb 08 jmp d5 <strcmp+0xd> p++, q++; cd: 83 45 08 01 addl $0x1,0x8(%ebp) d1: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) d5: 8b 45 08 mov 0x8(%ebp),%eax d8: 0f b6 00 movzbl (%eax),%eax db: 84 c0 test %al,%al dd: 74 10 je ef <strcmp+0x27> df: 8b 45 08 mov 0x8(%ebp),%eax e2: 0f b6 10 movzbl (%eax),%edx e5: 8b 45 0c mov 0xc(%ebp),%eax e8: 0f b6 00 movzbl (%eax),%eax eb: 38 c2 cmp %al,%dl ed: 74 de je cd <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; ef: 8b 45 08 mov 0x8(%ebp),%eax f2: 0f b6 00 movzbl (%eax),%eax f5: 0f b6 d0 movzbl %al,%edx f8: 8b 45 0c mov 0xc(%ebp),%eax fb: 0f b6 00 movzbl (%eax),%eax fe: 0f b6 c0 movzbl %al,%eax 101: 29 c2 sub %eax,%edx 103: 89 d0 mov %edx,%eax } 105: 5d pop %ebp 106: c3 ret 00000107 <strlen>: uint strlen(char *s) { 107: 55 push %ebp 108: 89 e5 mov %esp,%ebp 10a: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 10d: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 114: eb 04 jmp 11a <strlen+0x13> 116: 83 45 fc 01 addl $0x1,-0x4(%ebp) 11a: 8b 55 fc mov -0x4(%ebp),%edx 11d: 8b 45 08 mov 0x8(%ebp),%eax 120: 01 d0 add %edx,%eax 122: 0f b6 00 movzbl (%eax),%eax 125: 84 c0 test %al,%al 127: 75 ed jne 116 <strlen+0xf> ; return n; 129: 8b 45 fc mov -0x4(%ebp),%eax } 12c: c9 leave 12d: c3 ret 0000012e <memset>: void* memset(void *dst, int c, uint n) { 12e: 55 push %ebp 12f: 89 e5 mov %esp,%ebp stosb(dst, c, n); 131: 8b 45 10 mov 0x10(%ebp),%eax 134: 50 push %eax 135: ff 75 0c pushl 0xc(%ebp) 138: ff 75 08 pushl 0x8(%ebp) 13b: e8 32 ff ff ff call 72 <stosb> 140: 83 c4 0c add $0xc,%esp return dst; 143: 8b 45 08 mov 0x8(%ebp),%eax } 146: c9 leave 147: c3 ret 00000148 <strchr>: char* strchr(const char *s, char c) { 148: 55 push %ebp 149: 89 e5 mov %esp,%ebp 14b: 83 ec 04 sub $0x4,%esp 14e: 8b 45 0c mov 0xc(%ebp),%eax 151: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 154: eb 14 jmp 16a <strchr+0x22> if(*s == c) 156: 8b 45 08 mov 0x8(%ebp),%eax 159: 0f b6 00 movzbl (%eax),%eax 15c: 3a 45 fc cmp -0x4(%ebp),%al 15f: 75 05 jne 166 <strchr+0x1e> return (char*)s; 161: 8b 45 08 mov 0x8(%ebp),%eax 164: eb 13 jmp 179 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 166: 83 45 08 01 addl $0x1,0x8(%ebp) 16a: 8b 45 08 mov 0x8(%ebp),%eax 16d: 0f b6 00 movzbl (%eax),%eax 170: 84 c0 test %al,%al 172: 75 e2 jne 156 <strchr+0xe> if(*s == c) return (char*)s; return 0; 174: b8 00 00 00 00 mov $0x0,%eax } 179: c9 leave 17a: c3 ret 0000017b <gets>: char* gets(char *buf, int max) { 17b: 55 push %ebp 17c: 89 e5 mov %esp,%ebp 17e: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 181: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 188: eb 42 jmp 1cc <gets+0x51> cc = read(0, &c, 1); 18a: 83 ec 04 sub $0x4,%esp 18d: 6a 01 push $0x1 18f: 8d 45 ef lea -0x11(%ebp),%eax 192: 50 push %eax 193: 6a 00 push $0x0 195: e8 8c 01 00 00 call 326 <read> 19a: 83 c4 10 add $0x10,%esp 19d: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 1a0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 1a4: 7e 33 jle 1d9 <gets+0x5e> break; buf[i++] = c; 1a6: 8b 45 f4 mov -0xc(%ebp),%eax 1a9: 8d 50 01 lea 0x1(%eax),%edx 1ac: 89 55 f4 mov %edx,-0xc(%ebp) 1af: 89 c2 mov %eax,%edx 1b1: 8b 45 08 mov 0x8(%ebp),%eax 1b4: 01 c2 add %eax,%edx 1b6: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1ba: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 1bc: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1c0: 3c 0a cmp $0xa,%al 1c2: 74 16 je 1da <gets+0x5f> 1c4: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1c8: 3c 0d cmp $0xd,%al 1ca: 74 0e je 1da <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 1cc: 8b 45 f4 mov -0xc(%ebp),%eax 1cf: 83 c0 01 add $0x1,%eax 1d2: 3b 45 0c cmp 0xc(%ebp),%eax 1d5: 7c b3 jl 18a <gets+0xf> 1d7: eb 01 jmp 1da <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 1d9: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 1da: 8b 55 f4 mov -0xc(%ebp),%edx 1dd: 8b 45 08 mov 0x8(%ebp),%eax 1e0: 01 d0 add %edx,%eax 1e2: c6 00 00 movb $0x0,(%eax) return buf; 1e5: 8b 45 08 mov 0x8(%ebp),%eax } 1e8: c9 leave 1e9: c3 ret 000001ea <stat>: int stat(char *n, struct stat *st) { 1ea: 55 push %ebp 1eb: 89 e5 mov %esp,%ebp 1ed: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 1f0: 83 ec 08 sub $0x8,%esp 1f3: 6a 00 push $0x0 1f5: ff 75 08 pushl 0x8(%ebp) 1f8: e8 51 01 00 00 call 34e <open> 1fd: 83 c4 10 add $0x10,%esp 200: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 203: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 207: 79 07 jns 210 <stat+0x26> return -1; 209: b8 ff ff ff ff mov $0xffffffff,%eax 20e: eb 25 jmp 235 <stat+0x4b> r = fstat(fd, st); 210: 83 ec 08 sub $0x8,%esp 213: ff 75 0c pushl 0xc(%ebp) 216: ff 75 f4 pushl -0xc(%ebp) 219: e8 48 01 00 00 call 366 <fstat> 21e: 83 c4 10 add $0x10,%esp 221: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 224: 83 ec 0c sub $0xc,%esp 227: ff 75 f4 pushl -0xc(%ebp) 22a: e8 07 01 00 00 call 336 <close> 22f: 83 c4 10 add $0x10,%esp return r; 232: 8b 45 f0 mov -0x10(%ebp),%eax } 235: c9 leave 236: c3 ret 00000237 <atoi>: // new atoi added 4/22/17 to be able to handle negative numbers int atoi(const char *s) { 237: 55 push %ebp 238: 89 e5 mov %esp,%ebp 23a: 83 ec 10 sub $0x10,%esp int n, sign; n=0; 23d: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while(*s==' ')s++;//Remove leading spaces 244: eb 04 jmp 24a <atoi+0x13> 246: 83 45 08 01 addl $0x1,0x8(%ebp) 24a: 8b 45 08 mov 0x8(%ebp),%eax 24d: 0f b6 00 movzbl (%eax),%eax 250: 3c 20 cmp $0x20,%al 252: 74 f2 je 246 <atoi+0xf> sign =(*s=='-')?-1 : 1; 254: 8b 45 08 mov 0x8(%ebp),%eax 257: 0f b6 00 movzbl (%eax),%eax 25a: 3c 2d cmp $0x2d,%al 25c: 75 07 jne 265 <atoi+0x2e> 25e: b8 ff ff ff ff mov $0xffffffff,%eax 263: eb 05 jmp 26a <atoi+0x33> 265: b8 01 00 00 00 mov $0x1,%eax 26a: 89 45 f8 mov %eax,-0x8(%ebp) if(*s=='+' || *s=='-') 26d: 8b 45 08 mov 0x8(%ebp),%eax 270: 0f b6 00 movzbl (%eax),%eax 273: 3c 2b cmp $0x2b,%al 275: 74 0a je 281 <atoi+0x4a> 277: 8b 45 08 mov 0x8(%ebp),%eax 27a: 0f b6 00 movzbl (%eax),%eax 27d: 3c 2d cmp $0x2d,%al 27f: 75 2b jne 2ac <atoi+0x75> s++; 281: 83 45 08 01 addl $0x1,0x8(%ebp) while('0' <= *s&&*s<='9') 285: eb 25 jmp 2ac <atoi+0x75> n = n*10 + *s++ - '0'; 287: 8b 55 fc mov -0x4(%ebp),%edx 28a: 89 d0 mov %edx,%eax 28c: c1 e0 02 shl $0x2,%eax 28f: 01 d0 add %edx,%eax 291: 01 c0 add %eax,%eax 293: 89 c1 mov %eax,%ecx 295: 8b 45 08 mov 0x8(%ebp),%eax 298: 8d 50 01 lea 0x1(%eax),%edx 29b: 89 55 08 mov %edx,0x8(%ebp) 29e: 0f b6 00 movzbl (%eax),%eax 2a1: 0f be c0 movsbl %al,%eax 2a4: 01 c8 add %ecx,%eax 2a6: 83 e8 30 sub $0x30,%eax 2a9: 89 45 fc mov %eax,-0x4(%ebp) n=0; while(*s==' ')s++;//Remove leading spaces sign =(*s=='-')?-1 : 1; if(*s=='+' || *s=='-') s++; while('0' <= *s&&*s<='9') 2ac: 8b 45 08 mov 0x8(%ebp),%eax 2af: 0f b6 00 movzbl (%eax),%eax 2b2: 3c 2f cmp $0x2f,%al 2b4: 7e 0a jle 2c0 <atoi+0x89> 2b6: 8b 45 08 mov 0x8(%ebp),%eax 2b9: 0f b6 00 movzbl (%eax),%eax 2bc: 3c 39 cmp $0x39,%al 2be: 7e c7 jle 287 <atoi+0x50> n = n*10 + *s++ - '0'; return sign*n; 2c0: 8b 45 f8 mov -0x8(%ebp),%eax 2c3: 0f af 45 fc imul -0x4(%ebp),%eax } 2c7: c9 leave 2c8: c3 ret 000002c9 <memmove>: return n; } */ void* memmove(void *vdst, void *vsrc, int n) { 2c9: 55 push %ebp 2ca: 89 e5 mov %esp,%ebp 2cc: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 2cf: 8b 45 08 mov 0x8(%ebp),%eax 2d2: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 2d5: 8b 45 0c mov 0xc(%ebp),%eax 2d8: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 2db: eb 17 jmp 2f4 <memmove+0x2b> *dst++ = *src++; 2dd: 8b 45 fc mov -0x4(%ebp),%eax 2e0: 8d 50 01 lea 0x1(%eax),%edx 2e3: 89 55 fc mov %edx,-0x4(%ebp) 2e6: 8b 55 f8 mov -0x8(%ebp),%edx 2e9: 8d 4a 01 lea 0x1(%edx),%ecx 2ec: 89 4d f8 mov %ecx,-0x8(%ebp) 2ef: 0f b6 12 movzbl (%edx),%edx 2f2: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 2f4: 8b 45 10 mov 0x10(%ebp),%eax 2f7: 8d 50 ff lea -0x1(%eax),%edx 2fa: 89 55 10 mov %edx,0x10(%ebp) 2fd: 85 c0 test %eax,%eax 2ff: 7f dc jg 2dd <memmove+0x14> *dst++ = *src++; return vdst; 301: 8b 45 08 mov 0x8(%ebp),%eax } 304: c9 leave 305: c3 ret 00000306 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 306: b8 01 00 00 00 mov $0x1,%eax 30b: cd 40 int $0x40 30d: c3 ret 0000030e <exit>: SYSCALL(exit) 30e: b8 02 00 00 00 mov $0x2,%eax 313: cd 40 int $0x40 315: c3 ret 00000316 <wait>: SYSCALL(wait) 316: b8 03 00 00 00 mov $0x3,%eax 31b: cd 40 int $0x40 31d: c3 ret 0000031e <pipe>: SYSCALL(pipe) 31e: b8 04 00 00 00 mov $0x4,%eax 323: cd 40 int $0x40 325: c3 ret 00000326 <read>: SYSCALL(read) 326: b8 05 00 00 00 mov $0x5,%eax 32b: cd 40 int $0x40 32d: c3 ret 0000032e <write>: SYSCALL(write) 32e: b8 10 00 00 00 mov $0x10,%eax 333: cd 40 int $0x40 335: c3 ret 00000336 <close>: SYSCALL(close) 336: b8 15 00 00 00 mov $0x15,%eax 33b: cd 40 int $0x40 33d: c3 ret 0000033e <kill>: SYSCALL(kill) 33e: b8 06 00 00 00 mov $0x6,%eax 343: cd 40 int $0x40 345: c3 ret 00000346 <exec>: SYSCALL(exec) 346: b8 07 00 00 00 mov $0x7,%eax 34b: cd 40 int $0x40 34d: c3 ret 0000034e <open>: SYSCALL(open) 34e: b8 0f 00 00 00 mov $0xf,%eax 353: cd 40 int $0x40 355: c3 ret 00000356 <mknod>: SYSCALL(mknod) 356: b8 11 00 00 00 mov $0x11,%eax 35b: cd 40 int $0x40 35d: c3 ret 0000035e <unlink>: SYSCALL(unlink) 35e: b8 12 00 00 00 mov $0x12,%eax 363: cd 40 int $0x40 365: c3 ret 00000366 <fstat>: SYSCALL(fstat) 366: b8 08 00 00 00 mov $0x8,%eax 36b: cd 40 int $0x40 36d: c3 ret 0000036e <link>: SYSCALL(link) 36e: b8 13 00 00 00 mov $0x13,%eax 373: cd 40 int $0x40 375: c3 ret 00000376 <mkdir>: SYSCALL(mkdir) 376: b8 14 00 00 00 mov $0x14,%eax 37b: cd 40 int $0x40 37d: c3 ret 0000037e <chdir>: SYSCALL(chdir) 37e: b8 09 00 00 00 mov $0x9,%eax 383: cd 40 int $0x40 385: c3 ret 00000386 <dup>: SYSCALL(dup) 386: b8 0a 00 00 00 mov $0xa,%eax 38b: cd 40 int $0x40 38d: c3 ret 0000038e <getpid>: SYSCALL(getpid) 38e: b8 0b 00 00 00 mov $0xb,%eax 393: cd 40 int $0x40 395: c3 ret 00000396 <sbrk>: SYSCALL(sbrk) 396: b8 0c 00 00 00 mov $0xc,%eax 39b: cd 40 int $0x40 39d: c3 ret 0000039e <sleep>: SYSCALL(sleep) 39e: b8 0d 00 00 00 mov $0xd,%eax 3a3: cd 40 int $0x40 3a5: c3 ret 000003a6 <uptime>: SYSCALL(uptime) 3a6: b8 0e 00 00 00 mov $0xe,%eax 3ab: cd 40 int $0x40 3ad: c3 ret 000003ae <halt>: SYSCALL(halt) 3ae: b8 16 00 00 00 mov $0x16,%eax 3b3: cd 40 int $0x40 3b5: c3 ret 000003b6 <date>: //Project additions SYSCALL(date) 3b6: b8 17 00 00 00 mov $0x17,%eax 3bb: cd 40 int $0x40 3bd: c3 ret 000003be <getuid>: SYSCALL(getuid) 3be: b8 18 00 00 00 mov $0x18,%eax 3c3: cd 40 int $0x40 3c5: c3 ret 000003c6 <getgid>: SYSCALL(getgid) 3c6: b8 19 00 00 00 mov $0x19,%eax 3cb: cd 40 int $0x40 3cd: c3 ret 000003ce <getppid>: SYSCALL(getppid) 3ce: b8 1a 00 00 00 mov $0x1a,%eax 3d3: cd 40 int $0x40 3d5: c3 ret 000003d6 <setuid>: SYSCALL(setuid) 3d6: b8 1b 00 00 00 mov $0x1b,%eax 3db: cd 40 int $0x40 3dd: c3 ret 000003de <setgid>: SYSCALL(setgid) 3de: b8 1c 00 00 00 mov $0x1c,%eax 3e3: cd 40 int $0x40 3e5: c3 ret 000003e6 <getprocs>: SYSCALL(getprocs) 3e6: b8 1d 00 00 00 mov $0x1d,%eax 3eb: cd 40 int $0x40 3ed: c3 ret 000003ee <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 3ee: 55 push %ebp 3ef: 89 e5 mov %esp,%ebp 3f1: 83 ec 18 sub $0x18,%esp 3f4: 8b 45 0c mov 0xc(%ebp),%eax 3f7: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 3fa: 83 ec 04 sub $0x4,%esp 3fd: 6a 01 push $0x1 3ff: 8d 45 f4 lea -0xc(%ebp),%eax 402: 50 push %eax 403: ff 75 08 pushl 0x8(%ebp) 406: e8 23 ff ff ff call 32e <write> 40b: 83 c4 10 add $0x10,%esp } 40e: 90 nop 40f: c9 leave 410: c3 ret 00000411 <printint>: static void printint(int fd, int xx, int base, int sgn) { 411: 55 push %ebp 412: 89 e5 mov %esp,%ebp 414: 53 push %ebx 415: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 418: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 41f: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 423: 74 17 je 43c <printint+0x2b> 425: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 429: 79 11 jns 43c <printint+0x2b> neg = 1; 42b: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 432: 8b 45 0c mov 0xc(%ebp),%eax 435: f7 d8 neg %eax 437: 89 45 ec mov %eax,-0x14(%ebp) 43a: eb 06 jmp 442 <printint+0x31> } else { x = xx; 43c: 8b 45 0c mov 0xc(%ebp),%eax 43f: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 442: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 449: 8b 4d f4 mov -0xc(%ebp),%ecx 44c: 8d 41 01 lea 0x1(%ecx),%eax 44f: 89 45 f4 mov %eax,-0xc(%ebp) 452: 8b 5d 10 mov 0x10(%ebp),%ebx 455: 8b 45 ec mov -0x14(%ebp),%eax 458: ba 00 00 00 00 mov $0x0,%edx 45d: f7 f3 div %ebx 45f: 89 d0 mov %edx,%eax 461: 0f b6 80 e4 0a 00 00 movzbl 0xae4(%eax),%eax 468: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 46c: 8b 5d 10 mov 0x10(%ebp),%ebx 46f: 8b 45 ec mov -0x14(%ebp),%eax 472: ba 00 00 00 00 mov $0x0,%edx 477: f7 f3 div %ebx 479: 89 45 ec mov %eax,-0x14(%ebp) 47c: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 480: 75 c7 jne 449 <printint+0x38> if(neg) 482: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 486: 74 2d je 4b5 <printint+0xa4> buf[i++] = '-'; 488: 8b 45 f4 mov -0xc(%ebp),%eax 48b: 8d 50 01 lea 0x1(%eax),%edx 48e: 89 55 f4 mov %edx,-0xc(%ebp) 491: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 496: eb 1d jmp 4b5 <printint+0xa4> putc(fd, buf[i]); 498: 8d 55 dc lea -0x24(%ebp),%edx 49b: 8b 45 f4 mov -0xc(%ebp),%eax 49e: 01 d0 add %edx,%eax 4a0: 0f b6 00 movzbl (%eax),%eax 4a3: 0f be c0 movsbl %al,%eax 4a6: 83 ec 08 sub $0x8,%esp 4a9: 50 push %eax 4aa: ff 75 08 pushl 0x8(%ebp) 4ad: e8 3c ff ff ff call 3ee <putc> 4b2: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4b5: 83 6d f4 01 subl $0x1,-0xc(%ebp) 4b9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 4bd: 79 d9 jns 498 <printint+0x87> putc(fd, buf[i]); } 4bf: 90 nop 4c0: 8b 5d fc mov -0x4(%ebp),%ebx 4c3: c9 leave 4c4: c3 ret 000004c5 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4c5: 55 push %ebp 4c6: 89 e5 mov %esp,%ebp 4c8: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 4cb: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 4d2: 8d 45 0c lea 0xc(%ebp),%eax 4d5: 83 c0 04 add $0x4,%eax 4d8: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 4db: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 4e2: e9 59 01 00 00 jmp 640 <printf+0x17b> c = fmt[i] & 0xff; 4e7: 8b 55 0c mov 0xc(%ebp),%edx 4ea: 8b 45 f0 mov -0x10(%ebp),%eax 4ed: 01 d0 add %edx,%eax 4ef: 0f b6 00 movzbl (%eax),%eax 4f2: 0f be c0 movsbl %al,%eax 4f5: 25 ff 00 00 00 and $0xff,%eax 4fa: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 4fd: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 501: 75 2c jne 52f <printf+0x6a> if(c == '%'){ 503: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 507: 75 0c jne 515 <printf+0x50> state = '%'; 509: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 510: e9 27 01 00 00 jmp 63c <printf+0x177> } else { putc(fd, c); 515: 8b 45 e4 mov -0x1c(%ebp),%eax 518: 0f be c0 movsbl %al,%eax 51b: 83 ec 08 sub $0x8,%esp 51e: 50 push %eax 51f: ff 75 08 pushl 0x8(%ebp) 522: e8 c7 fe ff ff call 3ee <putc> 527: 83 c4 10 add $0x10,%esp 52a: e9 0d 01 00 00 jmp 63c <printf+0x177> } } else if(state == '%'){ 52f: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 533: 0f 85 03 01 00 00 jne 63c <printf+0x177> if(c == 'd'){ 539: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 53d: 75 1e jne 55d <printf+0x98> printint(fd, *ap, 10, 1); 53f: 8b 45 e8 mov -0x18(%ebp),%eax 542: 8b 00 mov (%eax),%eax 544: 6a 01 push $0x1 546: 6a 0a push $0xa 548: 50 push %eax 549: ff 75 08 pushl 0x8(%ebp) 54c: e8 c0 fe ff ff call 411 <printint> 551: 83 c4 10 add $0x10,%esp ap++; 554: 83 45 e8 04 addl $0x4,-0x18(%ebp) 558: e9 d8 00 00 00 jmp 635 <printf+0x170> } else if(c == 'x' || c == 'p'){ 55d: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 561: 74 06 je 569 <printf+0xa4> 563: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 567: 75 1e jne 587 <printf+0xc2> printint(fd, *ap, 16, 0); 569: 8b 45 e8 mov -0x18(%ebp),%eax 56c: 8b 00 mov (%eax),%eax 56e: 6a 00 push $0x0 570: 6a 10 push $0x10 572: 50 push %eax 573: ff 75 08 pushl 0x8(%ebp) 576: e8 96 fe ff ff call 411 <printint> 57b: 83 c4 10 add $0x10,%esp ap++; 57e: 83 45 e8 04 addl $0x4,-0x18(%ebp) 582: e9 ae 00 00 00 jmp 635 <printf+0x170> } else if(c == 's'){ 587: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 58b: 75 43 jne 5d0 <printf+0x10b> s = (char*)*ap; 58d: 8b 45 e8 mov -0x18(%ebp),%eax 590: 8b 00 mov (%eax),%eax 592: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 595: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 599: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 59d: 75 25 jne 5c4 <printf+0xff> s = "(null)"; 59f: c7 45 f4 8f 08 00 00 movl $0x88f,-0xc(%ebp) while(*s != 0){ 5a6: eb 1c jmp 5c4 <printf+0xff> putc(fd, *s); 5a8: 8b 45 f4 mov -0xc(%ebp),%eax 5ab: 0f b6 00 movzbl (%eax),%eax 5ae: 0f be c0 movsbl %al,%eax 5b1: 83 ec 08 sub $0x8,%esp 5b4: 50 push %eax 5b5: ff 75 08 pushl 0x8(%ebp) 5b8: e8 31 fe ff ff call 3ee <putc> 5bd: 83 c4 10 add $0x10,%esp s++; 5c0: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 5c4: 8b 45 f4 mov -0xc(%ebp),%eax 5c7: 0f b6 00 movzbl (%eax),%eax 5ca: 84 c0 test %al,%al 5cc: 75 da jne 5a8 <printf+0xe3> 5ce: eb 65 jmp 635 <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 5d0: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 5d4: 75 1d jne 5f3 <printf+0x12e> putc(fd, *ap); 5d6: 8b 45 e8 mov -0x18(%ebp),%eax 5d9: 8b 00 mov (%eax),%eax 5db: 0f be c0 movsbl %al,%eax 5de: 83 ec 08 sub $0x8,%esp 5e1: 50 push %eax 5e2: ff 75 08 pushl 0x8(%ebp) 5e5: e8 04 fe ff ff call 3ee <putc> 5ea: 83 c4 10 add $0x10,%esp ap++; 5ed: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5f1: eb 42 jmp 635 <printf+0x170> } else if(c == '%'){ 5f3: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 5f7: 75 17 jne 610 <printf+0x14b> putc(fd, c); 5f9: 8b 45 e4 mov -0x1c(%ebp),%eax 5fc: 0f be c0 movsbl %al,%eax 5ff: 83 ec 08 sub $0x8,%esp 602: 50 push %eax 603: ff 75 08 pushl 0x8(%ebp) 606: e8 e3 fd ff ff call 3ee <putc> 60b: 83 c4 10 add $0x10,%esp 60e: eb 25 jmp 635 <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 610: 83 ec 08 sub $0x8,%esp 613: 6a 25 push $0x25 615: ff 75 08 pushl 0x8(%ebp) 618: e8 d1 fd ff ff call 3ee <putc> 61d: 83 c4 10 add $0x10,%esp putc(fd, c); 620: 8b 45 e4 mov -0x1c(%ebp),%eax 623: 0f be c0 movsbl %al,%eax 626: 83 ec 08 sub $0x8,%esp 629: 50 push %eax 62a: ff 75 08 pushl 0x8(%ebp) 62d: e8 bc fd ff ff call 3ee <putc> 632: 83 c4 10 add $0x10,%esp } state = 0; 635: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 63c: 83 45 f0 01 addl $0x1,-0x10(%ebp) 640: 8b 55 0c mov 0xc(%ebp),%edx 643: 8b 45 f0 mov -0x10(%ebp),%eax 646: 01 d0 add %edx,%eax 648: 0f b6 00 movzbl (%eax),%eax 64b: 84 c0 test %al,%al 64d: 0f 85 94 fe ff ff jne 4e7 <printf+0x22> putc(fd, c); } state = 0; } } } 653: 90 nop 654: c9 leave 655: c3 ret 00000656 <free>: static Header base; static Header *freep; void free(void *ap) { 656: 55 push %ebp 657: 89 e5 mov %esp,%ebp 659: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 65c: 8b 45 08 mov 0x8(%ebp),%eax 65f: 83 e8 08 sub $0x8,%eax 662: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 665: a1 00 0b 00 00 mov 0xb00,%eax 66a: 89 45 fc mov %eax,-0x4(%ebp) 66d: eb 24 jmp 693 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 66f: 8b 45 fc mov -0x4(%ebp),%eax 672: 8b 00 mov (%eax),%eax 674: 3b 45 fc cmp -0x4(%ebp),%eax 677: 77 12 ja 68b <free+0x35> 679: 8b 45 f8 mov -0x8(%ebp),%eax 67c: 3b 45 fc cmp -0x4(%ebp),%eax 67f: 77 24 ja 6a5 <free+0x4f> 681: 8b 45 fc mov -0x4(%ebp),%eax 684: 8b 00 mov (%eax),%eax 686: 3b 45 f8 cmp -0x8(%ebp),%eax 689: 77 1a ja 6a5 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 68b: 8b 45 fc mov -0x4(%ebp),%eax 68e: 8b 00 mov (%eax),%eax 690: 89 45 fc mov %eax,-0x4(%ebp) 693: 8b 45 f8 mov -0x8(%ebp),%eax 696: 3b 45 fc cmp -0x4(%ebp),%eax 699: 76 d4 jbe 66f <free+0x19> 69b: 8b 45 fc mov -0x4(%ebp),%eax 69e: 8b 00 mov (%eax),%eax 6a0: 3b 45 f8 cmp -0x8(%ebp),%eax 6a3: 76 ca jbe 66f <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 6a5: 8b 45 f8 mov -0x8(%ebp),%eax 6a8: 8b 40 04 mov 0x4(%eax),%eax 6ab: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 6b2: 8b 45 f8 mov -0x8(%ebp),%eax 6b5: 01 c2 add %eax,%edx 6b7: 8b 45 fc mov -0x4(%ebp),%eax 6ba: 8b 00 mov (%eax),%eax 6bc: 39 c2 cmp %eax,%edx 6be: 75 24 jne 6e4 <free+0x8e> bp->s.size += p->s.ptr->s.size; 6c0: 8b 45 f8 mov -0x8(%ebp),%eax 6c3: 8b 50 04 mov 0x4(%eax),%edx 6c6: 8b 45 fc mov -0x4(%ebp),%eax 6c9: 8b 00 mov (%eax),%eax 6cb: 8b 40 04 mov 0x4(%eax),%eax 6ce: 01 c2 add %eax,%edx 6d0: 8b 45 f8 mov -0x8(%ebp),%eax 6d3: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 6d6: 8b 45 fc mov -0x4(%ebp),%eax 6d9: 8b 00 mov (%eax),%eax 6db: 8b 10 mov (%eax),%edx 6dd: 8b 45 f8 mov -0x8(%ebp),%eax 6e0: 89 10 mov %edx,(%eax) 6e2: eb 0a jmp 6ee <free+0x98> } else bp->s.ptr = p->s.ptr; 6e4: 8b 45 fc mov -0x4(%ebp),%eax 6e7: 8b 10 mov (%eax),%edx 6e9: 8b 45 f8 mov -0x8(%ebp),%eax 6ec: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 6ee: 8b 45 fc mov -0x4(%ebp),%eax 6f1: 8b 40 04 mov 0x4(%eax),%eax 6f4: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 6fb: 8b 45 fc mov -0x4(%ebp),%eax 6fe: 01 d0 add %edx,%eax 700: 3b 45 f8 cmp -0x8(%ebp),%eax 703: 75 20 jne 725 <free+0xcf> p->s.size += bp->s.size; 705: 8b 45 fc mov -0x4(%ebp),%eax 708: 8b 50 04 mov 0x4(%eax),%edx 70b: 8b 45 f8 mov -0x8(%ebp),%eax 70e: 8b 40 04 mov 0x4(%eax),%eax 711: 01 c2 add %eax,%edx 713: 8b 45 fc mov -0x4(%ebp),%eax 716: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 719: 8b 45 f8 mov -0x8(%ebp),%eax 71c: 8b 10 mov (%eax),%edx 71e: 8b 45 fc mov -0x4(%ebp),%eax 721: 89 10 mov %edx,(%eax) 723: eb 08 jmp 72d <free+0xd7> } else p->s.ptr = bp; 725: 8b 45 fc mov -0x4(%ebp),%eax 728: 8b 55 f8 mov -0x8(%ebp),%edx 72b: 89 10 mov %edx,(%eax) freep = p; 72d: 8b 45 fc mov -0x4(%ebp),%eax 730: a3 00 0b 00 00 mov %eax,0xb00 } 735: 90 nop 736: c9 leave 737: c3 ret 00000738 <morecore>: static Header* morecore(uint nu) { 738: 55 push %ebp 739: 89 e5 mov %esp,%ebp 73b: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 73e: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 745: 77 07 ja 74e <morecore+0x16> nu = 4096; 747: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 74e: 8b 45 08 mov 0x8(%ebp),%eax 751: c1 e0 03 shl $0x3,%eax 754: 83 ec 0c sub $0xc,%esp 757: 50 push %eax 758: e8 39 fc ff ff call 396 <sbrk> 75d: 83 c4 10 add $0x10,%esp 760: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 763: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 767: 75 07 jne 770 <morecore+0x38> return 0; 769: b8 00 00 00 00 mov $0x0,%eax 76e: eb 26 jmp 796 <morecore+0x5e> hp = (Header*)p; 770: 8b 45 f4 mov -0xc(%ebp),%eax 773: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 776: 8b 45 f0 mov -0x10(%ebp),%eax 779: 8b 55 08 mov 0x8(%ebp),%edx 77c: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 77f: 8b 45 f0 mov -0x10(%ebp),%eax 782: 83 c0 08 add $0x8,%eax 785: 83 ec 0c sub $0xc,%esp 788: 50 push %eax 789: e8 c8 fe ff ff call 656 <free> 78e: 83 c4 10 add $0x10,%esp return freep; 791: a1 00 0b 00 00 mov 0xb00,%eax } 796: c9 leave 797: c3 ret 00000798 <malloc>: void* malloc(uint nbytes) { 798: 55 push %ebp 799: 89 e5 mov %esp,%ebp 79b: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 79e: 8b 45 08 mov 0x8(%ebp),%eax 7a1: 83 c0 07 add $0x7,%eax 7a4: c1 e8 03 shr $0x3,%eax 7a7: 83 c0 01 add $0x1,%eax 7aa: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 7ad: a1 00 0b 00 00 mov 0xb00,%eax 7b2: 89 45 f0 mov %eax,-0x10(%ebp) 7b5: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 7b9: 75 23 jne 7de <malloc+0x46> base.s.ptr = freep = prevp = &base; 7bb: c7 45 f0 f8 0a 00 00 movl $0xaf8,-0x10(%ebp) 7c2: 8b 45 f0 mov -0x10(%ebp),%eax 7c5: a3 00 0b 00 00 mov %eax,0xb00 7ca: a1 00 0b 00 00 mov 0xb00,%eax 7cf: a3 f8 0a 00 00 mov %eax,0xaf8 base.s.size = 0; 7d4: c7 05 fc 0a 00 00 00 movl $0x0,0xafc 7db: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7de: 8b 45 f0 mov -0x10(%ebp),%eax 7e1: 8b 00 mov (%eax),%eax 7e3: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 7e6: 8b 45 f4 mov -0xc(%ebp),%eax 7e9: 8b 40 04 mov 0x4(%eax),%eax 7ec: 3b 45 ec cmp -0x14(%ebp),%eax 7ef: 72 4d jb 83e <malloc+0xa6> if(p->s.size == nunits) 7f1: 8b 45 f4 mov -0xc(%ebp),%eax 7f4: 8b 40 04 mov 0x4(%eax),%eax 7f7: 3b 45 ec cmp -0x14(%ebp),%eax 7fa: 75 0c jne 808 <malloc+0x70> prevp->s.ptr = p->s.ptr; 7fc: 8b 45 f4 mov -0xc(%ebp),%eax 7ff: 8b 10 mov (%eax),%edx 801: 8b 45 f0 mov -0x10(%ebp),%eax 804: 89 10 mov %edx,(%eax) 806: eb 26 jmp 82e <malloc+0x96> else { p->s.size -= nunits; 808: 8b 45 f4 mov -0xc(%ebp),%eax 80b: 8b 40 04 mov 0x4(%eax),%eax 80e: 2b 45 ec sub -0x14(%ebp),%eax 811: 89 c2 mov %eax,%edx 813: 8b 45 f4 mov -0xc(%ebp),%eax 816: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 819: 8b 45 f4 mov -0xc(%ebp),%eax 81c: 8b 40 04 mov 0x4(%eax),%eax 81f: c1 e0 03 shl $0x3,%eax 822: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 825: 8b 45 f4 mov -0xc(%ebp),%eax 828: 8b 55 ec mov -0x14(%ebp),%edx 82b: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 82e: 8b 45 f0 mov -0x10(%ebp),%eax 831: a3 00 0b 00 00 mov %eax,0xb00 return (void*)(p + 1); 836: 8b 45 f4 mov -0xc(%ebp),%eax 839: 83 c0 08 add $0x8,%eax 83c: eb 3b jmp 879 <malloc+0xe1> } if(p == freep) 83e: a1 00 0b 00 00 mov 0xb00,%eax 843: 39 45 f4 cmp %eax,-0xc(%ebp) 846: 75 1e jne 866 <malloc+0xce> if((p = morecore(nunits)) == 0) 848: 83 ec 0c sub $0xc,%esp 84b: ff 75 ec pushl -0x14(%ebp) 84e: e8 e5 fe ff ff call 738 <morecore> 853: 83 c4 10 add $0x10,%esp 856: 89 45 f4 mov %eax,-0xc(%ebp) 859: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 85d: 75 07 jne 866 <malloc+0xce> return 0; 85f: b8 00 00 00 00 mov $0x0,%eax 864: eb 13 jmp 879 <malloc+0xe1> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 866: 8b 45 f4 mov -0xc(%ebp),%eax 869: 89 45 f0 mov %eax,-0x10(%ebp) 86c: 8b 45 f4 mov -0xc(%ebp),%eax 86f: 8b 00 mov (%eax),%eax 871: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 874: e9 6d ff ff ff jmp 7e6 <malloc+0x4e> } 879: c9 leave 87a: c3 ret
lib/aflexnat/misc_defs.adb
alvaromb/Compilemon
1
21406
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by <NAME> of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- TITLE miscellaneous definitions -- AUTHOR: <NAME> (UCI) -- DESCRIPTION contains all global variables used in aflex. -- also some subprograms which are commonly used. -- NOTES The real purpose of this file is to contain all miscellaneous -- items (functions, MACROS, variables definitions) which were at the -- top level of flex. -- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/misc_defsB.a,v 1.5 90/01/12 15:20:21 self Exp Locker: self $ package body misc_defs is -- returns true if an nfa state has an epsilon out-transition slot -- that can be used. This definition is currently not used. function FREE_EPSILON(STATE : in INTEGER) return BOOLEAN is begin return ((TRANSCHAR(STATE) = SYM_EPSILON) and (TRANS2(STATE) = NO_TRANSITION) and (FINALST(STATE) /= STATE)); end FREE_EPSILON; -- returns true if an nfa state has an epsilon out-transition character -- and both slots are free function SUPER_FREE_EPSILON(STATE : in INTEGER) return BOOLEAN is begin return ((TRANSCHAR(STATE) = SYM_EPSILON) and (TRANS1(STATE) = NO_TRANSITION) ); end SUPER_FREE_EPSILON; function ALLOCATE_INTEGER_ARRAY(SIZE : in INTEGER) return INT_PTR is begin return new UNBOUNDED_INT_ARRAY(0 .. SIZE); end ALLOCATE_INTEGER_ARRAY; procedure REALLOCATE_INTEGER_ARRAY(ARR : in out INT_PTR; SIZE : in INTEGER) is NEW_ARR : INT_PTR; begin NEW_ARR := ALLOCATE_INTEGER_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_INTEGER_ARRAY; procedure REALLOCATE_STATE_ENUM_ARRAY(ARR : in out STATE_ENUM_PTR; SIZE : in INTEGER) is NEW_ARR : STATE_ENUM_PTR; begin NEW_ARR := ALLOCATE_STATE_ENUM_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_STATE_ENUM_ARRAY; procedure REALLOCATE_RULE_ENUM_ARRAY(ARR : in out RULE_ENUM_PTR; SIZE : in INTEGER) is NEW_ARR : RULE_ENUM_PTR; begin NEW_ARR := ALLOCATE_RULE_ENUM_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_RULE_ENUM_ARRAY; function ALLOCATE_INT_PTR_ARRAY(SIZE : in INTEGER) return INT_STAR_PTR is begin return new UNBOUNDED_INT_STAR_ARRAY(0 .. SIZE); end ALLOCATE_INT_PTR_ARRAY; function ALLOCATE_RULE_ENUM_ARRAY(SIZE : in INTEGER) return RULE_ENUM_PTR is begin return new UNBOUNDED_RULE_ENUM_ARRAY(0 .. SIZE); end ALLOCATE_RULE_ENUM_ARRAY; function ALLOCATE_STATE_ENUM_ARRAY(SIZE : in INTEGER) return STATE_ENUM_PTR is begin return new UNBOUNDED_STATE_ENUM_ARRAY(0 .. SIZE); end ALLOCATE_STATE_ENUM_ARRAY; function ALLOCATE_BOOLEAN_ARRAY(SIZE : in INTEGER) return BOOLEAN_PTR is begin return new BOOLEAN_ARRAY(0 .. SIZE); end ALLOCATE_BOOLEAN_ARRAY; function ALLOCATE_VSTRING_ARRAY(SIZE : in INTEGER) return VSTRING_PTR is begin return new UNBOUNDED_VSTRING_ARRAY(0 .. SIZE); end ALLOCATE_VSTRING_ARRAY; function ALLOCATE_DFAACC_UNION(SIZE : in INTEGER) return DFAACC_PTR is begin return new UNBOUNDED_DFAACC_ARRAY(0 .. SIZE); end ALLOCATE_DFAACC_UNION; procedure REALLOCATE_INT_PTR_ARRAY(ARR : in out INT_STAR_PTR; SIZE : in INTEGER) is NEW_ARR : INT_STAR_PTR; begin NEW_ARR := ALLOCATE_INT_PTR_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_INT_PTR_ARRAY; procedure REALLOCATE_CHARACTER_ARRAY(ARR : in out CHAR_PTR; SIZE : in INTEGER) is NEW_ARR : CHAR_PTR; begin NEW_ARR := ALLOCATE_CHARACTER_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_CHARACTER_ARRAY; procedure REALLOCATE_VSTRING_ARRAY(ARR : in out VSTRING_PTR; SIZE : in INTEGER) is NEW_ARR : VSTRING_PTR; begin NEW_ARR := ALLOCATE_VSTRING_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_VSTRING_ARRAY; function ALLOCATE_CHARACTER_ARRAY(SIZE : in INTEGER) return CHAR_PTR is begin return new CHAR_ARRAY(0 .. SIZE); end ALLOCATE_CHARACTER_ARRAY; procedure REALLOCATE_DFAACC_UNION(ARR : in out DFAACC_PTR; SIZE : in INTEGER) is NEW_ARR : DFAACC_PTR; begin NEW_ARR := ALLOCATE_DFAACC_UNION(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_DFAACC_UNION; procedure REALLOCATE_BOOLEAN_ARRAY(ARR : in out BOOLEAN_PTR; SIZE : in INTEGER) is NEW_ARR : BOOLEAN_PTR; begin NEW_ARR := ALLOCATE_BOOLEAN_ARRAY(SIZE); NEW_ARR(0 .. ARR'LAST) := ARR(0 .. ARR'LAST); ARR := NEW_ARR; end REALLOCATE_BOOLEAN_ARRAY; function MAX(X, Y : in INTEGER) return INTEGER is begin if (X > Y) then return X; else return Y; end if; end MAX; function MIN(X, Y : in INTEGER) return INTEGER is begin if (X < Y) then return X; else return Y; end if; end MIN; end misc_defs;
src/Relation/Binary/Indexed/Extra.agda
banacorn/categories
1
9980
------------------------------------------------------------------------ -- Extension The Agda standard library -- -- Properties of indexed binary relations ------------------------------------------------------------------------ module Relation.Binary.Indexed.Extra where open import Data.Product open import Data.Sum open import Function open import Level -- import Relation.Binary.PropositionalEquality.Core as PropEq -- open import Relation.Binary.Consequences as Consequences open import Relation.Binary.Core as Core using (_≡_) open import Relation.Binary.Indexed.Core open import Relation.Binary.Indexed import Relation.Binary as B ------------------------------------------------------------------------ -- Simple properties and equivalence relations -- open Core public hiding (_≡_; refl; _≢_) -- -- open Consequences public using (Total) ------------------------------------------------------------------------ -- Simple properties of indexed binary relations -- Implication/containment. Could also be written ⊆. [_][_]_⇒_ : ∀ {i₁ i₂ a b ℓ₁ ℓ₂} {I₁ : Set i₁} {I₂ : Set i₂} (A : I₁ → Set a) (B : I₂ → Set b) → REL A B ℓ₁ → REL A B ℓ₂ → Set _ [ A ][ B ] P ⇒ Q = ∀ {i₁ i₂} {x : A i₁} {y : B i₂} → P x y → Q x y -- _Preserves_⟶_ : ∀ {a b ℓ₁ ℓ₂} {A : Set a} {B : A → Set b} → -- ((x : A) → B x) → B.Rel A ℓ₁ → Rel B ℓ₂ → Set (ℓ₂ ⊔ (ℓ₁ ⊔ a)) -- f Preserves P ⟶ Q = P =[ f ]⇒ Q _Respects_ : ∀ {𝒾 a ℓ₁ ℓ₂} {I : Set 𝒾} {A : I → Set a} {i : I} → (A i → Set ℓ₁) → Rel A ℓ₂ → Set (ℓ₂ ⊔ (ℓ₁ ⊔ a)) P Respects _∼_ = ∀ {x y} → x ∼ y → P x → P y [_]_Respects₂_ : ∀ {𝒾 a ℓ₁ ℓ₂} {I : Set 𝒾} (A : I → Set a) → Rel A ℓ₁ → Rel A ℓ₂ → Set (ℓ₂ ⊔ (ℓ₁ ⊔ (a ⊔ 𝒾))) [ A ] P Respects₂ _∼_ = (∀ {i} {x : A i} → _Respects_ {A = A} {i = i} (P x) _∼_) × (∀ {i} {y : A i} → _Respects_ {A = A} {i = i} (flip P y) _∼_) ------------------------------------------------------------------------ -- Preorders record IsPreorder {𝒾 a ℓ₁ ℓ₂} {I : Set 𝒾} (A : I → Set a) (_≈_ : Rel A ℓ₁) -- The underlying equality. (_∼_ : Rel A ℓ₂) -- The relation. : Set (𝒾 ⊔ a ⊔ ℓ₁ ⊔ ℓ₂) where field isEquivalence : IsEquivalence A _≈_ -- Reflexivity is expressed in terms of an underlying equality: reflexive : [ A ][ A ] _≈_ ⇒ _∼_ trans : Transitive A _∼_ module Eq = IsEquivalence isEquivalence refl : Reflexive A _∼_ refl = reflexive Eq.refl ∼-resp-≈ : [ A ] _∼_ Respects₂ _≈_ ∼-resp-≈ = (λ x≈y z∼x → trans z∼x (reflexive x≈y)) , (λ x≈y x∼z → trans (reflexive $ Eq.sym x≈y) x∼z) record Preorder {i} (I : Set i) c ℓ₁ ℓ₂ : Set (suc (i ⊔ c ⊔ ℓ₁ ⊔ ℓ₂)) where infix 4 _≈_ _∼_ field Carrier : I → Set c _≈_ : Rel Carrier ℓ₁ -- The underlying equality. _∼_ : Rel Carrier ℓ₂ -- The relation. isPreorder : IsPreorder Carrier _≈_ _∼_ open IsPreorder isPreorder public SetoidIsPreorder : ∀ {𝒾} {I : Set 𝒾} {c ℓ} (S : Setoid I c ℓ) → IsPreorder (Setoid.Carrier S) (Setoid._≈_ S) (Setoid._≈_ S) SetoidIsPreorder {𝒾} {I} S = record { isEquivalence = isEquivalence ; reflexive = id ; trans = IsEquivalence.trans isEquivalence } where open Setoid S Setoid⇒Preorder : ∀ {𝒾} {I : Set 𝒾} {c ℓ} (S : Setoid I c ℓ) → Preorder I c ℓ ℓ Setoid⇒Preorder S = record { isPreorder = SetoidIsPreorder S } -- record -- { Carrier = {! !} -- ; _≈_ = {! !} -- ; _∼_ = {! !} -- ; isPreorder = {! !} -- } -- IsEquivalence.reflexive (Setoid.isEquivalence S) -- where open IsEquivalence {! !} -- -- isPreorder : IsPreorder _≡_ _≈_ -- isPreorder = record -- { isEquivalence = PropEq.isEquivalence -- ; reflexive = reflexive -- ; trans = trans -- } -- -- preorder : Preorder c c ℓ -- preorder = record { isPreorder = isPreorder }
oeis/264/A264152.asm
neoneye/loda-programs
11
26005
; A264152: a(n) = (2^floor(n+n/2)/sqrt(Pi)^mod(n+1,2))*Gamma(n+1/2)/Gamma(n/2+1). ; Submitted by <NAME> ; 1,2,6,40,210,2016,13860,164736,1351350,18670080,174594420,2708858880,28109701620,479259648000,5421156741000,100069414502400,1218404977539750,24087296714342400,312723944235202500,6566957735804928000,90252130306279441500,2000107698962300928000,28929910132721937339000,673079721302965616640000,10197793321784482911997500,248016415705716770419507200,3920659309406065045704885000,99316795800378137843544883200,1632674555274097086889962825000,42945952390922132708898373632000 mov $3,$0 add $3,$0 bin $3,$0 sub $0,1 mov $2,$3 lpb $0 mul $2,$0 sub $0,2 lpe mov $0,$2
programs/oeis/100/A100431.asm
neoneye/loda
22
22602
; A100431: Bisection of A002417. ; 8,80,336,960,2200,4368,7840,13056,20520,30800,44528,62400,85176,113680,148800,191488,242760,303696,375440,459200,556248,667920,795616,940800,1105000,1289808,1496880,1727936,1984760,2269200,2583168,2928640,3307656,3722320 add $0,1 mul $0,2 mov $3,$0 lpb $0 sub $0,1 add $2,$3 add $4,$2 add $1,$4 lpe mov $0,$1
SemiLin.agda
JoeyEremondi/agda-parikh
0
12984
<filename>SemiLin.agda {- <NAME> Utrecht University Capita Selecta UU# 4229924 July 22, 2015 -} module SemiLin where open import Data.Vec open import Data.Nat import Data.Fin as Fin open import Data.List import Data.List.All open import Data.Bool open import Data.Char open import Data.Maybe open import Data.Product open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Relation.Nullary open import Relation.Nullary.Decidable open import Relation.Binary.Core open import Category.Monad open import Data.Nat.Properties.Simple open import Data.Maybe open import Relation.Binary.PropositionalEquality open ≡-Reasoning open import Utils open import Function import RETypes open import Data.Sum import Data.Nat.Properties.Simple --The Parikh vector for a word is the count of occurrences of --each letter of our alphabet in that word. --We just represent this as a vector of Natural numbers Parikh : ℕ -> Set Parikh n = Vec ℕ n --Scalar multiplication _·ₛ_ : {n : ℕ} -> ℕ -> Parikh n -> Parikh n c ·ₛ [] = [] c ·ₛ (x ∷ vt) = (c * x) ∷ (c ·ₛ vt) --Vector addition _+v_ : {n : ℕ} -> Parikh n -> Parikh n -> Parikh n [] +v [] = [] (x ∷ ut) +v (y ∷ vt) = x + y ∷ ut +v vt --The zero vector v0 : {n : ℕ} -> Parikh n v0 {zero} = [] v0 {suc n} = 0 ∷ v0 --0 times anything is v0 scalar0ident : {n : ℕ} -> (v : Parikh n ) -> 0 ·ₛ v ≡ v0 scalar0ident [] = refl scalar0ident (x ∷ v) = cong (_∷_ zero) (scalar0ident v) --Prove that 0 is a neutral element on the left v0identLeft : {n : ℕ} -> {v : Parikh n} -> v0 +v v ≡ v v0identLeft {v = []} = refl v0identLeft {v = x ∷ v} = let subIdent = v0identLeft {v = v} in cong (λ t → x ∷ t) subIdent --Prove that vector addition is commutative v+-commut : {n : ℕ} -> (u : Parikh n) -> (v : Parikh n) -> (u +v v ≡ v +v u) v+-commut [] [] = refl v+-commut (x ∷ u) (y ∷ v) rewrite +-comm x y | v+-commut u v = refl --Prove the right-identity for vector addition with 0 --Just conbines commutativity and the left identity v0identRight : {n : ℕ} -> {v : Parikh n} -> v +v v0 ≡ v v0identRight {v = v} = begin v +v v0 ≡⟨ v+-commut v v0 ⟩ v0 +v v ≡⟨ v0identLeft ⟩ v ∎ --Prove that vector addition is associative --I couldn't figure out how to get this one working with rewrite vAssoc : {n : ℕ} -> {x : Parikh n} {y : Parikh n} {z : Parikh n} -> (x +v y) +v z ≡ x +v (y +v z) vAssoc {zero} {[]} {[]} {[]} = refl vAssoc {suc n} {xh ∷ xt} {yh ∷ yt} {zh ∷ zt} = let x = xh ∷ xt y = yh ∷ yt z = zh ∷ zt in --_≡⟨_⟩_ begin (x +v y) +v z ≡⟨ refl ⟩ (xh + yh + zh) ∷ (xt +v yt) +v zt ≡⟨ cong (λ h → h ∷ (xt +v yt) +v zt) (+-assoc xh yh zh) ⟩ xh + (yh + zh) ∷ (xt +v yt) +v zt ≡⟨ cong (λ t → xh + (yh + zh) ∷ t) vAssoc ⟩ (xh + (yh + zh) ∷ xt +v (yt +v zt)) ≡⟨ refl ⟩ x +v (y +v z) ∎ -- Wouter: here's one definition using rewrite... vAssoc2 : {n : ℕ} -> {x : Parikh n} {y : Parikh n} {z : Parikh n} -> (x +v y) +v z ≡ x +v (y +v z) vAssoc2 {x = []} {[]} {[]} = refl vAssoc2 {x = x ∷ xs} {y ∷ ys} {z ∷ zs} rewrite +-assoc x y z | vAssoc {x = xs} {y = ys} {z = zs} = refl --Prove that scalar multiplication distributes over vector addition scalarAssoc : {n : ℕ} -> (x y : ℕ ) -> (v : Parikh n) -> (x + y) ·ₛ v ≡ (x ·ₛ v) +v (y ·ₛ v) scalarAssoc x y [] = refl scalarAssoc x y (vfirst ∷ v) rewrite scalarAssoc x y v | distribʳ-*-+ vfirst x y = refl --Handy lemma, prove that 0 + anything is 0 ident0 : (x : ℕ) -> x + 0 ≡ x ident0 zero = refl ident0 (suc x) = cong suc (ident0 x) --Show that 1 is an identity for scalar multiplication scalarIdent : {n : ℕ} -> (v : Parikh n) -> (1 ·ₛ v ≡ v ) scalarIdent [] = refl scalarIdent (x ∷ v) rewrite scalarIdent v | ident0 x = refl --A linear set is defined by an offset vector b --And a set of m vectors v1 ... vm. --A vector u is in a linear set if there exists constants c1 ... cm --such that u = b + c1·v1 + ... + cm·vm -- Wouter -- do you really want to existentially quantify m? -- You could also define LinSet n m = Parikh n × Vec (Parikh n) m -- I don' think it makes a whole lot of difference, but later on in applyLinCom -- you use this anyway. -- For what it's worth, you may want to note that ∃ n . Vec a n is isomorphic to List a LinSet : ℕ -> Set LinSet n = (Parikh n) × (∃ λ (m : ℕ) → Vec (Parikh n) m ) --Given an offset vector, a set of m Parikh vectors, and a set of m constants --Return b + c1·v1 + ... + cm·vm -- Wouter: you might want to consider defining this directly by recursion over the -- cs and vset. The induction you use in this definition will determine how easy/hard -- it might be to reason about this function later. -- See the proof of sumPreserved in SemiLinRE, for instance. applyLinComb : {n : ℕ} -> Parikh n -> (m : ℕ ) -> (Vec (Parikh n) m ) -> Vec ℕ m -> Parikh n applyLinComb base .0 [] cs = base applyLinComb base (suc m) (firstVec ∷ vset) (firstConst ∷ cs) = (firstConst ·ₛ firstVec) +v (applyLinComb base m vset cs) --Show that, if all the coefficients in a linear combination are 0, that the resulting vector is the base (offset) vector v0apply : {n m : ℕ} -> (base : Parikh n) -> (vecs : Vec (Parikh n) m ) -> applyLinComb base m vecs (v0 {m}) ≡ base v0apply base [] = refl v0apply {n} {suc m} base (x ∷ vecs) rewrite scalar0ident x | v0apply base vecs = v0identLeft --A type acting as a witness that a vector is in a linear set --Is just a set of coefficients, and a proof that those coefficients --form v as a linear combination of vectors in our linear set's list LinComb : {n : ℕ} -> Parikh n -> LinSet n -> Set LinComb {n} initV (base , m , vset) = ∃ (λ (cs : Vec ℕ m) -> applyLinComb base m vset cs ≡ initV ) --Sum of each vector in a linear set i.e. L1 + L2 = {x + y | x in L1, y in L2 } --We just add the bases, and concatenate the list of vectors which can be multiplied by constants _+l_ : {n : ℕ} -> LinSet n -> LinSet n -> LinSet n (base1 , m1 , vecs1 ) +l (base2 , m2 , vecs2 ) = (base1 +v base2 , m1 + m2 , vecs1 Data.Vec.++ vecs2 ) --A semi-linear is a finite union of linear sets --We represent this using a list of linear sets SemiLinSet : ℕ -> Set SemiLinSet n = List (LinSet n) --Sum each linear set in the two semi-linear sets --We basically just do a pairwise +l for each linear set in each of the semi-linear sets _+s_ : {n : ℕ} -> SemiLinSet n -> SemiLinSet n -> SemiLinSet n s1 +s s2 = Data.List.concat (Data.List.map (λ l1 -> Data.List.map (λ l2 -> l1 +l l2 ) s2 ) s1 ) --Data type for a witness that an element is in a semiLinear set --Basically just a proof that there's some element (linear set) of the list containing the vector data InSemiLin : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> Set where InHead : {n : ℕ} -> (v : Parikh n) -> (sh : LinSet n) -> (st : SemiLinSet n) -> LinComb v sh -> InSemiLin v (sh ∷ st) InTail : {n : ℕ} -> (v : Parikh n) -> (sh : LinSet n) -> (st : SemiLinSet n) -> InSemiLin v st -> InSemiLin v (sh ∷ st) --Creates a vector --Which has 1 in the specified component, and 0 elsewhere basis : { n : ℕ} -> ( i : Fin.Fin n ) -> Parikh n basis Fin.zero = Data.Vec.[ suc zero ] Data.Vec.++ v0 basis (Fin.suc f) = 0 ∷ basis f --A proof that if a vector is in a SemiLinear set, then the vector is also in the --union of that SemiLinear set with another single linear set slExtend : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> InSemiLin v sl -> (ls : LinSet n) -> InSemiLin v (ls ∷ sl ) slExtend v sl inTail ls = InTail v ls sl inTail --the above proof, but extended to an arbitrary number of linear sets slConcatLeft : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> InSemiLin v sl -> (sl2 : SemiLinSet n) -> InSemiLin v (sl2 Data.List.++ sl ) slConcatLeft v sl inTail [] = inTail slConcatLeft v sl inTail (x ∷ sl2) = InTail v x (sl2 Data.List.++ sl) (slConcatLeft v sl inTail sl2) --The above proof, but the vectors are concatenated on the right slConcatRight : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> InSemiLin v sl -> (sl2 : SemiLinSet n) -> InSemiLin v (sl Data.List.++ sl2 ) slConcatRight v .(sh ∷ st) (InHead .v sh st x) sl2 = (InHead v sh (st Data.List.++ sl2) x) slConcatRight v .(sh ∷ st) (InTail .v sh st inTail) sl2 = slExtend v (st Data.List.++ sl2) (slConcatRight v st inTail sl2) sh --Show that, if a vector is in a linear-set, then it is in a semi-linear set containing that linear set slCons : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> (ls : LinSet n) -> (InSemiLin v (ls ∷ [] ) ) -> InSemiLin v (ls ∷ sl ) slCons v sl sh (InHead .v .sh .[] x) = InHead v sh sl x slCons v sl sh (InTail .v .sh .[] ()) --A linear set containing only v0 l0 : {n : ℕ} -> LinSet n l0 = (v0 , zero , [] ) --A semi-linear set containing only v0 s0 : {n : ℕ} -> SemiLinSet n s0 = (v0 , zero , [] ) ∷ [] --Show that, if a vector is in s0, then it must be v0 s0match : {n : ℕ} -> (v : Parikh n) -> InSemiLin v s0 -> v ≡ v0 s0match .v0 (InHead .v0 .(v0 , 0 , []) .[] (comb , refl)) = refl s0match v (InTail .v .(v0 , 0 , []) .[] ()) --Show that if a vector is in a semi-lin set, then it's not the empty list inSemiNonEmtpy : {n : ℕ} -> (v : Parikh n) -> (s : SemiLinSet n) -> InSemiLin v s -> ∃ λ sh -> ∃ λ st -> s ≡ sh ∷ st inSemiNonEmtpy v .(sh ∷ st) (InHead .v sh st x) = sh , st , refl inSemiNonEmtpy v .(sh ∷ st) (InTail .v sh st inSemi) = sh , st , refl -------------Functions for Star ------------------ -- Star is by far the most complicated case, so a large number of definitions and lemmas --Are dedicated to it --Given a linear set L, find another linear set --such that L = L +l (L*) --We do this by allowing the base to appear an arbitrary number of times linStar : {n : ℕ} -> LinSet n -> LinSet n linStar (base , m , vecs ) = (base , suc m , base ∷ vecs ) --Given a non-empty semi-linear set, find the sum of the star --of all linear sets it contains starSum : {n : ℕ} -> LinSet n -> SemiLinSet n -> LinSet n starSum ls [] = linStar ls starSum first (sh ∷ s) = (linStar sh) +l starSum first s --The semi-linear set for the Star of a regular expression --The semi-linear set always contains 0, since the empty string matches r* --We then union s0 with the sum of the star of each linear set --in the Parikh image of r starSemiLin : {n : ℕ} -> SemiLinSet n -> SemiLinSet n starSemiLin [] = s0 starSemiLin (first ∷ s) = s0 Data.List.++ (  starSum first s ∷ []) --Show that v0 is always in a star semi-linear set zeroInStar : {n : ℕ} -> (s ss : SemiLinSet n) -> ss ≡ (starSemiLin s) -> InSemiLin v0 ss zeroInStar [] .((v0 , 0 , []) ∷ []) refl = InHead v0 (v0 , zero , []) [] ([] , refl) zeroInStar (x ∷ s) .((v0 , 0 , []) ∷ starSum x s ∷ []) refl = InHead v0 (v0 , zero , []) (starSum x s ∷ []) ([] , refl) --Show that if we sum two linear sets, then the number of vectors that can be combined --is the sum of the number in each input set linSetLen : {n : ℕ} -> (l1 l2 l3 : LinSet n) -> l1 +l l2 ≡ l3 -> (proj₁ (proj₂ l3)) ≡ (proj₁ (proj₂ l1)) + (proj₁ (proj₂ l2)) linSetLen (proj₁ , m1 , proj₂) (proj₃ , m2 , proj₄) .(proj₁ +v proj₃ , m1 + m2 , proj₂ Data.Vec.++ proj₄) refl = refl --Useful lemma, suc x = x + 1 plusOneDef : ( x : ℕ) -> (suc x ≡ x + 1) plusOneDef zero = refl plusOneDef (suc x) = cong suc (plusOneDef x) --Show that we can "remove" part of the base vector --When making a linear combination baseSplit : {n : ℕ} (ub vb : Parikh n) (vm : ℕ) (vvecs : Vec (Parikh n) vm) (vconsts : Vec ℕ vm) -> applyLinComb (ub +v vb) vm vvecs vconsts ≡ ub +v applyLinComb vb vm vvecs vconsts baseSplit ub vb .0 [] [] = refl baseSplit ub vb (suc m) (x ∷ vvecs) (c ∷ vconsts) = begin applyLinComb (ub +v vb) (suc m) (x ∷ vvecs) (c ∷ vconsts) ≡⟨ refl ⟩ --cong {!!} (baseSplit ub vb _ vvecs vconsts) (c ·ₛ x) +v applyLinComb (ub +v vb) m vvecs vconsts ≡⟨ cong (λ x₁ → (c ·ₛ x) +v x₁) (baseSplit ub vb m vvecs vconsts) ⟩ (c ·ₛ x) +v (ub +v applyLinComb vb m vvecs vconsts) ≡⟨ sym vAssoc ⟩ ((c ·ₛ x) +v ub) +v applyLinComb vb m vvecs vconsts ≡⟨ cong (λ x₁ → x₁ +v applyLinComb vb m vvecs vconsts) (v+-commut (c ·ₛ x) ub) ⟩ (ub +v (c ·ₛ x)) +v applyLinComb vb m vvecs vconsts ≡⟨ vAssoc ⟩ (ub +v ((c ·ₛ x) +v applyLinComb vb m vvecs vconsts) ∎) --If we have two linear combinations of vectors, --That we can make it into a single combination of vectors --By adding the bases, and concatenating the vector lists, and -- concatenating the coefficient lists combSplit : {n : ℕ} (ub vb : Parikh n) (um vm : ℕ) (uvecs : Vec (Parikh n) um) (vvecs : Vec (Parikh n) vm) (uconsts : Vec ℕ um) (vconsts : Vec ℕ vm) -> (applyLinComb (ub +v vb) (um + vm) (uvecs Data.Vec.++ vvecs) (uconsts Data.Vec.++ vconsts) ≡ (applyLinComb ub um uvecs uconsts) +v (applyLinComb vb vm vvecs vconsts) ) combSplit ub vb .0 vm [] vvecs [] vconsts = baseSplit ub vb vm vvecs vconsts combSplit ub vb (suc um) vm (x ∷ uvecs) vvecs (uc ∷ uconsts) vconsts = begin applyLinComb (ub +v vb) (suc (um + vm)) (x ∷ uvecs Data.Vec.++ vvecs) ((uc ∷ uconsts) Data.Vec.++ vconsts) ≡⟨ refl ⟩ (uc ·ₛ x) +v applyLinComb (ub +v vb) (um + vm) (uvecs Data.Vec.++ vvecs) (uconsts Data.Vec.++ vconsts) ≡⟨ cong (λ x₁ → (uc ·ₛ x) +v x₁) (combSplit ub vb um vm uvecs vvecs uconsts vconsts) ⟩ (uc ·ₛ x) +v (applyLinComb ub um uvecs uconsts +v applyLinComb vb vm vvecs vconsts) ≡⟨ sym vAssoc ⟩ ((uc ·ₛ x) +v applyLinComb ub um uvecs uconsts) +v applyLinComb vb vm vvecs vconsts ≡⟨ refl ⟩ (((uc ·ₛ x) +v applyLinComb ub um uvecs uconsts) +v applyLinComb vb vm vvecs vconsts ∎) --Extend the idea of distributivity to linear combinations --Basically, the c1*v +v c2*v = (c1 +v c2 )*v, where * is element-wise product applyCombSum : {n m : ℕ} -> (vecs : Vec (Parikh n) m ) -> (uconsts vconsts : Parikh m ) -> applyLinComb v0 m vecs (uconsts +v vconsts) ≡ applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts applyCombSum [] uconsts vconsts = sym v0identRight applyCombSum {n} {suc m} (firstVec ∷ vecs) (uc ∷ uconsts) (vc ∷ vconsts) rewrite applyCombSum vecs uconsts vconsts | scalarAssoc uc vc firstVec = begin ((uc ·ₛ firstVec) +v (vc ·ₛ firstVec)) +v (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts) ≡⟨ vAssoc ⟩ (uc ·ₛ firstVec) +v ((vc ·ₛ firstVec) +v (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts)) ≡⟨ cong (λ x → (uc ·ₛ firstVec) +v x) (v+-commut (vc ·ₛ firstVec) (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts)) ⟩ (uc ·ₛ firstVec) +v ((applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts) +v (vc ·ₛ firstVec)) ≡⟨ sym vAssoc ⟩ ((uc ·ₛ firstVec) +v (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts)) +v (vc ·ₛ firstVec) ≡⟨ cong (λ x → x +v (vc ·ₛ firstVec)) (sym vAssoc) ⟩ (((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v applyLinComb v0 m vecs vconsts) +v (vc ·ₛ firstVec) ≡⟨ vAssoc ⟩ ((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v (applyLinComb v0 m vecs vconsts +v (vc ·ₛ firstVec)) ≡⟨ cong (λ x → ((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v x) (v+-commut (applyLinComb v0 m vecs vconsts) (vc ·ₛ firstVec)) ⟩ ((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v ((vc ·ₛ firstVec) +v applyLinComb v0 m vecs vconsts) ∎ --If a linear set has base 0, and u and v are both in that set, then u+v is as well sumEqualVecs : {n : ℕ} -> (ls : LinSet n) -> (proj₁ ls ≡ v0) -> (u v : Parikh n) -> LinComb u ls -> LinComb v ls -> LinComb (u +v v) ls sumEqualVecs (.v0 , m , vecs) refl .(applyLinComb v0 m vecs uconsts) .(applyLinComb v0 m vecs vconsts) (uconsts , refl) (vconsts , refl) = (uconsts +v vconsts) , applyCombSum vecs uconsts vconsts --applyCombSum {!!} {!!} vecs uconsts vconsts --Show that the base vector of a linear set is always in that set, just set coefficients to 0 linContainsBase : {n : ℕ} -> (base : Parikh n) -> (m : ℕ ) -> (vecs : Vec (Parikh n) m ) -> applyLinComb base m vecs v0 ≡ base linContainsBase base .0 [] = refl linContainsBase base (suc m) (x ∷ vecs) rewrite linContainsBase base m vecs = begin (zero ·ₛ x) +v base ≡⟨ cong (λ y → y +v base) (scalar0ident x) ⟩ v0 +v base ≡⟨ v0identLeft ⟩ (base ∎) --Show that applying a linear combination with the base is just --The base, plus the linear combination with v0 base --Just a useful lemma for other proofs, basically uses associativity linCombRemoveBase : {n : ℕ} -> (m : ℕ ) -> (base : Parikh n ) -> (vecs : Vec (Parikh n) m ) -> (c : Parikh m) -> applyLinComb base m vecs c ≡ base +v applyLinComb v0 m vecs c linCombRemoveBase {n} m base vecs c = begin applyLinComb base m vecs c ≡⟨ cong (λ x → applyLinComb x m vecs c) (sym v0identRight) ⟩ applyLinComb (base +v v0) m vecs c ≡⟨ baseSplit base v0 m vecs c ⟩ base +v applyLinComb v0 m vecs c ∎ --Show that only v0 is in a set with no vectors and v0 base emptyCombZero : {n : ℕ} -> (v : Parikh n ) -> LinComb v (v0 , 0 , []) -> v ≡ v0 emptyCombZero .v0 ([] , refl) = refl --Show that when we add two linear combinations of the same vectors together, --We get a linear combination of those vectors, with an extra base left-over linCombDecompBase : {n : ℕ} -> (m : ℕ ) -> (base : Parikh n ) -> (vecs : Vec (Parikh n) m ) -> (c1 : Parikh m ) -> (c2 : Parikh m) -> (applyLinComb base m vecs c1 ) +v (applyLinComb base m vecs c2 ) ≡ base +v applyLinComb base m vecs (c1 +v c2) linCombDecompBase .0 base [] c1 c2 = refl linCombDecompBase (suc m) base (vec1 ∷ vecs) (c ∷ c1) (cc ∷ c2) rewrite linCombDecompBase m base vecs c1 c2 | linCombRemoveBase m base vecs c1 | linCombRemoveBase m base vecs c2 = begin ((c ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c1)) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → x +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) (sym vAssoc ) ⟩ (((c ·ₛ vec1) +v base) +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → (x +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) (v+-commut (c ·ₛ vec1) base) ⟩ ((base +v (c ·ₛ vec1)) +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → x +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) vAssoc ⟩ (base +v ((c ·ₛ vec1) +v applyLinComb v0 m vecs c1)) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ vAssoc ⟩ base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) ≡⟨ cong (λ x → base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v x)) (sym vAssoc) ⟩ base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v (((cc ·ₛ vec1) +v base) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v (x +v applyLinComb v0 m vecs c2))) (v+-commut (cc ·ₛ vec1) base) ⟩ base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v ((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v x) vAssoc ⟩ base +v ((c ·ₛ vec1) +v (applyLinComb v0 m vecs c1 +v ((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs c2))) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v x)) (sym vAssoc) ⟩ base +v ((c ·ₛ vec1) +v ((applyLinComb v0 m vecs c1 +v (base +v (cc ·ₛ vec1))) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v (x +v applyLinComb v0 m vecs c2))) (v+-commut (applyLinComb v0 m vecs c1) (base +v (cc ·ₛ vec1))) ⟩ base +v ((c ·ₛ vec1) +v (((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs c1) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v x)) vAssoc ⟩ base +v ((c ·ₛ vec1) +v ((base +v (cc ·ₛ vec1)) +v (applyLinComb v0 m vecs c1 +v applyLinComb v0 m vecs c2))) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v ((base +v (cc ·ₛ vec1)) +v x))) (sym (applyCombSum vecs c1 c2)) ⟩ base +v ((c ·ₛ vec1) +v ((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2))) ≡⟨ cong (λ x → base +v x) (sym vAssoc) ⟩ base +v (((c ·ₛ vec1) +v (base +v (cc ·ₛ vec1))) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (x +v applyLinComb v0 m vecs (c1 +v c2))) (sym vAssoc) ⟩ base +v ((((c ·ₛ vec1) +v base) +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v ((x +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2))) (v+-commut (c ·ₛ vec1) base) ⟩ base +v (((base +v (c ·ₛ vec1)) +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (x +v applyLinComb v0 m vecs (c1 +v c2))) vAssoc ⟩ base +v ((base +v ((c ·ₛ vec1) +v (cc ·ₛ vec1))) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v ((base +v x) +v applyLinComb v0 m vecs (c1 +v c2))) (sym (scalarAssoc c cc vec1)) ⟩ base +v ((base +v ((c + cc) ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (x +v applyLinComb v0 m vecs (c1 +v c2))) (v+-commut base ((c + cc) ·ₛ vec1)) ⟩ base +v ((((c + cc) ·ₛ vec1) +v base) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v x) vAssoc ⟩ base +v (((c + cc) ·ₛ vec1) +v (base +v applyLinComb v0 m vecs (c1 +v c2))) ≡⟨ cong (λ x → base +v (((c + cc) ·ₛ vec1) +v x)) (sym (baseSplit base v0 m vecs (c1 +v c2))) ⟩ base +v (((c + cc) ·ₛ vec1) +v applyLinComb (base +v v0) m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (((c + cc) ·ₛ vec1) +v applyLinComb x m vecs (c1 +v c2))) v0identRight ⟩ base +v (((c + cc) ·ₛ vec1) +v applyLinComb base m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v x) refl ⟩ (base +v (((c + cc) ·ₛ vec1) +v applyLinComb base m vecs (c1 +v c2)) ∎) --Show that, if v1 is in L, and v2 is in L*, then v1 +v v2 is in L* --Can be used to show that the sum of any vectors from L will be in L* linStarExtend : {n : ℕ} -> (v1 v2 : Parikh n ) -> (l1 ls : LinSet n ) -> ls ≡ linStar l1 -> LinComb v1 l1 -> LinComb v2 ls -> LinComb (v1 +v v2) ls linStarExtend .(applyLinComb base m vecs c1) .((c2h ·ₛ base) +v applyLinComb base m vecs c2) (base , m , vecs) .(base , suc m , base ∷ vecs) refl (c1 , refl) (c2h ∷ c2 , refl) = ((1 ∷ c1) +v (c2h ∷ c2)) , (begin (suc c2h ·ₛ base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → (x ·ₛ base) +v applyLinComb base m vecs (c1 +v c2)) refl ⟩ ((1 + c2h) ·ₛ base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → (x ·ₛ base) +v applyLinComb base m vecs (c1 +v c2)) (+-comm (suc zero) c2h) ⟩ ((c2h + 1) ·ₛ base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → x +v applyLinComb base m vecs (c1 +v c2)) (scalarAssoc c2h 1 base) ⟩ ((c2h ·ₛ base) +v (1 ·ₛ base)) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → ((c2h ·ₛ base) +v x) +v applyLinComb base m vecs (c1 +v c2)) (scalarIdent base) ⟩ ((c2h ·ₛ base) +v base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ vAssoc ⟩ (c2h ·ₛ base) +v (base +v applyLinComb base m vecs (c1 +v c2)) ≡⟨ cong (λ x → (c2h ·ₛ base) +v x) (sym (linCombDecompBase m base vecs c1 c2)) ⟩ (c2h ·ₛ base) +v (applyLinComb base m vecs c1 +v applyLinComb base m vecs c2) ≡⟨ cong (λ x → (c2h ·ₛ base) +v x) (v+-commut (applyLinComb base m vecs c1) (applyLinComb base m vecs c2)) ⟩ (c2h ·ₛ base) +v (applyLinComb base m vecs c2 +v applyLinComb base m vecs c1) ≡⟨ sym vAssoc ⟩ ((c2h ·ₛ base) +v applyLinComb base m vecs c2) +v applyLinComb base m vecs c1 ≡⟨ cong (λ x → x +v applyLinComb base m vecs c1 ) refl ⟩ (applyLinComb base (suc m) (base ∷ vecs) (c2h ∷ c2)) +v applyLinComb base m vecs c1 ≡⟨ v+-commut ((c2h ·ₛ base) +v applyLinComb base m vecs c2) (applyLinComb base m vecs c1) ⟩ applyLinComb base m vecs c1 +v ((c2h ·ₛ base) +v applyLinComb base m vecs c2) ∎ ) --Show that every non-empty vector in L* for a linear-set L --Can be split into a vector from L and another in L* --Basically proves that L* contains only sums of vectors in L linStarDecomp : {n : ℕ} -> (v : Parikh n) -> (l ls : LinSet n) -> v ≢ v0 -> proj₁ (l) ≢ v0 -> ls ≡ linStar l -> LinComb v ls -> LinComb v l ⊎ (∃ λ v1 -> ∃ λ v2 -> v1 +v v2 ≡ v × LinComb v1 l × LinComb v2 ls × v1 ≢ v0 ) linStarDecomp .((0 ·ₛ base) +v applyLinComb base m vecs c) (base , m , vecs) .(base , suc m , base ∷ vecs) vnz bnz refl (zero ∷ c , refl) rewrite scalar0ident base = inj₁ (c , (sym v0identLeft)) linStarDecomp .((suc cbase ·ₛ base) +v applyLinComb base m vecs c) (base , m , vecs) .(base , suc m , base ∷ vecs) vnz bnz refl (suc cbase ∷ c , refl) = inj₂ ( base , (applyLinComb base (suc m) (base ∷ vecs) (cbase ∷ c)) , (sym (begin -- ? ≡⟨ ? ⟩ ? (suc cbase ·ₛ base) +v applyLinComb base m vecs c ≡⟨ cong (λ x → x +v applyLinComb base m vecs c) refl ⟩ ((1 + cbase) ·ₛ base) +v applyLinComb base m vecs c ≡⟨ cong (λ x → x +v applyLinComb base m vecs c) (scalarAssoc 1 cbase base) ⟩ ((suc zero ·ₛ base) +v (cbase ·ₛ base)) +v applyLinComb base m vecs c ≡⟨ cong (λ x → (x +v (cbase ·ₛ base)) +v applyLinComb base m vecs c) (scalarIdent base) ⟩ (base +v (cbase ·ₛ base)) +v applyLinComb base m vecs c ≡⟨ vAssoc ⟩ base +v ((cbase ·ₛ base) +v applyLinComb base m vecs c) ≡⟨ refl ⟩ (base +v ((cbase ·ₛ base) +v applyLinComb base m vecs c) ∎))) , (v0 , linContainsBase base m vecs) , ((cbase ∷ c) , refl) , bnz )
alloy4fun_models/trainstlt/models/5/mzBpNxf8aZJvNKFB2.als
Kaixi26/org.alloytools.alloy
0
3947
<gh_stars>0 open main pred idmzBpNxf8aZJvNKFB2_prop6 { always all s : Signal | (s in Green implies s' not in Green) or (s not in Green implies s' in Green) } pred __repair { idmzBpNxf8aZJvNKFB2_prop6 } check __repair { idmzBpNxf8aZJvNKFB2_prop6 <=> prop6o }
alloy4fun_models/trainstlt/models/2/bpnRxtMyLQmGkLrA4.als
Kaixi26/org.alloytools.alloy
0
548
<gh_stars>0 open main pred idbpnRxtMyLQmGkLrA4_prop3 { (Train->Track in pos implies always Train->Track in pos) and (no Train->Track & pos implies always no Train->Track & pos) } pred __repair { idbpnRxtMyLQmGkLrA4_prop3 } check __repair { idbpnRxtMyLQmGkLrA4_prop3 <=> prop3o }
src/decls-d_taula_de_noms.ads
alvaromb/Compilemon
1
3823
-- DECLS-D_TAULA_DE_NOMS.ads -- Declaracions de la taula de noms with Decls.Dgenerals, Ada.Text_Io; use Decls.Dgenerals, Ada.Text_Io; package Decls.D_Taula_De_Noms is --pragma pure; --Excepcions E_Tids_Plena : exception; E_Tcar_Plena : exception; type Taula_De_Noms is limited private; type Id_Nom is new Integer range 0 .. Max_Id; type Rang_Dispersio is new Integer range 0 .. Max_Id; type Rang_Tcar is new Integer range 0 .. (Long_Num_Ident*Max_Id); -- Valor nul per al tipus id_nom Id_Nul : constant Id_Nom := 0; procedure Tbuida (Tn : out Taula_De_Noms); procedure Posa_Id (Tn : in out Taula_De_Noms; Idn : out Id_Nom; Nom : in String); procedure Posa_Tc (Tn : in out Taula_De_Noms; Nom : in String); procedure Posa_Str (Tn : in out Taula_De_Noms; Ids : out Rang_Tcar; S : in String); function Cons_Nom (Tn : in Taula_De_Noms; Idn : in Id_Nom) return String; function Cons_Str (Tn : in Taula_De_Noms; Ids : in Rang_Tcar) return String; function Fdisp_Tn (Nom : in String) return Rang_Dispersio; private type Taula_Dispersio is array (Rang_Dispersio) of Id_Nom; type T_Identificador is record Pos_Tcar : Rang_Tcar; Seguent : Id_Nom; Long_Paraula : Natural; end record; type Taula_Identificadors is array (1 .. Id_Nom'Last) of T_Identificador; type Taula_Caracters is array (Rang_Tcar) of Character; type taula_de_noms is record Td : Taula_Dispersio; Tid : Taula_Identificadors; Tc : Taula_Caracters; Nid : Id_Nom; Ncar : Rang_Tcar; end record; end Decls.D_Taula_De_Noms;
asm-tests/test.asm
TheShoutingParrot/jasm8080
0
9775
ORG 100h var1 equ 42 var2 equ ABCDh var3 equ FEDCh var4 equ fedah stackpointer equ AAAAh lxi h, stackpointer sphl ; Some tests to test the assembler call teststack call testarithmetic call testlogic; call testprogramflow JMP 0 teststack: lxi b, var4 lxi d, var2 lxi h, var3 mvi a, var1 push b push d push h push psw lxi b, aaaah lxi d, bbbbh lxi h, cccch mvi a, ddh pop b pop d pop h pop psw ret testarithmetic: inx b inx d inx h inr a inr b inr c inr d inr e inr h inr l dcr a dcr b dcr c dcr d dcr e dcr h dcr l dcx b dcx d dcx h add a add b add c add d add e add h add l add m adc a adc b adc c adc d adc e adc h adc l adc m sub a sub b sub c sub d sub e sub h sub l sub m sbb a sbb b sbb c sbb d sbb e sbb h sbb l sbb m adi ffh aci aah sui 10h sbi 20h nop ret testcall: ret testlogic: mvi a, var1 rlc ral daa stc cmc cma rar rrc ana a ana b ana c ana d ana e ana h ana l ana m xra a xra b xra c xra d xra e xra h xra l xra m ora a ora b ora c ora d ora e ora h ora l ora m cmp a cmp b cmp c cmp d cmp e cmp h cmp l cmp m ani 255 xri aah ori bbh cpi 123 ret testprogramflow: call testcall mvi b, 16 lxi d, looptest1str mvi c, 9 jmp loop1 loop1: dcr b ; print "testing loop" out 1 jnz loop1 jz loop2start loop2start: lxi d, looptest2str mvi a, 250 loop2: out 1 adi 1 jnc loop2 jc loop3start jmp endprogramflowtest ; Will jump to end if jnc/jc not working loop3start: lxi d, looptest3str mvi b, DFh loop3: out 1 inr b jm loop3 jp startrettest startrettest: call returnandcalltest lxi hl, endprogramflowtest pchl nop nop nop endprogramflowtest: ret returnandcalltest: mvi a, 0 adi 1 rz cz returnandcalltest rc cc returnandcalltest rpe cpe returnandcalltest rm cm returnandcalltest sbi 1 rnz cnz returnandcalltest sbi 1 rnc cnc returnandcalltest rpo cpo returnandcalltest rp cp returnandcalltest lxi d, returnandcallteststr mvi c, 9 out 1 ret testspace ds 5 looptest1str db "testing loop1", Ah, "$" looptest2str db "testing loop2", Ah, "$" looptest3str db "testing loop3", Ah, "$" returnandcallteststr db "return instruction and call instruction test successful", Ah, "$" ; useless data statements just for testing dw 1234h dw 5678h dw 9ABCh dw DEF0h ds 10 db "MADE BY VICTOR 2020"
tools/scitools/sample/mahjongg/input_ln.ads
brucegua/moocos
1
8481
-------------------------------------------------------------------- --| Package : Input_Line Version : -------------------------------------------------------------------- --| Abstract : This package handles everything concerning a user's input. --| The raw user input is converted into a command or a move. --| Command is one letter (from the list below). --| Move is four characters which specify two board positions, --| for example: B2E7 -------------------------------------------------------------------- --| Compiler/System : --| Author : <NAME> Date : 1/93 --| References : -------------------------------------------------------------------- --| NOTES : --| : --| Version History : -------------------------------------------------------------------- PACKAGE Input_Line IS TYPE Command IS (load, save, hint, undo, help, quit); Legal_Commands : CONSTANT STRING(1..6) := "LSHU?Q"; Prompt : CONSTANT STRING(1..47) := "L)oad, S)ave, H)int, U)ndo, Q)uit, ?, or move: "; PROCEDURE Get; -- Purpose: A line of user's input (terminated by Enter) is read from keyboard. -- Assumes: At least one character must be typed. -- Exception: Constraint Error is raised if length > 80. FUNCTION IsCommand RETURN BOOLEAN; -- Purpose: Determine if the user's input was a legal command. -- Assumes: Get has been completed. -- Returns: TRUE if only a single character was entered and it's a legal command FUNCTION IsMove RETURN BOOLEAN; -- Purpose: Determine if the user's input was a move (2 board locations). -- E.g., D3H8 -- Assumes: Get has been completed. -- Returns: TRUE if user input is syntactically correct for a move. -- Returns FALSE if -- a) columns are not valid COL type -- b) rows are not valid ROW type -- c) length of user input /= 4 FUNCTION Get_Command RETURN Command; -- Purpose: Converts the user input into a value of command type. -- Assumes: Get has been completed, and Is_Command is TRUE. -- Returns: the command type value corresponding to user's input. FUNCTION Validate_Move RETURN BOOLEAN; -- Purpose: Determine if the users_input is really a valid move. I.e., the -- tiles are matching and removable. -- Assumes: Get has been completed, and Is_Move is true. -- Return: TRUE if it is a valid move. -- Otherwise, display appropriate error msg and return FALSE. -- Note: Valid move means -- 1) both locations really contain a tile -- 2) both tiles can match and can be removed -- 3) the tiles are in two different locations (they aren't -- the same tile). PROCEDURE Make_Move; -- Purpose: Process the player's move, remove the tiles from the board. -- Take the two matching tiles off the board and update the screen -- Assumes: Validate_Move is TRUE. -- Returns: nothing. The Board and screen are updated. -- PSEUDOCODE: -- Reset hints. -- Remove the matching tiles from the board. -- display the updated board. -- Decrement tiles remaining. -- add tiles to move history. -- If no tiles left, display win message. PROCEDURE Undo_Move; -- Purpose: Undo the previous move -- Assumes: nothing. -- Returns: nothing. The most recent move is "undone" and the board -- and screen restored to their previous state. -- Note: Undo can be invoked multiple times, backing up until the -- board is in it's original state. END Input_Line;
aom_20170505/aom_dsp/x86/inv_wht_sse2.asm
rainliu/aom_analyzer
0
8693
; ; Copyright (c) 2016, Alliance for Open Media. All rights reserved ; ; This source code is subject to the terms of the BSD 2 Clause License and ; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License ; was not distributed with this source code in the LICENSE file, you can ; obtain it at www.aomedia.org/license/software. If the Alliance for Open ; Media Patent License 1.0 was not distributed with this source code in the ; PATENTS file, you can obtain it at www.aomedia.org/license/patent. ; ; %include "third_party/x86inc/x86inc.asm" SECTION .text %macro REORDER_INPUTS 0 ; a c d b to a b c d SWAP 1, 3, 2 %endmacro %macro TRANSFORM_COLS 0 ; input: ; m0 a ; m1 b ; m2 c ; m3 d paddw m0, m2 psubw m3, m1 ; wide subtract punpcklwd m4, m0 punpcklwd m5, m3 psrad m4, 16 psrad m5, 16 psubd m4, m5 psrad m4, 1 packssdw m4, m4 ; e psubw m5, m4, m1 ; b psubw m4, m2 ; c psubw m0, m5 paddw m3, m4 ; m0 a SWAP 1, 5 ; m1 b SWAP 2, 4 ; m2 c ; m3 d %endmacro %macro TRANSPOSE_4X4 0 punpcklwd m0, m2 punpcklwd m1, m3 mova m2, m0 punpcklwd m0, m1 punpckhwd m2, m1 pshufd m1, m0, 0x0e pshufd m3, m2, 0x0e %endmacro ; transpose a 4x4 int16 matrix in xmm0 and xmm1 to the bottom half of xmm0-xmm3 %macro TRANSPOSE_4X4_WIDE 0 mova m3, m0 punpcklwd m0, m1 punpckhwd m3, m1 mova m2, m0 punpcklwd m0, m3 punpckhwd m2, m3 pshufd m1, m0, 0x0e pshufd m3, m2, 0x0e %endmacro %macro ADD_STORE_4P_2X 5 ; src1, src2, tmp1, tmp2, zero movd m%3, [outputq] movd m%4, [outputq + strideq] punpcklbw m%3, m%5 punpcklbw m%4, m%5 paddw m%1, m%3 paddw m%2, m%4 packuswb m%1, m%5 packuswb m%2, m%5 movd [outputq], m%1 movd [outputq + strideq], m%2 %endmacro INIT_XMM sse2 cglobal iwht4x4_16_add, 3, 3, 7, input, output, stride %if CONFIG_HIGHBITDEPTH mova m0, [inputq + 0] packssdw m0, [inputq + 16] mova m1, [inputq + 32] packssdw m1, [inputq + 48] %else mova m0, [inputq + 0] mova m1, [inputq + 16] %endif psraw m0, 2 psraw m1, 2 TRANSPOSE_4X4_WIDE REORDER_INPUTS TRANSFORM_COLS TRANSPOSE_4X4 REORDER_INPUTS TRANSFORM_COLS pxor m4, m4 ADD_STORE_4P_2X 0, 1, 5, 6, 4 lea outputq, [outputq + 2 * strideq] ADD_STORE_4P_2X 2, 3, 5, 6, 4 RET
programs/oeis/346/A346004.asm
neoneye/loda
22
172056
; A346004: If n even then n otherwise ((n+1)/2)^2. ; 0,1,2,4,4,9,6,16,8,25,10,36,12,49,14,64,16,81,18,100,20,121,22,144,24,169,26,196,28,225,30,256,32,289,34,324,36,361,38,400,40,441,42,484,44,529,46,576,48,625,50,676,52,729,54,784,56,841,58,900,60,961,62,1024,64,1089 mov $1,1 lpb $0 add $0,$1 dif $0,2 mov $1,$0 lpe mul $1,$0 mov $0,$1
projects/batfish/src/main/antlr4/org/batfish/grammar/fortios/Fortios_system.g4
jawyoonis/batfish
0
908
<reponame>jawyoonis/batfish<gh_stars>0 parser grammar Fortios_system; options { tokenVocab = FortiosLexer; } c_system: SYSTEM ( cs_global | cs_interface | cs_replacemsg ); cs_global : GLOBAL NEWLINE ( SET ( csg_hostname ) )* ; csg_hostname: HOSTNAME host=device_hostname NEWLINE; // [A-Za-z0-9_-] device_hostname: str; cs_replacemsg: REPLACEMSG major_type=replacemsg_major_type minor_type=replacemsg_minor_type NEWLINE csr*; replacemsg_major_type: ADMIN | ALERTMAIL | AUTH | FORTIGUARD_WF | FTP | HTTP | ICAP | MAIL | NAC_QUAR | SPAM | SSLVPN | TRAFFIC_QUOTA | UTM | WEBPROXY ; replacemsg_minor_type: /* TODO: something smarter. Enumerating the minor types is complicated by the fact that in show output they appear in quotes, but need not be entered that way. */ word; csr: SET ( csr_set_buffer ) | UNSET ( csr_unset_buffer ) ; csr_set_buffer: BUFFER buffer=str NEWLINE; csr_unset_buffer: BUFFER NEWLINE;
PER.g4
ks07/aoe2-ai-fmt
3
5375
grammar PER; /* * Parser */ per : ( toplevel_content | WHITESPACE )+ EOF ; toplevel_content : ( statement | lone_comment | conditional_block ) ; conditional_block : conditional_cond conditional_content WHITESPACE+ conditional_else? CONDLOAD_END ; conditional_cond : ( CONDLOAD_DEFINED | CONDLOAD_UNDEFINED ) whitespace_comment+ SYMBOL whitespace_comment* WHITESPACE ; conditional_content : ( toplevel_content | WHITESPACE )+ ; conditional_else : CONDLOAD_ELSE whitespace_comment* WHITESPACE conditional_content ; statement : OPEN command CLOSE ; lone_comment : COMMENT ; command : ( defrule | defconst | load | load_random_list ) ; defrule : DEFRULE whitespace_comment+ proposition_list DEFRULE_SEPARATOR whitespace_comment* action_list ; proposition_list : ( proposition whitespace_comment+ )+ ; proposition : OPEN SYMBOL proposition_arg* whitespace_comment? CLOSE ; proposition_arg : ( whitespace_comment (REL_OP | SYMBOL | SHORT | proposition) ) ; action_list : ( action whitespace_comment+ )+ ; action : OPEN SYMBOL action_arg* whitespace_comment? CLOSE ; action_arg : ( whitespace_comment (SYMBOL | SHORT | STRING) ) ; defconst : DEFCONST whitespace_comment+ SYMBOL whitespace_comment+ SHORT ; load : ( LOAD | LOADRANDOM ) whitespace_comment+ STRING whitespace_comment* ; // Treat load-random with only default as a load load_random_list : LOADRANDOM whitespace_comment+ random_file_list (whitespace_comment+ STRING)? whitespace_comment* ; random_file_list : ( random_file whitespace_comment+ )+ ; random_file : ( SHORT whitespace_comment+ STRING ) ; whitespace_comment : ( WHITESPACE+ COMMENT? WHITESPACE* ) ; // Allows comments to appear within this whitespace, COMMENT enforces a newline /* * Lexer */ OPEN : '(' ; CLOSE : ')' ; WHITESPACE : ( ' ' | '\t' | NEWLINE ) ; NEWLINE : ( '\n' | '\r\n' ) ; COMMENT : ';' ~[\r\n]* NEWLINE ; DEFRULE : 'defrule' ; DEFRULE_SEPARATOR : '=>' ; REL_OP : ( REL_OP_FULL | REL_OP_SHORT ) ; REL_OP_FULL : ( 'less-than' | 'less-or-equal' | 'greater-than' | 'greater-or-equal' | 'equal' | 'not-equal' ) ; REL_OP_SHORT : ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) ; DEFCONST : 'defconst' ; LOAD : 'load' ; LOADRANDOM : 'load-random' ; CONDLOAD_DEFINED : '#load-if-defined' ; CONDLOAD_UNDEFINED : '#load-if-not-defined' ; CONDLOAD_ELSE : '#else' ; CONDLOAD_END : '#end-if' ; STRING : '"' ~["]* '"' ; SHORT : '-'? [0-9]+ ; // This needs to go at the bottom to make it lowere precedence than FACT_ARG... but that probably breaks defconst... FIXME SYMBOL : [a-zA-Z0-9\-]+ ; // This is likely too restrictive, but covers all of the values actually defined in the TC guide
sharding-core/src/main/antlr4/imports/OracleTruncateTable.g4
chuanandongxu/sharding-sphere
0
4543
grammar OracleTruncateTable; import OracleKeyword, Keyword, BaseRule; truncateTable : TRUNCATE TABLE tableName ;
source/oasis/program-elements-anonymous_access_to_objects.ads
reznikmm/gela
0
5625
-- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Anonymous_Access_Definitions; with Program.Lexical_Elements; with Program.Elements.Subtype_Indications; package Program.Elements.Anonymous_Access_To_Objects is pragma Pure (Program.Elements.Anonymous_Access_To_Objects); type Anonymous_Access_To_Object is limited interface and Program.Elements.Anonymous_Access_Definitions .Anonymous_Access_Definition; type Anonymous_Access_To_Object_Access is access all Anonymous_Access_To_Object'Class with Storage_Size => 0; not overriding function Subtype_Indication (Self : Anonymous_Access_To_Object) return not null Program.Elements.Subtype_Indications .Subtype_Indication_Access is abstract; not overriding function Has_Not_Null (Self : Anonymous_Access_To_Object) return Boolean is abstract; not overriding function Has_All (Self : Anonymous_Access_To_Object) return Boolean is abstract; not overriding function Has_Constant (Self : Anonymous_Access_To_Object) return Boolean is abstract; type Anonymous_Access_To_Object_Text is limited interface; type Anonymous_Access_To_Object_Text_Access is access all Anonymous_Access_To_Object_Text'Class with Storage_Size => 0; not overriding function To_Anonymous_Access_To_Object_Text (Self : in out Anonymous_Access_To_Object) return Anonymous_Access_To_Object_Text_Access is abstract; not overriding function Not_Token (Self : Anonymous_Access_To_Object_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Null_Token (Self : Anonymous_Access_To_Object_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Access_Token (Self : Anonymous_Access_To_Object_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function All_Token (Self : Anonymous_Access_To_Object_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Constant_Token (Self : Anonymous_Access_To_Object_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Anonymous_Access_To_Objects;
pwnlib/shellcraft/templates/aarch64/memcpy.asm
tkmikan/pwntools
8,966
84772
<% from pwnlib.shellcraft import aarch64, pretty, common %> <%docstring>Copies memory. Args: dest: Destination address src: Source address n: Number of bytes </%docstring> <%page args="dest, src, n"/> <% memcpy_loop = common.label("memcpy_loop") %> /* memcpy(${pretty(dest)}, ${pretty(src)}, ${pretty(n)}) */ ${aarch64.setregs({'x0': dest, 'x1': src, 'x2': n})} ${memcpy_loop}: ldrb w3, [x1], #1 strb w3, [x0], #1 subs x2, x2, #1 bge ${memcpy_loop}
data/maps/objects/FightingDojo.asm
opiter09/ASM-Machina
1
88114
<reponame>opiter09/ASM-Machina FightingDojo_Object: db $3 ; border block def_warps warp 4, 11, 1, LAST_MAP warp 5, 11, 1, LAST_MAP def_signs def_objects object SPRITE_HIKER, 5, 3, STAY, DOWN, 1, OPP_BLACKBELT, 1 object SPRITE_HIKER, 3, 4, STAY, RIGHT, 2, OPP_BLACKBELT, 2 object SPRITE_HIKER, 3, 6, STAY, RIGHT, 3, OPP_BLACKBELT, 3 object SPRITE_HIKER, 5, 5, STAY, LEFT, 4, OPP_BLACKBELT, 4 object SPRITE_HIKER, 5, 7, STAY, LEFT, 5, OPP_BLACKBELT, 5 object SPRITE_POKE_BALL, 4, 1, STAY, NONE, 6 ; person object SPRITE_POKE_BALL, 5, 1, STAY, NONE, 7 ; person def_warps_to FIGHTING_DOJO
oeis/329/A329754.asm
neoneye/loda-programs
11
245875
; A329754: Doubly pentagonal pyramidal numbers. ; Submitted by <NAME> ; 0,1,126,3078,32800,213750,1008126,3783976,11985408,33297075,83338750,191592126,410450976,828497488,1589341950,2917620000,5154021376,8801526501,14585352318,23529456550,37052820000,57089119626,86233820926,127923156648,186649920000,268221484375,380065968126 mov $1,$0 add $0,1 pow $1,2 mul $1,$0 mov $0,$1 add $1,2 mul $1,$0 mul $1,$0 mov $0,$1 div $0,16
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_753_1190.asm
ljhsiun2/medusa
9
3023
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1b127, %rsi lea addresses_D_ht+0x10327, %rdi nop nop add $6422, %rbx mov $106, %rcx rep movsq nop nop nop sub %rbp, %rbp lea addresses_WT_ht+0x182a7, %rsi lea addresses_WC_ht+0xb727, %rdi cmp %r11, %r11 mov $77, %rcx rep movsb nop nop nop and %rbp, %rbp lea addresses_UC_ht+0xff7f, %rcx nop nop nop sub $11452, %r15 mov $0x6162636465666768, %r11 movq %r11, %xmm5 vmovups %ymm5, (%rcx) nop nop nop nop xor %rbx, %rbx lea addresses_normal_ht+0xc7ab, %rbx nop nop nop nop dec %r11 vmovups (%rbx), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rbp nop nop nop sub $4152, %rdi lea addresses_WC_ht+0xf527, %r11 add $39955, %rbx movl $0x61626364, (%r11) nop nop cmp %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r8 push %r9 push %rax push %rbp push %rcx // Store lea addresses_A+0x15227, %rax nop nop nop nop dec %rbp movb $0x51, (%rax) nop nop nop and $44857, %rax // Store lea addresses_RW+0x19b27, %r13 clflush (%r13) nop nop nop nop add $12836, %rcx mov $0x5152535455565758, %r11 movq %r11, (%r13) nop nop nop cmp %r13, %r13 // Store lea addresses_PSE+0xa596, %r9 nop nop dec %r8 mov $0x5152535455565758, %rcx movq %rcx, %xmm0 vmovups %ymm0, (%r9) nop nop nop and $8686, %r8 // Store mov $0xb27, %r13 clflush (%r13) nop nop nop nop inc %r9 mov $0x5152535455565758, %rax movq %rax, %xmm5 movups %xmm5, (%r13) nop dec %rcx // Store lea addresses_UC+0x4be7, %r8 cmp $5414, %r11 mov $0x5152535455565758, %rcx movq %rcx, %xmm2 movups %xmm2, (%r8) nop nop nop nop sub %r8, %r8 // Faulty Load lea addresses_PSE+0x8727, %r13 nop nop xor $25819, %r11 mov (%r13), %r8 lea oracles, %rax and $0xff, %r8 shlq $12, %r8 mov (%rax,%r8,1), %r8 pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}} {'33': 753} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
programs/oeis/255/A255977.asm
neoneye/loda
22
1196
; A255977: The number of numbers j+k*r <= n, where r = golden ratio and j and k are nonnegative integers. ; 1,2,4,6,9,13,17,22,27,33,40,47,55,64,73,83,93,104,116,128,141,154,168,183,198,214,231,248,266,284,303,323,343,364,386,408,431,454,478,503,528,554,580,607,635,663,692,722,752,783,814,846,879,912,946,980,1015,1051,1087,1124,1162,1200,1239,1278,1318,1359,1400,1442,1485,1528,1572,1616,1661,1707,1753,1800,1847,1895,1944,1993,2043,2094,2145,2197,2249,2302,2356,2410,2465,2521,2577,2634,2691,2749,2808,2867,2927,2987,3048,3110 lpb $0 sub $0,1 mov $2,$0 max $2,0 seq $2,19446 ; a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2. add $1,$2 lpe add $1,1 mov $0,$1
examples/Sized/StatefulCell.agda
agda/ooAgda
23
119
module Sized.StatefulCell where open import Data.Product open import Data.String.Base open import SizedIO.Object open import SizedIO.IOObject open import SizedIO.ConsoleObject open import SizedIO.Console hiding (main) open import NativeIO open import Size --open import StateSizedIO.Base data CellState# : Set where empty full : CellState# data CellMethodEmpty A : Set where put : A → CellMethodEmpty A data CellMethodFull A : Set where get : CellMethodFull A put : A → CellMethodFull A CellMethod# : ∀{A} → CellState# → Set CellMethod#{A} empty = CellMethodEmpty A CellMethod#{A} full = CellMethodFull A CellResultFull : ∀{A} → CellMethodFull A → Set CellResultFull {A} get = A CellResultFull (put _) = Unit CellResultEmpty : ∀{A} → CellMethodEmpty A → Set CellResultEmpty (put _) = Unit CellResult# : ∀{A} → (s : CellState#) → CellMethod#{A} s → Set CellResult#{A} empty = CellResultEmpty{A} CellResult#{A} full = CellResultFull{A} n# : ∀{A} → (s : CellState#) → (c : CellMethod#{A} s) → (CellResult# s c) → CellState# n# empty (put x) unit = full n# full get z = full n# full (put x) unit = full
cpp/applications/expressionsTester/src/antlr/OscParamDefParser.g4
RA-Consulting-GmbH/openscenario.api.test
27
2905
parser grammar OscParamDefParser; options { tokenVocab = OscParamDefLexer; } /** The start rule; begin parsing here. */ paramDefs: (defs+=paramDef)+ EOF; paramDef: stringParamDef | numericParamDef | booleanParamDef ; numericParamDef: type=NUMERIC_TYPECAST id=ID EQUAL literal=NUMBER_LITERAL SEMICOLON; stringParamDef: type=STRING_TYPECAST id=ID EQUAL literal= STRING SEMICOLON; booleanParamDef: type=BOOLEAN_TYPECAST id=ID EQUAL literal= (TRUE_LITERAL | FALSE_LITERAL ) SEMICOLON;
base/mvdm/wow16/kernel31/int24.asm
npocmaka/Windows-Server-2003
17
160424
;-----------------------------------------------------------------------; ; ; ; Windows Critical Error Handler ; ; ; ;-----------------------------------------------------------------------; .xlist include kernel.inc include tdb.inc ifdef WOW include vint.inc endif .list DEVSTRC struc devLink dd ? devAttr dw ? devPtr1 dw ? devPtr2 dw ? devName db 8 dup (?) DEVSTRC ends IDABORT = 3 IDRETRY = 4 IDIGNORE = 5 ;-----------------------------------------------------------------------; ; ; ; XENIX calls all return error codes through AX. If an error occurred ; ; then the carry bit will be set and the error code is in AX. ; ; If no error occurred then the carry bit is reset and AX contains ; ; returned info. ; ; ; ; Since the set of error codes is being extended as we extend the ; ; operating system, we have provided a means for applications to ask ; ; the system for a recommended course of action when they receive an ; ; error. ; ; ; ; The GetExtendedError system call returns a universal error, an error ; ; location and a recommended course of action. The universal error ; ; code is a symptom of the error REGARDLESS of the context in which ; ; GetExtendedError is issued. ; ; ; ; These are the universal int 24h mappings for the old INT 24 set of ; ; errors. ; ; ; ;-----------------------------------------------------------------------; error_write_protect EQU 19 error_bad_unit EQU 20 error_not_ready EQU 21 error_bad_command EQU 22 error_CRC EQU 23 error_bad_length EQU 24 error_Seek EQU 25 error_not_DOS_disk EQU 26 error_sector_not_found EQU 27 error_out_of_paper EQU 28 error_write_fault EQU 29 error_read_fault EQU 30 error_gen_failure EQU 31 ; These are the new 3.0 error codes reported through INT 24h error_sharing_violation EQU 32 error_lock_violation EQU 33 error_wrong_disk EQU 34 error_FCB_unavailable EQU 35 ; New OEM network-related errors are 50-79 error_not_supported EQU 50 ; End of INT 24h reportable errors error_file_exists EQU 80 error_DUP_FCB EQU 81 ; ***** error_cannot_make EQU 82 error_FAIL_I24 EQU 83 ; New 3.0 network related error codes error_out_of_structures EQU 84 error_Already_assigned EQU 85 error_invalid_password EQU 86 error_invalid_parameter EQU 87 error_NET_write_fault EQU 88 error_I24_write_protect EQU 0 error_I24_bad_unit EQU 1 error_I24_not_ready EQU 2 error_I24_bad_command EQU 3 error_I24_CRC EQU 4 error_I24_bad_length EQU 5 error_I24_Seek EQU 6 error_I24_not_DOS_disk EQU 7 error_I24_sector_not_found EQU 8 error_I24_out_of_paper EQU 9 error_I24_write_fault EQU 0Ah error_I24_read_fault EQU 0Bh error_I24_gen_failure EQU 0Ch ; NOTE: Code 0Dh is used by MT-DOS. error_I24_wrong_disk EQU 0Fh ; THE FOLLOWING ARE MASKS FOR THE AH REGISTER ON Int 24h Allowed_FAIL EQU 00001000b Allowed_RETRY EQU 00010000b Allowed_IGNORE EQU 00100000b ;NOTE: ABORT is ALWAYS allowed I24_operation EQU 00000001b ;Z if READ,NZ if Write I24_area EQU 00000110b ; 00 if DOS ; 01 if FAT ; 10 if root DIR DataBegin externB SysErr externB msgWriteProtect externB drvlet1 externB msgCannotReadDrv externB drvlet2 externB msgCannotWriteDrv externB drvlet3 externB msgShare externB drvlet4 externB msgNetError externB drvlet5 externB msgCannotReadDev externB devenam1 externB msgCannotWriteDev externB devenam2 externB devenam3 externB msgNetErrorDev externB msgNoPrinter externB OutBuf externB Kernel_Flags externB Kernel_InDOS externB Kernel_InINT24 externB InScheduler externB cdevat externB errcap externB fNovell externB fDW_Int21h externW pGlobalHeap externW CurTDB ;externW MyCSDS externW LastExtendedError if 0; EarleH externW LastCriticalError endif ; 0 externD pSErrProc externD InDOS fDialogShown db 0 ; NZ if end user sees dialog box DataEnd INT24STACK STRUC Int24_IP dw ? Int24_CS dw ? Int24_FG dw ? Int24_AX dw ? Int24_BX dw ? Int24_CX dw ? Int24_DX dw ? Int24_SI dw ? Int24_DI dw ? Int24_BP dw ? Int24_DS dw ? Int24_ES dw ? INT24STACK ENDS sBegin code assumes cs,code assumes ds,nothing assumes es,nothing externD prevInt21Proc externNP AppendFirst externNP GetKernelDataSeg ;-----------------------------------------------------------------------; ; Int24Handler ; ; ; ; This is the default disk error handling code available to all ; ; users if they do not try to intercept interrupt 24h. ; ; The two options given the user are RETRY and FAIL. Retry goes back ; ; to DOS. If FAIL is chosen then for DOS 3.XX we return to DOS, but ; ; for DOS 2.XX we do the fail ourselves and return to the APP. ; ; ; ; Arguments: ; ; ; ; Returns: ; ; ; ; Error Returns: ; ; ; ; Registers Preserved: ; ; ; ; Registers Destroyed: ; ; ; ; Calls: ; ; ; ; History: ; ; ; ; Tue Feb 03, 1987 10:10:09p -by- <NAME> [davidw] ; ; Removed the poking around in DOS by using Kernel_InDOS. ; ; ; ; Tue Jan 27, 1987 07:58:56p -by- <NAME> [davidw] ; ; Added this nifty comment block. ; ;-----------------------------------------------------------------------; assumes ds, nothing assumes es, nothing cProc Int24Handler,<PUBLIC,NEAR> cBegin nogen push ds SetKernelDS mov fDialogShown, 0 ; Assume no dialog box inc InScheduler ; Prevent recursion cmp InScheduler,1 ; Well are we? jz NotInSched ; No, then handle this one jmp ReturnError ; Yes, return abort NotInSched: mov Kernel_InINT24,1 FSTI cld push es push dx push cx push bx ; Save away the return capabilities mask. mov errcap,ah ; save the capabilities mask push di mov ds,bp UnSetKernelDS SetKernelDS es mov cx,[si].devAttr mov cdevat,ch mov di,dataOffset devenam1 mov cx,8 add si,devName ; pull up device name (even on block) push si rep movsb pop si mov di,dataOffset devenam2 mov cl,8 push si rep movsb pop si mov di,dataOffset devenam3 mov cl,8 rep movsb pop di SetKernelDS UnSetKernelDS es if 0; EarleH mov LastCriticalError, di endif add al,'A' ; compute drive letter (even on character) mov drvlet1,al mov drvlet2,al mov drvlet3,al mov drvlet4,al mov drvlet5,al ; At app exit time we will Ignore any critical errors. This is ; because errors that usually occur at app exit time are generally ; due to the network beeping death. Trying to put up the dialog ; hangs Windows because USER doesn't think the task exists any more. ; THIS IS AN INCREADABLE HACK!! We don'r really know if we can ; ignore all critical errors, but hey, nobodies complained yet. test Kernel_flags[2],KF2_WIN_EXIT ; prevent int 24h dialogs jz SetMsg xor ax,ax jmp eexit SetMsg: test ah,1 jz ReadMes WriteMes: mov si,dataOffset msgCannotWriteDev test cdevat,10000000b jnz Gotmes mov si,dataOffset msgCannotWriteDrv jmps Gotmes ReadMes: mov si,dataOffset msgCannotReadDev test cdevat,10000000b jnz Gotmes mov si,dataOffset msgCannotReadDrv Gotmes: ; reach into DOS to get the extended error code ;;; les bx,InDOS ;;; mov ax,es:[bx].3 push es ; DOS may trash these... push ds push si push di xor bx, bx mov ah, 59h pushf call prevInt21Proc mov LastExtendedError, ax mov LastExtendedError[2], bx mov LastExtendedError[4], cx pop di pop si pop ds pop es mov dx,dataOffset msgWriteProtect cmp ax,error_write_protect jz prmes ; Yes mov dx,dataOffset msgNoPrinter cmp al,error_out_of_paper jz prmes ; Yes mov dx,dataOffset msgShare cmp al,error_sharing_violation jz prmes ; Yes cmp al,error_lock_violation jz prmes ; Yes mov dx,dataOffset msgNetError test cdevat,10000000b jz check_net_error mov dx,dataOffset msgNetErrorDev check_net_error: cmp al,50 jb not_net_error cmp al,80 ja not_net_error test Kernel_Flags[2],KF2_APP_EXIT jz prmes jmps ReturnError not_net_error: mov dx,si ; Message in SI is correct prmes: call AppendFirst ; print error type mov es,curTDB ; Point to current task mov ax,es:[TDB_errMode] ; See if wants default error processing test al,1 ; Low-order bit = zero means jz ask ; ...put up dialog box mov al,2 jmps eexit ; <> 0 means return error from call ask: mov es,pGlobalHeap inc es:[hi_freeze] ; freeze global heap call ShowDialogBox mov fDialogShown, dl ; will be 0 if dialog box NOT shown mov es,pGlobalHeap dec es:[hi_freeze] ; thaw global heap eexit: pop bx pop cx pop dx pop es cmp al,2 ; retry, ignore? jb aexit ; yes, return to dos cmp fNovell, 0 je ReturnError ; Not NOVELL test errcap, Allowed_FAIL jnz ReturnError ; We CAN fail, so we do. push ax mov ax, di cmp al, 0Ch ; General failure pop ax jne ReturnError cmp word ptr devenam1[0], 'EN' jne ReturnError cmp word ptr devenam1[2], 'WT' jne ReturnError cmp word ptr devenam1[4], 'RO' jne ReturnError cmp word ptr devenam1[6], 'K' jne ReturnError mov al, 2 ; ABORT because NOVELL doesn't like FAIL jmps aexit ReturnError: mov al,3 ; change to return error code ; If the user canceled an error generated by the Int 21h to AUX: in kernel's ; DebugWrite routine, set a flag telling DebugWrite not to do that anymore. cmp fDialogShown, 0 ; Did end user see dialog box? jz not_krnl cmp fDW_Int21h, 0 ; fDW_Int21h will == 0 if caused by jnz not_krnl ; Int 21h/Write to AUX: in DebugWrite. mov fDW_Int21h, 2 ; Prevent DebugWrite from trying again not_krnl: ; (any value >= 2, <= 0FEh works) aexit: mov Kernel_InINT24,0 dec InScheduler pop ds UnSetKernelDS ds FSTI iret cEnd nogen ;-----------------------------------------------------------------------; ; ShowDialogBox ; ; ; Entry: ; ; Returns: ; ; Registers Destroyed: ; ; History: ; Sat 02-Dec-1989 15:28:51 -by- <NAME> [davidw] ; Removed the stack switching because of the new WinOldAp support, ; and added this nifty comment block. ;-----------------------------------------------------------------------; assumes ds,nothing assumes es,nothing cProc ShowDialogBox,<PUBLIC,NEAR> cBegin nogen CheckKernelDS ReSetKernelDS mov ax,3 ; assume no USER therefor CANCEL xor dx, dx cmp pSErrProc.sel,0 ; is there a USER yet? jz sdb_exit push bp xor bp,bp push bp mov bp,sp push ds mov ax,dataOffset OutBuf ; lpText push ax push ds mov ax,dataOffset SysErr ; lpCaption push ax ; Set up the buttons based on the capabilities mask. Cancel is always ; availible. Retry and Ignore are not always available. mov ax,SEB_CANCEL+SEB_DEFBUTTON ; cancel is always allowed push ax xor ax,ax ; assume no second button if 0 ; 05 feb 1990, ignoring is not user friendly, win 2.x did not allow it test errcap,20h ; is ignore allowed? jz button_2 mov ax,SEB_IGNORE ; ignore is the second button endif button_2: push ax xor ax,ax ; assume no third button test errcap,10h ; is retry allowed? jz button_3 mov ax,SEB_RETRY ; retry is the third button button_3: push ax dobox: call [pSErrProc] ; USER.SysErrorBox() mov dx, ax ; We need to map the return as follows: ; button 1 (Cancel) => 3 3 ; button 2 (Retry) => 1 0 ; button 3 (Ignore) => 0 1 sub al,2 jnb codeok mov al,3 codeok: pop bp pop bp sdb_exit: ret cEnd nogen ;-----------------------------------------------------------------------; ; GetLPErrMode ; ; ; ; This routine returns a long pointer to the Kernel_InDOS and ; ; Kernel_InINT24 bytes inside the KERNEL. It is used by 386 WINOLDAP ; ; to prevent switching while inside INT 24 errors from other VMs. ; ; ; ; NOTE: Do not change this call without talking to the WIN/386 group. ; ; NOTE: USER also uses this call to determine whether PostMessage ; ; can call FatalExit. ; ; ; ; Arguments: ; ; none ; ; ; ; Returns: ; ; DX:AX = pointer to Kernel_InDOS followed by Kernel_InINT24 ; ; ; ; Error Returns: ; ; ; ; Registers Preserved: ; ; all ; ; ; ; Registers Destroyed: ; ; ; ; Calls: ; ; ; ; History: ; ; ; ; Tue Jan 27, 1987 07:13:27p -by- <NAME> [davidw] ; ; Rewrote it and added this nifty comment block. ; ; ; ; 7/23/87 -by- <NAME> [aaronr], updated comments to desired ; ; state. ; ;-----------------------------------------------------------------------; assumes ds,nothing assumes es,nothing cProc GetLPErrMode,<PUBLIC,FAR> cBegin nogen call GetKernelDataSeg mov dx, ax mov ax,dataOffset Kernel_InDOS ret cEnd nogen sEnd code end
oeis/062/A062111.asm
neoneye/loda-programs
11
6963
<filename>oeis/062/A062111.asm ; A062111: Upper-right triangle resulting from binomial transform calculation for nonnegative integers. ; Submitted by <NAME> ; 0,1,1,4,3,2,12,8,5,3,32,20,12,7,4,80,48,28,16,9,5,192,112,64,36,20,11,6,448,256,144,80,44,24,13,7,1024,576,320,176,96,52,28,15,8,2304,1280,704,384,208,112,60,32,17,9,5120,2816,1536,832,448,240,128,68,36,19,10 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe add $1,$0 mov $0,2 pow $0,$2 mul $1,$0 mov $0,$1 div $0,2
test/Fail/Issue1986u.agda
shlevy/agda
1,989
9745
-- Andreas, 2016-06-03, bug found by Ulf -- {-# OPTIONS -v tc.cover:20 #-} open import Agda.Builtin.Bool open import Agda.Builtin.Equality record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field fst : A snd : B fst open Σ record ⊤ : Set where data ⊥ : Set where T : Bool → Set T true = ⊤ T false = ⊥ p : Σ Bool T fst p = false p = true , _ loop : ⊥ loop = snd p
Routines/Routines.asm
vcte/eclectic
1
99431
; =============================================================== ; Routines ; =============================================================== ; =============================================================== ; Getpixel: ; Calculates the buffer location of a pixel ; Input: A = x position ; B = y position ; Output: HL = location in buffer ; A = position of pixel in byte (0 - 7) ; =============================================================== getpixel: ld H, 0 ;HL = PlotSScreen + xpos + 12 * ypos ld L, B ld D, H ld E, L add HL, HL add HL, DE add HL, HL add HL, HL ld E, A srl E srl E srl E add HL, DE ld DE, PlotSScreen add HL, DE and 7 ;A = A % 8 ret ; =============================================================== ; GetEle: ; Gets location of element data in table ; Input: (CurEle) = current element # ; Output: HL = location of data in table ; =============================================================== GetEle: ld A, (curele) GetEle1: call GetEle2 call LdHLInd ret GetEle2: dec A ;A = 2 * (A - 1) sla A ld HL, Elements ;get element data ld D, 0 ld E, A add HL, DE ret ; =============================================================== ; GetData: ; Gets location of element data in flag table ; Input: (CurEle) = current element #, 1 relative ; Output: HL = location of data in table ; =============================================================== GetData: ld A, (curele) GetData1: dec A ld B, 0 ld C, A ld HL, Element add HL, BC ret ; =============================================================== ; GetDataA: ; Get location of element in flag table, data into A, preserve HL ; Input: (CurEle) = current element # ; Output: A = first entry in flag table ; =============================================================== GetDataA: push HL call GetData ld A, (HL) pop HL ret ; =============================================================== ; GetBlock: ; Gets block of current element ; Input: (elex) = x coordinate of cursor ; (eley) = y coordinate of cursor ; (curele) = current element # ; Output: A = block, l quantum# (see consts) ; =============================================================== GetBlock: ld A, (elex) cp 13 jr nc, getblock2 getblock1: ld A, 0 ret getblock2: cp 63 jr c, getblock3 ld A, (eley) cp 41 jr nc, getblock3 cp 3 jr z, getblock1 ld A, 1 ret getblock3: ld A, (eley) cp 41 jr nc, getblock4 ld A, (curele) cp 57 jr z, getblock4a cp 89 jr z, getblock4a getblock3a: ld A, 2 ret getblock4: ld A, (curele) cp 71 jr z, getblock3a cp 103 jr z, getblock3a getblock4a: ld A, 3 ret ; =============================================================== ; GetPeriod ; Gets period # of current element ; Input: (eley) = y coordinate of cursor ; Output: A = period ; =============================================================== GetPeriod: ld A, (eley) cp 41 jr c, GetPeriod1 sub 16 jr GetPeriod2 GetPeriod1: sub 3 GetPeriod2: ld D, 5 call Div ld A, L inc A ld (CurPeriod), A ret ; =============================================================== ; GetColumn ; Gets column # of current element ; Input: (elex) = x coordinate of cursor ; Output: A = period ; =============================================================== GetColumn: ld A, (eley) cp 41 jr c, GetColumn2 xor A ret GetColumn2: ld A, (elex) sub 3 ld D, 5 call Div ld A, L inc A ret ; =============================================================== ; GetNumToSkip: ; Gets # of data entries to skip based on menusel ; Input: (menusel) = Menu Selection ; Output: (NumToSkip) = # of data to skip ; =============================================================== GetNumToSkip: ld A, (menusel) ld HL, menutable ld B, 0 ld C, A add HL, BC ld A, (HL) ld (NumToSkip), A ret ; =============================================================== ; GetMaxList: ; Gets # elements a list of a given property would have ; Input: (menusel) = Menu Selection ; Output: (MaxList) = # elements ; =============================================================== GetMaxList: ld A, (menusel) ld HL, sizearray ld B, 0 ld C, A add HL, BC ld A, (HL) ld (maxlist), A ret ; =============================================================== ; GetInfo: ; Gets info on an element ; Input: HL = pointer to elements position in table ; (NumToSkip) = # data entries to skip ; (menusel) = menu selection ; (CurEle) = current element # ; Output: HL = pointer to element data ; c = 1 if unknown, 0 if known ; =============================================================== GetInfo: call LdHLInd GetInfo1: call nextstr GetInfo2: call nextstr ld A, (NumToSkip) call SkipA push HL ld A, (menusel) call TestA pop HL ret ; =============================================================== ; GetSyntMass: ; Gets synthetic mass of an element in FP ; Input: HL = pointer to elements synthetic mass (integer) ; Output: OP1 = FP synthetic mass ; =============================================================== GetSyntMass: ld A, (HL) call IntFP ld HL, FP98 b_call(_Mov9ToOP2) rst rFPAdd ret ; =============================================================== ; GetMass: ; Gets to the mass data of an element ; Input: A = element's atomic number ; Output: HL = pointer to element's mass ; =============================================================== GetMass: call GetEle1 call nextstr call nextstr ret ; =============================================================== ; GetPoint: ; Gets x-y position of point ; Input: OP1 = FP number ; OP5 = GraphMax / Max ratio ; (CurEle) = current element ; Output: H = x coordinate ; L = y coordinate ; =============================================================== GetPoint: call Op5ToOp2 ;Point.y = (GraphMax) - (GraphMax / Max) (FP) b_call(_FPMult) b_call(_ConvOP1) ld B, A ;this subtraction removes the need for an InvSub bcall ld A, 55 ;(GraphMax) = 55 sub B ld HL, XVal ld H, (HL) ld L, A ret ; =============================================================== ; GetMax: ; Gets maximum value of a property from array ; Input: (menusel) = Menu Selection ; Output: OP1 = FP max ; =============================================================== GetMax: ld A, (menusel) add A, A ld HL, maxarray ld B, 0 ld C, A add HL, BC call LdHLInd call Int2FP ret ; =============================================================== ; InitCurEle: ; Saves (CurEle) and puts 1 into (CurEle) ; =============================================================== InitCurEle: ld A, (curele) ld (tempele), A ld A, 1 ld (curele), A ret ; =============================================================== ; MultA5: ; Multiply A by 5 ; =============================================================== multa5: ld B, A sla A sla A add A, B ret ; =============================================================== ; SetY: ; Sets (eley) with C and preserves A ; =============================================================== sety: ld B, A ld A, C ld (eley), A ld A, B ret ; =============================================================== ; Div: ; Divides A by D ; Input: A = dividend ; D = divisor ; Output: L = quotient ; A = remainder ; =============================================================== div: ld H, 0 ld L, A xor A ld B, 16 divlp: add HL, HL rla jr c, divv cp d jr c, divs divv: sub D inc L divs: djnz divlp ret ; =============================================================== ; NextBCD: ; Finds next thing after a 0-terminating BCD ; Input: HL = start of first BCD ; Output: HL = start of next thing ; =============================================================== NextBCD: ld A, (HL) inc HL ld B, A and %00001111 ret z ld A, B and %11110000 ret z jr NextBCD ; =============================================================== ; CopyStr ; Copies a NBTS string to a location in memory ; Input: HL = string to copy from ; DE = location to copy to ; Output: DE = end of copied string ; =============================================================== CopyStr: ldi ld A, (HL) or A ret z jr CopyStr ; =============================================================== ; IsNumber: ; Checks if the value in A is an ASCII number ; Input: A = number ; Output: c = is not a number ; =============================================================== IsNumber: cp '0' ret c cp '9' + 1 ccf ret c or A ret ; =============================================================== ; IsNumDot: ; Checks if the value in A is an ASCII number or dot ; Input: A = number ; Output: c = is not a number / dot ; =============================================================== IsNumDot: cp '.' ret z jr IsNumber ; =============================================================== ; EnCur: ; Enables input cursor ; =============================================================== encur: bit 1, (IY + Asm_Flag1) call z, clrele set 1, (IY + Asm_Flag1) call curson ret ; =============================================================== ; DisCur: ; Disables input cursor ; =============================================================== discur: bit 1, (IY + Asm_Flag1) call nz, dispele bit 1, (IY + Asm_Flag1) call nz, curoff res 1, (IY + Asm_Flag1) ret ; =============================================================== ; GoUp: ; Moves the cursor 1 box up ; =============================================================== GoUp: ld A, (eley) ;test for row 1 cp 3 ret z cp 8 jr nz, goup1 ld A, (elex) ;test row 2 cp 3 jr z, goup2 cp 88 jr z, goup2 ret Goup1: ld A, (eley) cp 18 jr nz, goup2 ;test row 4 ld A, (elex) cp 13 jr c, goup2 cp 63 jr nc, goup2 ret Goup2: ld A, (eley) sub 5 cp 36 jr nz, goup3 sub 3 Goup3: ld (eley), A ret ; =============================================================== ; GoDown: ; Moves the cursor 1 box down ; =============================================================== GoDown: ld A, (eley) cp 33 jr nz, godown2 ld A, (elex) ;test row 7 cp 13 ret c cp 83 ;test far right, SUBJECT TO CHANGE ret nc ld A, (eley) add A, 3 ld (eley), A jr godown3 Godown2: ld A, (eley) ;test actinides cp 46 ret z Godown3: ld A, (eley) add A, 5 ld (eley), A ret ; =============================================================== ; GoLeft: ; Moves the cursor 1 element left ; =============================================================== GoLeft: ld A, (curele) cp 1 ret z dec A ld (curele), A call GetPos ret ; =============================================================== ; GoRight: ; Moves cursor 1 element right ; =============================================================== GoRight: ld A, (curele) cp 118 ret z inc A ld (curele), A call GetPos ret ; =============================================================== ; HandleKey: ; Handles keypresses by cp-ing values and jumping to associated lbls ; Input: A = Scan code ; HL = pointer to array ; =============================================================== HandleKey: pop DE HandleKeyLp: ld B, (HL) inc HL cp B jr z, HandleKeyJp inc HL inc HL inc B ;if B = 1, then quit to address djnz HandleKeyLp cp skMode jp z, done ex DE, HL jp (HL) HandleKeyJp: call LdHLInd jp (HL) #include "BCall.asm" #include "Conversion.asm" #include "Display.asm" #include "Graphics.asm" #include "Input.asm" #include "Periodic.asm" #include "Query.asm" #ifdef TI83PI #include "Mirage.asm" #endif #ifdef TI83P #include "Mirage.asm" #include "Ion.asm" #endif
fiat-amd64/90.44_ratio11062_seed2001410703584519_square_p521.asm
gares/fiat-crypto
491
199
<reponame>gares/fiat-crypto<gh_stars>100-1000 SECTION .text GLOBAL square_p521 square_p521: sub rsp, 0x138 ; last 0x30 (6) for Caller - save regs mov [ rsp + 0x108 ], rbx; saving to stack mov [ rsp + 0x110 ], rbp; saving to stack mov [ rsp + 0x118 ], r12; saving to stack mov [ rsp + 0x120 ], r13; saving to stack mov [ rsp + 0x128 ], r14; saving to stack mov [ rsp + 0x130 ], r15; saving to stack mov rax, [ rsi + 0x40 ]; load m64 x1 to register64 imul r10, rax, 0x2; x2 <- x1 * 0x2 mov rdx, [ rsi + 0x0 ]; arg1[0] to rdx mulx r11, rbx, [ rsi + 0x0 ]; x106, x105<- arg1[0] * arg1[0] mov rbp, [ rsi + 0x30 ]; load m64 x7 to register64 imul r12, rbp, 0x2; x8 <- x7 * 0x2 imul r10, r10, 0x2; x10001 <- x2 * 0x2 imul r12, r12, 0x2; x10005 <- x8 * 0x2 mov r13, [ rsi + 0x28 ]; load m64 x10 to register64 imul r14, r13, 0x2; x11 <- x10 * 0x2 imul r14, r14, 0x2; x10007 <- x11 * 0x2 mov r15, [ rsi + 0x38 ]; load m64 x4 to register64 mov rdx, r10; x10001 to rdx mulx r10, rcx, [ rsi + 0x8 ]; x74, x73<- arg1[1] * x10001 mov r8, rdx; preserving value of x10001 into a new reg mov rdx, [ rsi + 0x18 ]; saving arg1[3] in rdx. mov [ rsp + 0x0 ], rdi; spilling out1 to mem mulx r9, rdi, r12; x52, x51<- arg1[3] * x10005 imul rdx, r15, 0x2; x5 <- x4 * 0x2 xchg rdx, r14; x10007, swapping with x5, which is currently in rdx mov [ rsp + 0x8 ], rax; spilling x1 to mem mulx rdx, rax, [ rsi + 0x20 ]; x44, x43<- arg1[4] * x10007 imul r14, r14, 0x2; x10003 <- x5 * 0x2 add rax, rdi; could be done better, if r0 has been u8 as well adcx r9, rdx mov rdx, r14; x10003 to rdx mulx r14, rdi, [ rsi + 0x10 ]; x62, x61<- arg1[2] * x10003 add rax, rdi; could be done better, if r0 has been u8 as well mov rdi, -0x2 ; moving imm to reg inc rdi; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox rax, rcx adcx r14, r9 seto cl; spill OF x116 to reg (rcx) imul r9, [ rsi + 0x8 ], 0x2; x16 <- arg1[1] * 0x2 sar cl, 1 adcx r10, r14 xchg rdx, r8; x10001, swapping with x10003, which is currently in rdx mulx rcx, r14, [ rsi + 0x10 ]; x60, x59<- arg1[2] * x10001 xchg rdx, r8; x10003, swapping with x10001, which is currently in rdx mov [ rsp + 0x10 ], rbp; spilling x7 to mem mulx rdi, rbp, [ rsi + 0x18 ]; x50, x49<- arg1[3] * x10003 mov [ rsp + 0x18 ], rcx; spilling x60 to mem mov rcx, rdx; preserving value of x10003 into a new reg mov rdx, [ rsi + 0x0 ]; saving arg1[0] in rdx. mov [ rsp + 0x20 ], rdi; spilling x50 to mem mulx r9, rdi, r9; x104, x103<- arg1[0] * x16 adox rax, rbx adox r11, r10 imul r13, r13, 0x2; x10006 <- x10 * 0x2 mov rdx, r12; x10005 to rdx mulx r12, rbx, [ rsi + 0x20 ]; x42, x41<- arg1[4] * x10005 mov r10, rdx; preserving value of x10005 into a new reg mov rdx, [ rsi + 0x28 ]; saving arg1[5] in rdx. mov [ rsp + 0x28 ], r15; spilling x4 to mem mulx r13, r15, r13; x36, x35<- arg1[5] * x10006 mov rdx, rax; x123, copying x119 here, cause x119 is needed in a reg for other than x123, namely all: , x123, x125, size: 2 shrd rdx, r11, 58; x123 <- x121||x119 >> 58 test al, al adox r15, rbx adcx r15, rbp adox r12, r13 mov rbp, -0x2 ; moving imm to reg inc rbp; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox r15, r14 seto r14b; spill OF x247 to reg (r14) inc rbp; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) adox r15, rdi adcx r12, [ rsp + 0x20 ] movzx r14, r14b lea r12, [ r14 + r12 ] mov r14, [ rsp + 0x18 ] lea r12, [r14+r12] clc; adcx r15, rdx adox r9, r12 mov rdx, [ rsi + 0x28 ]; arg1[5] to rdx mulx r10, rdi, r10; x34, x33<- arg1[5] * x10005 mov rdx, [ rsi + 0x18 ]; arg1[3] to rdx mulx rbx, r13, r8; x48, x47<- arg1[3] * x10001 setc dl; spill CF x255 to reg (rdx) shr r11, 58; x124 <- x121>> 58 sar dl, 1 adcx r11, r9 mov rdx, [ rsi + 0x8 ]; arg1[1] to rdx mulx r14, r12, [ rsi + 0x8 ]; x88, x87<- arg1[1] * arg1[1] mov rdx, r15; x258, copying x254 here, cause x254 is needed in a reg for other than x258, namely all: , x260, x258, size: 2 shrd rdx, r11, 58; x258 <- x256||x254 >> 58 mov r9, rdx; preserving value of x258 into a new reg mov rdx, [ rsi + 0x20 ]; saving arg1[4] in rdx. mov [ rsp + 0x30 ], r14; spilling x88 to mem mulx rbp, r14, rcx; x40, x39<- arg1[4] * x10003 shr r11, 58; x259 <- x256>> 58 imul rdx, [ rsi + 0x10 ], 0x2; x15 <- arg1[2] * 0x2 test al, al adox rdi, r14 adcx rdi, r13 mulx r13, r14, [ rsi + 0x0 ]; x102, x101<- arg1[0] * x15 xchg rdx, r8; x10001, swapping with x15, which is currently in rdx mov [ rsp + 0x38 ], r11; spilling x259 to mem mov [ rsp + 0x40 ], r13; spilling x102 to mem mulx r11, r13, [ rsi + 0x20 ]; x38, x37<- arg1[4] * x10001 adox rbp, r10 adcx rbx, rbp xor r10, r10 adox rdi, r12 xchg rdx, r8; x15, swapping with x10001, which is currently in rdx mulx rdx, r12, [ rsi + 0x8 ]; x86, x85<- arg1[1] * x15 adox rbx, [ rsp + 0x30 ] imul rbp, [ rsp + 0x10 ], 0x2; x10004 <- x7 * 0x2 mov [ rsp + 0x48 ], rdx; spilling x86 to mem xor rdx, rdx adox rdi, r14 adcx rdi, r9 mov r10, rdx; preserving value of 0x0 into a new reg mov rdx, [ rsi + 0x30 ]; saving arg1[6] in rdx. mulx rbp, r9, rbp; x28, x27<- arg1[6] * x10004 mov rdx, [ rsi + 0x28 ]; arg1[5] to rdx mulx r14, r10, rcx; x32, x31<- arg1[5] * x10003 adox rbx, [ rsp + 0x40 ] adcx rbx, [ rsp + 0x38 ] add r9, r10; could be done better, if r0 has been u8 as well adcx r14, rbp imul rdx, [ rsi + 0x18 ], 0x2; x14 <- arg1[3] * 0x2 xor rbp, rbp adox r9, r13 adox r11, r14 mov r13, rdi; x265, copying x261 here, cause x261 is needed in a reg for other than x265, namely all: , x265, x267, size: 2 shrd r13, rbx, 58; x265 <- x263||x261 >> 58 xor r10, r10 adox r9, r12 mulx rbp, r12, [ rsi + 0x0 ]; x100, x99<- arg1[0] * x14 adox r11, [ rsp + 0x48 ] adcx r9, r12 adcx rbp, r11 mulx r14, r12, [ rsi + 0x8 ]; x84, x83<- arg1[1] * x14 shr rbx, 58; x266 <- x263>> 58 xchg rdx, r8; x10001, swapping with x14, which is currently in rdx mulx r11, r10, [ rsi + 0x28 ]; x30, x29<- arg1[5] * x10001 test al, al adox r9, r13 seto r13b; spill OF x269 to reg (r13) mov [ rsp + 0x50 ], r14; spilling x84 to mem imul r14, [ rsi + 0x20 ], 0x2; x13 <- arg1[4] * 0x2 sar r13b, 1 adcx rbx, rbp mov rbp, rbx; x273, copying x270 here, cause x270 is needed in a reg for other than x273, namely all: , x273, x272, size: 2 shr rbp, 58; x273 <- x270>> 58 mov r13, rdx; preserving value of x10001 into a new reg mov rdx, [ rsi + 0x8 ]; saving arg1[1] in rdx. mov [ rsp + 0x58 ], rax; spilling x119 to mem mov [ rsp + 0x60 ], rbp; spilling x273 to mem mulx rax, rbp, r14; x82, x81<- arg1[1] * x13 mov rdx, [ rsi + 0x30 ]; arg1[6] to rdx mov [ rsp + 0x68 ], rax; spilling x82 to mem mulx rcx, rax, rcx; x26, x25<- arg1[6] * x10003 mov rdx, r14; x13 to rdx mov [ rsp + 0x70 ], rbp; spilling x81 to mem mulx r14, rbp, [ rsi + 0x0 ]; x98, x97<- arg1[0] * x13 add rax, r10; could be done better, if r0 has been u8 as well adcx r11, rcx imul r10, [ rsi + 0x28 ], 0x2; x12 <- arg1[5] * 0x2 mov rcx, rdx; preserving value of x13 into a new reg mov rdx, [ rsi + 0x10 ]; saving arg1[2] in rdx. mov [ rsp + 0x78 ], r14; spilling x98 to mem mov [ rsp + 0x80 ], rbp; spilling x97 to mem mulx r14, rbp, [ rsi + 0x10 ]; x72, x71<- arg1[2] * arg1[2] mov rdx, r9; x272, copying x268 here, cause x268 is needed in a reg for other than x272, namely all: , x272, x274, size: 2 shrd rdx, rbx, 58; x272 <- x270||x268 >> 58 add rax, rbp; could be done better, if r0 has been u8 as well xchg rdx, r8; x14, swapping with x272, which is currently in rdx mulx rdx, rbx, [ rsi + 0x10 ]; x70, x69<- arg1[2] * x14 mov rbp, -0x2 ; moving imm to reg inc rbp; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox rax, r12 adcx r14, r11 xchg rdx, r10; x12, swapping with x70, which is currently in rdx mulx r12, r11, [ rsi + 0x0 ]; x96, x95<- arg1[0] * x12 clc; adcx rax, [ rsp + 0x80 ] adox r14, [ rsp + 0x50 ] adcx r14, [ rsp + 0x78 ] imul rbp, [ rsp + 0x28 ], 0x2; x10002 <- x4 * 0x2 mov [ rsp + 0x88 ], r12; spilling x96 to mem xor r12, r12 adox rax, r8 mov r8, rdx; preserving value of x12 into a new reg mov rdx, [ rsi + 0x30 ]; saving arg1[6] in rdx. mov [ rsp + 0x90 ], r11; spilling x95 to mem mulx r12, r11, r13; x24, x23<- arg1[6] * x10001 mov rdx, rbp; x10002 to rdx mulx rdx, rbp, [ rsi + 0x38 ]; x22, x21<- arg1[7] * x10002 adox r14, [ rsp + 0x60 ] mov [ rsp + 0x98 ], r10; spilling x70 to mem mov r10, r14; x280, copying x277 here, cause x277 is needed in a reg for other than x280, namely all: , x279, x280, size: 2 shr r10, 58; x280 <- x277>> 58 add rbp, r11; could be done better, if r0 has been u8 as well setc r11b; spill CF x175 to reg (r11) mov [ rsp + 0xa0 ], r10; spilling x280 to mem mov r10, rax; x279, copying x275 here, cause x275 is needed in a reg for other than x279, namely all: , x281, x279, size: 2 shrd r10, r14, 58; x279 <- x277||x275 >> 58 xor r14, r14 adox rbp, rbx adcx rbp, [ rsp + 0x70 ] movzx r11, r11b lea r12, [ r12 + rdx ] lea r12, [ r12 + r11 ] adox r12, [ rsp + 0x98 ] adcx r12, [ rsp + 0x68 ] imul rbx, [ rsi + 0x30 ], 0x2; x9 <- arg1[6] * 0x2 mov rdx, r13; x10001 to rdx mulx rdx, r13, [ rsi + 0x38 ]; x20, x19<- arg1[7] * x10001 xor r11, r11 adox rbp, [ rsp + 0x90 ] adcx rbp, r10 adox r12, [ rsp + 0x88 ] xchg rdx, rbx; x9, swapping with x20, which is currently in rdx mulx r14, r10, [ rsi + 0x0 ]; x94, x93<- arg1[0] * x9 mov r11, rdx; preserving value of x9 into a new reg mov rdx, [ rsi + 0x18 ]; saving arg1[3] in rdx. mov [ rsp + 0xa8 ], r14; spilling x94 to mem mov [ rsp + 0xb0 ], r10; spilling x93 to mem mulx r14, r10, [ rsi + 0x18 ]; x58, x57<- arg1[3] * arg1[3] mov rdx, -0x2 ; moving imm to reg inc rdx; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox r13, r10 mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx mov [ rsp + 0xb8 ], rbp; spilling x282 to mem mulx r10, rbp, rcx; x68, x67<- arg1[2] * x13 setc dl; spill CF x283 to reg (rdx) clc; adcx r13, rbp movzx rdx, dl lea r12, [ rdx + r12 ] mov rdx, [ rsp + 0xa0 ] lea r12, [rdx+r12] adox r14, rbx mov rdx, r11; x9 to rdx mulx r11, rbx, [ rsi + 0x8 ]; x78, x77<- arg1[1] * x9 adcx r10, r14 mov rbp, [ rsp + 0xb8 ]; load m64 x282 to register64 mov r14, rbp; x286, copying x282 here, cause x282 is needed in a reg for other than x286, namely all: , x288, x286, size: 2 shrd r14, r12, 58; x286 <- x284||x282 >> 58 mov [ rsp + 0xc0 ], r11; spilling x78 to mem mov r11, 0x3ffffffffffffff ; moving imm to reg and rdi, r11; x267 <- x261&0x3ffffffffffffff mov r11, rdx; preserving value of x9 into a new reg mov rdx, [ rsi + 0x8 ]; saving arg1[1] in rdx. mov [ rsp + 0xc8 ], rdi; spilling x267 to mem mov [ rsp + 0xd0 ], r15; spilling x254 to mem mulx rdi, r15, r8; x80, x79<- arg1[1] * x12 adox r13, r15 mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx mov [ rsp + 0xd8 ], rbx; spilling x77 to mem mulx r15, rbx, r8; x66, x65<- arg1[2] * x12 seto dl; spill OF x167 to reg (rdx) shr r12, 58; x287 <- x284>> 58 sar dl, 1 adcx rdi, r10 imul r10, [ rsi + 0x38 ], 0x2; x6 <- arg1[7] * 0x2 add r13, [ rsp + 0xb0 ]; could be done better, if r0 has been u8 as well setc dl; spill CF x171 to reg (rdx) mov [ rsp + 0xe0 ], r15; spilling x66 to mem imul r15, [ rsp + 0x8 ], 0x2; x10000 <- x1 * 0x2 sar dl, 1 adcx rdi, [ rsp + 0xa8 ] mov rdx, [ rsi + 0x40 ]; arg1[8] to rdx mov [ rsp + 0xe8 ], rbx; spilling x65 to mem mulx r15, rbx, r15; x18, x17<- arg1[8] * x10000 mov rdx, rcx; x13 to rdx mulx rdx, rcx, [ rsi + 0x18 ]; x56, x55<- arg1[3] * x13 adox rbx, rcx clc; adcx r13, r14 adcx r12, rdi mov r14, rdx; preserving value of x56 into a new reg mov rdx, [ rsi + 0x0 ]; saving arg1[0] in rdx. mulx rdi, rcx, r10; x92, x91<- arg1[0] * x6 clc; adcx rbx, [ rsp + 0xe8 ] adox r14, r15 setc dl; spill CF x147 to reg (rdx) mov r15, r13; x293, copying x289 here, cause x289 is needed in a reg for other than x293, namely all: , x293, x295, size: 2 shrd r15, r12, 58; x293 <- x291||x289 >> 58 add rbx, [ rsp + 0xd8 ]; could be done better, if r0 has been u8 as well movzx rdx, dl lea r14, [ rdx + r14 ] mov rdx, [ rsp + 0xe0 ] lea r14, [rdx+r14] adcx r14, [ rsp + 0xc0 ] add rbx, rcx; could be done better, if r0 has been u8 as well mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx mulx r11, rcx, r11; x64, x63<- arg1[2] * x9 mov rdx, [ rsi + 0x20 ]; arg1[4] to rdx mov [ rsp + 0xf0 ], r11; spilling x64 to mem mov [ rsp + 0xf8 ], rcx; spilling x63 to mem mulx r11, rcx, [ rsi + 0x20 ]; x46, x45<- arg1[4] * arg1[4] adcx rdi, r14 shr r12, 58; x294 <- x291>> 58 add rbx, r15; could be done better, if r0 has been u8 as well adcx r12, rdi mov rdx, 0x3ffffffffffffff ; moving imm to reg mov r15, rbx; x302, copying x296 here, cause x296 is needed in a reg for other than x302, namely all: , x300, x302, size: 2 and r15, rdx; x302 <- x296&0x3ffffffffffffff xchg rdx, r8; x12, swapping with 0x3ffffffffffffff, which is currently in rdx mulx rdx, r14, [ rsi + 0x18 ]; x54, x53<- arg1[3] * x12 imul rdi, [ rsi + 0x40 ], 0x2; x3 <- arg1[8] * 0x2 shrd rbx, r12, 58; x300 <- x298||x296 >> 58 test al, al adox rcx, r14 mov r14, rdx; preserving value of x54 into a new reg mov rdx, [ rsi + 0x8 ]; saving arg1[1] in rdx. mulx r10, r8, r10; x76, x75<- arg1[1] * x6 adcx rcx, [ rsp + 0xf8 ] adox r14, r11 adcx r14, [ rsp + 0xf0 ] mov rdx, rdi; x3 to rdx mulx rdx, r11, [ rsi + 0x0 ]; x90, x89<- arg1[0] * x3 add rcx, r8; could be done better, if r0 has been u8 as well mov r8, 0x3ffffffffffffff ; moving imm to reg mov [ rsp + 0x100 ], r15; spilling x302 to mem setc r15b; spill CF x135 to reg (r15) and rbp, r8; x288 <- x282&0x3ffffffffffffff adox rcx, r11 adcx rcx, rbx movzx r15, r15b lea r10, [ r10 + r14 ] lea r10, [ r10 + r15 ] setc bl; spill CF x304 to reg (rbx) seto r14b; spill OF x139 to reg (r14) shr r12, 58; x301 <- x298>> 58 sar r14b, 1 adcx rdx, r10 mov r11, [ rsp + 0x0 ]; load m64 out1 to register64 mov r15, [ rsp + 0x100 ]; TMP = x302 mov [ r11 + 0x38 ], r15; out1[7] = TMP sar bl, 1 adcx r12, rdx mov r15, [ rsp + 0xd0 ]; x260, copying x254 here, cause x254 is needed in a reg for other than x260, namely all: , x260, size: 1 and r15, r8; x260 <- x254&0x3ffffffffffffff mov r14, r12; x308, copying x305 here, cause x305 is needed in a reg for other than x308, namely all: , x308, x307, size: 2 shr r14, 57; x308 <- x305>> 57 mov rbx, rcx; x307, copying x303 here, cause x303 is needed in a reg for other than x307, namely all: , x309, x307, size: 2 shrd rbx, r12, 57; x307 <- x305||x303 >> 57 mov r10, [ rsp + 0x58 ]; x125, copying x119 here, cause x119 is needed in a reg for other than x125, namely all: , x125, size: 1 and r10, r8; x125 <- x119&0x3ffffffffffffff mov rdx, 0x1ffffffffffffff ; moving imm to reg and rcx, rdx; x309 <- x303&0x1ffffffffffffff adox rbx, r10 mov r12, 0x0 ; moving imm to reg adox r14, r12 mov r10, rbx; x313, copying x310 here, cause x310 is needed in a reg for other than x313, namely all: , x313, x314, size: 2 shrd r10, r14, 58; x313 <- x312||x310 >> 58 mov [ r11 + 0x40 ], rcx; out1[8] = x309 and rbx, r8; x314 <- x310&0x3ffffffffffffff lea r10, [ r10 + r15 ] mov r15, r10; x317, copying x315 here, cause x315 is needed in a reg for other than x317, namely all: , x316, x317, size: 2 and r15, r8; x317 <- x315&0x3ffffffffffffff shr r10, 58; x316 <- x315>> 58 and r13, r8; x295 <- x289&0x3ffffffffffffff add r10, [ rsp + 0xc8 ] and r9, r8; x274 <- x268&0x3ffffffffffffff mov [ r11 + 0x30 ], r13; out1[6] = x295 mov [ r11 + 0x8 ], r15; out1[1] = x317 mov [ r11 + 0x18 ], r9; out1[3] = x274 and rax, r8; x281 <- x275&0x3ffffffffffffff mov [ r11 + 0x10 ], r10; out1[2] = x318 mov [ r11 + 0x28 ], rbp; out1[5] = x288 mov [ r11 + 0x20 ], rax; out1[4] = x281 mov [ r11 + 0x0 ], rbx; out1[0] = x314 mov rbx, [ rsp + 0x108 ]; restoring from stack mov rbp, [ rsp + 0x110 ]; restoring from stack mov r12, [ rsp + 0x118 ]; restoring from stack mov r13, [ rsp + 0x120 ]; restoring from stack mov r14, [ rsp + 0x128 ]; restoring from stack mov r15, [ rsp + 0x130 ]; restoring from stack add rsp, 0x138 ret ; cpu AMD Ryzen 7 5800X 8-Core Processor ; clocked at 2200 MHz ; first cyclecount 121.41, best 87.78, lastGood 90.44 ; seed 2001410703584519 ; CC / CFLAGS clang / -march=native -mtune=native -O3 ; time needed: 1224091 ms / 60000 runs=> 20.401516666666666ms/run ; Time spent for assembling and measureing (initial batch_size=97, initial num_batches=101): 142079 ms ; Ratio (time for assembling + measure)/(total runtime for 60000runs): 0.11606898506728666 ; number reverted permutation/ tried permutation: 23138 / 29945 =77.268% ; number reverted decision/ tried decision: 21176 / 30056 =70.455%
.github/paging.asm
Amankhan-ally/theunbelievables
0
23658
PageTableEntry equ 0x1000 Setup_identitypaging: mov edi, PageTableEntry mov cr3, edi mov dword [edi], 0x2003 add edi, 0x1000 mov dword [edi], 0x3003 add edi, 0x1000 mov dword [edi], 0x4003 add edi, 0x1000 mov ebx, 0x00000003 mov ecx, 1024 ;512 .SetEntry: mov dword [edi], ebx add ebx, 0x1000 add edi, 8 ;8 loop .SetEntry ;Enable Paging mov eax, cr4 or eax, 1 << 5 ;5 mov cr4, eax ;Set Long Mode Enable mov ecx, 0xC0000080 rdmsr or eax, 1 << 8 wrmsr mov eax, cr0 or eax, 1 << 31 mov cr0, eax ret
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1474.asm
ljhsiun2/medusa
9
168768
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x181e3, %rdx nop dec %r9 movw $0x6162, (%rdx) nop nop nop sub $288, %rdx lea addresses_normal_ht+0x12fe3, %rsi lea addresses_D_ht+0x69e3, %rdi nop nop nop nop nop sub %r15, %r15 mov $2, %rcx rep movsq nop nop nop nop sub $27272, %rcx lea addresses_UC_ht+0x59e3, %rsi lea addresses_UC_ht+0x2a2e, %rdi nop nop xor $42894, %rdx mov $73, %rcx rep movsq nop nop nop xor $45119, %rcx lea addresses_A_ht+0x11e3, %r15 nop nop nop nop nop mfence mov $0x6162636465666768, %rsi movq %rsi, %xmm2 movups %xmm2, (%r15) nop nop nop nop nop sub %rsi, %rsi lea addresses_D_ht+0x4de3, %r9 nop nop nop dec %rdi mov $0x6162636465666768, %rsi movq %rsi, %xmm0 vmovups %ymm0, (%r9) nop and $45349, %rdx lea addresses_WT_ht+0xcf03, %rdx clflush (%rdx) nop nop sub %rsi, %rsi mov $0x6162636465666768, %r12 movq %r12, (%rdx) xor $3254, %r12 lea addresses_WC_ht+0x9e3, %rsi lea addresses_D_ht+0x15cb3, %rdi nop nop nop add %rbx, %rbx mov $2, %rcx rep movsl nop nop nop nop add %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r14 push %r9 push %rax push %rbp push %rdi push %rdx push %rsi // Store lea addresses_D+0x2ae3, %rdx clflush (%rdx) nop nop dec %r14 movw $0x5152, (%rdx) nop nop nop nop sub $42427, %rbp // Store lea addresses_WC+0x1a000, %rbp cmp $49314, %rdi mov $0x5152535455565758, %r14 movq %r14, (%rbp) nop nop nop nop nop cmp $44823, %r14 // Store lea addresses_WT+0x51e3, %rsi nop nop nop nop and %rdi, %rdi mov $0x5152535455565758, %r14 movq %r14, %xmm0 movups %xmm0, (%rsi) nop nop sub $51321, %rax // Faulty Load lea addresses_D+0xe9e3, %r9 and $44833, %r14 movups (%r9), %xmm5 vpextrq $0, %xmm5, %rdx lea oracles, %r9 and $0xff, %rdx shlq $12, %rdx mov (%r9,%rdx,1), %rdx pop %rsi pop %rdx pop %rdi pop %rbp pop %rax pop %r9 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_D', 'AVXalign': True, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': True, 'same': True, 'congruent': 10, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}} {'src': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}} {'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}} {'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}} {'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 */
grammar/zr.g4
buresm11/zr
0
1381
grammar zr; parse : top_block EOF ; top_block : (function_decl | global_statement )* ; block : statement* ; global_statement : global_variable_def ';' ; statement : variable_def ';' | assignment ';' | function_call ';' | if_statement | while_statement | return_statement ';' | break_statement ';' ; break_statement : Break ; return_statement : Return expression? ; assignment : Identifier '=' expression ; variable_def : Type_identifier Identifier ; global_variable_def : Type_identifier Identifier ; function_call : Identifier '(' exprList? ')' #identifierFunctionCall | Print '(' expression ')' #printFunctionCall | Scan '(' ')' #scanFunctionCall ; if_statement : if_stat else_if_stat* else_stat? End ; if_stat : If expression Do block ; else_if_stat : Else If expression Do block ; else_stat : Else Do block ; while_statement : While expression Do block End ; function_decl : Def (Type_identifier | Void) Identifier '(' func_decl_arg_list? ')' block End ; func_decl_arg_list : func_decl_arg (',' func_decl_arg)* ; func_decl_arg : Type_identifier Identifier ; expression : Identifier '(' exprList? ')' #functionCallExpression | Scan '(' ')' #scanCallExpression | '-' expression #unaryMinusExpression | '!' expression #notExpression | expression '*' expression #multiplyExpression | expression '/' expression #divideExpression | expression '+' expression #addExpression | expression '-' expression #subtractExpression | expression '>=' expression #gtEqExpression | expression '<=' expression #ltEqExpression | expression '>' expression #gtExpression | expression '<' expression #ltExpression | expression '==' expression #eqExpression | expression '!=' expression #notEqExpression | expression '&&' expression #andExpression | expression '||' expression #orExpression | Identifier #identifierExpression | (bool_lit | number) #literalExpression | '(' expression ')' #paranthesisExpression ; exprList : expression (',' expression)* ; bool_lit : (True | False) ; number : Integer ; Integer : Int ; Def : 'def'; If : 'if'; Else : 'else'; Return : 'return'; Break : 'break'; While : 'while'; To : 'to'; Do : 'do'; End : 'end'; Print : 'print'; Scan : 'scan'; True : 'true'; False : 'false'; Void : 'void'; Or : '||'; And : '&&'; Equals : '=='; NEquals : '!='; GTEquals : '>='; LTEquals : '<='; Excl : '!'; Gt : '>'; Lt : '<'; Add : '+'; Minus : '-'; Multiply : '*'; Divide : '/'; Lparen : '('; Rparen : ')'; Type_identifier : 'int' | 'bool' ; Identifier : [a-zA-Z_] [a-zA-Z_0-9]* ; String : ["] (~["\r\n] | '\\\\' | '\\"')* ["] | ['] (~['\r\n] | '\\\\' | '\\\'')* ['] ; Comment : ('//' ~[\r\n]* | '/*' .*? '*/') -> skip ; Space : [ \t\r\n\u000C] -> skip ; fragment Int : [1-9] Digit* | '0' ; fragment Digit : [0-9] ;
oeis/116/A116690.asm
neoneye/loda-programs
11
178578
<reponame>neoneye/loda-programs<filename>oeis/116/A116690.asm<gh_stars>10-100 ; A116690: a(n) = C(n,8) + C(n,7) + C(n,6) + C(n,5) + C(n,4) + C(n,3) + C(n,2) + C(n,1). ; Submitted by <NAME> ; 0,1,3,7,15,31,63,127,255,510,1012,1980,3796,7098,12910,22818,39202,65535,106761,169765,263949,401929,600369,880969,1271625,1807780,2533986,3505698,4791322,6474540,8656936,11460948,15033172,19548045,25211935,32267667,40999515,51738691,64869363,80835235,100146723,123388762,151229280,184428376,223848240,270463854,325374514,389816214,465174934,553000875,655023685,773168721,909574393,1066610637,1246898565,1453331341,1689096333,1957698592,2262985710,2609174110,3000876822,3443132800,3941437836 lpb $0 sub $0,1 mov $2,$0 max $2,0 seq $2,8860 ; a(n) = Sum_{k=0..7} binomial(n,k). add $1,$2 lpe mov $0,$1
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.ads
best08618/asylo
7
627
package Parent_Ltd_With.Child_Full_View is type Child_Symbol is new Parent_Ltd_With.Symbol with private; type Child_Symbol_Access is access all Child_Symbol; function New_Child_Symbol return Child_Symbol_Access; private type Child_Symbol is new Parent_Ltd_With.Symbol with null record; end Parent_Ltd_With.Child_Full_View;
cmd/assign/assgmain.asm
minblock/msdos
0
3257
PAGE 90,132 ; TITLE ASSGMAIN.asm - ASSIGN MAIN PROGRAM ;/* ; * Microsoft Confidential ; * Copyright (C) Microsoft Corporation 1991 ; * All Rights Reserved. ; */ ;****************** START OF SPECIFICATIONS ***************************** ; MODULE NAME: ASSGMAIN.asm ; ; DESCRIPTIVE NAME: Reassigns drive specifications. ; ;FUNCTION: This program reassigns the specified drives to a new drive ; identifier. ; ; ENTRY POINT: ENTRY_POINT ; ; INPUT: ; ; ASSIGN [DRIVE] [DELIMITER] [DRIVE] [SW] ; where DRIVE = optional colon ; where DELIMITER = +;=TAB LF SPACE ; where SW = /STATUS or /STA ; ; where: ; /STATUS - reports back to the user ; the currently changed ; drive assignments and the ; new assignment drive ; ; Note: ; If a drive value has not been ; ASSIGN will report back nothing. ; ; UTILITY FUNCTION: ; Instructs DOS to route disk I/O ; for one drive into disk I/O to another ; drive. eg. ; a=c sets a: to c: ; ; EXIT-NORMAL: Assigned drives or reassigned drives ; ; EXIT-ERROR: Any one of the possible parse errors ; ; INTERNAL REFERENCES: ; ROUTINES: SYSPARSE:near (INCLUDEd in PARSE.asm) ; SYSLOADMSG ; SYSDISPMSG ; ; ; EXTERNAL REFERENCES: ; ROUTINES: none ; ; NOTES: ; This module should be processed with the SALUT preprocessor ; with the re-alignment not requested, as: ; ; SALUT ASSPARM,NUL; ; ; To assemble these modules, the sequential ; ordering of segments may be used. ; ; For LINK instructions, refer to the PROLOG of the main module, ; ASSIGN.asm ; ; REVISION HISTORY: AN000 - Version 4.00: PARSER, System Message Handler, ; Status report ; ; COPYRIGHT: "Microsoft DOS ASSIGN Utility" ; "Version 4.00 (C)Copyright 1988 Microsoft" ; "Licensed Material - Program Property of Microsoft" ; ; ; AN000 -> New Code ; ; AN001 -> PTM P3954 Release the environmental vector and close ; all handles. ; ; AN002 -> PTM P3918 Parse error messages must conform to spec. ; All parse error messages should display ; the offending parameters. ; ; ;****************** END OF SPECIFICATIONS ***************************** ;********************************************* ;* * ;* UTILITY NAME: ASSIGN.COM * ;* * ;* SOURCE FILE NAME: ASSIGN.asm * ;* * ;* STATUS: ASSIGN utility * ;* PC-DOS Version 3.40 * ;* * ;* SYNTAX (Command line) * ;* * ;* ASSIGN [DRIVE] [DELIMITER] [DRIVE] [SW] * ;* where DRIVE = optional colon * ;* where DELIMITER = +;=TAB LF SPACE * ;* where SW = /STATUS or /STA * ;* * ;* where: * ;* /STATUS - reports back to the user * ;* the currently changed * ;* drive assignments and the * ;* new assignment drive * ;* Note: * ;* If a drive value has not been * ;* ASSIGN will report back nothing. * ;* * ;* UTILITY FUNCTION: * ;* Instructs DOS to route disk I/O * ;* for one drive into disk I/O to another * ;* drive. eg. * ;* a=c sets a: to c: * ;********************************************* page DEBUG = 0 .xlist INCLUDE SYSMSG.INC ;AN000; INCLUDE SYSVAR.INC INCLUDE CURDIR.INC INCLUDE MULT.INC INCLUDE PDB.INC INCLUDE INT2A.INC MSG_UTILNAME <ASSIGN> .list ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = BREAK <MACRO DEFINITIONS> BREAK MACRO subtitle .XLIST SUBTTL subtitle .LIST PAGE ENDM .xcref break ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CallOperRange macro low,high,routine ;;NS-macro to call subroutines ?call = low ;;NS-in the given call range ;;NS-starting call value = low # rept (high-low)+1 ;;NS-calculate the entry point CallOper ?call,routine ;;NS-into the table then execute ?call = ?call + 1 ;;NS-increment call value to next endm endm ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CallOper macro call,routine ;;NS-macro that calls a single ;;NS-subroutine that is used in ;;NS-the above macro loop CallOperange ORG (SysTab-ASSIGN_BASE)+(call*2) ;;NS-Calculate entry point into DW OFFSET CODE:routine ;;NS-code where SysTab is the ENDM ;;NS-entry point to the tables ;;NS-ASSIGN_BASE is at 0:0000 ;;NS-the (call*2) is calculated ;;NS-to take into account two bytes ;;NS-and final OFFSET statement points ;;NS-code to be executed at the given ;;NS-label ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ; $SALUT (0,36,40,48) MyINT21 macro ;;NS-macro used to save pushf ;;NS-the flags to maintain call system ;;NS-DOS environment endm ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = SaveReg MACRO reglist ;; push those registers IRP reg,<reglist> ?stackdepth = ?stackdepth + 1 PUSH reg ENDM ENDM .xcref SaveReg ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = RestoreReg MACRO reglist ;; pop those registers IRP reg,<reglist> ?stackdepth = ?stackdepth - 1 POP reg ENDM ENDM .xcref RestoreReg ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = page BREAK <DOS FUNCTIONS, AND OTHER EQUATES> ; $SALUT (0,23,28,41) ; DOS FUNCTIONS USED ; (DEC) (HEX) NO_ERROR equ 0 ;return code zero from the parser ;********** CNS ***************** ;Std_Con_String_Output EQU 9 ; 9 PSP_Env equ 2ch ;Environmental vector segment in PSP ;an001; dms; Get_PSP equ 62h ; DOS function call to get PSP address ;an001; dms; Handle_Close equ 3eh ;close handle ;an001; dms; Set_Default_Drive EQU 14 ; E Get_Default_Drive EQU 25 ; 19 Set_Interrupt_Vector EQU 37 ; 25 Get_Version EQU 48 ; 30 Keep_Process EQU 49 ; 31 Get_Interrupt_Vector EQU 53 ; 35 Get_Drive_Freespace EQU 54 ; 36 Exit EQU 76 ; 4C Dealloc EQU 73 ; 49 Get_In_Vars EQU 82 ; 52 Get_Set_Media_ID equ 69h ; 69h IOCTL_READ_BLOCK EQU 4404H ;READ FROM BLOCK DEVICE IOCTL_WRITE_BLOCK EQU 4405H ;WRITE TO A BLOCK DEVICE IOCTL_BLOCK_CHANGE EQU 4408H ;BLOCK DEVICE CHANGEABLE IOCTL_BLOCK_REMOTE EQU 4409H ;BLOCK DEVICE REMOTE ; VECTORS REFERENCED PGM_TERM EQU 20H DOS_CALL EQU 21H CTL_BREAK EQU 23H CRIT_ERR EQU 24H ABS_DISK_READ EQU 25H ABS_DISK_WRITE EQU 26H stay equ 27h ;NS stay interrupt value int_IBM EQU 2AH ;critical section maintenance MULTIPLEXOR EQU 2FH ;MULTIPLEXOR INTERRUPT VECTOR NUMBER ; CONSTANTS USED ACROSS THE MULTIPLEXOR INTERFACE MPLEX_ID EQU 06H ;ID OF ASSIGN IN MPLEX CHAIN MPLEX_R_U_THERE EQU 0 ;MPLEX FUNCTION: ARE YOU THERE? MPLEX_GET_SEG EQU 1 ;MPLEX FUNCTION: GET SEG OF INSTALLED ASSIGN MPLEX_INSTALLED EQU 0FFH ;"I AM HERE" RETURN VALUE ; OTHER EQUATES cr equ 0dh ;CARRIAGE RETURN LF EQU 0AH ;LINE FEED f_Interrupt EQU 0000001000000000B ;NS - mask used for interrupt ;NS value BREAK <ENTRY POINT FOR CODE, EXTRNS> ; $SALUT (4,15,21,41) code segment para public ;NS code all in one segment assume cs:code ; one segment page ASSIGN_BASE: ;NS- starting point of loaded file org 100h ENTRY_POINT: jmp INITIALIZATION ;JUMP TO INITIALIZATION ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = BREAK <TABLES AND LOCAL WORKAREAS> drives db 1,2,3,4,5,6,7,8,9 ;drive values used in comparison db 10,11,12,13,14,15,16,17,18,19 ;against default or found drive db 20,21,22,23,24,25,26 default_drive db ? drive_save db ? ; saved drive byte drive_address dw ? ; location (from DS) of drive byte drive_save2 db ? ; second saved drive byte ;****************************************************************************** ;****************************************************************************** system dd ? int25_vec dd ? ;NS - Hooks for the Int 2f handler preparation int26_vec dd ? ;NS - Hooks for the Int 2f handler preparation int2F_vec dd ? ;NS - Area to be hooked in and remain resident user_ret dd ? ; ??????????????????????????????????????? saveIntF dw ? ; ??????????????????????????????????????? I21_Func db ? ; Save area for INT21 function requested -->RW ; $SALUT (4,9,23,41) EVEN SysTab label word ;NS-Beginning of the call,subroutine table CallOper 00h,DoReset CallOperRange 01h,0Ch,DoNothing ; done ???????????????????????? CallOper 0Dh,DoReset ; done ???????????????????????? CallOper 0Eh,DoSetDefault CallOperRange 0Fh,17h,DoFCB ; done ???????????????????????? CallOper 18h,DoReset ; done ???????????????????????? CallOper 19h,DoGetDefault ; ???????????????????????? CallOperRange 1Ah,1Bh,DoReset ; done ???????????????????????? CallOper 1Ch,DoDL ; done ???????????????????????? CallOperRange 1Dh,20h,DoReset ; done ???????????????????????? CallOperRange 21h,24h,DoFCB ; done ???????????????????????? CallOperRange 25h,26h,DoReset ; done ???????????????????????? CallOperRange 27h,28h,DoFCB ; done ???????????????????????? CallOperRange 29h,31h,DoReset ; done ???????????????????????? CallOper 32h,DoDL ; done ???????????????????????? CallOperRange 33h,35h,DoReset ; done ???????????????????????? CallOper 36h,DoDL ; done ???????????????????????? CallOperRange 37h,38h,DoReset ; done ???????????????????????? CallOperRange 39h,3Dh,DoAscii ; done ???????????????????????? CallOperRange 3Eh,40h,DoReset ; done ???????????????????????? CallOper 41h,DoAscii ; done ???????????????????????? CallOper 42h,DoReset ; done ???????????????????????? CallOper 43h,DoAscii ; done ???????????????????????? CallOper 44h,DoIOCTL ; done ???????????????????????? CallOperRange 45h,46h,DoReset ; done ???????????????????????? CallOper 47h,DoDL ; done ???????????????????????? CallOperRange 48h,4Ah,DoReset ; done ???????????????????????? CallOper 4Bh,DoExec ; done ???????????????????????? CallOperRange 4Ch,4Dh,DoReset ; done ???????????????????????? CallOper 4Eh,DoAscii ; done ???????????????????????? CallOperRange 4Fh,55h,DoReset ; done ???????????????????????? CallOper 56h,DoRename ; done ???????????????????????? CallOperRange 57h,59h,DoReset ; done ???????????????????????? CallOperRange 5Ah,5Bh,DoAscii ; done ???????????????????????? CallOperRange 5Ch,5Fh,DoReset ; done ???????????????????????? CallOper 60h,DoTranslate ; done ???????????????????????? CallOperRange 61h,63h,DoReset ; done ???????????????????????? CallOperRange 64h,69h,DoSetGetMedia ;done ???????????????????????? CallOperRange 6ah,6bh,DoNothing ;done ???????????????????????? CallOper 6ch,DoAscii_DS_SI ;done ????????????????????????? ; ???????????????????????? page ; $SALUT (4,5,11,36) MAXCLL EQU 6CH ; High bound of table org (systab-ASSIGN_BASE) + (2 * (MAXCLL + 1)) ;NS - Beginning of code starts at ;NS - Beginning of table + 128 bytes BREAK <ASSIGN INTERRUPT HANDLER> ASSIGN_HANDLER: mov SaveIntf,f_interrupt ;NS- Move in the mask into a saved area SaveReg <AX,BX> ;NS- ?????????????????????????????????? cmp ah,MAXCLL ; Do a high bound check on the call ; so we don't index past the end of ja DoNothing ; the table on a bogus call mov al,ah ;NS- Call must be in the 0 - 63h range cbw ;NS- zero out the high byte now ;NS- AX has 0 & call number shl ax,1 ;NS- Double the value in AX mov bx,ax ;NS- Move the value into BX to jmp systab[bx] ;NS- access the call number & subroutine ;NS- bx bytes into the tbl ;*********************************************************************************** EnterAssign: ;NS- make sure system intact by doing call LeaveAllAssign ;NS- error recovery check push ax ;NS- before making code mov ax,8000h + critAssign ;NS- non- reentrant if unable INT INT_IBM ;(2AH) NS- to screen out successfully POP AX ;NS- LeaveAllAssign will be executed RET ;return NS- and the critical section will be reset ;************************************************************************************ LeaveAssign: ;NS- restore re-entrancy to push ax ;NS- the code after & only mov ax,8100h + critAssign ;NS- after this call has been INT INT_IBM ;(2AH) NS- made or the error recovery POP AX ;NS- call has been made RET ;return NS- ;************************************************************************************ LeaveAllAssign: ;NS- Error recovery call push ax ;NS- to restore the Assigns mov ax,8908h ;NS- critical section int INT_IBM ;(2AH) NS- if ASSIGN has encountered pop ax ;NS- a problem on entrance or departure RET ;return NS- ;************************************************************************************ ; ; Reset the exclusion flag ;NS- Reset to Assign ; ;NS- critical section state DoReset: ;NS- call LeaveAllAssign ;NS- ;NS- ;**************************************************************************************** ; ; The system call needed no special processing. Go do it directly. ; DoNothing: ;NS-System registers and flags still RestoreReg <bx,ax> ;NS-intact it has not been clobbered jmp system ;NS-by ASSIGN code page ;************************************************************************************ ; ; Munge the drive byte in an FCB pointed to by DS:DX. ; "MUNGE" ? (Webster will turn over in his gravy...) ; DoFCB: mov bx,dx ; indexable pointer mov al,[bx] ; get drive cmp al,0ffh ; extended fcb? jnz DoMapDrive ; no add bx,7 ; yes, advance past it mov al,[bx] ; get read drive byte DoMapDrive: or al,al ; default drive? ; $IF Z ;YES JNZ $$IF1 mov al,default_drive ; get default drive ; ; DS:BX points to the drive byte being munged. AL is the old value. Save ; it away. ; ; $ENDIF ;AC000; $$IF1: ;SaveFCB: call EnterAssign ; NS-Enter Assign's critical section mov drive_save,al ; NS-save the drive assignment call mapdrv1 ; NS-now let's map it to the mov [bx],al ; NS-numeric drive associated in ; NS-in drive range 1 to 26 ;****************************************************************************** ; The FCB has been converted. Now let's POP off the user's info and do the ; system call. Note that we are no longer reentrant! ; mov drive_address,bx ; NS- location of drive value RestoreReg <BX,AX> ; get back original registers pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI ; NS- Clear out old interrupts ; NS- before an IRET is issued ; NS- update the current call system ; flags saved => this is a system call pushf ; NS- re-adjust the stack call RestInt ; NS- and setup the environment SaveReg <ax,bx> ; NS- with drive and the drive address mov bx,drive_address ; NS- before leaving the Assign critical mov al,drive_save ; NS- section mov [bx],al RestoreReg <bx,ax> push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign iret ; back to user page ;************************************************************************************ ; ; Munge the user's ASCIZ string at DS:DX. ; DoAscii: mov bx,dx ; point to area cmp byte ptr [bx+1],':' ; drive letter present? jnz DoNothing ; nope, ignore this ; ; There is a drive leter present. Grab it and convert it ; mov al,[bx] ; get drive letter call EnterAssign ; NS- Re-enter ASSIGN crit section mov drive_save,al ; remember previous contents call maplet ; convert to real drive letter mov [bx],al ; place in new drive letter mov drive_address,bx RestoreReg <BX,AX> ; get back original registers pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI ; clean up stack call system ; flags saved => this is a system call pushf ; save all drive info call RestInt ; NS- clean up environment before SaveReg <ax,bx> ; NS- returning to the user's environment mov bx,drive_address ; NS- to ask on the next ASSIGN entrance mov al,drive_save mov [bx],al RestoreReg <bx,ax> push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign ; NS- exit ASSIGN crit. section iret ; back to user ;************************************************************************************ ; ; Munge the user's ASCIZ string at DS:SI. ; DoAscii_DS_SI: mov bx,si ; point to area cmp byte ptr [bx+1],':' ; drive letter present? ; $if ne ; drive letter not present JE $$IF3 jmp DoNothing ; nope, ignore this ; $endif ; $$IF3: ; ; There is a drive leter present. Grab it and convert it ; mov al,[bx] ; get drive letter call EnterAssign ; NS- Re-enter ASSIGN crit section mov drive_save,al ; remember previous contents call maplet ; convert to real drive letter mov [bx],al ; place in new drive letter mov drive_address,bx RestoreReg <BX,AX> ; get back original registers pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI ; clean up stack call system ; flags saved => this is a system call pushf ; save all drive info call RestInt ; NS- clean up environment before SaveReg <ax,bx> ; NS- returning to the user's environment mov bx,drive_address ; NS- to ask on the next ASSIGN entrance mov al,drive_save mov [bx],al RestoreReg <bx,ax> push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign ; NS- exit ASSIGN crit. section iret ; back to user page ;************************************************************************************ ; ; DoDL - the drive to map is in DL. ; DoDL: or dl,dl ; NS- check for drive mapping ; $IF Z ;AC000;;USE DEFAULT DRIVE JNZ $$IF5 DNJ1: jmp DoNothing ; NS- default drive was requested ; NS- thus no mapping needed ; $ENDIF ;AC000; $$IF5: mov al,dl ; NS- not default case so no need doctor call EnterAssign ; NS- so enter ASSIGN crit. section again mov drive_save,al ; preserve old drive call mapdrv1 mov dl,al ; drive is mapped RestoreReg <BX,AX> ; get back registers mov I21_Func,ah ; Save requested function call -->RW pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI call system ; flags saved => this is a system call pushf ; call RestInt cmp I21_Func,GET_DRIVE_FREESPACE ;(36h) If call returns info in DX, -->RW ; NS- DL in both cases Func 36 ; NS- Func 1Ch are both used for ; NS- drive input we don't want to ; NS- the old drives so they should not ; restored as the old value - use ASSIGN's je Dont_Restore_DL ;AC000;;THEN DO CHANGE IT cmp I21_Func,1ch ; If call returns info in DX, -->RW ;(NOTE 1CH IS NOT DEFINED IN SYSCALL.INC. EK) je Dont_Restore_DL ;AC000;;THEN DO CHANGE IT mov dl,drive_save ; restore his dl ;DONT_RESTORE_DL: Dont_Restore_DL: push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign iret ; back to user ;************************************************************************************ ; Map the IOCTL drives in BX ; NS- this section handles ; NS- INT21 calls to get drive info DoIOCTL: RestoreReg <BX,AX> SaveReg <AX,BX> cmp ax,IOCTL_READ_BLOCK ;(4404h) IOCTL read string from block dev jz DoMapBX ;AC000; ; jz DoMapBX cmp ax,IOCTL_WRITE_BLOCK ;(4405h) IOCTL write string from block dev jz DoMapBX ;AC000; ; jz DoMapBX cmp ax,IOCTL_BLOCK_CHANGE ;(4408h) IOCTL is removable jz DoMapBX ;AC000; ; jz DoMapBX cmp ax,IOCTL_BLOCK_REMOTE ;(4409h) IOCTL block dev redir (network) jnz DNJ2 ;AC000;;NORMAL CALL ;DoMapBX: DoMapBX: or bx,bx ; NS- drive letter associated in BL jz DNJ2 mov al,bl ; not the default case call EnterAssign mov drive_save,al ; remember drive call mapdrv1 ; NS- time to map drive to new assoc. mov bl,al ; drive is mapped RestoreReg <AX,AX> ; get back registers (throw away BX) pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI call system ; flags saved => this is a system call pushf call RestInt mov bl,drive_save ; restore his dl push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign iret ; back to user DNJ2: jmp DoNothing DoSetGetMedia: RestoreReg <BX,AX> ;an000; dms;restore regs SaveReg <AX,BX> ;an000; dms;save regs cmp ah,Get_Set_Media_ID ;an000; dms;trap on get/set media id ; $if z ;an000; dms;found JNZ $$IF7 or bl,bl ;an000; dms;drive letter entered ; $if nz ;an000; dms;yes JZ $$IF8 mov al,bl ; not the default case call EnterAssign mov drive_save,al ; remember drive call mapdrv1 ; NS- time to map drive to new assoc. mov bl,al ; drive is mapped RestoreReg <AX,AX> ; get back registers (throw away BX) pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI call system ; flags saved => this is a system call pushf call RestInt mov bl,drive_save ; restore his dl push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign ; $else ;an000; dms;not valid function 69h JMP SHORT $$EN8 $$IF8: jmp DoNothing ;an000; dms;pass to interrupt ; $endif ;an000; dms; $$EN8: ; $else ;an000; dms; JMP SHORT $$EN7 $$IF7: jmp DoNothing ;an000; dms;pass to interrupt ; $endif ;an000; dms; $$EN7: iret ; back to user page ;************************************************************************************ ; ; Map the drive letter and forget about it. EXEC never returns. ; DoExec: RestoreReg <BX,AX> SaveReg <AX,BX> or al,al ; $IF Z ;AC000;;IS LOAD GO, NOT USE NORMAL STUFF JNZ $$IF13 mov bx,dx ; point to area DoOnce: cmp byte ptr [bx+1],':' ; drive letter present? ; $IF Z ;AC000;;YES JNZ $$IF14 ; ; There is a drive leter present. Grab it and convert it ; mov al,[bx] ; get drive letter call maplet ; convert to real drive letter mov [bx],al ; place in new drive letter ; $ENDIF ;AC000; $$IF14: DNJ3: jmp DoNothing ; restore and go on! ; $ENDIF $$IF13: ;DAJ: jmp DoAscii ;************************************************************************************ ; ; Map the drive letter at DS:SI. We need to un-map it at the end. ; DoTranslate: mov bx,SI ; point to area cmp byte ptr [bx+1],':' ; drive letter present? jnz DNJ3 ; nope, ignore this ; ; There is a drive leter present. Grab it and convert it ; mov al,[bx] ; get drive letter call EnterAssign mov drive_save,al ; remember previous contents call maplet ; convert to real drive letter mov [bx],al ; place in new drive letter mov drive_address,bx RestoreReg <BX,AX> ; get back original registers pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI call system ; flags saved => this is a system call pushf call RestInt SaveReg <ax,bx> mov bx,drive_address mov al,drive_save mov [bx],al RestoreReg <bx,ax> push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign iret ; back to user page ;************************************************************************************ ; ; Munge the user's ASCIZ string at DS:DX and es:di ; DoRename: mov bx,dx ; point to area mov ax,[bx] call EnterAssign mov drive_save,al mov drive_address,bx cmp ah,':' ; drive letter present? ; $IF Z ;AC000; JNZ $$IF17 call maplet ; convert to real drive letter mov [bx],al ; place in new drive letter ; $ENDIF ;AC000; $$IF17: ;DoES: mov ax,es:[di] ;NS- Get the 2nd drive from the command linepSOP mov drive_save2,al ;NS- Save possible drive cmp ah,':' ;NS- exclude if no colon present ; $IF Z ;AC000; JNZ $$IF19 call maplet ;NS- go convert letter to actual drive # mov es:[di],al ;NS- new drive value ; $ENDIF ;AC000; $$IF19: ;DoIt: RestoreReg <BX,AX> ; get back original registers pop word ptr user_ret ; restore his IP pop word ptr user_ret+2 ; restore his CS call GotoCLI call system ; flags saved => this is a system call pushf call RestInt SaveReg <ax,bx> mov al,drive_save2 ; NS- get the second drive update mov es:[di],al ; NS- on the command line mov bx,drive_address ; mov al,drive_save ; mov [bx],al ; RestoreReg <bx,ax> ; push word ptr user_ret+2 ; push back user's cs push word ptr user_ret ; push back user's ip Call LeaveAssign iret ; back to user ;************************************************************************************ ; ; DoGetDefault - return our idea of the current drive... ; DoGetDefault: call Assign_Check ; $IF Z ;AC000; JNZ $$IF21 ;DNJ4: jmp DoNothing ; $ENDIF ;AC000; $$IF21: RestoreReg <BX,AX> mov al,default_drive dec al iret page ;************************************************************************************ ; ; DoSetDefault - try to set to the mapped current drive. If we can do it, ; then OK, else oops! ; DoSetDefault: RestoreReg <BX,AX> mov al,dl ; get new drive inc al ; convert it to 1-based call EnterAssign mov drive_save,al ; remember what we're doing call mapdrv1 ; convert drive dec al ; convert back to 0-based mov dl,al ; stick back in correct register mov drive_save2,al ; remember more of what we're doing MyInt21 ; try the set push ax ; save return info from set mov ah,Get_Default_Drive ;(29h) MyInt21 mov dl,drive_save dec dl ; Restore users original value cmp al,drive_save2 ; Did the set work? ; $IF Z ;AC000;;YES! JNZ $$IF23 mov al,drive_save mov default_drive,al ; Set ours too, it's valid! ; $ENDIF ;AC000; $$IF23: ;BadDrive: pop ax ; Set return info call LeaveAssign iret ;************************************************************************************ ; ; Maintain the CLI state upon the next IRET. Flags for the IRET are on the ; stack just under the return address. This means saving the current state ; of the int flag and then turning off the saved version. ; GotoCLI: push ax push bp mov bp,sp ; bp ax ret f mov ax,[bp + 2 + 2 + 2] and SaveIntf,ax ; save those interrupts and word ptr [bp + 2 + 2 + 2],not f_interrupt pop bp pop ax ret ; ;************************************************************************************ ; Restore he saved interrupt flag for the user. His flags are on the stack ; just above the RET. ; RestInt: push ax push bp mov bp,sp mov ax,SaveIntf ; bp ax ret f or [bp + 2 + 2 + 2],ax pop bp pop ax ret ;************************************************************************************ mapdrv0: ;a = 0 , b = 1 inc al ; $IF NZ ;AC000; JZ $$IF25 call mapdrv1 ; $ENDIF ;AC000; $$IF25: ;Wrap0: dec al ret ;************************************************************************************ mapdrv1: cmp al,26 ; $IF NA ;AC000; JA $$IF27 cmp al,0 ; check for default ; $IF Z ;AC000; JNZ $$IF28 mov al,default_drive mov drive_save,al ; $ENDIF ;AC000; $$IF28: push bx ;a = 1, b = 2 push cx mov ch,ah cbw mov bx,offset drives-1 add bx,ax mov al,cs:[bx] mov ah,ch pop cx pop bx ; $ENDIF ;AC000; $$IF27: ret ;************************************************************************************ maplet: cmp al,'A' jb LetDone cmp al,'Z' jbe DoMapLet cmp al,'a' jb LetDone cmp al,'z' ja LetDone DoMapLet: or al,20h sub al,"a"-1 call mapdrv1 add al,40h LetDone: ret page ;************************************************************************************ int25: call mapdrv0 jmp int25_vec int26: call mapdrv0 jmp int26_vec int2F: CMP AH,mplex_id ;(06h) is this our multiplex? ; $IF NE ;AC000;;NO JE $$IF31 jmp int2F_vec ; No, Chain to next guy ; $ENDIF ;AC000; $$IF31: ;MINE: CMP AL,mplex_get_seg ;(01h) ;0 AND 1 ARE THE ONLY ALLOWED FUNCTIONS ; $IF NA ;AC000;;IF NOT SOME OTHER NUMBER, JA $$IF33 ; $IF E ;AC000;;IF FUNCTION REQUEST IS 01 JNE $$IF34 ;RETURN THE SEGID IN ES PUSH CS POP ES ; Call 1 gets our segment in ES ; $ENDIF ;AC000; $$IF34: ;QUER: MOV AL,MPLEX_INSTALLED ;(0FFh) I AM here ; $ENDIF $$IF33: ;RESERVED_RET: IRET ;************************************************************************************ assign_check: push si push ax push cx xor ax,ax mov si,ax mov cx,26 ; $SEARCH ;AC000; $$DO37: ;scn: mov al,drives[si] INC SI cmp ax,si ; $EXITIF NZ,NUL ;AC000; JNZ $$SR37 ; $ENDLOOP LOOP ;AC000; LOOP $$DO37 xor ax,ax ; reset z flag ; $ENDSRCH ;AC000; $$SR37: ;scndone: pop cx pop ax pop si ret prog_size = ($-ASSIGN_BASE+15)/16 page ;************************************************************************************ ; TRANSIENT CODE ;************************************************************************************ ;********************************************* ;* * ;* Subroutine name: Initialization * ;* * ;* Purpose: Process the command line. * ;* If there are no errors update * ;* the drive table according to * ;* the drive assignments, terminate * ;* and stay resident. If status switch * ;* set and the drive values have been * ;* altered display drive is set to * ;* 2nd drive. * ;* * ;* Input: Command line (described in header) * ;* * ;* Output: Table will be updated and resident* ;* code will be hooked in. * ;* * ;* Normal Exit: Valid drives, sufficient * ;* memory. * ;* Error Conditions: * ;* Incorrect DOS Version * ;* Invalid Parameter * ;* Invalid switch * ;*Externals: * ;* PROCESS_PATH * ;* REPORT_STATUS * ;* EXIT_PROG * ;* * ;********************************************* ; ***************************************** ; * INITIALIZATION * ; ***************************************** ; * * ; * CALL SYSLOADMSG * ; * Do DOS Versinon Check * ; * CALL SYSDISPMSG * ; * IF <> X.X then * ; * Display message * ; * Message number 1 * ; * (001 - Incorrect DOS Version) * ; * exit * ; * .ENDIF * ; * Continue * ; * * ; * Establish address of the * ; * PDB environment * ; * (Process Data Block ) * ; * .IF NO SPACE free de-allocate (49)* ; * memory at the environment * ; * address * ; * .ENDIF * ; ***************************************** ;******************************************************************************* BREAK <INITIALIZATION - NOT STAY RESIDENT> EXTRN SYSPARSE:NEAR ;AN000; ODDX equ 01H ;AN000; EVENX equ 00H ;AN000; PAD_CHAR equ ' ' ;AN000; SEMICOLON equ ';' ;AN000; SPACE equ ' ' ;AN000; EQUAL equ '=' ;AN000; PLUS equ '+' ;AN000; good_parse_finish equ 0ffffh ;an000; ;****************************************************************************** STATUS_ONLY db 0 ;AN000; STRING_CTR db 0 ;AN000; STATUS_FLAG db 0 ;AN000; OPTIONS_FLAG db 0 ; non-0 if options wanted ERR_CODE db 0 ;AN000; POS_FLAG db 'n' ;AN000; PARMS_AVAIL db 'n' ;AN000; PAR_RETC dw 0 ;AN000; used for the return code DRV_X db 0 ;AN000; from the parser save_dr_tbl_ptr dw ? ;an000;drive table pointer curr_es_seg dw ? Parm_Ptr1 dw ? ;an002;ptr to parse parm Parm_Ptr2 dw ? ;an002;ptr to parse parm inv dd ? STring dd ? ;AN000;string holder INCLUDE ASSGPARM.INC ;AN000; INCLUDE ASSGMSG.INC ;AN000; assume cs:code, ds:code, ss:code, es:code INITIALIZATION: push ax ;an000; save ax mov ax,ds ;an000; get the current ds mov SEG_1,ax ;an000; set sublist table mov SEG_2,ax ;an000; set sublist table pop ax ;an000; restore ax call SYSLOADMSG ;AN000; ;does DOS version check ; $IF C ;AN000; JNC $$IF41 ;remainder of info given call SYSDISPMSG ;AN000; ;by the msg retriever ;message and exit call EXIT_PROG ;AC000; ;(4CH) Terminate function ; $ENDIF $$IF41: page ;************************************* CNS ************************************ ; ***************************************** ; * INITIALIZATION * ; ***************************************** ; * * ; * Make internal DOS function call (52h)* ; * to process the data block * ; * information after mem is available * ; ****************************************** ;************************************* CNS ************************************ ;OKDOS: mov ax,ds:[pdb_environ] ;get your Process Data Block Address or ax,ax ;check to see if space available ; $IF NZ ;AC000; JZ $$IF43 ; jz nofree push es ; save code segment value mov es,ax ; de-allocate memory mov ah,dealloc ;(49H) int DOS_CALL pop es ;restore code segment value ; $ENDIF ;ACx00; $$IF43: ;nofree: push es ;an000; save es mov ah,Get_In_Vars ;(52H) int DOS_CALL mov Word ptr inv,bx mov Word ptr inv+2,es pop es ;an000; restore es ;****************************************************************************** ; ; ***************************************** ; * Establish addressability * ; * to command line parms (DS:SI) * ; * Establish addressability to PARM * ; * control block (ES:DI) * ; * * ; ***************************************** ;******************************************************************************* ;parser es & ds now points at the command line cld ;clear the directional flag ;decrement mode - maintanis pointer without ;advancement mov di,offset ASS_PARMS ;AC000; ;set index to the location of your PARAMETER ;PARSER control block mov si,81h ;AC000; ;set index to the beginning of the commandline ;at 81h to the first 128 bytes page ;****************************************************************************** ;* PROCESS PATH ;****************************************************************************** ;********************************************* ;* * ;* Subroutine : Process_path * ;* Function : Process command line. * ;* Repeat searching for drive * ;* spec. If valid update * ;* drive table. * ;* * ;* Normal exit: End of line * ;* Parse error * ;* * ;* Abort exit: Invalid drive * ;* * ;********************************************* ; ***************************************** ; * * ; * WHILE PAR_RETC eq NO_ERROR (0) * ; * CALL SYSPARSE * ; * Case: * ; * .IF (POSITIONAL) * ; * Result is positional & Ctr even * ; * INC CTR * ; * CHECK_STRING * ; * .IF the string is valid * ; * valid drive * ; * calculate table drv posit. * ; * based on the ascii value * ; * .ELSE * ; * * ; * PARSE ERROR * ; * .ENDIF * ; * Result is positional & CTR odd * ; * save the ascii_value * ; * Check the String * ; * .IF the string is valid * ; * valid drive * ; * update the drive table * ; * .ELSE * ; * * ; * PARSE ERROR * ; * .ENDIF * ; * .ENDIF * ; * INC CTR * ; ***************************************** ;****************************************************************************** xor cx,cx ;an000; set cx to 0 for parse xor dx,dx ;an000; set dx to 0 for parse mov Parm_Ptr1,si ;an002; dms;ptr to 1st. parm mov Parm_Ptr2,si ;an002; dms;ptr to 1st. parm call SYSPARSE ;AN000; dms;priming parse mov par_retc,ax ;AN000; dms;set flag ; $DO $$DO45: CMP ax,no_error ;AN000;Is compare the return ; $LEAVE NE ;AN000;code 0 no error keep JNE $$EN45 ;AN000;parsing call CHK_PARSER ;AN000; mov Parm_Ptr2,si ;an002; dms;ptr to 1st. parm call SYSPARSE ;AN000;go parse the command line mov par_retc,ax ;AN000; dms;set flag ;AN000;restore the parm return code ; $ENDDO ;AN000; JMP SHORT $$DO45 $$EN45: ; See if the user gave us /? ; If so, display the available options ; and exit. ; ; I gave this precedence over checking for parser errors, ; since the user may not have (yet) any idea of what the ; command syntax is supposed to be. ; ; Also, note that there is no message displaying function ; inside of ASSIGN, except for PARSE_ERR - which always ; uses the same message. So the message displaying part ; of this block could be subroutine-ized. ; ; 4/17/90 - c-PaulB cmp OPTIONS_FLAG, 0 ; /? entered? je OptionsDone ; skip if not call DISPLAY_OPTIONS ; else display message mov ax, 0 ; no error returned call EXIT_PROG ; let user try again OptionsDone: cmp ax,good_parse_finish ;an000; dms;see if a parse error ; $if ne ;an000; dms;if a parse error JE $$IF48 push ax ;an002; dms save ax mov ax,Parm_Ptr2 ;an002; dms;get original parm ptr mov Parm_Ptr1,ax ;an002; dms;place in variable pop ax ;an002; dms;restore ax call PARSE_ERR ;an000; dms;display error & exit ; $endif ;an000; dms; $$IF48: cmp PARMS_AVAIL,'y' ;AN000; ; $IF E ;AN000; If there are parms available JNE $$IF50 cmp ax,0 ;AN000; see if the return code was no error ; $IF G ;AN000; if greater than 0 JNG $$IF51 mov ax,parse10 call PARSE_ERR ;AN000; you got a parser error ;AN000; so report & exit ; $ENDIF ;AN000; you also get an error $$IF51: xor ax,ax ;AN000; mov al,String_ctr ;AN000; mov bx,0002h div bl ;AN000; cmp ah,EVENX ; $IF NE ;AN000; if the drives did not pair off JE $$IF53 mov ax,parse10 call PARSE_ERR ; $ENDIF ;AN000; $$IF53: cmp POS_FLAG,'n' ;AN000;has a drive been specified ; $IF E,AND ;AN000;and has a switch also been JNE $$IF55 cmp STATUS_FLAG,1 ;AN000;specified if so hook in code ; $IF E ;AN000;and then report status JNE $$IF55 mov STATUS_ONLY,1 ;AN000;set flag specifing user input full ; $ENDIF ;AN000;command line $$IF55: ;AN000; hook in the code ; $ENDIF ;AN000; $$IF50: page cmp STATUS_ONLY,0 ;AN000; ; $IF E ;AN000; JNE $$IF58 call Get_Vectors ;get current vectors ;an001; dms; call Set_Vectors ;set new vectors ;an001; dms; ; $ELSE ;AN000;END of HOOK-IN JMP SHORT $$EN58 $$IF58: call REPORT_STATUS ;AN000; call EXIT_PROG ;AN000; ; $ENDIF $$EN58: page ;*********************************** CNS *************************************** RELOAD_CURDIR PROC NEAR ;***************************************************************************** ; ; We have an interesting problem here. What if the user is assigning away ; his current drive? Here's the solution: ; ; o We get the current drive here. ; o We reload the mapping table. ; o We set the current drive. ; MOV AH,Get_Default_Drive ;(19H) INT DOS_CALL PUSH AX ; save away the table MOV AX,(MPLEX_ID SHL 8)+MPLEX_GET_SEG ;(0601H) Get the SEG of the installed ASSIGN INT MULTIPLEXOR ;(2FH) in ES mov si,offset drives ;move in the new drive table mov di,si mov cx,26 ; move a-z CLI rep movsb ; STI POP DX ; restore the old current drive MOV AH,Set_Default_Drive ;(0EH) INT DOS_CALL call EXIT_PROG ;go_home: INT PGM_TERM ;(20H) Exit SHOULD not return, but be safe ret RELOAD_CURDIR ENDP ;*********************************** CNS *************************************** ;Input: Parser control block ;Output: Result Parser control block ;Register usage: AX,BX,CX,DX,ES,DS,SI,DI ; ; ;*********************************** CNS *************************************** CHK_PARSER PROC NEAR xor cx,cx ;an000; clear out cx xor ax,ax ;AN000; clear out ax mov al,String_ctr ;AN000; grab current assign ctr mov bx,0002h ;an000; set bx to 2 div bl ;AN000; divide so we get rem. cmp RES_TYPE,2 ;an000; check for 1st drive ; $IF E,AND ;AN000; drive letter? JNE $$IF61 cmp ah,EVENX ;AN000; and no remainder? ; $IF E ;AN000; JNE $$IF61 inc STRING_CTR ;AN000; increment counter mov PARMS_AVAIL,'y' ;AN000; signal parms entered push ax ;AN000; save ax mov al,res_itag ;AN000; grab parm entered mov drv_x,al ;AN000; save it for later use call drvchk ;AC000; check for valid drive cbw ;AC000; convert drive byte found to a word mov bx,offset drives-1 ;AC000; get the drive table add bx,ax ;AC000; get the drive address mov save_dr_tbl_ptr,bx ;an000; save the drive table pointer pop ax ;an000; restore ax ; $ENDIF ;AN000; $$IF61: cmp RES_TYPE,2 ;AN000; check for 2nd drive ; $IF E,AND ;AN000; drive entered? JNE $$IF63 cmp ah,EVENX ;AN000; and not first? ; $IF NE ;AN000; JE $$IF63 inc STRING_CTR ;AN000; increment counter mov PARMS_AVAIL,'y' ;AN000; signal parms entered push ax ;AN000; save ax mov al,res_itag ;AN000; grab parm entered mov drv_x,al ;AN000; save it for later use call drvchk ;AC000; if so see if it was valid mov bx,save_dr_tbl_ptr ;an000; set bx to drive table mov [bx],al ;AC000; if valid update the table mov POS_FLAG,'y' ;AN000; yes you have valid positionals pop ax ;an000; restore ax mov Parm_Ptr1,si ;an002; dms;ptr to 1st. parm ; $ENDIF ;AN000; $$IF63: ; Check for /switches PUBLIC CheckSwitches CheckSwitches: cmp RES_SYN,0 ;AN000; See if a switch was specified ; $IF NE ;AN000; If so, JE $$IF65 ; Check for /STATUS or /STA cmp [RES_SYN], offset SW_Syn1 ; is it /STATUS? je SwitchStatus ; jump if so cmp [RES_SYN], offset SW_Syn2 ; is it /STA? je SwitchStatus cmp [RES_SYN], offset SW_Syn3 ; is it /S? jne SwitchStatusDone ; jump if not SwitchStatus: mov STATUS_flag,1 ;AN000; set the status flag on mov PARMS_AVAIL,'y' ;AN000; and report that a valid parameter mov byte ptr SW_Syn1,20h ;an000; remove switch from list mov byte ptr SW_Syn2,20h ;an000; remove switch from list mov byte ptr SW_Syn3,20h mov Parm_Ptr1,si ;an002; dms;ptr to 1st. parm jmp short $$IF65 ; jump out of switches SwitchStatusDone: ; Check for /? cmp [RES_SYN], offset SW2_Syn ; is it /? jne SwitchOptionsDone ; jump if not mov OPTIONS_flag,1 ; else set flag for later jmp short $$IF65 ; jump out of switches SwitchOptionsDone: ; $ENDIF ;AN000; was on the command line $$IF65: ret ;AN000; CHK_PARSER ENDP ;************************************************************************** ; ;Purpose: Display the options help message ;Input : No value passed ;Registers affected: BX,CX,DX,AX ; ;Output : Message line(s) displayed. No value returned. ; ;************************************************************************** PUBLIC DISPLAY_OPTIONS DISPLAY_OPTIONS PROC NEAR mov ax, MSG_OPTIONS_FIRST ; message # mov bx, stdout ; where to send it mov cx, 0 ; # of replaceable parms mov si, 0 ; offset of sublist mov di, 0 ; ptr to buffer for user input mov dl, no_input ; no user input to mes. ret. mov dh, utility_msg_class ; utility messages only DO_LOOP: call SYSDISPMSG ; go to message retriever cmp ax, MSG_OPTIONS_LAST ; last message? je DO_DONE ; done if so inc ax ; else, get next one jmp short DO_LOOP ; and go do it DO_DONE: ret DISPLAY_OPTIONS ENDP page ;*********************************** CNS *************************************** ; ; check drive validity ; drvchk: sub al,"A" ; NS- error checking ; $IF NB ;AN000; ;if alphabetic, JB $$IF67 push es push bx push ax les bx,inv cmp al,es:[bx].sysi_ncds ;AN000; ;NS- check in case current directory ; $IF NAE ;AN000; ;NS- has been altered JAE $$IF68 les bx,es:[bx].sysi_cds push bx mov bl,size curdir_list mul bl pop bx add bx,ax test es:[bx].curdir_flags,curdir_inuse ; $IF NZ ;AC000; JZ $$IF69 pop ax pop bx pop es inc al ret ; $ENDIF ;AC000; curdir in use? $$IF69: ; $ENDIF ;AC000; curdir been altered? $$IF68: ; $ENDIF ;AC000; alphabetic? $$IF67: mov ax,parse10 ;AN000; Invalid parameter call PARSE_ERR ;an000; display the error & end ;******************************* CNS ******************************************* ;Purpose: Print the mapping status of the drive table. ;Input : Drive table ;Registers affected: BX,CX,DX,AX ; ;Output : Display of all drive values stored not equal to their sequential ; storage address ; ;******************************* CNS ******************************************* REPORT_STATUS PROC NEAR push es ;an000; save es push es ;an000; swap es with pop ax ;an000; ax mov curr_es_seg,ax ;an000; save es in curr_es_seg mov ax,0601h ;an000; our int 2fh int 2fh ;an000; returns segment of drive vector assume es:nothing ;an000; tell the linker mov cl,01 ;AN000; ;initialize the counter ;AN000; advance to next drive mov bx,offset drives ;AN000; load drive table ; $DO $$DO73: cmp cl,26 ;AN000; see if we scanned all drives ; $LEAVE A ;AN000; exit loop if we have JA $$EN73 cmp cl,es:[bx] ;AN000; ;compare the table value ;to the table contents ; $IF NE ;AN000; JE $$IF75 push bx ;an000; save bx - we stomp it push cx ;an000; save cx - we stomp it mov al,es:[bx] ;AN000; get the table contents to convert push es ;an000; save es for print mov bx,curr_es_seg ;an000; get the current segment mov es,bx ;an000; get the segment into es assume es:code ;an000; tell linker it is code add cl,40H ;AN000; convert to ascii representation add al,40h ;an000; convert to ascii mov OLD_DRV,cl ;AN000; place in parms for printing mov NEW_DRV,al ;AN000; by message retriever mov ax,0002h ;an000; message #2 mov bx,stdout ;an000; print to standard out mov cx,0002h ;an000; two replaceable parms mov si,offset sublist1 ;an000; offset of sublist mov di,0000h ;an000; no buffer for user input mov dl,no_input ;AN000; no user input to mes. ret. mov dh,utility_msg_class ;an000; utility messages only call SYSDISPMSG ;AN000; ;go to message retriever pop es ;an000; restore es assume es:nothing ;an000; tell the linker pop cx ;an000; restore cx pop bx ;an000; restore bx ; $ENDIF ;AN000; $$IF75: inc bx ;an000; next drive in vector inc cl ;AN000; next letter to address ; $ENDDO ;AN000; JMP SHORT $$DO73 $$EN73: pop es ;an000; restore es assume es:code ;an000; tell the linker ret ;AN000; REPORT_STATUS ENDP page ;******************************* CNS ******************************************* ; Purpose: Exit program ; Input : Error code AL ; Output : Error code AL ; ;******************************* CNS ******************************************* EXIT_PROG PROC NEAR mov ah,EXIT ;AC000;(4ch) RETURN TO DOS WITH ERRORLEVEL int DOS_CALL ;AC000; ret ;AC000; EXIT_PROG ENDP ;******************************* CNS ******************************************* ;========================================================================= ; PARSE_ERR : This routine prints out the applicable parse ; error that is returned in AX by SYSPARSE. ; ; Inputs : AX - Parse error number to be printed ; Outputs : Applicable parse error ;========================================================================= PARSE_ERR proc near ;an000; dms;report an error push ax ;an000;save ax mov byte ptr ds:[si],0 ;an002;null terminate string mov dx,Parm_Ptr1 ;an002;move ptr to sublist mov Parse_Sub_Off,dx ;an002; mov Parse_Sub_Seg,ds ;an002; mov bx,STDERR ;an000;print to standard out mov cx,1 ;an002;1 replaceable parm mov si,offset Parse_Sublist ;an002;sublist for replaceable parm mov dl,NO_INPUT ;AN000;no input to message retriever mov dh,PARSE_ERR_CLASS ;AN000;display parse errors call SYSDISPMSG ;AN000;display error pop ax ;AN000;restore errcode call EXIT_PROG ;AN000;exit ASSIGN due to error PARSE_ERR endp ;an000; dms; Release_Environment proc near ;an001; dms; push ax ;save regs ;an001; dms; push bx ; ;an001; dms; push es ; ;an001; dms; mov ah,Get_PSP ; get the PSP segment ;an001; dms; int 21h ; invoke INT 21h ;an001; dms; mov es,bx ; BX contains PSP segment - put in ES ;an001; dms; mov bx,word ptr es:[PSP_Env]; get segment of environmental vector ;an001; dms; mov es,bx ; place segment in ES for Free Memory ;an001; dms; mov ah,Dealloc ; Free Allocated Memory ;an001; dms; int 21h ; invoke INT 21h ;an001; dms; pop es ; restore regs ;an001; dms; pop bx ; ;an001; dms; pop ax ; ;an001; dms; ret ; return to caller ;an001; dms; Release_Environment endp Close_Handles proc near ;close handles 0-4 ;an001; dms; push bx ;save regs ;an001; dms; mov bx,4 ;close all standard files ;an001; dms; Close_Handle_Loop: mov ah,Handle_Close ;close file handle ;an001; dms; int 21h ; ;an001; dms; dec bx ;next handle ;an001; dms; jns Close_Handle_Loop ;continue ;an001; dms; pop bx ;restore regs ;an001; dms; ret ; ;an001; dms; Close_Handles endp ; ;an001; dms; Get_Vectors proc near ;get original vectors ;an001; dms; mov ax,(GET_INTERRUPT_VECTOR SHL 8)+ABS_DISK_READ ;(3525h) get the int 25 vector int DOS_CALL mov word ptr [int25_vec],bx mov word ptr [int25_vec+2],es mov ax,(GET_INTERRUPT_VECTOR SHL 8)+ABS_DISK_WRITE ;(3526H) get the int 26 vector int DOS_CALL mov word ptr [int26_vec],bx mov word ptr [int26_vec+2],es mov ax,(GET_INTERRUPT_VECTOR SHL 8)+MULTIPLEXOR ;(352FH) get the int 2F vector int DOS_CALL mov word ptr [int2F_vec],bx mov word ptr [int2F_vec+2],es mov ax,(Get_Interrupt_Vector SHL 8)+DOS_CALL ;(3521H) int DOS_CALL mov word ptr cs:[system],bx mov word ptr cs:[system+2],es MOV AX,(MPLEX_ID SHL 8)+MPLEX_R_U_THERE ;(0600H) See if we are in system already INT MULTIPLEXOR ;(2FH) OR AL,AL ; $IF NZ ;AC000; NOT INSTALLED JZ $$IF78 call RELOAD_CURDIR ;AC000; ; $ENDIF $$IF78: ret ; ;an001; dms; Get_Vectors endp ; ;an001; dms; Set_Vectors proc near ;set to new vectors ;an001; dms; mov ah,Get_Default_Drive ;(19H) int DOS_CALL inc al mov [default_drive],al ;NS- add one to the value to get the call mapdrv1 ;NS- actual drive value before mapping dec al ;NS- dec one to setup for select function mov dl,al ;select its replacement mov ah,Set_Default_Drive ;(0EH) int DOS_CALL ;NS- Set up hooks mov dx,offset int25 ;set int 25 vector mov ax,(SET_INTERRUPT_VECTOR SHL 8) + ABS_DISK_READ ;(2525H) int DOS_CALL ;NS- setup new seg mov dx,offset int26 ;set int 26 vector mov ax,(SET_INTERRUPT_VECTOR SHL 8) + ABS_DISK_WRITE ;(2526H) int DOS_CALL ;NS- Hook in resident portion mov dx,offset int2F ;set int 2F vector mov ax,(SET_INTERRUPT_VECTOR SHL 8) + MULTIPLEXOR ;(252FH) int DOS_CALL mov dx,offset ASSIGN_HANDLER ;set the system int vector mov ax,(SET_INTERRUPT_VECTOR SHL 8) + DOS_CALL ;(2521H) int DOS_CALL call Close_Handles ;close handles 0-4 ;an001; dms; call Release_Environment ;release the environmental vector ;an001; dms; mov dx,prog_size ;end but stay resident mov ah,KEEP_PROCESS ;(31h) NS- ASSIGN loaded in mem int DOS_CALL ret ; ;an001; dms; Set_Vectors endp ; ;an001; dms; .xlist MSG_SERVICES <MSGDATA> msg_services <NEARmsg> msg_services <LOADmsg> msg_services <DISPLAYmsg,CHARmsg> msg_services <assign.cla,assign.cl1> msg_services <assign.cl2> .list include msgdcl.inc code ends end ENTRY_POINT 
BasicIS4/Syntax/DyadicHilbertSequential.agda
mietek/hilbert-gentzen
29
2859
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇. -- Hilbert-style formalisation of syntax with context pairs. -- Sequences of terms. module BasicIS4.Syntax.DyadicHilbertSequential where open import BasicIS4.Syntax.Common public -- Derivations. infix 3 _⊦⊢_ data _⊦⊢_ : Cx² Ty Ty → Cx Ty → Set where nil : ∀ {Γ Δ} → Γ ⁏ Δ ⊦⊢ ∅ var : ∀ {Ξ A Γ Δ} → A ∈ Γ → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A mp : ∀ {Ξ A B Γ Δ} → A ▻ B ∈ Ξ → A ∈ Ξ → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , B ci : ∀ {Ξ A Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A ▻ A ck : ∀ {Ξ A B Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A ▻ B ▻ A cs : ∀ {Ξ A B C Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , (A ▻ B ▻ C) ▻ (A ▻ B) ▻ A ▻ C mvar : ∀ {Ξ A Γ Δ} → A ∈ Δ → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A nec : ∀ {Ξ Ξ′ A Γ Δ} → ∅ ⁏ Δ ⊦⊢ Ξ′ , A → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , □ A cdist : ∀ {Ξ A B Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , □ (A ▻ B) ▻ □ A ▻ □ B cup : ∀ {Ξ A Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , □ A ▻ □ □ A cdown : ∀ {Ξ A Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , □ A ▻ A cpair : ∀ {Ξ A B Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A ▻ B ▻ A ∧ B cfst : ∀ {Ξ A B Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A ∧ B ▻ A csnd : ∀ {Ξ A B Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A ∧ B ▻ B unit : ∀ {Ξ Γ Δ} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , ⊤ infix 3 _⊢_ _⊢_ : Cx² Ty Ty → Ty → Set Γ ⁏ Δ ⊢ A = ∃ (λ Ξ → Γ ⁏ Δ ⊦⊢ Ξ , A) -- Monotonicity with respect to context inclusion. mono⊦⊢ : ∀ {Ξ Γ Γ′ Δ} → Γ ⊆ Γ′ → Γ ⁏ Δ ⊦⊢ Ξ → Γ′ ⁏ Δ ⊦⊢ Ξ mono⊦⊢ η nil = nil mono⊦⊢ η (var i ts) = var (mono∈ η i) (mono⊦⊢ η ts) mono⊦⊢ η (mp i j ts) = mp i j (mono⊦⊢ η ts) mono⊦⊢ η (ci ts) = ci (mono⊦⊢ η ts) mono⊦⊢ η (ck ts) = ck (mono⊦⊢ η ts) mono⊦⊢ η (cs ts) = cs (mono⊦⊢ η ts) mono⊦⊢ η (mvar i ts) = mvar i (mono⊦⊢ η ts) mono⊦⊢ η (nec ss ts) = nec ss (mono⊦⊢ η ts) mono⊦⊢ η (cdist ts) = cdist (mono⊦⊢ η ts) mono⊦⊢ η (cup ts) = cup (mono⊦⊢ η ts) mono⊦⊢ η (cdown ts) = cdown (mono⊦⊢ η ts) mono⊦⊢ η (cpair ts) = cpair (mono⊦⊢ η ts) mono⊦⊢ η (cfst ts) = cfst (mono⊦⊢ η ts) mono⊦⊢ η (csnd ts) = csnd (mono⊦⊢ η ts) mono⊦⊢ η (unit ts) = unit (mono⊦⊢ η ts) mono⊢ : ∀ {A Γ Γ′ Δ} → Γ ⊆ Γ′ → Γ ⁏ Δ ⊢ A → Γ′ ⁏ Δ ⊢ A mono⊢ η (Ξ , ts) = Ξ , mono⊦⊢ η ts -- Monotonicity with respect to modal context inclusion. mmono⊦⊢ : ∀ {Ξ Γ Δ Δ′} → Δ ⊆ Δ′ → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ′ ⊦⊢ Ξ mmono⊦⊢ θ nil = nil mmono⊦⊢ θ (var i ts) = var i (mmono⊦⊢ θ ts) mmono⊦⊢ θ (mp i j ts) = mp i j (mmono⊦⊢ θ ts) mmono⊦⊢ θ (ci ts) = ci (mmono⊦⊢ θ ts) mmono⊦⊢ θ (ck ts) = ck (mmono⊦⊢ θ ts) mmono⊦⊢ θ (cs ts) = cs (mmono⊦⊢ θ ts) mmono⊦⊢ θ (mvar i ts) = mvar (mono∈ θ i) (mmono⊦⊢ θ ts) mmono⊦⊢ θ (nec ss ts) = nec (mmono⊦⊢ θ ss) (mmono⊦⊢ θ ts) mmono⊦⊢ θ (cdist ts) = cdist (mmono⊦⊢ θ ts) mmono⊦⊢ θ (cup ts) = cup (mmono⊦⊢ θ ts) mmono⊦⊢ θ (cdown ts) = cdown (mmono⊦⊢ θ ts) mmono⊦⊢ θ (cpair ts) = cpair (mmono⊦⊢ θ ts) mmono⊦⊢ θ (cfst ts) = cfst (mmono⊦⊢ θ ts) mmono⊦⊢ θ (csnd ts) = csnd (mmono⊦⊢ θ ts) mmono⊦⊢ θ (unit ts) = unit (mmono⊦⊢ θ ts) mmono⊢ : ∀ {A Γ Δ Δ′} → Δ ⊆ Δ′ → Γ ⁏ Δ ⊢ A → Γ ⁏ Δ′ ⊢ A mmono⊢ θ (Ξ , ts) = Ξ , mmono⊦⊢ θ ts -- Concatenation of derivations. _⧺⊦_ : ∀ {Γ Δ Ξ Ξ′} → Γ ⁏ Δ ⊦⊢ Ξ → Γ ⁏ Δ ⊦⊢ Ξ′ → Γ ⁏ Δ ⊦⊢ Ξ ⧺ Ξ′ us ⧺⊦ nil = us us ⧺⊦ var i ts = var i (us ⧺⊦ ts) us ⧺⊦ mp i j ts = mp (mono∈ weak⊆⧺₂ i) (mono∈ weak⊆⧺₂ j) (us ⧺⊦ ts) us ⧺⊦ ci ts = ci (us ⧺⊦ ts) us ⧺⊦ ck ts = ck (us ⧺⊦ ts) us ⧺⊦ cs ts = cs (us ⧺⊦ ts) us ⧺⊦ mvar i ts = mvar i (us ⧺⊦ ts) us ⧺⊦ nec ss ts = nec ss (us ⧺⊦ ts) us ⧺⊦ cdist ts = cdist (us ⧺⊦ ts) us ⧺⊦ cup ts = cup (us ⧺⊦ ts) us ⧺⊦ cdown ts = cdown (us ⧺⊦ ts) us ⧺⊦ cpair ts = cpair (us ⧺⊦ ts) us ⧺⊦ cfst ts = cfst (us ⧺⊦ ts) us ⧺⊦ csnd ts = csnd (us ⧺⊦ ts) us ⧺⊦ unit ts = unit (us ⧺⊦ ts) -- Modus ponens and necessitation in expanded form. app : ∀ {A B Γ Δ} → Γ ⁏ Δ ⊢ A ▻ B → Γ ⁏ Δ ⊢ A → Γ ⁏ Δ ⊢ B app {A} {B} (Ξ , ts) (Ξ′ , us) = Ξ″ , vs where Ξ″ = (Ξ′ , A) ⧺ (Ξ , A ▻ B) vs = mp top (mono∈ (weak⊆⧺₁ (Ξ , A ▻ B)) top) (us ⧺⊦ ts) box : ∀ {A Γ Δ} → ∅ ⁏ Δ ⊢ A → Γ ⁏ Δ ⊢ □ A box (Ξ , ts) = ∅ , nec ts nil
lab13/lab13.asm
Brant-Skywalker/ZJUI-ECE-120-SP21
0
20749
<gh_stars>0 ; This program calculates X! (X factorial). It can calculate ; different numbers (4!, 6!, etc.) by changing the value of the first memory ; location at the bottom of the code. It is currently set up to calculate ; 5!. The program does not account for zero or negative numbers as input. ; This program primarily uses registers in the following manner: ; R0 contains 0 (registers contain zero after reset) ; R1 contains multiplication result (6x5 = 30, 30x4 = 120, etc) ; R2 contains -1 ; R3 contains counter for outer loop ; R4 contains counter for inner loop ; R5 contains current sum .ORIG x3000 ; starting address is x3000 AND R0,R0,#0 ; R0 initialized AND R5,R5,#0 ; R5 initialized LD R1,INPUT ; R1 contains input number LD R2,MINUS1 ; R2 contains -1 ADD R3,R1,R2 ; R3 contains input number -1 ADD R3,R3,R2 ; R3 contains input number -2 ; (initializes outer count) OUTERLOOP ADD R4,R0,R3 ; Copy outer count into inner count ; This loop multiplies via addition (6x5 = 6+6+6+6+6 = 30, ; 30x4 = 30+30+30+30 = 120, etc) INNERLOOP ADD R5,R5,R1 ; Increment sum ADD R4,R4,R2 ; Decrement inner count BRzp INNERLOOP ; Branch to inner loop if inner count ; is positive or zero ADD R1,R0,R5 ; R1 now contains sum result from inner loop LD R5,ZERO ; Clear R5 (previous sum) to 0 ADD R3,R3,R2 ; Decrement outer count BRzp OUTERLOOP ; Branch to outer loop if outer count ; is positive or zero ST R1,RESULT ; This address contains X! TRAP x25 ; Halt INPUT .FILL x0005 ; Input for X!, in this case X = 5 ZERO .FILL x0000 ; Zero MINUS1 .FILL xFFFF ; 2's complement of 1 (i.e. -1) RESULT .FILL x0000 ; At program completion, the result is ; stored here .END ; Terminate the assembly process
scripts/Blank Desktop Image.scpt
willfarrell/mac-ci
1
3396
<filename>scripts/Blank Desktop Image.scpt set desktopImage to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Light.png" tell application "Finder" set desktop picture to desktopImage end tell
oeis/116/A116699.asm
neoneye/loda-programs
11
175395
; A116699: Number of permutations of length n which avoid the patterns 123 and 4312. ; 1,2,5,13,30,61,112,190,303,460,671,947,1300,1743,2290,2956,3757,4710,5833,7145,8666,10417,12420,14698,17275,20176,23427,27055,31088,35555,40486,45912,51865,58378,65485,73221,81622,90725,100568,111190,122631,134932,148135,162283,177420,193591,210842,229220,248773,269550,291601,314977,339730,365913,393580,422786,453587,486040,520203,556135,593896,633547,675150,718768,764465,812306,862357,914685,969358,1026445,1086016,1148142,1212895,1280348,1350575,1423651,1499652,1578655,1660738,1745980,1834461 sub $0,1 mov $1,4 sub $2,$0 sub $1,$2 bin $1,$0 bin $2,2 sub $1,$2 mov $0,$1 add $0,1
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c2/c25001b.ada
best08618/asylo
7
24723
-- C25001B.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT ALL CHARACTER LITERALS CAN BE WRITTEN. -- CASE B: THE LOWER CASE LETTERS AND THE OTHER -- SPECIAL CHARACTERS. -- TBN 8/1/86 WITH REPORT; USE REPORT; PROCEDURE C25001B IS BEGIN TEST ("C25001B", "CHECK THAT EACH CHARACTER IN THE LOWER CASE " & "LETTERS AND THE OTHER SPECIAL CHARACTERS CAN " & "BE WRITTEN"); IF CHARACTER'POS('a') /= 97 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'a'"); END IF; IF CHARACTER'POS('b') /= 98 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'b'"); END IF; IF CHARACTER'POS('c') /= 99 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'c'"); END IF; IF CHARACTER'POS('d') /= 100 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'd'"); END IF; IF CHARACTER'POS('e') /= 101 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'e'"); END IF; IF CHARACTER'POS('f') /= 102 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'f'"); END IF; IF CHARACTER'POS('g') /= 103 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'g'"); END IF; IF CHARACTER'POS('h') /= 104 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'h'"); END IF; IF CHARACTER'POS('i') /= 105 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'i'"); END IF; IF CHARACTER'POS('j') /= 106 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'j'"); END IF; IF CHARACTER'POS('k') /= 107 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'k'"); END IF; IF CHARACTER'POS('l') /= 108 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'l'"); END IF; IF CHARACTER'POS('m') /= 109 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'm'"); END IF; IF CHARACTER'POS('n') /= 110 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'n'"); END IF; IF CHARACTER'POS('o') /= 111 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'o'"); END IF; IF CHARACTER'POS('p') /= 112 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'p'"); END IF; IF CHARACTER'POS('q') /= 113 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'q'"); END IF; IF CHARACTER'POS('r') /= 114 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'r'"); END IF; IF CHARACTER'POS('s') /= 115 THEN FAILED ("INCORRECT POSITION NUMBER FOR 's'"); END IF; IF CHARACTER'POS('t') /= 116 THEN FAILED ("INCORRECT POSITION NUMBER FOR 't'"); END IF; IF CHARACTER'POS('u') /= 117 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'u'"); END IF; IF CHARACTER'POS('v') /= 118 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'v'"); END IF; IF CHARACTER'POS('w') /= 119 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'w'"); END IF; IF CHARACTER'POS('x') /= 120 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'x'"); END IF; IF CHARACTER'POS('y') /= 121 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'y'"); END IF; IF CHARACTER'POS('z') /= 122 THEN FAILED ("INCORRECT POSITION NUMBER FOR 'z'"); END IF; IF CHARACTER'POS('!') /= 33 THEN FAILED ("INCORRECT POSITION NUMBER FOR '!'"); END IF; IF CHARACTER'POS('$') /= 36 THEN FAILED ("INCORRECT POSITION NUMBER FOR '$'"); END IF; IF CHARACTER'POS('%') /= 37 THEN FAILED ("INCORRECT POSITION NUMBER FOR '%'"); END IF; IF CHARACTER'POS('?') /= 63 THEN FAILED ("INCORRECT POSITION NUMBER FOR '?'"); END IF; IF CHARACTER'POS('@') /= 64 THEN FAILED ("INCORRECT POSITION NUMBER FOR '@'"); END IF; IF CHARACTER'POS('[') /= 91 THEN FAILED ("INCORRECT POSITION NUMBER FOR '['"); END IF; IF CHARACTER'POS('\') /= 92 THEN FAILED ("INCORRECT POSITION NUMBER FOR '\'"); END IF; IF CHARACTER'POS(']') /= 93 THEN FAILED ("INCORRECT POSITION NUMBER FOR ']'"); END IF; IF CHARACTER'POS('^') /= 94 THEN FAILED ("INCORRECT POSITION NUMBER FOR '^'"); END IF; IF CHARACTER'POS('`') /= 96 THEN FAILED ("INCORRECT POSITION NUMBER FOR '`'"); END IF; IF CHARACTER'POS('{') /= 123 THEN FAILED ("INCORRECT POSITION NUMBER FOR '{'"); END IF; IF CHARACTER'POS('}') /= 125 THEN FAILED ("INCORRECT POSITION NUMBER FOR '}'"); END IF; IF CHARACTER'POS('~') /= 126 THEN FAILED ("INCORRECT POSITION NUMBER FOR '~'"); END IF; RESULT; END C25001B;
programs/oeis/067/A067988.asm
neoneye/loda
22
247813
; A067988: Row sums of triangle A067330; also of triangle A067418. ; 1,3,10,25,60,133,284,585,1175,2310,4464,8502,15995,29775,54920,100487,182556,329555,591550,1056405,1877821,3323868,5860800,10297500,18033925,31487643,54824854,95211205,164948700 add $0,2 mov $1,$0 seq $1,1629 ; Self-convolution of Fibonacci numbers. mul $0,$1 div $0,2
target/cos_117/disasm/iop_overlay1/XCLS.asm
jrrk2/cray-sim
49
162596
@ OR[280] - device desc. addr. @ OR[281] - function code @ 5 - @ 6 - 0x0000 (0x000000) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0001 (0x000002) 0x291A- f:00024 d: 282 | OR[282] = A 0x0002 (0x000004) 0x2119- f:00020 d: 281 | A = OR[281] 0x0003 (0x000006) 0x1605- f:00013 d: 5 | A = A - 5 (0x0005) 0x0004 (0x000008) 0x8602- f:00103 d: 2 | P = P + 2 (0x0006), A # 0 0x0005 (0x00000A) 0x7007- f:00070 d: 7 | P = P + 7 (0x000C) 0x0006 (0x00000C) 0x2119- f:00020 d: 281 | A = OR[281] 0x0007 (0x00000E) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006) 0x0008 (0x000010) 0x8602- f:00103 d: 2 | P = P + 2 (0x000A), A # 0 0x0009 (0x000012) 0x7003- f:00070 d: 3 | P = P + 3 (0x000C) 0x000A (0x000014) 0x7C34- f:00076 d: 52 | R = OR[52] 0x000B (0x000016) 0x0000- f:00000 d: 0 | PASS @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ Function 5 or 6 handler @ Load device driver overlay number form desc. and call it with the same function call we were called with 0x000C (0x000018) 0x2118- f:00020 d: 280 | A = OR[280] 0x000D (0x00001A) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x000E (0x00001C) 0x2908- f:00024 d: 264 | OR[264] = A 0x000F (0x00001E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0010 (0x000020) 0x291B- f:00024 d: 283 | OR[283] = A 0x0011 (0x000022) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0012 (0x000024) 0x291C- f:00024 d: 284 | OR[284] = A 0x0013 (0x000026) 0x211B- f:00020 d: 283 | A = OR[283] 0x0014 (0x000028) 0x291D- f:00024 d: 285 | OR[285] = A 0x0015 (0x00002A) 0x2118- f:00020 d: 280 | A = OR[280] 0x0016 (0x00002C) 0x291E- f:00024 d: 286 | OR[286] = A 0x0017 (0x00002E) 0x2119- f:00020 d: 281 | A = OR[281] 0x0018 (0x000030) 0x291F- f:00024 d: 287 | OR[287] = A 0x0019 (0x000032) 0x111C- f:00010 d: 284 | A = 284 (0x011C) 0x001A (0x000034) 0x5800- f:00054 d: 0 | B = A 0x001B (0x000036) 0x1800-0x0918 f:00014 d: 0 | A = 2328 (0x0918) 0x001D (0x00003A) 0x7C09- f:00076 d: 9 | R = OR[9] @ Check return value 0x001E (0x00003C) 0x291A- f:00024 d: 282 | OR[282] = A 0x001F (0x00003E) 0x211A- f:00020 d: 282 | A = OR[282] 0x0020 (0x000040) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002) 0x0021 (0x000042) 0x8402- f:00102 d: 2 | P = P + 2 (0x0023), A = 0 0x0022 (0x000044) 0x7009- f:00070 d: 9 | P = P + 9 (0x002B) 0x0023 (0x000046) 0x2118- f:00020 d: 280 | A = OR[280] 0x0024 (0x000048) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008) 0x0025 (0x00004A) 0x2908- f:00024 d: 264 | OR[264] = A 0x0026 (0x00004C) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0027 (0x00004E) 0x2606- f:00023 d: 6 | A = A - OR[6] 0x0028 (0x000050) 0x8602- f:00103 d: 2 | P = P + 2 (0x002A), A # 0 0x0029 (0x000052) 0x7002- f:00070 d: 2 | P = P + 2 (0x002B) 0x002A (0x000054) 0x701D- f:00070 d: 29 | P = P + 29 (0x0047) @ Clear entry 8 0x002B (0x000056) 0x2118- f:00020 d: 280 | A = OR[280] 0x002C (0x000058) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008) 0x002D (0x00005A) 0x2908- f:00024 d: 264 | OR[264] = A 0x002E (0x00005C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x002F (0x00005E) 0x3908- f:00034 d: 264 | (OR[264]) = A @ Load entry 11, clear up upper byte and write back 0x0030 (0x000060) 0x2118- f:00020 d: 280 | A = OR[280] 0x0031 (0x000062) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B) 0x0032 (0x000064) 0x2908- f:00024 d: 264 | OR[264] = A 0x0033 (0x000066) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0034 (0x000068) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001) 0x0035 (0x00006A) 0x0A08- f:00005 d: 8 | A = A < 8 (0x0008) 0x0036 (0x00006C) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000) 0x0037 (0x00006E) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x0038 (0x000070) 0x3908- f:00034 d: 264 | (OR[264]) = A @ Clear entry 12 0x0039 (0x000072) 0x2118- f:00020 d: 280 | A = OR[280] 0x003A (0x000074) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C) 0x003B (0x000076) 0x2908- f:00024 d: 264 | OR[264] = A 0x003C (0x000078) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x003D (0x00007A) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x003E (0x00007C) 0x2119- f:00020 d: 281 | A = OR[281] 0x003F (0x00007E) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006) 0x0040 (0x000080) 0x8402- f:00102 d: 2 | P = P + 2 (0x0042), A = 0 0x0041 (0x000082) 0x7006- f:00070 d: 6 | P = P + 6 (0x0047) @ For function code 6, we also clear entry 13 0x0042 (0x000084) 0x2118- f:00020 d: 280 | A = OR[280] 0x0043 (0x000086) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D) 0x0044 (0x000088) 0x2908- f:00024 d: 264 | OR[264] = A 0x0045 (0x00008A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0046 (0x00008C) 0x3908- f:00034 d: 264 | (OR[264]) = A @ Set return value: pass on whatever the driver returned 0x0047 (0x00008E) 0x2005- f:00020 d: 5 | A = OR[5] 0x0048 (0x000090) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006) 0x0049 (0x000092) 0x2908- f:00024 d: 264 | OR[264] = A 0x004A (0x000094) 0x211A- f:00020 d: 282 | A = OR[282] 0x004B (0x000096) 0x3908- f:00034 d: 264 | (OR[264]) = A @ Return from overlay 0x004C (0x000098) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x004D (0x00009A) 0x291C- f:00024 d: 284 | OR[284] = A 0x004E (0x00009C) 0x111C- f:00010 d: 284 | A = 284 (0x011C) 0x004F (0x00009E) 0x5800- f:00054 d: 0 | B = A 0x0050 (0x0000A0) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0051 (0x0000A2) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0052 (0x0000A4) 0x0000- f:00000 d: 0 | PASS 0x0053 (0x0000A6) 0x0000- f:00000 d: 0 | PASS
Task/Last-Friday-of-each-month/Ada/last-friday-of-each-month.ada
LaudateCorpus1/RosettaCodeData
1
10514
with Ada.Text_IO, GNAT.Calendar.Time_IO, Ada.Command_Line, Ada.Calendar.Formatting, Ada.Calendar.Arithmetic; procedure Last_Weekday_In_Month is procedure Put_Line(T: Ada.Calendar.Time) is use GNAT.Calendar.Time_IO; begin Ada.Text_IO.Put_Line(Image(Date => T, Picture => ISO_Date)); end Put_Line; use Ada.Calendar, Ada.Calendar.Arithmetic; subtype Day_Name is Formatting.Day_Name; use type Formatting.Day_Name; T, Selected : Time; Weekday: Day_Name := Day_Name'Value(Ada.Command_Line.Argument (1)); Year : Year_Number := Integer'Value (Ada.Command_Line.Argument (2)); begin for Month in 1 .. 12 loop T := Time_Of (Year => Year, Month => Month, Day => 01); while Ada.Calendar.Month(T) = Month loop if Formatting.Day_Of_Week (T) = Weekday then Selected := T; end if; T := T + Day_Count(1); end loop; Put_Line(Selected); end loop; end Last_Weekday_In_Month;
programs/oeis/224/A224134.asm
karttu/loda
0
5461
; A224134: Number of 3 X n 0..1 arrays with rows nondecreasing and antidiagonals unimodal. ; 8,27,58,106,175,269,392,548,741,975,1254,1582,1963,2401,2900,3464,4097,4803,5586,6450,7399,8437,9568,10796,12125,13559,15102,16758,18531,20425,22444,24592,26873,29291,31850,34554,37407,40413,43576,46900,50389,54047,57878,61886,66075,70449,75012,79768,84721,89875,95234,100802,106583,112581,118800,125244,131917,138823,145966,153350,160979,168857,176988,185376,194025,202939,212122,221578,231311,241325,251624,262212,273093,284271,295750,307534,319627,332033,344756,357800,371169,384867,398898,413266,427975,443029,458432,474188,490301,506775,523614,540822,558403,576361,594700,613424,632537,652043,671946,692250,712959,734077,755608,777556,799925,822719,845942,869598,893691,918225,943204,968632,994513,1020851,1047650,1074914,1102647,1130853,1159536,1188700,1218349,1248487,1279118,1310246,1341875,1374009,1406652,1439808,1473481,1507675,1542394,1577642,1613423,1649741,1686600,1724004,1761957,1800463,1839526,1879150,1919339,1960097,2001428,2043336,2085825,2128899,2172562,2216818,2261671,2307125,2353184,2399852,2447133,2495031,2543550,2592694,2642467,2692873,2743916,2795600,2847929,2900907,2954538,3008826,3063775,3119389,3175672,3232628,3290261,3348575,3407574,3467262,3527643,3588721,3650500,3712984,3776177,3840083,3904706,3970050,4036119,4102917,4170448,4238716,4307725,4377479,4447982,4519238,4591251,4664025,4737564,4811872,4886953,4962811,5039450,5116874,5195087,5274093,5353896,5434500,5515909,5598127,5681158,5765006,5849675,5935169,6021492,6108648,6196641,6285475 mov $1,3 lpb $0,1 add $1,3 add $1,$0 sub $0,1 mov $2,1 add $3,$1 lpe add $1,4 mul $3,2 add $2,$3 add $1,$2 add $1,1
oeis/077/A077899.asm
neoneye/loda-programs
11
13001
<reponame>neoneye/loda-programs<filename>oeis/077/A077899.asm ; A077899: Expansion of (1-x)^(-1)/(1+x-2*x^2+x^3). ; Submitted by <NAME> ; 1,0,3,-3,10,-18,42,-87,190,-405,873,-1872,4024,-8640,18561,-39864,85627,-183915,395034,-848490,1822474,-3914487,8407926,-18059373,38789713,-83316384,178955184,-384377664,825604417,-1773314928,3808901427,-8181135699,17572253482,-37743426306 add $0,2 lpb $0 sub $0,1 sub $1,$3 add $4,12 add $2,$4 mov $3,$1 mov $1,$2 mov $2,$3 sub $4,$3 mul $3,2 lpe add $0,$2 div $0,12
Prelude.agda
mietek/lamport-timestamps
0
1073
<reponame>mietek/lamport-timestamps module Prelude where open import Agda.Builtin.IO public using (IO) open import Data.Empty public using () renaming (⊥ to 𝟘 ; ⊥-elim to elim𝟘) open import Data.Nat public using (ℕ ; zero ; suc ; decTotalOrder ; _⊔_) renaming (_≤_ to _⊑_ ; z≤n to z⊑n ; s≤s to n⊑m→sn⊑sm ; _≤′_ to _≤_ ; ≤′-refl to refl≤ ; ≤′-step to step≤ ; _≤?_ to _⊑?_ ; _≰_ to _⋢_ ; _<′_ to _<_ ; _≟_ to _≡?_) open import Data.Nat.Properties public using () renaming (≤⇒≤′ to ⊑→≤ ; ≤′⇒≤ to ≤→⊑ ; z≤′n to z≤n ; s≤′s to n≤m→sn≤sm) open import Data.Nat.Show public using (show) open import Data.Product public using (Σ ; _×_ ; _,_) renaming (proj₁ to π₁ ; proj₂ to π₂) open import Data.String public using (String) renaming (_≟_ to _≡ₛ?_ ; _++_ to _⧺_) open import Data.Sum public using (_⊎_) renaming (inj₁ to ι₁ ; inj₂ to ι₂) open import Data.Unit public using () renaming (⊤ to Unit ; tt to unit) open import Function public using (_∘_) open import Relation.Binary public using (Antisymmetric ; Decidable ; DecTotalOrder ; Reflexive ; Rel ; Symmetric ; Total ; Transitive ; Trichotomous ; Tri) renaming (tri< to τ₍ ; tri≈ to τ₌ ; tri> to τ₎) open module NDTO = DecTotalOrder decTotalOrder public using () renaming (antisym to antisym⊑ ; trans to trans⊑ ; total to total⊑) open import Relation.Binary.PropositionalEquality public using (_≡_ ; _≢_ ; refl ; trans ; sym ; cong ; cong₂ ; subst) open import Relation.Binary.HeterogeneousEquality public using (_≅_ ; _≇_) renaming (refl to refl≅ ; trans to trans≅ ; sym to sym≅ ; cong to cong≅ ; cong₂ to cong₂≅ ; subst to subst≅ ; ≅-to-≡ to ≅→≡ ; ≡-to-≅ to ≡→≅) open import Relation.Nullary public using (¬_ ; Dec ; yes ; no) open import Relation.Nullary.Negation public using () renaming (contradiction to _↯_) -- I/O. postulate return : ∀ {a} {A : Set a} → A → IO A _≫=_ : ∀ {a b} {A : Set a} {B : Set b} → IO A → (A → IO B) → IO B {-# COMPILED return (\_ _ -> return) #-} {-# COMPILED _≫=_ (\_ _ _ _ -> (>>=)) #-} _≫_ : ∀ {a b} {A : Set a} {B : Set b} → IO A → IO B → IO B m₁ ≫ m₂ = m₁ ≫= λ _ → m₂ postulate putStr : String → IO Unit putStrLn : String → IO Unit {-# COMPILED putStr putStr #-} {-# COMPILED putStrLn putStrLn #-} -- Notation for I/O. infix -10 do_ do_ : ∀ {a} {A : Set a} → A → A do x = x case_of_ : ∀ {a b} {A : Set a} {B : Set b} → A → (A → B) → B case x of f = f x infixr 0 do-bind syntax do-bind m₁ (λ x → m₂) = x ← m₁ ⁏ m₂ do-bind = _≫=_ infixr 0 do-seq syntax do-seq m₁ m₂ = m₁ ⁏ m₂ do-seq = _≫_ infixr 0 do-let syntax do-let m₁ (λ x → m₂) = x := m₁ ⁏ m₂ do-let = case_of_ -- Properties of binary relations. Irreflexive : ∀ {a ℓ} {A : Set a} → Rel A ℓ → Set _ Irreflexive _∼_ = ∀ {x} → ¬ (x ∼ x) -- Properties of _≡_. n≡m→sn≡sm : ∀ {n m} → n ≡ m → suc n ≡ suc m n≡m→sn≡sm refl = refl sn≡sm→n≡m : ∀ {n m} → suc n ≡ suc m → n ≡ m sn≡sm→n≡m refl = refl n≢m→sn≢sm : ∀ {n m} → n ≢ m → suc n ≢ suc m n≢m→sn≢sm n≢m refl = refl ↯ n≢m sn≢sm→n≢m : ∀ {n m} → suc n ≢ suc m → n ≢ m sn≢sm→n≢m sn≢sm refl = refl ↯ sn≢sm sym≢ : ∀ {a} {A : Set a} → Symmetric (_≢_ {A = A}) sym≢ x≢y refl = refl ↯ x≢y -- Properties of _≤_. _≰_ : ℕ → ℕ → Set n ≰ m = ¬ (n ≤ m) sn≤m→n≤m : ∀ {n m} → suc n ≤ m → n ≤ m sn≤m→n≤m refl≤ = step≤ refl≤ sn≤m→n≤m (step≤ sn≤m) = step≤ (sn≤m→n≤m sn≤m) sn≤sm→n≤m : ∀ {n m} → suc n ≤ suc m → n ≤ m sn≤sm→n≤m refl≤ = refl≤ sn≤sm→n≤m (step≤ sn≤m) = sn≤m→n≤m sn≤m n≰m→sn≰sm : ∀ {n m} → n ≰ m → suc n ≰ suc m n≰m→sn≰sm n≰m refl≤ = refl≤ ↯ n≰m n≰m→sn≰sm n≰m (step≤ sn≤m) = sn≤m→n≤m sn≤m ↯ n≰m sn≰sm→n≰m : ∀ {n m} → suc n ≰ suc m → n ≰ m sn≰sm→n≰m sn≰sm refl≤ = refl≤ ↯ sn≰sm sn≰sm→n≰m sn≰sm (step≤ n≤m) = sn≰sm→n≰m (sn≰sm ∘ step≤) n≤m sn≰n : ∀ {n} → suc n ≰ n sn≰n {zero} = λ () sn≰n {suc n} = n≰m→sn≰sm sn≰n n≤m⊔n : (n m : ℕ) → n ≤ m ⊔ n n≤m⊔n zero zero = refl≤ n≤m⊔n zero (suc m) = z≤n n≤m⊔n (suc n) zero = refl≤ n≤m⊔n (suc n) (suc m) = n≤m→sn≤sm (n≤m⊔n n m) -- Properties of _<_. _≮_ : ℕ → ℕ → Set n ≮ m = ¬ (n < m) z<sn : ∀ {n} → zero < suc n z<sn = n≤m→sn≤sm z≤n n<m→sn<sm : ∀ {n m} → n < m → suc n < suc m n<m→sn<sm = n≤m→sn≤sm sn<m→n<m : ∀ {n m} → suc n < m → n < m sn<m→n<m = sn≤m→n≤m sn<sm→n<m : ∀ {n m} → suc n < suc m → n < m sn<sm→n<m = sn≤sm→n≤m n≮m→sn≮sm : ∀ {n m} → n ≮ m → suc n ≮ suc m n≮m→sn≮sm = n≰m→sn≰sm sn≮sm→n≮m : ∀ {n m} → suc n ≮ suc m → n ≮ m sn≮sm→n≮m = sn≰sm→n≰m n<s[n⊔m] : (n m : ℕ) → n < suc (n ⊔ m) n<s[n⊔m] zero zero = refl≤ n<s[n⊔m] zero (suc m) = n≤m→sn≤sm z≤n n<s[n⊔m] (suc n) zero = refl≤ n<s[n⊔m] (suc n) (suc m) = n≤m→sn≤sm (n<s[n⊔m] n m) -- Conversion between _⊑_, ⊏, _≤_, _<_, and _≡_. ≰→⋢ : ∀ {n m} → n ≰ m → n ⋢ m ≰→⋢ {zero} {zero} n≰m = refl≤ ↯ n≰m ≰→⋢ {suc n} {zero} n≰m = λ () ≰→⋢ {n} {suc m} n≰m = λ n⊑m → ⊑→≤ n⊑m ↯ n≰m ⋢→≰ : ∀ {n m} → n ⋢ m → n ≰ m ⋢→≰ {zero} {m} n⋢m = z⊑n ↯ n⋢m ⋢→≰ {suc n} {zero} n⋢m = λ () ⋢→≰ {suc n} {suc m} n⋢m = λ n≤m → ≤→⊑ n≤m ↯ n⋢m ≤×≢→< : ∀ {n m} → n ≤ m → n ≢ m → n < m ≤×≢→< refl≤ n≢m = refl ↯ n≢m ≤×≢→< (step≤ n≤m) n≢m = n≤m→sn≤sm n≤m ≤→<⊎≡ : ∀ {n m} → n ≤ m → n < m ⊎ n ≡ m ≤→<⊎≡ refl≤ = ι₂ refl ≤→<⊎≡ (step≤ n≤m) with ≤→<⊎≡ n≤m ≤→<⊎≡ (step≤ n≤m) | ι₁ sn≤m = ι₁ (step≤ sn≤m) ≤→<⊎≡ (step≤ n≤m) | ι₂ refl = ι₁ refl≤ <→≤ : ∀ {n m} → n < m → n ≤ m <→≤ n<m = sn≤m→n≤m n<m ≡→≤ : ∀ {n m} → n ≡ m → n ≤ m ≡→≤ refl = refl≤ -- _≤_ is a decidable non-strict total order on naturals. antisym≤ : Antisymmetric _≡_ _≤_ antisym≤ n≤m m≤n = antisym⊑ (≤→⊑ n≤m) (≤→⊑ m≤n) total≤ : Total _≤_ total≤ n m with total⊑ n m total≤ n m | ι₁ n⊑m = ι₁ (⊑→≤ n⊑m) total≤ n m | ι₂ m⊑n = ι₂ (⊑→≤ m⊑n) trans≤ : Transitive _≤_ trans≤ n≤m m≤z = ⊑→≤ (trans⊑ (≤→⊑ n≤m) (≤→⊑ m≤z)) _≤?_ : Decidable _≤_ n ≤? m with n ⊑? m n ≤? m | yes n⊑m = yes (⊑→≤ n⊑m) n ≤? m | no n⋢m = no (⋢→≰ n⋢m) -- _<_ is a decidable strict total order on naturals. trans< : Transitive _<_ trans< n<m m<l = trans≤ (step≤ n<m) m<l tri< : Trichotomous _≡_ _<_ tri< zero zero = τ₌ (λ ()) refl (λ ()) tri< zero (suc m) = τ₍ z<sn (λ ()) (λ ()) tri< (suc n) zero = τ₎ (λ ()) (λ ()) z<sn tri< (suc n) (suc m) with tri< n m tri< (suc n) (suc m) | τ₍ n<m n≢m m≮n = τ₍ (n<m→sn<sm n<m) (n≢m→sn≢sm n≢m) (n≮m→sn≮sm m≮n) tri< (suc n) (suc m) | τ₌ n≮m n≡m m≮n = τ₌ (n≮m→sn≮sm n≮m) (n≡m→sn≡sm n≡m) (n≮m→sn≮sm m≮n) tri< (suc n) (suc m) | τ₎ n≮m n≢m m<n = τ₎ (n≮m→sn≮sm n≮m) (n≢m→sn≢sm n≢m) (n<m→sn<sm m<n) irrefl< : Irreflexive _<_ irrefl< = sn≰n _<?_ : Decidable _<_ n <? m = suc n ≤? m
Encryption/cryptl30/crypt/c-win32.asm
dendisuhubdy/grokmachine
46
88858
<reponame>dendisuhubdy/grokmachine<gh_stars>10-100 ; Don't even think of reading this code ; It was automatically generated by cast-586.pl ; Which is a perl program used to generate the x86 assember for ; any of elf, a.out, BSDI,Win32, or Solaris ; eric <<EMAIL>> ; TITLE cast-586.asm .486 .model FLAT _TEXT SEGMENT PUBLIC _CAST_encrypt EXTERN _CAST_S_table0:DWORD EXTERN _CAST_S_table1:DWORD EXTERN _CAST_S_table2:DWORD EXTERN _CAST_S_table3:DWORD _CAST_encrypt PROC NEAR ; push ebp push ebx mov ebx, DWORD PTR 12[esp] mov ebp, DWORD PTR 16[esp] push esi push edi ; Load the 2 words mov edi, DWORD PTR [ebx] mov esi, DWORD PTR 4[ebx] xor eax, eax ; round 0 mov edx, DWORD PTR [ebp] mov ecx, DWORD PTR 4[ebp] add edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor edi, ecx ; round 1 mov edx, DWORD PTR 8[ebp] mov ecx, DWORD PTR 12[ebp] xor edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor esi, ecx ; round 2 mov edx, DWORD PTR 16[ebp] mov ecx, DWORD PTR 20[ebp] sub edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor edi, ecx ; round 3 mov edx, DWORD PTR 24[ebp] mov ecx, DWORD PTR 28[ebp] add edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor esi, ecx ; round 4 mov edx, DWORD PTR 32[ebp] mov ecx, DWORD PTR 36[ebp] xor edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor edi, ecx ; round 5 mov edx, DWORD PTR 40[ebp] mov ecx, DWORD PTR 44[ebp] sub edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor esi, ecx ; round 6 mov edx, DWORD PTR 48[ebp] mov ecx, DWORD PTR 52[ebp] add edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor edi, ecx ; round 7 mov edx, DWORD PTR 56[ebp] mov ecx, DWORD PTR 60[ebp] xor edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor esi, ecx ; round 8 mov edx, DWORD PTR 64[ebp] mov ecx, DWORD PTR 68[ebp] sub edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor edi, ecx ; round 9 mov edx, DWORD PTR 72[ebp] mov ecx, DWORD PTR 76[ebp] add edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor esi, ecx ; round 10 mov edx, DWORD PTR 80[ebp] mov ecx, DWORD PTR 84[ebp] xor edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor edi, ecx ; round 11 mov edx, DWORD PTR 88[ebp] mov ecx, DWORD PTR 92[ebp] sub edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor esi, ecx ; round 12 mov edx, DWORD PTR 96[ebp] mov ecx, DWORD PTR 100[ebp] add edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor edi, ecx ; round 13 mov edx, DWORD PTR 104[ebp] mov ecx, DWORD PTR 108[ebp] xor edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor esi, ecx ; round 14 mov edx, DWORD PTR 112[ebp] mov ecx, DWORD PTR 116[ebp] sub edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor edi, ecx ; round 15 mov edx, DWORD PTR 120[ebp] mov ecx, DWORD PTR 124[ebp] add edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx mov eax, DWORD PTR 20[esp] xor esi, ecx nop mov DWORD PTR 4[eax],edi mov DWORD PTR [eax],esi pop edi pop esi pop ebx pop ebp ret _CAST_encrypt ENDP _TEXT ENDS _TEXT SEGMENT PUBLIC _CAST_decrypt EXTERN _CAST_S_table0:DWORD EXTERN _CAST_S_table1:DWORD EXTERN _CAST_S_table2:DWORD EXTERN _CAST_S_table3:DWORD _CAST_decrypt PROC NEAR ; push ebp push ebx mov ebx, DWORD PTR 12[esp] mov ebp, DWORD PTR 16[esp] push esi push edi ; Load the 2 words mov edi, DWORD PTR [ebx] mov esi, DWORD PTR 4[ebx] xor eax, eax ; round 15 mov edx, DWORD PTR 120[ebp] mov ecx, DWORD PTR 124[ebp] add edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor edi, ecx ; round 14 mov edx, DWORD PTR 112[ebp] mov ecx, DWORD PTR 116[ebp] sub edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor esi, ecx ; round 13 mov edx, DWORD PTR 104[ebp] mov ecx, DWORD PTR 108[ebp] xor edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor edi, ecx ; round 12 mov edx, DWORD PTR 96[ebp] mov ecx, DWORD PTR 100[ebp] add edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor esi, ecx ; round 11 mov edx, DWORD PTR 88[ebp] mov ecx, DWORD PTR 92[ebp] sub edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor edi, ecx ; round 10 mov edx, DWORD PTR 80[ebp] mov ecx, DWORD PTR 84[ebp] xor edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor esi, ecx ; round 9 mov edx, DWORD PTR 72[ebp] mov ecx, DWORD PTR 76[ebp] add edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor edi, ecx ; round 8 mov edx, DWORD PTR 64[ebp] mov ecx, DWORD PTR 68[ebp] sub edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor esi, ecx ; round 7 mov edx, DWORD PTR 56[ebp] mov ecx, DWORD PTR 60[ebp] xor edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor edi, ecx ; round 6 mov edx, DWORD PTR 48[ebp] mov ecx, DWORD PTR 52[ebp] add edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor esi, ecx ; round 5 mov edx, DWORD PTR 40[ebp] mov ecx, DWORD PTR 44[ebp] sub edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor edi, ecx ; round 4 mov edx, DWORD PTR 32[ebp] mov ecx, DWORD PTR 36[ebp] xor edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor esi, ecx ; round 3 mov edx, DWORD PTR 24[ebp] mov ecx, DWORD PTR 28[ebp] add edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx xor edi, ecx ; round 2 mov edx, DWORD PTR 16[ebp] mov ecx, DWORD PTR 20[ebp] sub edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] sub ecx, ebx xor esi, ecx ; round 1 mov edx, DWORD PTR 8[ebp] mov ecx, DWORD PTR 12[ebp] xor edx, esi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] add ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] xor ecx, ebx xor edi, ecx ; round 0 mov edx, DWORD PTR [ebp] mov ecx, DWORD PTR 4[ebp] add edx, edi rol edx, cl mov ebx, edx xor ecx, ecx mov cl, dh and ebx, 255 shr edx, 16 xor eax, eax mov al, dh and edx, 255 mov ecx, DWORD PTR _CAST_S_table0[ecx*4] mov ebx, DWORD PTR _CAST_S_table1[ebx*4] xor ecx, ebx mov ebx, DWORD PTR _CAST_S_table2[eax*4] sub ecx, ebx mov ebx, DWORD PTR _CAST_S_table3[edx*4] add ecx, ebx mov eax, DWORD PTR 20[esp] xor esi, ecx nop mov DWORD PTR 4[eax],edi mov DWORD PTR [eax],esi pop edi pop esi pop ebx pop ebp ret _CAST_decrypt ENDP _TEXT ENDS _TEXT SEGMENT PUBLIC _CAST_cbc_encrypt _CAST_cbc_encrypt PROC NEAR ; push ebp push ebx push esi push edi mov ebp, DWORD PTR 28[esp] ; getting iv ptr from parameter 4 mov ebx, DWORD PTR 36[esp] mov esi, DWORD PTR [ebx] mov edi, DWORD PTR 4[ebx] push edi push esi push edi push esi mov ebx, esp mov esi, DWORD PTR 36[esp] mov edi, DWORD PTR 40[esp] ; getting encrypt flag from parameter 5 mov ecx, DWORD PTR 56[esp] ; get and push parameter 3 mov eax, DWORD PTR 48[esp] push eax push ebx cmp ecx, 0 jz $L000decrypt and ebp, 4294967288 mov eax, DWORD PTR 8[esp] mov ebx, DWORD PTR 12[esp] jz $L001encrypt_finish L002encrypt_loop: mov ecx, DWORD PTR [esi] mov edx, DWORD PTR 4[esi] xor eax, ecx xor ebx, edx bswap eax bswap ebx mov DWORD PTR 8[esp],eax mov DWORD PTR 12[esp],ebx call _CAST_encrypt mov eax, DWORD PTR 8[esp] mov ebx, DWORD PTR 12[esp] bswap eax bswap ebx mov DWORD PTR [edi],eax mov DWORD PTR 4[edi],ebx add esi, 8 add edi, 8 sub ebp, 8 jnz L002encrypt_loop $L001encrypt_finish: mov ebp, DWORD PTR 52[esp] and ebp, 7 jz $L003finish xor ecx, ecx xor edx, edx mov ebp, DWORD PTR $L004cbc_enc_jmp_table[ebp*4] jmp ebp L005ej7: xor edx, edx mov dh, BYTE PTR 6[esi] shl edx, 8 L006ej6: mov dh, BYTE PTR 5[esi] L007ej5: mov dl, BYTE PTR 4[esi] L008ej4: mov ecx, DWORD PTR [esi] jmp $L009ejend L010ej3: mov ch, BYTE PTR 2[esi] xor ecx, ecx shl ecx, 8 L011ej2: mov ch, BYTE PTR 1[esi] L012ej1: mov cl, BYTE PTR [esi] $L009ejend: xor eax, ecx xor ebx, edx bswap eax bswap ebx mov DWORD PTR 8[esp],eax mov DWORD PTR 12[esp],ebx call _CAST_encrypt mov eax, DWORD PTR 8[esp] mov ebx, DWORD PTR 12[esp] bswap eax bswap ebx mov DWORD PTR [edi],eax mov DWORD PTR 4[edi],ebx jmp $L003finish $L000decrypt: and ebp, 4294967288 mov eax, DWORD PTR 16[esp] mov ebx, DWORD PTR 20[esp] jz $L013decrypt_finish L014decrypt_loop: mov eax, DWORD PTR [esi] mov ebx, DWORD PTR 4[esi] bswap eax bswap ebx mov DWORD PTR 8[esp],eax mov DWORD PTR 12[esp],ebx call _CAST_decrypt mov eax, DWORD PTR 8[esp] mov ebx, DWORD PTR 12[esp] bswap eax bswap ebx mov ecx, DWORD PTR 16[esp] mov edx, DWORD PTR 20[esp] xor ecx, eax xor edx, ebx mov eax, DWORD PTR [esi] mov ebx, DWORD PTR 4[esi] mov DWORD PTR [edi],ecx mov DWORD PTR 4[edi],edx mov DWORD PTR 16[esp],eax mov DWORD PTR 20[esp],ebx add esi, 8 add edi, 8 sub ebp, 8 jnz L014decrypt_loop $L013decrypt_finish: mov ebp, DWORD PTR 52[esp] and ebp, 7 jz $L003finish mov eax, DWORD PTR [esi] mov ebx, DWORD PTR 4[esi] bswap eax bswap ebx mov DWORD PTR 8[esp],eax mov DWORD PTR 12[esp],ebx call _CAST_decrypt mov eax, DWORD PTR 8[esp] mov ebx, DWORD PTR 12[esp] bswap eax bswap ebx mov ecx, DWORD PTR 16[esp] mov edx, DWORD PTR 20[esp] xor ecx, eax xor edx, ebx mov eax, DWORD PTR [esi] mov ebx, DWORD PTR 4[esi] L015dj7: ror edx, 16 mov BYTE PTR 6[edi],dl shr edx, 16 L016dj6: mov BYTE PTR 5[edi],dh L017dj5: mov BYTE PTR 4[edi],dl L018dj4: mov DWORD PTR [edi],ecx jmp $L019djend L020dj3: ror ecx, 16 mov BYTE PTR 2[edi],cl shl ecx, 16 L021dj2: mov BYTE PTR 1[esi],ch L022dj1: mov BYTE PTR [esi], cl $L019djend: jmp $L003finish $L003finish: mov ecx, DWORD PTR 60[esp] add esp, 24 mov DWORD PTR [ecx],eax mov DWORD PTR 4[ecx],ebx pop edi pop esi pop ebx pop ebp ret $L004cbc_enc_jmp_table: DD 0 DD L012ej1 DD L011ej2 DD L010ej3 DD L008ej4 DD L007ej5 DD L006ej6 DD L005ej7 L023cbc_dec_jmp_table: DD 0 DD L022dj1 DD L021dj2 DD L020dj3 DD L018dj4 DD L017dj5 DD L016dj6 DD L015dj7 _CAST_cbc_encrypt ENDP _TEXT ENDS END
vendor/stdlib/src/Algebra/Structures.agda
isabella232/Lemmachine
56
1643
<reponame>isabella232/Lemmachine ------------------------------------------------------------------------ -- Some algebraic structures (not packed up with sets, operations, -- etc.) ------------------------------------------------------------------------ open import Relation.Binary module Algebra.Structures where import Algebra.FunctionProperties as FunctionProperties open FunctionProperties using (Op₁; Op₂) import Relation.Binary.EqReasoning as EqR open import Data.Function open import Data.Product ------------------------------------------------------------------------ -- One binary operation record IsSemigroup {A} (≈ : Rel A) (∙ : Op₂ A) : Set where open FunctionProperties ≈ field isEquivalence : IsEquivalence ≈ assoc : Associative ∙ ∙-pres-≈ : ∙ Preserves₂ ≈ ⟶ ≈ ⟶ ≈ open IsEquivalence isEquivalence public record IsMonoid {A} (≈ : Rel A) (∙ : Op₂ A) (ε : A) : Set where open FunctionProperties ≈ field isSemigroup : IsSemigroup ≈ ∙ identity : Identity ε ∙ open IsSemigroup isSemigroup public record IsCommutativeMonoid {A} (≈ : Rel A) (∙ : Op₂ A) (ε : A) : Set where open FunctionProperties ≈ field isMonoid : IsMonoid ≈ ∙ ε comm : Commutative ∙ open IsMonoid isMonoid public record IsGroup {A} (≈ : Rel A) (_∙_ : Op₂ A) (ε : A) (_⁻¹ : Op₁ A) : Set where open FunctionProperties ≈ infixl 7 _-_ field isMonoid : IsMonoid ≈ _∙_ ε inverse : Inverse ε _⁻¹ _∙_ ⁻¹-pres-≈ : _⁻¹ Preserves ≈ ⟶ ≈ open IsMonoid isMonoid public _-_ : Op₂ A x - y = x ∙ (y ⁻¹) record IsAbelianGroup {A} (≈ : Rel A) (∙ : Op₂ A) (ε : A) (⁻¹ : Op₁ A) : Set where open FunctionProperties ≈ field isGroup : IsGroup ≈ ∙ ε ⁻¹ comm : Commutative ∙ open IsGroup isGroup public isCommutativeMonoid : IsCommutativeMonoid ≈ ∙ ε isCommutativeMonoid = record { isMonoid = isMonoid ; comm = comm } ------------------------------------------------------------------------ -- Two binary operations record IsNearSemiring {A} (≈ : Rel A) (+ * : Op₂ A) (0# : A) : Set where open FunctionProperties ≈ field +-isMonoid : IsMonoid ≈ + 0# *-isSemigroup : IsSemigroup ≈ * distribʳ : * DistributesOverʳ + zeroˡ : LeftZero 0# * open IsMonoid +-isMonoid public renaming ( assoc to +-assoc ; ∙-pres-≈ to +-pres-≈ ; isSemigroup to +-isSemigroup ; identity to +-identity ) open IsSemigroup *-isSemigroup public using () renaming ( assoc to *-assoc ; ∙-pres-≈ to *-pres-≈ ) record IsSemiringWithoutOne {A} (≈ : Rel A) (+ * : Op₂ A) (0# : A) : Set where open FunctionProperties ≈ field +-isCommutativeMonoid : IsCommutativeMonoid ≈ + 0# *-isSemigroup : IsSemigroup ≈ * distrib : * DistributesOver + zero : Zero 0# * open IsCommutativeMonoid +-isCommutativeMonoid public renaming ( assoc to +-assoc ; ∙-pres-≈ to +-pres-≈ ; isSemigroup to +-isSemigroup ; identity to +-identity ; isMonoid to +-isMonoid ; comm to +-comm ) open IsSemigroup *-isSemigroup public using () renaming ( assoc to *-assoc ; ∙-pres-≈ to *-pres-≈ ) isNearSemiring : IsNearSemiring ≈ + * 0# isNearSemiring = record { +-isMonoid = +-isMonoid ; *-isSemigroup = *-isSemigroup ; distribʳ = proj₂ distrib ; zeroˡ = proj₁ zero } record IsSemiringWithoutAnnihilatingZero {A} (≈ : Rel A) (+ * : Op₂ A) (0# 1# : A) : Set where open FunctionProperties ≈ field -- Note that these structures do have an additive unit, but this -- unit does not necessarily annihilate multiplication. +-isCommutativeMonoid : IsCommutativeMonoid ≈ + 0# *-isMonoid : IsMonoid ≈ * 1# distrib : * DistributesOver + open IsCommutativeMonoid +-isCommutativeMonoid public renaming ( assoc to +-assoc ; ∙-pres-≈ to +-pres-≈ ; isSemigroup to +-isSemigroup ; identity to +-identity ; isMonoid to +-isMonoid ; comm to +-comm ) open IsMonoid *-isMonoid public using () renaming ( assoc to *-assoc ; ∙-pres-≈ to *-pres-≈ ; isSemigroup to *-isSemigroup ; identity to *-identity ) record IsSemiring {A} (≈ : Rel A) (+ * : Op₂ A) (0# 1# : A) : Set where open FunctionProperties ≈ field isSemiringWithoutAnnihilatingZero : IsSemiringWithoutAnnihilatingZero ≈ + * 0# 1# zero : Zero 0# * open IsSemiringWithoutAnnihilatingZero isSemiringWithoutAnnihilatingZero public isSemiringWithoutOne : IsSemiringWithoutOne ≈ + * 0# isSemiringWithoutOne = record { +-isCommutativeMonoid = +-isCommutativeMonoid ; *-isSemigroup = *-isSemigroup ; distrib = distrib ; zero = zero } open IsSemiringWithoutOne isSemiringWithoutOne public using (isNearSemiring) record IsCommutativeSemiringWithoutOne {A} (≈ : Rel A) (+ * : Op₂ A) (0# : A) : Set where open FunctionProperties ≈ field isSemiringWithoutOne : IsSemiringWithoutOne ≈ + * 0# *-comm : Commutative * open IsSemiringWithoutOne isSemiringWithoutOne public record IsCommutativeSemiring {A} (≈ : Rel A) (+ * : Op₂ A) (0# 1# : A) : Set where open FunctionProperties ≈ field isSemiring : IsSemiring ≈ + * 0# 1# *-comm : Commutative * open IsSemiring isSemiring public *-isCommutativeMonoid : IsCommutativeMonoid ≈ * 1# *-isCommutativeMonoid = record { isMonoid = *-isMonoid ; comm = *-comm } isCommutativeSemiringWithoutOne : IsCommutativeSemiringWithoutOne ≈ + * 0# isCommutativeSemiringWithoutOne = record { isSemiringWithoutOne = isSemiringWithoutOne ; *-comm = *-comm } record IsRing {A} (≈ : Rel A) (_+_ _*_ : Op₂ A) (-_ : Op₁ A) (0# 1# : A) : Set where open FunctionProperties ≈ field +-isAbelianGroup : IsAbelianGroup ≈ _+_ 0# -_ *-isMonoid : IsMonoid ≈ _*_ 1# distrib : _*_ DistributesOver _+_ open IsAbelianGroup +-isAbelianGroup public renaming ( assoc to +-assoc ; ∙-pres-≈ to +-pres-≈ ; isSemigroup to +-isSemigroup ; identity to +-identity ; isMonoid to +-isMonoid ; inverse to -‿inverse ; ⁻¹-pres-≈ to -‿pres-≈ ; isGroup to +-isGroup ; comm to +-comm ; isCommutativeMonoid to +-isCommutativeMonoid ) open IsMonoid *-isMonoid public using () renaming ( assoc to *-assoc ; ∙-pres-≈ to *-pres-≈ ; isSemigroup to *-isSemigroup ; identity to *-identity ) zero : Zero 0# _*_ zero = (zeroˡ , zeroʳ) where open EqR (record { isEquivalence = isEquivalence }) zeroˡ : LeftZero 0# _*_ zeroˡ x = begin 0# * x ≈⟨ sym $ proj₂ +-identity _ ⟩ (0# * x) + 0# ≈⟨ refl ⟨ +-pres-≈ ⟩ sym (proj₂ -‿inverse _) ⟩ (0# * x) + ((0# * x) + - (0# * x)) ≈⟨ sym $ +-assoc _ _ _ ⟩ ((0# * x) + (0# * x)) + - (0# * x) ≈⟨ sym (proj₂ distrib _ _ _) ⟨ +-pres-≈ ⟩ refl ⟩ ((0# + 0#) * x) + - (0# * x) ≈⟨ (proj₂ +-identity _ ⟨ *-pres-≈ ⟩ refl) ⟨ +-pres-≈ ⟩ refl ⟩ (0# * x) + - (0# * x) ≈⟨ proj₂ -‿inverse _ ⟩ 0# ∎ zeroʳ : RightZero 0# _*_ zeroʳ x = begin x * 0# ≈⟨ sym $ proj₂ +-identity _ ⟩ (x * 0#) + 0# ≈⟨ refl ⟨ +-pres-≈ ⟩ sym (proj₂ -‿inverse _) ⟩ (x * 0#) + ((x * 0#) + - (x * 0#)) ≈⟨ sym $ +-assoc _ _ _ ⟩ ((x * 0#) + (x * 0#)) + - (x * 0#) ≈⟨ sym (proj₁ distrib _ _ _) ⟨ +-pres-≈ ⟩ refl ⟩ (x * (0# + 0#)) + - (x * 0#) ≈⟨ (refl ⟨ *-pres-≈ ⟩ proj₂ +-identity _) ⟨ +-pres-≈ ⟩ refl ⟩ (x * 0#) + - (x * 0#) ≈⟨ proj₂ -‿inverse _ ⟩ 0# ∎ isSemiringWithoutAnnihilatingZero : IsSemiringWithoutAnnihilatingZero ≈ _+_ _*_ 0# 1# isSemiringWithoutAnnihilatingZero = record { +-isCommutativeMonoid = +-isCommutativeMonoid ; *-isMonoid = *-isMonoid ; distrib = distrib } isSemiring : IsSemiring ≈ _+_ _*_ 0# 1# isSemiring = record { isSemiringWithoutAnnihilatingZero = isSemiringWithoutAnnihilatingZero ; zero = zero } open IsSemiring isSemiring public using (isNearSemiring; isSemiringWithoutOne) record IsCommutativeRing {A} (≈ : Rel A) (+ * : Op₂ A) (- : Op₁ A) (0# 1# : A) : Set where open FunctionProperties ≈ field isRing : IsRing ≈ + * - 0# 1# *-comm : Commutative * open IsRing isRing public isCommutativeSemiring : IsCommutativeSemiring ≈ + * 0# 1# isCommutativeSemiring = record { isSemiring = isSemiring ; *-comm = *-comm } open IsCommutativeSemiring isCommutativeSemiring public using (isCommutativeSemiringWithoutOne) record IsLattice {A} (≈ : Rel A) (∨ ∧ : Op₂ A) : Set where open FunctionProperties ≈ field isEquivalence : IsEquivalence ≈ ∨-comm : Commutative ∨ ∨-assoc : Associative ∨ ∨-pres-≈ : ∨ Preserves₂ ≈ ⟶ ≈ ⟶ ≈ ∧-comm : Commutative ∧ ∧-assoc : Associative ∧ ∧-pres-≈ : ∧ Preserves₂ ≈ ⟶ ≈ ⟶ ≈ absorptive : Absorptive ∨ ∧ open IsEquivalence isEquivalence public record IsDistributiveLattice {A} (≈ : Rel A) (∨ ∧ : Op₂ A) : Set where open FunctionProperties ≈ field isLattice : IsLattice ≈ ∨ ∧ ∨-∧-distribʳ : ∨ DistributesOverʳ ∧ open IsLattice isLattice public record IsBooleanAlgebra {A} (≈ : Rel A) (∨ ∧ : Op₂ A) (¬ : Op₁ A) (⊤ ⊥ : A) : Set where open FunctionProperties ≈ field isDistributiveLattice : IsDistributiveLattice ≈ ∨ ∧ ∨-complementʳ : RightInverse ⊤ ¬ ∨ ∧-complementʳ : RightInverse ⊥ ¬ ∧ ¬-pres-≈ : ¬ Preserves ≈ ⟶ ≈ open IsDistributiveLattice isDistributiveLattice public
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_248_1254.asm
ljhsiun2/medusa
9
1564
<filename>Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_248_1254.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x18dc0, %rbp nop nop nop nop cmp $30365, %r11 mov (%rbp), %r9w nop nop nop nop nop add %r10, %r10 lea addresses_normal_ht+0xfb10, %r8 nop nop nop nop nop and %rcx, %rcx mov (%r8), %r11d cmp %r10, %r10 lea addresses_WC_ht+0x2bd0, %rsi lea addresses_UC_ht+0x19410, %rdi clflush (%rdi) nop nop nop nop add $23717, %r8 mov $87, %rcx rep movsb nop nop nop nop nop and $28193, %r9 lea addresses_D_ht+0xf810, %r8 nop nop nop nop nop xor $55127, %rdi movups (%r8), %xmm1 vpextrq $0, %xmm1, %rsi nop nop nop and %r9, %r9 lea addresses_WT_ht+0x1bee0, %rsi lea addresses_WT_ht+0x14410, %rdi nop nop nop nop nop add $5637, %r8 mov $47, %rcx rep movsl nop nop nop nop xor %r9, %r9 lea addresses_normal_ht+0x3610, %rcx nop cmp $53274, %r9 vmovups (%rcx), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %r11 nop nop nop nop nop cmp %rdi, %rdi lea addresses_WC_ht+0x19200, %rdi nop nop nop xor %r11, %r11 movb (%rdi), %r10b nop nop nop nop dec %r9 lea addresses_A_ht+0x3c10, %rsi lea addresses_WT_ht+0x13180, %rdi nop sub %r9, %r9 mov $113, %rcx rep movsq nop nop nop and %r8, %r8 lea addresses_WT_ht+0x76ca, %rbp and $8946, %r9 movl $0x61626364, (%rbp) nop nop sub %rsi, %rsi lea addresses_WC_ht+0x1ba10, %r9 nop nop nop nop nop dec %rbp mov $0x6162636465666768, %r11 movq %r11, %xmm1 vmovups %ymm1, (%r9) nop nop nop xor $31772, %r11 lea addresses_A_ht+0xda58, %r10 nop nop nop nop nop cmp %rsi, %rsi vmovups (%r10), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %rcx nop nop nop nop cmp $61578, %rsi lea addresses_WC_ht+0x16610, %r9 cmp %r11, %r11 movb $0x61, (%r9) nop nop nop add %rbp, %rbp lea addresses_normal_ht+0x1eb90, %rsi lea addresses_UC_ht+0x181d0, %rdi nop nop nop nop dec %r9 mov $64, %rcx rep movsb nop dec %r9 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rbp push %rbx push %rdx // Store mov $0x6eb, %rbp nop nop nop nop nop xor $14183, %r8 movw $0x5152, (%rbp) nop nop nop nop nop cmp %r12, %r12 // Load lea addresses_PSE+0x1e810, %r8 nop nop nop nop and %rdx, %rdx movups (%r8), %xmm6 vpextrq $1, %xmm6, %rbp nop nop nop nop sub $26765, %r12 // Store mov $0x4f371000000082d, %r15 nop nop nop nop inc %rdx movl $0x51525354, (%r15) nop nop and $52087, %rdx // Faulty Load lea addresses_D+0xb410, %r8 nop nop nop nop nop dec %r11 movb (%r8), %dl lea oracles, %rbx and $0xff, %rdx shlq $12, %rdx mov (%rbx,%rdx,1), %rdx pop %rdx pop %rbx pop %rbp pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 1, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'36': 248} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
bb-runtimes/arm/sam/sam4s/svd/i-sam.ads
JCGobbi/Nucleo-STM32G474RE
0
19762
<filename>bb-runtimes/arm/sam/sam4s/svd/i-sam.ads -- -- Copyright (C) 2017, AdaCore -- -- This spec has been automatically generated from ATSAM4SD32C.svd pragma Ada_2012; pragma Style_Checks (Off); with System; -- Atmel ATSAM4SD32C device: Cortex-M4 Microcontroller with 2MB dual-bank -- Flash, 160KB SRAM, USB, 100 Pins (refer to -- http://www.atmel.com/devices/SAM4SD32C.aspx for more) package Interfaces.SAM is pragma Preelaborate; pragma No_Elaboration_Code_All; --------------- -- Base type -- --------------- type UInt32 is new Interfaces.Unsigned_32; type UInt16 is new Interfaces.Unsigned_16; type Byte is new Interfaces.Unsigned_8; type Bit is mod 2**1 with Size => 1; type UInt2 is mod 2**2 with Size => 2; type UInt3 is mod 2**3 with Size => 3; type UInt4 is mod 2**4 with Size => 4; type UInt5 is mod 2**5 with Size => 5; type UInt6 is mod 2**6 with Size => 6; type UInt7 is mod 2**7 with Size => 7; type UInt9 is mod 2**9 with Size => 9; type UInt10 is mod 2**10 with Size => 10; type UInt11 is mod 2**11 with Size => 11; type UInt12 is mod 2**12 with Size => 12; type UInt13 is mod 2**13 with Size => 13; type UInt14 is mod 2**14 with Size => 14; type UInt15 is mod 2**15 with Size => 15; type UInt17 is mod 2**17 with Size => 17; type UInt18 is mod 2**18 with Size => 18; type UInt19 is mod 2**19 with Size => 19; type UInt20 is mod 2**20 with Size => 20; type UInt21 is mod 2**21 with Size => 21; type UInt22 is mod 2**22 with Size => 22; type UInt23 is mod 2**23 with Size => 23; type UInt24 is mod 2**24 with Size => 24; type UInt25 is mod 2**25 with Size => 25; type UInt26 is mod 2**26 with Size => 26; type UInt27 is mod 2**27 with Size => 27; type UInt28 is mod 2**28 with Size => 28; type UInt29 is mod 2**29 with Size => 29; type UInt30 is mod 2**30 with Size => 30; type UInt31 is mod 2**31 with Size => 31; -------------------- -- Base addresses -- -------------------- HSMCI_Base : constant System.Address := System'To_Address (16#40000000#); SSC_Base : constant System.Address := System'To_Address (16#40004000#); SPI_Base : constant System.Address := System'To_Address (16#40008000#); TC0_Base : constant System.Address := System'To_Address (16#40010000#); TC1_Base : constant System.Address := System'To_Address (16#40014000#); TWI0_Base : constant System.Address := System'To_Address (16#40018000#); TWI1_Base : constant System.Address := System'To_Address (16#4001C000#); PWM_Base : constant System.Address := System'To_Address (16#40020000#); USART0_Base : constant System.Address := System'To_Address (16#40024000#); USART1_Base : constant System.Address := System'To_Address (16#40028000#); UDP_Base : constant System.Address := System'To_Address (16#40034000#); ADC_Base : constant System.Address := System'To_Address (16#40038000#); DACC_Base : constant System.Address := System'To_Address (16#4003C000#); ACC_Base : constant System.Address := System'To_Address (16#40040000#); CRCCU_Base : constant System.Address := System'To_Address (16#40044000#); CMCC_Base : constant System.Address := System'To_Address (16#4007C000#); SMC_Base : constant System.Address := System'To_Address (16#400E0000#); MATRIX_Base : constant System.Address := System'To_Address (16#400E0200#); PMC_Base : constant System.Address := System'To_Address (16#400E0400#); UART0_Base : constant System.Address := System'To_Address (16#400E0600#); CHIPID_Base : constant System.Address := System'To_Address (16#400E0740#); UART1_Base : constant System.Address := System'To_Address (16#400E0800#); EFC0_Base : constant System.Address := System'To_Address (16#400E0A00#); EFC1_Base : constant System.Address := System'To_Address (16#400E0C00#); PIOA_Base : constant System.Address := System'To_Address (16#400E0E00#); PIOB_Base : constant System.Address := System'To_Address (16#400E1000#); PIOC_Base : constant System.Address := System'To_Address (16#400E1200#); RSTC_Base : constant System.Address := System'To_Address (16#400E1400#); SUPC_Base : constant System.Address := System'To_Address (16#400E1410#); RTT_Base : constant System.Address := System'To_Address (16#400E1430#); WDT_Base : constant System.Address := System'To_Address (16#400E1450#); RTC_Base : constant System.Address := System'To_Address (16#400E1460#); GPBR_Base : constant System.Address := System'To_Address (16#400E1490#); end Interfaces.SAM;
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_53_17.asm
ljhsiun2/medusa
9
1608
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r9 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0xabec, %rsi lea addresses_WT_ht+0x105ac, %rdi xor %r11, %r11 mov $118, %rcx rep movsb nop sub $36031, %r9 lea addresses_UC_ht+0x14ac, %rsi xor %r13, %r13 mov (%rsi), %r11 nop nop nop cmp $59719, %r13 lea addresses_UC_ht+0xa72c, %rdi nop nop nop and $27696, %rdx movw $0x6162, (%rdi) nop nop nop add $19034, %rcx lea addresses_A_ht+0xdc68, %r13 dec %rdx mov $0x6162636465666768, %rsi movq %rsi, %xmm6 vmovups %ymm6, (%r13) nop nop nop nop inc %rdx lea addresses_UC_ht+0x90ac, %rsi lea addresses_WC_ht+0xfe6c, %rdi clflush (%rsi) nop nop nop nop and $45615, %rax mov $48, %rcx rep movsq nop sub $58818, %r13 lea addresses_D_ht+0xe6c, %r11 nop and $56769, %r13 movb (%r11), %cl nop sub %r9, %r9 lea addresses_normal_ht+0xeaec, %rsi lea addresses_D_ht+0xc262, %rdi nop nop nop nop nop and $30686, %r9 mov $104, %rcx rep movsb nop nop nop nop nop sub $4344, %rdi lea addresses_UC_ht+0xedac, %r13 nop nop nop nop nop add %rcx, %rcx mov $0x6162636465666768, %rdi movq %rdi, %xmm6 and $0xffffffffffffffc0, %r13 vmovntdq %ymm6, (%r13) nop nop nop sub %r11, %r11 lea addresses_normal_ht+0x88ac, %rcx cmp %rdx, %rdx mov (%rcx), %esi nop nop sub %r9, %r9 lea addresses_A_ht+0x1a438, %r13 nop nop sub $60081, %r11 movl $0x61626364, (%r13) nop nop nop sub $25336, %r11 lea addresses_A_ht+0x1cabc, %rsi lea addresses_A_ht+0x2827, %rdi clflush (%rsi) dec %rdx mov $28, %rcx rep movsl cmp %rcx, %rcx lea addresses_WC_ht+0x12b54, %r13 nop inc %r9 movb (%r13), %dl nop nop nop add %rdx, %rdx lea addresses_UC_ht+0x56ac, %rsi lea addresses_WC_ht+0x64ac, %rdi nop nop cmp $47276, %r13 mov $19, %rcx rep movsq nop nop nop nop nop xor %r9, %r9 lea addresses_D_ht+0xe08c, %rdx nop nop nop and $9272, %r11 and $0xffffffffffffffc0, %rdx movntdqa (%rdx), %xmm7 vpextrq $1, %xmm7, %r13 cmp $34114, %r11 lea addresses_UC_ht+0x11df8, %rdi nop nop nop nop and $42433, %rcx movb $0x61, (%rdi) nop nop sub %r9, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r8 push %r9 push %rax push %rcx // Load lea addresses_US+0x40cc, %rcx clflush (%rcx) sub $32007, %r8 mov (%rcx), %r9 nop nop nop nop xor $23011, %r8 // Store lea addresses_US+0x72ac, %rcx add $24590, %r12 movb $0x51, (%rcx) nop and %r9, %r9 // Store lea addresses_D+0x98b4, %rax cmp %r11, %r11 movb $0x51, (%rax) nop nop nop nop nop sub $19332, %r12 // Store lea addresses_WT+0x72e4, %rax nop inc %r14 mov $0x5152535455565758, %r8 movq %r8, (%rax) add %rax, %rax // Faulty Load lea addresses_A+0x158ac, %r14 nop nop nop nop nop xor %r9, %r9 vmovups (%r14), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rcx lea oracles, %r12 and $0xff, %rcx shlq $12, %rcx mov (%r12,%rcx,1), %rcx pop %rcx pop %rax pop %r9 pop %r8 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'00': 53} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
3-mid/opengl/source/platform/osmesa/opengl-display.adb
charlie5/lace
20
11090
<filename>3-mid/opengl/source/platform/osmesa/opengl-display.adb with interfaces.C.Strings; package body openGL.Display is function Default return Item is Self : Display.item; begin return Self; end Default; function screen_Id (Self : in Item) return interfaces.c.int is begin return Self.screen_Id; end screen_Id; end openGL.Display;
8085_programming/8085 Programs/test3.asm
SayanGhoshBDA/code-backup
16
177283
.ORG 0000H MVI A,00FFH STA 9000H HLT
Rings/Ideals/Prime/Definition.agda
Smaug123/agdaproofs
4
1985
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Rings.Definition open import Rings.Ideals.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.Ideals.Prime.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} {R : Ring S _+_ _*_} {c : _} {pred : A → Set c} (i : Ideal R pred) where record PrimeIdeal : Set (a ⊔ c) where field isPrime : {a b : A} → pred (a * b) → ((pred a) → False) → pred b notContained : A notContainedIsNotContained : (pred notContained) → False
AntlrCSharp/Speak.g4
gabriele-tomassetti/getting-started-with-antlr-in-csharp
3
5995
<filename>AntlrCSharp/Speak.g4 grammar Speak; /* * Parser Rules */ chat : line line EOF ; line : name SAYS opinion NEWLINE; name : WORD ; opinion : TEXT ; /* * Lexer Rules */ fragment A : ('A'|'a') ; fragment S : ('S'|'s') ; fragment Y : ('Y'|'y') ; fragment LOWERCASE : [a-z] ; fragment UPPERCASE : [A-Z] ; SAYS : S A Y S ; WORD : (LOWERCASE | UPPERCASE)+ ; TEXT : '"' .*? '"' ; WHITESPACE : (' '|'\t')+ -> skip ; NEWLINE : ('\r'? '\n' | '\r')+ ;
implem/src/jsonAntlr.g4
blemoine/parser-prez
0
5576
<filename>implem/src/jsonAntlr.g4 grammar jsonAntlr; languages: openAndCloseTag (openAndCloseTag)* ; openAndCloseTag: openingTag text closingTag ; openingTag: OPENING_TAG ; closingTag: CLOSING_TAG ; text: TEXT ; OPENING_TAG: '[' [a-zA-Z] [a-zA-Z] ']' ; CLOSING_TAG: '[/' [a-zA-Z] [a-zA-Z] ']' ; TEXT: CHAR+ ; fragment CHAR: ~'[' ; WHITESPACE : [ \t\n\r]+ -> skip ;
core_modules/applescripts/get_selected_text.scpt
aleksanderson/Popword
0
2224
<filename>core_modules/applescripts/get_selected_text.scpt tell application "System Events" delay 0.8 keystroke "c" using command down delay 0.2 end tell set theText to the clipboard
programs/oeis/062/A062989.asm
karttu/loda
1
92723
<filename>programs/oeis/062/A062989.asm ; A062989: a(n) = C(n+6, 6) - n - 1. ; 0,5,25,80,205,456,917,1708,2994,4995,7997,12364,18551,27118,38745,54248,74596,100929,134577,177080,230209,295988,376717,474996,593750,736255,906165,1107540,1344875,1623130,1947761,2324752,2760648,3262589,3838345,4496352,5245749,6096416,7059013,8145020,9366778,10737531,12271469,13983772,15890655,18009414,20358473,22957432,25827116,28989625,32468385,36288200,40475305,45057420,50063805,55525316,61474462,67945463,74974309,82598820,90858707,99795634,109453281,119877408,131115920,143218933,156238841,170230384,185250717,201359480,218618869,237093708,256851522,277962611,300500125,324540140,350161735,377447070,406481465,437353480,470154996,504981297,541931153,581106904,622614545,666563812,713068269,762245396,814216678,869107695,927048213,988172276,1052618299,1120529162,1192052305,1267339824,1346548568,1429840237,1517381481,1609344000,1705904645,1807245520,1913554085,2025023260,2141851530,2264243051,2392407757,2526561468,2666925999,2813729270,2967205417,3127594904,3295144636,3470108073,3652745345,3843323368,4042115961,4249403964,4465475357,4690625380,4925156654,5169379303,5423611077,5688177476,5963411875,6249655650,6547258305,6856577600,7177979680,7511839205,7858539481,8218472592,8592039533,8979650344,9381724245,9798689772,10230984914,10679057251,11143364093,11624372620,12122560023,12638413646,13172431129,13725120552,14297000580,14888600609,15500460913,16133132792,16787178721,17463172500,18161699405,18883356340,19628751990,20398506975,21193254005,22013638036,22860316427,23733959098,24635248689,25564880720,26523563752,27512019549,28530983241,29581203488,30663442645,31778476928,32927096581,34110106044,35328324122,36582584155,37873734189,39202637148,40570171007,41977228966,43424719625,44913567160,46444711500,48019108505,49637730145,51301564680,53011616841,54768908012,56574476413,58429377284,60334683070,62291483607,64300886309,66364016356,68482016883,70656049170,72887292833,75176946016,77526225584,79936367317,82408626105,84944276144,87544611133,90210944472,92944609461,95746959500,98619368290,101563230035,104579959645,107670992940,110837786855,114081819646,117404591097,120807622728,124292458004,127860662545,131513824337,135253553944,139081484721,142999273028,147008598445,151111163988,155308696326,159602945999,163995687637,168488720180,173083867099,177782976618,182587921937,187500601456,192522939000,197656884045,202904411945,208267524160,213748248485,219348639280,225070777701,230916771932,236888757418,242988897099,249219381645,255582429692,262080288079,268715232086,275489565673,282405621720,289465762268,296672378761,304027892289,311534753832,319195444505,327012475804,334988389853,343125759652,351427189326,359895314375 mov $1,6 add $1,$0 bin $1,$0 sub $1,$0 sub $1,1
src.prep/audio-wavefiles-generic_NUM_TYPE_wav_io.adb
Ada-Audio/wavefiles
10
11406
<filename>src.prep/audio-wavefiles-generic_NUM_TYPE_wav_io.adb<gh_stars>1-10 ------------------------------------------------------------------------------ -- -- -- THIS IS AN AUTOMATICALLY GENERATED FILE! DO NOT EDIT! -- -- -- -- WAVEFILES -- -- -- -- Wavefile data I/O operations -- -- -- -- The MIT License (MIT) -- -- -- -- Copyright (c) 2015 -- 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. -- ------------------------------------------------------------------------------ #if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then package body Audio.Wavefiles.Generic_Float_Wav_IO is #else package body Audio.Wavefiles.Generic_Fixed_Wav_IO is #end if; #if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then #else procedure Read_Wav_Sample_Bytes (File_Access : Ada.Streams.Stream_IO.Stream_Access; Sample : out Wav_Sample) with Inline; procedure Write_Wav_Sample_Bytes (File_Access : Ada.Streams.Stream_IO.Stream_Access; Sample : Wav_Sample) with Inline; #end if; procedure Read_Wav_MC_Sample (WF : in out Wavefile; Wav : out Wav_MC_Sample) with Inline; procedure Write_Wav_MC_Sample (WF : in out Wavefile; Wav : Wav_MC_Sample) with Inline; #if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then #else --------------------------- -- Read_Wav_Sample_Bytes -- --------------------------- procedure Read_Wav_Sample_Bytes (File_Access : Ada.Streams.Stream_IO.Stream_Access; Sample : out Wav_Sample) is Bytes : Byte_Array (1 .. Sample'Size / 8) with Address => Sample'Address, Import, Volatile; Last_Valid_Byte : constant Long_Integer := Wav_Sample'Size / 8; use type Byte; begin Byte_Array'Read (File_Access, Bytes (1 .. Wav_Sample'Size / 8)); -- Account for sign bit in internal representation, -- which might not match the wavefile representation. if Sample'Size > Wav_Sample'Size then Bytes (Last_Valid_Byte + 1 .. Bytes'Last) := (others => (if Bytes (Last_Valid_Byte) >= 16#80# then 16#FF# else 16#00#)); end if; end Read_Wav_Sample_Bytes; ---------------------------- -- Write_Wav_Sample_Bytes -- ---------------------------- procedure Write_Wav_Sample_Bytes (File_Access : Ada.Streams.Stream_IO.Stream_Access; Sample : Wav_Sample) is Bytes : Byte_Array (1 .. Wav_Sample'Size / 8) with Address => Sample'Address, Import, Volatile; begin Byte_Array'Write (File_Access, Bytes); end Write_Wav_Sample_Bytes; #end if; ------------------------ -- Read_Wav_MC_Sample -- ------------------------ procedure Read_Wav_MC_Sample (WF : in out Wavefile; Wav : out Wav_MC_Sample) is N_Ch : constant Positive := Number_Of_Channels (WF); Sample : Wav_Sample; use Ada.Streams.Stream_IO; Prev_File_Index : constant Positive_Count := Index (WF.File) with Ghost; Expected_Byte_IO : constant Positive_Count := Positive_Count (To_Positive (WF.Wave_Format.Bits_Per_Sample) * N_Ch / 8) with Ghost; begin for J in Wav'Range loop #if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then Wav_Sample'Read (WF.File_Access, Sample); #else -- Patch for 24-bit wavefiles if Wav_Sample'Size = 24 then Read_Wav_Sample_Bytes (WF.File_Access, Sample); else Wav_Sample'Read (WF.File_Access, Sample); end if; #end if; Wav (J) := Sample; if Ada.Streams.Stream_IO.End_Of_File (WF.File) and then J < Wav'Last then -- Cannot read data for all channels WF.Set_Error (Wavefile_Error_File_Too_Short); end if; end loop; WF.Sample_Pos.Current := WF.Sample_Pos.Current + 1; pragma Assert (Ada.Streams.Stream_IO.Index (WF.File) = Prev_File_Index + Expected_Byte_IO); end Read_Wav_MC_Sample; ------------------------- -- Write_Wav_MC_Sample -- ------------------------- procedure Write_Wav_MC_Sample (WF : in out Wavefile; Wav : Wav_MC_Sample) is N_Ch : constant Positive := Number_Of_Channels (WF); use Ada.Streams.Stream_IO; Prev_File_Index : constant Positive_Count := Index (WF.File) with Ghost; Expected_Byte_IO : constant Positive_Count := Positive_Count (To_Positive (WF.Wave_Format.Bits_Per_Sample) * N_Ch / 8) with Ghost; begin #if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then Wav_MC_Sample'Write (WF.File_Access, Wav); #else if Wav_Sample'Size = 24 then for Sample of Wav loop Write_Wav_Sample_Bytes (WF.File_Access, Sample); end loop; else Wav_MC_Sample'Write (WF.File_Access, Wav); end if; #end if; WF.Sample_Pos := (Total => WF.Sample_Pos.Total + 1, Current => WF.Sample_Pos.Current + 1); pragma Assert (Ada.Streams.Stream_IO.Index (WF.File) = Prev_File_Index + Expected_Byte_IO); end Write_Wav_MC_Sample; --------- -- Get -- --------- function Get (WF : in out Wavefile) return Wav_MC_Sample is N_Ch : constant Positive := Number_Of_Channels (WF); Channel_Range_Valid_Last : constant Channel_Range := Channel_Range'Val (N_Ch - 1 + Channel_Range'Pos (Channel_Range'First)); subtype Valid_Channel_Range is Channel_Range range Channel_Range'First .. Channel_Range_Valid_Last; begin return Wav : Wav_MC_Sample (Valid_Channel_Range) do Read_Wav_MC_Sample (WF, Wav); end return; end Get; --------- -- Get -- --------- procedure Get (WF : in out Wavefile; Wav : out Wav_MC_Sample) is begin Read_Wav_MC_Sample (WF, Wav); end Get; --------- -- Put -- --------- procedure Put (WF : in out Wavefile; Wav : Wav_MC_Sample) is begin Write_Wav_MC_Sample (WF, Wav); end Put; #if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then end Audio.Wavefiles.Generic_Float_Wav_IO; #else end Audio.Wavefiles.Generic_Fixed_Wav_IO; #end if;
math.adb
SmashedSquirrel/AdaPrimes
0
17171
<gh_stars>0 package body math_Pkg is procedure is_prime (to_check : IN integer; prime : out boolean) is begin Prime := True; if To_Check = 0 then Prime := False; elsif To_Check > 3 then for i in 2..ABS(to_check)/2 loop if abs(to_check) MOD i = 0 then Prime := false; exit; -- number to check is not prime, no further check end if; end loop; end if; end is_prime; end Math_Pkg;
day03/src/fms.adb
jwarwick/aoc_2019_ada
0
6158
<gh_stars>0 -- Fuel Management System with Ada.Text_IO; with Ada.Strings.Maps; with Ada.Strings.Fixed; with Ada.Strings.Unbounded; with Ada.Strings.Hash; package body FMS is package TIO renames Ada.Text_IO; function to_dir(c : in Character) return Direction is begin case c is when 'U' => return Up; when 'D' => return Down; when 'L' => return Left; when 'R' => return Right; when others => raise Constraint_Error; end case; end to_dir; function to_string(d : in Direction) return String is begin case d is when Up => return "U"; when Down => return "D"; when Left => return "L"; when Right => return "R"; end case; end to_string; function to_string(p : in Position) return String is begin return "(" & Integer'IMAGE(p.x) & "," & Integer'IMAGE(p.y) & "): " & Natural'IMAGE(p.dist); end to_string; function distance(p : in Position) return Natural is begin return abs(p.x) + abs(p.y); end distance; function hash(p : in Position) return Ada.Containers.Hash_Type is begin return Ada.Strings.Hash(p.x'IMAGE & "," & p.y'IMAGE); end hash; function equivalent_positions(left, right: Position) return Boolean is begin return (left.x = right.x) and then (left.y = right.y); end equivalent_positions; -- function "=" (left : in Position; right : in Position) return Boolean is -- begin -- return (left.x = right.x) and (left.y = right.y); -- end "="; function to_string(wp : in Wire_Points.Set) return String is package Unbounded renames Ada.Strings.Unbounded; s : Unbounded.Unbounded_String; begin for elt of wp loop Unbounded.append(s, to_string(elt) & ", "); end loop; return Unbounded.to_string(s); end to_string; function to_string(ws : in Wire_Segment) return String is begin return to_string(ws.dir) & Integer'Image(ws.distance); end to_string; function to_string(w : in Wire.Vector) return String is package Unbounded renames Ada.Strings.Unbounded; s : Unbounded.Unbounded_String; begin for elt of w loop Unbounded.append(s, to_string(elt) & ", "); end loop; return Unbounded.to_string(s); end to_string; procedure parse_wire(w_str : in String; w : in out Wire.Vector) is start : Natural := w_str'First; finish : Natural; delimiters : constant Ada.Strings.Maps.Character_Set := Ada.Strings.Maps.to_set(Sequence => ","); begin w.clear; while start <= w_str'Last loop Ada.Strings.Fixed.find_token(Source => w_str(start .. w_str'Last), Set => delimiters, Test => Ada.Strings.outside, First => start, Last => finish); if not(finish = 0 and then start = w_str'First) then w.append((dir => to_dir(w_str(start)), distance => Integer'Value(w_str(start+1 .. finish)))); end if; start := finish + 1; end loop; end parse_wire; procedure step(pos : in out Position; dir : in Direction) is begin case dir is when Up => pos := (x => pos.x, y => pos.y - 1, dist => pos.dist + 1); when Down => pos := (x => pos.x, y => pos.y + 1, dist => pos.dist + 1); when Left => pos := (x => pos.x - 1, y => pos.y, dist => pos.dist + 1); when Right => pos := (x => pos.x + 1, y => pos.y, dist => pos.dist + 1); end case; end step; procedure expand(pos : in out Position; segment : in Wire_Segment; points : in out Wire_Points.Set) is begin for i in 1 .. segment.distance loop step(pos => pos, dir => segment.dir); points.include(pos); end loop; end expand; procedure expand_segments(w : in Wire.Vector; points : in out Wire_Points.Set) is start_pos : constant Position := (x => 0, y => 0, dist => 0); curr_pos : Position := start_pos; begin points.clear; for segment of w loop expand(pos => curr_pos, segment => segment, points => points); end loop; end expand_segments; procedure load(w1 : in String; w2 : in String) is begin parse_wire(w1, wire_1); expand_segments(wire_1, wire_points_1); parse_wire(w2, wire_2); expand_segments(wire_2, wire_points_2); end load; procedure load_file(path : String) is file : TIO.File_Type; begin TIO.open(File => file, Mode => TIO.In_File, Name => path); declare str1 : constant String := TIO.get_line(file); str2 : constant String := TIO.get_line(file); begin load(w1 => str1, w2 => str2); end; TIO.close(file); end load_file; function closest_intersection return Positive is use Wire_Points; best : Positive := Positive'LAST; in_common : constant Wire_Points.Set := wire_points_1 and wire_points_2; begin for elt of in_common loop declare curr : constant Natural := distance(elt); begin if curr < best then best := curr; end if; end; end loop; return best; end closest_intersection; function shortest_intersection return Positive is use Wire_Points; best : Positive := Positive'LAST; in_common : constant Wire_Points.Set := wire_points_1 and wire_points_2; begin for elt of in_common loop declare e1 : constant cursor := find(wire_points_1, elt); d1 : constant natural := element(e1).dist; e2 : constant cursor := find(wire_points_2, elt); d2 : constant natural := element(e2).dist; curr : constant Natural := d1 + d2; begin if curr < best then best := curr; end if; end; end loop; return best; end shortest_intersection; end FMS;
demo/src/stm32f4-gpio.adb
e3l6/SSMDev
0
24235
<reponame>e3l6/SSMDev<gh_stars>0 ------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2014, 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 STM32F4.Reset_Clock_Control; with STM32F4.SYSCONFIG_Control; with System.Machine_Code; package body STM32F4.GPIO is ---------------- -- Is_Any_Set -- ---------------- function Is_Any_Set (Port : GPIO_Port; Pins : GPIO_Pins) return Boolean is These_Pins : Half_Word := 0; begin for Pin of Pins loop These_Pins := These_Pins or Pin'Enum_Rep; end loop; return (Port.IDR and These_Pins) /= 0; end Is_Any_Set; ------------ -- Is_Set -- ------------ function Is_Set (Port : GPIO_Port; Pin : GPIO_Pin) return Boolean is begin return (Port.IDR and Pin'Enum_Rep) /= 0; end Is_Set; ------------- -- All_Set -- ------------- function All_Set (Port : GPIO_Port; Pins : GPIO_Pins) return Boolean is These_Pins : Half_Word := 0; begin for Pin of Pins loop These_Pins := These_Pins or Pin'Enum_Rep; end loop; return (Port.IDR and These_Pins) = These_Pins; end All_Set; --------- -- Set -- --------- procedure Set (Port : in out GPIO_Port; Pin : GPIO_Pin) is begin Port.BSRR_Set := Pin'Enum_Rep; end Set; --------- -- Set -- --------- procedure Set (Port : in out GPIO_Port; Pins : GPIO_Pins) is These_Pins : Half_Word := 0; begin for Pin of Pins loop These_Pins := These_Pins or Pin'Enum_Rep; end loop; Port.BSRR_Set := These_Pins'Enum_Rep; end Set; ----------- -- Clear -- ----------- procedure Clear (Port : in out GPIO_Port; Pin : GPIO_Pin) is begin Port.BSRR_Reset := Pin'Enum_Rep; end Clear; ----------- -- Clear -- ----------- procedure Clear (Port : in out GPIO_Port; Pins : GPIO_Pins) is These_Pins : Half_Word := 0; begin for Pin of Pins loop These_Pins := These_Pins or Pin'Enum_Rep; end loop; Port.BSRR_Reset := These_Pins; end Clear; ------------ -- Toggle -- ------------ procedure Toggle (Port : in out GPIO_Port; Pin : GPIO_Pin) is begin Port.ODR := Port.ODR xor Pin'Enum_Rep; end Toggle; ------------ -- Toggle -- ------------ procedure Toggle (Port : in out GPIO_Port; Pins : GPIO_Pins) is These_Pins : Half_Word := 0; begin for Pin of Pins loop These_Pins := These_Pins or Pin'Enum_Rep; end loop; Port.ODR := Port.ODR xor These_Pins; end Toggle; ------------ -- Locked -- ------------ function Locked (Port : GPIO_Port; Pin : GPIO_Pin) return Boolean is Temp : Word; begin Temp := Port.LCKR; return (Temp and Pin'Enum_Rep) = Pin'Enum_Rep; end Locked; ---------- -- Lock -- ---------- procedure Lock (Port : in out GPIO_Port; Pin : GPIO_Pin) is Temp : Word; pragma Volatile (Temp); use System.Machine_Code; use ASCII; use System; begin -- As per the Reference Manual (RM0090; Doc ID 018909 Rev 6) pg 282, -- a specific sequence is required to set the Lock bit. Throughout the -- sequence the same value for the lower 15 bits of the word must be -- used (ie the pin number). The lock bit is referred to as LCKK in -- the doc. -- Temp := LCCK or Pin'Enum_Rep; -- -- -- set the lock bit -- Port.LCKR := Temp; -- -- -- clear the lock bit -- Port.LCKR := Pin'Enum_Rep; -- -- -- set the lock bit again -- Port.LCKR := Temp; -- -- -- read the lock bit -- Temp := Port.LCKR; -- -- -- read the lock bit again -- Temp := Port.LCKR; -- We use the following assembly language sequence because the above -- high-level version in Ada works only if the optimizer is enabled. -- This is not an issue specific to Ada. If you need a specific sequence -- of instructions you should really specify those instructions. -- We don't want the functionality to depend on the switches, and we -- don't want to preclude debugging, hence the following: Asm ("orr r3, %2, #65536" & LF & HT & "str r3, %0" & LF & HT & "ldr r3, %0" & LF & HT & -- temp <- pin or LCCK line 164 "str r3, [%1, #28]" & LF & HT & -- temp -> lckr line 167 "str %2, [%1, #28]" & LF & HT & -- pin -> lckr line 170 "ldr r3, %0" & LF & HT & "str r3, [%1, #28]" & LF & HT & -- temp -> lckr line 173 "ldr r3, [%1, #28]" & LF & HT & "str r3, %0" & LF & HT & -- temp <- lckr line 176 "ldr r3, [%1, #28]" & LF & HT & "str r3, %0" & LF & HT, -- temp <- lckr line 179 Inputs => (Address'Asm_Input ("r", Port'Address), -- %1 (GPIO_Pin'Asm_Input ("r", Pin))), -- %2 Outputs => (Word'Asm_Output ("=m", Temp)), -- %0 Volatile => True, Clobber => ("r2, r3")); end Lock; ---------- -- Lock -- ---------- procedure Lock (Port : in out GPIO_Port; Pins : GPIO_Pins) is begin for Pin of Pins loop Lock (Port, Pin); end loop; end Lock; ------------------ -- Configure_IO -- ------------------ procedure Configure_IO (Port : in out GPIO_Port; Pins : GPIO_Pins; Config : GPIO_Port_Configuration) is MODER : Pin_Modes_Register := Port.MODER; OTYPER : Output_Types_Register := Port.OTYPER; OSPEEDR : Output_Speeds_Register := Port.OSPEEDR; PUPDR : Resistors_Register := Port.PUPDR; begin for Pin of Pins loop declare Index : constant Integer := GPIO_Pin'Pos (Pin); -- 0 .. 15 begin MODER (Index) := Config.Mode; OTYPER (Index) := Config.Output_Type; OSPEEDR (Index) := Config.Speed; PUPDR (Index) := Config.Resistors; end; end loop; Port.MODER := MODER; Port.OTYPER := OTYPER; Port.OSPEEDR := OSPEEDR; Port.PUPDR := PUPDR; if Config.Locked then for Pin of Pins loop Lock (Port, Pin); end loop; end if; end Configure_IO; ------------------ -- Configure_IO -- ------------------ procedure Configure_IO (Port : in out GPIO_Port; Pin : GPIO_Pin; Config : GPIO_Port_Configuration) is MODER : Pin_Modes_Register := Port.MODER; OTYPER : Output_Types_Register := Port.OTYPER; OSPEEDR : Output_Speeds_Register := Port.OSPEEDR; PUPDR : Resistors_Register := Port.PUPDR; Index : constant Integer := GPIO_Pin'Pos (Pin); begin MODER (Index) := Config.Mode; OTYPER (Index) := Config.Output_Type; OSPEEDR (Index) := Config.Speed; PUPDR (Index) := Config.Resistors; Port.MODER := MODER; Port.OTYPER := OTYPER; Port.OSPEEDR := OSPEEDR; Port.PUPDR := PUPDR; if Config.Locked then Lock (Port, Pin); end if; end Configure_IO; ------------------- -- Current_Input -- ------------------- function Current_Input (Port : GPIO_Port) return Half_Word is begin return Port.IDR; end Current_Input; -------------------- -- Current_Output -- -------------------- function Current_Output (Port : GPIO_Port) return Half_Word is begin return Port.ODR; end Current_Output; ------------------ -- Write_Output -- ------------------ procedure Write_Output (Port : in out GPIO_Port; Data : Half_Word) is begin Port.ODR := Data; end Write_Output; ---------------------------------- -- Configure_Alternate_Function -- ---------------------------------- procedure Configure_Alternate_Function (Port : in out GPIO_Port; Pin : GPIO_Pin; AF : GPIO_Alternate_Function) is Index : constant Integer := GPIO_Pin'Pos (Pin); begin Port.AFR (Index) := Bits_4 (AF); end Configure_Alternate_Function; ---------------------------------- -- Configure_Alternate_Function -- ---------------------------------- procedure Configure_Alternate_Function (Port : in out GPIO_Port; Pins : GPIO_Pins; AF : GPIO_Alternate_Function) is begin for Pin of Pins loop Configure_Alternate_Function (Port, Pin, AF); end loop; end Configure_Alternate_Function; ----------------------- -- Configure_Trigger -- ----------------------- procedure Configure_Trigger (Port : in out GPIO_Port; Pin : GPIO_Pin; Trigger : External_Triggers) is use STM32F4.SYSCONFIG_Control, STM32F4.Reset_Clock_Control; begin SYSCFG_Clock_Enable; Connect_External_Interrupt (Port, Pin); Set_External_Trigger (Pin, Trigger); Select_Trigger_Edge (Pin, Trigger); end Configure_Trigger; ----------------------- -- Configure_Trigger -- ----------------------- procedure Configure_Trigger (Port : in out GPIO_Port; Pins : GPIO_Pins; Trigger : External_Triggers) is begin for Pin of Pins loop Configure_Trigger (Port, Pin, Trigger); end loop; end Configure_Trigger; end STM32F4.GPIO;
patch_win32.asm
tek-nishi/microprofile
1,185
162089
PUBLIC microprofile_tramp_enter PUBLIC microprofile_tramp_leave PUBLIC microprofile_tramp_code_begin PUBLIC microprofile_tramp_code_end PUBLIC microprofile_tramp_end PUBLIC microprofile_tramp_exit PUBLIC microprofile_tramp_intercept0 PUBLIC microprofile_tramp_enter_patch ;PUBLIC microprofile_tramp_get_rsp_loc PUBLIC microprofile_tramp_arg0 ;PUBLIC microprofile_tramp_arg1 PUBLIC microprofile_tramp_call_patch_pop PUBLIC microprofile_tramp_call_patch_push PUBLIC microprofile_tramp_trunk .data .code ;RCX, RDX, R8, R9, XMM0-XMM3, YMM0-YMM3, ZMM0-ZMM ;RAX, ST(0), XMM0, YMM0, ZMM0 RAX microprofile_tramp_enter: mov r11, [rsp] push rcx push rdx push r8 push r9 ;sub $88h, %rsp sub rsp, 68h movdqu [rsp + 050h], xmm3 movdqu [rsp + 040h], xmm2 movdqu [rsp + 030h], xmm1 movdqu [rsp + 020h], xmm0 mov rcx, r11 microprofile_tramp_call_patch_push: mov rax, 0102030405060708h call rax test rax, rax jz microprofile_tramp_fail ;if push fails, skip to call code, and dont patch return adress. microprofile_tramp_enter_patch: ; PATCH 1 TRAMP EXIT mov rax, 0102030405060708h ;patch to tramp_code_end mov [rsp+088h], rax microprofile_tramp_arg0: mov rcx, 42 microprofile_tramp_intercept0: ;PATCH 2 INTERCEPT0 mov rax, 0102030405060708h call rax microprofile_tramp_fail: movdqu xmm3, [rsp + 050h] movdqu xmm2, [rsp + 040h] movdqu xmm1, [rsp + 030h] movdqu xmm0, [rsp + 020h] add rsp, 68h pop r9 pop r8 pop rdx pop rcx microprofile_tramp_code_begin: ;;insert code here nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop microprofile_tramp_code_end: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop microprofile_tramp_exit: mov rcx, 117 push rax sub rsp, 30h movdqu [rsp + 020h], xmm0 microprofile_tramp_leave: ;PATCH 3 INTERCEPT1 mov rax, 0102030405060708h call rax ;jump to proxy microprofile_tramp_call_patch_pop: mov rax, 0102030405060708h call rax mov r11, rax movdqu xmm0, [rsp + 020h] add rsp, 30h pop rax jmp r11 int 3 nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop int 3 microprofile_tramp_trunk: ;: #used for moved constants. ; todo: move it to the beginning so it can be aligned by default. nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop microprofile_tramp_end: end
source/web/spikedog/core/matreshka-servlet_http_requests.ads
svn2github/matreshka
24
25644
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015-2018, <NAME> <<EMAIL>> -- -- 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 Vadim Godunko, 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 -- -- HOLDER 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. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- Base type for servlet requests. It provides: -- - splitting of request path into context/servlet/path_info components; -- - session management via HTTP cookie. ------------------------------------------------------------------------------ with League.IRIs; with League.String_Vectors; with League.Strings; with Servlet.HTTP_Requests; with Servlet.HTTP_Sessions; with Servlet.Contexts; with Spikedog.HTTP_Session_Managers; package Matreshka.Servlet_HTTP_Requests is pragma Preelaborate; type Abstract_HTTP_Servlet_Request is abstract limited new Servlet.HTTP_Requests.HTTP_Servlet_Request with private; type HTTP_Servlet_Request_Access is access all Abstract_HTTP_Servlet_Request'Class; procedure Initialize (Self : in out Abstract_HTTP_Servlet_Request'Class; URL : League.IRIs.IRI); -- Initialized path of the object and corresponsing respose object. procedure Set_Session_Manager (Self : in out Abstract_HTTP_Servlet_Request'Class; Manager : Spikedog.HTTP_Session_Managers.HTTP_Session_Manager_Access); -- Sets session manager should be used to manage HTTP sessions. This called -- by servlet container. function Get_Path (Self : Abstract_HTTP_Servlet_Request'Class) return League.String_Vectors.Universal_String_Vector with Inline; -- Returns original path of the request. procedure Set_Context_Last_Segment (Self : in out Abstract_HTTP_Servlet_Request'Class; Last : Natural); -- Sets index of last segment of context path in request's path. procedure Set_Servlet_Last_Segment (Self : in out Abstract_HTTP_Servlet_Request'Class; Last : Natural); -- Sets index of last segment of servlet path in request's path. procedure Set_Servlet_Context (Self : in out Abstract_HTTP_Servlet_Request'Class; Context : Servlet.Contexts.Servlet_Context_Access); -- Sets servlet context to which request was last dispatched. overriding function Get_Context_Path (Self : Abstract_HTTP_Servlet_Request) return League.String_Vectors.Universal_String_Vector; -- Returns the portion of the request URI that indicates the context of the -- request. The context path always comes first in a request URI. The path -- starts with a "/" character but does not end with a "/" character. For -- servlets in the default (root) context, this method returns "". The -- container does not decode this string. overriding function Get_Path_Info (Self : Abstract_HTTP_Servlet_Request) return League.String_Vectors.Universal_String_Vector; -- Returns any extra path information associated with the URL the client -- sent when it made this request. The extra path information follows the -- servlet path but precedes the query string and will start with a "/" -- character. overriding function Get_Request_URL (Self : Abstract_HTTP_Servlet_Request) return League.IRIs.IRI; -- Returns the URL the client used to make the request. The returned URL -- contains a protocol, server name, port number, and server path, but it -- does not include query string parameters. -- -- If this request has been forwarded using RequestDispatcher.forward -- (ServletRequest, ServletResponse), the server path in the reconstructed -- URL must reflect the path used to obtain the RequestDispatcher, and not -- the server path specified by the client. overriding function Get_Requested_Session_Id (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String; -- Returns the session ID specified by the client. This may not be the same -- as the ID of the current valid session for this request. If the client -- did not specify a session ID, this method returns null. overriding function Get_Scheme (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String; -- Returns the name of the scheme used to make this request, for example, -- http, https, or ftp. Different schemes have different rules for -- constructing URLs, as noted in RFC 1738. overriding function Get_Server_Name (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String; -- Returns the host name of the server to which the request was sent. It is -- the value of the part before ":" in the Host header value, if any, or -- the resolved server name, or the server IP address. overriding function Get_Server_Port (Self : Abstract_HTTP_Servlet_Request) return Positive; -- Returns the port number to which the request was sent. It is the value -- of the part after ":" in the Host header value, if any, or the server -- port where the client connection was accepted on. overriding function Get_Servlet_Context (Self : Abstract_HTTP_Servlet_Request) return access Servlet.Contexts.Servlet_Context'Class; -- Gets the servlet context to which this ServletRequest was last -- dispatched. overriding function Get_Servlet_Path (Self : Abstract_HTTP_Servlet_Request) return League.String_Vectors.Universal_String_Vector; -- Returns the part of this request's URL that calls the servlet. This path -- starts with a "/" character and includes either the servlet name or a -- path to the servlet, but does not include any extra path information or -- a query string. Same as the value of the CGI variable SCRIPT_NAME. overriding function Get_Session (Self : Abstract_HTTP_Servlet_Request; Create : Boolean := True) return access Servlet.HTTP_Sessions.HTTP_Session'Class; -- Returns the current HttpSession associated with this request or, if -- there is no current session and create is true, returns a new session. overriding function Is_Requested_Session_Id_Valid (Self : Abstract_HTTP_Servlet_Request) return Boolean; -- Checks whether the requested session ID is still valid. overriding function Change_Session_Id (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String; -- Change the session id of the current session associated with this -- request and return the new session id. private type HTTP_Session_Access is access all Servlet.HTTP_Sessions.HTTP_Session'Class; type Internal_Data is record Session_Computed : Boolean := False; Session : HTTP_Session_Access; Requested_Id_Computed : Boolean := False; Requested_Id : League.Strings.Universal_String; -- Cache for requested session id end record; type Abstract_HTTP_Servlet_Request is abstract limited new Servlet.HTTP_Requests.HTTP_Servlet_Request with record URL : League.IRIs.IRI; Context_Last : Natural := 0; Servlet_Last : Natural := 0; -- Path information computed during request dispatching. Context : Servlet.Contexts.Servlet_Context_Access; -- Response : -- Matreshka.Servlet_HTTP_Responses.HTTP_Servlet_Response_Access; -- Response object to be used when necessay (for example to send cookie -- with session identifier to client). Session_Manager : Spikedog.HTTP_Session_Managers.HTTP_Session_Manager_Access; Data : access Internal_Data; Storage : aliased Internal_Data; end record; end Matreshka.Servlet_HTTP_Requests;
examples/projects/dcf77/src/enc28j60.asm
toby1984/javr
3
23609
; ENC28J60 Bank 0 registers .equ ETH_BANK0_ERDPTL = 0x00 .equ ETH_BANK0_ERDPTH = 0x01 .equ ETH_BANK0_EWRPTL = 0x02 .equ ETH_BANK0_EWRPTH = 0x03 .equ ETH_BANK0_ETXSTL = 0x04 .equ ETH_BANK0_ETXSTH = 0x05 .equ ETH_BANK0_ETXNDL = 0x06 .equ ETH_BANK0_ETXNDH = 0x07 .equ ETH_BANK0_ERXSTL = 0x08 .equ ETH_BANK0_ERXSTH = 0x09 .equ ETH_BANK0_ERXNDL = 0x0A .equ ETH_BANK0_ERXNDH = 0x0B .equ ETH_BANK0_ERXRDPTL = 0x0C .equ ETH_BANK0_ERXRDPTH = 0x0D .equ ETH_BANK0_ERXWRPTL = 0x0E .equ ETH_BANK0_ERXWRPTH = 0x0F .equ ETH_BANK0_EDMASTL = 0x10 .equ ETH_BANK0_EDMASTH = 0x11 .equ ETH_BANK0_EDMANDL = 0x12 .equ ETH_BANK0_EDMANDH = 0x13 .equ ETH_BANK0_EDMADSTL = 0x14 .equ ETH_BANK0_EDMADSTH = 0x15 .equ ETH_BANK0_EDMACSL = 0x16 .equ ETH_BANK0_EDMACSH = 0x17 ; ENC28J60 common registers (available in every bank) .equ ETH_EIE = 0x1B .equ ETH_EIR = 0x1C .equ ETH_ESTAT = 0x1D .equ ETH_ECON2 = 0x1E .equ ETH_ECON1 = 0x1F ; ENC28J60 Bank 1 registers .equ ETH_BANK1_EHT0 = 0x00 .equ ETH_BANK1_EHT1 = 0x01 .equ ETH_BANK1_EHT2 = 0x02 .equ ETH_BANK1_EHT3 = 0x03 .equ ETH_BANK1_EHT4 = 0x04 .equ ETH_BANK1_EHT5 = 0x05 .equ ETH_BANK1_EHT6 = 0x06 .equ ETH_BANK1_EHT7 = 0x07 .equ ETH_BANK1_EPMM0 = 0x08 .equ ETH_BANK1_EPMM1 = 0x09 .equ ETH_BANK1_EPMM2 = 0x0A .equ ETH_BANK1_EPMM3 = 0x0B .equ ETH_BANK1_EPMM4 = 0x0C .equ ETH_BANK1_EPMM5 = 0x0D .equ ETH_BANK1_EPMM6 = 0x0E .equ ETH_BANK1_EPMM7 = 0x0F .equ ETH_BANK1_EPMCSL = 0x10 .equ ETH_BANK1_EPMCSH = 0x11 .equ ETH_BANK1_EPMOL = 0x14 .equ ETH_BANK1_EPMOH = 0x15 .equ ETH_BANK1_ERXFCON = 0x18 .equ ETH_BANK1_EPKTCNT = 0x19 ; ENC28J60 Bank 2 registers .equ MACON1 = 0x00 .equ Reserved = 0x01 .equ MACON3 = 0x02 .equ MACON4 = 0x03 .equ MABBIPG = 0x04 .equ MAIPGL = 0x06 .equ MAIPGH = 0x07 .equ MACLCON1 = 0x08 .equ MACLCON2 = 0x09 .equ MAMXFLL = 0x0A .equ MAMXFLH = 0x0B .equ MICMD = 0x12 .equ MIREGADR = 0x14 .equ MIWRL = 0x16 .equ MIWRH = 0x17 .equ MIRDL = 0x18 .equ MIRDH = 0x19 ; ENC28J60 Bank 3 registers .equ MAADR5 = 0x00 .equ MAADR6 = 0x01 .equ MAADR3 = 0x02 .equ MAADR4 = 0x03 .equ MAADR1 = 0x04 .equ MAADR2 = 0x05 .equ EBSTSD = 0x06 .equ EBSTCON = 0x07 .equ EBSTCSL = 0x08 .equ EBSTCSH = 0x09 .equ MISTAT = 0x0A .equ EREVID = 0x12 .equ ECOCON = 0x15 .equ EFLOCON = 0x17 .equ EPAUSL = 0x18 .equ EPAUSH = 0x19
oeis/129/A129339.asm
neoneye/loda-programs
11
18552
; A129339: Main diagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j. ; Submitted by <NAME> ; 1,2,4,7,11,16,23,37,74,175,431,1024,2291,4825,9650,18571,34955,65536,124511,242461,484922,989527,2038103,4194304,8565755,17308657,34617314,68703187,135812051,268435456,532087943,1059392917,2118785834,4251920575,8546887871,17179869184,34488878531,69106897225,138213794450,276040168411,550918075355,1099511627776,2195536471151,4387586157901,8775172315802,17560804984807,35152991029223,70368744177664,140831631534155,281757406247137,563514812494274,1126747195452067,2252647102294691,4503599627370496 mov $1,2 mov $2,1 mov $3,2 mov $4,3 lpb $0 sub $0,1 mov $3,$2 mul $2,2 add $2,1 add $3,$4 sub $4,$1 add $1,$3 add $4,$3 lpe mov $0,$3 div $0,2
source/protocol/lsp-types.adb
reznikmm/ada_lsp
11
16536
<filename>source/protocol/lsp-types.adb -- Copyright (c) 2017 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body LSP.Types is -------------- -- Assigned -- -------------- function Assigned (Id : LSP_Number_Or_String) return Boolean is begin return Id.Is_Number or else not Id.String.Is_Empty; end Assigned; --------------------------- -- Read_Number_Or_String -- --------------------------- procedure Read_Number_Or_String (Stream : in out League.JSON.Streams.JSON_Stream'Class; Key : League.Strings.Universal_String; Item : out LSP.Types.LSP_Number_Or_String) is Value : League.JSON.Values.JSON_Value; begin Stream.Key (Key); Value := Stream.Read; if Value.Is_Empty then Item := (Is_Number => False, String => League.Strings.Empty_Universal_String); elsif Value.Is_String then Item := (Is_Number => False, String => Value.To_String); else Item := (Is_Number => True, Number => Integer (Value.To_Integer)); end if; end Read_Number_Or_String; -------------------------- -- Read_Optional_String -- -------------------------- procedure Read_Optional_String (Stream : in out League.JSON.Streams.JSON_Stream'Class; Key : League.Strings.Universal_String; Item : out LSP.Types.Optional_String) is Value : League.JSON.Values.JSON_Value; begin Stream.Key (Key); Value := Stream.Read; if Value.Is_Empty or Value.Is_Null then Item := (Is_Set => False); else Item := (Is_Set => True, Value => Value.To_String); end if; end Read_Optional_String; ----------------- -- Read_String -- ----------------- procedure Read_String (Stream : in out League.JSON.Streams.JSON_Stream'Class; Key : League.Strings.Universal_String; Item : out LSP.Types.LSP_String) is begin Stream.Key (Key); Item := Stream.Read.To_String; end Read_String; end LSP.Types;
ASM/src/weather.asm
denoflionsx/OoT-Randomizer
344
87224
<reponame>denoflionsx/OoT-Randomizer //Change En_Weather_Tag to check for medallions .headersize (0x80AD7270 - 0xE570B0) //Weather Tag 4 (Cloudy, Fire Temple hasn't been beaten) .org 0x80AD7390 .area 0x18, 0 lui v1, hi(KAKARIKO_WEATHER_FORECAST) lbu t5, lo(KAKARIKO_WEATHER_FORECAST)(v1) li t4, 1 // Cloudy beq t5, t4, @tag4_skip_actor_kill nop .endarea // Fall into Actor Kill call .org 0x80AD73B0 @tag4_skip_actor_kill: //Weather Tag 5 (Thunderstorm, Shadow Temple hasn't been completed) .org 0x80AD73C8 .area 0x3C, 0 lui v1, hi(KAKARIKO_WEATHER_FORECAST) lbu t5, lo(KAKARIKO_WEATHER_FORECAST)(v1) li t4, 2 // Thunderstorm beq t5, t4, @tag5_skip_actor_kill nop .endarea .org 0x80AD740C @tag5_skip_actor_kill: .headersize 0
Task/Variadic-function/AppleScript/variadic-function.applescript
LaudateCorpus1/RosettaCodeData
1
598
<reponame>LaudateCorpus1/RosettaCodeData<filename>Task/Variadic-function/AppleScript/variadic-function.applescript use framework "Foundation" -- positionalArgs :: [a] -> String on positionalArgs(xs) -- follow each argument with a line feed map(my putStrLn, xs) as string end positionalArgs -- namedArgs :: Record -> String on namedArgs(rec) script showKVpair on |λ|(k) my putStrLn(k & " -> " & keyValue(rec, k)) end |λ| end script -- follow each argument name and value with line feed map(showKVpair, allKeys(rec)) as string end namedArgs -- TEST on run intercalate(linefeed, ¬ {positionalArgs(["alpha", "beta", "gamma", "delta"]), ¬ namedArgs({epsilon:27, zeta:48, eta:81, theta:8, iota:1})}) --> "alpha -- beta -- gamma -- delta -- -- epsilon -> 27 -- eta -> 81 -- iota -> 1 -- zeta -> 48 -- theta -> 8 -- " end run -- GENERIC FUNCTIONS -- putStrLn :: a -> String on putStrLn(a) (a as string) & linefeed end putStrLn -- map :: (a -> b) -> [a] -> [b] on map(f, xs) tell mReturn(f) set lng to length of xs set lst to {} repeat with i from 1 to lng set end of lst to |λ|(item i of xs, i, xs) end repeat return lst end tell end map -- intercalate :: Text -> [Text] -> Text on intercalate(strText, lstText) set {dlm, my text item delimiters} to {my text item delimiters, strText} set strJoined to lstText as text set my text item delimiters to dlm return strJoined end intercalate -- allKeys :: Record -> [String] on allKeys(rec) (current application's NSDictionary's dictionaryWithDictionary:rec)'s allKeys() as list end allKeys -- keyValue :: Record -> String -> Maybe String on keyValue(rec, strKey) set ca to current application set v to (ca's NSDictionary's dictionaryWithDictionary:rec)'s objectForKey:strKey if v is not missing value then item 1 of ((ca's NSArray's arrayWithObject:v) as list) else missing value end if end keyValue -- Lift 2nd class handler function into 1st class script wrapper -- mReturn :: Handler -> Script on mReturn(f) if class of f is script then f else script property |λ| : f end script end if end mReturn
shellcode/64bit/bash_asm.nasm
karng87/nasm_game
0
12265
;; execve(const char *exec, char *const v[], char *const e[]) ; 48 31 d2 48 bb 2f 2f 62 69 6e 2f 73 68 48 c1 eb 08 53 48 89 e7 50 57 48 89 e6 b0 3b 0f 05 ; nasm -f elf64 bash_asm.nasm -o bash_asm.o ;; ld -V (emulators) ; ld -m elf_x86_64 bash_asm.o -o bash_asm ; ld -m elf_i386 bash_asm.o -o bash_asm section .text global main main: xor rdx, rdx mov qword rbx, '//bin/sh' ; 8byte = 64bit ; 68h('h'),73h('s') shr rbx, 0x8 ; shift 8bit to the right hs/nib// => 0hs/nib/ : 0'/bin/sh' push rbx ; push 0'/bin/sh' mov rdi, rsp ; rdi(arg[1]) : &(0'/bin/sh') <- *rsp push rax ; NULL? push rdi ; 0'/bin/sh' mov rsi, rsp ;; rsi(arg[2]) : mov al, 0x3b ; arg[0] = execve ; 59 64bit execve syscall
src/main/antlr4/PlantUML.g4
tekiflo/umlreverse
0
596
<reponame>tekiflo/umlreverse<gh_stars>0 grammar PlantUML; // -- PARSER RULES -- // ENTRY POINT entryPoint : NL? START_UML NL classDiagram END_UML NL? | NL? START_UML NL usecaseDiagram END_UML NL? ; // -- USECASE DIAGRAM -- // Usecase diagram document structure usecaseDiagram : usecaseDiagramContent* ; // Usecase diagram contents usecaseDiagramContent : usecaseEntityDef | usecaseArrow | commonContent ; // Entities definitions usecaseEntityDef : usecaseActorDef | usecaseCaseDef | usecaseRectangleDef ; usecaseActorDef : WS? 'actor' WS name=usecaseEntityID (WS? stereotype)? (WS AS WS label=usecaseEntityID (WS? stereotype)?)? (WS? color)? WS? NL | WS? name=usecaseEntityID (WS? stereotype)? (WS AS WS label=usecaseEntityID (WS? stereotype)?)? (WS? color)? WS? NL ; usecaseCaseDef : WS? 'usecase' WS name=usecaseEntityID (WS? stereotype)? (WS AS WS label=usecaseEntityID (WS? stereotype)?)? (WS? color)? WS? NL | WS? name=usecaseEntityID (WS? stereotype)? (WS AS WS label=usecaseEntityID (WS? stereotype)?)? (WS? color)? WS? NL ; usecaseRectangleDef : WS? 'rectangle' WS name=usecaseEntityID (WS? stereotype)? (WS AS WS label=usecaseEntityID (WS? stereotype)?)? (WS? color)? WS? ('{' WS? NL usecaseDiagramContent* WS? '}' WS?)? NL ; // Arrows usecaseArrow : WS? headID=usecaseArrowID WS? (headLabel=escapedString WS?)? usecaseArrowType WS? (tailLabel=escapedString WS?)? tailID=usecaseArrowID WS? (':' bodyLabel=endLine)? NL ; usecaseArrowType : arrowHead? arrowBody arrowTail? ; usecaseArrowID : ':' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | '-' | '*' | escapedKeywords | WS)+ ':' | '(' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS)+ ')' | ID ; // Usecase entities ID usecaseEntityID : usecaseActorID | usecaseCaseID | escapedString | ID ; usecaseActorID : ':' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | '-' | '*' | escapedKeywords | WS)+ ':' ; usecaseCaseID : '(' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS)+ ')' ; // -- CLASS DIAGRAM -- // Class diagram document structure classDiagram : classDiagramContent* ; // Class diagram contents classDiagramContent : classPackageEntity | classEntity | classRelation | classExternalField | commonContent ; // Packages & Namespaces classPackageEntity : WS? classPackageEntityType WS classPackageName (WS? stereotype)? WS? (color WS?)? '{' WS? NL classDiagramContent* WS? '}' WS? NL ; classPackageEntityType : PACKAGE | NAMESPACE ; classPackageName : (classPackageID '.')* classPackageID | escapedString (WS AS WS (classPackageID '.')* classPackageID)? ; // Entities (class, enum, interface, abstract) classEntity : WS? classEntityType WS (escapedString WS AS WS classEntityID generic? | classEntityID generic? (WS AS WS escapedString)?) WS? (stereotype WS?)? (classInheritance WS?)? (color WS?)? ('{' NL (classField | WS? NL)* WS? '}' WS?)? NL ; classEntityType : CLASS | ABSTRACT | INTERFACE | ENUM ; classInheritance : WS classInheritanceType WS classEntityID ; classInheritanceType : EXTENDS | IMPLEMENTS ; // Fields (method & attribute) // External field classExternalField : WS? classEntityID WS ':' classField ; // Inner field classField : classMethod | classAttribute | comment ; classMethod : WS? classVisibility classFieldContent? (('(' | ')') classFieldContent?)+ WS? NL | WS? classFieldNoVisibilityContent? (('(' | ')') classFieldContent?)+ WS? NL ; classAttribute : WS? classVisibility classFieldContent WS* NL | WS? classFieldNoVisibilityContent WS* NL ; classVisibility : '-' | '#' | '~' | '+' ; classFieldNoVisibilityContent : (ID | '{' | '<' | '>' | '.' | '"' | ':' | '*' | escapedKeywords) (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS)* ; classFieldContent : WS? (ID | '~' | '{' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | '#' | '+' | escapedKeywords) (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS)* ; // Relations classRelation : WS? headID=classRelationClass WS? (headLabel=escapedString WS?)? (classRelationType | arrowBody) (WS? tailLabel=escapedString)? WS? (tailType=classEntityType WS)? tailID=classRelationClass WS? (':' bodyLabel=endLine)? NL | WS? headType=classEntityType WS headID=classRelationClass WS? (headLabel=escapedString WS?)? classRelationType (WS? tailLabel=escapedString)? WS? (tailType=classEntityType WS)? tailID=classRelationClass WS? (':' bodyLabel=endLine)? NL | WS? headType=classEntityType WS headID=classRelationClass (WS? headLabel=escapedString)? ((WS arrowBody) | (arrowBody WS) | (WS arrowBody WS)) (tailLabel=escapedString WS?)? (tailType=classEntityType WS)? tailID=classRelationClass WS? (':' bodyLabel=endLine)? NL | classAssociationClass ; classAssociationClass : WS? '(' WS? firstID=classRelationClass WS? ',' WS? sndID=classRelationClass WS? ')' WS? (headLabel=escapedString WS?)? arrowHead? arrowBody arrowTail? (WS? tailLabel=escapedString)? WS? (tailType=classEntityType WS)? tailID=classRelationClass WS? (':' bodyLabel=endLine)? NL ; classRelationClass : escapedString | classEntityID ; classRelationType : arrowHead arrowBody | arrowBody arrowTail | arrowHead arrowBody arrowTail | classLollipopHead | classLollipopTail ; classLollipopHead : '(' ')' ('.' | '-')+ ; classLollipopTail : ('.' | '-')+ '(' ')' ; // Class entities ID classEntityID : (classPackageID? '.')* classEntityNameID ; classEntityNameID : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | ')' | ':' | '*' | escapedKeywords) (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '"' | '(' | ')' | ':' | '-' | '*' | escapedKeywords)* ; classPackageID : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '"' | '(' | ')' | ':' | escapedKeywords) (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '"' | '(' | ')' | ':' | '-' | '*' | escapedKeywords)* ; // -- COMMON RULES -- // Common content commonContent : comment | title | note | legend | ignoredCommand | WS? NL ; // Title title : TITLE NL? ; // Note note : WS? NOTE WS escapedString WS AS WS ID (WS color)? WS? NL | WS? NOTE WS AS WS ID (WS color)? WS? (NL noteContent? endNote | ':' endLine NL) | WS? NOTE WS noteDirection (WS color)? WS? (NL noteContent? endNote | ':' endLine NL) | WS? NOTE WS noteDirection WS OF WS noteEntityID (WS color)? (NL noteContent? endNote | ':' endLineNoDoubleDots NL) | WS? NOTE WS noteDirection WS OF WS noteEntityID (WS color)? WS (NL noteContent? endNote | ':' endLine NL) | WS? NOTE WS noteDirection WS ON WS LINK (WS color)? WS? (NL noteContent? endNote | ':' endLine NL) ; noteEntityID : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '(' | ')' | '.' | '"' | ':' | '-' | '*' | escapedKeywords)+ ; noteDirection : LEFT | RIGHT | TOP | BOT ; noteContent : ( WS? (END WS?)? NL | WS? (noteWord | NOTE) WS? ((noteWord | NOTE | END | END_NOTE) WS?)* NL | WS? END WS? (noteWord | END) WS? ((noteWord | NOTE | END | END_NOTE) WS?)* NL | WS? ((END WS? NOTE) | END_NOTE) WS? ((noteWord | NOTE | END | END_NOTE) WS?)+ NL)+ ; noteWord : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedNoteKeyword) ; endNote : WS? ((END WS? NOTE) | END_NOTE) WS? NL ; // Legend legend : WS? LEGEND (WS noteDirection (WS noteDirection)?)? WS? NL legendContent? endLegend ; legendContent : ( WS? (END WS?)? NL | WS? (legendWord | LEGEND) WS? ((legendWord | LEGEND | END | END_LEGEND) WS?)* NL | WS? END WS? (legendWord | END) WS? ((legendWord | LEGEND | END | END_LEGEND) WS?)* NL | WS? ((END WS? NOTE) | END_LEGEND) WS? ((legendWord | LEGEND | END | END_LEGEND) WS?)+ NL)+ ; legendWord : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedLegendKeyword) ; endLegend : WS? ((END WS? LEGEND) | END_LEGEND) WS? NL ; // Comment comment : WS? '\'' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS)* NL | '/\'' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS | NL)* '\'/' NL ; // -- TOOL RULES -- // Generics generic : '<' genericContent '>' ; genericContent : genericPart (generic genericPart?)* ; genericPart : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '.' | '"' | ':' | '-' | '*' | escapedKeywords | WS)+ ; stereotype : '<' '<' stereotypeContent '>' '>' ; stereotypeContent : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '.' | '"' | ':' | '-' | escapedKeywords | WS | '>')+ ; // Arrows arrowHead : '<' '|' #arrowFullHead | '<' #arrowBasicHead | 'o' #arrowCircleHead | '*' #arrowStarHead | '+' #arrowPlusHead ; arrowBody : '.' ('.' | '-')* (arrowDirection ('.' | '-')+)? #arrowDotBody | '-'('.' | '-')* (arrowDirection ('.' | '-')+)? #arrowDashBody ; arrowDirection : LEFT_A | RIGHT_A | LEFT | RIGHT | UP | DOWN ; arrowTail : '|' '>' #arrowFullTail | '>' #arrowBasicTail | 'o' #arrowCircleTail | '*' #arrowStarTail | '+' #arrowPlusTail ; // Escaped string escapedString : '"' escapedStringContent '"' ; escapedStringContent : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | ':' | '-' | '*' | WS | escapedKeywords | NL)+ ; // Escaped keywords escapedKeywords : escapedCommonKeyword | END | NOTE | LEGEND | END_NOTE | END_LEGEND ; escapedNoteKeyword : escapedCommonKeyword | LEGEND ; escapedLegendKeyword : escapedCommonKeyword | NOTE ; escapedCommonKeyword : CLASS | ABSTRACT | INTERFACE | ENUM | PACKAGE | IMPLEMENTS | EXTENDS | AS | TITLE | LEFT | RIGHT | LEFT_A | RIGHT_A | TOP | BOT | UP | DOWN | OF | ON | LINK | NAMESPACE | IGNORED | ACTOR | USECASE | RECTANGLE ; // Colors color : '#' (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '(' | ')' | '<' | '>' | '.' | '"' | ':' | '-' | '*' | escapedKeywords)+ ; // Line end (everything but NL) endLine : (endLineNoDoubleDots | ':')+ ; endLineNoDoubleDots : (ID | '~' | '|' | ',' | '+' | '#' | '\'' | '{' | '}' | '(' | ')' | '<' | '>' | '.' | '"' | '-' | '*' | escapedKeywords | WS)+ ; // Ignored commands ignoredCommand : START_UML | IGNORED ; // TOKENS // Common START_UML : '@startuml'; END_UML : ('@enduml' | '@end'); TITLE : 'title ' ~[\r\n]* '\n'; AS : 'as'; // Directions LEFT : 'left'; LEFT_A : 'le' | 'l'; RIGHT : 'right'; RIGHT_A : 'ri' | 'r'; UP : 'up' | 'u'; DOWN : 'down' | 'do' | 'd'; TOP : 'top'; BOT : 'bottom'; // Notes & legends NOTE : 'note'; LEGEND : 'legend'; OF : 'of'; ON : 'on'; LINK : 'link'; END : 'end'; END_NOTE : 'endnote'; END_LEGEND : 'endlegend'; // Class diagram CLASS : 'class'; ABSTRACT : 'abstract' | 'abstract class'; INTERFACE : 'interface'; ENUM : 'enum'; PACKAGE : 'package'; NAMESPACE : 'namespace'; IMPLEMENTS : 'implements'; EXTENDS : 'extends'; // Usecase ACTOR : 'actor'; USECASE : 'usecase'; RECTANGLE : 'rectangle'; // Ignored commands IGNORED : WS? ('hide' | 'show ' | 'newpage' | 'page' | 'skinparam' | '!' | 'set' | 'caption') ~[\r\n{]* ('{' ~[}]* '}')? '\n' | WS? 'left to right direction' WS? '\n' | WS? 'top to bottom direction' WS? '\n' ; // Separators LPAREN : '('; RPAREN : ')'; LBRACE : '{'; RBRACE : '}'; GT : '>'; LT : '<'; DOT : '.'; MIN : '-'; PLUS : '+'; STAR : '*'; HASH : '#'; QUOTE : '\''; DQUOTE : '"'; DOTS : ':'; COMMA : ','; BAR : '|'; TILDE : '~'; // Identifier ID : Letter+; fragment Letter : ~[\'"{}()<>.,\-:\r\n \t#+] | [0-9] ; // Spaces WS : (' ' | '\t')+; NL : ('\r'? '\n')+;
src_patch.asm
Prof9/MMZX-Slot2-Patch
10
101314
<filename>src_patch.asm<gh_stars>1-10 .erroronwarning on .if readascii("temp/header.bin", 12, 4) == "ARZJ" .include "symbols_jp.asm" .elseif readascii("temp/header.bin", 12, 4) == "ARZE" .include "symbols_us.asm" .elseif readascii("temp/header.bin", 12, 4) == "ARZP" .include "symbols_eu.asm" .endif .include "arm9.asm" .include "gbafile.asm"
Library/Pref/ConfigUI/configui.asm
steakknife/pcgeos
504
94713
<filename>Library/Pref/ConfigUI/configui.asm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Designs in Light 2002 -- All Rights Reserved FILE: configui.asm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;------------------------------------------------------------------------------ ; Common GEODE stuff ;------------------------------------------------------------------------------ include geos.def include heap.def include geode.def include resource.def include ec.def include library.def include system.def include object.def include graphics.def include gstring.def include win.def include char.def include initfile.def include Internal/specUI.def ;----------------------------------------------------------------------------- ; Libraries used ;----------------------------------------------------------------------------- UseLib ui.def UseLib config.def UseLib Objects/vTextC.def UseLib Objects/colorC.def ;----------------------------------------------------------------------------- ; DEF FILES ;----------------------------------------------------------------------------- include configui.def include configui.rdef ;----------------------------------------------------------------------------- ; VARIABLES ;----------------------------------------------------------------------------- idata segment idata ends ;----------------------------------------------------------------------------- ; CODE ;----------------------------------------------------------------------------- include configuiProgList.asm include configuiFileAssoc.asm include prefMinuteValue.asm ConfigUICode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIGetPrefUITree %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the root of the UI tree for "Preferences" CALLED BY: PrefMgr PASS: none RETURN: dx:ax - OD of root of tree DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIGetPrefUITree proc far mov dx, handle ConfigUIRoot mov ax, offset ConfigUIRoot ret ConfigUIGetPrefUITree endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIGetModuleInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fill in the PrefModuleInfo buffer so that PrefMgr can decide whether to show this button CALLED BY: PrefMgr PASS: ds:si - PrefModuleInfo structure to be filled in RETURN: ds:si - buffer filled in DESTROYED: ax,bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECSnd/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 10/26/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIGetModuleInfo proc far .enter clr ax mov ds:[si].PMI_requiredFeatures, mask PMF_SYSTEM mov ds:[si].PMI_prohibitedFeatures, ax mov ds:[si].PMI_minLevel, 1 mov ds:[si].PMI_maxLevel, UIInterfaceLevel-1 mov ds:[si].PMI_monikerList.handle, handle ConfigUIMonikerList mov ds:[si].PMI_monikerList.offset, offset ConfigUIMonikerList mov {word} ds:[si].PMI_monikerToken, 'P' or ('F' shl 8) mov {word} ds:[si].PMI_monikerToken+2, 'T' or ('w' shl 8) mov {word} ds:[si].PMI_monikerToken+4, MANUFACTURER_ID_APP_LOCAL .leave ret ConfigUIGetModuleInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIDialogInitiate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The dialog has opened, do some setup CALLED BY: MSG_GEN_INTERACTION_INITIATE PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIDialogInitiate method dynamic ConfigUIDialogClass, MSG_GEN_INTERACTION_INITIATE .enter ; ; Check what ui we're using, and configure the UI for it. ; call DisableSpecificUIItems ; ; if on 16 color, disable the 256 color selector ; push ax, si call UserGetDisplayType and ah, mask DT_DISP_CLASS cmp ah, DC_COLOR_4 shl (offset DT_DISP_CLASS) ja not16color mov si, offset ColorList mov ax, ATTR_GEN_CONTROL_PROHIBIT_UI call ObjVarFindData mov {word}ds:[bx], not (mask CSF_INDEX) ;16 color only not16color: pop ax, si ; ; Do the normal superclass stuff, including loading our ; initial state from the .INI file. ; mov di, offset ConfigUIDialogClass call ObjCallSuperNoLock ; ; Manually load the not usable stuff from the .INI file -- ; it doesn't happen automatically since it is not usable. ; mov si, offset ExpressSettings call loadOptions mov si, offset InterfaceSettings call loadOptions mov si, offset AdvancedSettings call loadOptions mov si, offset DriveSettings call loadOptions mov si, offset AppearanceSettings call loadOptions mov si, offset AppSettings call loadOptions ; ; set up the font area ; mov si, offset FontSizeArea mov ax, MSG_GEN_ITEM_GROUP_SEND_STATUS_MSG call ObjCallInstanceNoLock ; ; set up the file association / icon stuff ; mov si, offset ChangeTokenList mov ax, MSG_ITL_INIT_LIST call ObjCallInstanceNoLock ; ; indicate no changes between sections ; mov si, offset SectionList mov ax, MSG_GEN_RESET call ObjCallInstanceNoLock .leave ret loadOptions: mov ax, MSG_META_LOAD_OPTIONS call ObjCallInstanceNoLock retn ConfigUIDialogInitiate endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RunningISUI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if we're running ISUI or not CALLED BY: PrefMgr PASS: ds - seg addr of ConfigUIUI RETURN: z flag - set (jz) if running ISUI DESTROYED: es %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RunningISUI proc near uses ax, bx, cx, dx, bp, di, si, ds, es spuiBuf local FileLongName .enter ; ; See which UI we're running ; push bp segmov ds, cs, cx mov si, offset uiCategory mov dx, offset specificKey segmov es, ss lea di, ss:spuiBuf mov bp, InitFileReadFlags <IFCC_INTACT, 0, 0, (size spuiBuf)> call InitFileReadString pop bp clr cx ;cx <- NULL-terminated mov bx, handle ISUIName call MemLock mov ds, ax mov si, offset ISUIName mov si, ds:[si] ;ds:si <- ISUI name call LocalCmpStrings call MemUnlock je yesISUI ;check long filename push ds segmov ds, cs mov si, offset ISUIGeode ;check DOS filename call LocalCmpStringsNoCase pop ds yesISUI: .leave ret RunningISUI endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DisableSpecificUIItems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Disable UI not applicable to the current specific UI CALLED BY: PrefMgr PASS: ds - object block RETURN: ds - fixed up DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ specificKey char "specific",0 ISUIDisableList lptr \ EOGotoGeoManager, EORunningApps, EOExitToDOS, EOWorldApps, EOWorldSubdirs, EOControlPanel, EOUtilities, ESORunningApps, ESOWorldAppsSubmenu, ESOOtherSubmenu, AOLConfirmShutdown, UIO1WinMenu, ScrollbarSizeGroup, UIO3Blinky, EODocumentsList motifDisableList lptr \ EO2SmallIcons, UIO3AutohideTaskbar, UIO3RightClickHelp EC < LocalDefNLString ISUIGeode <"isuiec.geo", 0> NEC < LocalDefNLString ISUIGeode <"isui.geo", 0> DisableSpecificUIItems proc near uses es isISUI local byte .enter pusha mov ss:isISUI, FALSE mov cx, length motifDisableList mov bx, offset motifDisableList call RunningISUI jnz notISUI mov ss:isISUI, TRUE mov cx, length ISUIDisableList mov bx, offset ISUIDisableList notISUI: ; ; Disable the items ; push bp clr di disableLoop: push cx mov si, cs:[bx][di] mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_DELAYED_VIA_APP_QUEUE call ObjCallInstanceNoLock pop cx add di, (size lptr) loop disableLoop pop bp done:: ; ; set the ini category for objects that need to store settings ; in different sections for different SpUIs ; mov ax, MSG_PREF_SET_INIT_FILE_CATEGORY mov cx, cs mov dx, offset uiFeaturesCat mov si, offset UIOptionsLists call ObjCallInstanceNoLock mov si, offset ExpressOptions call ObjCallInstanceNoLock mov si, offset AppOptions1 call ObjCallInstanceNoLock popa .leave ret DisableSpecificUIItems endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ISUIDialogApply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Apply has been pressed CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIDialogApply method dynamic ConfigUIDialogClass, MSG_GEN_APPLY uses si .enter ; ; See if the UI has changed ; mov ax, MSG_GEN_ITEM_GROUP_IS_MODIFIED mov si, offset UIList call ObjCallInstanceNoLock jnc checkReset2 ;branch if no mod. ; ; set the various options for the UI combo ; mov si, offset UIList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock jc noUISelected call SetUIOptions noUISelected: jmp doReset ; ; See if the file manager options have changed, and force a ; reboot if so ; checkReset2: mov ax, MSG_GEN_BOOLEAN_GROUP_GET_MODIFIED_BOOLEANS mov si, offset FileMgrOptions call ObjCallInstanceNoLock tst ax ;any changes? jz noReset ;branch if mod. ; ; If so, force the state files to be deleted when we restart so ; that the correct launcher will be launched. ; doReset: push ds segmov ds, cs, cx mov si, offset uiCategory ;ds:si <- category mov dx, offset forceResetKey ;cx:dx <- key mov ax, TRUE ;ax <- set to TRUE call InitFileWriteBoolean pop ds noReset: ; ; Manually apply to each section. It doesn't happen automatically ; since some of them are not usable. ; mov si, offset AppSettings call saveOptions mov si, offset ExpressSettings call saveOptions mov si, offset InterfaceSettings call saveOptions mov si, offset AdvancedSettings call saveOptions mov si, offset DriveSettings call saveOptions mov si, offset AppearanceSettings call saveOptions ; ; Handle keyboard accelerator mode -- it has two flags, one ; to turn it on/off, and another to show/hide the accelerators ; mov si, offset UIOptions1 mov ax, MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS call ObjCallInstanceNoLock xornf ax, mask UIWO_KBD_NAVIGATION shl 8 andnf ax, mask UIWO_KBD_NAVIGATION shl 8 push ds segmov ds, cs, cx mov si, offset uiCategory mov dx, offset kbdAccModeKey call InitFileWriteBoolean pop ds ; ; Handle automatically reset after crash -- it has two flags, ; one to bypass the 'bad shutdown' message, and one to reset. ; mov si, offset AdvancedOptionsList mov ax, MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS call ObjCallInstanceNoLock andnf ax, mask CUIA_AUTO_RESET push ds segmov ds, cs, cx mov si, offset uiCategory mov dx, offset resetKey call InitFileWriteBoolean pop ds ; ; Do the superclass thing last ; .leave mov di, offset ConfigUIDialogClass mov ax, MSG_GEN_APPLY GOTO ObjCallSuperNoLock saveOptions: mov ax, MSG_GEN_APPLY call ObjCallInstanceNoLock retn ConfigUIDialogApply endm uiCategory char "ui",0 kbdAccModeKey char "kbdAcceleratorMode",0 resetKey char "deleteStateFilesAfterCrash",0 forceResetKey char "forceDeleteStateFilesOnceOnly",0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIDialogPostApply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle an apply for the dialog box CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogPostApply method dynamic ConfigUIDialogClass, MSG_GEN_POST_APPLY ; ; Write out any of the colors that have changed ; push ds mov si, offset motifOptsCategory ;ds:si <- category mov cx, length colorKeys ;cx <- # entries clr di ;di <- offset colorLoop: segmov ds, idata, ax ;ds <- idata cmp ds:titleBarColor[di], C_UNUSED_0 je notChanged ; ; Get the color from the .INI file or the default, and see ; if the user value has actually changed anything. ; call GetINIColor cmp ds:titleBarColor[di], al ;unchanged? je notChanged ;branch if not changed ; ; The value has changed -- write it out to the .INI file ; clr ax mov al, ds:titleBarColor[di] ;ax <- Color push cx, di segmov ds, cs, cx ;ds:si <- category mov cx, cs shl di, 1 mov dx, cs:colorKeys[di] ;cx:dx <- key mov bp, ax ;bp <- value call InitFileWriteInteger pop cx, di notChanged: inc di loop colorLoop ;loop while more pop ds ; ; Call our superclass last ; mov ax, MSG_GEN_POST_APPLY mov si, offset ConfigUIRoot mov di, offset ConfigUIDialogClass GOTO ObjCallSuperNoLock PrefUICDialogPostApply endm colorKeys nptr \ titleBarKey, titleBar2Key, darkColorKey, lightColorKey, fileMgrKey, helpbgKey, selectKey CheckHack <length colorKeys eq ConfigUIColor> defaultMotifColors Color \ C_DARK_GRAY, ;title bar C_DARK_GRAY, ;title bar gradient C_DARK_GRAY, ;dark color C_LIGHT_GRAY, ;light color C_WHITE, ;file folder C_WHITE, ;help BG color C_DARK_GRAY ;selection CheckHack <length defaultMotifColors eq ConfigUIColor> motifOptsCategory char "motif options",0 titleBarKey char "activeTitleBarColor",0 titleBar2Key char "titleBarGradient", 0 darkColorKey char "darkColor",0 lightColorKey char "lightColor",0 fileMgrKey char "fileMgrColor",0 helpbgKey char "helpbgColor", 0 selectKey char "selectColor", 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICDialogAreaChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Update the color list to reflect the selected area CALLED BY: PrefMgr PASS: cx - current selection (PrefUIColor) RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogAreaChanged method dynamic ConfigUIDialogClass, MSG_CUID_AREA_CHANGED .enter mov di, cx ;di <- selection call GetCurrentColor ;al <- current color call UpdateColor .leave ret PrefUICDialogAreaChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICDialogSPUIChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Update the sample to reflect the SPUI CALLED BY: PrefMgr PASS: cx - current selection (PrefUICombo) RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogSPUIChanged method dynamic ConfigUIDialogClass, MSG_CUID_SPUI_CHANGED .enter ; ; redraw the sample ; mov ax, MSG_VIS_REDRAW_ENTIRE_OBJECT mov si, offset ColorSample call ObjCallInstanceNoLock ; ; update the sample font ; call UpdateSampleFont .leave ret PrefUICDialogSPUIChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICSetDefaultColor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Reset the colors to the defaults CALLED BY: PrefMgr PASS: cx - PrefUIDefaultColorScheme RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ defaultColorLists nptr \ defaultMotifColors, defaultISUIColors, defaultCyanColors, defaultEarthColors, defaultMerlotColors, defaultCorporateColors, defaultForestColors, defaultSedonaColors, defaultStainlessColors, defaultContrastColors, defaultOceanColors, defaultBlueSkyColors, defaultEmeraldColors, defaultTealColors, defSwimmingPoolColors, defGreySkyColors, defCuppaJoeColors, defGreyAndRedColors, defGreyAndGreenColors CheckHack <length defaultColorLists eq ConfigUIDefaultColorScheme> defaultISUIColors Color \ C_BLUE, ;title bar C_BLUE, ;title bar gradient C_DARK_GRAY, ;dark color C_LIGHT_GRAY, ;light color C_WHITE, ;file folder C_LIGHT_GRAY, ;help BG color C_BLUE ;selection defaultCyanColors Color \ C_BLACK, ;title bar C_BLACK, ;title bar gradient C_BLACK, ;dark color C_CYAN, ;light color C_WHITE, ;file folder C_WHITE, ;help BG color C_DARK_GRAY ;selection defaultEarthColors Color \ C_R2_G3_B2, ;title bar C_R2_G3_B2, ;title bar gradient C_DARK_GRAY, ;dark color C_LIGHT_GRAY, ;light color C_R2_G3_B3, ;file folder C_R5_G5_B4, ;help BG color C_DARK_GRAY ;selection defaultMerlotColors Color \ 113, ;title bar 194, ;title bar gradient 114, ;dark color 163, ;light color 162, ;file folder 248, ;help BG color 114 ;selection defaultCorporateColors Color \ 43, ;title bar 41, ;title bar gradient 8, ;dark color 27, ;light color 15, ;file folder 253, ;help BG color 43 ;selection defaultForestColors Color \ 46, ;title bar 95, ;title bar gradient 47, ;dark color 132, ;light color 30, ;file folder 254, ;help BG color 47 ;selection defaultSedonaColors Color \ 191, ;title bar 112, ;title bar gradient 154, ;dark color 247, ;light color 240, ;file folder 254, ;help BG color 154 ;selection defaultStainlessColors Color \ 24, ;title bar 20, ;title bar gradient 19, ;dark color 27, ;light color 7, ;file folder 25, ;help BG color 20 ;selection defaultContrastColors Color \ 0, ;title bar 0, ;title bar gradient 0, ;dark color 30, ;light color 15, ;file folder 15, ;help BG color 0 ;selection defaultOceanColors Color \ 48, ;title bar 41, ;title bar gradient 46, ;dark color 140, ;light color 183, ;file folder 146, ;help BG color 78 ;selection defaultBlueSkyColors Color \ 9, ;title bar 11, ;title bar gradient 8, ;dark color 69, ;light color 177, ;file folder 146, ;help BG color 87 ;selection defaultEmeraldColors Color \ 0, ;title bar 2, ;title bar gradient 8, ;dark color 60, ;light color 133, ;file folder 254, ;help BG color 24 ;selection defaultTealColors Color \ 3, ;title bar 10, ;title bar gradient 8, ;dark color 61, ;light color 133, ;file folder 254, ;help BG color 25 ;selection defSwimmingPoolColors Color \ 0, ;title bar 99, ;title bar gradient 8, ;dark color 62, ;light color 134, ;file folder 254, ;help BG color 51 ;selection defGreySkyColors Color \ 48, ;title bar 15, ;title bar gradient 19, ;dark color 28, ;light color 27, ;file folder 7, ;help BG color 99 ;selection defCuppaJoeColors Color \ 160, ;title bar 211, ;title bar gradient 24, ;dark color 211, ;light color 203, ;file folder 254, ;help BG color 155 ;selection defGreyAndRedColors Color \ 185, ;title bar 7, ;title bar gradient 24, ;dark color 27, ;light color 205, ;file folder 254, ;help BG color 192 ;selection defGreyAndGreenColors Color \ 67, ;title bar 8, ;title bar gradient 8, ;dark color 25, ;light color 27, ;file folder 254, ;help BG color 60 ;selection PrefUICSetDefaultColor method dynamic ConfigUIDialogClass, MSG_CUID_SET_DEFAULT_COLORS cmp cx, GIGS_NONE je done ; ; Get the default list to use ; mov di, cx shl di mov bx, cs:defaultColorLists[di] ; ; Set the variables to the defaults ; clr di mov cx, ConfigUIColor colorLoop: mov al, cs:[bx][di] mov es:titleBarColor[di], al inc di loop colorLoop ; ; Update the UI ; push si mov si, offset AreaList clr cx, dx ;cx <- 1st, dx <- det. mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION call ObjCallInstanceNoLock pop si clr cx ;cx <- 1st list mov ax, MSG_CUID_AREA_CHANGED call ObjCallInstanceNoLock done: ret PrefUICSetDefaultColor endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICDialogInit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the dialog CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogInit method dynamic ConfigUIDialogClass, MSG_PREF_INIT uses ax, si .enter ; ; See if the is B&W -- if so, we'll remove the Color section ; call UserGetDisplayType and ah, mask DT_DISP_CLASS cmp ah, DC_GRAY_1 shl (offset DT_DISP_CLASS) ja notBW ;branch if not B&W ; ; Set the Color stuff not usable ; mov si, offset ColorGroup mov ax, MSG_GEN_SET_NOT_USABLE mov dl, VUM_NOW call ObjCallInstanceNoLock notBW: ; ; see if a large screen -- if not, disable 18 point ; mov cx, GUQT_FIELD mov ax, MSG_GEN_GUP_QUERY call UserCallApplication mov di, bp call WinGetWinScreenBounds sub dx, bx inc dx cmp dx, 600 jae sizeOK mov si, offset FSL18 mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_DELAYED_VIA_APP_QUEUE call ObjCallInstanceNoLock sizeOK: .leave mov ax, MSG_PREF_INIT mov di, offset ConfigUIDialogClass GOTO ObjCallSuperNoLock PrefUICDialogInit endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetUIOptions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the options for our CUI combo CALLED BY: PrefUICDialogApply PASS: ax - PrefUICombo RETURN: none DESTROYED: ax, dx %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ UICombo struct UIC_specific nptr.TCHAR UIC_launcher nptr.TCHAR UIC_font FontID UICombo ends uicombos UICombo < offset MotifStr, offset GeoManagerStr, offset BerkeleyStr >,< offset ISUIStr, offset ISDeskStr, offset EsquireStr > defaultLauncherKey char "defaultLauncher", 0 uiFeaturesCat char "uiFeatures", 0 fontIDKey char "fontid", 0 systemCat char "system", 0 editableTextFontIDKey char "editableTextFontID", 0 if ERROR_CHECK LocalDefNLString MotifStr <"motifec.geo", 0> LocalDefNLString ISUIStr <"isuiec.geo", 0> LocalDefNLString GeoManagerStr <"EC GeoManager", 0> LocalDefNLString ISDeskStr <"EC ISDesk", 0> else LocalDefNLString MotifStr <"motif.geo", 0> LocalDefNLString ISUIStr <"isui.geo", 0> LocalDefNLString GeoManagerStr <"GeoManager", 0> LocalDefNLString ISDeskStr <"ISDesk", 0> endif LocalDefNLString BerkeleyStr <"Berkeley", 0> LocalDefNLString EsquireStr <"Esquire", 0> SetUIOptions proc near uses ds, si, es .enter ; ; get the table entry ; mov di, (size UICombo) mul di mov di, ax ;di <- offset segmov ds, cs, cx mov es, cx ; ; handle [ui] specific = key ; push di mov si, offset uiCategory mov dx, offset specificKey mov di, cs:uicombos[di].UIC_specific call InitFileWriteString pop di ; ; handle [uiFeatures] defaultLauncher = key ; push di mov si, offset uiFeaturesCat mov dx, offset defaultLauncherKey mov di, cs:uicombos[di].UIC_launcher call InitFileWriteString pop di ; ; handle [ui] fontid = key and [system] fontid = key ; push di mov si, offset uiCategory mov dx, offset fontIDKey mov di, cs:uicombos[di].UIC_font call InitFileWriteString mov dx, offset editableTextFontIDKey call InitFileWriteString mov si, offset systemCat call InitFileWriteString pop di .leave ret SetUIOptions endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetINIColor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the color value set in the .INI file or the default CALLED BY: PrefMgr PASS: di - PrefUIColor for which color to get RETURN: al - Color DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetINIColor proc near uses ds, si, di, dx, cx .enter ; ; Get the current setting, using the default if necessary ; mov al, cs:defaultMotifColors[di] ;ax <- default color shl di, 1 ;di <- table index segmov ds, cs, cx mov dx, cs:colorKeys[di] ;cx:dx <- key mov si, offset motifOptsCategory ;ds:si <- category call InitFileReadInteger .leave ret GetINIColor endp GetCurrentColor proc near uses ds .enter ; ; See if the user has set anything already ; segmov ds, idata, ax clr ax mov al, ds:titleBarColor[di] ;al <- Color cmp al, C_UNUSED_0 ;color set? jne gotColor ;branch if color set ; ; If not, get the .INI value or default ; call GetINIColor ;al <- Color gotColor: clr ah CheckHack <CF_INDEX eq 0> .leave ret GetCurrentColor endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICColorSelectorStateChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return whether the color list has changed CALLED BY: PrefMgr PASS: none RETURN: carry - set if the state has changed DESTROYED: di, ax %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUICColorSelectorStateChanged method dynamic ConfigUICColorSelectorClass, MSG_PREF_HAS_STATE_CHANGED uses cx .enter segmov ds, idata, ax clr di ;di <- PrefUIColor mov cx, ConfigUIColor colorLoop: call GetINIColor cmp ds:titleBarColor[di], C_UNUSED_0 je colorNotChanged ;branch if not changed cmp ds:titleBarColor[di], al jne colorChanged ;exit if changed colorNotChanged: inc di loop colorLoop ;loop while more clc ;carry <- no change jmp done colorChanged: stc ;carry <- state changed done: .leave ret ConfigUICColorSelectorStateChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICColorSelectorReset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a reset CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUICColorSelectorReset method dynamic ConfigUICColorSelectorClass, MSG_GEN_RESET ; ; Reset the user colors to indicate no change ; push ax, ds clr di mov cx, ConfigUIColor segmov ds, idata, ax mov al, C_UNUSED_0 colorLoop: mov ds:titleBarColor[di], al inc di loop colorLoop pop ax, ds ; ; Call our superclass to do the work ; mov di, offset ConfigUICColorSelectorClass call ObjCallSuperNoLock ; ; Reset our color to match what it should be ; call GetSelectedArea jc noneSelected mov di, cx ;di <- ConfigUIColor call GetINIColor call UpdateColor noneSelected: ret ConfigUICColorSelectorReset endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICColorChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make a note of the color list being changed CALLED BY: PrefMgr PASS: dxcx - ColorQuad (dx = high, cx = low) bp - non-zero if indeterminate RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUICColorChanged method dynamic ConfigUICColorSelectorClass, MSG_COLOR_SELECTOR_SET_COLOR ; ; Call our superclass first to update the UI ; mov di, offset ConfigUICColorSelectorClass call ObjCallSuperNoLock ; ; See if it is something we can't handle ; tst bp ;indeterminate? jnz resetScheme ;branch if so cmp ch, CF_INDEX ;indexed color? jne resetScheme ;branch if not ; ; See which area is selected ; call GetSelectedArea jc done ;branch if none ; ; Save the new color for that area ; push ds mov di, ax ;di <- ConfigUIColor segmov ds, idata, ax mov ds:titleBarColor[di], cl ;save color pop ds ; ; Update the sample ; push cx mov si, offset ColorSample mov ax, MSG_VIS_REDRAW_ENTIRE_OBJECT call ObjCallInstanceNoLock ; ; See if the color has really changed ; mov si, offset SchemesList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock pop cx jc done ;branch if no scheme mov di, ax ;di <- scheme shl di, 1 mov di, cs:defaultColorLists[di] ;cs:di <- ptr to colors call GetSelectedArea jc done ;branch if none add di, ax ;adjust offset cmp cl, {Color}cs:[di] jne resetScheme ;branch if changed done: ret ; ; Deselect the scheme list if not the default ; resetScheme: mov si, offset SchemesList mov ax, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED mov dx, 1 ;dx <- indeterminate call ObjCallInstanceNoLock jmp done ConfigUICColorChanged endm GetSelectedArea proc near uses cx, si, bp .enter mov si, offset AreaList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock .leave ret GetSelectedArea endp UpdateColor proc near uses si .enter CheckHack <CF_INDEX eq 0> clr ah ;ax <- Color mov cx, ax clr dx, bp ;dx:cx <- ColorQuad mov bx, handle ColorList mov si, offset ColorList mov ax, MSG_COLOR_SELECTOR_UPDATE_COLOR call ObjCallInstanceNoLock .leave ret UpdateColor endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefColorsSampleDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw the color sample CALLED BY: MSG_VIS_DRAW PASS: bp - GState RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TITLE_BAR_POINTSIZE equ 10 TITLE_BAR_INSET equ 2 TITLE_BAR_HEIGHT equ 16 TITLE_BAR_TEXT_Y_OFFSET equ TITLE_BAR_INSET+2 TITLE_BAR_RIGHT_INSET equ 0 BUTTON_WIDTH equ 10 BUTTON_HEIGHT equ 10 BUTTON_INSET equ 3 WINDOW_TOP equ TITLE_BAR_HEIGHT+TITLE_BAR_INSET+2 WINDOW_INSET equ 3 HELP_TOP equ 12 HELP_WIDTH equ 50 HELP_RIGHT equ BUTTON_WIDTH+BUTTON_INSET+5 SELECTION_INSET equ WINDOW_INSET+5 SELECTION_HEIGHT equ TITLE_BAR_HEIGHT SELECTION_ADDED_WIDTH equ 6 CurAndStep struct CAS_cur WBFixed CAS_step WBFixed CurAndStep ends PrefColorsSampleDraw method dynamic PrefColorsSampleClass, MSG_VIS_DRAW bounds local Rectangle red local CurAndStep green local CurAndStep blue local CurAndStep curX local word ForceRef red ForceRef green ForceRef blue ForceRef curX mov di, bp .enter call GrSaveState call VisGetBounds mov ss:bounds.R_left, ax mov ss:bounds.R_top, bx mov ss:bounds.R_right, cx mov ss:bounds.R_bottom, dx ; ; Fill with the light color to start ; mov si, CUIC_LIGHT_ITEMS call getColor call GrSetAreaColor call getBounds call GrFillRect ; ; Draw the title bar ; mov si, CUIC_TITLE_BARS call getColor call GrSetAreaColor mov_tr dh, al ;dh <- title bar 1 mov si, CUIC_TITLE_BAR_GRADIENT call getColor ;al <- title bar 2 cmp al, dh ;same color? LONG jne drawGradientTitle ;branch if diff. colors call getBounds add ax, TITLE_BAR_INSET add bx, TITLE_BAR_INSET sub cx, TITLE_BAR_RIGHT_INSET mov dx, bx add dx, TITLE_BAR_HEIGHT call GrFillRect finishTitleBar: mov ax, C_WHITE call GrSetTextColor call GetSPUIFont ;cx <- FontID mov dx, TITLE_BAR_POINTSIZE ;dx.ah <- pointsize clr ah call GrSetFont mov si, offset SampleText mov si, ds:[si] clr cx call GrTextWidth push dx call getBounds pop dx ; ; if running ISUI, put the text on the left else center it ; add ax, TITLE_BAR_INSET*2 call ISUISelected jz notCentered sub cx, ax ;cx <- width sub cx, BUTTON_WIDTH sub cx, dx ;cx <- diff. shr cx, 1 ;cx <- center me add ax, cx notCentered: add bx, TITLE_BAR_TEXT_Y_OFFSET ; ; if running ISUI, put the title bar text in bold ; call ISUISelected jnz noBold push ax mov ax, mask TS_BOLD ;al <- set bold call GrSetTextStyle pop ax noBold: call GrDrawText push ax mov ax, (mask TS_BOLD) shl 8 ;ah <- reset bold call GrSetTextStyle pop ax ; ; Draw a partial bevel, and a button, too. ; mov ax, C_WHITE call GrSetLineColor call getBounds call GrDrawHLine call GrDrawVLine ;draw white bevel mov ax, C_LIGHT_GRAY call GrSetAreaColor call getBounds sub cx, BUTTON_INSET mov ax, cx sub ax, BUTTON_WIDTH add bx, BUTTON_INSET mov dx, bx add dx, BUTTON_HEIGHT call GrFillRect ;draw button background call GrDrawHLine call GrDrawVLine ;draw white button push ax mov si, CUIC_DARK_ITEMS call getColor call GrSetLineColor pop ax xchg ax, cx call GrDrawVLine xchg ax, cx mov bx, dx call GrDrawHLine ;draw dark button call getBounds mov ax, cx call GrDrawVLine ;draw dark bevel ; ; Draw a window view ; mov si, CUIC_FILE_MGR call getColor call GrSetAreaColor call getBounds add bx, WINDOW_TOP add ax, WINDOW_INSET sub cx, WINDOW_INSET call GrFillRect ; ; draw a mini help window ; mov si, CUIC_LIGHT_ITEMS call getColor call GrSetLineColor mov si, CUIC_HELP_BG call getColor call GrSetAreaColor call getBounds sub cx, HELP_RIGHT mov ax, cx sub ax, HELP_WIDTH add bx, HELP_TOP call GrFillRect call GrDrawRect ; ; draw a selection sample ; mov si, CUIC_SELECTIONS call getColor call GrSetAreaColor call getBounds clr cx ;cx <- NULL terminated mov si, offset SelectionSampleText mov si, ds:[si] ;ds:si <- text call GrTextWidth add dx, SELECTION_ADDED_WIDTH mov cx, dx ;cx <- width add bx, WINDOW_TOP+4 mov dx, bx add dx, SELECTION_HEIGHT ;dx <- bottom add ax, SELECTION_INSET ;ax <- left add cx, ax ;cx <- right call GrFillRect add ax, SELECTION_ADDED_WIDTH/2 add bx, 2 clr cx call GrDrawText call GrRestoreState .leave ret getColor: push di mov di, si ;di <- ConfigUIColor call GetCurrentColor pop di retn getBounds: mov ax, ss:bounds.R_left mov bx, ss:bounds.R_top mov cx, ss:bounds.R_right mov dx, ss:bounds.R_bottom retn drawGradientTitle: xchg al, dh call DrawGradient jmp finishTitleBar PrefColorsSampleDraw endm ISUISelected proc near uses ax, cx, dx, bp, si .enter mov si, offset UIList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock cmp ax, CUIC_ISUI .leave ret ISUISelected endp GetSPUIFont proc near mov cx, FID_BERKELEY call ISUISelected jnz gotFont mov cx, 555 gotFont: ret GetSPUIFont endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawGradient %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw a gradient filled rectangle CALLED BY: PrefColorsSampleDraw PASS: ss:bp - inherited locals di - GState al - start color dh - end color RETURN: none none DESTROYED: ax, bx, cx, dx, si %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawGradient proc near .enter inherit PrefColorsSampleDraw mov ah, al ;ah <- start index call GrMapColorIndex push ax push bx mov ah, dh ;ah <- end index call GrMapColorIndex pop cx ;cl <- stG, ch <- stB pop dx ; ; start color: dl=R, cl=G, ch=B ; end color: al=R, bl=G, bh=B ; mov dh, al ;dh <- end R lea si, ss:red call CalcStep mov dl, cl ;dl <- start G mov dh, bl ;dh <- end G lea si, ss:green call CalcStep mov dl, ch ;dl <- start B mov dh, bh ;dh <- end B lea si, ss:blue call CalcStep ; ; set up the starting X pos ; mov ax, ss:bounds.R_left add ax, TITLE_BAR_INSET mov ss:curX, ax drawLoop: mov al, ss:red.CAS_cur.WBF_int.low mov bl, ss:green.CAS_cur.WBF_int.low mov bh, ss:blue.CAS_cur.WBF_int.low mov ah, CF_RGB call GrSetAreaColor mov ax, ss:curX mov cx, ax add cx, 2 mov bx, ss:bounds.R_top mov dx, ss:bounds.R_bottom add bx, TITLE_BAR_INSET mov dx, bx add dx, TITLE_BAR_HEIGHT call GrFillRect ; ; advance to next color and position ; inc ss:curX addwbf ss:red.CAS_cur, ss:red.CAS_step, ax addwbf ss:green.CAS_cur, ss:green.CAS_step, ax addwbf ss:blue.CAS_cur, ss:blue.CAS_step, ax ; ; reached right edge? ; mov cx, ss:bounds.R_right sub cx, TITLE_BAR_RIGHT_INSET cmp ss:curX, cx jbe drawLoop .leave ret DrawGradient endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CalcStep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw a gradient filled rectangle CALLED BY: DrawGradient PASS: ss:bp - inherited locals dl - start color value (R,G or B) dh - end color value (R, G, or B) RETURN: none none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CalcStep proc near uses ax, bx, cx, dx .enter inherit DrawGradient clr bx, ax mov ss:[si].CAS_cur.WBF_frac, al mov ss:[si].CAS_cur.WBF_int, ax mov ss:[si].CAS_cur.WBF_int.low, dl ;store start color mov al, dh ;al <- end color clr ah ;ax <- end color clr dh ;dx <- start color sub ax, dx ;ax <- color 'width' jz zeroStep ;branch if no step mov_tr dx, ax clr ax, cx ;dx.cx <- color width mov bx, ss:bounds.R_right sub bx, ss:bounds.R_left ;bx.ax <- rect. width call GrSDivWWFixed jnc gotValue zeroStep: clr dx, cx gotValue: rndwwbf dxcx ;round to dx.ch mov ss:[si].CAS_step.WBF_frac, ch mov ss:[si].CAS_step.WBF_int, dx .leave ret CalcStep endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefColorsSampleRecalcSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Resize the color sample CALLED BY: MSG_VIS_RECALC_SIZE PASS: none RETURN: cx - width dx - height DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefColorsSampleRecalcSize method dynamic PrefColorsSampleClass, MSG_VIS_RECALC_SIZE mov cx, PREF_COLORS_SAMPLE_WIDTH mov dx, PREF_COLORS_SAMPLE_HEIGHT ret PrefColorsSampleRecalcSize endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIDialogFontAreaChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The font area has been changed CALLED BY: MSG_CUIFA_FONT_AREA_CHANGED PASS: none RETURN: cx - ConfigUIFontArea DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FontArea struct FA_category nptr.char FA_key nptr.char FA_default word FA_font FontID FontArea ends editableTextKey char "editableTextFontsize", 0 fontSizeKey char "fontsize", 0 fileMgrCategory char "file manager", 0 fontAreas FontArea \ <uiCategory, fontSizeKey, 10, 0>, <uiCategory, editableTextKey, 10, 0>, <fileMgrCategory, fontSizeKey, 9, FID_UNIVERSITY> ConfigUIFontAreaFontAreaChanged method dynamic ConfigUIFontAreaClass, MSG_CUIFA_FONT_AREA_CHANGED ; ; get the font size ; mov di, cx shl di, 1 push ds segmov ds, idata, ax ;ds <- idata mov ax, ds:menuFont[di] pop ds tst ax jnz gotFontSize call GetINIFontSize gotFontSize: ; ; set our size list to match ; push ax, cx mov_tr cx, ax clr dx mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION mov si, offset FontSizeList call ObjCallInstanceNoLock pop ax, cx ; ; set the font to appropriately ; call UpdateSampleFont ; ; set the pointsize of the sample to match ; call UpdateSampleSize ret ConfigUIFontAreaFontAreaChanged endm UpdateSampleFont proc near uses ax, cx, dx, bp, si .enter ; ; figure out which font to use ; mov si, offset FontSizeArea mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock mov_tr cx, ax ;cx <- ConfigUIFontArea call GetFontAreaEntry ;di <- FontArea mov cx, cs:fontAreas[di].FA_font tst cx jnz gotFont call GetSPUIFont gotFont: ; ; set the font ; mov dx, (size VisTextSetFontIDParams) sub sp, dx mov bp, sp mov ss:[bp].VTSFIDP_fontID, cx mov ax, MSG_VIS_TEXT_SET_FONT_ID mov si, offset FontSample call ObjCallInstanceNoLock add sp, (size VisTextSetFontIDParams) .leave ret UpdateSampleFont endp UpdateSampleSize proc near uses ax, cx, dx, bp, si .enter ; ; set the pointsize ; mov dx, (size VisTextSetPointSizeParams) sub sp, dx mov bp, sp mov ss:[bp].VTSPSP_pointSize.WWF_frac, 0 mov ss:[bp].VTSPSP_pointSize.WWF_int, ax mov ax, MSG_VIS_TEXT_SET_POINT_SIZE mov si, offset FontSample call ObjCallInstanceNoLock add sp, (size VisTextSetPointSizeParams) .leave ret UpdateSampleSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIFontAreaFontSizeChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The font area has been changed CALLED BY: MSG_CUIFA_FONT_SIZE_CHANGED PASS: none RETURN: cx - fontsize DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIFontAreaFontSizeChanged method dynamic ConfigUIFontAreaClass, MSG_CUIFA_FONT_SIZE_CHANGED ; ; save the font size in the appropriate slot ; mov di, ds:[si] add di, ds:[di].GenItemGroup_offset mov di, ds:[di].GIGI_selection shl di, 1 push ds segmov ds, idata, ax ;ds <- idata mov_tr ax, cx ;ax <- font size mov ds:menuFont[di], ax pop ds ; ; update the sample ; call UpdateSampleSize ret ConfigUIFontAreaFontSizeChanged endm GetFontAreaEntry proc near uses ax, cx .enter mov ax, (size FontArea) mul cx mov_tr di, ax .leave ret GetFontAreaEntry endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetINIFontSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the specified font size from the INI file CALLED BY: utility PASS: cx - ConfigUIFontArea RETURN: ax - font size DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetINIFontSize proc near uses cx, dx, ds, si .enter call GetFontAreaEntry ; ; get the value for the category and key ; push ds segmov ds, cs, cx mov si, cs:fontAreas[di].FA_category mov dx, cs:fontAreas[di].FA_key mov ax, cs:fontAreas[di].FA_default call InitFileReadInteger pop ds .leave ret GetINIFontSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIFontAreaReset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a reset CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIFontAreaReset method dynamic ConfigUIFontAreaClass, MSG_GEN_RESET ; ; call our superclass to do most of the work ; mov di, offset ConfigUIFontAreaClass call ObjCallSuperNoLock ; ; reset the font sizes ; push ds segmov ds, idata, ax clr ax mov ds:menuFont, ax mov ds:editableFont, ax mov ds:folderFont, ax pop ds mov ax, MSG_GEN_ITEM_GROUP_SEND_STATUS_MSG GOTO ObjCallInstanceNoLock ConfigUIFontAreaReset endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIFontAreaApply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle an apply CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIFontAreaApply method dynamic ConfigUIFontAreaClass, MSG_GEN_APPLY ; ; call our superclass to do most of the work ; mov di, offset ConfigUIFontAreaClass call ObjCallSuperNoLock ; ; save the font sizes ; segmov ds, idata, ax clr di call saveSize call saveSize call saveSize ret saveSize: mov cx, di push di, ds, bp shl di, 1 mov bp, ds:menuFont[di] ;bp <- font size tst bp ;any size set? jz noWrite ;branch if not call GetFontAreaEntry ;di <- FontArea entry segmov ds, cs, cx mov si, cs:fontAreas[di].FA_category mov dx, cs:fontAreas[di].FA_key call InitFileWriteInteger noWrite: pop di, ds, bp inc di retn ConfigUIFontAreaApply endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUIFontAreaGetRebootInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check if reboot needed CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUIFontAreaGetRebootInfo method dynamic ConfigUIFontAreaClass, MSG_PREF_GET_REBOOT_INFO ; ; if any changes, signal reboot ; segmov ds, idata, ax mov cx, ds:menuFont ornf cx, ds:editableFont ornf cx, ds:folderFont jcxz done ;branch if no changes mov cx, handle ConfigUIFontRebootString mov dx, offset ConfigUIFontRebootString done: ret ConfigUIFontAreaGetRebootInfo endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICInitSchemeList %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize our dynamic list CALLED BY: MSG_PREF_DYNAMIC_LIST_BUILD_ARRAY PASS: none RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUICInitSchemeList method dynamic ConfigUICSchemeListClass, MSG_PREF_DYNAMIC_LIST_BUILD_ARRAY ; ; don't include 256 color schemes if on 16 color system ; mov cx, ConfigUIDefaultColorScheme call UserGetDisplayType and ah, mask DT_DISP_CLASS cmp ah, DC_COLOR_4 shl (offset DT_DISP_CLASS) ja gotNumItems mov cx, 3 ;cx <- gotNumItems: mov ax, MSG_GEN_DYNAMIC_LIST_INITIALIZE GOTO ObjCallInstanceNoLock ConfigUICInitSchemeList endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICFindSchemeItem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find our entry in the dynamic list CALLED BY: MSG_PREF_DYNAMIC_LIST_FIND_ITEM PASS: cx:dx - ptr to NULL terminated string bp - non-zero to find best fit, else exact RETURN: if found: carry - clear ax - item # else: carry - set ax - item after requested item DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUICFindSchemeItem method dynamic ConfigUICSchemeListClass, MSG_PREF_DYNAMIC_LIST_FIND_ITEM movdw esdi, cxdx ;es:di <- match clr dx ;dx <- assume exact tst bp ;best fit? jz gotStrLen ;branch if not call LocalStringLength mov dx, cx ;dx <- length to match gotStrLen: mov bx, handle SchemeStrings call MemLock mov ds, ax mov bx, offset SLDI1 ;*ds:bx <- 1st string clr ax findLoop: push cx mov si, ds:[bx] ;ds:si <- string mov cx, dx ;cx <- length call LocalCmpStringsNoCase pop cx clc ;carry <- in case match je foundString ;branch if match add bx, (size lptr) ;*ds:bx <- next string inc ax ;ax <- next item # loop findLoop clr ax ;ax <- no match stc ;carry <- no match foundString: mov bx, handle SchemeStrings GOTO MemUnlock ConfigUICFindSchemeItem endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICGetSchemeMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the requested moniker for our scheme list CALLED BY: MSG_PREF_ITEM_GROUP_GET_ITEM_MONIKER PASS: ss:bp - GetItemMonikerParams RETURN: bp - # of characters in moniker DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ForceRef SLDI2 ForceRef SLDI3 ForceRef SLDI4 ForceRef SLDI5 ForceRef SLDI6 ForceRef SLDI7 ForceRef SLDI8 ForceRef SLDI9 ForceRef SLDI10 ForceRef SLDI11 ForceRef SLDI12 ForceRef SLDI13 ForceRef SLDI14 ForceRef SLDI15 ForceRef SLDI16 ForceRef SLDI17 ForceRef SLDI18 ForceRef SLDI19 ConfigUICGetSchemeMoniker method dynamic ConfigUICSchemeListClass, MSG_PREF_ITEM_GROUP_GET_ITEM_MONIKER mov bx, handle SchemeStrings call MemLock mov ds, ax mov si, ss:[bp].GIMP_identifier ;si <- identififer shl si, 1 ;si <- offset add si, offset SLDI1 ;si <- handle mov si, ds:[si] ;ds:si <- string ChunkSizePtr ds, si, cx ;cx <- # bytes movdw esdi, ss:[bp].GIMP_buffer ;es:di <- dest mov bp, cx DBCS < shr cx, 1 ;> LocalCopyNString GOTO MemUnlock ConfigUICGetSchemeMoniker endm if 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConfigUICSchemeListSave %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Save a color scheme CALLED BY: MSG_CUIC_SCHEME_LIST_SAVE PASS: none RETURN: none DESTROYED: none %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConfigUICSchemeListSave method dynamic ConfigUICSchemeListClass, MSG_CUIC_SCHEME_LIST_SAVE nameBuf local COLOR_SCHEME_MAX_NAME_LENGTH dup (TCHAR) .enter ; ; get the name for the scheme ; push bp mov si, offset STSADName mov dx, ss lea bp, ss:nameBuf mov ax, MSG_VIS_TEXT_GET_ALL_PTR call ObjCallInstanceNoLock pop bp jcxz noText ; ; get the schemes file ; call OpenCreateSchemesFile ; ; close the schemes file ; call CloseSchemesFile noText: .leave ret ConfigUICSchemeListSave endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OpenCreateSchemesFile, CloseSchemesFile %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open the schemes file, creating if necessary CALLED BY: ConfigUICSchemeListSave() PASS: none RETURN: carry - set if error bx - handle of schemes file *ds:si - name array DESTROYED: ax, dx %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalDefNLString schemeFileName, <"Color Schemes", 0> OpenCreateSchemesFile proc near uses bp .enter ; ; go to PRIVDATA ; call FilePushDir mov ax, SP_PRIVATE_DATA call FileSetStandardPath ; ; try to open the file ; mov ah, VMO_CREATE ;ah <- VMOpenType mov al, mask VMAF_FORCE_READ_WRITE ;al <- VMAccessFlags clr cx ;cx <- default compr. segmov ds, cs mov dx, offset schemeFileName ;ds:dx <- filename call VMOpen cmp ax, VM_CREATE_OK ;created? je initFile ;branch if so ; ; lock the map block ; call VMGetMapBlock call VMLock mov ds, ax ;ds <- seg addr of blk mov si, (size LMemBlockHeader) done: call FilePopDir .leave ret initFile: ; ; create a name array block ; push bx mov ax, LMEM_TYPE_GENERAL ;ax <- LMemType clr cx ;cx <- default header call MemAllocLMem push bx call MemLock mov ds, ax ;ds <- block mov bx, (size ColorSchemeStruct) ;bx <- element size clr ax, cx, si ;cx <- default header ;al <- ObjChunkFlags ;si <- alloc chunk call NameArrayCreate pop cx ;cx <- mem block pop bx ;bx <- VM file handle ; ; attach it to the VM file ; clr ax ;ax <- alloc VM block call VMAttach ; ; make it the map block ; call VMSetMapBlock clc ;carry <- no error jmp done OpenCreateSchemesFile endp CloseSchemesFile proc near uses bp .enter ; ; unlock the name array ; mov bp, ds:[LMBH_handle] call VMUnlock ; ; close the file ; clr al call VMClose .leave ret CloseSchemesFile endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SectionsPrefChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return whether more than one section has changed CALLED BY: PrefMgr PASS: none RETURN: carry - set if the state has changed DESTROYED: di, ax %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SectionsPrefChanged method dynamic SectionsPrefClass, MSG_PREF_HAS_STATE_CHANGED tst ds:[di].SPI_changed ;changed? jz done ;branch (carry clear) stc ;carry <- changed done: ret SectionsPrefChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SectionsPrefSectionChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The section list changed CALLED BY: PrefMgr PASS: cx - current selection (ConfigUISection) RETURN: none DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SectionsPrefSectionChanged method dynamic SectionsPrefClass, MSG_SP_SECTION_CHANGED .enter mov dx, cx ;dx <- current clr di, cx sectionLoop: ; ; has state changed? ; push cx, dx, si mov si, cs:sectionInteractions[di] mov ax, MSG_PREF_HAS_STATE_CHANGED call ObjCallInstanceNoLock pop cx, dx, si jnc noChange ; ; record change ; push di mov di, ds:[si] add di, ds:[di].SectionsPref_offset mov ds:[di].SPI_changed, TRUE pop di noChange: ; ; If the current section, set usable otherwise not usable ; mov ax, MSG_GEN_SET_NOT_USABLE cmp cx, dx jne gotMsg mov ax, MSG_GEN_SET_USABLE gotMsg: push cx, dx, si mov si, cs:sectionInteractions[di] mov dl, VUM_DELAYED_VIA_APP_QUEUE call ObjCallInstanceNoLock pop cx, dx, si add di, (size lptr) inc cx cmp cx, length sectionInteractions jb sectionLoop .leave ret SectionsPrefSectionChanged endm sectionInteractions lptr \ AppSettings, ExpressSettings, InterfaceSettings, AdvancedSettings, DriveSettings, AppearanceSettings CheckHack <length sectionInteractions eq ConfigUISection> COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SectionsPrefReset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a reset CALLED BY: MSG_GEN_RESET PASS: ds:di - SectionsPref instance RETURN: none DESTROYED: bx, cx, dx, di, bp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SectionsPrefReset method dynamic SectionsPrefClass, MSG_GEN_RESET ; ; mark as not changed ; mov ds:[di].SPI_changed, FALSE ret SectionsPrefReset endm ConfigUICode ends
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/sqrt.asm
meesokim/z88dk
0
101431
<reponame>meesokim/z88dk SECTION code_fp_math48 PUBLIC _sqrt EXTERN cm48_sdccix_sqrt defc _sqrt = cm48_sdccix_sqrt
examples/examplesPaperJFP/ExampleDrawingProgram.agda
agda/ooAgda
23
6061
<filename>examples/examplesPaperJFP/ExampleDrawingProgram.agda {-# OPTIONS --copatterns #-} module examplesPaperJFP.ExampleDrawingProgram where open import Size open import Data.Bool.Base open import Data.Char.Base open import Data.Nat.Base hiding (_⊓_; _+_; _*_) open import Data.List.Base hiding (_++_) open import Data.Integer.Base hiding (suc) open import Data.String.Base open import Data.Maybe.Base open import Agda.Builtin.Char using (primCharEquality) open import Function open import SizedIO.Base open import SizedIO.IOGraphicsLib hiding (translateIOGraphics) renaming (translateIOGraphicsLocal to translateNative) open import NativeInt --PrimTypeHelpers open import NativeIO open import examplesPaperJFP.triangleRightOperator integerLess : ℤ → ℤ → Bool integerLess x y with ∣(y - (x ⊓ y))∣ ... | zero = true ... | z = false line : Point → Point → Graphic line p newpoint = withColor red (polygon (nativePoint x y ∷ nativePoint a b ∷ nativePoint (a + xAddition) (b + yAddition) ∷ nativePoint (x + xAddition) (y + yAddition) ∷ [] ) ) where x = nativeProj1Point p y = nativeProj2Point p a = nativeProj1Point newpoint b = nativeProj2Point newpoint diffx = + ∣ (a - x) ∣ diffy = + ∣ (b - y) ∣ diffx*3 = diffx * (+ 3) diffy*3 = diffy * (+ 3) condition = (integerLess diffx diffy*3) ∧ (integerLess diffy diffx*3) xAddition = if condition then + 2 else + 1 yAddition = if condition then + 2 else + 1 State = Maybe Point mutual loop : ∀{i} → Window → State → IOGraphics i Unit force (loop w s) = exec' (getWindowEvent w) λ e → winEvtHandler w s e winEvtHandler : ∀{i} → Window → State → Event → IOGraphics i Unit winEvtHandler w s (Key c t) = if primCharEquality c 'x' then (exec (closeWindow w) return) else loop w s winEvtHandler w s (MouseMove p₂) = s ▹ λ { nothing → loop w (just p₂) ; (just p₁) → exec (drawInWindow w (line p₁ p₂)) λ _ → loop w (just p₂) } winEvtHandler w s _ = loop w s program : ∀{i} → IOGraphics i Unit program = exec (openWindow "Drawing Prog" nothing 1000 1000 nativeDrawGraphic nothing) λ win → loop win nothing translateIOGraphics : IOGraphics ∞ Unit → NativeIO Unit translateIOGraphics = translateIO translateNative main : NativeIO Unit main = nativeRunGraphics (translateIOGraphics program)
libsrc/graphics/ace/udg/zx_hardcopy.asm
jpoikela/z88dk
640
96819
; ; Copy the graphics from screen to the zx printer ; It can be used for any redefined (or not) pseudo-graphics, fonts and characters. ; ; Traps the BREAK key to avoid an unwanted C program termination, etc.. ; ; <NAME>, 2018 ; ; ; $Id: zx_hardcopy.asm $ ; SECTION code_clib PUBLIC zx_hardcopy PUBLIC _zx_hardcopy EXTERN loadudg6 .zx_hardcopy ._zx_hardcopy ld c,0 ; first UDG chr$ to load ld b,64 ; number of characters to load ;ld hl,acefont ld hl,0 add hl,sp ld (stacksave+1),hl ld hl,-512 add hl,sp ld sp,hl push hl call loadudg6 pop hl ld de,-1024 add hl,de ld (acefont+1),hl ; The full character-mapped screen is copied to the ZX-Printer. ; All twenty-four text/graphic lines are printed. ;; COPY DI L0869: LD D,24 ; prepare to copy twenty four text lines. LD HL,$2400 ; set HL to start of display file from D_FILE. ;; COPY-LOOP L087A: PUSH HL ; save first character of line pointer. (*) XOR A ; clear accumulator. LD E,A ; set pixel line count, range 0-7, to zero. ; this inner loop deals with each horizontal pixel line. ;; COPY-TIME L087D: OUT ($FB),A ; bit 2 reset starts the printer motor ; with an inactive stylus - bit 7 reset. POP HL ; pick up first character of line pointer (*) ; on inner loop. ; row_sync ;.LOOP1 ; IN A,($FB) ; GET PRINTER STATUS BYTE ; RLA ; ROTATE BIT 7 (LF BUSY) TO C FLAG ; JR NC,LOOP1 ; LOOP IF LINEFEED IS BUSY ;; COPY-BRK L0880: IN A,($FE) ; RRA ; jr nc,stop_exit ; --- ;; COPY-CONT L088A: IN A,($FB) ; read from printer port. ADD A,A ; test bit 6 and 7 JP M,L08DE ; jump forward with no printer to COPY-END JR NC,L0880 ; back if stylus not in position to COPY-BRK PUSH HL ; save first character of line pointer (*) PUSH DE ; ** preserve character line and pixel line. LD A,D ; text line count to A? CP $02 ; sets carry if last line. SBC A,A ; now $FF if last line else zero. ; now cleverly prepare a printer control mask setting bit 2 (later moved to 1) ; of D to slow printer for the last two pixel lines ( E = 6 and 7) AND E ; and with pixel line offset 0-7 RLCA ; shift to left. AND E ; and again. LD D,A ; store control mask in D. ;; COPY-NEXT L089C: LD A,(HL) ; load character from screen or buffer. ld c,a INC HL ; update pointer for next time. PUSH HL ; * else preserve the character pointer. ld h,0 sub 128 ld a,h ; zero jp c,blank ; filter out non-udg characters and force them to blank ld a,c ld l,a ld c,d ; save D reg ld d,h ; ..and put zero on it rl l rl h ; *2 rl l rl h ; *4 rl l rl h ; *8 add hl,de ; current character row ld a,e ; save E reg acefont: ;ld de,acefont-1024 ld de,0 add hl,de ld e,a ld d,c ld a,(hl) blank: LD C,A ; transfer the byte to C. LD B,$08 ; count eight bits to output. ;; COPY-BITS L08B5: LD A,D ; fetch speed control mask from D. RLC C ; rotate a bit from output byte to carry. RRA ; pick up in bit 7, speed bit to bit 1 LD H,A ; store aligned mask in H register. ;; COPY-WAIT L08BA: IN A,($FB) ; read the printer port RRA ; test for alignment signal from encoder. JR NC,L08BA ; loop if not present to COPY-WAIT LD A,H ; control byte to A. OUT ($FB),A ; and output to printer port. DJNZ L08B5 ; loop for all eight bits to COPY-BITS POP HL ; * restore character pointer. ld a,31 and l ; test if we are in a new line JR nz,L089C ; if within 32 columns, back for adjacent character line to COPY-NEXT ; --- ; End of line ;; COPY-N/L L08C7: IN A,($FB) ; read the printer port RRA ; test for alignment signal from encoder. JR NC,L08C7 ; loop if not present (as in COPY-WAIT) LD A,D ; transfer speed mask to A. RRCA ; rotate speed bit to bit 1. ; bit 7, stylus control is reset. OUT ($FB),A ; set the printer speed. POP DE ; ** restore character line and pixel line. INC E ; increment pixel line 0-7. BIT 3,E ; test if value eight reached. JR Z,L087D ; back if not to COPY-TIME ; eight pixel lines, a text line have been completed. POP BC ; lose the now redundant first character ; pointer DEC D ; decrease text line count. JR NZ,L087A ; back if not zero to COPY-LOOP stop_exit: LD A,$04 ; stop the already slowed printer motor. OUT ($FB),A ; output to printer port. ;; COPY-END L08DE: stacksave: ld hl,0 ld sp,hl EI RET ; SECTION bss_clib ;acefont: ; defs 512
oeis/115/A115637.asm
neoneye/loda-programs
11
4783
<reponame>neoneye/loda-programs ; A115637: A divide-and-conquer sequence. ; Submitted by <NAME>(s1) ; 1,0,5,4,1,0,21,20,17,16,5,4,1,0,85,84,81,80,69,68,65,64,21,20,17,16,5,4,1,0,341,340,337,336,325,324,321,320,277,276,273,272,261,260,257,256,85,84,81,80,69,68,65,64,21,20,17,16,5,4,1,0,1365,1364,1361,1360,1349,1348,1345,1344,1301,1300,1297,1296,1285,1284,1281,1280,1109,1108,1105,1104,1093,1092,1089,1088,1045,1044,1041,1040,1029,1028,1025,1024,341,340,337,336,325,324 add $0,1 mov $2,1 lpb $0 mov $3,$0 mul $0,2 sub $0,1 div $0,4 mod $3,2 mul $3,$2 add $1,$3 mul $2,4 lpe mov $0,$1
final practice/f_2017/question1/question1.asm
ConstantinCezB/Computer-Architecture-assembly
0
5106
<reponame>ConstantinCezB/Computer-Architecture-assembly ; AddTwo.asm - adds two 32-bit integers. ; Chapter 3 example include Irvine32.inc .data var BYTE "return: ", 0 var1 BYTE "push: ", 0 .code main proc ; creating the registors needed mov ebx, 3 ;this represents the n mov ecx, 1 ;this represents the k mov eax, 0 ;this is the total sum call Recu call WriteDec CALL Crlf exit main ENDP ;push ebx ;return n * fun(n-1) Recu PROC ;============================================================================================== This part is for tracing only ;pop eax ;push eax ;mov edx, OFFSET var1 ;call WriteString ;call WriteDec ;CALL Crlf ;CALL Crlf ;MOV eax, ebx ;call WriteDec ;CALL Crlf ;MOV eax, ecx ;call WriteDec ;CALL Crlf ;CALL Crlf ;=========================================================================================== left call ;pushing the variables needed in the stack push ebx push ecx ;if the base case is reached then just call the ret part with the ans cmp ebx, ecx je endRecursion cmp ecx, 0 je endRecursion ;modifying the variables needed using the registers dec ebx CALL Recu ;============================================================================================ right call ;pushing the variables needed in the stack pop ecx pop ebx push ebx push ecx ;if the base case is reached then just call the ret part with the ans cmp ebx, ecx je endRecursion cmp ecx, 0 je endRecursion ;modifying the variables needed using the registers dec ebx dec ecx CALL Recu ;=========================================================================================== end endRecursion: ;take the value of the answer and then return it. ;the answer will be stored in the pop ecx pop ebx ; comparing to take into account what should be added (this should be used if we only want the end of the recursion tree) cmp ebx, ecx je calculate cmp ecx, 0 je calculate jmp finishLine calculate: INC EAX finishLine: ;============================================================================================== This part is for tracing only ;pop eax ;push eax ;mov edx, OFFSET var ;call WriteString ;call WriteDec ;CALL Crlf ;CALL Crlf ;MOV eax, ebx ;call WriteDec ;CALL Crlf ;MOV eax, ecx ;call WriteDec ;CALL Crlf ;CALL Crlf ret Recu ENDP END main
STRINGS_OUTPUT.asm
apsrcreatix/8086
40
80659
<gh_stars>10-100 DATA SEGMENT MSG1 DB 13,10 ,"THIS IS MESSAGE IN MSG1$" MSG2 DB 13,10 ,"THIS IS MESSAGE IN MSG2" DATA ENDS CODE SEGMENT ASSUME CS : CODE , DS : DATA START : MOV AX,DATA MOV DS,AX MOV DX,OFFSET MSG1 ; MOV AH,09H ;DISPLAY STRING FUNTION INT 21H ; DISPLAY THE STRNGS AND IN UPPER CASE MOV DX,OFFSET MSG2 ;SECOND MSG MOV AH,09H INT 21H CODE ENDS ENDS START ENDS
programs/oeis/047/A047359.asm
karttu/loda
0
104979
; A047359: Numbers that are congruent to {0, 2, 3} mod 7. ; 0,2,3,7,9,10,14,16,17,21,23,24,28,30,31,35,37,38,42,44,45,49,51,52,56,58,59,63,65,66,70,72,73,77,79,80,84,86,87,91,93,94,98,100,101,105,107,108,112,114,115,119,121,122,126,128,129,133,135,136,140 mov $1,$0 mov $2,$0 lpb $2,1 mov $3,$0 sub $0,$2 lpb $3,1 add $1,3 mov $3,2 lpe add $1,1 trn $2,3 add $0,$2 lpe
dino/lcs/enemy/A5.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
25287
copyright zengfr site:http://github.com/zengfr/romhack 033954 move.b #$ff, ($a5,A6) 03395A move.b #$14, ($a9,A6) [enemy+A5] 035420 cmp.b ($a5,A6), D0 035424 bne $3542a [enemy+A5] 03542A move.b D0, ($a5,A6) 03542E jsr $119c.l [enemy+A5] 03543E move.b ($a5,A6), D0 [enemy+80] 035442 bne $3547a [enemy+A5] 036836 move.b D0, ($a5,A6) 03683A jsr $119c.l [enemy+A5] 036848 move.b ($a5,A6), D2 03684C add.w D2, D0 [enemy+A5] 0368A2 add.b ($a5,A6), D0 0368A6 lea $72954.l, A0 [enemy+A5] 0368E8 move.b D0, ($a5,A6) 0368EC jsr $119c.l [enemy+A5] 0368FA move.b ($a5,A6), D2 0368FE add.w D2, D0 [enemy+A5] 04007C move.b D0, ($a5,A6) 040080 move.b ($6,A6), ($a0,A6) [enemy+A5] 040094 move.b ($a5,A6), D2 040098 add.w D2, D0 [enemy+A5] 040136 add.b ($a5,A6), D0 04013A lea $72d94.l, A0 [enemy+A5] 040176 move.b D0, ($a5,A6) 04017A jsr $119c.l [enemy+A5] 040186 move.b ($a5,A6), D2 04018A add.w D2, D0 [enemy+A5] 040850 cmpi.b #$1, ($a5,A6) 040856 bgt $40876 [enemy+A5] 040E1E cmpi.b #$3, ($a5,A6) 040E24 bgt $41be8 041C02 move.b D0, ($a5,A6) 041C06 jsr $119c.l [enemy+A5] 041C14 move.b ($a5,A6), D2 041C18 add.w D2, D0 [enemy+A5] 041C5E add.b ($a5,A6), D0 041C62 moveq #$0, D2 041CA6 add.b ($a5,A6), D0 041CAA moveq #$0, D2 [enemy+A5] 041CE6 move.b D0, ($a5,A6) 041CEA bsr $41c46 [enemy+A5] 041CFE move.b ($a5,A6), D2 041D02 add.w D2, D0 [enemy+A5] 045856 move.b D0, ($a5,A6) [enemy+72] 04585A move.b D0, ($b6,A6) 045EEA clr.b ($a5,A6) 045EEE move.b #$1, ($a6,A6) 045F64 clr.b ($a5,A6) 045F68 jsr $119c.l 0460CE cmp.b ($a5,A6), D1 0460D2 beq $460bc [enemy+A5] 0460D4 move.b D1, ($a5,A6) 0460D8 move.b #$1, ($a6,A6) [enemy+A5] 0460E6 move.b ($a5,A6), D0 0460EA move.w ($6,PC,D0.w), D0 [enemy+A5] 0493F2 move.b #$8, ($a5,A6) [enemy+A7] 0493F8 move.b ($a4,A6), ($a6,A6) [enemy+A5] 049400 subq.b #1, ($a5,A6) 049404 bcc $49446 [enemy+A5] 04940C move.b ($3a,PC,D0.w), ($a5,A6) [enemy+A7] 049412 move.b ($a6,A6), D0 [enemy+A5] 04F456 move.b #$8, ($a5,A6) [enemy+A7] 04F45C move.b ($a4,A6), ($a6,A6) [enemy+A5] 04F468 subq.b #1, ($a5,A6) 04F46C bcc $4f4c6 [enemy+A5] 04F474 move.b ($52,PC,D0.w), ($a5,A6) [enemy+A7] 04F47A move.b ($a6,A6), D0 [enemy+A5] 0512F2 move.b D0, ($a5,A6) [enemy+25] 0512F6 jsr $12cb4.l 053900 move.b #$f, ($a5,A6) 053906 move.b #$8, ($a6,A6) [enemy+A5] 05391C move.b ($a5,A6), D0 053920 move.b ($34,PC,D0.w), ($a6,A6) [enemy+A5] 05394A subq.b #1, ($a5,A6) [enemy+23] 05394E bpl $53954 [enemy+A5] 0572CE move.b D0, ($a5,A6) [enemy+25] 0572D2 move.b #$ff, ($7d,A6) 05731C move.b #$0, ($a5,A6) 057322 moveq #$0, D0 05732E tst.b ($a5,A6) [enemy+24] 057332 bne $57340 057352 move.b #$1, ($a5,A6) 057358 bra $57340 [enemy+A5] 058120 move.b D0, ($a5,A6) [enemy+25] 058124 move.b D0, ($59,A6) 058B64 cmpi.b #$2, ($a5,A6) 058B6A bgt $58b88 [enemy+A5] 05A19A move.b D0, ($a5,A6) 05A19E tst.b ($ba,A6) [enemy+A5] 05A1CA add.b ($a5,A6), D0 05A1CE lea $73e94.l, A0 [enemy+A5] 05A1FC move.b D0, ($a5,A6) 05A200 clr.b ($ab,A6) [enemy+A5] 05A212 move.b ($a5,A6), D2 05A216 add.w D2, D0 [enemy+A5] 05A4B2 move.b D0, ($a5,A6) [enemy+25] 05A4B6 move.b D0, ($b2,A6) 05A5DC move.b #$0, ($a5,A6) 05A5E2 moveq #$0, D0 05A5EE tst.b ($a5,A6) [enemy+24] 05A5F2 bne $5a600 05A61C move.b #$1, ($a5,A6) 05A622 moveq #$1, D0 [enemy+A5] 05C38A move.b D0, ($a5,A6) [enemy+24] 05C38E jsr $3140c.l [enemy+A5] copyright zengfr site:http://github.com/zengfr/romhack
programs/oeis/327/A327666.asm
neoneye/loda
22
10989
<reponame>neoneye/loda<gh_stars>10-100 ; A327666: a(n) = Sum_{k = 1..n} (-1)^(Omega(k) - omega(k)), where Omega(k) counts prime factors of k with multiplicity and omega(k) counts distinct prime factors. ; 1,2,3,2,3,4,5,6,5,6,7,6,7,8,9,8,9,8,9,8,9,10,11,12,11,12,13,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,26,25,26,27,26,25,24,25,24,25,26,27,28,29,30,31,30,31,32,31,30,31,32,33,32,33,34 lpb $0 mov $2,$0 sub $0,1 seq $2,162511 ; Multiplicative function with a(p^e)=(-1)^(e-1) add $1,$2 lpe add $1,1 mov $0,$1
src/main/antlr4/imports/column_definitions.g4
mx417/maxwell
0
4810
grammar column_definitions; import mysql_literal_tokens, mysql_idents; import mysql_indices; // for REFERENCES column_definition: col_name=name data_type ; col_position: FIRST | (AFTER name); data_type: generic_type | signed_type | string_type | enumerated_type ; // all from http://dev.mysql.com/doc/refman/5.1/en/create-table.html generic_type: col_type=(BIT | BINARY | BLOB | YEAR | TIME | TIMESTAMP | DATETIME) length? column_options* | col_type=(DATE | TINYBLOB | MEDIUMBLOB | LONGBLOB | BOOLEAN | BOOL ) column_options* | col_type=(GEOMETRY | GEOMETRYCOLLECTION | LINESTRING | MULTILINESTRING | MULTIPOINT | MULTIPOLYGON | POINT | POLYGON ) column_options* | col_type=JSON column_options* | col_type=VARBINARY length column_options* ; signed_type: // we need the UNSIGNED flag here col_type=(TINYINT | INT1 | SMALLINT | INT2 | MEDIUMINT | INT3 | INT | INTEGER | INT4 | BIGINT | INT8 ) length? int_flags* column_options* | col_type=(REAL | FLOAT | DECIMAL | NUMERIC) decimal_length? int_flags* column_options* | col_type=DOUBLE PRECISION? decimal_length? int_flags* column_options* | col_type=SERIAL column_options* ; string_type locals [Boolean utf8 = false]: (NATIONAL {$utf8=true;})? col_type=(CHAR | CHARACTER | VARCHAR) length? (column_options | BYTE | UNICODE)* | (NATIONAL {$utf8=true;})? (CHARACTER|CHAR) col_type=VARYING length (column_options | BYTE | UNICODE)* | col_type=(NCHAR | NVARCHAR) length? column_options* {$utf8=true;} | NCHAR col_type=VARCHAR length? column_options* {$utf8=true;} | col_type=(TINYTEXT | MEDIUMTEXT | LONGTEXT) (column_options | BYTE | UNICODE)* | col_type=TEXT length? (column_options | BYTE | UNICODE)* | long_flag col_type=(VARCHAR | BINARY) (column_options | UNICODE)* | long_flag col_type=VARBINARY column_options* | col_type=LONG (column_options | BYTE | UNICODE)* ; long_flag: LONG; enumerated_type: col_type=(ENUM | SET) '(' enumerated_values ')' column_options* ; column_options: nullability | charset_def | collation | default_value | primary_key | ON UPDATE ( CURRENT_TIMESTAMP current_timestamp_length? | now_function ) | UNIQUE KEY? | KEY | AUTO_INCREMENT | BINARY | COMMENT string_literal | COLUMN_FORMAT (FIXED|DYNAMIC|DEFAULT) | STORAGE (DISK|MEMORY|DEFAULT) | (VIRTUAL | STORED) | (GENERATED ALWAYS)? AS skip_parens | reference_definition | CHECK skip_parens ; primary_key: PRIMARY KEY; enumerated_values: enum_value (',' enum_value)*; enum_value: string_literal; charset_def: character_set | ASCII; character_set: ((CHARACTER SET) | CHARSET) charset_name; nullability: (NOT NULL | NULL); default_value: DEFAULT (literal | CURRENT_TIMESTAMP current_timestamp_length? | now_function); length: '(' INTEGER_LITERAL ')'; int_flags: ( SIGNED | UNSIGNED | ZEROFILL ); decimal_length: '(' INTEGER_LITERAL ( ',' INTEGER_LITERAL )? ')'; now_function: NOW '(' ')'; current_timestamp_length: length | '(' ')';
Transynther/x86/_processed/NONE/_ht_zr_/i7-7700_9_0x48_notsx.log_63_1493.asm
ljhsiun2/medusa
9
93817
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x17973, %rsi lea addresses_A_ht+0x16851, %rdi nop nop nop cmp %rbx, %rbx mov $90, %rcx rep movsl xor $3929, %r10 lea addresses_WT_ht+0x19c73, %rsi lea addresses_WT_ht+0xd6f7, %rdi nop nop nop dec %rbx mov $122, %rcx rep movsw sub %rcx, %rcx lea addresses_D_ht+0x1cf3, %rsi lea addresses_WC_ht+0x22f3, %rdi nop nop cmp $60205, %rdx mov $89, %rcx rep movsq nop nop nop nop nop cmp %rdi, %rdi lea addresses_WT_ht+0x105f3, %rsi nop nop nop nop inc %rcx movw $0x6162, (%rsi) nop nop nop nop nop cmp %r10, %r10 lea addresses_UC_ht+0x140f3, %rsi lea addresses_WT_ht+0x176f3, %rdi nop nop nop nop nop and %r11, %r11 mov $67, %rcx rep movsq nop nop cmp %rbx, %rbx lea addresses_WT_ht+0x1a893, %rsi nop cmp %rcx, %rcx mov (%rsi), %r11d nop nop nop nop add $27109, %r11 lea addresses_A_ht+0x1a673, %rbx nop nop nop add %rsi, %rsi movl $0x61626364, (%rbx) nop nop nop cmp $37024, %r10 lea addresses_WT_ht+0xccf3, %rdi nop nop sub $63834, %rbx mov $0x6162636465666768, %r11 movq %r11, (%rdi) nop sub %rsi, %rsi lea addresses_A_ht+0x17ef3, %rbx nop nop dec %rdx mov (%rbx), %r10d nop nop nop nop and %rdi, %rdi lea addresses_WT_ht+0x1b3f3, %rsi lea addresses_D_ht+0x6cc3, %rdi nop nop nop nop nop sub %rbp, %rbp mov $84, %rcx rep movsq nop nop nop nop inc %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r8 push %rbx push %rdi push %rdx push %rsi // Store lea addresses_RW+0x413, %r12 nop nop nop sub %rbx, %rbx movw $0x5152, (%r12) nop nop nop sub $52555, %rdx // Store lea addresses_WC+0x7bb3, %r8 nop nop nop add $13828, %r14 mov $0x5152535455565758, %rdi movq %rdi, %xmm2 movups %xmm2, (%r8) nop nop and %rdx, %rdx // Store lea addresses_WC+0xa73, %rsi cmp %rdi, %rdi mov $0x5152535455565758, %rbx movq %rbx, %xmm2 vmovups %ymm2, (%rsi) nop nop nop add %r8, %r8 // Faulty Load lea addresses_A+0xecf3, %r12 nop nop nop nop xor %rbx, %rbx vmovups (%r12), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $1, %xmm0, %r14 lea oracles, %rsi and $0xff, %r14 shlq $12, %r14 mov (%rsi,%r14,1), %r14 pop %rsi pop %rdx pop %rdi pop %rbx pop %r8 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_RW', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC', 'congruent': 6}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}} {'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 5}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 7}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 9}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 9}} {'dst': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}} {'45': 7, '49': 19, '00': 37} 00 49 00 49 49 00 00 49 49 00 49 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 49 00 45 49 00 00 00 00 00 49 49 49 49 00 45 45 49 00 00 49 45 45 00 45 00 00 45 49 00 00 00 00 00 49 49 49 */
oeis/218/A218471.asm
neoneye/loda-programs
11
7943
; A218471: a(n) = n*(7*n-3)/2. ; 0,2,11,27,50,80,117,161,212,270,335,407,486,572,665,765,872,986,1107,1235,1370,1512,1661,1817,1980,2150,2327,2511,2702,2900,3105,3317,3536,3762,3995,4235,4482,4736,4997,5265,5540,5822,6111,6407,6710,7020,7337,7661,7992,8330,8675,9027,9386,9752,10125,10505,10892,11286,11687,12095,12510,12932,13361,13797,14240,14690,15147,15611,16082,16560,17045,17537,18036,18542,19055,19575,20102,20636,21177,21725,22280,22842,23411,23987,24570,25160,25757,26361,26972,27590,28215,28847,29486,30132,30785,31445 mul $0,14 sub $0,3 pow $0,2 div $0,56
Source/Code/Jacobi.Zim80.IntegrationTests/CpuZ80/Routines/JumpingBean.asm
obiwanjacobi/Zim80
4
170438
<filename>Source/Code/Jacobi.Zim80.IntegrationTests/CpuZ80/Routines/JumpingBean.asm<gh_stars>1-10 org 0h start: jp init loop: call copy cp 0 jp z, end jp next end: nop init: ld hl, src ld de, trg jp loop copy: ld a, (hl) ld (de), a ret next: inc hl inc de jp loop defs 5 src: defb "Hello World!", 0 defs 3 trg: defs 10h defb 0
programs/oeis/188/A188182.asm
jmorken/loda
1
105319
; A188182: Number of strictly increasing arrangements of 4 numbers in -(n+2)..(n+2) with sum zero ; 5,12,24,43,69,104,150,207,277,362,462,579,715,870,1046,1245,1467,1714,1988,2289,2619,2980,3372,3797,4257,4752,5284,5855,6465,7116,7810,8547,9329,10158,11034,11959,12935,13962,15042,16177,17367,18614,19920,21285 mov $16,$0 mov $18,$0 add $18,1 lpb $18 clr $0,16 mov $0,$16 sub $18,1 sub $0,$18 mov $13,$0 mov $15,$0 add $15,1 lpb $15 mov $0,$13 sub $15,1 sub $0,$15 mov $9,$0 mov $11,2 lpb $11 mov $0,$9 sub $11,1 add $0,$11 sub $0,1 mov $5,6 lpb $0 mul $0,2 mov $2,$0 mov $0,$6 add $2,6 mov $5,$2 pow $5,2 div $5,6 sub $5,1 lpe mov $1,$5 mov $12,$11 lpb $12 mov $10,$1 sub $12,1 lpe lpe lpb $9 mov $9,0 sub $10,$1 lpe mov $1,$10 sub $1,1 add $14,$1 lpe add $17,$14 lpe mov $1,$17
llvm-gcc-4.2-2.9/gcc/ada/s-finroo.adb
vidkidz/crossbridge
1
8313
<filename>llvm-gcc-4.2-2.9/gcc/ada/s-finroo.adb ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . F I N A L I Z A T I O N _ R O O T -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body System.Finalization_Root is -- It should not be possible to call any of these subprograms ------------ -- Adjust -- ------------ procedure Adjust (Object : in out Root_Controlled) is begin raise Program_Error; end Adjust; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Root_Controlled) is begin raise Program_Error; end Finalize; ---------------- -- Initialize -- ---------------- procedure Initialize (Object : in out Root_Controlled) is begin raise Program_Error; end Initialize; ---------- -- Read -- ---------- -- Read and Write must be empty in order to avoid copying the -- finalization pointers. pragma Warnings (Off); -- Suppress warning for out paramater Item which is not assigned -- because it is pretty much empty. procedure Read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : out Root_Controlled) is begin null; end Read; ----------- -- Write -- ----------- -- Read and Write must be empty in order to avoid copying the -- finalization pointers. procedure Write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Root_Controlled) is begin null; end Write; end System.Finalization_Root;