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/Implicits/Resolution/Scala/Type.agda
metaborg/ts.agda
4
16520
open import Prelude module Implicits.Resolution.Scala.Type where open import Implicits.Syntax open import Implicits.Substitutions open import Implicits.Substitutions.Lemmas.Type open import Implicits.Substitutions.Type as TS using () -- predicate on types to limit them to non-rule types -- (as those don't exist in Scala currently) mutual data ScalaSimpleType {ν} : SimpleType ν → Set where tc : (c : ℕ) → ScalaSimpleType (tc c) tvar : (n : Fin ν) → ScalaSimpleType (tvar n) _→'_ : ∀ {a b} → ScalaType a → ScalaType b → ScalaSimpleType (a →' b) data ScalaType {ν} : Type ν → Set where simpl : ∀ {τ} → ScalaSimpleType {ν} τ → ScalaType (simpl τ) ∀' : ∀ {a} → ScalaType a → ScalaType (∀' a) data ScalaRule {ν} : Type ν → Set where idef : ∀ {a b} → ScalaType a → ScalaType b → ScalaRule (a ⇒ b) ival : ∀ {a} → ScalaType a → ScalaRule a ScalaICtx : ∀ {ν} → ICtx ν → Set ScalaICtx Δ = All ScalaRule Δ mutual weaken-scalastype : ∀ {ν} k {a : SimpleType (k N+ ν)} → ScalaSimpleType a → ScalaType (a TS.simple/ (TS.wk TS.↑⋆ k)) weaken-scalastype k (tc c) = simpl (tc c) weaken-scalastype k (tvar n) = Prelude.subst (λ z → ScalaType z) (sym $ var-/-wk-↑⋆ k n) (simpl (tvar (lift k suc n))) weaken-scalastype k (a →' b) = simpl ((weaken-scalatype k a) →' (weaken-scalatype k b)) weaken-scalatype : ∀ {ν} k {a : Type (k N+ ν)} → ScalaType a → ScalaType (a TS./ TS.wk TS.↑⋆ k) weaken-scalatype k (simpl {τ} x) = weaken-scalastype k x weaken-scalatype k (∀' p) = ∀' (weaken-scalatype (suc k) p) weaken-scalarule : ∀ {ν} k {a : Type (k N+ ν)} → ScalaRule a → ScalaRule (a TS./ (TS.wk TS.↑⋆ k)) weaken-scalarule k (idef x y) = idef (weaken-scalatype k x) (weaken-scalatype k y) weaken-scalarule k (ival x) = ival (weaken-scalatype k x) weaken-scalaictx : ∀ {ν} {Δ : ICtx ν} → ScalaICtx Δ → ScalaICtx (ictx-weaken Δ) weaken-scalaictx All.[] = All.[] weaken-scalaictx (px All.∷ ps) = weaken-scalarule zero px All.∷ weaken-scalaictx ps
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_enmy12.asm
prismotizm/gigaleak
0
82808
<reponame>prismotizm/gigaleak Name: ys_enmy12.asm Type: file Size: 8018 Last-Modified: '2016-05-13T04:50:38Z' SHA-1: 105AAE7BE196EFBFFFCE9AF81AE144BFCCC84B18 Description: null
source/asis/spec/ada-strings-wide_maps.ads
faelys/gela-asis
4
22628
------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of ada.ads file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ package Ada.Strings.Wide_Maps is pragma Preelaborate (Wide_Maps); -- Representation for a set of Wide_Character values: type Wide_Character_Set is private; pragma Preelaborable_Initialization (Wide_Character_Set); Null_Set : constant Wide_Character_Set; type Wide_Character_Range is record Low : Wide_Character; High : Wide_Character; end record; -- Represents Wide_Character range Low..High type Wide_Character_Ranges is array (Positive range <>) of Wide_Character_Range; function To_Set (Ranges : in Wide_Character_Ranges) return Wide_Character_Set; function To_Set (Span : in Wide_Character_Range) return Wide_Character_Set; function To_Ranges (Set : in Wide_Character_Set) return Wide_Character_Ranges; function "=" (Left, Right : in Wide_Character_Set) return Boolean; function "not" (Right : in Wide_Character_Set) return Wide_Character_Set; function "and" (Left, Right : in Wide_Character_Set) return Wide_Character_Set; function "or" (Left, Right : in Wide_Character_Set) return Wide_Character_Set; function "xor" (Left, Right : in Wide_Character_Set) return Wide_Character_Set; function "-" (Left, Right : in Wide_Character_Set) return Wide_Character_Set; function Is_In (Element : in Wide_Character; Set : in Wide_Character_Set) return Boolean; function Is_Subset (Elements : in Wide_Character_Set; Set : in Wide_Character_Set) return Boolean; function "<=" (Left : in Wide_Character_Set; Right : in Wide_Character_Set) return Boolean renames Is_Subset; -- Alternative representation for a set of Wide_Character values: subtype Wide_Character_Sequence is Wide_String; function To_Set (Sequence : in Wide_Character_Sequence) return Wide_Character_Set; function To_Set (Singleton : in Wide_Character) return Wide_Character_Set; function To_Sequence (Set : in Wide_Character_Set) return Wide_Character_Sequence; -- Representation for a Wide_Character to Wide_Character mapping: type Wide_Character_Mapping is private; pragma Preelaborable_Initialization (Wide_Character_Mapping); function Value (Map : in Wide_Character_Mapping; Element : in Wide_Character) return Wide_Character; Identity : constant Wide_Character_Mapping; function To_Mapping (From, To : in Wide_Character_Sequence) return Wide_Character_Mapping; function To_Domain (Map : in Wide_Character_Mapping) return Wide_Character_Sequence; function To_Range (Map : in Wide_Character_Mapping) return Wide_Character_Sequence; type Wide_Character_Mapping_Function is access function (From : in Wide_Character) return Wide_Character; private pragma Import (Ada, Wide_Character_Set); pragma Import (Ada, Null_Set); pragma Import (Ada, Wide_Character_Mapping); pragma Import (Ada, Identity); end Ada.Strings.Wide_Maps;
tests/lsp_documents.adb
reznikmm/ada_lsp
11
13890
<filename>tests/lsp_documents.adb -- Copyright (c) 2017 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Ada.Characters.Wide_Wide_Latin_1; with League.String_Vectors; with League.Strings; package body LSP_Documents is function "+" (Text : Wide_Wide_String) return League.Strings.Universal_String renames League.Strings.To_Universal_String; -------------- -- Get_Line -- -------------- not overriding function Get_Line (Self : Document; Line : LSP.Types.Line_Number) return LSP.Types.LSP_String is begin return Self.Lines.Element (Natural (Line) + 1); end Get_Line; ----------------- -- All_Symbols -- ----------------- not overriding function All_Symbols (Self : Document; Query : LSP.Types.LSP_String) return LSP.Messages.SymbolInformation_Vector is use type League.Strings.Universal_String; Result : LSP.Messages.SymbolInformation_Vector; Item : LSP.Messages.SymbolInformation; begin for J in 1 .. Self.Lines.Length loop declare Line : constant League.Strings.Universal_String := Self.Lines (J); List : constant League.String_Vectors.Universal_String_Vector := Line.Split (' ', League.Strings.Skip_Empty); LN : constant LSP.Types.Line_Number := LSP.Types.Line_Number (J - 1); begin if List.Length > 2 and then List (1) = +"type" and then (Query.Is_Empty or else List (2).Index (Query) > 0) then Item := (name => List (2), kind => LSP.Messages.Class, location => (Self.Uri, (first => (LN, LSP.Types.UTF_16_Index (Line.Index (List (2)) - 1)), last => (LN, LSP.Types.UTF_16_Index (Line.Index (List (2)) + List (2).Length - 1)))), containerName => (Is_Set => False)); Result.Append (Item); end if; end; end loop; return Result; end All_Symbols; --------------- -- Initalize -- --------------- procedure Initalize (Self : out Document; Uri : LSP.Types.LSP_String; Text : LSP.Types.LSP_String; Version : LSP.Types.Version_Id) is begin Self.Uri := Uri; Self.Lines := Text.Split (Ada.Characters.Wide_Wide_Latin_1.LF); Self.Version := Version; end Initalize; ------------ -- Lookup -- ------------ not overriding function Lookup (Self : Document; Where : LSP.Messages.Position) return Lookup_Result is use type League.Strings.Universal_String; type State_Kinds is (Other, Character, Identifier, Tick); Text : constant LSP.Types.LSP_String := Self.Get_Line (Where.line); State : State_Kinds := Other; Prev : State_Kinds := Other; Attr : Boolean := False; Id_First : Natural := 0; Id_Last : Natural := 0; Is_Pragma : Boolean := False; Pragma_Id : League.Strings.Universal_String; Param : Natural := 0; begin for J in 1 .. Text.Length loop Prev := State; case State is when Other => if Text (J).To_Wide_Wide_Character = ''' then State := Character; elsif Text (J).Is_ID_Start then State := Identifier; Id_First := J; end if; when Character => if Text (J).To_Wide_Wide_Character = ''' then State := Other; end if; when Identifier => Id_Last := J; if Text (J).To_Wide_Wide_Character = ''' then State := Tick; Id_Last := J - 1; elsif not (Text (J).Is_ID_Start or Text (J).Is_ID_Continue or Text (J).To_Wide_Wide_Character = '.') then State := Other; Id_Last := J - 1; if Text.Slice (Id_First, Id_Last) = +"pragma" then Is_Pragma := True; elsif Is_Pragma then Pragma_Id := Text.Slice (Id_First, Id_Last); Is_Pragma := False; Param := 0; end if; end if; when Tick => if Text (J).Is_ID_Start then Attr := True; State := Identifier; Id_First := J; end if; end case; if Text (J).To_Wide_Wide_Character = ';' then Is_Pragma := False; elsif Text (J).To_Wide_Wide_Character in '(' | ',' then Param := Param + 1; end if; exit when State /= Identifier and J >= Natural (Where.character); end loop; if Attr then return (Attribute_Designator, Text.Slice (Id_First, Id_Last)); elsif not Pragma_Id.Is_Empty then return (Pragma_Name, Pragma_Id, Param); elsif Prev = Identifier then return (LSP_Documents.Identifier, Text.Slice (Id_First, Id_Last)); else return (Kind => None); end if; end Lookup; ------------- -- Version -- ------------- not overriding function Version (Self : Document) return LSP.Types.Version_Id is begin return Self.Version; end Version; end LSP_Documents;
PJ Grammar/methods.g4
Diolor/PJ
0
418
parser grammar methods; genericMethodDeclaration : typeParameters methodDeclaration ; methodDeclaration : (type|voidRule) identifierRule formalParameters ('[' ']')* (throwsRule qualifiedNameList)? methodBody? ; methodBody : block ;
dv3/hd/version.asm
olifink/smsqe
0
4069
<reponame>olifink/smsqe ; Floppy Disk Version section version xdef hd_vers xdef hd.rev ; Version 3.00 Derived from Atari FD V2.18 ; 3.01 Combined QXL Atari Version hd_vers equ '3.00' hd.rev equ 0 hd_vmess dc.w 'QXL Floppy Disk V' dc.l hd_vers dc.b ' ',$a hd_vmend ds.w 0 end
tests/factions-test_data-tests.ads
thindil/steamsky
80
7942
<reponame>thindil/steamsky -- This package has been generated automatically by GNATtest. -- Do not edit any part of it, see GNATtest documentation for more details. -- begin read only with Gnattest_Generated; package Factions.Test_Data.Tests is type Test is new GNATtest_Generated.GNATtest_Standard.Factions.Test_Data .Test with null record; procedure Test_GetReputation_f138bb_ad6480(Gnattest_T: in out Test); -- factions.ads:180:4:GetReputation:Test_GetReputation procedure Test_IsFriendly_868bec_4ae8b6(Gnattest_T: in out Test); -- factions.ads:197:4:IsFriendly:Test_IsFriendly procedure Test_GetRandomFaction_47dd81_103989(Gnattest_T: in out Test); -- factions.ads:211:4:GetRandomFaction:Test_GetRandomFaction end Factions.Test_Data.Tests; -- end read only
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1196.asm
ljhsiun2/medusa
9
161880
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x160a, %rbp add $36232, %r12 mov $0x6162636465666768, %rbx movq %rbx, (%rbp) nop nop xor $15974, %r8 lea addresses_WT_ht+0x5f26, %r10 nop add %rbx, %rbx mov $0x6162636465666768, %r8 movq %r8, %xmm4 movups %xmm4, (%r10) nop cmp %r10, %r10 lea addresses_A_ht+0x1954a, %rsi lea addresses_UC_ht+0x5cca, %rdi nop dec %r12 mov $55, %rcx rep movsl nop nop xor $22971, %rsi lea addresses_D_ht+0x1c20a, %rcx nop nop cmp $10356, %r8 mov $0x6162636465666768, %rdi movq %rdi, (%rcx) nop nop nop and %r8, %r8 lea addresses_WT_ht+0x1634a, %rsi lea addresses_normal_ht+0x80ca, %rdi nop nop nop nop add $10498, %rbp mov $108, %rcx rep movsb nop nop nop nop sub $55730, %rcx lea addresses_normal_ht+0x614a, %r10 nop nop nop nop nop xor %rcx, %rcx movb (%r10), %r8b nop nop and %r8, %r8 lea addresses_A_ht+0x198c6, %r8 nop nop nop inc %rdi mov (%r8), %r12w nop nop and %r12, %r12 lea addresses_WC_ht+0x1a474, %rsi lea addresses_WT_ht+0x2ed2, %rdi add $43366, %rbx mov $77, %rcx rep movsw and %r8, %r8 lea addresses_normal_ht+0x16366, %r8 add %r10, %r10 movw $0x6162, (%r8) nop nop nop sub $39558, %r8 lea addresses_A_ht+0x1834a, %rsi lea addresses_A_ht+0xde4a, %rdi nop nop nop inc %r12 mov $115, %rcx rep movsq nop nop nop nop add $35032, %rdi lea addresses_WT_ht+0x1174a, %rsi nop nop nop nop and $49061, %rbx and $0xffffffffffffffc0, %rsi vmovntdqa (%rsi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %r8 nop inc %rcx lea addresses_UC_ht+0x1166a, %rbx nop nop nop nop nop sub $42604, %r10 mov $0x6162636465666768, %rcx movq %rcx, %xmm7 movups %xmm7, (%rbx) nop nop nop nop inc %r12 lea addresses_UC_ht+0xfcc2, %rbp nop nop nop nop nop lfence movb $0x61, (%rbp) nop nop nop nop xor %r8, %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi // Store lea addresses_UC+0x51ca, %r10 nop nop nop nop nop xor %r8, %r8 movl $0x51525354, (%r10) nop nop nop nop add $10483, %r10 // Store lea addresses_WT+0xa8de, %rsi nop nop nop nop nop dec %rdi movl $0x51525354, (%rsi) nop nop nop sub $2971, %r9 // Faulty Load lea addresses_normal+0xdb4a, %rax nop nop nop nop nop add $20318, %rcx movups (%rax), %xmm3 vpextrq $1, %xmm3, %rdi lea oracles, %rsi and $0xff, %rdi shlq $12, %rdi mov (%rsi,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 7}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 1}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_normal', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 4}, 'dst': {'same': True, 'type': 'addresses_UC_ht', 'congruent': 7}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': True, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': True, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
oeis/299/A299920.asm
neoneye/loda-programs
11
244906
; A299920: Motzkin numbers (A001006) mod 6. ; Submitted by <NAME> ; 1,1,2,4,3,3,3,1,5,1,4,2,1,3,0,0,3,3,0,0,3,3,3,3,3,1,2,4,1,5,1,3,3,3,4,2,1,1,5,1,3,3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3,3,0,4,5,1,4,2,1,3,3,3,1,5,4,4,5,1,3,3,3,3,0,0 seq $0,1006 ; Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n (labeled) points on a circle. mod $0,6
oeis/287/A287349.asm
neoneye/loda-programs
11
171338
; A287349: Number of matchings in the n-gear graph. ; 4,13,42,131,398,1186,3482,10103,29034,82777,234424,660098,1849552,5160001,14341098,39723791,109701122,302131618,830079014,2275509227,6225274794,16999389733,46341292012,126130604546,342800478748,930414584821,2522124577962,6828859302683,18469472488694,49901715485602,134697126776114,363251865944543,978783621554922,2635212249110641,7089467726450848,19058921481873026,51201873773387752,137464700449317673,368831652353428074,989030530336527527,2650621335053974634,7099917390293295778 mov $2,$0 add $0,1 mov $1,2 lpb $0 sub $0,1 add $2,$1 add $1,$2 lpe mov $0,$1
sdk/opendp/smartnoise/sql/parser/SqlSmall.g4
Tecnarca/whitenoise-system
0
4052
grammar SqlSmall; batch : query (';' query)* (';')? EOF ; query : selectClause fromClause whereClause? aggregationClause? havingClause? orderClause? limitClause? ; subquery : '(' selectClause fromClause whereClause? aggregationClause? havingClause? orderClause? ')' ; expressionSubquery : subquery; selectClause : SELECT (setQuantifier)? namedExpressionSeq ; fromClause : FROM relation (',' relation)*; whereClause : WHERE booleanExpression ; aggregationClause : GROUP BY groupingExpressions+=expression (',' groupingExpressions+=expression)* ; havingClause : HAVING booleanExpression ; orderClause : (ORDER BY order+=sortItem (',' order+=sortItem)*) ; limitClause : LIMIT n=number; topClause : TOP n=number; joinRelation : (joinType) JOIN right=relationPrimary joinCriteria? ; joinType : INNER? | CROSS | LEFT OUTER? | LEFT? SEMI | RIGHT OUTER? | FULL OUTER? | LEFT? ANTI ; joinCriteria : ON booleanExpression #booleanJoin | USING '(' identifier (',' identifier)* ')' #usingJoin ; sortItem : expression ordering=(ASC | DESC)? ; setQuantifier : DISTINCT | ALL | (topClause) ; relation : relationPrimary joinRelation* ; relationPrimary : qualifiedTableName (AS alias=identifier)? #table | subquery (AS alias=identifier)? #aliasedQuery | '(' relation ')' (AS alias=identifier)? #aliasedRelation ; caseExpression : CASE (baseCaseExpr=expression)? (whenExpression)+ (ELSE elseExpr=expression)? END ; namedExpression : expression (AS name=identifier)? ; namedExpressionSeq : namedExpression (',' namedExpression)* ; whenExpression : (WHEN (baseBoolExpr=booleanExpression | baseWhenExpr=expression) THEN thenExpr=expression); expression : name=qualifiedColumnName #columnName | left=expression op=ASTERISK right=expression #multiply | left=expression op=SLASH right=expression #divide | left=expression op='%' right=expression #modulo | left=expression op=PLUS right=expression #add | left=expression op=MINUS right=expression #subtract | caseExpression #caseExpr | allExpression #allExpr | literal #literalExpr | rankingFunction #rankFunction | functionExpression # functionExpr | expressionSubquery #subqueryExpr | '(' expression ')' #nestedExpr ; allExpression : ASTERISK | identifier '.' ASTERISK ; literal : STRING #stringLiteral | number #numberLiteral | TRUE #trueLiteral | FALSE #falseLiteral | NULL #nullLiteral ; booleanExpression : NOT booleanExpression #logicalNot | left=expression op=comparisonOperator right=expression #comparison | left=booleanExpression AND right=booleanExpression #conjunction | left=booleanExpression OR right=booleanExpression #disjunction | '(' booleanExpression ')' #nestedBoolean | expression predicate #predicated ; predicate : NOT? kind=BETWEEN lower=expression AND upper=expression #betweenCondition | NOT? kind=IN '(' expression (',' expression)* ')' #inCondition | IS NOT? kind=(NULL | TRUE | FALSE) #isCondition ; comparisonOperator : EQ | NEQ | NEQJ | LT | LTE | GT | GTE | NSEQ ; booleanValue : TRUE | FALSE ; functionExpression : bareFunction #bareFunc | roundFunction #roundFunc | powerFunction #powerFunc | function=aggregateFunctionName '(' setQuantifier? expression ')' #aggFunc | function=mathFunctionName '(' expression ')' #mathFunc | IIF '(' test=booleanExpression ',' yes=expression ',' no=expression ')' #iifFunc | CHOOSE '(' index=expression (',' literal)+ ')' # chooseFunc ; bareFunction : function=bareFunctionName '(' ')'; rankingFunction: function=rankingFunctionName '(' ')' overClause; roundFunction : ROUND '(' expression ',' digits=number ')'; powerFunction : POWER '(' expression ',' number ')'; rankingFunctionName : ROW_NUMBER | RANK | DENSE_RANK; aggregateFunctionName : COUNT | SUM | AVG | VAR | VARIANCE | STD | STDDEV | MIN | MAX | PERCENTILE_DISC | PERCENTILE_CONT; mathFunctionName : ABS | CEILING | FLOOR | SIGN | SQRT | SQUARE | EXP | LOG | LOG10 | SIN | COS | TAN | ASIN | ACOS | ATAN | DEGREES; bareFunctionName : PI | RANDOM | RAND | NEWID; overClause : OVER '(' (PARTITION BY expression)? (orderClause)? ')'; aliasedSubquery : subquery (AS alias=identifier)?; aliasedTableOrSubquerySeq : (aliasedTableName | aliasedSubquery) (',' (aliasedTableName | aliasedSubquery))*; aliasedTableSeq : aliasedTableName (',' aliasedTableName)*; aliasedTableName : qualifiedTableName (AS alias=identifier)?; qualifiedTableName : QN3 | QN2 | IDENT; qualifiedColumnName : QN2 | IDENT ; identifier: IDENT; number : MINUS? DECIMAL_VALUE #decimalLiteral | MINUS? INTEGER_VALUE #integerLiteral ; ABS: A B S; ACOS: A C O S; ALL: A L L; AND: A N D; ANTI: A N T I; AS: A S; ASC: A S C; ASIN: A S I N; ATAN: A T A N; AVG: A V G; BETWEEN: B E T W E E N; BY: B Y; CASE: C A S E; CEILING: C E I L I N G; CHOOSE: C H O O S E; COS: C O S; COT: C O T; COUNT: C O U N T; CROSS: C R O S S; DEGREES: D E G R E E S; DENSE_RANK: D E N S E '_' R A N K; DESC: D E S C; DISTINCT: D I S T I N C T; DIV: D I V; ELSE: E L S E; END: E N D; EXP: E X P; FALSE: F A L S E; FLOOR: F L O O R; FROM: F R O M; FULL: F U L L; GROUP: G R O U P; HAVING: H A V I N G; IF: I F; IIF: I I F; IN: I N; INNER: I N N E R; INTERSECT: I N T E R S E C T; IS: I S; JOIN: J O I N; LEFT: L E F T; LIMIT: L I M I T; LOG: L O G; LOG10: L O G '1' '0'; MAX: M A X; MIN: M I N; NEWID: N E W I D; NOT: N O T; NULL: N U L L; NUMERIC: N U M E R I C; ON: O N; OR: O R; ORDER: O R D E R; OUTER: O U T E R; OVER: O V E R; PARTITION: P A R T I T I O N; PERCENTILE_CONT: P E R C E N T I L E '_' C O N T; PERCENTILE_DISC: P E R C E N T I L E '_' D I S C; PI: P I; POWER: P O W E R; RAND: R A N D; RANDOM: R A N D O M; RANK: R A N K; RIGHT: R I G H T; ROUND: R O U N D; ROW_NUMBER: R O W '_' N U M B E R; ROWNUM: R O W N U M; SELECT: S E L E C T; SEMI: S E M I; SIGN: S I G N; SIN: S I N; SORT: S O R T; SQL: S Q L; // reserved SQRT: S Q R T; SQUARE: S Q U A R E; STD: S T D; STDDEV: S T D D E V; SUM: S U M; TAN: T A N; THEN: T H E N; TOP: T O P; TRUE: T R U E; UNION: U N I O N; // reserved USING: U S I N G; VAR: V A R; VARIANCE: V A R I A N C E; WHEN: W H E N; WHERE: W H E R E; EQ : '=' | '=='; NSEQ: '<=>'; NEQ : '<>'; NEQJ: '!='; LT : '<'; LTE : '<=' | '!>'; GT : '>'; GTE : '>=' | '!<'; PLUS: '+'; MINUS: '-'; ASTERISK: '*'; SLASH: '/'; PERCENT: '%'; TILDE: '~'; AMPERSAND: '&'; PIPE: '|'; CONCAT_PIPE: '||'; HAT: '^'; /* Standard Lexer stuff */ STRING : '\'' ( ~('\''|'\\') | ('\\' .) )* '\''; // | '"' ( ~('"'|'\\') | ('\\' .) )* '"' // ; INTEGER_VALUE : DIGIT+ ; DECIMAL_VALUE : DIGIT+ EXPONENT | DECIMAL_DIGITS EXPONENT? ; QN2 : IDENT '.' IDENT; QN3 : IDENT '.' IDENT '.' IDENT; IDENT: IDENTIFIER | ESCAPED_IDENTIFIER; IDENTIFIER : LETTER+ (LETTER | DIGIT | '_')* ; ESCAPED_IDENTIFIER : '[' (LETTER | DIGIT | '_' | ' ')*? ']' | '"' (LETTER | DIGIT | '_' | ' ')*? '"' | '`' (LETTER | DIGIT | '_' | ' ')*? '`' ; LETTER : (UCASE | LCASE); fragment DECIMAL_DIGITS : DIGIT+ '.' DIGIT* ; fragment EXPONENT : 'E' [+-]? DIGIT+ ; fragment DIGIT : [0-9] ; fragment UCASE: [A-Z]; fragment LCASE: [a-z]; fragment A : [aA]; fragment B : [bB]; fragment C : [cC]; fragment D : [dD]; fragment E : [eE]; fragment F : [fF]; fragment G : [gG]; fragment H : [hH]; fragment I : [iI]; fragment J : [jJ]; fragment K : [kK]; fragment L : [lL]; fragment M : [mM]; fragment N : [nN]; fragment O : [oO]; fragment P : [pP]; fragment Q : [qQ]; fragment R : [rR]; fragment S : [sS]; fragment T : [tT]; fragment U : [uU]; fragment V : [vV]; fragment W : [wW]; fragment X : [xX]; fragment Y : [yY]; fragment Z : [zZ]; SIMPLE_COMMENT : '--' ~[\r\n]* '\r'? '\n'? -> skip ; BRACKETED_EMPTY_COMMENT : '/**/' -> skip ; BRACKETED_COMMENT : '/*' ~[+] .*? '*/' -> skip ; WS : [ \t\r\n]+ -> skip ; SPACE : [ \t]+ -> skip ;
build/gnat/rts/common/adainclude/memory.adb
Lucretia/bare_bones
70
4193
<filename>build/gnat/rts/common/adainclude/memory.adb -- -*- Mode: Ada -*- -- Filename : memory.adb -- Description : Memory routines. -- Author : <NAME> -- Created On : Thur Nov 17 15:07:32 2016 -- Licence : See LICENCE in the root directory. with Interfaces; -- with System.Address_To_Access_Conversions; package body Memory is type Byte_Array is array (Integer range <>) of aliased Interfaces.Integer_8; -- package Convert is new System.Address_To_Access_Conversions -- (Object => Byte_Array); function Copy (Dest : System.Address; Source : System.Address; Size : Integer) return System.Address is -- S : Convert.Object_Pointer := Convert.To_Pointer (Source); -- D : Convert.Object_Pointer := Convert.To_Pointer (Dest); S : Byte_Array (0 .. Size) with Address => Source; pragma Import (Convention => C, Entity => S); D : Byte_Array (0 .. Size) with Address => Dest; pragma Import (Convention => C, Entity => D); begin for I in S'Range loop D (I) := S (I); end loop; return Dest; end Copy; end Memory;
src/sounds.asm
dma-homebrew/dhgr
4
247788
;----------------------------------------------------------------------------- ; <NAME> - 2021 ;----------------------------------------------------------------------------- ; A collection of sounds ; ; Look into improving sounds using: ; https://www.applefritter.com/appleii-box/H218ArcadeSoundEditor.htm ;----------------------------------------------------------------------------- ; sound_tone ;----------------------------------------------------------------------------- ; A = tone ; X = duration .proc sound_tone loop1: sta SPEAKER tay loop2: nop nop nop nop ; add some delay for lower notes dey bne loop2 dex bne loop1 rts .endproc ;----------------------------------------------------------------------------- ; sound_shoot ;----------------------------------------------------------------------------- .proc sound_click lda #50 ; tone ldx #10 ; duration jsr sound_tone lda #190 ; tone ldx #3 ; duration jmp sound_tone ; link returns .endproc
bb-runtimes/src/s-bbbopa__leon3-smp.ads
JCGobbi/Nucleo-STM32G474RE
0
6558
<filename>bb-runtimes/src/s-bbbopa__leon3-smp.ads ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . B B . B O A R D _ P A R A M E T E R S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2016-2017, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- -- The port of GNARL to bare board targets was initially developed by the -- -- Real-Time Systems Group at the Technical University of Madrid. -- -- -- ------------------------------------------------------------------------------ -- This package defines board parameters for the leon3 boards package System.BB.Board_Parameters is pragma No_Elaboration_Code_All; pragma Pure; -------------------- -- Hardware clock -- -------------------- Clock_Frequency : constant Positive := 40_000_000; -- Frequency of the system clock Prescaler_Min : constant := 4; -- In order to obtain the highest granularity of the clock we set the -- minimum allowed prescaler division factor, which is 5, corresponding -- to a prescaler reload register value of 4. According to GRLIB manual, -- the minimum allowed prescalar division fact is the number of -- implemented timers (usually 4) + 1. ---------------- -- Interrupts -- ---------------- -- Support of extended interrupts. Must be 0 if extended interrupts are not -- available. Otherwise, extended interrupts are supported (so there are 31 -- interrupts) using this priority level. The priority level must be equal -- to the EIRQ value of the Leon Interrupt controller. Extended_Interrupts_Level : constant := 0; --------------------------- -- Peripheral addressess -- --------------------------- APB_Base : constant := 16#8000_0000#; Irqmp_Base : constant := APB_Base + 16#200#; -- Address of the interrupt controler Timer_Base : constant := APB_Base + 16#300#; -- Address of the general purpose timer unit UART_Base : constant := APB_Base + 16#100#; -- Address of the UART for the console Timer_1_Interrupt : constant := 6; -- IRQ line of the timer ---------- -- CPUS -- ---------- Max_Number_Of_CPUs : constant := 2; -- Maximum number of CPUs end System.BB.Board_Parameters;
Test/1.asm
s10singh97/Microprocessor_Lab
0
21479
<reponame>s10singh97/Microprocessor_Lab ;operations 1 lxi h,00h push h pop psw mvi c,0ffh mov a,c adi 01h mov c,a jnc stop mvi a,01h out 00h stop: hlt
day07/src/main.adb
jwarwick/aoc_2020
3
4317
-- AOC 2020, Day 7 with Ada.Text_IO; use Ada.Text_IO; with Day; use Day; procedure main is bag_colors : constant Natural := valid_bag_colors; nested : constant Natural := nested_bags; begin put_line("Part 1: " & Natural'Image(bag_colors)); put_line("Part 2: " & Natural'Image(nested)); end main;
llvm-gcc-4.2-2.9/gcc/ada/prj-nmsc.ads
vidkidz/crossbridge
1
19090
<reponame>vidkidz/crossbridge<gh_stars>1-10 ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P R J . N M S C -- -- -- -- S p e c -- -- -- -- Copyright (C) 2000-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Check the Naming Scheme of a project file, find the source files private package Prj.Nmsc is -- It would be nicer to have a higher level statement of what these -- procedures do (related to their names), rather than just an english -- language summary of the implementation ??? procedure Check (Project : Project_Id; In_Tree : Project_Tree_Ref; Report_Error : Put_Line_Access; Follow_Links : Boolean; When_No_Sources : Error_Warning); -- Check the object directory and the source directories -- -- Check the library attributes, including the library directory if any -- -- Get the set of specification and implementation suffixes, if any -- -- Check the naming scheme for Ada -- -- Find the Ada source files if any -- -- Check the naming scheme for the supported languages (c, c++, ...) other -- than Ada. Find the source files if any. -- -- If Report_Error is null , use the standard error reporting mechanism -- (Errout). Otherwise, report errors using Report_Error. -- -- If Follow_Links is False, it is assumed that the project doesn't contain -- any file duplicated through symbolic links (although the latter are -- still valid if they point to a file which is outside of the project), -- and that no directory has a name which is a valid source name. -- -- When_No_Ada_Sources indicates what should be done when no Ada sources -- are found in a project where Ada is a language. end Prj.Nmsc;
source/toOPML.applescript
oashour/bookends-tools
0
2198
<filename>source/toOPML.applescript<gh_stars>0 #!/usr/bin/osascript --Script to Export Bookends Notes to OPML file v1.18 --Written by <NAME> (modified by iandol) --07 August 2017 -- --This script converts Bookends references and associated notes into an OPML structured file which can then be imported into Scrivener's research folder. --Each reference is a top level card which contains the Title, Author, Date, Type, Publisher, Abstract, and Bookends citation key --If there are notes associated with a reference, each note creates its own subordinate note card with the Page number (if any), note header, quotes, --comments, and keywords (tags). This allows you to individually review each comment and change its status (label) within Scrivener. -- --The script does some error checking as follows: -- - Strips images from notes -- - Converts double quotes (") to single quotes (') -- - Converts < > to &lt; and &gt; -- - Converts ampersand (&) to &amp; -- --The script is written very modularly so that it can easily be adapted based on changes in OPML syntax, the need to add additional "bad characters", or --changes in the Bookends reference or note delimiters or event calls on run argv --Version------------------------------------------------------------------------ set myVersion to 1.18 --Start Time---------------------------------------------------------------------- set originalT to (time of (current date)) --User Options------------------------------------------------------------------- set showCitation to true -- show temp citation in main text (it will always be shown in the child notes)? set citationPMID to false -- replace the uniqueID with PMID in the temp citation if present set useBibTeXKey to true -- use BiBteX formatting for temp citation set showHeaderOption to false -- ask user about header-only cards? --Variable Setup----------------------------------------------------------------- --Set Counters set nbr_references to 0 set nbr_notes to 0 --Set Control Variables set remove_headers to true set userCanceled to false --Set Old Text Delimiters set tid to AppleScript's text item delimiters set note_delimiter to (ASCII character 10) & (ASCII character 10) set comma to "," set date_separators to {"/", " ", ".", "-"} set digits to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} set era_first_digit to {"1", "2"} --set Bookends Delimiters set be_page_nbr_delimiter to "@" set be_header_delimiter to "#" set be_tag_delimiter to "%" set be_quote_delimiter to ">" set be_cite_delimiter to ";" --set image content tags set open_image_tag to "<iimg>" set end_image_tag to "</iimg>" --Set OPML Text variables set xml_version to "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" & return set opml_version to "<opml version=\"1.0\">" & return set opml_close to "</opml>" & return set opml_header to tab & "<head>" & return set opml_title to tab & tab & "<title>Bookends References Export</title>" & return set opml_date to tab & tab & "<dateCreated>" & (current date) & "</dateCreated>" & return set opml_header_close to tab & "</head>" & return set opml_body to tab & "<body>" & return set opml_body_close to tab & "</body>" & return set opml_outline to tab & tab & "<outline text=\"" set opml_outline_close to tab & tab & "</outline>" & return set opml_notes to " _note=\"" --File Name and Setup----------------------------------------------------------------- set remove_headers to true if showHeaderOption is true then --Ask user to remove header only Bookends notes try set AlertResult to display alert "Remove Bookends Header ONLY note cards?" buttons {"No", "Yes"} default button "Yes" giving up after 2 end try if button returned of AlertResult is "No" then set remove_headers to false end if set homePath to POSIX path of (path to home folder) if (count of argv) > 0 then set myPath to POSIX path of (homePath & (item 1 of argv) & "/") else set myPath to POSIX path of (path to desktop) end if set myFile to (myPath & "BE-Selection.opml") as POSIX file --Interaction with Bookends----------------------------------------------------------- tell application "Bookends" activate --get ids for selected bookends references set selected_ids to «event ToySRUID» "Selection" --test to make sure user selected Bookends references if selected_ids is "" then display dialog "No Boookends References were selected." & return & return & "Please select 1 or more references and restart" return false end if --Write OPML Version, Headers, and Open Body statements to File--------------- my write_to_file(xml_version, myFile, false) my write_to_file(opml_version, myFile, true) my write_to_file(opml_header, myFile, true) my write_to_file(opml_title, myFile, true) my write_to_file(opml_date, myFile, true) my write_to_file(opml_header_close, myFile, true) my write_to_file(opml_body, myFile, true) set selected_ids to words of selected_ids --Process Handiling For Each Reference------------------------------------------ --get citation, quotes, comments, and tags for of the selected references repeat with i from 1 to length of selected_ids --set variables and counters set ref_id to item i of selected_ids set ref_nbr to ref_id set nbr_references to nbr_references + 1 --FOR EACH REFERENCE BUILD THE TOP LEVEL OPML OUTLINE --Reference Author or Editor set ref_author to «event ToySRFLD» ref_id given string:"authors" if ref_author is "" then set ref_author to «event ToySRFLD» ref_id given string:"editors" if ref_author is "" then set ref_title to "No Authors or Editors" else set AppleScript's text item delimiters to linefeed set author_list to every text item of ref_author set author_list_count to length of author_list set AppleScript's text item delimiters to comma set first_author to (first item of author_list as string) set remaining_authors to every text item of first_author if (last character of first_author) is comma then set first_author to first_author's text 1 thru -2 if author_list_count = 1 then set ref_author to (first item of remaining_authors as string) else if author_list_count = 2 then set second_author to (second item of author_list as string) set final_authors to every text item of second_author set ref_author to (first item of remaining_authors as string) & " and " & (first item of final_authors as string) else if author_list_count > 2 then set ref_author to (first item of remaining_authors as string) & " et al." end if set ref_author to my replace_bad_characters(ref_author) end if set AppleScript's text item delimiters to tid --Reference Year set ref_date to «event ToySRFLD» ref_id given string:"thedate" if ref_date is "" then set ref_date to "Undated" else set ref_date to my replace_bad_characters(ref_date) set got_year to false repeat with d in date_separators set AppleScript's text item delimiters to d set date_list to every text item of ref_date set AppleScript's text item delimiters to tid repeat with k in date_list if length of k is 4 then if first character of k is in era_first_digit then set ref_year to k set got_year to true end if end if if got_year then exit repeat end repeat if got_year then exit repeat end repeat if got_year then set ref_date to ref_year end if --Reference Title set ref_title to «event ToySRFLD» ref_id given string:"title" if ref_title is "" then set ref_title to "No Title" else set ref_title to my replace_bad_characters(ref_title) end if --Reference Type (Journal, Book, etc) set ref_ris to «event ToySGUID» ref_id given string:"RIS" if ref_ris is "" then set ref_type to "undefined" else set ref_type to second word of ref_ris as text set ref_type to my replace_bad_characters(ref_type) end if --Reference key (BibTeX key uses user1) set ref_key to «event ToySRFLD» ref_id given string:"user1" --Reference doi set ref_doi to «event ToySRFLD» ref_id given string:"user17" if ref_doi is not "" then set ref_doi to "https://doi.org/" & ref_doi end if --Reference attachments set ref_att to «event ToySRFLD» ref_id given string:"attachments" --Reference url set ref_url to «event ToySRFLD» ref_id given string:"url" --Reference pmid set ref_pmid to «event ToySRFLD» ref_id given string:"user18" --Reference Publisher set ref_publisher to «event ToySRFLD» ref_id given string:"publisher" if ref_publisher is "" then set ref_publisher to "undefined publisher" else set ref_publisher to my replace_bad_characters(ref_publisher) end if --Reference Abstract set ref_abstract to «event ToySRFLD» ref_id given string:"abstract" if ref_abstract is "" then set ref_abstract to "Abstract not provided" else set ref_abstract to my replace_bad_characters(ref_abstract) end if --Build Cite Key if useBibTeXKey is true then set cite_key to "[@" & ref_key & "]" else if citationPMID is true then set cite_key to "{" & ref_author & ", " & ref_date & ", #" & ref_pmid & "}" else set cite_key to "{" & ref_author & ", " & ref_date & ", #" & ref_nbr & "}" end if --Form the Reference Card OPML Outline Statement set ref_text to opml_outline & ref_author & ", " & ref_date & " (ID:" & ref_nbr & ")\"" & opml_notes & ref_title & "&#10;" & return as text if showCitation is true then if cite_key is not "" then set ref_text to ref_text & "Cite: " & cite_key & "&#10;" & return as text end if set ref_text to ref_text & "---------------------------&#10;" & return & ref_abstract & "&#10;" & return as text if ref_url is not "" then set ref_text to ref_text & "URL: &lt;" & my encodeURL(ref_url) & "&gt;&#10;" & return as text if ref_doi is not "" then set ref_text to ref_text & "DOI: &lt;" & my encodeURL(ref_doi) & "&gt;&#10;" & return as text if ref_pmid is not "" then set ref_text to ref_text & "PMID: " & ref_pmid & "&#10;" & return as text if ref_att is not "" then set ref_text to ref_text & "Attachments: " & my replace_bad_characters(ref_att) & "&#10;" & return as text if ref_type is not "" then set ref_text to ref_text & "Type: " & ref_type & "&#10;" & return as text set ref_text to ref_text & "Backlink: &lt;bookends://sonnysoftware.com/" & ref_nbr & "&gt;\">" & return as text my write_to_file(ref_text, myFile, true) --Process Handiling For Each Note within Each Reference------------ --get notes from this reference set ref_notes to «event ToySRFLD» ref_id given string:"notes" --extract each note and create separate note card (subordinate outline) set AppleScript's text item delimiters to note_delimiter set ref_notes to text items of ref_notes set AppleScript's text item delimiters to tid repeat with p from 1 to length of ref_notes --reset variables set header_only to false set keywords to false set quotes to false set ref_note_header to " " set ref_page_nbr to "##" set ref_note_title to " " set ref_note_text to " " set ref_tags to " " set ref_quote to " " set ref_note_quote to " " set ref_note_comment to "" -- ref_note_item is an individual note within the note stream set ref_note_item to item p of ref_notes --parse note_item for Bookends header and page number if ref_note_item is not "" then set ref_note_list to paragraphs of ref_note_item --test and process headers if first character in ref_note_item is be_header_delimiter then --header set ref_note_header to first paragraph in ref_note_item --determine if header only and set note contents to rest of notes if (count of ref_note_list) > 1 then set ref_note_text to text (second paragraph of ref_note_item) thru -1 of ref_note_item else set ref_note_text to "Header Only" if remove_headers is true then set header_only to true end if --set header, but first test if header also includes page number if second character in ref_note_item is be_page_nbr_delimiter then --with page number set ref_page_nbr to "@" & first word of ref_note_item set ref_note_header to text (second word of ref_note_header) thru -1 of ref_note_header else --without page number set ref_note_header to text (first word of ref_note_header) thru -1 of ref_note_header end if else --no header, set title to untitled note and set contents to all of note set ref_note_header to "Untitled Note" set ref_note_text to ref_note_item end if --test for page numbers if first character in ref_note_item is be_page_nbr_delimiter then set ref_page_nbr to "@" & first word of ref_note_item set ref_note_text to text (second word of ref_note_item) thru -1 of ref_note_item end if --form the note card title set ref_note_title to ref_page_nbr & " - " & ref_note_header --test note title for well formed contents (bad opml characters) set ref_note_title to my replace_bad_characters(ref_note_title) --Process Handling For Each Line (Paragraph) within Each Note --extract each line (paragraph) of the note set AppleScript's text item delimiters to (ASCII character 10) set ref_note_text to text items of ref_note_text set AppleScript's text item delimiters to tid repeat with n from 1 to length of ref_note_text --get and process each paragraph (segement) of the note set ref_note_body to item n of ref_note_text --test notes for well formed contents (ie. no images) if (open_image_tag is in ref_note_body) then set image_start to (offset of open_image_tag in ref_note_body) set image_end to (offset of end_image_tag in ref_note_body) + (length of end_image_tag) - 1 set first_half to text 1 thru image_start of ref_note_body set last_half to text from image_end to -1 of ref_note_body set ref_note_body to first_half & " -- Graphics Image Removed --" & last_half end if --test notes for well formed contents (bad opml characters) set ref_note_body to my replace_bad_characters(ref_note_body) if ref_note_body is not "" then --clear temp vars set temp_tag to "" set temp_quote to "" set no_comment_flag to false --test for tags if first character in ref_note_body is be_tag_delimiter then set temp_tags to ref_note_body set AppleScript's text item delimiters to be_tag_delimiter set temp_tags to text items of temp_tags set AppleScript's text item delimiters to space set temp_tags to temp_tags as text set AppleScript's text item delimiters to tid set ref_tags to ref_tags & temp_tags set no_comment_flag to true set keywords to true end if --test for bookends quotes if first character in ref_note_body is be_quote_delimiter then set temp_quote to ref_note_body set temp_quote to text (second character of temp_quote) thru -1 of temp_quote set ref_note_quote to ref_quote & temp_quote set no_comment_flag to true set quotes to true end if --form note comments if no_comment_flag is false then set ref_note_comment to ref_note_comment & ref_note_body & return end if end repeat --form the note card OPML statements set ref_key to "Keywords: " & ref_tags & "&#10;" & return set ref_quote to "Quote(s): " & ref_note_quote & "&#10;" & return set ref_comment to "Comments: " & ref_note_comment & "&#10;" & return set cite to cite_key if useBibTeXKey is true and ref_page_nbr is not "##" then set page_nbr to text 2 thru -1 of ref_page_nbr set cite to text 1 thru -2 of cite set cite to cite & " pp." & page_nbr & "]" else if ref_page_nbr is not "##" then set cite to text 1 thru -2 of cite set cite to cite & " " & ref_page_nbr & "}" end if set ref_cite_key to "Citation Key: " & cite set note_card to "" as text if keywords is true then set note_card to note_card & ref_key if quotes is true then set note_card to note_card & ref_quote set note_card to note_card & ref_comment & ref_cite_key set ref_note_contents to tab & opml_outline & ref_note_title & "\"" & opml_notes & note_card & "\"/>" & return as text --write contents of note if header_only is false then my write_to_file(ref_note_contents, myFile, true) set nbr_notes to nbr_notes + 1 end if end if end repeat my write_to_file(opml_outline_close, myFile, true) end repeat end tell my write_to_file(opml_body_close, myFile, true) my write_to_file(opml_close, myFile, true) set newT to (time of (current date)) set diffT to newT - originalT display notification "Complete" & return & return & "Exported " & nbr_references & " References and " & nbr_notes & " Notes in " & diffT & " seconds" with title "Bookends to OPML exporter V" & myVersion return true end run --end of script ************************************************** --subroutine area ************************************************ --write_to_this_file subroutine on write_to_file(this_data, target_file, append_data) try set target_file to target_file as string set open_target_file to open for access target_file with write permission if append_data is false then set eof of the open_target_file to 0 write this_data as «class utf8» to open_target_file starting at eof close access open_target_file return true on error errMsg number errNum if errNum = -49 then close access target_file set open_target_file to open for access target_file with write permission if append_data is false then set eof of the open_target_file to 0 write this_data as «class utf8» to open_target_file starting at eof close access open_target_file return true else display dialog "Write Subroutine Error:" & return & "Target_File: " & target_file & return & "Open_Target_File: " & open_target_file & return & "Error: " & errNum & " - " & errMsg close access open_target_file return false end if end try end write_to_file --test for well formed contents (bad opml characters) subroutine on replace_bad_characters(input_string) try --set arrays for error checking set bad_opml_char_array to {"\"", "&", "<", ">"} set good_opml_char_array to {"'", "&amp;", "&lt;", "&gt;"} set input_string to input_string as string set output_string to "" set good_char to "" repeat with x from 1 to count of characters in input_string set good_char to character x of input_string repeat with y from 1 to length of bad_opml_char_array if good_char is equal to item y of bad_opml_char_array then set good_char to item y of good_opml_char_array end repeat set output_string to output_string & good_char end repeat return output_string on error errMsg number errNum display dialog "Error replacing bad OPML characters. Error Number: " & errNum & " - " & errMsg return false end try end replace_bad_characters on findAndReplaceInText(theText, theSearchString, theReplacementString) set AppleScript's text item delimiters to theSearchString set theTextItems to every text item of theText set AppleScript's text item delimiters to theReplacementString set theText to theTextItems as string set AppleScript's text item delimiters to "" return theText end findAndReplaceInText on encodeCharacter(theCharacter) set theASCIINumber to (the ASCII number theCharacter) set theHexList to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"} set theFirstItem to item ((theASCIINumber div 16) + 1) of theHexList set theSecondItem to item ((theASCIINumber mod 16) + 1) of theHexList return ("%" & theFirstItem & theSecondItem) as string end encodeCharacter on encodeText(theText, encodeCommonSpecialCharacters, encodeExtendedSpecialCharacters) set theStandardCharacters to "abcdefghijklmnopqrstuvwxyz0123456789" set theCommonSpecialCharacterList to "$+!'/?;&@=#%><{}\"~`^\\|*" set theExtendedSpecialCharacterList to ".-_:" set theAcceptableCharacters to theStandardCharacters if encodeCommonSpecialCharacters is false then set theAcceptableCharacters to theAcceptableCharacters & theCommonSpecialCharacterList if encodeExtendedSpecialCharacters is false then set theAcceptableCharacters to theAcceptableCharacters & theExtendedSpecialCharacterList set theEncodedText to "" repeat with theCurrentCharacter in theText if theCurrentCharacter is in theAcceptableCharacters then set theEncodedText to (theEncodedText & theCurrentCharacter) else set theEncodedText to (theEncodedText & encodeCharacter(theCurrentCharacter)) as string end if end repeat return theEncodedText end encodeText on encodeURL(theText) set theEncodedText to encodeText(theText, true, false) set theEncodedText to findAndReplaceInText(theEncodedText, "%2F", "/") return theEncodedText end encodeURL
Examples/conversion-routines/wordbin2hexascii.asm
agguro/linux-nasm
6
178013
<gh_stars>1-10 ;name: wordbin2hexascii.asm ; ;description: branch free conversion of a word in di to ascii in eax. ; ;build: nasm -felf64 wordbin2hexascii.asm -o wordbin2hexascii.o bits 64 global wordbin2hexascii section .text wordbin2hexascii: push rbx push rcx mov ax,di ;value in ax ;make group of nibble separated by a zero ror rax,8 rol ax,4 shr al,4 rol rax,16 shr ax,4 shr al,4 mov ebx,0x06060606 mov ecx,0xF0F0F0F0 add eax,ebx ;add 0x06 to each nibble and ecx,eax ;keep overflow of previous result sub eax,ebx ;subtract 0x06 from each nibble shr ecx,1 sub eax,ecx ;subtract from each nibble shr ecx,3 sub eax,ecx shr ebx,1 add ebx,ecx shl ebx,4 or eax,ebx pop rcx pop rbx ret
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48.log_21829_2041.asm
ljhsiun2/medusa
9
179684
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r8 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x4f36, %r8 clflush (%r8) nop nop nop cmp $45109, %rbp mov (%r8), %eax nop nop sub $33802, %r14 lea addresses_WT_ht+0x11066, %rsi lea addresses_WC_ht+0x12d66, %rdi nop nop nop nop nop and %rbx, %rbx mov $102, %rcx rep movsq nop nop nop nop nop cmp $62645, %rbp lea addresses_normal_ht+0x4b66, %rcx nop nop nop and $42027, %r8 mov (%rcx), %esi nop nop xor $31316, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r8 pop %r14 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r14 push %r8 push %r9 push %rbx push %rdx // Store lea addresses_WC+0xb1cc, %rbx nop nop nop sub $12087, %r14 mov $0x5152535455565758, %rdx movq %rdx, (%rbx) nop nop nop nop nop and %rdx, %rdx // Store lea addresses_WT+0x1d526, %r9 nop nop nop nop nop sub $12040, %r14 mov $0x5152535455565758, %r11 movq %r11, %xmm0 vmovups %ymm0, (%r9) nop nop nop nop nop inc %rbx // Load lea addresses_UC+0x11c66, %rdx add %r13, %r13 mov (%rdx), %r14d nop dec %rdx // Store lea addresses_A+0xdce6, %r9 nop nop nop nop sub %r11, %r11 movl $0x51525354, (%r9) nop add $25012, %r9 // Faulty Load lea addresses_UC+0x10866, %r14 nop nop cmp %r11, %r11 vmovups (%r14), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %r8 lea oracles, %r13 and $0xff, %r8 shlq $12, %r8 mov (%r13,%r8,1), %r8 pop %rdx pop %rbx pop %r9 pop %r8 pop %r14 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': True, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': True, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': True}} {'49': 21760, '08': 1, '00': 68} 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 00 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 00 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 00 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 */
src/shaders/h264/mc/scoreboard_save_AS.asm
tizenorg/platform.upstream.libva-intel-driver
0
104946
<filename>src/shaders/h264/mc/scoreboard_save_AS.asm<gh_stars>0 /* * Save scoreboard data before content switching * Copyright © <2010>, Intel Corporation. * * This program is licensed under the terms and conditions of the * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at * http://www.opensource.org/licenses/eclipse-1.0.php. * */ // Module name: scoreboard_save_AS.asm // // Save scoreboard data before content switching // // // r1 - r35 need to be saved // They are saved in a 2D surface with width of 32 and height of 64. // Each row corresponds to one GRF register in the following order // r4 - r35 : Scoreboard message // r1 - r3 : Scoreboard kernel control data mov (8) MSGHDR<1>:ud r0.0<8;8,1>:ud // Initialize message header payload with r0 mov (1) MSGHDR.2:ud 0x0007001f:ud // for 8 registers mov (2) MSGHDR.0:ud 0:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r4 - r11 mov (1) MSGHDR.1:ud 8:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+8)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r12 - r19 mov (1) MSGHDR.1:ud 16:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+16)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r20 - r27 mov (1) MSGHDR.1:ud 24:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+24)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r28 - r35 mov (1) MSGHDR.1:ud 32:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+32)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r36 - r43 mov (1) MSGHDR.1:ud 40:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+40)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r44 - r51 mov (1) MSGHDR.1:ud 48:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+48)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r52 - r59 mov (1) MSGHDR.1:ud 56:ud $for(0; <8; 2) { mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+56)REGION(8,1) {Compr} } send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r60 - r67 // End of scoreboard_save_AS
archive/agda-1/LiteralSequent.agda
m0davis/oscar
0
6214
{-# OPTIONS --allow-unsolved-metas #-} module LiteralSequent where open import Sequent open import IsLiteralSequent record LiteralSequent : Set where constructor ⟨_⟩ field {sequent} : Sequent isLiteralSequent : IsLiteralSequent sequent open LiteralSequent public open import OscarPrelude private module _ where pattern ⟪_,_⟫ h s = ⟨_⟩ {h} s pattern ⟪_⟫ h = (⟨_⟩ {h} _) instance EqLiteralSequent : Eq LiteralSequent Eq._==_ EqLiteralSequent ⟪ Φ₁ ⟫ ⟪ Φ₂ ⟫ with Φ₁ ≟ Φ₂ Eq._==_ EqLiteralSequent ⟨ !Φ₁ ⟩ ⟨ !Φ₂ ⟩ | yes refl with !Φ₁ ≟ !Φ₂ Eq._==_ EqLiteralSequent _ _ | yes refl | yes refl = yes refl Eq._==_ EqLiteralSequent ⟨ Φ₁ ⟩ ⟨ Φ₂ ⟩ | yes refl | no !Φ₁≢!Φ₂ = no λ {refl → !Φ₁≢!Φ₂ refl} Eq._==_ EqLiteralSequent ⟨ Φ₁ ⟩ ⟨ Φ₂ ⟩ | no Φ₁≢Φ₂ = no λ {refl → Φ₁≢Φ₂ refl} module _ where open import HasNegation open import IsLiteralFormula instance HasNegationLiteralSequent : HasNegation LiteralSequent HasNegation.~ HasNegationLiteralSequent ⟨ atomic 𝑃 τs ╱ φˢs ⟩ = ⟨ logical 𝑃 τs ╱ φˢs ⟩ HasNegation.~ HasNegationLiteralSequent ⟨ logical 𝑃 τs ╱ φˢs ⟩ = ⟨ atomic 𝑃 τs ╱ φˢs ⟩ open import 𝓐ssertion instance 𝓐ssertionLiteralSequent : 𝓐ssertion LiteralSequent 𝓐ssertionLiteralSequent = record {} open import HasSatisfaction instance HasSatisfactionLiteralSequent : HasSatisfaction LiteralSequent HasSatisfaction._⊨_ HasSatisfactionLiteralSequent I Φ = I ⊨ sequent Φ open import HasDecidableValidation instance HasDecidableValidationLiteralSequent : HasDecidableValidation LiteralSequent HasDecidableValidationLiteralSequent = {!!}
lib/target/msx/classic/rom.asm
ahjelm/z88dk
640
83582
<reponame>ahjelm/z88dk ; startup == 3 ; msx cartridge rom ; April 2014 ; submitted by Timmy ; For cartridge I am not sure what facilities are available from the MSX ; system, if any. So this CRT only provides the bare minimum. ; ; Declarations ; defc TAR__clib_exit_stack_size = 0 defc TAR__register_sp = -0xfc4a INCLUDE "crt/classic/crt_rules.inc" ; ; Main Code Entrance Point ; IFNDEF CRT_ORG_CODE defc CRT_ORG_CODE = $4000 ENDIF org CRT_ORG_CODE ; ROM header defm "AB" defw start defw 0 ;CallSTMT handler defw 0 ;Device handler defw 0 ;basic defs 6 start: di INCLUDE "crt/classic/crt_init_sp.asm" ei ; port fixing; required for ROMs ; port fixing = set the memory configuration, must be first! in a,($A8) and a, $CF ld d,a in a,($A8) and a, $0C add a,a add a,a or d out ($A8),a INCLUDE "crt/classic/crt_init_atexit.asm" call crt0_init_bss IF DEFINED_USING_amalloc INCLUDE "crt/classic/crt_init_amalloc.asm" ENDIF call _main ; end program cleanup: endloop: di halt jr endloop l_dcal: jp (hl) ;Used for call by function pointer GLOBAL banked_call ; Memory address for changing the mapping at $8000 and $a000 ; If _A000 is 0 then we work with 16kb banks ; These values are by default the KONAMI mapper IF DEFINED_MAPPER_ASCII16 = 1 defc MAPPER_ADDRESS_4000 = $6000 defc MAPPER_ADDRESS_6000 = $0000 defc MAPPER_ADDRESS_8000 = $7000 defc MAPPER_ADDRESS_A000 = $0000 ELIF DEFINED_MAPPER_ASCII8 = 1 defc MAPPER_ADDRESS_4000 = $6000 defc MAPPER_ADDRESS_6000 = $6800 defc MAPPER_ADDRESS_8000 = $7000 defc MAPPER_ADDRESS_A000 = $7800 ELIF DEFINED_MAPPER_KONAMI = 1 ; Konami Mapper without SCC defc MAPPER_ADDRESS_4000 = $0000 defc MAPPER_ADDRESS_6000 = $6000 defc MAPPER_ADDRESS_8000 = $8000 defc MAPPER_ADDRESS_A000 = $A000 ELSE defc MAPPER_ADDRESS_4000 = $0000 defc MAPPER_ADDRESS_6000 = $0000 defc MAPPER_ADDRESS_8000 = $0000 defc MAPPER_ADDRESS_A000 = $0000 ENDIF ; Bias the Mapper detection heuristics to try to overcome any ; collisions in data. IF MAPPER_ADDRESS_4000 != 0 ld (MAPPER_ADDRESS_4000),a ENDIF IF MAPPER_ADDRESS_6000 != 0 ld (MAPPER_ADDRESS_6000),a ENDIF IF MAPPER_ADDRESS_8000 != 0 ld (MAPPER_ADDRESS_8000),a ENDIF IF MAPPER_ADDRESS_A000 != 0 ld (MAPPER_ADDRESS_A000),a ENDIF IF MAPPER_ADDRESS_4000 != 0 ld (MAPPER_ADDRESS_4000),a ENDIF IF MAPPER_ADDRESS_6000 != 0 ld (MAPPER_ADDRESS_6000),a ENDIF IF MAPPER_ADDRESS_8000 != 0 ld (MAPPER_ADDRESS_8000),a ENDIF IF MAPPER_ADDRESS_A000 != 0 ld (MAPPER_ADDRESS_A000),a ENDIF IF MAPPER_ADDRESS_4000 != 0 ld (MAPPER_ADDRESS_4000),a ENDIF IF MAPPER_ADDRESS_6000 != 0 ld (MAPPER_ADDRESS_6000),a ENDIF IF MAPPER_ADDRESS_8000 != 0 ld (MAPPER_ADDRESS_8000),a ENDIF IF MAPPER_ADDRESS_A000 != 0 ld (MAPPER_ADDRESS_A000),a ENDIF IF MAPPER_ADDRESS_8000 != 0 banked_call: pop hl ; Get the return address ld (mainsp),sp ld sp,(tempsp) ld a,(__current_bank) push af ; Push the current bank onto the stack ld e,(hl) ; Fetch the call address inc hl ld d,(hl) inc hl ld a,(hl) ; ...and page IF MAPPER_ADDRESS_A000 != 0 add a ; For 8kb pages we have to double - our ; model is for 16kb pages ENDIF inc hl inc hl ; Yes this should be here push hl ; Push the real return address ld (tempsp),sp ld sp,(mainsp) ld (__current_bank),a ld (MAPPER_ADDRESS_8000),a IF MAPPER_ADDRESS_A000 != 0 inc a ld (MAPPER_ADDRESS_A000),a ENDIF ld l,e ld h,d call l_dcal ; jp(hl) ld (mainsp),sp ld sp,(tempsp) pop bc ; Get the return address pop af ; Pop the old bank ld (tempsp),sp ld sp,(mainsp) ld (__current_bank),a ld (MAPPER_ADDRESS_8000),a IF MAPPER_ADDRESS_A000 != 0 inc a ld (MAPPER_ADDRESS_A000),a ENDIF push bc ret ENDIF IFNDEF CRT_ORG_BSS defc CRT_ORG_BSS = $C000 ; Ram variables are kept in RAM in high memory ENDIF defc __crt_org_bss = CRT_ORG_BSS ; If we were given a model then use it IFDEF CRT_MODEL defc __crt_model = CRT_MODEL ELSE defc __crt_model = 1 ENDIF INCLUDE "crt/classic/crt_runtime_selection.asm" INCLUDE "crt/classic/crt_section.asm" SECTION data_driver IF MAPPER_ADDRESS_8000 != 0 IF MAPPER_ADDRESS_A000 == 0 __current_bank: defb 1 ELSE __current_bank: defb 2 ENDIF ENDIF SECTION bss_driver mainsp: defw 0 tempstack: defs CLIB_BANKING_STACK_SIZE SECTION data_driver tempsp: defw tempstack + CLIB_BANKING_STACK_SIZE IF MAPPER_ADDRESS_8000 != 0 INCLUDE "target/msx/classic/megarom.asm" ENDIF
orka/src/orka/implementation/orka-containers-bounded_vectors.adb
onox/orka
52
1921
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2018 onox <<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. package body Orka.Containers.Bounded_Vectors is function Length (Container : Vector) return Length_Type is (Container.Length); function Is_Empty (Container : Vector) return Boolean is (Length (Container) = 0); function Is_Full (Container : Vector) return Boolean is (Length (Container) = Container.Capacity); procedure Append (Container : in out Vector; Elements : Vector) is Start_Index : constant Index_Type := Container.Length + Index_Type'First; Stop_Index : constant Index_Type'Base := Start_Index + Elements.Length - 1; procedure Copy_Elements (Elements : Element_Array) is begin Container.Elements (Start_Index .. Stop_Index) := Elements; end Copy_Elements; begin Elements.Query (Copy_Elements'Access); Container.Length := Container.Length + Elements.Length; end Append; procedure Append (Container : in out Vector; Element : Element_Type) is Index : constant Index_Type := Container.Length + Index_Type'First; begin Container.Length := Container.Length + 1; Container.Elements (Index) := Element; end Append; procedure Remove_Last (Container : in out Vector; Element : out Element_Type) is Index : constant Index_Type := Container.Length + Index_Type'First - 1; begin Element := Container.Elements (Index); Container.Elements (Index .. Index) := (others => <>); Container.Length := Container.Length - 1; end Remove_Last; procedure Clear (Container : in out Vector) is begin Container.Elements := (others => <>); Container.Length := 0; end Clear; procedure Query (Container : Vector; Process : not null access procedure (Elements : Element_Array)) is Last_Index : constant Index_Type'Base := Container.Length + Index_Type'First - 1; begin Process (Container.Elements (Index_Type'First .. Last_Index)); end Query; procedure Update (Container : in out Vector; Index : Index_Type; Process : not null access procedure (Element : in out Element_Type)) is begin Process (Container.Elements (Index)); end Update; function Element (Container : Vector; Index : Index_Type) return Element_Type is (Container.Elements (Index)); function Element (Container : aliased Vector; Position : Cursor) return Element_Type is begin if Position = No_Element then raise Constraint_Error; elsif Position.Object.all /= Container then raise Program_Error; else return Element (Container, Position.Index); end if; end Element; function Constant_Reference (Container : aliased Vector; Index : Index_Type) return Constant_Reference_Type is begin return Constant_Reference_Type'(Value => Container.Elements (Index)'Access); end Constant_Reference; function Constant_Reference (Container : aliased Vector; Position : Cursor) return Constant_Reference_Type is begin if Position = No_Element then raise Constraint_Error; elsif Position.Object.all /= Container then raise Program_Error; else return Constant_Reference (Container, Position.Index); end if; end Constant_Reference; function Reference (Container : aliased in out Vector; Index : Index_Type) return Reference_Type is begin return Reference_Type'(Value => Container.Elements (Index)'Access); end Reference; function Reference (Container : aliased in out Vector; Position : Cursor) return Reference_Type is begin if Position = No_Element then raise Constraint_Error; elsif Position.Object.all /= Container then raise Program_Error; else return Reference (Container, Position.Index); end if; end Reference; function Iterate (Container : Vector) return Vector_Iterator_Interfaces.Reversible_Iterator'Class is begin return Iterator'(Container => Container'Unchecked_Access); end Iterate; overriding function First (Object : Iterator) return Cursor is begin if Object.Container.all.Is_Empty then return No_Element; else return Cursor'(Object => Object.Container, Index => Index_Type'First); end if; end First; overriding function Last (Object : Iterator) return Cursor is begin if Object.Container.all.Is_Empty then return No_Element; else return Cursor'(Object => Object.Container, Index => Object.Container.all.Length); end if; end Last; overriding function Next (Object : Iterator; Position : Cursor) return Cursor is begin if Position = No_Element then raise Constraint_Error; elsif Position.Index = Position.Object.Length + Index_Type'First - 1 then return No_Element; else return Cursor'(Position.Object, Position.Index + 1); end if; end Next; overriding function Previous (Object : Iterator; Position : Cursor) return Cursor is begin if Position = No_Element then raise Constraint_Error; elsif Position.Index = Index_Type'First then return No_Element; else return Cursor'(Position.Object, Position.Index - 1); end if; end Previous; end Orka.Containers.Bounded_Vectors;
Transynther/x86/_processed/US/_st_zr_sm_/i7-7700_9_0x48.log_21829_141.asm
ljhsiun2/medusa
9
86829
<reponame>ljhsiun2/medusa<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r13 push %r15 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x3599, %rsi lea addresses_WT_ht+0x1e651, %rdi clflush (%rsi) clflush (%rdi) nop sub $7561, %rbp mov $34, %rcx rep movsb nop nop and $46447, %r15 lea addresses_UC_ht+0x18609, %rsi add $14610, %r15 movb $0x61, (%rsi) nop nop xor %rcx, %rcx lea addresses_normal_ht+0x16fa1, %rsi lea addresses_D_ht+0x25d1, %rdi add %r13, %r13 mov $54, %rcx rep movsq nop nop nop and %r15, %r15 lea addresses_WT_ht+0x19510, %rsi lea addresses_normal_ht+0x71d1, %rdi nop nop nop inc %rbx mov $4, %rcx rep movsb nop nop nop nop inc %r13 lea addresses_A_ht+0x17385, %rsi lea addresses_WC_ht+0x15c51, %rdi xor %rbp, %rbp mov $110, %rcx rep movsb nop nop sub %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r15 push %r9 push %rax push %rbp push %rbx push %rsi // Store lea addresses_US+0x45d1, %r9 nop nop nop nop dec %rsi movb $0x51, (%r9) nop nop nop and %rax, %rax // Faulty Load lea addresses_US+0x45d1, %r15 nop nop and $24598, %r9 mov (%r15), %rsi lea oracles, %r15 and $0xff, %rsi shlq $12, %rsi mov (%r15,%rsi,1), %rsi pop %rsi pop %rbx pop %rbp pop %rax pop %r9 pop %r15 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'00': 1, '51': 21828} 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 */
src/strings/modify.asm
majioa/fleco
0
160398
;[]-----------------------------------------------------------------[] ;| MODIFY.ASM -- string modification functions | ;[]-----------------------------------------------------------------[] ; ; $Copyright: 2005$ ; $Revision: 1.1.1.1 $ ; ;AnsiString& __fastcall Delete(int index, int count); ;AnsiString& __fastcall Insert(const AnsiString& str, int index); ;AnsiString __fastcall LowerCase() const; ;friend AnsiString __fastcall operator +(const char* lhs, const AnsiString& rhs); ;AnsiString __fastcall operator +(const AnsiString& rhs) const; ;AnsiString& __fastcall operator +=(const AnsiString& rhs); ;AnsiString __fastcall Trim() const; ;AnsiString __fastcall TrimLeft() const; ;AnsiString __fastcall TrimRight() const; ;void __fastcall Unique(); ;AnsiString __fastcall UpperCase() const; %include 'constant.inc' GLOBAL @FastString@$badd$qqrrx10FastString7Variant GLOBAL @FastString@Add$qqrrx10FastString GLOBAL @FastString@$bpls$xqqrrx10FastString7Variant GLOBAL @FastString@$bpls$xqqrrx10FastString GLOBAL @FastString@Insert$qqrrx10FastStringui GLOBAL @FastString@Delete$qqrrx10FastString GLOBAL @FastString@Delete$qqrruiui GLOBAL @FastString@Trim$xqqrv GLOBAL @FastString@TrimRight$xqqrv GLOBAL @FastString@TrimLeft$xqqrv GLOBAL @FastString@Unique$qqrv GLOBAL @FastString@LowerCase$qqrrv GLOBAL @FastString@UpperCase$qqrrv ; EXTERN CopyString ; EXTERN StringRedim section _TEXT @FastString@$badd$qqrrx10FastString7Variant: @FastString@Add$qqrrx10FastString: ret @FastString@$bpls$xqqrrx10FastString7Variant: ret @FastString@$bpls$xqqrrx10FastString: ret @FastString@Insert$qqrrx10FastStringui: ret @FastString@Delete$qqrrx10FastString: ret @FastString@Delete$qqrruiui: ret @FastString@Trim$xqqrv: ret @FastString@TrimRight$xqqrv: ret @FastString@TrimLeft$xqqrv: ret @FastString@Unique$qqrv: mov edx, [eax] or edx, edx jz Unique_exit lock dec dword ptr[edx-SIZEOF_FASTSTRING+FastString.RefCount] jnz Unique_make_new_string lock inc dword ptr[edx-SIZEOF_FASTSTRING+FastString.RefCount] Unique_exit: ret Unique_make_new_string: push ebx push esi push edi lea esi, [edx-SIZEOF_FASTSTRING+FastString.Length] mov ecx, [edx-SIZEOF_FASTSTRING+FastString.MemBlock] mov ecx, [ecx+MemBlock.Size] stc ;;` call StringRedim lodsd stosd lea ecx, [eax + SIZEOF_FASTSTRING - 2 * SIZEOF_INT] ; call SetupDefaultCodepage ;; jmp CopyString @FastString@LowerCase$qqrrv: ret @FastString@UpperCase$qqrrv: ret
data/pokemon/dex_entries/magmortar.asm
AtmaBuster/pokeplat-gen2
6
11943
<gh_stars>1-10 db "BLAST@" ; species name db "It will blast" next "fireballs of over" next "3,600 degrees" page "fahrenheit out of" next "its arms. Its" next "breath sizzles.@"
programs/oeis/295/A295866.asm
karttu/loda
0
24321
; A295866: Number of decimal digits in the number of partitions of n. ; 1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8 add $0,4 lpb $0,1 sub $0,1 add $2,1 sub $0,$2 trn $0,1 mov $1,$0 add $0,3 trn $0,$2 trn $1,5 add $1,$2 add $1,4 lpe sub $1,6
Common/ASM/Timer0_ASM.asm
anton-qiu/QuickRTOS
0
175948
<reponame>anton-qiu/QuickRTOS $INCLUDE (.\Common\ASM\include.asm) ;; For some reason, Keil does not allow 2 segment in the same file. ;;AREA Timer_ASM_Data, DATA, READWRITE, ALIGN=4 ;;RSEG Timer_ASM_Data ;;vpTimer0Counter1_ISR: ;; DSD 1 ;;vpTimer0Counter2_ISR: ;; DSD 1 ;;vpTimer0Counter3_ISR: ;; DSD 1 ;;vpTimer0Counter4_ISR: ;; DSD 1 AREA Timer_ASM_Code, CODE // READONLY, ALIGN=4 RSEG Timer_ASM_Code ; ENTRY EXTERN DATA (vpTimer0Counter0_ISR) EXTERN DATA (vpTimer0Counter1_ISR) EXTERN DATA (vpTimer0Counter2_ISR) EXTERN DATA (vpTimer0Counter3_ISR) T0_INT_EN_MASK EQU 0x10 T0_INT_NUMBER EQU 0x04 T0_IR_ALL EQU 0xFF T0_IR_MR0_MASK EQU 0x01 T0_IR_MR1_MASK EQU 0x02 T0_IR_MR2_MASK EQU 0x04 T0_IR_MR3_MASK EQU 0x08 T0_IR_CR0_MASK EQU 0x10 T0_IR_CR1_MASK EQU 0x20 T0_IR_CR2_MASK EQU 0x40 T0_IR_CR3_MASK EQU 0x80 T0_TCR_ENABLE EQU 0x01 T0_TCR_DISABLE EQU 0x00 T0_TCR_RESET EQU 0x02 T0_MCR0_MASK EQU 0x0007 T0_MCR1_MASK EQU 0x0038 T0_MCR2_MASK EQU 0x01C0 T0_MCR3_MASK EQU 0x0E00 ;;/******************************************************************************* ;;* MACRO Name : ;;* Description : ;;* ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ TEMPLATE MACRO /* Currently no parameters */ //LOCAL local-labels /* Currently no LOCAL */ ENDM ;;/******************************************************************************* ;;* Function Name : void Timer0_ISR(void) INTERRUPT ;;* Description : Main Entry point to the Timer 0 ISR. This function will ;;* dispatch the execution to the corresponding handler depends on the ;;* interrupt source (Match on Counter 0, or Counter 1, Counter 2, or Counter 3) ;;*--------------------------------------------------------------------- ;;* Global Variable : vpTimer0Counter0_ISR, vpTimer0Counter1_ISR, ;;* vpTimer0Counter2_ISR, vpTimer0Counter3_ISR ;;* Input Parameter : - ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 16/02/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_ISR CODE32 Timer0_ISR PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_ISR?A Timer0_ISR?A PROC CODE32 ENDIF STMFD R13!, {R0-R12} MRS R4, SPSR TST R4, #0x00000020 ;; Check ARM/Thumb SUBEQ LR, LR, #4 ;; Set ARM return SUBNE LR, LR, #2 ;; Set Thumb return STMFD SP!, {LR} LDR R4, =T0IR ;; Read Timer 0 Interrupt Register LDR R5,[R4] MOV R8, #T0_IR_MR0_MASK ;; Counter Increment Interrupt Flag TST R5, R8 ;; Check the current PIN value BEQ Counter1_Int ;; skip if zero ;; Handle for Counter 0 Interrupt ;;----------------------------------- LDR R6, =vpTimer0Counter0_ISR LDR R5, [R6] MOV LR, PC ;; Return Address BX R5 ;; CALL vpTimer0Counter0_ISR() Counter1_Int: LDR R4, =T0IR ;; Read Timer 0 Interrupt Register LDR R5,[R4] MOV R8, #T0_IR_MR1_MASK ;; Alarm Interrupt Flag TST R5, R8 ;; Check the current PIN value BEQ Counter2_Int ;; skip if zero ;; Handle for Counter 1 Interrupt ;;----------------------------------- LDR R6, =vpTimer0Counter1_ISR LDR R5, [R6] MOV LR, PC ;; Return Address BX R5 ;; CALL vpTimer0Counter1_ISR() Counter2_Int: LDR R4, =T0IR ;; Read Timer 0 Interrupt Register LDR R5,[R4] MOV R8, #T0_IR_MR2_MASK ;; Alarm Interrupt Flag TST R5, R8 ;; Check the current PIN value BEQ Counter3_Int ;; skip if zero ;; Handle for Counter 1 Interrupt ;;----------------------------------- LDR R6, =vpTimer0Counter2_ISR LDR R5, [R6] MOV LR, PC ;; Return Address BX R5 ;; CALL vpTimer0Counter1_ISR() Counter3_Int: LDR R4, =T0IR ;; Read Timer 0 Interrupt Register LDR R5,[R4] MOV R8, #T0_IR_MR3_MASK ;; Alarm Interrupt Flag TST R5, R8 ;; Check the current PIN value BEQ Timer0_ISR_Exit ;; skip if zero ;; Handle for Counter 1 Interrupt ;;----------------------------------- LDR R6, =vpTimer0Counter3_ISR LDR R5, [R6] MOV LR, PC ;; Return Address BX R5 ;; CALL vpTimer0Counter1_ISR() Timer0_ISR_Exit: LDR R4, =T0IR MOV R5, #T0_IR_ALL ;; Clear All Timer 0 Interrupt flag STR R5, [R4] ;; MUST DO THIS BEFORE EXIT FROM INTERRUPT LDR R4, =VICVectAddr ;; MOV R5, #0x00000000 ;; Dummy STR R5,[R4] ;; Update priority hardware LDMFD SP!, {LR} ;; POP return address LDMFD SP!, {R0-R12} ;; POP registers from stack ADDS PC, LR, #0 ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : void Timer0_Connect(void CODE * pISRCode, BYTE bPriority); ;;* Description : Connect the Timer0 to its first level of ISR and assign ;;* the priority of Timer 0 interrupt. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : pISRCode, bPriority ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_Connect CODE32 Timer0_Connect PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_Connect?A Timer0_Connect?A PROC CODE32 ENDIF ;;----------------------------------- ;; Disable Interrupt First ;;----------------------------------- LDR R2, =VICIntEnable LDR R3, [R2] STMFD SP!, {R3} ;; Saves the original value of VICIntEnable BIC R3, R3, #T0_INT_EN_MASK ;; Disable Timer 0 Interrupt (bit 4) STR R3, [R2] ;;----------------------------------- ;; Initialize RTC Interupt (VIC) and enable RTC ;;----------------------------------- AND R1, R1, #PRIORITY_MASK ;; priority 0 to 15 LDR R2, =VICVectCntl0 ADD R2, R2, R1, LSL #0x02 ;; VICVectCntl_N MOV R3, #T0_INT_NUMBER ;; Set IRQ_N to RTC interrupt ORR R3, R3, #0x20 ;; Enable IRQ_N STR R3, [R2] LDR R2, =VICVectAddr0 ADD R2, R2, R1, LSL #0x02 ;; VICVectAddr_N ;; LDR R0, =T0_ISR?A ;; Set The ISR (Fixed) STR R0, [R2] ;; VICVectAddr_N = pISRCode; LDR R2, =T0IR ;; Clear interupt flag, just in case MOV R3, #T0_IR_ALL ;; Clear all timer 0 interrupt flag STR R3, [R2] LDR R2, =VICIntEnable LDMIA SP!,{R3} ;; Restore the value of VICIntEnable STR R3, [R2] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : void Timer0_Reset(void); ;;* Description : Reset Timer 0 Counter and Prescaler. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_Reset CODE32 Timer0_Reset PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_Reset?A Timer0_Reset?A PROC CODE32 ENDIF LDR R2, =T0TCR ;; Reset Timer 0 Counter and prescaler MOV R3, #T0_TCR_RESET STR R3, [R2] MOV R2, #33 T0_RESET_WAIT: SUBS R2, R2, #1 BNE T0_RESET_WAIT BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : void Timer0_ClearInt(void); ;;* Description : Clear All Timer0 Interrupt Pending Flag. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_ClearInt CODE32 Timer0_ClearInt PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_ClearInt?A Timer0_ClearInt?A PROC CODE32 ENDIF LDR R2, =T0IR ;; Clear Timer 0 interupt flag MOV R3, #T0_IR_ALL ;; Clear all timer 0 interrupt flag STR R3, [R2] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : void Timer0_Enable(void); ;;* Description : Anable Timer 0 Interrupt and start the Timer 0. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_Enable CODE32 Timer0_Enable PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_Enable?A Timer0_Enable?A PROC CODE32 ENDIF LDR R2, =VICIntEnable LDR R3, [R2] ORR R3, R3, #T0_INT_EN_MASK ;; Enable Timer 0 Interrupt (bit 4) STR R3, [R2] LDR R2, =T0TCR ;; Enable Timer 0 (without reseting the timer) MOV R3, #T0_TCR_ENABLE STR R3, [R2] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : void Timer0_Disable(void); ;;* Description : Disable Timer 0 Interrupt and stop Timer 0. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_Disable CODE32 Timer0_Disable PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_Disable?A Timer0_Disable?A PROC CODE32 ENDIF ;;----------------------------------- ;; Disable Interrupt ;;----------------------------------- LDR R2, =VICIntEnable LDR R3, [R2] BIC R3, R3, #T0_INT_EN_MASK ;; Disable Timer 0 Interrupt (bit 4) STR R3, [R2] LDR R2, =T0TCR ;; Disable Timer 0 (without reseting the timer) MOV R3, #T0_TCR_DISABLE STR R3, [R2] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : void Timer0_InitPrescalerMode(TIMER_TYPE xPrescaler, BYTE bMode); ;;* Description : Set the Timer 0 prescaler and the Timer 0 clock source. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : xPrescaler, bMode (for clock source, etc) ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ IF (ENV_RVDS == 1) GLOBAL Timer0_InitPrescalerMode CODE32 Timer0_InitPrescalerMode PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_InitPrescalerMode?A Timer0_InitPrescalerMode?A PROC CODE32 ENDIF LDR R2, =T0CTCR ;; Set the mode STR R1, [R2] ;; T0CTCR = bMode; LDR R2, =T0PR ;; Set Maximum prescaler Value STR R0, [R2] ;; T0PR = xPrescaler; BX LR ;; Return ENDP ;;-------- ;;/******************************************************************************* ;;* Function Name : Timer0_SetCounter0() ;;* Description : Initialize ISR for Counter0, Set the Match Register 0, ;;* and set the Mode of Match on Counter 0. ;;*--------------------------------------------------------------------- ;;* Global Variable : vpTimer0Counter0_ISR ;;* ;;* Input Parameter : pISRCode, xCounter, wMODE ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ ;; void Timer0_SetCounter0(P_ISR_CODE pISRCode, TIMER_TYPE xCounter, WORD wMODE); // BASE_TYPE xCounter, BASE_TYPE xPrescaler IF (ENV_RVDS == 1) GLOBAL Timer0_SetCounter0 CODE32 Timer0_SetCounter0 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_SetCounter0?A Timer0_SetCounter0?A PROC CODE32 ENDIF LDR R3, =vpTimer0Counter0_ISR ;; Set the ISR STR R0, [R3] ;; vpTimer0Counter0_ISR = pISRCode; LDR R3, =T0MR0 ;; Set the Counter STR R1, [R3] ;; T0MR0 = xCounter; LDR R3, =T0MCR ;; Set the Mode LDR R0, [R3] AND R0, R0, #(~T0_MCR0_MASK) ;; NEED TO CHECK THIS INSTRUCTION!! AND R2, R2, #T0_MCR0_MASK ORR R2, R2, R0 STR R2, [R3] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : Timer0_SetCounter1() ;;* Description : Initialize ISR for Counter1, Set the Match Register 1, ;;* and set the Mode of Match on Counter 1. ;;*--------------------------------------------------------------------- ;;* Global Variable : vpTimer0Counter1_ISR ;;* ;;* Input Parameter : pISRCode, xCounter, wMODE ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ ;; void Timer0_SetCounter1(P_ISR_CODE pISRCode, TIMER_TYPE xCounter); // BASE_TYPE xCounter, BASE_TYPE xPrescaler IF (ENV_RVDS == 1) GLOBAL Timer0_SetCounter1 CODE32 Timer0_SetCounter1 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_SetCounter1?A Timer0_SetCounter1?A PROC CODE32 ENDIF LDR R3, =vpTimer0Counter1_ISR ;; Set the ISR STR R0, [R3] ;; vpTimer0Counter1_ISR = pISRCode; LDR R3, =T0MR1 ;; Set the Counter STR R1, [R3] ;; T0MR1 = xCounter; LDR R3, =T0MCR ;; Set the Mode LDR R0, [R3] AND R0, R0, #(~T0_MCR1_MASK) ;; NEED TO CHECK THIS INSTRUCTION!! AND R2, R2, #T0_MCR1_MASK ORR R2, R2, R0 STR R2, [R3] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : Timer0_SetCounter2() ;;* Description : Initialize ISR for Counter2, Set the Match Register 2, ;;* and set the Mode of Match on Counter 2. ;;*--------------------------------------------------------------------- ;;* Global Variable : vpTimer0Counter0_ISR ;;* ;;* Input Parameter : pISRCode, xCounter, wMODE ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ ;; void Timer0_SetCounter2(P_ISR_CODE pISRCode, TIMER_TYPE xCounter); // BASE_TYPE xCounter, BASE_TYPE xPrescaler IF (ENV_RVDS == 1) GLOBAL Timer0_SetCounter2 CODE32 Timer0_SetCounter2 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_SetCounter2?A Timer0_SetCounter2?A PROC CODE32 ENDIF LDR R3, =vpTimer0Counter2_ISR ;; Set the ISR STR R0, [R3] ;; vpTimer0Counter2_ISR = pISRCode; LDR R3, =T0MR2 ;; Set the Counter STR R1, [R3] ;; T0MR2 = xCounter; LDR R3, =T0MCR ;; Set the Mode LDR R0, [R3] AND R0, R0, #(~T0_MCR2_MASK) ;; NEED TO CHECK THIS INSTRUCTION!! AND R2, R2, #T0_MCR2_MASK ORR R2, R2, R0 STR R2, [R3] BX LR ;; Return ENDP ;;/******************************************************************************* ;;* Function Name : Timer0_SetCounter3() ;;* Description : Initialize ISR for Counter3, Set the Match Register 3, ;;* and set the Mode of Match on Counter 3. ;;*--------------------------------------------------------------------- ;;* Global Variable : vpTimer0Counter0_ISR ;;* ;;* Input Parameter : pISRCode, xCounter, wMODE ;;* Output Parameter : - ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ ;; void Timer0_SetCounter3(P_ISR_CODE pISRCode, TIMER_TYPE xCounter); // BASE_TYPE xCounter, BASE_TYPE xPrescaler IF (ENV_RVDS == 1) GLOBAL Timer0_SetCounter3 CODE32 Timer0_SetCounter3 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_SetCounter3?A Timer0_SetCounter3?A PROC CODE32 ENDIF LDR R3, =vpTimer0Counter3_ISR ;; Set the ISR STR R0, [R3] ;; vpTimer0Counter3_ISR = pISRCode; LDR R3, =T0MR3 ;; Set the Counter STR R1, [R3] ;; T0MR3 = xCounter; LDR R3, =T0MCR ;; Set the Mode LDR R0, [R3] AND R0, R0, #(~T0_MCR3_MASK) ;; NEED TO CHECK THIS INSTRUCTION!! AND R2, R2, #T0_MCR3_MASK ORR R2, R2, R0 STR R2, [R3] BX LR ;; Return ENDP ;;-------- ;;/******************************************************************************* ;;* Function Name : Timer0_GetMaxCounter0() ;;* Description : Get the Maximum Counter Tick Value (value of Match Register) ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : Return Maximum Counter Tick Value. ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ ;; TIMER_TYPE Timer0_GetMaxCounter0(void); IF (ENV_RVDS == 1) GLOBAL Timer0_GetMaxCounter0 CODE32 Timer0_GetMaxCounter0 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_GetMaxCounter0?A Timer0_GetMaxCounter0?A PROC CODE32 ENDIF LDR R3, =T0MR0 ;; LDR R0, [R3] ;; return (T0MR0); BX LR ;; Return ENDP ;; TIMER_TYPE Timer0_GetMaxCounter2(void); IF (ENV_RVDS == 1) GLOBAL Timer0_GetMaxCounter1 CODE32 Timer0_GetMaxCounter1 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_GetMaxCounter1?A Timer0_GetMaxCounter1?A PROC CODE32 ENDIF LDR R3, =T0MR1 ;; LDR R0, [R3] ;; return (T0MR1); BX LR ;; Return ENDP ;; TIMER_TYPE Timer0_GetMaxCounter2(void); IF (ENV_RVDS == 1) GLOBAL Timer0_GetMaxCounter2 CODE32 Timer0_GetMaxCounter2 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_GetMaxCounter2?A Timer0_GetMaxCounter2?A PROC CODE32 ENDIF LDR R3, =T0MR2 ;; LDR R0, [R3] ;; return (T0MR2); BX LR ;; Return ENDP ;; TIMER_TYPE Timer0_GetMaxCounter3(void); IF (ENV_RVDS == 1) GLOBAL Timer0_GetMaxCounter3 CODE32 Timer0_GetMaxCounter3 PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_GetMaxCounter3?A Timer0_GetMaxCounter3?A PROC CODE32 ENDIF LDR R3, =T0MR3 ;; LDR R0, [R3] ;; return (T0MR3); BX LR ;; Return ENDP ;;-------- ;;/******************************************************************************* ;;* Function Name : Timer0_GetTick() ;;* Description : Get the current value of Timer Counter. ;;*--------------------------------------------------------------------- ;;* Global Variable : - ;;* ;;* Input Parameter : - ;;* Output Parameter : Return Timer Counter Value. ;;* Subroutine Called : - ;;* DD/MM/YY(Author) Changes Notes ;;*--------------------------------------------------------------------- ;;* 11/01/07(ABQ) : Initial Version ;;*******************************************************************************/ ;; TIMER_TYPE Timer0_GetTick(void); IF (ENV_RVDS == 1) GLOBAL Timer0_GetTick CODE32 Timer0_GetTick PROC ENDIF IF (ENV_KEIL == 1) PUBLIC Timer0_GetTick?A Timer0_GetTick?A PROC CODE32 ENDIF LDR R3, =T0TC ;; LDR R0, [R3] ;; return (T0TC); BX LR ;; Return ENDP END
oeis/075/A075666.asm
neoneye/loda-programs
11
176009
<reponame>neoneye/loda-programs ; A075666: Sum of next n 5th powers. ; Submitted by <NAME> ; 1,275,11925,208624,2078375,14118201,72758875,304553600,1084203549,3390961375,9540835601,24582546000,58801331875,131987718149,280410672375,567799960576,1102105900025,2060382328875,3724847929549,6534040766000,11154010982751,18575718271825,30246236395475,48243040458624,75502588703125,116116635541751,175712253806025,261934430438800,385053361057499,558722236132125,800915417395951,1135081481216000,1591550690922225,2209242088703299,3037721607045125,4139669428484976,5593822310596375,7498464781771625 add $0,1 mov $2,5 mov $5,$0 bin $5,2 lpb $0 mov $4,$0 sub $0,1 add $4,$5 pow $4,$2 add $3,$4 lpe mov $0,$3
GSeTT/CwF-structure.agda
thibautbenjamin/catt-formalization
0
2377
<reponame>thibautbenjamin/catt-formalization<gh_stars>0 {-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude open import GSeTT.Syntax open import GSeTT.Rules {- Categorical structure of the type theory for globular sets -} module GSeTT.CwF-structure where {- cut-admissibility : action of substitutions preserves derivability -} []T : ∀ {Γ A Δ γ} → Γ ⊢T A → Δ ⊢S γ > Γ → Δ ⊢T (A [ γ ]Pre-Ty) []t : ∀ {Γ A t Δ γ} → Γ ⊢t t # A → Δ ⊢S γ > Γ → Δ ⊢t (t [ γ ]Pre-Tm) # (A [ γ ]Pre-Ty) []T (ob Γ⊢) Δ⊢γ:Γ = ob (Δ⊢γ:Γ→Δ⊢ Δ⊢γ:Γ) []T (ar Γ⊢t:A Γ⊢u:A) Δ⊢γ:Γ = ar ([]t Γ⊢t:A Δ⊢γ:Γ) ([]t Γ⊢u:A Δ⊢γ:Γ) []t {Γ = (Γ :: _)} {t = Var x} (var Γ+⊢@(cc Γ⊢ _ idp) (inl x∈Γ)) Δ⊢γ+:Γ+@(sc Δ⊢γ:Γ _ _ idp) with (eqdecℕ x (length Γ)) ... | inl idp = ⊥-elim (lΓ∉Γ Γ⊢ x∈Γ) ... | inr _ = trT (wk[]T (Γ⊢t:A→Γ⊢A (var Γ⊢ x∈Γ)) Δ⊢γ+:Γ+ ^) ([]t (var Γ⊢ x∈Γ) Δ⊢γ:Γ) []t {Γ = (Γ :: _)} {t = Var x} (var Γ+⊢@(cc Γ⊢ Γ⊢A idp) (inr (idp , idp))) Δ⊢γ+:Γ+@(sc Δ⊢γ:Γ x₁ Δ⊢t:A[γ] idp) with (eqdecℕ x (length Γ)) ... | inl _ = trT (wk[]T Γ⊢A Δ⊢γ+:Γ+ ^) Δ⊢t:A[γ] ... | inr x≠x = ⊥-elim (x≠x idp) {- action of identity on types and terms is trivial (true on syntax) -} [id]T : ∀ Γ A → (A [ Pre-id Γ ]Pre-Ty) == A [id]t : ∀ Γ t → (t [ Pre-id Γ ]Pre-Tm) == t [id]T Γ ∗ = idp [id]T Γ (⇒ A t u) = ⇒= ([id]T Γ A) ([id]t Γ t) ([id]t Γ u) [id]t nil (Var x) = idp [id]t (Γ :: (y , B)) (Var x) with (eqdecℕ x y) ... | inl x=y = Var= (x=y ^) ... | inr _ = [id]t Γ (Var x) {- identity is well-formed -} Γ⊢id:Γ : ∀ {Γ} → Γ ⊢C → Γ ⊢S Pre-id Γ > Γ Γ⊢id:Γ ec = es ec Γ⊢id:Γ Γ,x:A⊢@(cc Γ⊢ Γ⊢A idp) = sc (wkS (Γ⊢id:Γ Γ⊢) Γ,x:A⊢) Γ,x:A⊢ (var Γ,x:A⊢ (inr (idp , [id]T _ _))) idp {- action of substitutions on types and terms respects composition -} [∘]T : ∀ {Γ Δ Θ A γ δ} → Γ ⊢T A → Δ ⊢S γ > Γ → Θ ⊢S δ > Δ → ((A [ γ ]Pre-Ty) [ δ ]Pre-Ty) == (A [ γ ∘ δ ]Pre-Ty) [∘]t : ∀ {Γ Δ Θ A t γ δ} → Γ ⊢t t # A → Δ ⊢S γ > Γ → Θ ⊢S δ > Δ → ((t [ γ ]Pre-Tm) [ δ ]Pre-Tm) == (t [ γ ∘ δ ]Pre-Tm) [∘]T (ob _) _ _ = idp [∘]T (ar Γ⊢t:A Γ⊢u:A) Δ⊢γ:Γ Θ⊢δ:Δ = ⇒= ([∘]T (Γ⊢t:A→Γ⊢A Γ⊢t:A) Δ⊢γ:Γ Θ⊢δ:Δ) ([∘]t Γ⊢t:A Δ⊢γ:Γ Θ⊢δ:Δ) ([∘]t Γ⊢u:A Δ⊢γ:Γ Θ⊢δ:Δ) [∘]t (var {x = x} Γ⊢ x∈Γ) (sc {x = y} Δ⊢γ:Γ _ Δ⊢t:A[γ] idp) Θ⊢δ:Δ with (eqdecℕ x y ) ... | inl idp = idp [∘]t (var Γ,y:A⊢ (inr (idp , idp))) (sc Δ⊢γ:Γ _ Δ⊢t:A[γ] idp) Θ⊢δ:Δ | inr x≠x = ⊥-elim (x≠x idp) [∘]t (var (cc Γ⊢ _ _) (inl x∈Γ)) (sc Δ⊢γ:Γ _ Δ⊢t:A[γ] idp) Θ⊢δ:Δ | inr _ = [∘]t (var Γ⊢ x∈Γ) Δ⊢γ:Γ Θ⊢δ:Δ {- composition of well-formed substitutions is well-formed -} ∘-admissibility : ∀ {Γ Δ Θ γ δ} → Δ ⊢S γ > Γ → Θ ⊢S δ > Δ → Θ ⊢S (γ ∘ δ) > Γ ∘-admissibility (es Δ⊢) Θ⊢δ:Δ = es (Δ⊢γ:Γ→Δ⊢ Θ⊢δ:Δ) ∘-admissibility (sc Δ⊢γ:Γ Γ,x:A⊢@(cc _ Γ⊢A _) Δ⊢t:A[γ] idp) Θ⊢δ:Δ = sc (∘-admissibility Δ⊢γ:Γ Θ⊢δ:Δ) Γ,x:A⊢ (trT ([∘]T Γ⊢A Δ⊢γ:Γ Θ⊢δ:Δ) ([]t Δ⊢t:A[γ] Θ⊢δ:Δ)) idp {- composition is associative, this is true only for well-formed substitutions -} ∘-associativity : ∀ {Γ Δ Θ Ξ γ δ θ} → Δ ⊢S γ > Γ → Θ ⊢S δ > Δ → Ξ ⊢S θ > Θ → ((γ ∘ δ) ∘ θ) == (γ ∘ (δ ∘ θ)) ∘-associativity (es _) _ _ = idp ∘-associativity (sc Δ⊢γ:Γ _ Δ⊢t:A[γ] idp) Θ⊢δ:Δ Ξ⊢θ:Θ = ::= (∘-associativity Δ⊢γ:Γ Θ⊢δ:Δ Ξ⊢θ:Θ) (×= idp ([∘]t Δ⊢t:A[γ] Θ⊢δ:Δ Ξ⊢θ:Θ)) {- Left unitality of composition -} -- To prove right-unitality, we need a analoguous of wk[]T and wk[]t for substitutions -- Composing if θ is a subst without x, acting (γ :: (x , u)) on it is same as acting just γ on it wk[]S : ∀ {Γ Δ γ x u B Θ θ} → Γ ⊢S θ > Θ → Δ ⊢S (γ :: (x , u)) > (Γ :: (x , B)) → (θ ∘ (γ :: (x , u))) == (θ ∘ γ) wk[]S (es _) _ = idp wk[]S (sc Γ⊢θ:Θ _ Γ⊢t:A[θ] idp) Δ⊢γ+:Γ+ = ::= (wk[]S Γ⊢θ:Θ Δ⊢γ+:Γ+) (×= idp (wk[]t Γ⊢t:A[θ] Δ⊢γ+:Γ+)) ∘-left-unit : ∀{Γ Δ γ} → Δ ⊢S γ > Γ → (Pre-id Γ ∘ γ) == γ ∘-left-unit (es _) = idp ∘-left-unit Δ⊢γ+:Γ+@(sc {x = x} Δ⊢γ:Γ (cc Γ⊢ _ _) _ idp) with (eqdecℕ x x) ... | inl _ = ::= (wk[]S (Γ⊢id:Γ Γ⊢) Δ⊢γ+:Γ+ >> ∘-left-unit Δ⊢γ:Γ) idp ... | inr x≠x = ⊥-elim (x≠x idp) {- Right unitality of composition (true on syntax)-} ∘-right-unit : ∀ {Δ γ} → (γ ∘ Pre-id Δ) == γ ∘-right-unit {Δ} {nil} = idp ∘-right-unit {Δ} {γ :: (y , t)} = ::= ∘-right-unit (×= idp ([id]t Δ t)) {- Structure of CwF -} Γ,x:A⊢π:Γ : ∀ {Γ x A} → (Γ :: (x , A)) ⊢C → (Γ :: (x , A)) ⊢S Pre-π Γ x A > Γ Γ,x:A⊢π:Γ Γ,x:A⊢@(cc Γ⊢ _ _) = wkS (Γ⊢id:Γ Γ⊢) Γ,x:A⊢ -- TODO : complete the CwF structure
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_512.asm
ljhsiun2/medusa
9
175594
<filename>Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_512.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r15 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x13a00, %rbx nop nop nop nop nop inc %rbp movb (%rbx), %r15b nop nop nop nop nop inc %rsi lea addresses_WT_ht+0x1ba80, %r8 nop nop dec %r10 mov (%r8), %r12d inc %rbp lea addresses_WC_ht+0x1d252, %rsi lea addresses_UC_ht+0xdbf4, %rdi nop sub %r12, %r12 mov $98, %rcx rep movsq nop nop nop inc %r8 lea addresses_UC_ht+0x9af5, %rdi clflush (%rdi) nop nop nop nop add $31889, %r10 movb $0x61, (%rdi) nop nop nop nop add $23427, %rbp lea addresses_WC_ht+0xc91a, %r12 nop nop nop nop sub $64044, %rbp mov $0x6162636465666768, %rbx movq %rbx, %xmm2 movups %xmm2, (%r12) xor %r10, %r10 lea addresses_D_ht+0x1cf00, %r10 nop dec %rbp vmovups (%r10), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %rsi and $44011, %r8 lea addresses_normal_ht+0x8680, %rsi lea addresses_D_ht+0x51fc, %rdi xor %rbx, %rbx mov $59, %rcx rep movsq nop nop nop nop nop dec %rbp lea addresses_UC_ht+0x5530, %rsi nop nop nop add $13395, %rdi mov (%rsi), %r12w nop nop nop nop nop and $38889, %rdi lea addresses_D_ht+0x198c0, %rsi lea addresses_D_ht+0xb340, %rdi nop cmp %r10, %r10 mov $1, %rcx rep movsl nop nop dec %rbx lea addresses_A_ht+0x8d08, %rdi nop nop add %rsi, %rsi movups (%rdi), %xmm5 vpextrq $0, %xmm5, %r10 sub %rbx, %rbx lea addresses_WC_ht+0x19a30, %rsi lea addresses_WT_ht+0x11b00, %rdi nop nop add %rbx, %rbx mov $10, %rcx rep movsb nop nop nop add $18296, %r10 lea addresses_UC_ht+0x1c300, %r15 dec %rsi movb $0x61, (%r15) nop nop nop nop dec %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r15 push %r8 push %rax push %rbp push %rsi // Store lea addresses_D+0x7e00, %rax nop nop nop nop cmp %rbp, %rbp mov $0x5152535455565758, %r10 movq %r10, %xmm2 movups %xmm2, (%rax) nop nop nop nop nop cmp %r8, %r8 // Faulty Load lea addresses_WT+0x5a00, %rbp clflush (%rbp) nop nop dec %r13 mov (%rbp), %r15 lea oracles, %r13 and $0xff, %r15 shlq $12, %r15 mov (%r13,%r15,1), %r15 pop %rsi pop %rbp pop %rax pop %r8 pop %r15 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 10}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WT', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 4}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
alloy4fun_models/trashltl/models/7/PEEMxRb7MzaD7G24q.als
Kaixi26/org.alloytools.alloy
0
4516
open main pred idPEEMxRb7MzaD7G24q_prop8 { always all f : File.link | eventually f in Trash } pred __repair { idPEEMxRb7MzaD7G24q_prop8 } check __repair { idPEEMxRb7MzaD7G24q_prop8 <=> prop8o }
oeis/176/A176641.asm
neoneye/loda-programs
11
103428
; A176641: Triangle T(n, k) = 28^(k*(n-k)), read by rows. ; Submitted by <NAME> ; 1,1,1,1,28,1,1,784,784,1,1,21952,614656,21952,1,1,614656,481890304,481890304,614656,1,1,17210368,377801998336,10578455953408,377801998336,17210368,1,1,481890304,296196766695424,232218265089212416,232218265089212416,296196766695424,481890304,1 lpb $0 add $1,1 sub $0,$1 lpe sub $1,$0 mul $1,$0 mov $0,28 pow $0,$1
oeis/233/A233450.asm
neoneye/loda-programs
11
247140
<filename>oeis/233/A233450.asm<gh_stars>10-100 ; A233450: Numbers n such that 3*T(n)+1 is a square, where T = A000217. ; Submitted by <NAME>(w1) ; 0,1,6,15,64,153,638,1519,6320,15041,62566,148895,619344,1473913,6130878,14590239,60689440,144428481,600763526,1429694575,5946945824,14152517273,58868694718,140095478159,582740001360,1386802264321,5768531318886,13727927165055,57102573187504,135892469386233,565257200556158,1345196766697279,5595469432374080,13316075197586561,55389437123184646,131815555209168335,548298901799472384,1304839476894096793,5427599580871539198,12916579213731799599,53727696906915919600,127860952660423899201 mov $3,5 lpb $0 sub $0,1 add $3,1 add $3,$2 mov $1,$3 dif $1,2 add $2,$1 add $3,2 add $3,$2 lpe mov $0,$2 div $0,3
src/algebra/group/gset.agda
pcapriotti/agda-base
20
6631
<reponame>pcapriotti/agda-base {-# OPTIONS --without-K #-} open import level open import algebra.group.core open import algebra.monoid.mset open import algebra.monoid.morphism open import function.extensionality open import function.isomorphism open import equality.calculus open import equality.core open import sum open import hott.level open import hott.equivalence open import hott.univalence module algebra.group.gset {i}(G : Set i) ⦃ gG : IsGroup G ⦄ where open IsGroup ⦃ ... ⦄ IsGSet : ∀ {j}(X : Set j) → Set (i ⊔ j) IsGSet X = IsMSet G X GSet : ∀ j → Set (i ⊔ lsuc j) GSet j = Σ (Set j) IsGSet GSet₀ : ∀ j → Set (i ⊔ lsuc j) GSet₀ j = Σ (Type j 2) λ { (X , hX) → G → X → X } GSet₁ : ∀ {j} → GSet₀ j → Set (i ⊔ j) GSet₁ ((X , _) , _◂_) = ((g₁ g₂ : G)(x : X) → (g₁ * g₂) ◂ x ≡ g₁ ◂ (g₂ ◂ x)) × ((x : X) → e ◂ x ≡ x) gset₁-level : ∀ {j}(X : GSet₀ j) → h 1 (GSet₁ X) gset₁-level ((X , hX) , act) = ×-level (Π-level λ g₁ → Π-level λ g₂ → Π-level λ x → hX _ _) (Π-level λ x → hX _ _) gset-struct-iso : ∀ {j} → GSet j ≅ Σ (GSet₀ j) GSet₁ gset-struct-iso = record { to = λ { (X , xG) → (((X , IsMSet.mset-level xG) , IsMSet._◂_ xG) , (IsMSet.◂-hom xG , IsMSet.◂-id xG)) } ; from = λ { (((X , hX) , _◂_) , (◂-hom , ◂-id)) → (X , mk-is-mset _◂_ ◂-hom ◂-id hX) } ; iso₁ = λ _ → refl ; iso₂ = λ _ → refl } open IsMSet ⦃ ... ⦄ module _ {j k} {X : Set j} ⦃ xG : IsGSet X ⦄ {Y : Set k} ⦃ yG : IsGSet Y ⦄ where IsGSetMorphism : (X → Y) → Set (i ⊔ j ⊔ k) IsGSetMorphism = IsMSetMorphism G module _ {j k} (X : Set j) ⦃ xG : IsGSet X ⦄ (Y : Set k) ⦃ yG : IsGSet Y ⦄ where GSetMorphism : Set (i ⊔ j ⊔ k) GSetMorphism = Σ (X → Y) IsGSetMorphism gsetmorphism-equality : h 2 Y → {f g : X → Y} (f-mor : IsGSetMorphism f) (g-mor : IsGSetMorphism g) → f ≡ g → _≡_ {A = GSetMorphism} (f , f-mor) (g , g-mor) gsetmorphism-equality hY {f} f-mor g-mor refl = ap (λ m → (f , m)) (h1⇒prop (is-mset-morphism-level G hY f) _ _) module _ {j} (X : Set j) ⦃ xG : IsGSet X ⦄ (Y : Set j) ⦃ yG : IsGSet Y ⦄ where 𝑋 𝑌 : GSet j 𝑋 = (X , xG) 𝑌 = (Y , yG) X₀ Y₀ : GSet₀ j X₀ = ((X , IsMSet.mset-level xG) , _◂_) Y₀ = ((Y , IsMSet.mset-level yG) , _◂_) GSet-univalence : (𝑋 ≡ 𝑌) ≅ (Σ (GSetMorphism X Y) λ { (f , _) → weak-equiv f }) GSet-univalence = begin (𝑋 ≡ 𝑌) ≅⟨ iso≡ gset-struct-iso ·≅ sym≅ (subtype-equality gset₁-level) ⟩ (X₀ ≡ Y₀) ≅⟨ sym≅ Σ-split-iso ⟩ ( Σ (proj₁ X₀ ≡ proj₁ Y₀) λ p → subst (λ { (X , _) → G → X → X }) p (proj₂ X₀) ≡ proj₂ Y₀ ) ≅⟨ ( Σ-ap-iso (sym≅ (subtype-equality λ X → hn-h1 2 X)) λ p → trans≡-iso (sym (subst-naturality (λ X → G → X → X) proj₁ p (proj₂ X₀)))) ⟩ ( Σ (X ≡ Y) λ p → subst (λ X → G → X → X) p (proj₂ X₀) ≡ proj₂ Y₀ ) ≅⟨ Σ-ap-iso refl≅ (λ p → sym≅ (lem₁ p _ _)) ⟩ ( Σ (X ≡ Y) λ p → ∀ g w → coerce p (proj₂ X₀ g w) ≡ proj₂ Y₀ g (coerce p w) ) ≅⟨ ( Σ-ap-iso uni-iso λ p → refl≅ ) ⟩ ( Σ (X ≈ Y) λ f → ∀ g w → apply≈ f (proj₂ X₀ g w) ≡ proj₂ Y₀ g (apply≈ f w)) ≅⟨ record { to = λ { ((f , we), mor) → ((f , mor) , we) } ; from = λ { ((f , mor) , we) → ((f , we) , mor) } ; iso₁ = λ _ → refl ; iso₂ = λ _ → refl } ⟩ (Σ (GSetMorphism X Y) λ { (f , _) → weak-equiv f }) ∎ where open ≅-Reasoning lem₁ : {U V : Set j}(p : U ≡ V) → (act : G → U → U) → (act' : G → V → V) → (∀ g u → coerce p (act g u) ≡ act' g (coerce p u)) ≅ (subst (λ { X → G → X → X }) p act ≡ act') lem₁ refl act act' = (Π-ap-iso refl≅ λ g → strong-funext-iso) ·≅ strong-funext-iso instance GisGSet : IsGSet G GisGSet = record { _◂_ = _*_ ; ◂-hom = assoc ; ◂-id = lunit ; mset-level = is-set } module _ {j} {X : Set j} (hX : h 2 X) ⦃ xG : IsGSet X ⦄ where GSet-repr : (ϕ : G → X) → IsGSetMorphism ϕ → (g : G) → ϕ g ≡ g ◂ ϕ e GSet-repr ϕ ϕ-mor g = ap ϕ (sym (runit g)) · ϕ-mor g e GSet-repr-iso : GSetMorphism G X ≅ X GSet-repr-iso = iso f g α β where f : GSetMorphism G X → X f (ϕ , _) = ϕ e g : X → GSetMorphism G X g x = (ϕ , ϕ-mor) where ϕ : G → X ϕ g = g ◂ x ϕ-mor : IsGSetMorphism ϕ ϕ-mor g₁ g₂ = ◂-hom g₁ g₂ x α : (ϕ : GSetMorphism G X) → g (f ϕ) ≡ ϕ α (ϕ , ϕ-mor) = gsetmorphism-equality G X hX _ _ (funext λ g → sym (GSet-repr ϕ ϕ-mor g)) β : (x : X) → f (g x) ≡ x β x = (IsMSet.◂-id xG) x
tests-antlr4/src/main/resources/commonlexer/operation.g4
f1194361820/tests
0
703
grammar operation; // 算术运算符 DADD: '++'; DSUB: '--'; UNARY_ARITHMETIC: (DADD|DSUB); MUL: '*'; DIV: '/'; ADD: '+'; SUB: '-'; BINARY_ARITHMETIC: (MUL | DIV | ADD | SUB); // 比较运算符 GT: '>'; GE: '>='; LT: '<'; LE: '<='; EQ: '='; NE: ('!=' | '<>'); BINARY_COMPARISION: (GT|GE|LT|LE|EQ|NE); // 逻辑运算符 AND0: [Aa][Nn][Dd]; // and AND: (AND0 | '&&'); OR0: [Oo][Rr]; // or OR: (OR0 | '|'); NOT0: [Nn][Oo][Tt]; // not NOT: (NOT0 | '!'); UNARY_LOGIC: NOT; BINARY_LOGIC: (AND | OR); UNARY_OPERATION: (UNARY_LOGIC | UNARY_ARITHMETIC); BINARY_OPERATION: ( BINARY_LOGIC |BINARY_COMPARISION| BINARY_ARITHMETIC);
code_snippets/console/write_str.asm
smirzaei/systems-programming-class
0
28353
<reponame>smirzaei/systems-programming-class ; Stack stk segment dw 64 dup(?) stk ends ; Data dts segment msg db 'Hello, World!', 0dh, 0ah, '$' dts ends ; Code cds segment assume cs:cds,ss:stk,ds:dts main proc far ; Write message mov ah,09h mov dx, offset msg int 21h exit: ; terminate the program mov ah,4ch int 21h main endp cds ends end main
programs/oeis/161/A161758.asm
karttu/loda
1
96513
<reponame>karttu/loda ; A161758: a(n)=n-p+1 where p is the maximal prime less than n-2. ; 4,4,5,4,5,4,5,6,7,4,5,4,5,6,7,4,5,4,5,6,7,4,5,6,7,8,9,4,5,4,5,6,7,8,9,4,5,6,7,4,5,4,5,6,7,4,5,6,7,8,9,4,5,6,7,8,9,4,5,4,5,6,7,8,9,4,5,6,7,4,5,4,5,6,7,8,9,4,5,6,7,4,5,6,7,8,9,4,5,6,7,8,9,10,11,4 add $0,1 cal $0,64722 ; a(1) = 0; for n >= 2, a(n) = n - (largest prime <= n). mov $1,$0 add $1,4
source/web/tools/a2js/webapi/html/webapi-ui_events-wheel.ads
svn2github/matreshka
24
6003
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Web API Definition -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015-2016, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with WebAPI.UI_Events.Mouse; package WebAPI.UI_Events.Wheel is pragma Preelaborate; type Wheel_Event is limited interface and WebAPI.UI_Events.Mouse.Mouse_Event; type Delta_Modes is (Pixel, Line, Page); not overriding function Get_Delta_X (Self : not null access constant Wheel_Event) return WebAPI.DOM_Double is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "deltaX"; -- In user agents where the default action of the wheel event is to scroll, -- the value MUST be the measurement along the x-axis (in pixels, lines, or -- pages) to be scrolled in the case where the event is not cancelled. -- Otherwise, this is an implementation-specific measurement (in pixels, -- lines, or pages) of the movement of a wheel device around the x-axis. not overriding function Get_Delta_Y (Self : not null access constant Wheel_Event) return WebAPI.DOM_Double is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "deltaY"; -- In user agents where the default action of the wheel event is to scroll, -- the value MUST be the measurement along the y-axis (in pixels, lines, or -- pages) to be scrolled in the case where the event is not cancelled. -- Otherwise, this is an implementation-specific measurement (in pixels, -- lines, or pages) of the movement of a wheel device around the y-axis. not overriding function Get_Delta_Z (Self : not null access constant Wheel_Event) return WebAPI.DOM_Double is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "deltaZ"; -- In user agents where the default action of the wheel event is to scroll, -- the value MUST be the measurement along the z-axis (in pixels, lines, or -- pages) to be scrolled in the case where the event is not cancelled. -- Otherwise, this is an implementation-specific measurement (in pixels, -- lines, or pages) of the movement of a wheel device around the z-axis. not overriding function Get_Delta_Mode (Self : not null access constant Wheel_Event) return Delta_Modes is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "deltaMode"; -- The deltaMode attribute contains an indication of the units of -- measurement for the delta values. end WebAPI.UI_Events.Wheel;
test/Fail/Issue5819.agda
KDr2/agda
0
10937
-- Andreas, 2022-03-09, issue #5819, reported by <NAME> -- -- This test uncovered an unsound optimization (8e0fca895b9c6740d9d6c1751ed1e0ecefe63473) -- in the termination checker which replaced a (stripAllProjections . normalize) -- by a (iteratively reduce . stripAllProjections). -- Those reductions on now ill-formed terms triggered the __IMPOSSIBLE__: -- Incomplete pattern matching when applying Issue5819.dl-iso open import Agda.Builtin.Unit using (⊤; tt) open import Agda.Builtin.Nat renaming (Nat to ℕ) open import Agda.Builtin.Equality open import Agda.Builtin.Sigma renaming (fst to proj₁; snd to proj₂) data ⊥ : Set where ∃ : {A : Set} (B : A → Set) → Set ∃ B = Σ _ B _×_ : (A B : Set) → Set A × B = Σ A λ _ → B sym : {A : Set} {x y : A} → x ≡ y → y ≡ x sym refl = refl _≢_ : {A : Set} (x y : A) → Set x ≢ y = x ≡ y → ⊥ record Inverse (A B : Set) : Set where field f : A → B f⁻¹ : B → A inverse : ∀ x → f (f⁻¹ x) ≡ x open Inverse data DList : Set Fresh : (a : ℕ) → (l : DList) → Set data DList where dnil : DList dcons : (a : ℕ) → (l : DList) → Fresh a l → DList Fresh a dnil = ⊤ Fresh a (dcons b l _) = (a ≢ b) × Fresh a l data List′ : Set where nil′ : List′ cons′ : ℕ → List′ → List′ Fresh′ : ℕ → List′ → Set Fresh′ a nil′ = ⊤ Fresh′ a (cons′ b l) = (a ≢ b) × Fresh′ a l AllFresh : List′ → Set AllFresh nil′ = ⊤ AllFresh (cons′ a l) = Fresh′ a l × AllFresh l data DList′ : List′ → Set → Set₁ where dnil′ : DList′ nil′ ⊤ dcons′ : ∀{l}{prf} → (a : ℕ) → DList′ l prf → DList′ (cons′ a l) (Fresh′ a l × prf) data DList″ : Set where dl″ : (l : List′) → AllFresh l → DList″ undl″-l : DList″ → List′ undl″-l (dl″ l _) = l undl″-p : DList″ → ∃ AllFresh undl″-p (dl″ l p) = l , p -- dl-iso : DList ↔ DList″ dl-iso : Inverse DList DList″ -- f-dl-iso : DList → DList″ -- g-dl-iso : DList″ → DList -- inverse-dl-iso : ∀ x → f-dl-iso (g-dl-iso x) ≡ x Fresh→Fresh′ : ∀{a}{l}{l″} → (f dl-iso l ≡ l″) → Fresh a l → Fresh′ a (undl″-l l″) Fresh→AllFresh : ∀{a}{l}{l″} → (f dl-iso l ≡ l″) → Fresh a l → AllFresh (undl″-l l″) All/Fresh′→Fresh : ∀{a}{l}{l″} → (l ≡ f⁻¹ dl-iso l″) → Fresh′ a (undl″-l l″) × AllFresh (undl″-l l″) → Fresh a l f dl-iso dnil = dl″ nil′ tt f dl-iso (dcons a l p) = dl″ (cons′ a (undl″-l (f dl-iso l))) ((Fresh→Fresh′ {l = l}{l″ = f dl-iso l} refl p) , (Fresh→AllFresh {a = a}{l = l}{l″ = f dl-iso l} refl p)) f⁻¹ dl-iso (dl″ nil′ p) = dnil f⁻¹ dl-iso (dl″ (cons′ a l′) p) = dcons a (f⁻¹ dl-iso (dl″ l′ (proj₂ p))) (All/Fresh′→Fresh {l″ = dl″ l′ (proj₂ p)} refl p) -- Can't do any further, otherwise an Agda bug occurs. inverse dl-iso x = invˡ where invˡ : ∀{x} → f dl-iso (f⁻¹ dl-iso x) ≡ x invˡ {dl″ nil′ _} = refl invˡ {dl″ (cons′ a l) p} rewrite invˡ {dl″ l {!!}} = {!!} -- add "rewrite invˡ {dl″ l ?}" (w/o quotes) to the left of the = sign and C-c C-l Fresh→Fresh′ {a} {dnil} eq p rewrite sym eq = tt Fresh→Fresh′ {a} {dcons a₁ l x} eq p rewrite sym eq = proj₁ p , Fresh→Fresh′ {l″ = f dl-iso l} refl (proj₂ p) Fresh→AllFresh {l = dnil} eq p rewrite sym eq = tt Fresh→AllFresh {l = dcons a l x} eq p rewrite sym eq = (Fresh→Fresh′ {l″ = f dl-iso l} refl x) , Fresh→AllFresh {a = a}{l = l}{l″ = f dl-iso l} refl x All/Fresh′→Fresh {a} {l″ = dl″ nil′ x} eq p rewrite eq = tt All/Fresh′→Fresh {a} {l″ = dl″ (cons′ b l) x} eq p rewrite eq = (proj₁ (proj₁ p)) , {!All/Fresh′→Fresh!} -- put "All/Fresh′→Fresh" in the hole and C-c C-r -- WAS: internal error in reduction machinery -- SHOULD: fail with termination error
OldBasicILP/Syntax/Common.agda
mietek/hilbert-gentzen
29
1724
<filename>OldBasicILP/Syntax/Common.agda module OldBasicILP.Syntax.Common where open import Common.ContextPair public
Working Disassembly/Levels/LRZ/Misc Object Data/Map - Miniboss.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
5
103991
<gh_stars>1-10 Map_186EC8: dc.w word_186EF0-Map_186EC8 dc.w word_186EF2-Map_186EC8 dc.w word_186F7E-Map_186EC8 dc.w word_186FF8-Map_186EC8 dc.w word_187072-Map_186EC8 dc.w word_1870EC-Map_186EC8 dc.w word_187154-Map_186EC8 dc.w word_18715C-Map_186EC8 dc.w word_187164-Map_186EC8 dc.w word_18716C-Map_186EC8 dc.w word_187174-Map_186EC8 dc.w word_187182-Map_186EC8 dc.w word_18718A-Map_186EC8 dc.w word_187192-Map_186EC8 dc.w word_1871A0-Map_186EC8 dc.w word_1871AE-Map_186EC8 dc.w word_1871BC-Map_186EC8 dc.w word_1871CA-Map_186EC8 dc.w word_1871D8-Map_186EC8 dc.w word_1871E0-Map_186EC8 word_186EF0: dc.w 0 word_186EF2: dc.w $17 dc.b $10, $A, 0, $C3, $FF, $E8 dc.b $28, 9, 0, $CC, $FF, $E8 dc.b $38, 6, 0, $D2, $FF, $F0 dc.b $10, $A, 0, $C3, 0, 0 dc.b $28, 9, 0, $CC, 0, 0 dc.b $38, 6, 8, $D2, 0, 0 dc.b $E0, $F, 0, 0, $FF, $D0 dc.b $E0, 7, 0, $10, $FF, $F0 dc.b 0, $D, 0, $18, $FF, $D0 dc.b 0, 5, 0, $20, $FF, $F0 dc.b $E0, 7, 8, $10, 0, 0 dc.b 0, 5, 8, $20, 0, 0 dc.b $E0, $F, 8, 0, 0, $10 dc.b 0, $D, 8, $18, 0, $10 dc.b $90, 9, 0, $78, $FF, $D9 dc.b $A0, $B, 0, $7E, $FF, $D9 dc.b $C0, $B, 0, $7E, $FF, $D9 dc.b $90, 9, 0, $78, $FF, $F4 dc.b $A0, $B, 0, $7E, $FF, $F4 dc.b $C0, $B, 0, $7E, $FF, $F4 dc.b $90, 9, 0, $78, 0, $F dc.b $A0, $B, 0, $7E, 0, $F dc.b $C0, $B, 0, $7E, 0, $F word_186F7E: dc.w $14 dc.b $10, $A, 0, $C3, $FF, $E8 dc.b $28, 9, 0, $CC, $FF, $E8 dc.b $38, 6, 0, $D2, $FF, $F0 dc.b $10, $A, 0, $C3, 0, 0 dc.b $28, 9, 0, $CC, 0, 0 dc.b $38, 6, 8, $D2, 0, 0 dc.b $E4, $F, 0, 0, $FF, $D0 dc.b $E4, 7, 0, $10, $FF, $F0 dc.b 4, $D, 0, $18, $FF, $D0 dc.b 4, 5, 0, $20, $FF, $F0 dc.b $E4, 7, 8, $10, 0, 0 dc.b 4, 5, 8, $20, 0, 0 dc.b $E4, $F, 8, 0, 0, $10 dc.b 4, $D, 8, $18, 0, $10 dc.b $A4, $B, 0, $8A, $FF, $D9 dc.b $C4, $B, 0, $7E, $FF, $D9 dc.b $A4, $B, 0, $8A, $FF, $F4 dc.b $C4, $B, 0, $7E, $FF, $F4 dc.b $A4, $B, 0, $8A, 0, $F dc.b $C4, $B, 0, $7E, 0, $F word_186FF8: dc.w $14 dc.b $10, $A, 0, $C3, $FF, $E8 dc.b $28, 9, 0, $CC, $FF, $E8 dc.b $38, 6, 0, $D2, $FF, $F0 dc.b $10, $A, 0, $C3, 0, 0 dc.b $28, 9, 0, $CC, 0, 0 dc.b $38, 6, 8, $D2, 0, 0 dc.b $E8, $F, 0, $24, $FF, $D0 dc.b $E8, 7, 0, $34, $FF, $F0 dc.b 8, $D, 0, $3C, $FF, $D0 dc.b 8, 5, 0, $20, $FF, $F0 dc.b $E8, 7, 8, $34, 0, 0 dc.b 8, 5, 8, $20, 0, 0 dc.b $E8, $F, 8, $24, 0, $10 dc.b 8, $D, 8, $3C, 0, $10 dc.b $B4, $B, 0, $96, $FF, $D9 dc.b $D4, $A, 0, $A2, $FF, $D9 dc.b $B4, $B, 0, $96, $FF, $F4 dc.b $D4, $A, 0, $A2, $FF, $F4 dc.b $B4, $B, 0, $96, 0, $F dc.b $D4, $A, 0, $A2, 0, $F word_187072: dc.w $14 dc.b $10, $A, 0, $C3, $FF, $E8 dc.b $28, 9, 0, $CC, $FF, $E8 dc.b $38, 6, 0, $D2, $FF, $F0 dc.b $10, $A, 0, $C3, 0, 0 dc.b $28, 9, 0, $CC, 0, 0 dc.b $38, 6, 8, $D2, 0, 0 dc.b $F4, $A, 0, $44, $FF, $D0 dc.b $EC, $B, 0, $4D, $FF, $E8 dc.b $C, $D, 0, $59, $FF, $D0 dc.b $C, 5, 0, $20, $FF, $F0 dc.b $EC, $B, 8, $4D, 0, 0 dc.b $F4, $A, 8, $44, 0, $18 dc.b $C, 5, 8, $20, 0, 0 dc.b $C, $D, 8, $59, 0, $10 dc.b $CE, $B, 0, $AB, $FF, $DA dc.b $EE, 8, 0, $B7, $FF, $DA dc.b $CE, $B, 0, $AB, $FF, $F4 dc.b $EE, 8, 0, $B7, $FF, $F4 dc.b $CE, $B, 0, $AB, 0, $E dc.b $EE, 8, 0, $B7, 0, $E word_1870EC: dc.w $11 dc.b $10, $A, 0, $C3, $FF, $E8 dc.b $28, 9, 0, $CC, $FF, $E8 dc.b $38, 6, 0, $D2, $FF, $F0 dc.b $10, $A, 0, $C3, 0, 0 dc.b $28, 9, 0, $CC, 0, 0 dc.b $38, 6, 8, $D2, 0, 0 dc.b 0, 9, 0, $61, $FF, $D0 dc.b $F8, $A, 0, $67, $FF, $E8 dc.b $10, $D, 0, $70, $FF, $D0 dc.b $10, 5, 0, $20, $FF, $F0 dc.b $F8, $A, 8, $67, 0, 0 dc.b 0, 9, 8, $61, 0, $18 dc.b $10, 5, 8, $20, 0, 0 dc.b $10, $D, 8, $70, 0, $10 dc.b $E8, $A, 0, $BA, $FF, $DB dc.b $E8, $A, 0, $BA, $FF, $F4 dc.b $E8, $A, 0, $BA, 0, $D word_187154: dc.w 1 dc.b $F0, $F, 0, $D8, $FF, $F0 word_18715C: dc.w 1 dc.b $F0, $F, 0, $E8, $FF, $F0 word_187164: dc.w 1 dc.b $F8, 5, 0, $F8, $FF, $F8 word_18716C: dc.w 1 dc.b $FC, 0, 0, $FC, $FF, $FC word_187174: dc.w 2 dc.b $F0, 7, 0, $FD, $FF, $F0 dc.b $F0, 7, 8, $FD, 0, 0 word_187182: dc.w 1 dc.b $F0, $F, 8, $E8, $FF, $F0 word_18718A: dc.w 1 dc.b $F4, $A, 0, $BA, $FF, $F4 word_187192: dc.w 2 dc.b $FC, 9, 0, $61, $FF, $E8 dc.b $F4, $A, 0, $67, 0, 0 word_1871A0: dc.w 2 dc.b $FC, 9, 8, $61, 0, 0 dc.b $F4, $A, 8, $67, $FF, $E8 word_1871AE: dc.w 2 dc.b $F8, $D, 0, $70, $FF, $E8 dc.b $F8, 5, 0, $20, 0, 8 word_1871BC: dc.w 2 dc.b $F8, $D, 8, $70, $FF, $F8 dc.b $F8, 5, 8, $20, $FF, $E8 word_1871CA: dc.w 2 dc.b $EC, $A, 0, $C3, $FF, $F4 dc.b 4, 9, 0, $CC, $FF, $F4 word_1871D8: dc.w 1 dc.b $F4, 6, 0, $D2, $FF, $F8 word_1871E0: dc.w 1 dc.b $F4, 6, 8, $D2, $FF, $F8
src/events.ads
docandrew/troodon
5
21752
with xcb; use xcb; with xcb_ewmh; use xcb_ewmh; with Compositor; with Render; package Events is type eventPtr is access all xcb_generic_event_t; procedure eventLoop (connection : access xcb_connection_t; rend : render.Renderer; mode : Compositor.CompositeMode); end Events;
src/screen.asm
backwardspy/altega
0
7717
<gh_stars>0 #importonce .function locate(x, y) { .return $0400 + x + y * 40 } .macro print(x, y, string) { .var loc = locate(x, y) mov16 #string : VEC0 mov16 #loc : VEC1 jsr memcpy0 }
src/wiki-streams-builders.ads
jquorning/ada-wiki
18
27027
<gh_stars>10-100 ----------------------------------------------------------------------- -- wiki-streams-builders -- Wiki writer to a string builder -- Copyright (C) 2011, 2012, 2013, 2015, 2016 <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 Wiki.Strings; -- === Output Builder Stream == -- The <tt>Output_Builder_Stream</tt> is a concrete in-memory output stream. -- It collects the output in a <tt>Wiki.Strings.Bstring</tt> object and the -- content can be retrieved at the end by using the <tt>To_String</tt> -- or <tt>Iterate</tt> operation. package Wiki.Streams.Builders is type Output_Builder_Stream is limited new Output_Stream with private; type Output_Builder_Stream_Access is access all Output_Builder_Stream'Class; -- Write the content to the string builder. overriding procedure Write (Stream : in out Output_Builder_Stream; Content : in Wiki.Strings.WString); -- Write a single character to the string builder. overriding procedure Write (Stream : in out Output_Builder_Stream; Content : in Wiki.Strings.WChar); -- Write the string to the string builder. procedure Write_String (Stream : in out Output_Builder_Stream; Content : in String); -- Iterate over the buffer content calling the <tt>Process</tt> procedure with each -- chunk. procedure Iterate (Source : in Output_Builder_Stream; Process : not null access procedure (Chunk : in Wiki.Strings.WString)); -- Convert what was collected in the writer builder to a string and return it. function To_String (Source : in Output_Builder_Stream) return String; private BLOCK_SIZE : constant Positive := 512; type Output_Builder_Stream is limited new Output_Stream with record Content : Wiki.Strings.BString (BLOCK_SIZE); end record; end Wiki.Streams.Builders;
gumiho/src/main/resources/grammars/sql/dialect/mssql/MSSQLSQLStatementLexer.g4
kent-bo-hai/gumiho
0
1255
/** * */ lexer grammar MSSQLSQLStatementLexer; // Basic keywords (from https://msdn.microsoft.com/en-us/library/ms189822.aspx) ABSENT: 'ABSENT'; ADD: 'ADD'; AES: 'AES'; ALL: 'ALL'; ALLOW_CONNECTIONS: 'ALLOW_CONNECTIONS'; ALLOW_MULTIPLE_EVENT_LOSS: 'ALLOW_MULTIPLE_EVENT_LOSS'; ALLOW_SINGLE_EVENT_LOSS: 'ALLOW_SINGLE_EVENT_LOSS'; ALTER: 'ALTER'; AND: 'AND'; ANONYMOUS: 'ANONYMOUS'; ANY: 'ANY'; APPEND: 'APPEND'; APPLICATION: 'APPLICATION'; AS: 'AS'; ASC: 'ASC'; ASYMMETRIC: 'ASYMMETRIC'; ASYNCHRONOUS_COMMIT: 'ASYNCHRONOUS_COMMIT'; AUTHORIZATION: 'AUTHORIZATION'; AUTHENTICATION: 'AUTHENTICATION'; AUTOMATED_BACKUP_PREFERENCE: 'AUTOMATED_BACKUP_PREFERENCE'; AUTOMATIC: 'AUTOMATIC'; AVAILABILITY_MODE: 'AVAILABILITY_MODE'; BACKSLASH: '\\'; BACKUP: 'BACKUP'; BEFORE: 'BEFORE'; BEGIN: 'BEGIN'; BETWEEN: 'BETWEEN'; BLOCK: 'BLOCK'; BLOCKSIZE: 'BLOCKSIZE'; BLOCKING_HIERARCHY: 'BLOCKING_HIERARCHY'; BREAK: 'BREAK'; BROWSE: 'BROWSE'; BUFFER: 'BUFFER'; BUFFERCOUNT: 'BUFFERCOUNT'; BULK: 'BULK'; BY: 'BY'; CACHE: 'CACHE'; CALLED: 'CALLED'; CASCADE: 'CASCADE'; CASE: 'CASE'; CERTIFICATE: 'CERTIFICATE'; CHANGETABLE: 'CHANGETABLE'; CHANGES: 'CHANGES'; CHECK: 'CHECK'; CHECKPOINT: 'CHECKPOINT'; CHECK_POLICY: 'CHECK_POLICY'; CHECK_EXPIRATION: 'CHECK_EXPIRATION'; CLASSIFIER_FUNCTION: 'CLASSIFIER_FUNCTION'; CLOSE: 'CLOSE'; CLUSTER: 'CLUSTER'; CLUSTERED: 'CLUSTERED'; COALESCE: 'COALESCE'; COLLATE: 'COLLATE'; COLUMN: 'COLUMN'; COMPRESSION: 'COMPRESSION'; COMMIT: 'COMMIT'; COMPUTE: 'COMPUTE'; CONFIGURATION: 'CONFIGURATION'; CONSTRAINT: 'CONSTRAINT'; CONTAINMENT: 'CONTAINMENT'; CONTAINS: 'CONTAINS'; CONTAINSTABLE: 'CONTAINSTABLE'; CONTEXT: 'CONTEXT'; CONTINUE: 'CONTINUE'; CONTINUE_AFTER_ERROR: 'CONTINUE_AFTER_ERROR'; CONTRACT: 'CONTRACT'; CONTRACT_NAME: 'CONTRACT_NAME'; CONVERSATION: 'CONVERSATION'; CONVERT: 'TRY_'? 'CONVERT'; COPY_ONLY: 'COPY_ONLY'; CREATE: 'CREATE'; CROSS: 'CROSS'; CURRENT: 'CURRENT'; CURRENT_DATE: 'CURRENT_DATE'; CURRENT_TIME: 'CURRENT_TIME'; CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'; CURRENT_USER: 'CURRENT_USER'; CURSOR: 'CURSOR'; CYCLE: 'CYCLE'; DATA: 'DATA'; DATA_COMPRESSION: 'DATA_COMPRESSION'; DATA_SOURCE: 'DATA_SOURCE'; DATABASE: 'DATABASE'; DATABASE_MIRRORING: 'DATABASE_MIRRORING'; DBCC: 'DBCC'; DEALLOCATE: 'DEALLOCATE'; DECLARE: 'DECLARE'; DEFAULT: 'DEFAULT'; DEFAULT_DATABASE: 'DEFAULT_DATABASE'; DEFAULT_SCHEMA: 'DEFAULT_SCHEMA'; DELETE: 'DELETE'; DENY: 'DENY'; DESC: 'DESC'; DIAGNOSTICS: 'DIAGNOSTICS'; DIFFERENTIAL: 'DIFFERENTIAL'; DISK: 'DISK'; DISTINCT: 'DISTINCT'; DISTRIBUTED: 'DISTRIBUTED'; DOUBLE: 'DOUBLE'; DOUBLE_BACK_SLASH: '\\\\'; DOUBLE_FORWARD_SLASH: '//'; DROP: 'DROP'; DTC_SUPPORT: 'DTC_SUPPORT'; DUMP: 'DUMP'; ELSE: 'ELSE'; ENABLED: 'ENABLED'; END: 'END'; ENDPOINT: 'ENDPOINT'; ERRLVL: 'ERRLVL'; ESCAPE: 'ESCAPE'; ERROR: 'ERROR'; EVENT: 'EVENT'; EVENTDATA: 'EVENTDATA' '(' ')'; EVENT_RETENTION_MODE: 'EVENT_RETENTION_MODE'; EXCEPT: 'EXCEPT'; EXECUTABLE_FILE: 'EXECUTABLE_FILE'; EXECUTE: 'EXEC' 'UTE'?; EXISTS: 'EXISTS'; EXPIREDATE: 'EXPIREDATE'; EXIT: 'EXIT'; EXTENSION: 'EXTENSION'; EXTERNAL: 'EXTERNAL'; EXTERNAL_ACCESS: 'EXTERNAL_ACCESS'; FAILOVER: 'FAILOVER'; FAILURECONDITIONLEVEL: 'FAILURECONDITIONLEVEL'; FAN_IN: 'FAN_IN'; FETCH: 'FETCH'; FILE: 'FILE'; FILENAME: 'FILENAME'; FILLFACTOR: 'FILLFACTOR'; FILE_SNAPSHOT: 'FILE_SNAPSHOT'; FOR: 'FOR'; FORCESEEK: 'FORCESEEK'; FORCE_SERVICE_ALLOW_DATA_LOSS: 'FORCE_SERVICE_ALLOW_DATA_LOSS'; FOREIGN: 'FOREIGN'; FREETEXT: 'FREETEXT'; FREETEXTTABLE: 'FREETEXTTABLE'; FROM: 'FROM'; FULL: 'FULL'; FUNCTION: 'FUNCTION'; GET: 'GET'; GOTO: 'GOTO'; GOVERNOR: 'GOVERNOR'; GRANT: 'GRANT'; GROUP: 'GROUP'; HAVING: 'HAVING'; HASHED: 'HASHED'; HEALTHCHECKTIMEOUT: 'HEALTHCHECKTIMEOUT'; IDENTITY: 'IDENTITY'; IDENTITYCOL: 'IDENTITYCOL'; IDENTITY_INSERT: 'IDENTITY_INSERT'; IF: 'IF'; IN: 'IN'; INCLUDE: 'INCLUDE'; INCREMENT: 'INCREMENT'; INDEX: 'INDEX'; INFINITE: 'INFINITE'; INIT: 'INIT'; INNER: 'INNER'; INSERT: 'INSERT'; INSTEAD: 'INSTEAD'; INTERSECT: 'INTERSECT'; INTO: 'INTO'; IPV4_ADDR: [']? IPV4_OCTECT DOT IPV4_OCTECT DOT IPV4_OCTECT DOT IPV4_OCTECT [']?; IPV6_ADDR: [']?[0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[:][0-9A-F]?[0-9A-F]?[0-9A-F]?[0-9A-F]?[']?; IS: 'IS'; ISNULL: 'ISNULL'; JOIN: 'JOIN'; KERBEROS: 'KERBEROS'; KEY: 'KEY'; KEY_PATH: 'KEY_PATH'; KEY_STORE_PROVIDER_NAME: 'KEY_STORE_PROVIDER_NAME'; KILL: 'KILL'; LANGUAGE: 'LANGUAGE'; LEFT: 'LEFT'; LIBRARY: 'LIBRARY'; LIFETIME: 'LIFETIME'; LIKE: 'LIKE'; LINENO: 'LINENO'; LINUX: 'LINUX'; LISTENER_IP: 'LISTENER_IP'; LISTENER_PORT: 'LISTENER_PORT'; LOAD: 'LOAD'; LOCAL_SERVICE_NAME: 'LOCAL_SERVICE_NAME'; LOG: 'LOG'; MATCHED: 'MATCHED'; MASTER: 'MASTER'; MAX_MEMORY: 'MAX_MEMORY'; MAXTRANSFER: 'MAXTRANSFER'; MAXVALUE: 'MAXVALUE'; MAX_DISPATCH_LATENCY: 'MAX_DISPATCH_LATENCY'; MAX_EVENT_SIZE: 'MAX_EVENT_SIZE'; MAX_SIZE: 'MAX_SIZE'; MAX_OUTSTANDING_IO_PER_VOLUME: 'MAX_OUTSTANDING_IO_PER_VOLUME'; MEDIADESCRIPTION: 'MEDIADESCRIPTION'; MEDIANAME: 'MEDIANAME'; MEMBER: 'MEMBER'; MEMORY_PARTITION_MODE: 'MEMORY_PARTITION_MODE'; MERGE: 'MERGE'; MESSAGE_FORWARDING: 'MESSAGE_FORWARDING'; MESSAGE_FORWARD_SIZE: 'MESSAGE_FORWARD_SIZE'; MINVALUE: 'MINVALUE'; MIRROR: 'MIRROR'; MUST_CHANGE: 'MUST_CHANGE'; NATIONAL: 'NATIONAL'; NEGOTIATE: 'NEGOTIATE'; NOCHECK: 'NOCHECK'; NOFORMAT: 'NOFORMAT'; NOINIT: 'NOINIT'; NONCLUSTERED: 'NONCLUSTERED'; NONE: 'NONE'; NOREWIND: 'NOREWIND'; NOSKIP: 'NOSKIP'; NOUNLOAD: 'NOUNLOAD'; NO_CHECKSUM: 'NO_CHECKSUM'; NO_COMPRESSION: 'NO_COMPRESSION'; NO_EVENT_LOSS: 'NO_EVENT_LOSS'; NOT: 'NOT'; NOTIFICATION: 'NOTIFICATION'; NTLM: 'NTLM'; NULL: 'NULL'; NULLIF: 'NULLIF'; OF: 'OF'; OFF: 'OFF'; OFFSETS: 'OFFSETS'; OLD_PASSWORD: '<PASSWORD>'; ON: 'ON'; ON_FAILURE: 'ON_FAILURE'; OPEN: 'OPEN'; OPENDATASOURCE: 'OPENDATASOURCE'; OPENQUERY: 'OPENQUERY'; OPENROWSET: 'OPENROWSET'; OPENXML: 'OPENXML'; OPTION: 'OPTION'; OR: 'OR'; ORDER: 'ORDER'; OUTER: 'OUTER'; OVER: 'OVER'; PAGE: 'PAGE'; PARAM_NODE: 'PARAM_NODE'; PARTIAL: 'PARTIAL'; PASSWORD: 'PASSWORD'; PERCENT: 'PERCENT'; PERMISSION_SET: 'PERMISSION_SET'; PER_CPU: 'PER_CPU'; PER_DB: 'PER_DB'; PER_NODE: 'PER_NODE'; PIVOT: 'PIVOT'; PLAN: 'PLAN'; PLATFORM: 'PLATFORM'; POLICY: 'POLICY'; PRECISION: 'PRECISION'; PREDICATE: 'PREDICATE'; PRIMARY: 'PRIMARY'; PRINT: 'PRINT'; PROC: 'PROC'; PROCEDURE: 'PROCEDURE'; PROCESS: 'PROCESS'; PUBLIC: 'PUBLIC'; PYTHON: 'PYTHON'; R: 'R'; RAISERROR: 'RAISERROR'; RAW: 'RAW'; READ: 'READ'; READTEXT: 'READTEXT'; READ_WRITE_FILEGROUPS: 'READ_WRITE_FILEGROUPS'; RECONFIGURE: 'RECONFIGURE'; REFERENCES: 'REFERENCES'; REGENERATE: 'REGENERATE'; RELATED_CONVERSATION: 'RELATED_CONVERSATION'; RELATED_CONVERSATION_GROUP: 'RELATED_CONVERSATION_GROUP'; REPLICATION: 'REPLICATION'; REQUIRED: 'REQUIRED'; RESET: 'RESET'; RESTART: 'RESTART'; RESTORE: 'RESTORE'; RESTRICT: 'RESTRICT'; RESUME: 'RESUME'; RETAINDAYS: 'RETAINDAYS'; RETURN: 'RETURN'; RETURNS: 'RETURNS'; REVERT: 'REVERT'; REVOKE: 'REVOKE'; REWIND: 'REWIND'; RIGHT: 'RIGHT'; ROLLBACK: 'ROLLBACK'; ROLE: 'ROLE'; ROWCOUNT: 'ROWCOUNT'; ROWGUIDCOL: 'ROWGUIDCOL'; RSA_512: 'RSA_512'; RSA_1024: 'RSA_1024'; RSA_2048: 'RSA_2048'; RSA_3072: 'RSA_3072'; RSA_4096: 'RSA_4096'; SAFETY: 'SAFETY'; RULE: 'RULE'; SAFE: 'SAFE'; SAVE: 'SAVE'; SCHEDULER: 'SCHEDULER'; SCHEMA: 'SCHEMA'; SCHEME: 'SCHEME'; SECURITY: 'SECURITY'; SECURITYAUDIT: 'SECURITYAUDIT'; SELECT: 'SELECT'; SEMANTICKEYPHRASETABLE: 'SEMANTICKEYPHRASETABLE'; SEMANTICSIMILARITYDETAILSTABLE: 'SEMANTICSIMILARITYDETAILSTABLE'; SEMANTICSIMILARITYTABLE: 'SEMANTICSIMILARITYTABLE'; SEQUENCE: 'SEQUENCE'; SERVER: 'SERVER'; SERVICE: 'SERVICE'; SERVICE_BROKER: 'SERVICE_BROKER'; SERVICE_NAME: 'SERVICE_NAME'; SESSION: 'SESSION'; SESSION_USER: 'SESSION_USER'; SET: 'SET'; SETUSER: 'SETUSER'; SHUTDOWN: 'SHUTDOWN'; SID: 'SID'; SKIP_KEYWORD: 'SKIP'; SOFTNUMA: 'SOFTNUMA'; SOME: 'SOME'; SOURCE: 'SOURCE'; SPECIFICATION: 'SPECIFICATION'; SPLIT: 'SPLIT'; SQLDUMPERFLAGS: 'SQLDUMPERFLAGS'; SQLDUMPERPATH: 'SQLDUMPERPATH'; SQLDUMPERTIMEOUT: 'SQLDUMPERTIMEOUTS'; STATISTICS: 'STATISTICS'; STATE: 'STATE'; STATS: 'STATS'; START: 'START'; STARTED: 'STARTED'; STARTUP_STATE: 'STARTUP_STATE'; STOP: 'STOP'; STOPPED: 'STOPPED'; STOP_ON_ERROR: 'STOP_ON_ERROR'; SUPPORTED: 'SUPPORTED'; SYSTEM: 'SYSTEM'; SYSTEM_USER: 'SYSTEM_USER'; TABLE: 'TABLE'; TABLESAMPLE: 'TABLESAMPLE'; TAPE: 'TAPE'; TARGET: 'TARGET'; TCP: 'TCP'; TEXTSIZE: 'TEXTSIZE'; THEN: 'THEN'; TO: 'TO'; TOP: 'TOP'; TRACK_CAUSALITY: 'TRACK_CAUSALITY'; TRAN: 'TRAN'; TRANSACTION: 'TRANSACTION'; TRANSFER: 'TRANSFER'; TRIGGER: 'TRIGGER'; TRUNCATE: 'TRUNCATE'; TSEQUAL: 'TSEQUAL'; UNCHECKED: 'UNCHECKED'; UNION: 'UNION'; UNIQUE: 'UNIQUE'; UNLOCK: 'UNLOCK'; UNPIVOT: 'UNPIVOT'; UNSAFE: 'UNSAFE'; UPDATE: 'UPDATE'; UPDATETEXT: 'UPDATETEXT'; URL: 'URL'; USE: 'USE'; USED: 'USED'; USER: 'USER'; VALUES: 'VALUES'; VARYING: 'VARYING'; VERBOSELOGGING: 'VERBOSELOGGING'; VIEW: 'VIEW'; VISIBILITY: 'VISIBILITY'; WAITFOR: 'WAITFOR'; WHEN: 'WHEN'; WHERE: 'WHERE'; WHILE: 'WHILE'; WINDOWS: 'WINDOWS'; WITH: 'WITH'; WITHIN: 'WITHIN'; WITHOUT: 'WITHOUT'; WITNESS: 'WITNESS'; WRITETEXT: 'WRITETEXT'; // Additional keywords. They can be id, please keep them in sync with the parser. ABSOLUTE: 'ABSOLUTE'; ACCENT_SENSITIVITY: 'ACCENT_SENSITIVITY'; ACTION: 'ACTION'; ACTIVATION: 'ACTIVATION'; ACTIVE: 'ACTIVE'; ADDRESS: 'ADDRESS'; AES_128: 'AES_128'; AES_192: 'AES_192'; AES_256: 'AES_256'; AFFINITY: 'AFFINITY'; AFTER: 'AFTER'; AGGREGATE: 'AGGREGATE'; ALGORITHM: 'ALGORITHM'; ALLOW_ENCRYPTED_VALUE_MODIFICATIONS: 'ALLOW_ENCRYPTED_VALUE_MODIFICATIONS'; ALLOW_SNAPSHOT_ISOLATION: 'ALLOW_SNAPSHOT_ISOLATION'; ALLOWED: 'ALLOWED'; ANSI_NULL_DEFAULT: 'ANSI_NULL_DEFAULT'; ANSI_NULLS: 'ANSI_NULLS'; ANSI_PADDING: 'ANSI_PADDING'; ANSI_WARNINGS: 'ANSI_WARNINGS'; APPLICATION_LOG: 'APPLICATION_LOG'; APPLY: 'APPLY'; ARITHABORT: 'ARITHABORT'; ASSEMBLY: 'ASSEMBLY'; AUDIT: 'AUDIT'; AUDIT_GUID: 'AUDIT_GUID'; AUTO: 'AUTO'; AUTO_CLEANUP: 'AUTO_CLEANUP'; AUTO_CLOSE: 'AUTO_CLOSE'; AUTO_CREATE_STATISTICS: 'AUTO_CREATE_STATISTICS'; AUTO_SHRINK: 'AUTO_SHRINK'; AUTO_UPDATE_STATISTICS: 'AUTO_UPDATE_STATISTICS'; AUTO_UPDATE_STATISTICS_ASYNC: 'AUTO_UPDATE_STATISTICS_ASYNC'; AVAILABILITY: 'AVAILABILITY'; AVG: 'AVG'; BACKUP_PRIORITY: 'BACKUP_PRIORITY'; BEGIN_DIALOG: 'BEGIN_DIALOG'; BIGINT: 'BIGINT'; BINARY_BASE64: 'BINARY BASE64'; BINARY_CHECKSUM: 'BINARY_CHECKSUM'; BINDING: 'BINDING'; BLOB_STORAGE: 'BLOB_STORAGE'; BROKER: 'BROKER'; BROKER_INSTANCE: 'BROKER_INSTANCE'; BULK_LOGGED: 'BULK_LOGGED'; CALLER: 'CALLER'; CAP_CPU_PERCENT: 'CAP_CPU_PERCENT'; CAST: 'TRY_'? 'CAST'; CATALOG: 'CATALOG'; CATCH: 'CATCH'; CHANGE_RETENTION: 'CHANGE_RETENTION'; CHANGE_TRACKING: 'CHANGE_TRACKING'; CHECKSUM: 'CHECKSUM'; CHECKSUM_AGG: 'CHECKSUM_AGG'; CLEANUP: 'CLEANUP'; COLLECTION: 'COLLECTION'; COLUMN_MASTER_KEY: 'COLUMN_MASTER_KEY'; COMMITTED: 'COMMITTED'; COMPATIBILITY_LEVEL: 'COMPATIBILITY_LEVEL'; CONCAT: 'CONCAT'; CONCAT_NULL_YIELDS_NULL: 'CONCAT_NULL_YIELDS_NULL'; CONTENT: 'CONTENT'; CONTROL: 'CONTROL'; COOKIE: 'COOKIE'; COUNT: 'COUNT'; COUNT_BIG: 'COUNT_BIG'; COUNTER: 'COUNTER'; CPU: 'CPU'; CREATE_NEW: 'CREATE_NEW'; CREATION_DISPOSITION: 'CREATION_DISPOSITION'; CREDENTIAL: 'CREDENTIAL'; CRYPTOGRAPHIC: 'CRYPTOGRAPHIC'; CURSOR_CLOSE_ON_COMMIT: 'CURSOR_CLOSE_ON_COMMIT'; CURSOR_DEFAULT: 'CURSOR_DEFAULT'; DATE_CORRELATION_OPTIMIZATION: 'DATE_CORRELATION_OPTIMIZATION'; DATEADD: 'DATEADD'; DATEDIFF: 'DATEDIFF'; DATENAME: 'DATENAME'; DATEPART: 'DATEPART'; DAYS: 'DAYS'; DB_CHAINING: 'DB_CHAINING'; DB_FAILOVER: 'DB_FAILOVER'; DECRYPTION: 'DECRYPTION'; DEFAULT_DOUBLE_QUOTE: ["]'DEFAULT'["]; DEFAULT_FULLTEXT_LANGUAGE: 'DEFAULT_FULLTEXT_LANGUAGE'; DEFAULT_LANGUAGE: 'DEFAULT_LANGUAGE'; DELAY: 'DELAY'; DELAYED_DURABILITY: 'DELAYED_DURABILITY'; DELETED: 'DELETED'; DENSE_RANK: 'DENSE_RANK'; DEPENDENTS: 'DEPENDENTS'; DES: 'DES'; DESCRIPTION: 'DESCRIPTION'; DESX: 'DESX'; DHCP: 'DHCP'; DIALOG: 'DIALOG'; DIRECTORY_NAME: 'DIRECTORY_NAME'; DISABLE: 'DISABLE'; DISABLE_BROKER: 'DISABLE_BROKER'; DISABLED: 'DISABLED'; DISK_DRIVE: [A-Z][:]; DOCUMENT: 'DOCUMENT'; DYNAMIC: 'DYNAMIC'; ELEMENTS: 'ELEMENTS'; EMERGENCY: 'EMERGENCY'; EMPTY: 'EMPTY'; ENABLE: 'ENABLE'; ENABLE_BROKER: 'ENABLE_BROKER'; ENCRYPTED_VALUE: 'ENCRYPTED_VALUE'; ENCRYPTION: 'ENCRYPTION'; ENDPOINT_URL: 'ENDPOINT_URL'; ERROR_BROKER_CONVERSATIONS: 'ERROR_BROKER_CONVERSATIONS'; EXCLUSIVE: 'EXCLUSIVE'; EXECUTABLE: 'EXECUTABLE'; EXIST: 'EXIST'; EXPAND: 'EXPAND'; EXPIRY_DATE: 'EXPIRY_DATE'; EXPLICIT: 'EXPLICIT'; FAIL_OPERATION: 'FAIL_OPERATION'; FAILOVER_MODE: 'FAILOVER_MODE'; FAILURE: 'FAILURE'; FAILURE_CONDITION_LEVEL: 'FAILURE_CONDITION_LEVEL'; FAST: 'FAST'; FAST_FORWARD: 'FAST_FORWARD'; FILEGROUP: 'FILEGROUP'; FILEGROWTH: 'FILEGROWTH'; FILEPATH: 'FILEPATH'; FILESTREAM: 'FILESTREAM'; FILTER: 'FILTER'; FIRST: 'FIRST'; FIRST_VALUE: 'FIRST_VALUE'; FOLLOWING: 'FOLLOWING'; FORCE: 'FORCE'; FORCE_FAILOVER_ALLOW_DATA_LOSS: 'FORCE_FAILOVER_ALLOW_DATA_LOSS'; FORCED: 'FORCED'; FORMAT: 'FORMAT'; FORWARD_ONLY: 'FORWARD_ONLY'; FULLSCAN: 'FULLSCAN'; FULLTEXT: 'FULLTEXT'; GB: 'GB'; GETDATE: 'GETDATE'; GETUTCDATE: 'GETUTCDATE'; GLOBAL: 'GLOBAL'; GO: 'GO'; GROUP_MAX_REQUESTS: 'GROUP_MAX_REQUESTS'; GROUPING: 'GROUPING'; GROUPING_ID: 'GROUPING_ID'; HADR: 'HADR'; HASH: 'HASH'; HEALTH_CHECK_TIMEOUT: 'HEALTH_CHECK_TIMEOUT'; HIGH: 'HIGH'; HONOR_BROKER_PRIORITY: 'HONOR_BROKER_PRIORITY'; HOURS: 'HOURS'; IDENTITY_VALUE: 'IDENTITY_VALUE'; IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX: 'IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX'; IMMEDIATE: 'IMMEDIATE'; IMPERSONATE: 'IMPERSONATE'; IMPORTANCE: 'IMPORTANCE'; INCLUDE_NULL_VALUES: 'INCLUDE_NULL_VALUES'; INCREMENTAL: 'INCREMENTAL'; INITIATOR: 'INITIATOR'; INPUT: 'INPUT'; INSENSITIVE: 'INSENSITIVE'; INSERTED: 'INSERTED'; INT: 'INT'; IP: 'IP'; ISOLATION: 'ISOLATION'; JSON: 'JSON'; KB: 'KB'; KEEP: 'KEEP'; KEEPFIXED: 'KEEPFIXED'; KEY_SOURCE: 'KEY_SOURCE'; KEYS: 'KEYS'; KEYSET: 'KEYSET'; LAG: 'LAG'; LAST: 'LAST'; LAST_VALUE: 'LAST_VALUE'; LEAD: 'LEAD'; LEVEL: 'LEVEL'; LIST: 'LIST'; LISTENER: 'LISTENER'; LISTENER_URL: 'LISTENER_URL'; LOB_COMPACTION: 'LOB_COMPACTION'; LOCAL: 'LOCAL'; LOCATION: 'LOCATION'; LOCK: 'LOCK'; LOCK_ESCALATION: 'LOCK_ESCALATION'; LOGIN: 'LOGIN'; LOOP: 'LOOP'; LOW: 'LOW'; MANUAL: 'MANUAL'; MARK: 'MARK'; MATERIALIZED: 'MATERIALIZED'; MAX: 'MAX'; MAX_CPU_PERCENT: 'MAX_CPU_PERCENT'; MAX_DOP: 'MAX_DOP'; MAX_FILES: 'MAX_FILES'; MAX_IOPS_PER_VOLUME: 'MAX_IOPS_PER_VOLUME'; MAX_MEMORY_PERCENT: 'MAX_MEMORY_PERCENT'; MAX_PROCESSES: 'MAX_PROCESSES'; MAX_QUEUE_READERS: 'MAX_QUEUE_READERS'; MAX_ROLLOVER_FILES: 'MAX_ROLLOVER_FILES'; MAXDOP: 'MAXDOP'; MAXRECURSION: 'MAXRECURSION'; MAXSIZE: 'MAXSIZE'; MB: 'MB'; MEDIUM: 'MEDIUM'; MEMORY_OPTIMIZED_DATA: 'MEMORY_OPTIMIZED_DATA'; MESSAGE: 'MESSAGE'; MIN: 'MIN'; MIN_ACTIVE_ROWVERSION: 'MIN_ACTIVE_ROWVERSION'; MIN_CPU_PERCENT: 'MIN_CPU_PERCENT'; MIN_IOPS_PER_VOLUME: 'MIN_IOPS_PER_VOLUME'; MIN_MEMORY_PERCENT: 'MIN_MEMORY_PERCENT'; MINUTES: 'MINUTES'; MIRROR_ADDRESS: 'MIRROR_ADDRESS'; MIXED_PAGE_ALLOCATION: 'MIXED_PAGE_ALLOCATION'; MODE: 'MODE'; MODIFY: 'MODIFY'; MOVE: 'MOVE'; MULTI_USER: 'MULTI_USER'; NAME: 'NAME'; NESTED_TRIGGERS: 'NESTED_TRIGGERS'; NEW_ACCOUNT: 'NEW_ACCOUNT'; NEW_BROKER: 'NEW_BROKER'; NEW_PASSWORD: '<PASSWORD>'; NEXT: 'NEXT'; NO: 'NO'; NO_TRUNCATE: 'NO_TRUNCATE'; NO_WAIT: 'NO_WAIT'; NOCOUNT: 'NOCOUNT'; NODES: 'NODES'; NOEXPAND: 'NOEXPAND'; NON_TRANSACTED_ACCESS: 'NON_TRANSACTED_ACCESS'; NORECOMPUTE: 'NORECOMPUTE'; NORECOVERY: 'NORECOVERY'; NOWAIT: 'NOWAIT'; NTILE: 'NTILE'; NUMANODE: 'NUMANODE'; NUMBER: 'NUMBER'; NUMERIC_ROUNDABORT: 'NUMERIC_ROUNDABORT'; OBJECT: 'OBJECT'; OFFLINE: 'OFFLINE'; OFFSET: 'OFFSET'; OLD_ACCOUNT: 'OLD_ACCOUNT'; ONLINE: 'ONLINE'; ONLY: 'ONLY'; OPEN_EXISTING: 'OPEN_EXISTING'; OPTIMISTIC: 'OPTIMISTIC'; OPTIMIZE: 'OPTIMIZE'; OUT: 'OUT'; OUTPUT: 'OUTPUT'; OWNER: 'OWNER'; PAGE_VERIFY: 'PAGE_VERIFY'; PARAMETERIZATION: 'PARAMETERIZATION'; PARTITION: 'PARTITION'; PARTITIONS: 'PARTITIONS'; PARTNER: 'PARTNER'; PATH: 'PATH'; POISON_MESSAGE_HANDLING: 'POISON_MESSAGE_HANDLING'; POOL: 'POOL'; PORT: 'PORT'; PRECEDING: 'PRECEDING'; PRIMARY_ROLE: 'PRIMARY_ROLE'; PRIOR: 'PRIOR'; PRIORITY: 'PRIORITY'; PRIORITY_LEVEL: 'PRIORITY_LEVEL'; PRIVATE: 'PRIVATE'; PRIVATE_KEY: 'PRIVATE_KEY'; PRIVILEGES: 'PRIVILEGES'; PROCEDURE_NAME: 'PROCEDURE_NAME'; PROPERTY: 'PROPERTY'; PROVIDER: 'PROVIDER'; PROVIDER_KEY_NAME: 'PROVIDER_KEY_NAME'; QUERY: 'QUERY'; QUEUE: 'QUEUE'; QUEUE_DELAY: 'QUEUE_DELAY'; QUOTED_IDENTIFIER: 'QUOTED_IDENTIFIER'; RANGE: 'RANGE'; RANK: 'RANK'; RC2: 'RC2'; RC4: 'RC4'; RC4_128: 'RC4_128'; READ_COMMITTED_SNAPSHOT: 'READ_COMMITTED_SNAPSHOT'; READ_ONLY: 'READ_ONLY'; READ_ONLY_ROUTING_LIST: 'READ_ONLY_ROUTING_LIST'; READ_WRITE: 'READ_WRITE'; READONLY: 'READONLY'; REBUILD: 'REBUILD'; RECEIVE: 'RECEIVE'; RECOMPILE: 'RECOMPILE'; RECOVERY: 'RECOVERY'; RECURSIVE_TRIGGERS: 'RECURSIVE_TRIGGERS'; RELATIVE: 'RELATIVE'; REMOTE: 'REMOTE'; REMOTE_SERVICE_NAME: 'REMOTE_SERVICE_NAME'; REMOVE: 'REMOVE'; REORGANIZE: 'REORGANIZE'; REPEATABLE: 'REPEATABLE'; REPLICA: 'REPLICA'; REQUEST_MAX_CPU_TIME_SEC: 'REQUEST_MAX_CPU_TIME_SEC'; REQUEST_MAX_MEMORY_GRANT_PERCENT: 'REQUEST_MAX_MEMORY_GRANT_PERCENT'; REQUEST_MEMORY_GRANT_TIMEOUT_SEC: 'REQUEST_MEMORY_GRANT_TIMEOUT_SEC'; REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT: 'REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT'; RESERVE_DISK_SPACE: 'RESERVE_DISK_SPACE'; RESOURCE: 'RESOURCE'; RESOURCE_MANAGER_LOCATION: 'RESOURCE_MANAGER_LOCATION'; RESTRICTED_USER: 'RESTRICTED_USER'; RETENTION: 'RETENTION'; ROBUST: 'ROBUST'; ROOT: 'ROOT'; ROUTE: 'ROUTE'; ROW: 'ROW'; ROW_NUMBER: 'ROW_NUMBER'; ROWGUID: 'ROWGUID'; ROWS: 'ROWS'; SAMPLE: 'SAMPLE'; SCHEMABINDING: 'SCHEMABINDING'; SCOPED: 'SCOPED'; SCROLL: 'SCROLL'; SCROLL_LOCKS: 'SCROLL_LOCKS'; SEARCH: 'SEARCH'; SECONDARY: 'SECONDARY'; SECONDARY_ONLY: 'SECONDARY_ONLY'; SECONDARY_ROLE: 'SECONDARY_ROLE'; SECONDS: 'SECONDS'; SECRET: 'SECRET'; SECURITY_LOG: 'SECURITY_LOG'; SEEDING_MODE: 'SEEDING_MODE'; SELF: 'SELF'; SEMI_SENSITIVE: 'SEMI_SENSITIVE'; SEND: 'SEND'; SENT: 'SENT'; SERIALIZABLE: 'SERIALIZABLE'; SESSION_TIMEOUT: 'SESSION_TIMEOUT'; SETERROR: 'SETERROR'; SHARE: 'SHARE'; SHOWPLAN: 'SHOWPLAN'; SIGNATURE: 'SIGNATURE'; SIMPLE: 'SIMPLE'; SINGLE_USER: 'SINGLE_USER'; SIZE: 'SIZE'; SMALLINT: 'SMALLINT'; SNAPSHOT: 'SNAPSHOT'; SPATIAL_WINDOW_MAX_CELLS: 'SPATIAL_WINDOW_MAX_CELLS'; STANDBY: 'STANDBY'; START_DATE: 'START_DATE'; STATIC: 'STATIC'; STATS_STREAM: 'STATS_STREAM'; STATUS: 'STATUS'; STDEV: 'STDEV'; STDEVP: 'STDEVP'; STOPLIST: 'STOPLIST'; STUFF: 'STUFF'; SUBJECT: 'SUBJECT'; SUM: 'SUM'; SUSPEND: 'SUSPEND'; SYMMETRIC: 'SYMMETRIC'; SYNCHRONOUS_COMMIT: 'SYNCHRONOUS_COMMIT'; SYNONYM: 'SYNONYM'; TAKE: 'TAKE'; TARGET_RECOVERY_TIME: 'TARGET_RECOVERY_TIME'; TB: 'TB'; TEXTIMAGE_ON: 'TEXTIMAGE_ON'; THROW: 'THROW'; TIES: 'TIES'; TIME: 'TIME'; TIMEOUT: 'TIMEOUT'; TIMER: 'TIMER'; TINYINT: 'TINYINT'; TORN_PAGE_DETECTION: 'TORN_PAGE_DETECTION'; TRANSFORM_NOISE_WORDS: 'TRANSFORM_NOISE_WORDS'; TRIPLE_DES: 'TRIPLE_DES'; TRIPLE_DES_3KEY: 'TRIPLE_DES_3KEY'; TRUSTWORTHY: 'TRUSTWORTHY'; TRY: 'TRY'; TSQL: 'TSQL'; TWO_DIGIT_YEAR_CUTOFF: 'TWO_DIGIT_YEAR_CUTOFF'; TYPE: 'TYPE'; TYPE_WARNING: 'TYPE_WARNING'; UNBOUNDED: 'UNBOUNDED'; UNCOMMITTED: 'UNCOMMITTED'; UNKNOWN: 'UNKNOWN'; UNLIMITED: 'UNLIMITED'; USING: 'USING'; VALID_XML: 'VALID_XML'; VALIDATION: 'VALIDATION'; VALUE: 'VALUE'; VAR: 'VAR'; VARP: 'VARP'; VIEW_METADATA: 'VIEW_METADATA'; VIEWS: 'VIEWS'; WAIT: 'WAIT'; WELL_FORMED_XML: 'WELL_FORMED_XML'; WITHOUT_ARRAY_WRAPPER: 'WITHOUT_ARRAY_WRAPPER'; WORK: 'WORK'; WORKLOAD: 'WORKLOAD'; XML: 'XML'; XMLDATA: 'XMLDATA'; XMLNAMESPACES: 'XMLNAMESPACES'; XMLSCHEMA: 'XMLSCHEMA'; XSINIL: 'XSINIL'; DOLLAR_ACTION: '$ACTION'; SPACE: [ \t\r\n]+ -> skip; // https://docs.microsoft.com/en-us/sql/t-sql/language-elements/slash-star-comment-transact-sql COMMENT: '/*' (COMMENT | .)*? '*/' -> channel(HIDDEN); LINE_COMMENT: '--' ~[\r\n]* -> channel(HIDDEN); // TODO: ID can be not only Latin. DOUBLE_QUOTE_ID: '"' ~'"'+ '"'; SINGLE_QUOTE: '\''; SQUARE_BRACKET_ID: '[' ~']'+ ']'; LOCAL_ID: '@' ([A-Z_$@#0-9] | FullWidthLetter)+; DECIMAL: DEC_DIGIT+; ID: ( [A-Z_#] | FullWidthLetter) ( [A-Z_#$@0-9] | FullWidthLetter )*; QUOTED_URL: '\''([A-Z][A-Z]+[:]) '//'(([A-Z]+[.]|[A-Z]+)|IPV4_ADDR) [:] DECIMAL '\''; QUOTED_HOST_AND_PORT:'\''(([A-Z]+[.]|[A-Z]+)|IPV4_ADDR) ([:] DECIMAL) '\''; STRING: 'N'? '\'' (~'\'' | '\'\'')* '\''; BINARY: '0' 'X' HEX_DIGIT*; FLOAT: DEC_DOT_DEC; REAL: (DECIMAL | DEC_DOT_DEC) ('E' [+-]? DEC_DIGIT+); EQUAL: '='; GREATER: '>'; LESS: '<'; EXCLAMATION: '!'; PLUS_ASSIGN: '+='; MINUS_ASSIGN: '-='; MULT_ASSIGN: '*='; DIV_ASSIGN: '/='; MOD_ASSIGN: '%='; AND_ASSIGN: '&='; XOR_ASSIGN: '^='; OR_ASSIGN: '|='; DOUBLE_BAR: '||'; DOT: '.'; UNDERLINE: '_'; AT: '@'; SHARP: '#'; DOLLAR: '$'; LR_BRACKET: '('; RR_BRACKET: ')'; COMMA: ','; SEMI: ';'; COLON: ':'; STAR: '*'; DIVIDE: '/'; MODULE: '%'; PLUS: '+'; MINUS: '-'; BIT_NOT: '~'; BIT_OR: '|'; BIT_AND: '&'; BIT_XOR: '^'; fragment LETTER: [A-Z_]; fragment IPV6_OCTECT: [0-9A-F][0-9A-F][0-9A-F][0-9A-F]; IPV4_OCTECT: [0-9]?[0-9]?[0-9]; fragment DEC_DOT_DEC: (DEC_DIGIT+ '.' DEC_DIGIT+ | DEC_DIGIT+ '.' | '.' DEC_DIGIT+); fragment HEX_DIGIT: [0-9A-F]; fragment DEC_DIGIT: [0-9]; fragment FullWidthLetter : '\u00c0'..'\u00d6' | '\u00d8'..'\u00f6' | '\u00f8'..'\u00ff' | '\u0100'..'\u1fff' | '\u2c00'..'\u2fff' | '\u3040'..'\u318f' | '\u3300'..'\u337f' | '\u3400'..'\u3fff' | '\u4e00'..'\u9fff' | '\ua000'..'\ud7ff' | '\uf900'..'\ufaff' | '\uff00'..'\ufff0' // | '\u10000'..'\u1F9FF' //not support four bytes chars // | '\u20000'..'\u2FA1F' ;
test/Succeed/Issue1648.agda
redfish64/autonomic-agda
0
612
<filename>test/Succeed/Issue1648.agda -- Andreas, 2015-09-18 Andreas, issue reported by <NAME> {- Problem WAS The following code doesn’t typecheck but it should. I have no idea what’s going on. Replacing the definition of PathOver-rewr by a question mark and asking for full normalisation of the goal (C-u C-u C-c C-t), I obtain HetEq idp u v == (u == v), so it seems that the term PathOver (λ _ → B) p u v) is rewritten as HetEq idp u v using ap-cst (as expected), but then for some reason HetEq idp u v isn’t reduced to u == v. -} {-# OPTIONS --rewriting #-} -- {-# OPTIONS --show-implicit #-} data _==_ {i} {A : Set i} (a : A) : A → Set where idp : a == a {-# BUILTIN REWRITE _==_ #-} ap : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) {x y : A} → x == y → f x == f y ap f idp = idp ap-cst : {A B : Set} (b : B) {x y : A} (p : x == y) → ap (λ _ → b) p == idp ap-cst b idp = idp {-# REWRITE ap-cst #-} HetEq : {A B : Set} (e : A == B) (a : A) (b : B) → Set HetEq idp a b = (a == b) PathOver : {A : Set} (B : A → Set) {x y : A} (p : x == y) (u : B x) (v : B y) → Set PathOver B p u v = HetEq (ap B p) u v PathOver-rewr : {A B : Set} {x y : A} (p : x == y) (u v : B) → (PathOver (λ _ → B) p u v) == (u == v) PathOver-rewr p u v = idp
Applescript/Handout_Toggle.applescript
dustindmiller/QTableTop
1
2978
<filename>Applescript/Handout_Toggle.applescript tell application id "com.figure53.QLab.4" to tell front workspace if q name of cue "Handout Toggle" is not "No Active Handout" then set activeImage to q name of cue "Handout Toggle" else set activeImage to "None" as string end if set creatureList to (q number of cues of cue "Handouts") set newTarg to (choose from list creatureList with title "Toggle Handout" with prompt "Select Handout..." default items activeImage OK button name {"Toggle"} cancel button name {"Cancel"}) as string if newTarg is "false" then return else if cue newTarg is running hardStop cue newTarg else if (cue newTarg is not running) and (activeImage is "None") start cue newTarg else if (cue newTarg is not running) and (cue activeImage exists) start cue newTarg hardStop cue activeImage else if (cue activeImage exists) and (cue activeImage is running) then hardStop cue activeImage end if delay 0.1 if cue newTarg is running then set q name of cue "Handout Toggle" to "Deactivating " & newTarg set q color of cue "Handout Toggle" to "Yellow" else set q name of cue "Handout Toggle" to "Not Active" set q color of cue "Handout Toggle" to "vermilion" end if delay 0.2 if cue newTarg is running then set q name of cue "Handout Toggle" to newTarg set q color of cue "Handout Toggle" to "green" else set q name of cue "Handout Toggle" to "No Active Handout" set q color of cue "Handout Toggle" to "vermilion" end if end tell
programs/oeis/158/A158369.asm
karttu/loda
1
27144
; A158369: 576n^2 + 2n. ; 578,2308,5190,9224,14410,20748,28238,36880,46674,57620,69718,82968,97370,112924,129630,147488,166498,186660,207974,230440,254058,278828,304750,331824,360050,389428,419958,451640,484474,518460,553598,589888,627330,665924,705670,746568,788618,831820,876174,921680,968338,1016148,1065110,1115224,1166490,1218908,1272478,1327200,1383074,1440100,1498278,1557608,1618090,1679724,1742510,1806448,1871538,1937780,2005174,2073720,2143418,2214268,2286270,2359424,2433730,2509188,2585798,2663560,2742474,2822540,2903758,2986128,3069650,3154324,3240150,3327128,3415258,3504540,3594974,3686560,3779298,3873188,3968230,4064424,4161770,4260268,4359918,4460720,4562674,4665780,4770038,4875448,4982010,5089724,5198590,5308608,5419778,5532100,5645574,5760200,5875978,5992908,6110990,6230224,6350610,6472148,6594838,6718680,6843674,6969820,7097118,7225568,7355170,7485924,7617830,7750888,7885098,8020460,8156974,8294640,8433458,8573428,8714550,8856824,9000250,9144828,9290558,9437440,9585474,9734660,9884998,10036488,10189130,10342924,10497870,10653968,10811218,10969620,11129174,11289880,11451738,11614748,11778910,11944224,12110690,12278308,12447078,12617000,12788074,12960300,13133678,13308208,13483890,13660724,13838710,14017848,14198138,14379580,14562174,14745920,14930818,15116868,15304070,15492424,15681930,15872588,16064398,16257360,16451474,16646740,16843158,17040728,17239450,17439324,17640350,17842528,18045858,18250340,18455974,18662760,18870698,19079788,19290030,19501424,19713970,19927668,20142518,20358520,20575674,20793980,21013438,21234048,21455810,21678724,21902790,22128008,22354378,22581900,22810574,23040400,23271378,23503508,23736790,23971224,24206810,24443548,24681438,24920480,25160674,25402020,25644518,25888168,26132970,26378924,26626030,26874288,27123698,27374260,27625974,27878840,28132858,28388028,28644350,28901824,29160450,29420228,29681158,29943240,30206474,30470860,30736398,31003088,31270930,31539924,31810070,32081368,32353818,32627420,32902174,33178080,33455138,33733348,34012710,34293224,34574890,34857708,35141678,35426800,35713074,36000500 mul $0,12 add $0,12 trn $2,$0 sub $2,48 mul $0,$2 sub $0,1 mov $1,$0 pow $1,2 sub $1,332929 div $1,1152 mul $1,2 add $1,578
desimal.asm
Mohamed-94/Group-of-Assembly-Programs-Samples--8086-85-Processors-family-
16
103760
<filename>desimal.asm TITLE DECIMAL: READ WRITE INCLUDE DES_NUM.ASM .MODEL SMALL .STACK 100H .CODE MAIN PROC ;INPUT A NUMBER CALL INDEC PUSH AX ;MOVE CURSOR TO NEXT LINE MOV AH , 2 MOV DL , 0DH INT 21H MOV DL ,0AH INT 21H ;OUTPUT A NUMBER POP AX CALL OUTDEC ;EXIT MOV AH,4CH INT 21H MAIN ENDP END MAIN
8088/xtserver/testcases/sweep3even.asm
reenigne/reenigne
92
172775
%include "../../defaults_bin.asm" int 0x61 mov di,0xffff mov bx,di mov cx,di in al,0x61 or al,3 out 0x61,al mov al,TIMER2 | BOTH | MODE3 | BINARY out 0x43,al loopTop: mov ax,bx ; high word ffff mul di ; *ffff = fffe:0001 mov bx,dx ; new high word fffe xchg cx,ax ; low word <-> new low word 0001 <> ffff mul di ; *ffff = fffe:0001 add cx,dx ; ffff adc bx,0 ; fffe ; mov ax,bx ; int 0x63 ; mov ax,cx ; int 0x63 ; mov al,10 ; int 0x65 mov al,bl and al,0xfe out 0x42,al mov al,bh out 0x42,al cmp bx,0 jne loopTop ; cmp cx,0 ; jne loopTop in al,0x61 and al,0xfc out 0x61,al int 0x62 int 0x67 ;c = d*2^(-b*t) ; ; ;t = 0 : c(0) = d = 65536 ;t = 1 : c(1) = 65536*2^(-b*1) = 65535 2^(-b) = 65535/65536 -b = log(65535/65536) b = log_2(65536/65535) = 0.00002201394726395550201651307832236 ; ; ; d = FFFF:FFFF ;2^-b = 0000:FFFF ;d = bx:cx ; ffff ffff ; fffe ffff ; fffe 0000 ; fffd 0002 ; fffc 0004 ; ; 0001 0000 ; 0000 ffff ; fffe ; fffd ; fffc ; fff ; ; ; fffe 0001 ; fffe ; ; fffe ffff ; ; ; fffe:ffff * ffff = ; ; fffd 0002 ; fffe 0001 ; ; ; fffe:0001 * ffff = ; ; fffd 0002 ; 0000 ffff ; ; ; fffd:0002 * ffff = ; ; fffc 0003 ; 0001 fffe ; ; ; 0001:0000 * ffff = ; ; 0000 ffff ; 0000 ffff
arch/x86/mboot.asm
pi-pi3/funky-kernel
0
8597
<reponame>pi-pi3/funky-kernel bits 32 %define MB2_MAGIC 0e85250d6h %define MB2_CKSUM(arch) (100000000h - (MB2_MAGIC + (arch) + header_length)) struc mb2_header .magic resd 1 ;; magic number .arch resd 1 ;; architecture (0 = i386, protected) .length resd 1 ;; size of the header .cksum resd 1 ;; cksum endstruc struc mb2_tag .type resw 1 ;; type .flags resw 1 ;; flags .size resd 1 ;; size endstruc section .boot header_start: align 4, db 0 istruc mb2_header at mb2_header.magic, dd MB2_MAGIC at mb2_header.arch, dd 0h at mb2_header.length, dd header_length at mb2_header.cksum, dd MB2_CKSUM(0h) iend align 8, db 0 istruc mb2_tag at mb2_tag.type, dw 0 at mb2_tag.flags, dw 0 at mb2_tag.size, dd 8 iend header_end: header_length equ (header_end - header_start)
alloy4fun_models/trashltl/models/17/RJZDZQmEasqY7XccL.als
Kaixi26/org.alloytools.alloy
0
1476
open main pred idRJZDZQmEasqY7XccL_prop18 { always all f: Protected | f in Protected until f in Trash } pred __repair { idRJZDZQmEasqY7XccL_prop18 } check __repair { idRJZDZQmEasqY7XccL_prop18 <=> prop18o }
ThirdParty/AngelScript/sdk/angelscript/source/as_callfunc_arm_msvc.asm
Marsel24/fonline
172
173806
; ; AngelCode Scripting Library ; Copyright (c) 2003-2014 <NAME> ; ; 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. ; ; The original version of this library can be located at: ; http://www.angelcode.com/angelscript/ ; ; <NAME> ; <EMAIL> ; ; Assembly routines for the ARM call convention used for Windows CE ; Written by <NAME> in June 2009 ; MSVC currently doesn't support inline assembly for the ARM platform ; so this separate file is needed. ; Compile with Microsoft ARM assembler (armasm) ; http://msdn.microsoft.com/en-us/library/hh873190.aspx AREA |.rdata|, DATA, READONLY EXPORT armFunc EXPORT armFuncR0 EXPORT armFuncR0R1 EXPORT armFuncObjLast EXPORT armFuncR0ObjLast AREA |.text|, CODE, ARM, ALIGN=3 ALIGN 8 armFunc PROC stmdb sp!, {r4-r8, lr} mov r6, r0 ; arg table movs r7, r1 ; arg size (also set the condition code flags so that we detect if there are no arguments) mov r4, r2 ; function address mov r8, #0 beq |nomoreargs| ; Load the first 4 arguments into r0-r3 cmp r7, #4 ldrge r0, [r6],#4 cmp r7, #2*4 ldrge r1, [r6],#4 cmp r7, #3*4 ldrge r2, [r6],#4 cmp r7, #4*4 ldrge r3, [r6],#4 ble |nomoreargs| ; Load the rest of the arguments onto the stack sub r7, r7, #4*4 ; skip the 4 registers already loaded into r0-r3 sub sp, sp, r7 mov r8, r7 |stackargsloop| ldr r5, [r6], #4 str r5, [sp], #4 subs r7, r7, #4 bne |stackargsloop| |nomoreargs| sub sp, sp, r8 blx r4 add sp, sp, r8 ldmia sp!, {r4-r8, pc} ENDP ALIGN 8 armFuncObjLast PROC stmdb sp!, {r4-r8, lr} mov r6, r0 ; arg table movs r7, r1 ; arg size (also set the condition code flags so that we detect if there are no arguments) mov r4, r2 ; function address mov r8, #0 mov r0, r3 ; objlast. might get overwritten str r3, [sp, #-4]! ; objlast again. beq |nomoreargs@armFuncObjLast| ; Load the first 4 arguments into r0-r3 cmp r7, #4 ldrge r0, [r6],#4 cmp r7, #2*4 ldrge r1, [r6],#4 ldrlt r1, [sp] cmp r7, #3*4 ldrge r2, [r6],#4 ldrlt r2, [sp] cmp r7, #4*4 ldrge r3, [r6],#4 ldrlt r3, [sp] ble |nomoreargs@armFuncObjLast| ; Load the rest of the arguments onto the stack sub r7, r7, #4*4 ; skip the 4 registers already loaded into r0-r3 sub sp, sp, r7 mov r8, r7 |stackargsloop@armFuncObjLast| ldr r5, [r6], #4 str r5, [sp], #4 subs r7, r7, #4 bne |stackargsloop@armFuncObjLast| |nomoreargs@armFuncObjLast| sub sp, sp, r8 blx r4 add sp, sp, r8 add sp, sp, #4 ldmia sp!, {r4-r8, pc} ENDP ALIGN 8 armFuncR0ObjLast PROC stmdb sp!, {r4-r8, lr} ldr r7, [sp,#6*4] str r7, [sp,#-4]! mov r6, r0 ; arg table movs r7, r1 ; arg size (also set the condition code flags so that we detect if there are no arguments) mov r4, r2 ; function address mov r8, #0 mov r0, r3 ; r0 explicitly set ldr r1, [sp] ; objlast. might get overwritten beq |nomoreargs@armFuncR0ObjLast| ; Load the first 3 arguments into r1-r3 cmp r7, #1*4 ldrge r1, [r6],#4 cmp r7, #2*4 ldrge r2, [r6],#4 ldrlt r2, [sp] cmp r7, #3*4 ldrge r3, [r6],#4 ldrlt r3, [sp] ble |nomoreargs@armFuncR0ObjLast| ; Load the rest of the arguments onto the stack sub r7, r7, #3*4 ; skip the 3 registers already loaded into r1-r3 sub sp, sp, r7 mov r8, r7 |stackargsloop@armFuncR0ObjLast| ldr r5, [r6], #4 str r5, [sp], #4 subs r7, r7, #4 bne |stackargsloop@armFuncR0ObjLast| |nomoreargs@armFuncR0ObjLast| sub sp, sp, r8 blx r4 add sp, sp, r8 add sp, sp, #4 ldmia sp!, {r4-r8, pc} ENDP ALIGN 8 armFuncR0 PROC stmdb sp!, {r4-r8, lr} mov r6, r0 ; arg table movs r7, r1 ; arg size (also set the condition code flags so that we detect if there are no arguments) mov r4, r2 ; function address mov r8, #0 mov r0, r3 ; r0 explicitly set beq |nomoreargs@armFuncR0| ; Load the first 3 arguments into r1-r3 cmp r7, #1*4 ldrge r1, [r6],#4 cmp r7, #2*4 ldrge r2, [r6],#4 cmp r7, #3*4 ldrge r3, [r6],#4 ble |nomoreargs@armFuncR0| ; Load the rest of the arguments onto the stack sub r7, r7, #3*4 ; skip the 3 registers already loaded into r1-r3 sub sp, sp, r7 mov r8, r7 |stackargsloop@armFuncR0| ldr r5, [r6], #4 str r5, [sp], #4 subs r7, r7, #4 bne |stackargsloop@armFuncR0| |nomoreargs@armFuncR0| sub sp, sp, r8 blx r4 add sp, sp, r8 ldmia sp!, {r4-r8, pc} ENDP ALIGN 8 armFuncR0R1 PROC stmdb sp!, {r4-r8, lr} mov r6, r0 ; arg table movs r7, r1 ; arg size (also set the condition code flags so that we detect if there are no arguments) mov r4, r2 ; function address mov r8, #0 mov r0, r3 ; r0 explicitly set ldr r1, [sp, #6*4] ; r1 explicitly set too beq |nomoreargs@armFuncR0R1| ; Load the first 2 arguments into r2-r3 cmp r7, #1*4 ldrge r2, [r6],#4 cmp r7, #2*4 ldrge r3, [r6],#4 ble |nomoreargs@armFuncR0R1| ; Load the rest of the arguments onto the stack sub r7, r7, #2*4 ; skip the 2 registers already loaded into r2-r3 sub sp, sp, r7 mov r8, r7 |stackargsloop@armFuncR0R1| ldr r5, [r6], #4 str r5, [sp], #4 subs r7, r7, #4 bne |stackargsloop@armFuncR0R1| |nomoreargs@armFuncR0R1| sub sp, sp, r8 blx r4 add sp, sp, r8 ldmia sp!, {r4-r8, pc} ENDP END
tools/scitools/conf/understand/ada/ada05/a-ztexio.ads
brucegua/moocos
1
18401
<filename>tools/scitools/conf/understand/ada/ada05/a-ztexio.ads ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ W I D E _ T E X T _ I O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Note: the generic subpackages of Wide_Wide_Text_IO (Integer_IO, Float_IO, -- Fixed_IO, Modular_IO, Decimal_IO and Enumeration_IO) appear as private -- children in GNAT. These children are with'ed automatically if they are -- referenced, so this rearrangement is invisible to user programs, but has -- the advantage that only the needed parts of Wide_Wide_Text_IO are processed -- and loaded. with Ada.IO_Exceptions; with Ada.Streams; with System; with System.File_Control_Block; with System.WCh_Con; package Ada.Wide_Wide_Text_IO is package WCh_Con renames System.WCh_Con; type File_Type is limited private; type File_Mode is (In_File, Out_File, Append_File); -- The following representation clause allows the use of unchecked -- conversion for rapid translation between the File_Mode type -- used in this package and System.File_IO. for File_Mode use (In_File => 0, -- System.FIle_IO.File_Mode'Pos (In_File) Out_File => 2, -- System.File_IO.File_Mode'Pos (Out_File) Append_File => 3); -- System.File_IO.File_Mode'Pos (Append_File) type Count is range 0 .. Natural'Last; -- The value of Count'Last must be large enough so that the assumption -- enough so that the assumption that the Line, Column and Page -- counts can never exceed this value is a valid assumption. subtype Positive_Count is Count range 1 .. Count'Last; Unbounded : constant Count := 0; -- Line and page length subtype Field is Integer range 0 .. 255; -- Note: if for any reason, there is a need to increase this value, -- then it will be necessary to change the corresponding value in -- System.Img_Real in file s-imgrea.adb. subtype Number_Base is Integer range 2 .. 16; type Type_Set is (Lower_Case, Upper_Case); --------------------- -- File Management -- --------------------- procedure Create (File : in out File_Type; Mode : File_Mode := Out_File; Name : String := ""; Form : String := ""); procedure Open (File : in out File_Type; Mode : File_Mode; Name : String; Form : String := ""); procedure Close (File : in out File_Type); procedure Delete (File : in out File_Type); procedure Reset (File : in out File_Type; Mode : File_Mode); procedure Reset (File : in out File_Type); function Mode (File : File_Type) return File_Mode; function Name (File : File_Type) return String; function Form (File : File_Type) return String; function Is_Open (File : File_Type) return Boolean; ------------------------------------------------------ -- Control of default input, output and error files -- ------------------------------------------------------ procedure Set_Input (File : File_Type); procedure Set_Output (File : File_Type); procedure Set_Error (File : File_Type); function Standard_Input return File_Type; function Standard_Output return File_Type; function Standard_Error return File_Type; function Current_Input return File_Type; function Current_Output return File_Type; function Current_Error return File_Type; type File_Access is access constant File_Type; function Standard_Input return File_Access; function Standard_Output return File_Access; function Standard_Error return File_Access; function Current_Input return File_Access; function Current_Output return File_Access; function Current_Error return File_Access; -------------------- -- Buffer control -- -------------------- -- Note: The paramter file is in out in the RM, but as pointed out -- in <<95-5166.a Tucker Taft 95-6-23>> this is clearly an oversight. procedure Flush (File : File_Type); procedure Flush; -------------------------------------------- -- Specification of line and page lengths -- -------------------------------------------- procedure Set_Line_Length (File : File_Type; To : Count); procedure Set_Line_Length (To : Count); procedure Set_Page_Length (File : File_Type; To : Count); procedure Set_Page_Length (To : Count); function Line_Length (File : File_Type) return Count; function Line_Length return Count; function Page_Length (File : File_Type) return Count; function Page_Length return Count; ------------------------------------ -- Column, Line, and Page Control -- ------------------------------------ procedure New_Line (File : File_Type; Spacing : Positive_Count := 1); procedure New_Line (Spacing : Positive_Count := 1); procedure Skip_Line (File : File_Type; Spacing : Positive_Count := 1); procedure Skip_Line (Spacing : Positive_Count := 1); function End_Of_Line (File : File_Type) return Boolean; function End_Of_Line return Boolean; procedure New_Page (File : File_Type); procedure New_Page; procedure Skip_Page (File : File_Type); procedure Skip_Page; function End_Of_Page (File : File_Type) return Boolean; function End_Of_Page return Boolean; function End_Of_File (File : File_Type) return Boolean; function End_Of_File return Boolean; procedure Set_Col (File : File_Type; To : Positive_Count); procedure Set_Col (To : Positive_Count); procedure Set_Line (File : File_Type; To : Positive_Count); procedure Set_Line (To : Positive_Count); function Col (File : File_Type) return Positive_Count; function Col return Positive_Count; function Line (File : File_Type) return Positive_Count; function Line return Positive_Count; function Page (File : File_Type) return Positive_Count; function Page return Positive_Count; ---------------------------- -- Character Input-Output -- ---------------------------- procedure Get (File : File_Type; Item : out Wide_Wide_Character); procedure Get (Item : out Wide_Wide_Character); procedure Put (File : File_Type; Item : Wide_Wide_Character); procedure Put (Item : Wide_Wide_Character); procedure Look_Ahead (File : File_Type; Item : out Wide_Wide_Character; End_Of_Line : out Boolean); procedure Look_Ahead (Item : out Wide_Wide_Character; End_Of_Line : out Boolean); procedure Get_Immediate (File : File_Type; Item : out Wide_Wide_Character); procedure Get_Immediate (Item : out Wide_Wide_Character); procedure Get_Immediate (File : File_Type; Item : out Wide_Wide_Character; Available : out Boolean); procedure Get_Immediate (Item : out Wide_Wide_Character; Available : out Boolean); ------------------------- -- String Input-Output -- ------------------------- procedure Get (File : File_Type; Item : out Wide_Wide_String); procedure Get (Item : out Wide_Wide_String); procedure Put (File : File_Type; Item : Wide_Wide_String); procedure Put (Item : Wide_Wide_String); procedure Get_Line (File : File_Type; Item : out Wide_Wide_String; Last : out Natural); function Get_Line (File : File_Type) return Wide_Wide_String; pragma Ada_05 (Get_Line); function Get_Line return Wide_Wide_String; pragma Ada_05 (Get_Line); procedure Get_Line (Item : out Wide_Wide_String; Last : out Natural); procedure Put_Line (File : File_Type; Item : Wide_Wide_String); procedure Put_Line (Item : Wide_Wide_String); --------------------------------------- -- Generic packages for Input-Output -- --------------------------------------- -- The generic packages: -- Ada.Wide_Wide_Text_IO.Integer_IO -- Ada.Wide_Wide_Text_IO.Modular_IO -- Ada.Wide_Wide_Text_IO.Float_IO -- Ada.Wide_Wide_Text_IO.Fixed_IO -- Ada.Wide_Wide_Text_IO.Decimal_IO -- Ada.Wide_Wide_Text_IO.Enumeration_IO -- are implemented as separate child packages in GNAT, so the -- spec and body of these packages are to be found in separate -- child units. This implementation detail is hidden from the -- Ada programmer by special circuitry in the compiler that -- treats these child packages as though they were nested in -- Text_IO. The advantage of this special processing is that -- the subsidiary routines needed if these generics are used -- are not loaded when they are not used. ---------------- -- Exceptions -- ---------------- Status_Error : exception renames IO_Exceptions.Status_Error; Mode_Error : exception renames IO_Exceptions.Mode_Error; Name_Error : exception renames IO_Exceptions.Name_Error; Use_Error : exception renames IO_Exceptions.Use_Error; Device_Error : exception renames IO_Exceptions.Device_Error; End_Error : exception renames IO_Exceptions.End_Error; Data_Error : exception renames IO_Exceptions.Data_Error; Layout_Error : exception renames IO_Exceptions.Layout_Error; private ----------------------------------- -- Handling of Format Characters -- ----------------------------------- -- Line marks are represented by the single character ASCII.LF (16#0A#). -- In DOS and similar systems, underlying file translation takes care -- of translating this to and from the standard CR/LF sequences used in -- these operating systems to mark the end of a line. On output there is -- always a line mark at the end of the last line, but on input, this -- line mark can be omitted, and is implied by the end of file. -- Page marks are represented by the single character ASCII.FF (16#0C#), -- The page mark at the end of the file may be omitted, and is normally -- omitted on output unless an explicit New_Page call is made before -- closing the file. No page mark is added when a file is appended to, -- so, in accordance with the permission in (RM A.10.2(4)), there may -- or may not be a page mark separating preexising text in the file -- from the new text to be written. -- A file mark is marked by the physical end of file. In DOS translation -- mode on input, an EOF character (SUB = 16#1A#) gets translated to the -- physical end of file, so in effect this character is recognized as -- marking the end of file in DOS and similar systems. LM : constant := Character'Pos (ASCII.LF); -- Used as line mark PM : constant := Character'Pos (ASCII.FF); -- Used as page mark, except at end of file where it is implied ------------------------------------- -- Wide_Wide_Text_IO File Control Block -- ------------------------------------- Default_WCEM : WCh_Con.WC_Encoding_Method := WCh_Con.WCEM_UTF8; -- This gets modified during initialization (see body) using -- the default value established in the call to Set_Globals. package FCB renames System.File_Control_Block; type Wide_Wide_Text_AFCB is new FCB.AFCB with record Page : Count := 1; Line : Count := 1; Col : Count := 1; Line_Length : Count := 0; Page_Length : Count := 0; Before_LM : Boolean := False; -- This flag is used to deal with the anomolies introduced by the -- peculiar definition of End_Of_File and End_Of_Page in Ada. These -- functions require looking ahead more than one character. Since -- there is no convenient way of backing up more than one character, -- what we do is to leave ourselves positioned past the LM, but set -- this flag, so that we know that from an Ada point of view we are -- in front of the LM, not after it. A bit of a kludge, but it works! Before_LM_PM : Boolean := False; -- This flag similarly handles the case of being physically positioned -- after a LM-PM sequence when logically we are before the LM-PM. This -- flag can only be set if Before_LM is also set. WC_Method : WCh_Con.WC_Encoding_Method := Default_WCEM; -- Encoding method to be used for this file Before_Wide_Wide_Character : Boolean := False; -- This flag is set to indicate that a wide character in the input has -- been read by Wide_Wide_Text_IO.Look_Ahead. If it is set to True, -- then it means that the stream is logically positioned before the -- character but is physically positioned after it. The character -- involved must not be in the range 16#00#-16#7F#, i.e. if the flag is -- set, then we know the next character has a code greater than 16#7F#, -- and the value of this character is saved in -- Saved_Wide_Wide_Character. Saved_Wide_Wide_Character : Wide_Wide_Character; -- This field is valid only if Before_Wide_Wide_Character is set. It -- contains a wide character read by Look_Ahead. If Look_Ahead -- reads a character in the range 16#0000# to 16#007F#, then it -- can use ungetc to put it back, but ungetc cannot be called -- more than once, so for characters above this range, we don't -- try to back up the file. Instead we save the character in this -- field and set the flag Before_Wide_Wide_Character to indicate that -- we are logically positioned before this character even though -- the stream is physically positioned after it. end record; type File_Type is access all Wide_Wide_Text_AFCB; function AFCB_Allocate (Control_Block : Wide_Wide_Text_AFCB) return FCB.AFCB_Ptr; procedure AFCB_Close (File : access Wide_Wide_Text_AFCB); procedure AFCB_Free (File : access Wide_Wide_Text_AFCB); procedure Read (File : in out Wide_Wide_Text_AFCB; Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); -- Read operation used when Wide_Wide_Text_IO file is treated as a Stream procedure Write (File : in out Wide_Wide_Text_AFCB; Item : Ada.Streams.Stream_Element_Array); -- Write operation used when Wide_Wide_Text_IO file is treated as a Stream ------------------------ -- The Standard Files -- ------------------------ Null_Str : aliased constant String := ""; -- Used as name and form of standard files Standard_Err_AFCB : aliased Wide_Wide_Text_AFCB; Standard_In_AFCB : aliased Wide_Wide_Text_AFCB; Standard_Out_AFCB : aliased Wide_Wide_Text_AFCB; Standard_Err : aliased File_Type := Standard_Err_AFCB'Access; Standard_In : aliased File_Type := Standard_In_AFCB'Access; Standard_Out : aliased File_Type := Standard_Out_AFCB'Access; -- Standard files Current_In : aliased File_Type := Standard_In; Current_Out : aliased File_Type := Standard_Out; Current_Err : aliased File_Type := Standard_Err; -- Current files ----------------------- -- Local Subprograms -- ----------------------- -- These subprograms are in the private part of the spec so that they can -- be shared by the routines in the body of Ada.Text_IO.Wide_Wide_Text_IO. -- Note: we use Integer in these declarations instead of the more accurate -- Interfaces.C_Streams.int, because we do not want to drag in the spec of -- this interfaces package with the spec of Ada.Text_IO, and we know that -- in fact these types are identical function Getc (File : File_Type) return Integer; -- Gets next character from file, which has already been checked for -- being in read status, and returns the character read if no error -- occurs. The result is EOF if the end of file was read. procedure Get_Character (File : File_Type; Item : out Character); -- This is essentially a copy of the normal Get routine from Text_IO. It -- obtains a single character from the input file File, and places it in -- Item. This character may be the leading character of a -- Wide_Wide_Character sequence, but that is up to the caller to deal -- with. function Get_Wide_Wide_Char (C : Character; File : File_Type) return Wide_Wide_Character; -- This function is shared by Get and Get_Immediate to extract a wide -- character value from the given File. The first byte has already been -- read and is passed in C. The wide character value is returned as the -- result, and the file pointer is bumped past the character. function Nextc (File : File_Type) return Integer; -- Returns next character from file without skipping past it (i.e. it -- is a combination of Getc followed by an Ungetc). procedure Putc (ch : Integer; File : File_Type); -- Outputs the given character to the file, which has already been -- checked for being in output status. Device_Error is raised if the -- character cannot be written. procedure Terminate_Line (File : File_Type); -- If the file is in Write_File or Append_File mode, and the current -- line is not terminated, then a line terminator is written using -- New_Line. Note that there is no Terminate_Page routine, because -- the page mark at the end of the file is implied if necessary. procedure Ungetc (ch : Integer; File : File_Type); -- Pushes back character into stream, using ungetc. The caller has -- checked that the file is in read status. Device_Error is raised -- if the character cannot be pushed back. An attempt to push back -- and end of file character (EOF) is ignored. end Ada.Wide_Wide_Text_IO;
src/Categories/Category/Instance/Monoidals.agda
Trebor-Huang/agda-categories
279
13519
<filename>src/Categories/Category/Instance/Monoidals.agda {-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Monoidals where open import Level open import Categories.Category open import Categories.Category.Helper open import Categories.Category.Monoidal open import Categories.Functor.Monoidal open import Categories.Functor.Monoidal.Properties open import Categories.NaturalTransformation.NaturalIsomorphism.Monoidal module _ o ℓ e where Monoidals : Category (suc (o ⊔ ℓ ⊔ e)) (o ⊔ ℓ ⊔ e) (o ⊔ ℓ ⊔ e) Monoidals = categoryHelper record { Obj = MonoidalCategory o ℓ e ; _⇒_ = MonoidalFunctor ; _≈_ = Lax._≃_ ; id = idF-Monoidal _ ; _∘_ = ∘-Monoidal -- NOTE: these η-expanded versions typecheck much faster... ; assoc = λ {_ _ _ _ F G H} → associator {F = F} {G} {H} ; identityˡ = λ {_ _ F} → unitorˡ {F = F} ; identityʳ = λ {_ _ F} → unitorʳ {F = F} ; equiv = isEquivalence ; ∘-resp-≈ = _ⓘₕ_ } where open Lax StrongMonoidals : Category (suc (o ⊔ ℓ ⊔ e)) (o ⊔ ℓ ⊔ e) (o ⊔ ℓ ⊔ e) StrongMonoidals = categoryHelper record { Obj = MonoidalCategory o ℓ e ; _⇒_ = StrongMonoidalFunctor ; _≈_ = Strong._≃_ ; id = idF-StrongMonoidal _ ; _∘_ = ∘-StrongMonoidal -- NOTE: these η-expanded versions typecheck much faster... ; assoc = λ {_ _ _ _ F G H} → associator {F = F} {G} {H} ; identityˡ = λ {_ _ F} → unitorˡ {F = F} ; identityʳ = λ {_ _ F} → unitorʳ {F = F} ; equiv = isEquivalence ; ∘-resp-≈ = _ⓘₕ_ } where open Strong
src/stars/examples/arrays/minmax.asm
kevintmcdonnell/stars
9
91449
## minmax.asm - print min, max of array elements. ## ## Assumes the array has at least two elements (a[0] ## and a[1]). It initializes both min and max to a[0] ## and then goes throught the loop count-1 times. ## This program uses pointers. .data array: .word 3,4,2,6,12,7,18,26,2,14,19,7,8,12,13 count: .word 15 end1: .asciiz "\n" ans1: .asciiz "min = " ans2: .asciiz "\nmax = " .text .globl main main: la $t0,array # $t0 will to point elements lw $t1,count # exit loop when $t1 is 0 lw $t2,($t0) # initialize both min ($t2) lw $t3,($t0) # and max ($t3) to a[0] addi $t0,$t0,4 # pointer to start at a[1] addi $t1,$t1,-1 # and go round count-1 times loop: lw $t4,($t0) # load next word from array bge $t4,$t2,notMin # skip if a[i] >= min move $t2,$t4 # copy a[i] to min notMin: ble $t4,$t3,notMax # skip if a[i] <= max move $t3,$t4 # copy a[i] to max notMax: addi $t1,$t1,-1 # decrement counter addi $t0,$t0,4 # increment pointer by word bnez $t1,loop # and continue if counter>0 la $a0,ans1 li $v0,4 syscall # print "min = " move $a0,$t2 li $v0,1 syscall # print min la $a0,ans2 li $v0,4 syscall # print "\nmax = " move $a0,$t3 li $v0,1 syscall # print max la $a0,end1 # system call to print li $v0,4 # out a newline syscall li $v0, 10 syscall # au revoir
Week1-task/2.asm
mdabdullahibnaharun/Assembly-Language
0
163868
.model small .stack 100h .data str1 db "Enter First Number : $" str2 db "Enter Second Number : $" str3 db "Sum : $" .code main proc mov ax,@data mov ds,ax ;str1 lea dx,str1 mov ah,09h int 21h ;num1 mov ah,01h int 21h mov bl,al ;\n mov ah,02h mov dl, 0ah int 21h mov dl,0dh int 21h ;str2 lea dx,str2 mov ah,09h int 21h ;num2 mov ah,01h int 21h mov bh,al ;\n mov ah,02h mov dl, 0ah int 21h mov dl,0dh int 21h ;str3 lea dx,str3 mov ah,09h int 21h add bh,bl sub bh,48 ;sum mov dl,bh mov ah,02h int 21h mov ah,4ch int 21h main endp end main
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_1393.asm
ljhsiun2/medusa
9
177743
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r8 push %rax push %rbp push %rcx push %rdx lea addresses_normal_ht+0x870b, %rax nop nop sub %rcx, %rcx mov $0x6162636465666768, %rdx movq %rdx, %xmm7 movups %xmm7, (%rax) nop nop cmp $57818, %rdx lea addresses_UC_ht+0x1e417, %r8 nop nop nop add %rdx, %rdx vmovups (%r8), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %r10 nop inc %r8 lea addresses_UC_ht+0xe447, %rbp nop nop nop nop add %r14, %r14 mov (%rbp), %rax nop sub $3060, %r14 pop %rdx pop %rcx pop %rbp pop %rax pop %r8 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %r15 push %r8 push %rbx // Store lea addresses_WC+0x770b, %r12 nop nop nop nop sub $17142, %r15 movw $0x5152, (%r12) nop inc %r14 // Faulty Load lea addresses_WC+0x770b, %rbx nop nop nop nop nop and $20082, %r8 mov (%rbx), %r15 lea oracles, %r10 and $0xff, %r15 shlq $12, %r15 mov (%r10,%r15,1), %r15 pop %rbx pop %r8 pop %r15 pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}} [Faulty Load] {'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'} {'52': 21829} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
src/main/antlr4/imports/mysql_alter_table.g4
HieuMinh0609/kafka-maxwell
0
6997
grammar mysql_alter_table; import mysql_literal_tokens, mysql_idents, column_definitions; alter_table: alter_table_preamble alter_specifications; alter_table_preamble: ALTER alter_flags? TABLE table_name; alter_flags: (ONLINE | OFFLINE | IGNORE); alter_specifications: alter_specification (',' alter_specification)*; alter_specification: add_column | add_column_parens | change_column | drop_column | modify_column | drop_primary_key | alter_rename_table | convert_to_character_set | default_character_set | table_creation_option+ | ignored_alter_specifications ; // the various alter_table commands available add_column: ADD COLUMN? column_definition col_position?; add_column_parens: ADD COLUMN? '(' column_definition (',' column_definition)* ')'; change_column: CHANGE COLUMN? old_col_name column_definition col_position?; drop_column: DROP COLUMN? old_col_name; old_col_name: name; modify_column: MODIFY COLUMN? column_definition col_position?; drop_primary_key: DROP PRIMARY KEY; alter_rename_table: RENAME (TO | AS) table_name; convert_to_character_set: CONVERT TO charset_token charset_name collation?; ignored_alter_specifications: ADD index_definition | ALTER COLUMN? name ((SET DEFAULT literal) | (DROP DEFAULT)) | DROP INDEX index_name | DISABLE KEYS | ENABLE KEYS | ORDER BY index_columns /* I'm also leaving out the following from the alter table definition because who cares: | DISCARD TABLESPACE | IMPORT TABLESPACE | ADD PARTITION (partition_definition) | DROP PARTITION partition_names | COALESCE PARTITION number | REORGANIZE PARTITION [partition_names INTO (partition_definitions)] | ANALYZE PARTITION {partition_names | ALL} | CHECK PARTITION {partition_names | ALL} | OPTIMIZE PARTITION {partition_names | ALL} | REBUILD PARTITION {partition_names | ALL} | REPAIR PARTITION {partition_names | ALL} | PARTITION BY partitioning_expression | REMOVE PARTITIONING because who cares. */ | ALGORITHM '='? algorithm_type | LOCK '='? lock_type ; algorithm_type: DEFAULT | INPLACE | COPY; lock_type: DEFAULT | NONE | SHARED | EXCLUSIVE;
Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca.log_21829_15.asm
ljhsiun2/medusa
9
82476
<filename>Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca.log_21829_15.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r15 push %rcx push %rdi push %rsi lea addresses_UC_ht+0x167b3, %rsi lea addresses_WC_ht+0x182ac, %rdi nop nop nop nop inc %r15 mov $59, %rcx rep movsl nop and %r10, %r10 lea addresses_WT_ht+0x16f4b, %rcx sub %r15, %r15 movb $0x61, (%rcx) nop nop nop cmp %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r9 push %rax push %rbx push %rdi push %rdx // Store lea addresses_PSE+0x44ab, %rdi xor %r13, %r13 mov $0x5152535455565758, %r11 movq %r11, %xmm5 vmovups %ymm5, (%rdi) nop nop nop nop cmp %r11, %r11 // Store lea addresses_WC+0x1f8ab, %rax nop nop nop xor %rdx, %rdx movb $0x51, (%rax) nop nop nop and $61709, %rdi // Store lea addresses_UC+0x138ab, %rdi nop nop nop sub $16272, %rdx mov $0x5152535455565758, %r13 movq %r13, %xmm2 vmovups %ymm2, (%rdi) nop nop nop and %rbx, %rbx // Faulty Load lea addresses_UC+0x134ab, %r13 nop nop and $47319, %rdi movups (%r13), %xmm5 vpextrq $0, %xmm5, %rbx lea oracles, %rdx and $0xff, %rbx shlq $12, %rbx mov (%rdx,%rbx,1), %rbx pop %rdx pop %rdi pop %rbx pop %rax pop %r9 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 9}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
LauncherApp/LaunchHardCodedScript.applescript
codefromabove/LauncherApp
0
1715
<filename>LauncherApp/LaunchHardCodedScript.applescript tell application "TextEdit" to run tell application "TextEdit" to activate
data/pokemon/base_stats/aggron.asm
AtmaBuster/pokeplat-gen2
6
176317
<reponame>AtmaBuster/pokeplat-gen2 db 0 ; species ID placeholder db 70, 110, 180, 50, 60, 60 ; hp atk def spd sat sdf db STEEL, ROCK ; type db 45 ; catch rate db 205 ; base exp db NO_ITEM, HARD_STONE ; items db GENDER_F50 ; gender ratio db 35 ; step cycles to hatch INCBIN "gfx/pokemon/aggron/front.dimensions" db GROWTH_SLOW ; growth rate dn EGG_MONSTER, EGG_MONSTER ; egg groups db 35 ; happiness ; tm/hm learnset tmhm FOCUS_PUNCH, DRAGON_CLAW, WATER_PULSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, TAUNT, ICE_BEAM, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDERBOLT, THUNDER, EARTHQUAKE, RETURN, DIG, BRICK_BREAK, DOUBLE_TEAM, SHOCK_WAVE, FLAMETHROWER, SANDSTORM, FIRE_BLAST, ROCK_TOMB, AERIAL_ACE, FACADE, SECRET_POWER, REST, ATTRACT, FOCUS_BLAST, FLING, ENDURE, DRAGON_PULSE, SHADOW_CLAW, PAYBACK, GIGA_IMPACT, ROCK_POLISH, STONE_EDGE, AVALANCHE, THUNDER_WAVE, STEALTH_ROCK, CAPTIVATE, DARK_PULSE, ROCK_SLIDE, SLEEP_TALK, NATURAL_GIFT, SWAGGER, SUBSTITUTE, FLASH_CANNON, CUT, SURF, STRENGTH, ROCK_SMASH, ROCK_CLIMB, ANCIENTPOWER, AQUA_TAIL, EARTH_POWER, ENDEAVOR, FIRE_PUNCH, FURY_CUTTER, ICE_PUNCH, ICY_WIND, IRON_DEFENSE, IRON_HEAD, MAGNET_RISE, MUD_SLAP, OUTRAGE, ROLLOUT, SNORE, SPITE, SUPERPOWER, THUNDERPUNCH, UPROAR ; end
src/portscan-ops.ads
jfouquart/synth
263
7079
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Display; package PortScan.Ops is package DPY renames Display; function port_name (id : port_id) return String; function next_ignored_port return port_id; function ignore_reason (id : port_id) return String; function queue_length return Integer; function skip_verified (id : port_id) return Boolean; -- Returns true if every port in the queue has all of ports listed in the -- blocks and blocked_by containers are all also present in the queue function integrity_intact return Boolean; -- This removes the first reverse dependency port from all_ports that is -- found the complete reverse deps list and return the port_id of the -- deleted port. If the list is empty, return port_match_failed instead. function skip_next_reverse_dependency (pinnacle : port_id) return port_id; -- removes processed port from the ranking queue. procedure unlist_port (id : port_id); -- Returns the highly priority buildable port function top_buildable_port return port_id; -- The port build succeeded, so remove the "blocked_by" designation -- for all the immediate reverse dependencies. -- Remove the port from the queue when this is done. procedure cascade_successful_build (id : port_id); -- The port build failed, so set all reverse dependences as skipped -- Remove the port from the queue when this is done. procedure cascade_failed_build (id : port_id; numskipped : out Natural; logs : dim_handlers); -- Kick off bulk run using the given number of builders -- The rank_queue and all_ports must be already set up (it's recommended -- To eliminate the ignored ports and subsequent skips first. procedure parallel_bulk_run (num_builders : builders; logs : dim_handlers); -- Before starting to build a port, lock it. This is required for -- parallel building. procedure lock_package (id : port_id); -- Kicks off curses or sets color support off. Do it before -- calling parallel_bulk_run. procedure initialize_display (num_builders : builders); -- Unconditionally copies web assets to <log directory/report directory -- It also provides an initial summary.json data file just the report has something to load procedure initialize_web_report (num_builders : builders); -- Removes ??_history.json files from previous runs procedure delete_existing_web_history_files; -- Call before executing sanity check. It checks the present of build -- hooks at the synth_conf location and caches the results. procedure initialize_hooks; -- Fire off first hook (run_start) after pkg(8) built as required procedure run_start_hook; -- For the pkg(8), trigger a success or failure hook based on if it built or not. procedure run_hook_after_build (built : Boolean; id : port_id); -- Exposed for pilot which eliminated ignored ports during the sanity check procedure record_history_ignored (elapsed : String; origin : String; reason : String; skips : Natural); private -- History log entries average less than 200 bytes. Allot more than twice this amount. kfile_unit_maxsize : constant Positive := 512; -- Each history segment is limited to this many log lines kfile_units_limit : constant Positive := 500; subtype impulse_range is Integer range 1 .. 500; subtype kfile_content is String (1 .. kfile_unit_maxsize * kfile_units_limit); type progress_history is record segment : Natural := 0; segment_count : Natural := 0; log_entry : Natural := 0; last_index : Natural := 0; last_written : Natural := 0; content : kfile_content; end record; type impulse_rec is record hack : CAL.Time; packages : Natural := 0; virgin : Boolean := True; end record; type hook_type is (run_start, run_end, pkg_success, pkg_failure, pkg_skipped, pkg_ignored); type machine_state is (idle, tasked, busy, done_failure, done_success, shutdown); type dim_instruction is array (builders) of port_id; type dim_builder_state is array (builders) of machine_state; type dim_impulse is array (impulse_range) of impulse_rec; type dim_hooks is array (hook_type) of Boolean; type dim_hooksloc is array (hook_type) of JT.Text; history : progress_history; impulse_counter : impulse_range := impulse_range'Last; impulse_data : dim_impulse; curses_support : Boolean; active_hook : dim_hooks := (False, False, False, False, False, False); hook_location : constant dim_hooksloc := (JT.SUS (PM.synth_confdir & "/hook_run_start"), JT.SUS (PM.synth_confdir & "/hook_run_end"), JT.SUS (PM.synth_confdir & "/hook_pkg_success"), JT.SUS (PM.synth_confdir & "/hook_pkg_failure"), JT.SUS (PM.synth_confdir & "/hook_pkg_skipped"), JT.SUS (PM.synth_confdir & "/hook_pkg_ignored")); function nothing_left (num_builders : builders) return Boolean; function shutdown_recommended (active_builders : Positive) return Boolean; function still_ranked (id : port_id) return Boolean; function rank_arrow (id : port_id) return ranking_crate.Cursor; function package_name (id : port_id) return String; function get_swap_status return Float; function hourly_build_rate return Natural; function impulse_rate return Natural; function assemble_HR (slave : builders; pid : port_id; action : DPY.history_action) return DPY.history_rec; function nv (name, value : String) return String; function nv (name : String; value : Integer) return String; procedure delete_rank (id : port_id); procedure run_hook (hook : hook_type; envvar_list : String); procedure run_package_hook (hook : hook_type; id : port_id); procedure check_history_segment_capacity; procedure handle_first_history_entry; procedure write_summary_json (active : Boolean; states : dim_builder_state; num_builders : builders; num_history_files : Natural); procedure write_history_json; procedure assimulate_substring (history : in out progress_history; substring : String); procedure record_history_built (elapsed : String; slave_id : builders; origin : String; duration : String); procedure record_history_failed (elapsed : String; slave_id : builders; origin : String; duration : String; die_phase : String; skips : Natural); procedure record_history_skipped (elapsed : String; origin : String; reason : String); end PortScan.Ops;
programs/oeis/189/A189738.asm
karttu/loda
0
163355
; A189738: a(1)=3, a(2)=4, a(n)=3a(n-1) + 4a(n-2) ; 3,4,24,88,360,1432,5736,22936,91752,367000,1468008,5872024,23488104,93952408,375809640,1503238552,6012954216,24051816856,96207267432,384829069720,1539316278888,6157265115544,24629060462184,98516241848728,394064967394920,1576259869579672,6305039478318696 mov $1,3 mov $2,3 lpb $0,1 sub $0,1 add $1,3 add $2,3 mov $3,$1 mov $1,$2 mul $2,4 sub $3,4 sub $1,$3 lpe
src/examples/Rejuvenation_Workshop/src/parentpackage.adb
selroc/Renaissance-Ada
1
30272
with Ada.Containers; package body ParentPackage is end ParentPackage;
structure editing/MoveSelnToSectionJS.applescript
RobTrew/txtquery-tools
69
169
// Yosemite JavaScript for Applications (JXA) version function run() { var dctScript = { title: "Move line(s) to new section", version: "0.04", author: "RobTrew", license: "MIT: ALL copies should include the license notice at https://github.com/RobTrew/txtquery-tools" } var blnDebug = 0; // zero unless using the symbolic debugger // JSLR // edit to `blnTPIndent = true` for an extra TaskPaper indent - false for default formatting var blnTPIndent = false; var docsFT = Application("FoldingText").documents(), oDoc = docsFT.length ? docsFT[0] : null; if (!oDoc) return null; // GET LIST OF HEADING TITLES AND THEIR MINIMUM PATHS (+ any selected text) var fnProcess = (blnDebug ? oDoc.debug : oDoc.evaluate), lstHeadsAndSeln = fnProcess({ script: sectionList.toString() }), lstMenu = lstHeadsAndSeln[0], lstSectionPaths = lstHeadsAndSeln[1], strSeln = lstHeadsAndSeln[2], lstNumberedMenu = numberedMenu(lstMenu); // Exit here, if the document contains no headers if (!lstNumberedMenu.length) return 0; // GET USER CHOICE var app = Application.currentApplication(), mbChoice, varResult; app.includeStandardAdditions = true; mbChoice = maybeChoiceIndex( app.chooseFromList(lstNumberedMenu, { withTitle: dctScript.title, withPrompt: "Choose new section for selected line(s):\n\n" + strSeln + "\n", defaultItems: lstNumberedMenu[0], okButtonName: "Move", cancelButtonName: "Cancel", multipleSelectionsAllowed: false, emptySelectionAllowed: false, }) ); // IF A TARGET SECTION HAS BEEN CHOSEN, MOVE THE SELECTION if (mbChoice) { return fnProcess({ script: itemMove.toString(), withOptions: { // JSLR taskpaperindent: blnTPIndent, targetpath: lstSectionPaths[mbChoice] } }); } else return null; } // Number of any target section chosen, or null if no choice function maybeChoiceIndex(varResult) { return varResult ? parseInt(varResult[0].split('\t')[0]) : null; } // move selected item(s) to target path function itemMove(editor, options) { // FIND THE TARGET SECTION var oTree = editor.tree(), oNewParent = oTree.evaluateNodePath(options.targetpath + '[0]')[0], rngSeln = editor.selectedRange(), lstNodes = rngSeln.nodesInRange(), lstSeen = [], lstSelnRoots = [], strID, // edit (1 of 2) for JSLR (using TaskPaper format in FT) blnExtraIndent = options.taskpaperindent; // WORK ONLY WITH THE HIGHEST LEVEL NODES IN THE SELECTION // (CHILDREN TRAVEL WITH THEM) lstNodes.forEach(function (oNode) { strID = oNode.parent.id; if (lstSeen.indexOf(strID) == -1) { lstSelnRoots.push(oNode); lstSeen.push(oNode.id); } }); // APPEND EACH SELECTED PARENT NODE TO THE CHOSEN TARGET NODE // Taking children with each parent, unless we are relocating an ancestor under one // of its own descendants (demoted ancestors travel alone) lstSelnRoots.forEach(function (oNode) { if (oNewParent.isAncestorOfSelf(oNode)) //detach traveller from its descendants before moving it oTree.removeNode(oNode); oNewParent.appendChild(oNode); // by default children travel with parents // edit (2 of 2) for JSLR (using TaskPaper format in FT) if (blnExtraIndent) oNode.setLine('\t' + oNode.line()) }); } // GATHER LIST OF SECTIONS FOR THE UI MENU function sectionList(editor) { var libNodePath = require('ft/core/nodepath').NodePath, oTree = editor.tree(), lstHeads = oTree.evaluateNodePath('//@type=heading'), lstSelnNodes = editor.selectedRange().nodesInRange(), lngSeln = lstSelnNodes.length; var lstMenu = [], lstPath = [], strText = '', rngLines; // get any selected text if (lngSeln) { rngLines = oTree.createRangeFromNodes(lstSelnNodes[0], 0, lstSelnNodes[ lngSeln - 1], -1); strText = rngLines.textInRange().trim(); } // and get each heading, plus its full outline path (compressed) lstHeads.forEach(function (oHead) { // header title lstMenu.push( [Array(oHead.typeIndentLevel() + 1).join('#'), oHead.text() ].join(' ') ); // and compressed header path lstPath.push(libNodePath.calculateMinNodePath(oHead)); }); // headers, their outline paths, and any selected text return [lstMenu, lstPath, strText]; } // List of strings re written with zero-padded numeric prefixes // [strItem] ? maybeStringSeparator ? [strNumberedItem] function numberedMenu(lstItems, strSeparator) { // default separator between number string and item string strSeparator = strSeparator || '\t'; var lng = lstItems.length, lngPadWidth = lng.toString().length; // Numbers string padded to left with zeros to get fixed width // intNumber --> intDigits --> strDigits function zeroPad(intNumber, intDigits) { var strUnpadded = intNumber.toString(), intUnpadded = strUnpadded.length; return Array((intDigits - intUnpadded) + 1).join('0') + strUnpadded; } // list rewritten with numeric prefixes of even length // left-padded with zeros where needed return lstItems.map(function (str, i) { return zeroPad(i, lngPadWidth) + strSeparator + str; }); }
languages/imp/parser/ImpUgly.g4
ellisonch/kinc
2
6054
<gh_stars>1-10 // Define a grammar called Hello grammar ImpUgly; /* var n, s ; n := 100 ; s := 0 ; while not(n <= 0) do ( s := s + n ; n := n + -1 ) */ program : statements int_expression { System.out.println("program(" + $statements.s + ", " + $int_expression.s + ")"); } ; statements returns [String s] locals [String temp = ""] : { $s = "statements()"; } | a=statement (';' b=statement {$temp += "," + $b.s;})* // { $s = "Statements([" + $a.s + $temp + "])"; } { $s = "statements(" + $a.s + $temp + ")"; } ; statement returns [String s] : assign { $s = $assign.s; } | var { $s = $var.s; } | while_ { $s = $while_.s; } | if_ { $s = $if_.s; } ; assign returns [String s] : id '=' int_expression { $s = "assign(" + $id.s + ", " + $int_expression.s + ")"; } ; var returns [String s] : 'var' id_list { $s = "var(" + $id_list.s + ")"; } ; while_ returns [String s] : 'while' bool_expression '{' statements '}' { $s = "while(" + $bool_expression.s + ", " + $statements.s + ")"; } ; if_ returns [String s] : 'if' a=bool_expression '{' b=statements '}' 'else' '{' c=statements '}' { $s = "ifThenElse(" + $a.s + ", " + $b.s + ", " + $c.s + ")"; } ; id_list returns [String s] locals [String temp = ""] : a=id (',' b=id {$temp += "," + $b.s;})* { $s = $a.s + $temp; } ; int_expression returns [String s] : '(' int_expression ')' // { $s = "paren(" + $int_expression.s + ")"; } { $s = $int_expression.s; } | '-' a=int_expression { $s = "neg(" + $a.s + ")"; } | a=int_expression '+' b=int_expression { $s = "plus(" + $a.s + ", " + $b.s + ")"; } | a=int_expression '-' b=int_expression { $s = "minus(" + $a.s + ", " + $b.s + ")"; } | a=int_expression '*' b=int_expression { $s = "times(" + $a.s + ", " + $b.s + ")"; } | a=int_expression '/' b=int_expression { $s = "div(" + $a.s + ", " + $b.s + ")"; } | int_literal { $s = $int_literal.s; } | hole_expression { $s = $hole_expression.s; } | id { $s = $id.s; } ; bool_expression returns [String s] : '(' b=bool_expression ')' // { $s = "paren(" + $b.s + ")"; } { $s = $b.s; } | i1=int_expression '<=' i2=int_expression { $s = "lte(" + $i1.s + ", " + $i2.s + ")"; } | b1=bool_expression '&&' b2=bool_expression { $s = "and(" + $b1.s + ", " + $b2.s + ")"; } | 'not' b=bool_expression { $s = "not(" + $b.s + ")"; } ; hole_expression returns [String s] : Hole_expression { $s = "#hole(\"" + $Hole_expression.text + "\")"; } ; int_literal returns [String s] : Int_literal { $s = "#int(" + $Int_literal.text + ")"; } ; id returns [String s] : Id { $s = "id(#string(\"" + $Id.text + "\"))"; } ; Int_literal : [0-9]+ ; Hole_expression : [$][a-zA-Z][a-zA-Z0-9]* ; Id : [a-zA-Z][a-zA-Z0-9]* ; WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines LINE_COMMENT : '//' ~[\r\n]* -> skip ;
oeis/210/A210616.asm
neoneye/loda-programs
0
169914
; A210616: Digit reversal of n-th semiprime. ; Submitted by <NAME>(w3) ; 4,6,9,1,41,51,12,22,52,62,33,43,53,83,93,64,94,15,55,75,85,26,56,96,47,77,28,58,68,78,19,39,49,59,601,111,511,811,911,121,221,321,921,331,431,141,241,341,541,641,551,851,951,161,661,961,771,871,381,581,781,491,102,202,302,502,602,902,312,412,512,712,812,912,122,622,532,732,742,942,352,452,952,262,562,762,472,872,782,982,192,592,892,992,103,203,303,503,903,413 seq $0,1358 ; Semiprimes (or biprimes): products of two primes. seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences).
grammars/AssignmentStatement3.g4
SadraGoudarzdashti/IUSTCompiler
3
4828
<filename>grammars/AssignmentStatement3.g4 /* grammer AssignmentStatement3 (version 3) @author: <NAME>, (http://webpages.iust.ac.ir/morteza_zakeri/) @date: 20201028 - Compiler generator: ANTRL4.x - Target language(s): Python3.x, -Changelog: -- v3.0 --- Add semantic rules to perform type checking --- Add semantic routines to generate intermediate representation (three addresses codes) -- v2.0 - Reference: Compiler book by Dr. Saeed Parsa (http://parsa.iust.ac.ir/) - Course website: http://parsa.iust.ac.ir/courses/compilers/ - Laboratory website: http://reverse.iust.ac.ir/ */ grammar AssignmentStatement3; @parser::members{ temp_counter = 0 def create_temp(self): self.temp_counter += 1 return 'T' + str(self.temp_counter) def remove_temp(self): self.temp_counter -= 1 def get_temp(self): return 'T' + str(self.temp_counter) } start returns [value_attr = str(), type_attr = str()]: p=prog EOF {$value_attr=$p.value_attr $type_attr = $p.type_attr print('Parsing was done!') }; prog returns [value_attr = str(), type_attr = str()]: prog a=assign | a=assign {$value_attr=$a.value_attr $type_attr = $a.type_attr print('----------') }; assign returns [value_attr = str(), type_attr = str()]: ID ':=' e=expr (NEWLINE | EOF) {$value_attr=$e.value_attr $type_attr = $e.type_attr print('Assignment value:', $ID.text, '=', $e.value_attr) print('Assignment type:', $e.type_attr) }; expr returns [value_attr = str(), type_attr = str()]: e=expr '+' t=term { if $e.type_attr != $t.type_attr: print('Semantic error4 in "+" operator: Inconsistent types!') else: $type_attr = $t.type_attr if $t.type_attr=='float': $value_attr = str(float($e.value_attr) + float($t.value_attr)) print($value_attr, ' = ', $e.value_attr, ' + ', $t.value_attr) elif $t.type_attr=='int': $value_attr = str(int($e.value_attr) + int($t.value_attr)) print($value_attr, ' = ', $e.value_attr, ' + ', $t.value_attr) elif $t.type_attr=='str': temp = self.create_temp() print(temp, ' = ', $e.value_attr, ' + ', $t.value_attr) $value_attr = temp } | e=expr '-' t=term { if $e.type_attr != $t.type_attr: print('Semantic error3 in "-" operator: Inconsistent types!') else: $type_attr = $t.type_attr if $t.type_attr=='float': $value_attr = str(float($e.value_attr) - float($t.value_attr)) print($value_attr, ' = ', $e.value_attr, ' - ', $t.value_attr) elif $t.type_attr == 'int': $value_attr = str(int($e.value_attr) - int($t.value_attr)) print($value_attr, ' = ', $e.value_attr, ' - ', $t.value_attr) elif $t.type_attr=='str': temp = self.create_temp() print(temp, '=', $e.value_attr, '-', $t.value_attr) $value_attr = temp } | expr RELOP term | t=term {$type_attr = $t.type_attr $value_attr = $t.value_attr }; term returns [value_attr = str(), type_attr = str()]: t=term '*' f=factor { if $t.type_attr != $f.type_attr: print('Semantic error2 in "*" operator: Inconsistent types!') else: $type_attr = $f.type_attr if $f.type_attr=='float': $value_attr = str(float($t.value_attr) * float($f.value_attr)) print($value_attr, ' = ', $t.value_attr, ' * ', $f.value_attr) elif $f.type_attr=='int': $value_attr = str(int($t.value_attr) * int($f.value_attr)) print($value_attr, ' = ', $t.value_attr, ' * ', $f.value_attr) elif $f.type_attr=='str': temp = self.create_temp() print(temp, '=', $t.value_attr, '*', $f.value_attr) $value_attr = temp } | t=term '/' f=factor { if $t.type_attr != $f.type_attr: print('Semantic error1 in "/" operator: Inconsistent types!') else: $type_attr = $f.type_attr if $f.type_attr=='float': $value_attr = str(float($t.value_attr) / float($f.value_attr)) print($value_attr, ' = ', $t.value_attr, ' / ', $f.value_attr) elif $f.type_attr=='int': $value_attr = str(int(int($t.value_attr) / int($f.value_attr))) print($value_attr, ' = ', $t.value_attr, ' / ', $f.value_attr) elif $f.type_attr=='str': temp = self.create_temp() print(temp, '=', $t.value_attr, '/', $f.value_attr) $value_attr = temp } | f=factor {$type_attr = $f.type_attr $value_attr = $f.value_attr } ; factor returns [value_attr = str(), type_attr = str()]: '(' e=expr ')' {$type_attr = $e.type_attr $value_attr = $e.value_attr } | ID {$type_attr = 'str' $value_attr = $ID.text } | n=number {$type_attr = $n.type_attr $value_attr = $n.value_attr } ; number returns [value_attr = str(), type_attr = str()]: INT {$value_attr = $INT.text $type_attr = 'int' } |FLOAT {$value_attr = $FLOAT.text $type_attr = 'float' } ; /* Lexical Rules */ INT: DIGIT+ ; FLOAT: DIGIT+ '.' DIGIT* | '.' DIGIT+ ; String: '"' (ESC|.)*? '"' ; ID: LETTER(LETTER|DIGIT)* ; RELOP: '<=' | '<' ; fragment DIGIT: [0-9] ; fragment LETTER: [a-zA-Z] ; fragment ESC: '\\"' | '\\\\' ; WS: [ \t\r]+ -> skip ; NEWLINE: '\n';
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_23_700.asm
ljhsiun2/medusa
9
21628
<filename>Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_23_700.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r15 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x175b5, %rsi lea addresses_normal_ht+0x4bb5, %rdi sub %rax, %rax mov $89, %rcx rep movsw nop nop nop cmp $64993, %rsi lea addresses_D_ht+0xba9d, %rsi lea addresses_WT_ht+0x2bb5, %rdi and $51890, %r14 mov $63, %rcx rep movsq nop nop nop nop nop cmp $53583, %rcx lea addresses_normal_ht+0x179b5, %rsi lea addresses_WT_ht+0xdb5, %rdi clflush (%rsi) nop nop nop nop nop sub %r11, %r11 mov $81, %rcx rep movsw xor %rax, %rax lea addresses_A_ht+0x1e675, %rcx nop nop nop nop cmp %r15, %r15 mov $0x6162636465666768, %r14 movq %r14, %xmm1 vmovups %ymm1, (%rcx) nop nop sub %rcx, %rcx lea addresses_WT_ht+0xc0d, %r14 xor $30764, %rdi vmovups (%r14), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r11 nop nop nop nop nop xor $26783, %r11 lea addresses_normal_ht+0x179b5, %rax sub $44580, %r11 movb $0x61, (%rax) xor %r15, %r15 lea addresses_A_ht+0x91b5, %r11 clflush (%r11) nop nop nop nop nop dec %rcx movb $0x61, (%r11) nop nop nop sub %r15, %r15 lea addresses_WC_ht+0x16f35, %rsi lea addresses_A_ht+0x11c41, %rdi clflush (%rsi) clflush (%rdi) nop nop xor $2181, %rbx mov $85, %rcx rep movsl nop nop nop inc %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %rcx push %rdi push %rsi // Store lea addresses_A+0x12475, %r10 nop nop xor %r8, %r8 mov $0x5152535455565758, %rdi movq %rdi, %xmm0 movups %xmm0, (%r10) nop nop nop sub $22396, %r10 // REPMOV lea addresses_A+0x3008, %rsi lea addresses_US+0x1e571, %rdi nop and %r15, %r15 mov $60, %rcx rep movsb xor %r8, %r8 // Faulty Load lea addresses_PSE+0x101b5, %rcx nop nop nop nop and %rsi, %rsi mov (%rcx), %r10w lea oracles, %r15 and $0xff, %r10 shlq $12, %r10 mov (%r15,%r10,1), %r10 pop %rsi pop %rdi pop %rcx pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_US'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}} {'33': 23} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
gyak/gyak10/kocsma/taszkseged.adb
balintsoos/LearnAda
0
6716
<gh_stars>0 package body Taszkseged is task body Szemafor is Bent: Natural := 0; begin loop select when Bent < Max => accept P; Bent := Bent + 1; or accept V; Bent := Bent - 1; or terminate; end select; end loop; end Szemafor; protected body Veletlen is procedure Reset is begin Ada.Numerics.Float_Random.Reset(G); Inicializalt := True; end Reset; entry General( F: out Float ) when Inicializalt is begin F := Ada.Numerics.Float_Random.Random(G); end General; end Veletlen; begin Veletlen.Reset; end Taszkseged;
src/Generics/Constructions/Recursion.agda
flupe/generics
11
2862
{-# OPTIONS --safe #-} open import Generics.Prelude hiding (lookup) open import Generics.Telescope open import Generics.Desc open import Generics.All open import Generics.HasDesc import Generics.Helpers as Helpers module Generics.Constructions.Recursion {P I ℓ} {A : Indexed P I ℓ} (H : HasDesc A) (open HasDesc H) {p c} (Pr : Pred′ I (λ i → A′ (p , i) → Set c)) where private variable V : ExTele P i : ⟦ I ⟧tel p v : ⟦ V ⟧tel p Pr′ : A′ (p , i) → Set c Pr′ {i} = unpred′ I _ Pr i Below : (x : A′ (p , i)) → Acc x → Setω BelowIndArg : (C : ConDesc P V I) (x : ⟦ C ⟧IndArg A′ (p , v)) → AllIndArgω Acc C x → Setω BelowIndArg (var _) x = Below x BelowIndArg (π ai S C) x a = ∀ s → BelowIndArg C (app< ai > x s) (a s) BelowIndArg (A ⊗ B) (x , y) (ax , ay) = BelowIndArg A x ax ×ω BelowIndArg B y ay BelowCon : (C : ConDesc P V I) (x : ⟦ C ⟧Con A′ (p , v , i)) → AllConω Acc C x → Setω BelowCon (var _) x _ = ⊤ω BelowCon (π ai S C) (s , x) = BelowCon C x BelowCon (A ⊗ B) (f , x) (af , ax) = BelowIndArg A f af ×ω BelowCon B x ax Below x (acc a) with split x ... | (k , x) = BelowCon _ x a module _ (f : ∀ {i} (x : A′ (p , i)) (a : Acc x) → Below x a → Pr′ x) where below : (x : A′ (p , i)) (a : Acc x) → Below x a below x (acc a) with split x ... | (k , x) = belowCon _ x a where belowIndArg : (C : ConDesc P V I) (x : ⟦ C ⟧IndArg A′ (p , v)) (a : AllIndArgω Acc C x) → BelowIndArg C x a belowIndArg (var _) x a = below x a belowIndArg (π ai _ C) x a s = belowIndArg C (app< ai > x s) (a s) belowIndArg (A ⊗ B) (x , y) (ax , ay) = belowIndArg A x ax , belowIndArg B y ay belowCon : (C : ConDesc P V I) (x : ⟦ C ⟧Con A′ (p , v , i)) (a : AllConω Acc C x) → BelowCon C x a belowCon (var _) _ _ = tt belowCon (π _ _ C) (_ , x) a = belowCon C x a belowCon (A ⊗ B) (f , x) (af , ax) = belowIndArg A f af , belowCon B x ax rec : (x : A′ (p , i)) → Pr′ x rec x = f x (wf x) (below x (wf x))
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_13806_1736.asm
ljhsiun2/medusa
9
104137
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r15 push %r9 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x17d9c, %r10 clflush (%r10) nop nop inc %rbp mov $0x6162636465666768, %r9 movq %r9, %xmm7 and $0xffffffffffffffc0, %r10 movntdq %xmm7, (%r10) nop nop nop and %r9, %r9 lea addresses_normal_ht+0x1d7ac, %rax nop nop nop xor $17511, %rbx movb (%rax), %r15b nop nop nop nop nop dec %r15 lea addresses_WC_ht+0x7d0c, %rbx nop nop nop nop nop dec %rcx movb $0x61, (%rbx) nop nop nop nop dec %r15 lea addresses_WC_ht+0x197c4, %rsi lea addresses_WT_ht+0x1b8ec, %rdi nop nop xor %rax, %rax mov $45, %rcx rep movsl nop and $62049, %rbx lea addresses_normal_ht+0x6fec, %rsi lea addresses_A_ht+0xd628, %rdi sub $12333, %rax mov $98, %rcx rep movsb nop nop nop cmp %r10, %r10 lea addresses_D_ht+0x16dac, %rsi nop nop nop nop sub %rdi, %rdi mov (%rsi), %r10 nop add %rax, %rax lea addresses_normal_ht+0xa42a, %r9 nop nop and $10853, %rcx movl $0x61626364, (%r9) nop nop xor $45264, %r10 lea addresses_D_ht+0x1996c, %r9 nop nop nop cmp %rcx, %rcx movw $0x6162, (%r9) nop nop sub %rdi, %rdi lea addresses_normal_ht+0x1e240, %rsi lea addresses_A_ht+0x190ec, %rdi nop nop xor $62758, %rbp mov $117, %rcx rep movsb nop cmp %r15, %r15 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r9 pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r15 push %rbx push %rcx push %rsi // Faulty Load lea addresses_A+0x118ec, %rbx nop nop nop and $56931, %rsi mov (%rbx), %ecx lea oracles, %r12 and $0xff, %rcx shlq $12, %rcx mov (%r12,%rcx,1), %rcx pop %rsi pop %rcx pop %rbx pop %r15 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}} {'00': 13806} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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/017/A017792.asm
neoneye/loda
22
11605
<filename>programs/oeis/017/A017792.asm<gh_stars>10-100 ; A017792: Binomial coefficients C(76,n). ; 1,76,2850,70300,1282975,18474840,218618940,2186189400,18855883575,142466675900,954526728530,5727160371180,31022118677225,152724276564800,687259244541600,2840671544105280,10830060261901380,38223742100828400,125288932441604200,382460951663844400,1090013712241956540,2906703232645217440,7266758081613043600,17061084191613232800,37676560923145889100,78367246720143449328,153720368566435227528,284667349197102273200,498167861094928978100,824553701122641067200,1291800798425471005280,1916865700889408588480,2695592391875730827550,3594123189167641103400,4545508739241428454300,5454610487089714145160,6212195276963285554210,6715886785906254653200,6892620648693261354600,6715886785906254653200,6212195276963285554210,5454610487089714145160,4545508739241428454300,3594123189167641103400,2695592391875730827550,1916865700889408588480,1291800798425471005280,824553701122641067200,498167861094928978100,284667349197102273200,153720368566435227528,78367246720143449328,37676560923145889100,17061084191613232800,7266758081613043600,2906703232645217440,1090013712241956540,382460951663844400,125288932441604200,38223742100828400,10830060261901380,2840671544105280,687259244541600,152724276564800,31022118677225,5727160371180,954526728530,142466675900,18855883575,2186189400,218618940,18474840,1282975,70300,2850,76,1 mov $1,76 bin $1,$0 mov $0,$1
programs/oeis/277/A277237.asm
karttu/loda
0
14291
; A277237: Number of strings of length n composed of symbols from the circular list [1,2,3,4,5,6] such that adjacent symbols in the string must be adjacent in the list. No runs of length 2 or more are allowed for symbols 1, 3 and 5. ; 1,6,15,39,99,255,651,1671,4275,10959,28059,71895,184131,471711,1208235,3095079,7928019,20308335,52020411,133253751,341335395,874350399,2239691979,5737093575,14695861491,37644235791,96427681755,247004624919,632715351939,1620733851615 cal $0,277236 ; Number of strings of length n composed of symbols from the circular list [1,2,3,4] such that adjacent symbols in the string must be adjacent in the list. No runs of length 2 or more are allowed for symbols 1 and 3. mul $0,2 mov $1,$0 div $1,2 sub $1,2 div $1,2 sub $0,$1 add $0,1 mov $1,$0 sub $1,2
programs/oeis/254/A254050.asm
neoneye/loda
22
8179
; A254050: Permutation of odd numbers: a(n) = (2*(A249745(n))) - 1 = A064989(A007310(n)). ; 1,3,5,7,11,13,17,19,9,23,29,15,31,37,41,43,25,47,21,53,59,33,61,67,71,35,73,79,39,83,55,51,89,97,101,103,107,109,57,65,49,27,113,127,85,131,137,77,69,139,149,87,151,95,157,163,121,167,45,173,179,93,91,181,191,193,197,115,111,119,199,123,145,143,211,223,227,229,129,233,239,75,187,241,133,251,155,257,141,263,269,63,271,277,281,185,169,283,159,209 add $0,1 mul $0,3 div $0,2 sub $0,1 seq $0,243502 ; Permutation of even numbers: a(n) = 2 * A064216(n). div $0,2
thirdparty/ffmpeg/libavutil/x86/pixelutils.asm
yashrajsingh1998/ApraPipes1
30
163294
<reponame>yashrajsingh1998/ApraPipes1 ;****************************************************************************** ;* Pixel utilities SIMD ;* ;* Copyright (C) 2002-2004 <NAME> <<EMAIL>> ;* Copyright (C) 2014 <NAME> <u pkh me> ;* ;* This file is part of FFmpeg. ;* ;* FFmpeg is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* ;* FFmpeg is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public ;* License along with FFmpeg; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** %include "x86util.asm" SECTION .text ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_8x8_mmx(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- INIT_MMX mmx cglobal pixelutils_sad_8x8, 4,4,0, src1, stride1, src2, stride2 pxor m7, m7 pxor m6, m6 %rep 4 mova m0, [src1q] mova m2, [src1q + stride1q] mova m1, [src2q] mova m3, [src2q + stride2q] psubusb m4, m0, m1 psubusb m5, m2, m3 psubusb m1, m0 psubusb m3, m2 por m1, m4 por m3, m5 punpcklbw m0, m1, m7 punpcklbw m2, m3, m7 punpckhbw m1, m7 punpckhbw m3, m7 paddw m0, m1 paddw m2, m3 paddw m0, m2 paddw m6, m0 lea src1q, [src1q + 2*stride1q] lea src2q, [src2q + 2*stride2q] %endrep psrlq m0, m6, 32 paddw m6, m0 psrlq m0, m6, 16 paddw m6, m0 movd eax, m6 movzx eax, ax RET ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_8x8_mmxext(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- INIT_MMX mmxext cglobal pixelutils_sad_8x8, 4,4,0, src1, stride1, src2, stride2 pxor m2, m2 %rep 4 mova m0, [src1q] mova m1, [src1q + stride1q] psadbw m0, [src2q] psadbw m1, [src2q + stride2q] paddw m2, m0 paddw m2, m1 lea src1q, [src1q + 2*stride1q] lea src2q, [src2q + 2*stride2q] %endrep movd eax, m2 RET ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_16x16_mmxext(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- INIT_MMX mmxext cglobal pixelutils_sad_16x16, 4,4,0, src1, stride1, src2, stride2 pxor m2, m2 %rep 16 mova m0, [src1q] mova m1, [src1q + 8] psadbw m0, [src2q] psadbw m1, [src2q + 8] paddw m2, m0 paddw m2, m1 add src1q, stride1q add src2q, stride2q %endrep movd eax, m2 RET ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_16x16_sse2(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- INIT_XMM sse2 cglobal pixelutils_sad_16x16, 4,4,5, src1, stride1, src2, stride2 movu m4, [src1q] movu m2, [src2q] movu m1, [src1q + stride1q] movu m3, [src2q + stride2q] psadbw m4, m2 psadbw m1, m3 paddw m4, m1 %rep 7 lea src1q, [src1q + 2*stride1q] lea src2q, [src2q + 2*stride2q] movu m0, [src1q] movu m2, [src2q] movu m1, [src1q + stride1q] movu m3, [src2q + stride2q] psadbw m0, m2 psadbw m1, m3 paddw m4, m0 paddw m4, m1 %endrep movhlps m0, m4 paddw m4, m0 movd eax, m4 RET ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_[au]_16x16_sse2(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- %macro SAD_XMM_16x16 1 INIT_XMM sse2 cglobal pixelutils_sad_%1_16x16, 4,4,3, src1, stride1, src2, stride2 mov%1 m2, [src2q] psadbw m2, [src1q] mov%1 m1, [src2q + stride2q] psadbw m1, [src1q + stride1q] paddw m2, m1 %rep 7 lea src1q, [src1q + 2*stride1q] lea src2q, [src2q + 2*stride2q] mov%1 m0, [src2q] psadbw m0, [src1q] mov%1 m1, [src2q + stride2q] psadbw m1, [src1q + stride1q] paddw m2, m0 paddw m2, m1 %endrep movhlps m0, m2 paddw m2, m0 movd eax, m2 RET %endmacro SAD_XMM_16x16 a SAD_XMM_16x16 u %macro PROCESS_SAD_32x4_U 0 movu m1, [r2] movu m2, [r2 + 16] movu m3, [r0] movu m4, [r0 + 16] psadbw m1, m3 psadbw m2, m4 paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] movu m1, [r2] movu m2, [r2 + 16] movu m3, [r0] movu m4, [r0 + 16] psadbw m1, m3 psadbw m2, m4 paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] movu m1, [r2] movu m2, [r2 + 16] movu m3, [r0] movu m4, [r0 + 16] psadbw m1, m3 psadbw m2, m4 paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] movu m1, [r2] movu m2, [r2 + 16] movu m3, [r0] movu m4, [r0 + 16] psadbw m1, m3 psadbw m2, m4 paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] %endmacro %macro PROCESS_SAD_32x4 1 mov%1 m1, [r2] mov%1 m2, [r2 + 16] psadbw m1, [r0] psadbw m2, [r0 + 16] paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] mov%1 m1, [r2] mov%1 m2, [r2 + 16] psadbw m1, [r0] psadbw m2, [r0 + 16] paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] mov%1 m1, [r2] mov%1 m2, [r2 + 16] psadbw m1, [r0] psadbw m2, [r0 + 16] paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] mov%1 m1, [r2] mov%1 m2, [r2 + 16] psadbw m1, [r0] psadbw m2, [r0 + 16] paddd m1, m2 paddd m0, m1 lea r2, [r2 + r3] lea r0, [r0 + r1] %endmacro ;----------------------------------------------------------------------------- ; int ff_pixelutils_sad_32x32_sse2(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;----------------------------------------------------------------------------- INIT_XMM sse2 cglobal pixelutils_sad_32x32, 4,5,5, src1, stride1, src2, stride2 pxor m0, m0 mov r4d, 4 .loop: PROCESS_SAD_32x4_U PROCESS_SAD_32x4_U dec r4d jnz .loop movhlps m1, m0 paddd m0, m1 movd eax, m0 RET ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_[au]_32x32_sse2(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- %macro SAD_XMM_32x32 1 INIT_XMM sse2 cglobal pixelutils_sad_%1_32x32, 4,5,3, src1, stride1, src2, stride2 pxor m0, m0 mov r4d, 4 .loop: PROCESS_SAD_32x4 %1 PROCESS_SAD_32x4 %1 dec r4d jnz .loop movhlps m1, m0 paddd m0, m1 movd eax, m0 RET %endmacro SAD_XMM_32x32 a SAD_XMM_32x32 u %if HAVE_AVX2_EXTERNAL ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_32x32_avx2(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- INIT_YMM avx2 cglobal pixelutils_sad_32x32, 4,7,5, src1, stride1, src2, stride2 pxor m0, m0 mov r4d, 32/4 lea r5, [stride1q * 3] lea r6, [stride2q * 3] .loop: movu m1, [src1q] ; row 0 of pix0 movu m2, [src2q] ; row 0 of pix1 movu m3, [src1q + stride1q] ; row 1 of pix0 movu m4, [src2q + stride2q] ; row 1 of pix1 psadbw m1, m2 psadbw m3, m4 paddd m0, m1 paddd m0, m3 movu m1, [src1q + 2 * stride1q] ; row 2 of pix0 movu m2, [src2q + 2 * stride2q] ; row 2 of pix1 movu m3, [src1q + r5] ; row 3 of pix0 movu m4, [src2q + r6] ; row 3 of pix1 psadbw m1, m2 psadbw m3, m4 paddd m0, m1 paddd m0, m3 lea src2q, [src2q + 4 * stride2q] lea src1q, [src1q + 4 * stride1q] dec r4d jnz .loop vextracti128 xm1, m0, 1 paddd xm0, xm1 pshufd xm1, xm0, 2 paddd xm0, xm1 movd eax, xm0 RET ;------------------------------------------------------------------------------- ; int ff_pixelutils_sad_[au]_32x32_avx2(const uint8_t *src1, ptrdiff_t stride1, ; const uint8_t *src2, ptrdiff_t stride2); ;------------------------------------------------------------------------------- %macro SAD_AVX2_32x32 1 INIT_YMM avx2 cglobal pixelutils_sad_%1_32x32, 4,7,3, src1, stride1, src2, stride2 pxor m0, m0 mov r4d, 32/4 lea r5, [stride1q * 3] lea r6, [stride2q * 3] .loop: mov%1 m1, [src2q] ; row 0 of pix1 psadbw m1, [src1q] mov%1 m2, [src2q + stride2q] ; row 1 of pix1 psadbw m2, [src1q + stride1q] paddd m0, m1 paddd m0, m2 mov%1 m1, [src2q + 2 * stride2q] ; row 2 of pix1 psadbw m1, [src1q + 2 * stride1q] mov%1 m2, [src2q + r6] ; row 3 of pix1 psadbw m2, [src1q + r5] paddd m0, m1 paddd m0, m2 lea src2q, [src2q + 4 * stride2q] lea src1q, [src1q + 4 * stride1q] dec r4d jnz .loop vextracti128 xm1, m0, 1 paddd xm0, xm1 pshufd xm1, xm0, 2 paddd xm0, xm1 movd eax, xm0 RET %endmacro SAD_AVX2_32x32 a SAD_AVX2_32x32 u %endif
ecdsa128/src/ECDSA128_dll/src/ecdsa128dll.asm
FloydZ/Crypto-Hash
11
14448
.686p .mmx .model flat,stdcall option casemap:none include g:\masm32\include\windows.inc include g:\masm32\include\user32.inc include g:\masm32\include\kernel32.inc include g:\masm32\include\advapi32.inc includelib g:\masm32\lib\user32.lib includelib g:\masm32\lib\kernel32.lib includelib g:\masm32\lib\oleaut32.lib includelib g:\masm32\lib\comctl32.lib includelib g:\masm32\lib\advapi32.lib OPTION PROLOGUE:NONE OPTION EPILOGUE:NONE .code DllEntry proc hInstance:DWORD, reason:DWORD, reserved1:DWORD xor eax, eax inc eax ret 12 DllEntry endp end DllEntry
examples/mikeos/kernel/thread.asm
cashlisa/mos
302
167739
<reponame>cashlisa/mos<gh_stars>100-1000 [extern scheduler_tick] [extern tss_set_stack] [global switch_task] switch_task: ; ; clear interrupts and save context. ; cli pushad ; ; if no current task, just return. ; mov eax, [edi] cmp eax, 0 jz interrupt_return ; ; save selectors. ; push ds push es push fs push gs ; ; switch to kernel segments. ; mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax ; ; save esp. ; mov eax, [edi] mov [eax], esp ; ; call scheduler. ; call scheduler_tick ; ; restore esp. ; mov eax, [edi] mov esp, [eax] ; ; Call tss_set_stack (kernelSS, kernelESP). ; This code will be needed later for user tasks. ; ; push dword 0x8(eax) ; push dword 0x12(eax) ; call tss_set_stack ; add esp, 8 ; ; send EOI and restore context. ; pop gs pop fs pop es pop ds interrupt_return: ; ; test if we need to call old ISR. ; mov eax, esi cmp eax, 0 jne chain_interrupt ; ; if old_isr is null, send EOI and return. ; mov al,0x20 out 0x20,al popa iret ; ; if old_isr is valid, jump to it. This calls ; our PIT timer interrupt handler. ; chain_interrupt: popa jmp esi [global execute_thread] execute_thread: mov esp, edi pop gs pop fs pop es pop ds popa iret
lab3/src/main/antlr4/Expr.g4
AlexeyShik/Translation-Methods
0
751
<gh_stars>0 grammar Expr; prog returns [String value] @init {$value = "";} : main {$value = "#include <stdio.h>\n" + ExprUtils.setToString($main.variables, true) + $main.defFunctions + "\nint main() {\n" + ExprUtils.appendTabs($main.body + "return 0;") + "\n}"; }; main returns [java.util.Set<String> variables, String defFunctions, String body, java.util.Set<String> locals] @init { $variables = new java.util.LinkedHashSet<>(); $defFunctions = ""; $body = ""; $locals = new java.util.LinkedHashSet<>(); } : ( // операторы присваивания IDENTIFIER assignment_operator assignment_operand NEWLINE+ { $variables.add($IDENTIFIER.text); if ("READ".equals($assignment_operand.type)) { $body += "scanf(\"%d\", " + "&" + $IDENTIFIER.text + ");\n"; } else { $body += $IDENTIFIER.text + $assignment_operator.value + $assignment_operand.value + ";\n"; } } | // вывод на экран WRITE_BEGIN expression WRPAREN NEWLINE+ { $body += "printf(\"%" + $expression.type + "\\n\", " + $expression.value + ");\n"; } | // if-elif-else construction WIF e=expression WCOLON NEWLINE+ s1=tab_scope_wrapper[$variables] NEWLINE* { $body += "if (" + $e.value + ") {\n" + $s1.body + "\n}"; } ((WELIF ei=expression WCOLON NEWLINE+ si=tab_scope_wrapper[$variables] NEWLINE* { $body += " else if (" + $ei.value + ") {\n" + $si.body + "\n}"; })* WELSE WCOLON NEWLINE+ s2=tab_scope_wrapper[$variables] NEWLINE* { $body += " else {\n" + $s2.body + "\n}"; })? {$body += "\n";} | // while loop WWHILE e=expression WCOLON NEWLINE+ s=tab_scope_wrapper[$variables] NEWLINE* { $body += "while (" + $e.value + ") {\n" + $s.body + "\n}\n"; } | // for loop WFOR i=IDENTIFIER {$variables.add($i.text);} WIN WRANGE WLPAREN l=expression WCOMMA r=expression WCOMMA step=expression WRPAREN WCOLON NEWLINE+ s=tab_scope_wrapper[$variables] NEWLINE* { $variables.remove($i.text); $body += "for (int " + $i.text + " = " + $l.text + "; " + $i.text + " < " + $r.text + "; " + $i.text + " += " + $step.text + ") {\n" + $tab_scope_wrapper.body + "\n}\n"; } | // function definitions WDEF name=IDENTIFIER WLPAREN arguments { $variables.addAll(ExprUtils.stringToLocals($arguments.value)); $locals.addAll(ExprUtils.stringToLocals($arguments.value)); } WRPAREN WCOLON NEWLINE+ s=tab_scope_wrapper[$variables] NEWLINE* { $defFunctions += "\nint " + $name.text + "(int " + $arguments.value + ") {\n" + $s.body + "\n}\n"; $variables.removeAll($locals); } )*; arguments returns [String value] @init {$value = "";} : i0=IDENTIFIER {$value += $i0.text;} (WCOMMA i=IDENTIFIER {$value += ", int " + $i.text;})* ; tab_scope_wrapper[java.util.Set<String> globalVariables] returns [String body] @init {$body = "";} : tab_scope[globalVariables] { $tab_scope.variables.removeAll($globalVariables); $body += ExprUtils.appendTabs( ExprUtils.setToString($tab_scope.variables, false) + $tab_scope.body);} ; tab_scope[java.util.Set<String> globalVariables] returns [java.util.Set<String> variables, String body] @init { $variables = new java.util.HashSet<>(globalVariables); $body = ""; } : // operations in current identation (TAB simple_operations { $variables.addAll($simple_operations.variables); $body += $simple_operations.body; } | // operations in greater identation TAB WIF e=expression WCOLON NEWLINE+ s1=tab_tab_scope_wrapper[$variables] NEWLINE* { $body += "if (" + $e.value + ") {\n" + $s1.body + "\n}"; } ((TAB WELIF ei=expression WCOLON NEWLINE+ si=tab_tab_scope_wrapper[$variables] NEWLINE* { $body += " else if (" + $ei.value + ") {\n" + $si.body + "\n}"; })* TAB WELSE WCOLON NEWLINE+ s2=tab_tab_scope_wrapper[$variables] NEWLINE* { $body += " else {\n" + $s2.body + "\n}"; })? {$body += "\n";} | TAB WWHILE e=expression WCOLON NEWLINE+ s=tab_tab_scope_wrapper[$variables] NEWLINE* { $body += "while (" + $e.value + ") {\n" + $s.body + "\n}\n"; } | TAB WFOR i=IDENTIFIER {$variables.add($i.text);} WIN WRANGE WLPAREN l=expression WCOMMA r=expression WCOMMA step=expression WRPAREN WCOLON NEWLINE+ tab_tab_scope_wrapper[$variables] NEWLINE* { $body += "for (int " + $i.text + " = " + $l.text + "; " + $i.text + " < " + $r.text + "; " + $i.text + " += " + $step.text + ") {\n" + $tab_tab_scope_wrapper.body + "\n}\n"; $variables.remove($i.text); })* ; tab_tab_scope_wrapper[java.util.Set<String> globalVariables] returns [String body] @init {$body = "";} : tab_tab_scope[globalVariables] { $tab_tab_scope.variables.removeAll($globalVariables); $body += ExprUtils.appendTabs( ExprUtils.setToString($tab_tab_scope.variables, false) + $tab_tab_scope.body);} ; tab_tab_scope[java.util.Set<String> globalVariables] returns [java.util.Set<String> variables, String body] @init { $variables = new java.util.HashSet<>(globalVariables); $body = ""; } : // operations in current identation (TAB TAB simple_operations { $variables.addAll($simple_operations.variables); $body += $simple_operations.body; })* ; simple_operations returns [java.util.Set<String> variables, String body] @init { $variables = new java.util.LinkedHashSet<>(); $body = ""; } : IDENTIFIER assignment_operator assignment_operand NEWLINE+ { $variables.add($IDENTIFIER.text); if ("READ".equals($assignment_operand.type)) { $body += "scanf(\"%d\", " + "&" + $IDENTIFIER.text + ");\n"; } else { $body += $IDENTIFIER.text + $assignment_operator.value + $assignment_operand.value + ";\n"; } } | WRITE_BEGIN expression WRPAREN NEWLINE+ { $body += "printf(\"%" + $expression.type + "\\n\", " + $expression.value + ");\n"; } | WRETURN expression NEWLINE+ {$body += "return " + $expression.value + ";\n";} ; assignment_operator returns [String value] @init {$value = "";} : WASSIGN {$value = " = ";} | WPLUSASSIGN {$value = " += ";} | WMINUSASSIGN {$value = " -= ";} | WPRODUCTASSIGN {$value = " *= ";} | WDIVASSIGN {$value = " /= ";} | WDDIVASSIGN {$value = " //= ";} ; assignment_operand returns [String value, String type] @init {$value = ""; $type = "";} : READ { $value = ""; $type = "READ"; } | expression { $value = $expression.value; $type = "expression"; } ; expression returns [String value, String type] @init {$value = ""; $type = "d";} : WLPAREN a=expression WRPAREN {$value = "(" + $a.value + ")"; $type = $a.type; $type = "d";} | STR_CONST {$value = $STR_CONST.text; $type = "s";} | INTEGER {$value = $INTEGER.text; $type = "d";} | WTRUE {$value = "1"; $type = "d";} | WFALSE {$value = "0"; $type = "d";} | a=expression op=binary_operator b=expression {$value = $a.value + $op.value + $b.value; $type = "d";} | up=unary_operator b=expression {$value = $up.value + $b.value; $type = "d";} | IDENTIFIER a=expression {$value = $IDENTIFIER.text + $a.value; $type = "d";} | IDENTIFIER {$value = $IDENTIFIER.text; $type = "d";} ; binary_operator returns [String value] @init {$value = "";} : WPLUS {$value = " + ";} | WMINUS {$value = " - ";} | WPRODUCT {$value = " * ";} | WDIV {$value = " / ";} | WMOD {$value = " % ";} | WDDIV {$value = " / ";} | WPLUSASSIGN {$value = " += ";} | WMINUSASSIGN {$value = " -= ";} | WPRODUCTASSIGN {$value = " *= ";} | WDIVASSIGN {$value = " /= ";} | WDDIVASSIGN {$value = " /= ";} | WEQUALS {$value = " == ";} | WNEQUALS {$value = " != ";} | WXOR {$value = " ^ ";} | WOR {$value = " | ";} | WAND {$value = " & ";} | WSHL {$value = " << ";} | WLESSEQ {$value = " <= ";} | WLESS {$value = " < ";} | WSHR {$value = " >> ";} | WGREATEREQ {$value = " >= ";} | WGREATER {$value = " > ";} | WLOR {$value = " || ";} | WLAND {$value = " && ";} | WCOMMA {$value = ", ";} ; unary_operator returns [String value] @init {$value = "";} : WNEGATE {$value = " ~";} | WMINUS {$value = " -";} | WNOT {$value = " !";} ; WS : [ ]; TAB : WS WS WS WS; NEWLINE : WS* [\r\n]+; fragment LPAREN : '('; fragment RPAREN : ')'; fragment INT : 'int'; fragment INPUT : 'input'; fragment PRINT : 'print'; fragment TRUE : 'True'; fragment FALSE : 'False'; fragment IF : 'if'; fragment ELIF : 'elif'; fragment ELSE : 'else'; fragment WHILE : 'while'; fragment FOR : 'for'; fragment IN : 'in'; fragment RANGE : 'range'; fragment DEF : 'def'; fragment RETURN : 'return'; fragment QUOTATION : '"'; fragment COLON : ':'; fragment COMMA : ','; fragment IDENTIFIER_START : [a-zA-Z_]; fragment IDENTIFIER_PART : [a-zA-Z0-9_]; fragment DIGIT : [0-9]; fragment PLUS : '+'; fragment MINUS : '-'; fragment PRODUCT : '*'; fragment DIV : '/'; fragment MOD : '%'; fragment DDIV : '//'; fragment EQUALS : '=='; fragment NEQUALS : '!='; fragment ASSIGN : '='; fragment PLUSASSIGN : '+='; fragment MINUSASSIGN : '-='; fragment PRODUCTASSIGN : '*='; fragment DIVASSIGN : '/='; fragment DDIVASSIGN : '//='; fragment XOR : '^'; fragment OR : '|'; fragment AND : '&'; fragment SHL : '<<'; fragment LESSEQ : '<='; fragment SHR : '>>'; fragment GREATEREQ : '>='; fragment LESS : '<'; fragment GREATER : '>'; fragment LOR : ' or '; fragment LAND : ' and '; fragment NEGATE : '~'; fragment NOT : 'not '; WTRUE : WS* TRUE WS*; WFALSE : WS* FALSE WS*; WCOLON : WS* COLON WS*; WIF : IF WS*; WELIF : ELIF WS*; WELSE : ELSE WS*; WWHILE : WHILE WS*; WDEF : WS* DEF WS*; WRETURN : RETURN WS+; WFOR : FOR WS*; WIN : WS* IN WS*; WRANGE : WS* RANGE WS*; WCOMMA : WS* COMMA WS*; WLPAREN : WS* LPAREN WS*; WRPAREN : WS* RPAREN WS*; WEQUALS : WS* EQUALS WS*; WNEQUALS : WS* NEQUALS WS*; WASSIGN : WS* ASSIGN WS*; WPLUS : WS* PLUS WS*; WMINUS : WS* MINUS WS*; WPRODUCT : WS* PRODUCT WS*; WDIV : WS* DIV WS*; WMOD : WS* MOD WS*; WDDIV : WS* DDIV WS*; WPLUSASSIGN : WS* PLUSASSIGN WS*; WMINUSASSIGN : WS* MINUSASSIGN WS*; WPRODUCTASSIGN : WS* PRODUCTASSIGN WS*; WDIVASSIGN : WS* DIVASSIGN WS*; WDDIVASSIGN : WS* DDIVASSIGN WS*; WXOR : WS* XOR WS*; WOR : WS* OR WS*; WAND : WS* AND WS*; WSHL : WS* SHL WS*; WSHR : WS* SHR WS*; WLESSEQ : WS* LESSEQ WS*; WLESS : WS* LESS WS*; WGREATEREQ : WS* GREATEREQ WS*; WGREATER : WS* GREATER WS*; WLOR : WS* LOR WS*; WLAND : WS* LAND WS*; WNEGATE : WS* NEGATE WS*; WNOT : WS* NOT WS*; READ : WS* INT WS* LPAREN WS* INPUT WS* LPAREN WS* RPAREN WS* RPAREN; WRITE_BEGIN : PRINT WS* LPAREN WS*; IDENTIFIER : IDENTIFIER_START IDENTIFIER_PART*; STR_CONST : QUOTATION ALL* QUOTATION; INTEGER : DIGIT+; ALL : [a-zA-Z0-9_ \t\n\r,;.!@#$%^&*()+=-];
Data/PolyP/RecursionSchemes.agda
oisdk/agda-playground
6
11894
{-# OPTIONS --cubical --safe --guardedness #-} module Data.PolyP.RecursionSchemes where open import Function hiding (_⟨_⟩_) open import Data.Sum open import Data.Sigma open import Level open import Data.Unit open import Data.Nat open import Data.Vec.Iterated open import Data.Empty open import WellFounded open import Literals.Number open import Data.Fin.Indexed.Literals open import Data.Fin.Indexed.Properties open import Data.Fin.Indexed open import Data.Nat.Literals open import Data.Maybe open import Path open import Data.PolyP.Universe --------------------------------------------------------------------------------- -- -- Helpers for Termination -- --------------------------------------------------------------------------------- -- This is just the identity type. We need to use it because, if --without-K is -- turned on, Agda will only use an argument to a function to prove structural -- descent if that argument is a concrete data type. -- -- wont-pass : (x : Bool) → (if x then ℕ else ℕ) → ℕ -- wont-pass false zero = zero -- wont-pass false (suc n) = wont-pass true n -- wont-pass true zero = zero -- wont-pass true (suc n) = wont-pass false n -- -- Even though we're clearly structurally descending on the second argument -- there, Agda won't use it unless we make it concrete, like so: -- -- will-pass : (x : Bool) → <! (if x then ℕ else ℕ) !> → ℕ -- will-pass false [! zero !] = zero -- will-pass false [! suc n !] = will-pass true [! n !] -- will-pass true [! zero !] = zero -- will-pass true [! suc n !] = will-pass false [! n !] record <!_!> (A : Type) : Type where eta-equality constructor [!_!] field !! : A open <!_!> -- For the map and cata functions to be structurally -- terminating, we can't do things like: -- -- cata f = f ∘ fmap (cata f) ∘ unwrap -- -- So instead we need to carry a stack of all of the functors -- we're under at any given point, and pattern match on that to -- tell whether we should do f or fmap f. data Layers (n : ℕ) : ℕ → Type₁ where [] : Layers n n _∷_ : Functor (1 + m) → Layers n m → Layers n (1 + m) _++∙_ : Layers n m → Params n → Params m [] ++∙ ys = ys (x ∷ xs) ++∙ ys = let zs = xs ++∙ ys in μ x zs ∷ zs infixr 5 _∷_ _++∙_ --------------------------------------------------------------------------------- -- -- Mapping -- --------------------------------------------------------------------------------- module Mapping {m} {As Bs : Params m} (f : (i : Fin m) → As [ i ] → Bs [ i ]) where mapRec : ∀ (F : Functor n) (Fs : Layers m n) → <! ⟦ F ⟧ (Fs ++∙ As) !> → ⟦ F ⟧ (Fs ++∙ Bs) mapRec (F ⊕ G) Fs [! inl x !] = inl (mapRec F Fs [! x !]) mapRec (F ⊕ G) Fs [! inr x !] = inr (mapRec G Fs [! x !]) mapRec (F ⊗ G) Fs [! x , y !] = mapRec F Fs [! x !] , mapRec G Fs [! y !] mapRec μ⟨ F ⟩ Fs [! ⟨ xs ⟩ !] = ⟨ mapRec F (F ∷ Fs) [! xs !] ⟩ mapRec (! i ) [] [! xs !] = f i xs mapRec (! f0 ) (F ∷ Fs) [! ⟨ xs ⟩ !] = ⟨ mapRec F (F ∷ Fs) [! xs !] ⟩ mapRec (! (fs i)) (F ∷ Fs) [! xs !] = mapRec (! i) Fs [! xs !] mapRec ① Fs _ = tt mapParamAt : (i : Fin n) → (As [ i ] → A) → (j : Fin n) → As [ j ] → As [ i ]≔ A [ j ] mapParamAt f0 f f0 x = f x mapParamAt f0 f (fs _) x = x mapParamAt (fs _) f f0 x = x mapParamAt (fs i) f (fs j) x = mapParamAt i f j x map : ∀ F → (i : Fin n) → (As [ i ] → A) → ⟦ F ⟧ As → ⟦ F ⟧ (As [ i ]≔ A) map F i f xs = Mapping.mapRec (mapParamAt i f) F [] [! xs !] module MapComp {m} {As Bs Cs : Params m} (f : (i : Fin m) → Bs [ i ] → Cs [ i ]) (g : (i : Fin m) → As [ i ] → Bs [ i ]) where open Mapping mapComp : ∀ (F : Functor n) (Fs : Layers m n) (xs : <! ⟦ F ⟧ (Fs ++∙ As) !>) → mapRec f F Fs [! mapRec g F Fs xs !] ≡ mapRec (λ i → f i ∘ g i) F Fs xs mapComp (F ⊕ G) Fs [! inl x !] = cong inl (mapComp F Fs [! x !]) mapComp (F ⊕ G) Fs [! inr x !] = cong inr (mapComp G Fs [! x !]) mapComp (F ⊗ G) Fs [! x , y !] = cong₂ _,_ (mapComp F Fs [! x !]) (mapComp G Fs [! y !]) mapComp μ⟨ F ⟩ Fs [! ⟨ x ⟩ !] = cong ⟨_⟩ (mapComp F (F ∷ Fs) [! x !]) mapComp (! i) [] [! xs !] = refl mapComp (! f0) (F ∷ Fs) [! ⟨ x ⟩ !] = cong ⟨_⟩ (mapComp F (F ∷ Fs) [! x !]) mapComp (! (fs i)) (F ∷ Fs) [! xs !] = mapComp (! i) Fs [! xs !] mapComp ① Fs xs = refl map-comp : ∀ (F : Functor (suc n)) → (f : B → C) → (g : A → B) → (x : ⟦ F ⟧ (A ∷ As)) → map F f0 f (map F f0 g x) ≡ map F f0 (f ∘ g) x map-comp F f g x = MapComp.mapComp (mapParamAt f0 f) (mapParamAt f0 g) F [] [! x !] ; cong (λ c → Mapping.mapRec c F [] [! x !]) (funExt λ { f0 → refl ; (fs x) → refl } ) module MapId {m} {As : Params m} where open Mapping {m = m} {As = As} {Bs = As} mapId : ∀ (F : Functor n) (Fs : Layers m n) (xs : <! ⟦ F ⟧ (Fs ++∙ As) !>) → mapRec (λ _ x → x) F Fs xs ≡ xs .!! mapId (F ⊕ G) Fs [! inl x !] = cong inl (mapId F Fs [! x !]) mapId (F ⊕ G) Fs [! inr x !] = cong inr (mapId G Fs [! x !]) mapId (F ⊗ G) Fs [! x , y !] = cong₂ _,_ (mapId F Fs [! x !]) (mapId G Fs [! y !]) mapId μ⟨ F ⟩ Fs [! ⟨ x ⟩ !] = cong ⟨_⟩ (mapId F (F ∷ Fs) [! x !]) mapId (! i) [] [! xs !] = refl mapId (! f0) (F ∷ Fs) [! ⟨ x ⟩ !] = cong ⟨_⟩ (mapId F (F ∷ Fs) [! x !]) mapId (! (fs i)) (F ∷ Fs) [! xs !] = mapId (! i) Fs [! xs !] mapId ① Fs xs = refl map-id : (F : Functor (suc n)) → (x : ⟦ F ⟧ (A ∷ As)) → map F f0 id x ≡ x map-id F x = cong (λ c → Mapping.mapRec c F [] [! x !]) (funExt (λ { f0 → refl ; (fs i) → refl})) ; MapId.mapId F [] [! x !] --------------------------------------------------------------------------------- -- -- Categorical -- --------------------------------------------------------------------------------- module Categorical (F : Functor (suc n)) (As : Params n) where infix 4 _≗_ _≗_ : (A → B) → (A → B) → Set _ f ≗ g = ∀ x → f x ≡ g x {-# INLINE _≗_ #-} Alg : Type₁ Alg = Σ[ A ⦂ Type ] × (⟦ F ⟧ (A ∷ As) → A) -- Hom _⟶_ : Alg → Alg → Type (A , a) ⟶ (B , b) = Σ[ h ⦂ (A → B) ] × (h ∘ a ≗ b ∘ map F f0 h) variable X Y Z : Alg _∙_ : (Y ⟶ Z) → (X ⟶ Y) → (X ⟶ Z) (f ∙ g) .fst = f .fst ∘ g .fst _∙_ {Y = Y} {Z = Z} {X = X} f g .snd x = cong (f .fst) (g .snd x) ; f .snd (map F f0 (g .fst) x) ; cong (Z .snd) (map-comp F (f .fst) (g .fst) x) id′ : X ⟶ X id′ .fst = id id′ {X = X} .snd x = cong (X .snd) (sym (map-id F x)) --------------------------------------------------------------------------------- -- -- Catamorphisms -- --------------------------------------------------------------------------------- module Cata {k} {F : Functor (suc k)} {As : Params k} (alg : ⟦ F ⟧ (A ∷ As) → A) where cataRec : (G : Functor n) (Gs : Layers (suc m) n) → <! ⟦ G ⟧ (Gs ++∙ μ F As ∷ Bs) !> → ⟦ G ⟧ (Gs ++∙ A ∷ Bs) cataRec (G₁ ⊕ G₂) Gs [! inl x !] = inl (cataRec G₁ Gs [! x !]) cataRec (G₁ ⊕ G₂) Gs [! inr x !] = inr (cataRec G₂ Gs [! x !]) cataRec (G₁ ⊗ G₂) Gs [! x , y !] = cataRec G₁ Gs [! x !] , cataRec G₂ Gs [! y !] cataRec μ⟨ G ⟩ Gs [! ⟨ x ⟩ !] = ⟨ cataRec G (G ∷ Gs) [! x !] ⟩ cataRec (! f0 ) [] [! ⟨ x ⟩ !] = alg (cataRec F [] [! x !]) cataRec (! (fs i)) [] [! x !] = x cataRec (! (fs i)) (G ∷ Gs) [! x !] = cataRec (! i) Gs [! x !] cataRec (! f0 ) (G ∷ Gs) [! ⟨ x ⟩ !] = ⟨ cataRec G (G ∷ Gs) [! x !] ⟩ cataRec ① Gs [! _ !] = tt module _ {F : Functor (suc n)} {As : Params n} where cata : (⟦ F ⟧ (A ∷ As) → A) → μ F As → A cata alg xs = Cata.cataRec alg {Bs = As} (! f0) [] [! xs !] module CataId {k} {F : Functor (suc k)} {As : Params k} where cataRecId : (G : Functor n) (Gs : Layers (suc m) n) → (x : <! ⟦ G ⟧ (Gs ++∙ μ F As ∷ Bs) !>) → Cata.cataRec ⟨_⟩ G Gs x ≡ !! x cataRecId (G₁ ⊕ G₂) Gs [! inl x !] = cong inl (cataRecId G₁ Gs [! x !]) cataRecId (G₁ ⊕ G₂) Gs [! inr x !] = cong inr (cataRecId G₂ Gs [! x !]) cataRecId (G₁ ⊗ G₂) Gs [! x , y !] = cong₂ _,_ (cataRecId G₁ Gs [! x !]) (cataRecId G₂ Gs [! y !]) cataRecId μ⟨ G ⟩ Gs [! ⟨ x ⟩ !] = cong ⟨_⟩ (cataRecId G (G ∷ Gs) [! x !]) cataRecId (! f0 ) [] [! ⟨ x ⟩ !] = cong ⟨_⟩ (cataRecId F [] [! x !]) cataRecId (! (fs i)) [] [! x !] = refl cataRecId (! (fs i)) (G ∷ Gs) [! x !] = cataRecId (! i) Gs [! x !] cataRecId (! f0 ) (G ∷ Gs) [! ⟨ x ⟩ !] = cong ⟨_⟩ ( cataRecId G (G ∷ Gs) [! x !] ) cataRecId ① Gs [! _ !] = refl module _ {F : Functor (suc n)} {As : Params n} where cataId : (x : μ F As) → cata ⟨_⟩ x ≡ x cataId x = CataId.cataRecId (! f0) [] [! x !] --------------------------------------------------------------------------------- -- -- Eliminators -- --------------------------------------------------------------------------------- module Eliminator {As : Params k} {F : Functor (suc k)} (P : μ F As → Type) (f : (x : ⟦ F ⟧ ((∃ x × P x) ∷ As)) → P ⟨ map F f0 fst x ⟩) where open import Path open Mapping open Cata alg : ⟦ F ⟧ ((∃ x × P x) ∷ As) → ∃ x × P x alg x = ⟨ map F f0 fst x ⟩ , f x mutual elimRec : (G : Functor n) (Gs : Layers (suc m) n) → (x : <! ⟦ G ⟧ (Gs ++∙ μ F As ∷ Bs) !>) → mapRec (mapParamAt f0 fst) G Gs [! cataRec alg G Gs x !] ≡ !! x elimRec (G₁ ⊕ G₂) Gs [! inl x !] = cong inl (elimRec G₁ Gs [! x !]) elimRec (G₁ ⊕ G₂) Gs [! inr x !] = cong inr (elimRec G₂ Gs [! x !]) elimRec (G₁ ⊗ G₂) Gs [! x , y !] = cong₂ _,_ (elimRec G₁ Gs [! x !]) (elimRec G₂ Gs [! y !]) elimRec μ⟨ G ⟩ Gs [! ⟨ x ⟩ !] = cong ⟨_⟩ (elimRec G (G ∷ Gs) [! x !]) elimRec (! f0 ) [] [! ⟨ x ⟩ !] = cong ⟨_⟩ (elimRec F [] [! x !]) elimRec (! (fs i)) [] [! x !] = refl elimRec (! (fs i)) (G ∷ Gs) [! x !] = elimRec (! i) Gs [! x !] elimRec (! f0 ) (G ∷ Gs) [! ⟨ x ⟩ !] = cong ⟨_⟩ (elimRec G (G ∷ Gs) [! x !]) elimRec ① Gs [! _ !] = refl elim : ∀ x → P x elim x = subst P (elimRec {Bs = As} (! f0) [] [! x !]) (snd (cata alg x)) module _ {F : Functor (suc n)} where elim : (P : μ F As → Type) → ((x : ⟦ F ⟧ ((∃ x × P x) ∷ As)) → P ⟨ map F f0 fst x ⟩) → (x : μ F As) → P x elim = Eliminator.elim module AlgIsomorphism {F : Functor (suc n)} {As : Params n} where Alg : Type → Type Alg A = ⟦ F ⟧ (A ∷ As) → A AsAlg : Type₁ AsAlg = ∀ A → Alg A → A open import Function.Isomorphism toAlg : μ F As → AsAlg toAlg xs A alg = cata alg xs {-# INLINE toAlg #-} fromAlg : AsAlg → μ F As fromAlg f = f _ ⟨_⟩ {-# INLINE fromAlg #-} rinv : (x : μ F As) → fromAlg (toAlg x) ≡ x rinv = cataId -- think you need parametricity for this -- linv : (x : AsAlg) (A : Type) (alg : Alg A) → toAlg (fromAlg x) A alg ≡ x A alg -- linv x A alg = {!!} -- isom : AsAlg ⇔ μ F As -- isom .fun = fromAlg -- isom .inv = toAlg -- isom .rightInv = rinv -- isom .leftInv x = funExt λ A → funExt λ alg → linv x A alg --------------------------------------------------------------------------------- -- -- Anamorphisms -- --------------------------------------------------------------------------------- -- Coinductive fixpoint record ν (F : Functor (suc n)) (As : Params n) : Type where coinductive; constructor ⟪_⟫ field unfold : ⟦ F ⟧ (ν F As ∷ As) open ν public -- The "proper" anamorphism, which is coinductive. module AnaInf {k} {F : Functor (suc k)} {As : Params k} (coalg : A → ⟦ F ⟧ (A ∷ As)) where mutual anaRec : (G : Functor n) (Gs : Layers (suc m) n) → <! ⟦ G ⟧ (Gs ++∙ A ∷ Bs) !> → <! ⟦ G ⟧ (Gs ++∙ ν F As ∷ Bs) !> anaRec (G₁ ⊕ G₂) Gs [! inl x !] .!! = inl (anaRec G₁ Gs [! x !] .!!) anaRec (G₁ ⊕ G₂) Gs [! inr x !] .!! = inr (anaRec G₂ Gs [! x !] .!!) anaRec (G₁ ⊗ G₂) Gs [! x , y !] .!! .fst = anaRec G₁ Gs [! x !] .!! anaRec (G₁ ⊗ G₂) Gs [! x , y !] .!! .snd = anaRec G₂ Gs [! y !] .!! anaRec μ⟨ G ⟩ Gs [! ⟨ x ⟩ !] .!! = ⟨ anaRec G (G ∷ Gs) [! x !] .!! ⟩ anaRec (! f0 ) [] [! x !] .!! = ana x anaRec (! (fs i)) [] [! x !] .!! = x anaRec (! (fs i)) (G ∷ Gs) [! x !] .!! = anaRec (! i) Gs [! x !] .!! anaRec (! f0 ) (G ∷ Gs) [! ⟨ x ⟩ !] .!! = ⟨ anaRec G (G ∷ Gs) [! x !] .!! ⟩ anaRec ① Gs [! _ !] .!! = tt ana : A → ν F As ana x .unfold = anaRec F [] [! coalg x !] .!! module AnaInfDisplay {F : Functor (suc n)} {As : Params n} where ana : (A → ⟦ F ⟧ (A ∷ As)) → A → ν F As ana = AnaInf.ana open AnaInfDisplay public -- The terminating anamorphism: uses well-founded recursion to ensure we're -- building a finite type. module AnaTerm {B : Type} {_<_ : B → B → Type} (<-wellFounded : WellFounded _<_) {k} {F : Functor (suc k)} {As : Params k} (coalg : (x : B) → ⟦ F ⟧ ((∃ y × (y < x)) ∷ As)) where pr-anaAcc : (x : B) → Acc _<_ x → μ F As pr-anaAcc x (acc wf) = ⟨ map F f0 (λ { (x , p) → pr-anaAcc x (wf x p) }) (coalg x) ⟩ pr-ana : B → μ F As pr-ana x = pr-anaAcc x (<-wellFounded x) module AnaTermDisplay {A : Type} {_<_ : A → A → Type} {F : Functor (suc n)} {As : Params n} where pr-ana : WellFounded _<_ → ((x : A) → ⟦ F ⟧ ((∃ y × (y < x)) ∷ As)) → A → μ F As pr-ana wf = AnaTerm.pr-ana wf module Truncate {B : Type} {_<_ : B → B → Type} (<-wellFounded : WellFounded _<_) {k} {F : Functor (suc k)} {As : Params k} (step : (x : B) -> ⟦ F ⟧ (ν F As ∷ As) → ⟦ F ⟧ ((ν F As × ∃ y × (y < x)) ∷ As)) where truncAcc : (x : B) → Acc _<_ x → ν F As → μ F As truncAcc x (acc wf) xs = ⟨ map F f0 (λ { (ys , z , z<x) → truncAcc z (wf z z<x) ys}) (step x (xs .unfold)) ⟩ trunc : B → ν F As → μ F As trunc x = truncAcc x (<-wellFounded x) module TruncDisplay {A : Type} {_<_ : A → A → Type} {F : Functor (suc n)} {As : Params n} where trunc : WellFounded _<_ → ((x : A) -> ⟦ F ⟧ (ν F As ∷ As) → ⟦ F ⟧ ((ν F As × ∃ y × (y < x)) ∷ As)) → A → ν F As → μ F As trunc wf step = Truncate.trunc wf step
Scripts Pack Source Items/Scripts Pack/Safari/Safari Debug Menu Item.applescript
Phorofor/ScriptsPack.macOS
1
2822
<filename>Scripts Pack Source Items/Scripts Pack/Safari/Safari Debug Menu Item.applescript # Scripts Pack - Tweak various preference variables in macOS # <Phorofor, https://github.com/Phorofor/> -- Show Debug Menu in Safari -- Preference Identifier: com.apple.Safari -- Preference Key: IncludeDebugMenu -- Preference location: ~/Library/Preferences/com.apple.Safari.plist -- Default value: NO set appD to "Safari" set toggleBut to "Show Debug Menu" set tZ to "show" set sTz to "1" set bT to "You've decided that " & appD & " should show the debug menu item" try set prValue to do shell script "defaults read com.apple.Safari IncludeDebugMenu" if prValue = "1" then set prValue to "The " & appD & " debug menu is now shown." set toggleBut to "Hide Debug Menu" set tZ to "hide" set sTz to "0" set bT to "You've decided to disable the screenshot shadows, you will no longer see them when you take screenshots." else set prValue to "The " & appD & " debug menu item is hidden. You will not be able to access it when it's running." end if on error set prValue to "The " & appD & " debug menu item is hidden by default." end try display alert "Would you like to " & tZ & " the " & appD & " debug menu?" message "Shows a debug menu in the menubar when running " & appD & ". It gives access to some features." & return & return & prValue buttons ["Cancel", "Clear", toggleBut] default button 3 cancel button 1 if the button returned of the result is toggleBut then do shell script "defaults write com.apple.Safari IncludeDebugMenu " & sTz else do shell script "defaults remove com.apple.Safari IncludeDebugMenu" set bT to "You've decided to clear the preference for the Safari debug option." end if tell application "System Events" to (name of every process) if the result contains appD then tell application appD display alert "Quit " & appD & " to see changes" message bT & ". To see the changes you've made, you need quit " & appD & ". Would you like to do that now? You'll have to open " & appD & " manually." buttons {"Restart Later", "Quit " & appD} default button 2 cancel button 1 tell application appD to quit end tell else display alert appD & " - Changes Applied!" message bT & ". Your changes will take effect the next time you open " & appD buttons ["Cancel", "Open " & appD] cancel button 1 tell application appD to run end if
oeis/088/A088683.asm
neoneye/loda-programs
11
82710
<filename>oeis/088/A088683.asm ; A088683: a(n) = prime(3*n+2) - prime(3*n). ; Submitted by <NAME>(w2) ; 6,6,8,6,12,10,10,12,6,18,12,12,12,12,14,6,8,12,8,12,6,20,6,14,10,12,12,10,12,16,12,18,24,12,16,8,10,22,10,14,14,18,12,14,12,22,12,12,6,18,24,18,10,18,14,16,12,16,12,22,10,14,24,18,14,10,8,28,10,10,16,40,14,24,6,12,18,6,10,20,10,12,18,8,8,30,6,6,14,14,24,6,22,30,6,12,12,18,28,10 mul $0,3 add $0,2 mov $1,$0 seq $0,40 ; The prime numbers. add $1,2 seq $1,40 ; The prime numbers. sub $1,$0 mov $0,$1
tests/inchexstr/6.asm
dommilosz/customasm
414
18325
<filename>tests/inchexstr/6.asm #d inchexstr("unk" @ 0xffff) ; error: expected string
libsrc/_DEVELOPMENT/arch/zxn/memory/c/sccz80/zxn_addr_from_page.asm
Frodevan/z88dk
640
166053
; uint32_t zxn_addr_from_page(uint8_t page) SECTION code_clib SECTION code_arch PUBLIC zxn_addr_from_page EXTERN asm_zxn_addr_from_page defc zxn_addr_from_page = asm_zxn_addr_from_page ; SDCC bridge for Classic IF __CLASSIC PUBLIC _zxn_addr_from_page defc _zxn_addr_from_page = zxn_addr_from_page ENDIF
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dsub.asm
meesokim/z88dk
0
5822
<gh_stars>0 SECTION code_fp_math48 PUBLIC asm_dsub EXTERN am48_dsub defc asm_dsub = am48_dsub
programs/oeis/268/A268643.asm
karttu/loda
0
9259
<gh_stars>0 ; A268643: Number of 1's in decimal representation of n. ; 0,1,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,2,3,2,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 lpb $0,1 mov $2,$0 div $0,10 mod $2,10 cmp $2,1 add $1,$2 lpe
libsrc/_DEVELOPMENT/inttypes/c/sdcc_iy/strtoumax.asm
teknoplop/z88dk
0
88433
<filename>libsrc/_DEVELOPMENT/inttypes/c/sdcc_iy/strtoumax.asm ; uintmax_t strtoumax(const char *nptr, char **endptr, int base) SECTION code_clib SECTION code_inttypes PUBLIC _strtoumax EXTERN _strtoul defc _strtoumax = _strtoul
Data/Elements4.asm
vcte/eclectic
1
175807
; =============================================================== ; Element Data (76 - 118) ; =============================================================== ; --------------------------------------------------------------- ; Element 76 ; --------------------------------------------------------------- Osmium: .db "Os", 0 .db "Osmium", 0 .db $4C, $31, $56, 0 ;"190.23", 0 .db $A1 ;----Physical----; .db $55, $19, $00 .db $B1, $76, $00 ;----Temperature----; .db $66, $33, $00 .db $86, $33, $00 .db $5C, $15, $C0 .db $95, $A1, $90 .db $31, $46, $00 ;----Atomic----; .db $41, $68, $00 .db $41, $59, $00 .db $B1, $A0 .db $51, $50 .db $41, $3C, $00 .db $13, $14, 0 ;---Miscellaneous---; .db HCP .db $BA, $19, $00 .db $45, $16, $00 ; --------------------------------------------------------------- ; Element 77 ; --------------------------------------------------------------- Iridium: .db "Ir", 0 .db "Iridium", 0 .db $4C, $51, $54, $A0 ;"192.217", 0 .db $A1 ;----Physical----; .db $55, $19, $00 .db $B1, $87, $00 ;----Temperature----; .db $5A, $53, $00 .db $7A, $33, $00 .db $59, $16, $90 .db $89, $61, $8B, $00 .db $31, $46, $00 ;----Atomic----; .db $41, $69, $00 .db $41, $5A, $00 .db $C1, $40 .db $51, $50 .db $41, $88, $00 .db $13, $14, 0 ;---Miscellaneous---; .db CCP .db $47, $A0 .db $54, $16, $00 ; --------------------------------------------------------------- ; Element 78 ; --------------------------------------------------------------- Platinum: .db "Pt", 0 .db "Platinum", 0 .db $4C, $81, $3A, $B0 ;"195.078", 0 .db $A1 ;----Physical----; .db $54, $17, $80 .db $C1, $40 ;----Temperature----; .db $53, $75, $14, $00 .db $74, $33, $00 .db $4C, $19, $90 .db $84, $31, $78, $00 .db $31, $46, $00 ;----Atomic----; .db $41, $6C, $00 .db $41, $60 .db $C0 .db $51, $5B, $00 .db $51, $45, $00 .db $12, $14, 0 ;---Miscellaneous---; .db CCP .db $A4, $19, $00 .db $C1, $70 ; --------------------------------------------------------------- ; Element 79 ; --------------------------------------------------------------- Gold: .db "Au", 0 .db "Gold", 0 .db $4C, $91, $C9, $A0 ;"196.967", 0 .db $A1 ;----Physical----; .db $4C, $16, $00 .db $43, $15, $00 ;----Temperature----; .db $46, $6A, $18, $B0 .db $64, $63, $00 .db $45, $16, $90 .db $65, $71, $76, $00 .db $31, $45, $B0 ;----Atomic----; .db $41, $79, $00 .db $41, $67, $00 .db $C1, $55, $80 .db $51, $87, $00 .db $51, $64, $00 .db $11, $13, 0 ;---Miscellaneous---; .db CCP .db $64, $B0 .db $7B, $1B, $00 ; --------------------------------------------------------------- ; Element 80 ; --------------------------------------------------------------- Mercury: .db "Hg", 0 .db "Mercury", 0 .db $53, $31, $8C, 0 ;"200.59", 0 .db $A2 ;----Physical----; .db $46, $18, $80 .db $47, $1B, $00 ;----Temperature----; .db $56, $71, $64, $00 .db $95, $C1, $BB, $00 .db $51, $5C, $50 .db $8C, $16, $00 .db $31, $47, $30 ;----Atomic----; .db $41, $90 .db $41, $7C, $00 .db $43, $17, $6A, $00 .db $50 .db $30 .db $11, $12, 0 ;---Miscellaneous---; .db RH .db $B1, $60 .db $40 ; --------------------------------------------------------------- ; Element 81 ; --------------------------------------------------------------- Thallium: .db "Tl", 0 .db "Thallium", 0 .db $53, $71, $6B, $60 ;"204.383", 0 .db $B1 ;----Physical----; .db $44, $1B, $80 .db $4A, $15, $00 ;----Temperature----; .db $8A, $A0 .db $4A, $79, $00 .db $71, $5A, $00 .db $49, $51, $3C, $00 .db $31, $45, $C0 ;----Atomic----; .db $41, $A4, $00 .db $41, $7B, $00 .db $91, $43, $B0 .db $51, $37, $00 .db $31, $64, $00 ;srcs disagree .db $11, $13, 0 ;---Miscellaneous---; .db HCP .db $79, $14, $00 .db $81, $90 ; --------------------------------------------------------------- ; Element 82 ; --------------------------------------------------------------- Lead: .db "Pb", 0 .db "Lead", 0 .db $53, $A1, $50 ;"207.2", 0 .db $B1 ;----Physical----; .db $44, $16, $80 .db $4B, $16, $00 ;----Temperature----; .db $93, $31, $98, $00 .db $53, $56, $00 .db $71, $AA, $00 .db $4A, $A1, $C0 .db $31, $45, $C0 ;----Atomic----; .db $41, $A8, $00 .db $41, $7A, $00 .db $A1, $74, $90 .db $51, $66, $00 .db $31, $69, $00 ;srcs disagree .db $12, $14, 0 ;---Miscellaneous---; .db CCP .db $68, $16, $00 .db $71, $B0 ; --------------------------------------------------------------- ; Element 83 ; --------------------------------------------------------------- Bismuth: .db "Bi", 0 .db "Bismuth", 0 .db $53, $B1, $CB, $30 ;"208.980", 0 .db $31 ;----Physical----; .db $C1, $A8, $00 .db $54, $16, $00 ;----Temperature----; .db $87, $71, $8C, $00 .db $4B, $6A, $00 .db $44, $00 .db $4A, $C0 .db $31, $45, $50 ;----Atomic----; .db $41, $A0 .db $41, $79, $00 .db $A1, $5B, $C0 .db $51, $35, $00 .db $31, $C7, $00 ;srcs disagree .db $13, $15, 0 ;---Miscellaneous---; .db RH .db $A1, $C5, $00 .db $31, $33, $B9, $A0 ; --------------------------------------------------------------- ; Element 84 ; --------------------------------------------------------------- Polonium: .db "Po", 0 .db "Polonium", 0 .db 111 ;"(209)", 0 .db $41 ;----Physical----; .db $C1, $60 .db $55, $1A, $00 ;----Temperature----; .db $85, $A0 .db 0 .db $46, $00 .db $45, $30 .db 0 ;----Atomic----; .db $41, $9A, $00 .db $41, $86, $00 .db $B1, $75, $00 .db $50 .db $41, $BA, $00 .db $12, $14, 0 ;---Miscellaneous---; .db CUB .db $31, $50 .db $31, $A0 ; --------------------------------------------------------------- ; Element 85 ; --------------------------------------------------------------- Astatine: .db "At", 0 .db "Astatine", 0 .db 112 ;"(210)", 0 .db $51 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $8A, $80 .db $94, $30 .db $45, $00 .db $63, $00 .db 0 ;----Atomic----; .db $41, $78, $00 .db $41, $7A, $00 .db $51, $50 .db $51, $B3, $00 ;---Miscellaneous---; .db 0 .db $41, $A0 .db 0 ; --------------------------------------------------------------- ; Element 86 ; --------------------------------------------------------------- Radon: .db "Rn", 0 .db "Radon", 0 .db 124 ;"(222)", 0 .db $63 ;----Physical----; .db $C1, $A6, $00 .db $83, $18, $00 ;----Temperature----; .db $53, $50 .db $54, $41, $70 .db $51, $C0 .db $49, $17, $00 .db $31, $3C, $70 ;----Atomic----; .db $41, $67, $00 .db 0 .db $43, $1A, $7B, $00 .db $30 .db $30 .db $80 ;---Miscellaneous---; .db 0 .db $31, $33, $69, $70 .db 0 ; --------------------------------------------------------------- ; Element 87 ; --------------------------------------------------------------- Francium: .db "Fr", 0 .db "Francium", 0 .db 125 ;"(223)", 0 .db $11 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $63, $30 .db $C8, $30 .db $51, $40 .db $97, $00 .db 0 ;----Atomic----; .db $51, $A0 .db 0 .db $30 .db $31, $A0 .db $11, 0 ;---Miscellaneous---; .db BCC .db $48, $00 .db 0 ; --------------------------------------------------------------- ; Element 88 ; --------------------------------------------------------------- Radium: .db "Ra", 0 .db "Radium", 0 .db 128 ;"(226)", 0 .db $21 ;----Physical----; .db $80 .db $78, $15, $00 ;----Temperature----; .db $CA, $60 .db $47, $46, $00 .db $B1, $6A, $00 .db $46, $91, $B5, $00 .db $31, $3C, $70 ;----Atomic----; .db $51, $66, $00 .db 0 .db $81, $5A, $C0 .db $31, $BC, $00 .db $12, 0 ;---Miscellaneous---; .db BCC .db $4B, $19, $00 .db $40 ; --------------------------------------------------------------- ; Element 89 ; --------------------------------------------------------------- Actinium: .db "Ac", 0 .db "Actinium", 0 .db 129 ;"(227)", 0 .db $91 ;----Physical----; .db $43, $13, $A0 .db $55, $18, $00 ;----Temperature----; .db $46, $57, $00 .db $67, $A3, $00 .db 0 .db 0 .db $31, $45, $00 ;----Atomic----; .db $41, $BB, $00 .db 0 .db $81, $4A, $00 .db $41, $40 .db $13, 0 ;---Miscellaneous---; .db FCC .db $45, $00 .db 0 ; --------------------------------------------------------------- ; Element 90 ; --------------------------------------------------------------- Thorium: .db "Th", 0 .db "Thorium", 0 .db $56, $51, $36, $B0 ;"232.038", 0 .db $91 ;----Physical----; .db $44, $1A, $50 .db $4C, $1C, $00 ;----Temperature----; .db $53, $5B, $00 .db $83, $93, $00 .db $48, $19, $80 .db $87, $61, $C5, $00 .db $31, $44, $60 ;----Atomic----; .db $41, $B0 .db $41, $98, $00 .db $91, $3B, $00 .db $41, $60 .db $14, 0 ;---Miscellaneous---; .db FCC .db $87, $00 .db $A1, $40 ; --------------------------------------------------------------- ; Element 91 ; --------------------------------------------------------------- Protactinium: .db "Pa", 0 .db "Protactinium", 0 .db $56, $41, $36, $90 ;"231.036", 0 .db $91 ;----Physical----; .db $48, $17, $00 .db $48, $00 ;----Temperature----; .db $4B, $78, $00 .db $76, $33, $00 .db 0 .db 0 .db 0 ;----Atomic----; .db $41, $94, $00 .db 0 .db $81, $BB, $00 .db $41, $80 .db $14, $15, 0 ;---Miscellaneous---; .db FCC .db $7A, $00 .db $81, $90 ; --------------------------------------------------------------- ; Element 92 ; --------------------------------------------------------------- Uranium: .db "U", 0 .db "Uranium", 0 .db $56, $B1, $35, $C0 ;"238.029", 0 .db $91 ;----Physical----; .db $4B, $1C, $80 .db $45, $18, $00 ;----Temperature----; .db $47, $3B, $00 .db $77, $3A, $00 .db $48, $17, $B0 .db $75, $51, $8B, $00 .db $31, $45, $00 ;----Atomic----; .db $41, $6B, $00 .db $41, $75, $00 .db $91, $38, $00 .db $41, $6B, $00 .db $13, $14, $15, $16, 0 ;---Miscellaneous---; .db COR .db $5A, $19, $00 .db $61, $90 ; --------------------------------------------------------------- ; Element 93 ; --------------------------------------------------------------- Neptunium: .db "Np", 0 .db "Neptunium", 0 .db 139 ;"(237)", 0 .db $91 ;----Physical----; .db $53, $15, $00 .db $54, $14, $00 ;----Temperature----; .db $C4, $50 .db $74, $A8, $00 .db 0 .db 0 .db 0 ;----Atomic----; .db $41, $60 .db 0 .db $91, $4C, $00 .db $41, $69, $00 .db $13, $14, $15, $16, 0 ;---Miscellaneous---; .db 0 .db $91, $60 .db $31, $B0 ; --------------------------------------------------------------- ; Element 94 ; --------------------------------------------------------------- Plutonium: .db "Pu", 0 .db "Plutonium", 0 .db 146 ;"(244)", 0 .db $91 ;----Physical----; .db $4C, $1B, $70 .db $45, $16, $50 ;----Temperature----; .db $C4, $60 .db $68, $38, $00 .db 0 .db 0 .db $31, $46, $00 ;----Atomic----; .db $41, $84, $00 .db 0 .db $91, $39, $00 .db $41, $5B, $00 .db $13, $14, $15, $16, 0 ;---Miscellaneous---; .db FCC .db $91, $60 .db $31, $A0 ; --------------------------------------------------------------- ; Element 95 ; --------------------------------------------------------------- Americium: .db "Am", 0 .db "Americium", 0 .db 145 ;"(243)", 0 .db $91 ;----Physical----; .db $46, $1A, $00 .db $53, $1B, $00 ;----Temperature----; .db $47, $7C, $00 .db $5B, $B3, $00 .db 0 .db 0 .db 0 ;----Atomic----; .db $41, $B7, $00 .db 0 .db $90 .db $41, $60 .db $13, $14, $15, $16, 0 ;---Miscellaneous---; .db HCP .db $43, $00 .db $31, $A0 ; --------------------------------------------------------------- ; Element 96 ; --------------------------------------------------------------- Curium: .db "Cm", 0 .db "Curium", 0 .db 149 ;"(247)", 0 .db $91 ;----Physical----; .db $46, $18, $00 .db $4B, $16, $00 ;----Temperature----; .db $49, $53, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $35, $00 .db $41, $60 .db $13, 0 ;---Miscellaneous---; .db FCC .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 97 ; --------------------------------------------------------------- Berkelium: .db "Bk", 0 .db "Berkelium", 0 .db 149 ;"(247)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $56, $00 .db $41, $60 .db $13, $14, 0 ;---Miscellaneous---; .db HCP .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 98 ; --------------------------------------------------------------- Californium: .db "Cf", 0 .db "Californium", 0 .db 153 ;"(251)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $44, $A3, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $60 .db $41, $60 .db $13, 0 ;---Miscellaneous---; .db 0 .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 99 ; --------------------------------------------------------------- Einsteinium: .db "Es", 0 .db "Einsteinium", 0 .db 154 ;"(252)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $44, $63, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $75, $00 .db $41, $60 .db $13, 0 ;---Miscellaneous---; .db 0 .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 100 ; --------------------------------------------------------------- Fermium: .db "Fm", 0 .db "Fermium", 0 .db 159 ;"(257)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $4B, $33, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $80 .db $41, $60 .db $13, 0 ;---Miscellaneous---; .db 0 .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 101 ; --------------------------------------------------------------- Mendelevium: .db "Md", 0 .db "Mendelevium", 0 .db 160 ;"(258)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $44, $33, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $8B, $00 .db $41, $60 .db $12, $13, 0 ;---Miscellaneous---; .db 0 .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 102 ; --------------------------------------------------------------- Nobelium: .db "No", 0 .db "Nobelium", 0 .db 161 ;"(259)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $44, $33, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $91, $98, $00 .db $41, $60 .db $12, $13, 0 ;---Miscellaneous---; .db 0 .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 103 ; --------------------------------------------------------------- Lawrencium: .db "Lr", 0 .db "Lawrencium", 0 .db 164 ;"(262)", 0 .db $91 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db $4C, $33, $00 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $13, 0 ;---Miscellaneous---; .db 0 .db $43, $00 .db 0 ; --------------------------------------------------------------- ; Element 104 ; --------------------------------------------------------------- Rutherfordium: .db "Rf", 0 .db "Rutherfordium", 0 .db 163 ;"(261)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 .db $14, 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 105 ; --------------------------------------------------------------- Dubnium: .db "Db", 0 .db "Dubnium", 0 .db 164 ;"(262)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 106 ; --------------------------------------------------------------- Seaborgium: .db "Sg", 0 .db "Seaborgium", 0 .db 168 ;"(266)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 107 ; --------------------------------------------------------------- Bohrium: .db "Bh", 0 .db "Bohrium", 0 .db 166 ;"(264)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 108 ; --------------------------------------------------------------- Hassium: .db "Hs", 0 .db "Hassium", 0 .db 179 ;"(277)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 109 ; --------------------------------------------------------------- Meitnerium: .db "Mt", 0 .db "Meitnerium", 0 .db 170 ;"(268)", 0 .db $A0 ;debatable... ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 110 ; --------------------------------------------------------------- Darmstadtium: .db "Ds", 0 .db "Darmstadtium", 0 .db 183 ;"(281)", 0 srcs disagree but whatever .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 111 ; --------------------------------------------------------------- Roentgenium: .db "Rg", 0 .db "Roentgenium", 0 .db 174 ;"(272)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 112 ; --------------------------------------------------------------- Copernicium: .db "Cn", 0 .db "Copernicium", 0 .db 187 ;"(285)", 0 .db $A0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 113 ; --------------------------------------------------------------- Ununtrium: .db "Uut", 0 .db "Ununtrium", 0 .db 188 ;"(286)", 0 .db 0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 114 ; --------------------------------------------------------------- Ununquadium: .db "Uuq", 0 .db "Ununquadium", 0 .db 191 ;"(289)", 0 .db 0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 115 ; --------------------------------------------------------------- Ununpentium: .db "Uup", 0 .db "Ununpentium", 0 .db 191 ;"(289)", 0 .db 0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 116 ; --------------------------------------------------------------- Ununhexium: .db "Uuh", 0 .db "Ununhexium", 0 .db 195 ;"(293)", 0 .db 0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 117 ; --------------------------------------------------------------- Ununseptium: .db "Uus", 0 .db "Ununseptium", 0 .db 196 ;"(294)", 0 .db 0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0 ; --------------------------------------------------------------- ; Element 118 ; --------------------------------------------------------------- Ununoctium: .db "Uuo", 0 .db "Ununoctium", 0 .db 196 ;"(294)", 0 .db 0 ;----Physical----; .db 0 .db 0 ;----Temperature----; .db 0 .db 0 .db 0 .db 0 .db 0 ;----Atomic----; .db 0 .db 0 ;---Miscellaneous---; .db 0 .db 0 .db 0
agent/table.asm
jephthai/EvilVM
141
241082
<reponame>jephthai/EvilVM<filename>agent/table.asm ;;; ------------------------------------------------------------------------ ;;; We will be making some space for a table of global variables ;;; ------------------------------------------------------------------------ %define GLOBAL_SPACE 0x240 %define KERNEL32_BASE [ r15 + 0x008 ] %define KERNEL32_NAMES [ r15 + 0x010 ] %define KERNEL32_FNS [ r15 + 0x018 ] %define KERNEL32_ORDS [ r15 + 0x020 ] %define W32_GetProcAddress [ r15 + 0x028 ] %assign offset 0x30 %macro DefGlobal 2 %xdefine %1_OFF %2 %xdefine %1 [ r15 + %2 ] %endmacro ;;; ------------------------------------------------------------------------ ;;; Define a bunch of runtime global variables for compiler state ;;; ------------------------------------------------------------------------ DefGlobal G_BOTTOM, 0x30 ; bottom of the data stack DefGlobal G_KEY, 0x38 ; function pointer for reading a byte from input stream DefGlobal G_MEMINPUT, 0x40 ; pointer to current location for compiling from memory DefGlobal G_BOOT, 0x48 ; boot pointer for error handler to reset DefGlobal G_RESET, 0x50 ; function pointer to reset state on error DefGlobal G_HERE, 0x58 ; next available byte in dictionary DefGlobal G_LAST, 0x60 ; last defined word in dictionary DefGlobal G_THIS, 0x68 ; current word definition in dictionary DefGlobal G_STDIN, 0x70 ; process's actual standard input stream handle DefGlobal G_INPUT, 0x78 ; handle for input with default IO DefGlobal G_TIB, 0x80 ; beginning of the TIB DefGlobal G_TIBA, 0x88 ; start of unused TIB DefGlobal G_TIBB, 0x90 ; last read char in TIB DefGlobal G_TIBN, 0x98 ; length of the TIB DefGlobal G_SCRATCH, 0x100 ; pointer to unmanaged scratch space in memory DefGlobal G_ECHO, 0x108 ; flag to echo input to output DefGlobal G_BASE, 0x110 ; numeric base for IO DefGlobal G_INIT, 0x118 ; offset to core API during initialization DefGlobal G_ENTRY, 0x120 ; entrypoint to the shellcode DefGlobal G_RSP0, 0x128 ; save boot-time call stack pointer for reset DefGlobal G_PSP0, 0x130 ; save boot-time data stack pointer for reset DefGlobal G_STDOUT, 0x138 ; process's actual standard output stream handle DefGlobal G_STACK, 0x140 ; base of the data stack DefGlobal G_DICT, 0x148 ; base of the dictionary DefGlobal G_LASTEX, 0x150 ; pointer to last exception DefGlobal G_HANDLER, 0x158 ; exception handler pointer DefGlobal G_LASTCALL, 0x160 ; last call on stack at exception DefGlobal G_DSIZE, 0x168 ; size of the initial dictionary as allocated DefGlobal G_LINENO, 0x170 ; for counting lines DefGlobal G_LASTWORD, 0x178 ; last word read by interpreter DefGlobal G_LASTLEN, 0x180 ; last word length DefGlobal G_EOS, 0x188 ; end of shellcode in memory ;;; From now on, we'll tack on more globals in macros, and keep track ;;; of the offsets using this variable. This is handy for optional code ;;; (such as alternative IO layers) so that they can create usable global ;;; variable slots without having to keep track of indexes manually. %assign offset 0x190 %macro AddGlobal 2 %xdefine %1_OFF offset %xdefine %1 [ r15 + offset ] %assign offset offset + 8 mov %1, %2 %endmacro
core/src/main/resources/applescript/itunes/pause.applescript
duester/command-center
87
1106
<filename>core/src/main/resources/applescript/itunes/pause.applescript<gh_stars>10-100 tell application "iTunes" to pause
src/Ada/c-kernel.ads
wookey-project/ewok-legacy
0
23506
-- -- Copyright 2018 The wookey project team <<EMAIL>> -- - <NAME> -- - <NAME> -- - Mathieu Renard -- - <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 types.c; package c.kernel is procedure log (s : types.c.c_string) with convention => c, import => true, external_name => "dbg_log", global => null; procedure flush with convention => c, import => true, external_name => "dbg_flush", global => null; function get_random (s : out types.c.c_string; len : in unsigned_16) return types.c.t_retval with convention => c, import => true, external_name => "get_random", global => null; function get_random_u32 (rng : out unsigned_32) return types.c.t_retval with convention => c, import => true, external_name => "get_random_u32", global => null; end c.kernel;
src/main/antlr4/Query.g4
ajclopez/mongo-spring-search
6
3140
grammar Query; input : query EOF ; query : left=query logicalOp=(AND | OR) right=query #opQuery | LPAREN query RPAREN #priorityQuery | criteria #atomQuery ; criteria : key op value | key ; key : IDENTIFIER | NEG_IDENTIFIER ; value : IDENTIFIER | STRING | ENCODED_STRING ; op : EQ | NE | GT | GTE | LT | LTE ; STRING : '\'' StringCharacter* '\'' ; fragment StringCharacter : ~["\\\r\n] | '\\' EscapeSequence | LineContinuation ; fragment EscapeSequence : CharacterEscapeSequence | HexEscapeSequence | UnicodeEscapeSequence ; fragment CharacterEscapeSequence : SingleEscapeCharacter | NonEscapeCharacter ; fragment HexEscapeSequence : 'x' HexDigit HexDigit ; fragment UnicodeEscapeSequence : 'u' HexDigit HexDigit HexDigit HexDigit ; fragment SingleEscapeCharacter : ['"\\bfnrtv] ; fragment NonEscapeCharacter : ~['"\\bfnrtv0-9xu\r\n] ; fragment EscapeCharacter : SingleEscapeCharacter | DecimalDigit | [xu] ; fragment LineContinuation : '\\' LineTerminatorSequence ; fragment LineTerminatorSequence : '\r\n' | LineTerminator ; fragment DecimalDigit : [0-9] ; fragment HexDigit : [0-9a-fA-F] ; fragment OctalDigit : [0-7] ; AND : 'AND' | 'and' ; OR : 'OR' | 'or' ; LPAREN : '(' ; RPAREN : ')' ; EQ : '=' ; NE : '!=' ; GT : '>' ; GTE : '>=' ; LT : '<' ; LTE : '<=' ; IDENTIFIER : [A-Za-z0-9.]+ ; NEG_IDENTIFIER : '!'[A-Za-z0-9.]+ ; ENCODED_STRING : ~([ \[\]<>!=()])+ ; LineTerminator : [\r\n\u2028\u2029] -> channel(HIDDEN) ; WS : [ \t\r\n]+ -> skip ;
kernel/kernel.asm
leosncz/SMOS
0
87861
;--- @author leosncz ;--- SmallModularOperatingSystem (SMOS) kernel launcher ;--- Only purpose is to load kernel c part & provide basic routines [bits 32] extern start extern clockIRQHandler global _start global setup_pic global enable_interrupt global disable_interrupt global clockIRQHandlerASM _start: jmp start clockIRQHandlerASM: call clockIRQHandler mov al, 0x20 out 0x20, al iret enable_interrupt: sti ret disable_interrupt: cli ret setup_pic: mov al, 0x11 out 0x20, al out 0xA0, al jmp tempo_1 tempo_1: mov al, 0x20 out 0x21, al mov al, 0x70 out 0xA1, al jmp tempo_2 tempo_2: mov al, 0x04 out 0x21, al mov al, 0x02 out 0xA1, al jmp tempo_3 tempo_3: mov al, 0x01 out 0x21, al out 0xA1, al jmp tempo_4 tempo_4: in al, 0x21 and al, 0xEF out 0x21, al ret
lib/types/Join.agda
danbornside/HoTT-Agda
0
1431
<reponame>danbornside/HoTT-Agda<gh_stars>0 {-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Sigma open import lib.types.Span open import lib.types.Pointed open import lib.types.Pushout module lib.types.Join where module _ {i j} (A : Type i) (B : Type j) where *-span : Span *-span = span A B (A × B) fst snd _*_ : Type _ _*_ = Pushout *-span module _ {i j} (X : Ptd i) (Y : Ptd j) where *-⊙span : ⊙Span *-⊙span = ⊙span X Y (X ⊙× Y) ⊙fst ⊙snd _⊙*_ : Ptd _ _⊙*_ = ⊙Pushout *-⊙span
Assignment/mycommandline.adb
vivianjia123/Password-Manager
0
27344
with Ada.Command_Line; package body MyCommandLine is -- note we do not want SPARK to analyse this implementation since -- Ada.Command_Line is not able to be handled by the SPARK Prover function Command_Name return String is begin return Ada.Command_Line.Command_Name; end Command_Name; function Argument_Count return Natural is begin return Ada.Command_Line.Argument_Count; end Argument_Count; function Argument(Number : in Positive) return String is begin return Ada.Command_Line.Argument(Number); end Argument; end MyCommandLine;
test/cases/icc-static.asm
malcolmr/gcc-explorer
4
5887
<filename>test/cases/icc-static.asm LongLong: .long 0x0001e240,0x00000000 .type LongLong,@object .size LongLong,8 .align 4 .globl Int Int: .long 123 .type Int,@object .size Int,4 .align 2 .globl Short Short: .word 4660 .type Short,@object .size Short,2 .align 1 .globl Char Char: .byte -128 .type Char,@object .size Char,1 .data
Tests/NetNewsWireTests/ScriptingTests/scripts/selectAFeed.applescript
bubudrc/NetNewsWire
3,016
4648
<filename>Tests/NetNewsWireTests/ScriptingTests/scripts/selectAFeed.applescript<gh_stars>1000+ property uparrowKeyCode : 126 property downarrowKeyCode : 125 property rightarrowKeyCode : 124 property leftarrowKeyCode : 123 to activateNetNewsWire() tell application "NetNewsWire" activate end tell end activateNetNewsWire to multipleKeyCodes(keycode, numberOfKeys) tell application "System Events" tell process "NetNewsWire" repeat numberOfKeys times key code keycode end repeat end tell end tell end multipleKeyCodes try activateNetNewsWire() multipleKeyCodes(downarrowKeyCode, 9) multipleKeyCodes(uparrowKeyCode, 1) on error message return {test_result:false, script_result:message} end try return {test_result:true, script_result:"selected feed"}