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
subprojects/xcfa/cat/src/main/antlr/Cat.g4
s0mark/theta
11
7907
grammar Cat; mcm : 'MCM';
programs/oeis/126/A126964.asm
karttu/loda
0
91166
<filename>programs/oeis/126/A126964.asm ; A126964: a(n) = 2*n*(6*n-1). ; 0,10,44,102,184,290,420,574,752,954,1180,1430,1704,2002,2324,2670,3040,3434,3852,4294,4760,5250,5764,6302,6864,7450,8060,8694,9352,10034,10740,11470,12224,13002,13804,14630,15480,16354,17252,18174,19120,20090,21084 mov $1,$0 mul $0,12 sub $0,2 mul $1,$0
alloy4fun_models/trashltl/models/4/ZnvbN4SERi4H2dFdW.als
Kaixi26/org.alloytools.alloy
0
2479
open main pred idZnvbN4SERi4H2dFdW_prop5 { some File and some Trash and eventually no Trash } pred __repair { idZnvbN4SERi4H2dFdW_prop5 } check __repair { idZnvbN4SERi4H2dFdW_prop5 <=> prop5o }
oeis/072/A072547.asm
neoneye/loda-programs
11
88300
; A072547: Main diagonal of the array in which first column and row are filled alternatively with 1's or 0's and then T(i,j) = T(i-1,j) + T(i,j-1). ; 1,0,2,6,22,80,296,1106,4166,15792,60172,230252,884236,3406104,13154948,50922986,197519942,767502944,2987013068,11641557716,45429853652,177490745984,694175171648,2717578296116,10648297329692,41757352712480,163875286898936,643572802900536,2529089186105896,9944743356337352,39126285854491516,154018742917954074,606588522384687686,2390107885344493760,9421752577939908620,37155741881741180036,146585260289216376868,578516381884786526880,2283986851236424308944,9020203684634673176028 mov $3,2 mov $5,$0 lpb $3 mov $0,$5 sub $3,1 add $0,$3 trn $0,1 seq $0,120305 ; a(n) = Sum_{i=0..n} Sum_{j=0..n} (-1)^(i+j) * (i+j)!/(i!j!). mov $2,$3 mul $2,$0 add $4,$2 lpe min $5,1 mul $5,$0 mov $0,$4 sub $0,$5
src/app.adb
egilhh/Futures-in-Ada
1
1351
<reponame>egilhh/Futures-in-Ada<gh_stars>1-10 with Ada.Text_IO; with Futures; package body App is procedure Show_Search (Self : in out Object; Target : String ) is function Callable_String return String is begin -- delay 10.0; -- for triggering timeout... return Self.Searcher.Search(Target); end Callable_String; package Future_String is new Futures(String); Future : Future_String.Object := Future_String.Create(Callable_String'Access); begin Self.Executor.Execute(Future.Promise); Self.Display_Other_Things; Self.Display_Text(Future.Get); exception when Future_String.Execution_Exception => Ada.Text_IO.Put_Line("***Operation timed out"); Self.Clean_Up; end Show_Search; procedure Display_Other_Things (Self : in out Object) is begin Ada.Text_IO.Put_Line("Display_Other_Things"); end Display_Other_Things; procedure Display_Text (Self : in out Object; Text : in String) is begin Ada.Text_IO.Put_Line("Display_Text: " & Text); end Display_Text; procedure Clean_Up (Self : in out Object) is begin null; end Clean_Up; end App;
test/asset/agda-stdlib-1.0/Relation/Binary/Indexed/Homogeneous.agda
omega12345/agda-mode
0
9963
<filename>test/asset/agda-stdlib-1.0/Relation/Binary/Indexed/Homogeneous.agda ------------------------------------------------------------------------ -- The Agda standard library -- -- Homogeneously-indexed binary relations -- -- Indexed structures are laid out in a similar manner as to those -- in Relation.Binary. The main difference is each structure also -- contains proofs for the lifted version of the relation. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary.Indexed.Homogeneous where open import Function using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) open import Relation.Binary as B using (_⇒_) open import Relation.Binary.PropositionalEquality as P using (_≡_) open import Relation.Nullary using (¬_) open import Data.Product using (_,_) ------------------------------------------------------------------------ -- Publically export core definitions open import Relation.Binary.Indexed.Homogeneous.Core public ------------------------------------------------------------------------ -- Equivalences record IsIndexedEquivalence {i a ℓ} {I : Set i} (A : I → Set a) (_≈ᵢ_ : IRel A ℓ) : Set (i ⊔ a ⊔ ℓ) where field reflᵢ : Reflexive A _≈ᵢ_ symᵢ : Symmetric A _≈ᵢ_ transᵢ : Transitive A _≈ᵢ_ reflexiveᵢ : ∀ {i} → _≡_ ⟨ _⇒_ ⟩ _≈ᵢ_ {i} reflexiveᵢ P.refl = reflᵢ -- Lift properties reflexive : _≡_ ⇒ (Lift A _≈ᵢ_) reflexive P.refl i = reflᵢ refl : B.Reflexive (Lift A _≈ᵢ_) refl i = reflᵢ sym : B.Symmetric (Lift A _≈ᵢ_) sym x≈y i = symᵢ (x≈y i) trans : B.Transitive (Lift A _≈ᵢ_) trans x≈y y≈z i = transᵢ (x≈y i) (y≈z i) isEquivalence : B.IsEquivalence (Lift A _≈ᵢ_) isEquivalence = record { refl = refl ; sym = sym ; trans = trans } record IndexedSetoid {i} (I : Set i) c ℓ : Set (suc (i ⊔ c ⊔ ℓ)) where infix 4 _≈ᵢ_ _≈_ field Carrierᵢ : I → Set c _≈ᵢ_ : IRel Carrierᵢ ℓ isEquivalenceᵢ : IsIndexedEquivalence Carrierᵢ _≈ᵢ_ open IsIndexedEquivalence isEquivalenceᵢ public Carrier : Set _ Carrier = ∀ i → Carrierᵢ i _≈_ : B.Rel Carrier _ _≈_ = Lift Carrierᵢ _≈ᵢ_ _≉_ : B.Rel Carrier _ x ≉ y = ¬ (x ≈ y) setoid : B.Setoid _ _ setoid = record { isEquivalence = isEquivalence } ------------------------------------------------------------------------ -- Decidable equivalences record IsIndexedDecEquivalence {i a ℓ} {I : Set i} (A : I → Set a) (_≈ᵢ_ : IRel A ℓ) : Set (i ⊔ a ⊔ ℓ) where infix 4 _≟ᵢ_ field _≟ᵢ_ : Decidable A _≈ᵢ_ isEquivalenceᵢ : IsIndexedEquivalence A _≈ᵢ_ open IsIndexedEquivalence isEquivalenceᵢ public record IndexedDecSetoid {i} (I : Set i) c ℓ : Set (suc (i ⊔ c ⊔ ℓ)) where infix 4 _≈ᵢ_ field Carrierᵢ : I → Set c _≈ᵢ_ : IRel Carrierᵢ ℓ isDecEquivalenceᵢ : IsIndexedDecEquivalence Carrierᵢ _≈ᵢ_ open IsIndexedDecEquivalence isDecEquivalenceᵢ public indexedSetoid : IndexedSetoid I c ℓ indexedSetoid = record { isEquivalenceᵢ = isEquivalenceᵢ } open IndexedSetoid indexedSetoid public using (Carrier; _≈_; _≉_; setoid) ------------------------------------------------------------------------ -- Preorders record IsIndexedPreorder {i a ℓ₁ ℓ₂} {I : Set i} (A : I → Set a) (_≈ᵢ_ : IRel A ℓ₁) (_∼ᵢ_ : IRel A ℓ₂) : Set (i ⊔ a ⊔ ℓ₁ ⊔ ℓ₂) where field isEquivalenceᵢ : IsIndexedEquivalence A _≈ᵢ_ reflexiveᵢ : _≈ᵢ_ ⇒[ A ] _∼ᵢ_ transᵢ : Transitive A _∼ᵢ_ module Eq = IsIndexedEquivalence isEquivalenceᵢ reflᵢ : Reflexive A _∼ᵢ_ reflᵢ = reflexiveᵢ Eq.reflᵢ ∼ᵢ-respˡ-≈ᵢ : Respectsˡ A _∼ᵢ_ _≈ᵢ_ ∼ᵢ-respˡ-≈ᵢ x≈y x∼z = transᵢ (reflexiveᵢ (Eq.symᵢ x≈y)) x∼z ∼ᵢ-respʳ-≈ᵢ : Respectsʳ A _∼ᵢ_ _≈ᵢ_ ∼ᵢ-respʳ-≈ᵢ x≈y z∼x = transᵢ z∼x (reflexiveᵢ x≈y) ∼ᵢ-resp-≈ᵢ : Respects₂ A _∼ᵢ_ _≈ᵢ_ ∼ᵢ-resp-≈ᵢ = ∼ᵢ-respʳ-≈ᵢ , ∼ᵢ-respˡ-≈ᵢ -- Lifted properties reflexive : Lift A _≈ᵢ_ B.⇒ Lift A _∼ᵢ_ reflexive x≈y i = reflexiveᵢ (x≈y i) refl : B.Reflexive (Lift A _∼ᵢ_) refl i = reflᵢ trans : B.Transitive (Lift A _∼ᵢ_) trans x≈y y≈z i = transᵢ (x≈y i) (y≈z i) ∼-respˡ-≈ : (Lift A _∼ᵢ_) B.Respectsˡ (Lift A _≈ᵢ_) ∼-respˡ-≈ x≈y x∼z i = ∼ᵢ-respˡ-≈ᵢ (x≈y i) (x∼z i) ∼-respʳ-≈ : (Lift A _∼ᵢ_) B.Respectsʳ (Lift A _≈ᵢ_) ∼-respʳ-≈ x≈y z∼x i = ∼ᵢ-respʳ-≈ᵢ (x≈y i) (z∼x i) ∼-resp-≈ : (Lift A _∼ᵢ_) B.Respects₂ (Lift A _≈ᵢ_) ∼-resp-≈ = ∼-respʳ-≈ , ∼-respˡ-≈ isPreorder : B.IsPreorder (Lift A _≈ᵢ_) (Lift A _∼ᵢ_) isPreorder = record { isEquivalence = Eq.isEquivalence ; reflexive = reflexive ; trans = trans } record IndexedPreorder {i} (I : Set i) c ℓ₁ ℓ₂ : Set (suc (i ⊔ c ⊔ ℓ₁ ⊔ ℓ₂)) where infix 4 _≈ᵢ_ _∼ᵢ_ _≈_ _∼_ field Carrierᵢ : I → Set c _≈ᵢ_ : IRel Carrierᵢ ℓ₁ _∼ᵢ_ : IRel Carrierᵢ ℓ₂ isPreorderᵢ : IsIndexedPreorder Carrierᵢ _≈ᵢ_ _∼ᵢ_ open IsIndexedPreorder isPreorderᵢ public Carrier : Set _ Carrier = ∀ i → Carrierᵢ i _≈_ : B.Rel Carrier _ x ≈ y = ∀ i → x i ≈ᵢ y i _∼_ : B.Rel Carrier _ x ∼ y = ∀ i → x i ∼ᵢ y i preorder : B.Preorder _ _ _ preorder = record { isPreorder = isPreorder } ------------------------------------------------------------------------ -- Partial orders record IsIndexedPartialOrder {i a ℓ₁ ℓ₂} {I : Set i} (A : I → Set a) (_≈ᵢ_ : IRel A ℓ₁) (_≤ᵢ_ : IRel A ℓ₂) : Set (i ⊔ a ⊔ ℓ₁ ⊔ ℓ₂) where field isPreorderᵢ : IsIndexedPreorder A _≈ᵢ_ _≤ᵢ_ antisymᵢ : Antisymmetric A _≈ᵢ_ _≤ᵢ_ open IsIndexedPreorder isPreorderᵢ public renaming ( ∼ᵢ-respˡ-≈ᵢ to ≤ᵢ-respˡ-≈ᵢ ; ∼ᵢ-respʳ-≈ᵢ to ≤ᵢ-respʳ-≈ᵢ ; ∼ᵢ-resp-≈ᵢ to ≤ᵢ-resp-≈ᵢ ; ∼-respˡ-≈ to ≤-respˡ-≈ ; ∼-respʳ-≈ to ≤-respʳ-≈ ; ∼-resp-≈ to ≤-resp-≈ ) antisym : B.Antisymmetric (Lift A _≈ᵢ_) (Lift A _≤ᵢ_) antisym x≤y y≤x i = antisymᵢ (x≤y i) (y≤x i) isPartialOrder : B.IsPartialOrder (Lift A _≈ᵢ_) (Lift A _≤ᵢ_) isPartialOrder = record { isPreorder = isPreorder ; antisym = antisym } record IndexedPoset {i} (I : Set i) c ℓ₁ ℓ₂ : Set (suc (i ⊔ c ⊔ ℓ₁ ⊔ ℓ₂)) where field Carrierᵢ : I → Set c _≈ᵢ_ : IRel Carrierᵢ ℓ₁ _≤ᵢ_ : IRel Carrierᵢ ℓ₂ isPartialOrderᵢ : IsIndexedPartialOrder Carrierᵢ _≈ᵢ_ _≤ᵢ_ open IsIndexedPartialOrder isPartialOrderᵢ public preorderᵢ : IndexedPreorder I c ℓ₁ ℓ₂ preorderᵢ = record { isPreorderᵢ = isPreorderᵢ } open IndexedPreorder preorderᵢ public using (Carrier; _≈_; preorder) renaming (_∼_ to _≤_) poset : B.Poset _ _ _ poset = record { isPartialOrder = isPartialOrder } ------------------------------------------------------------------------ -- DEPRECATED NAMES ------------------------------------------------------------------------ -- Please use the new names as continuing support for the old names is -- not guaranteed. -- Version 0.17 REL = IREL {-# WARNING_ON_USAGE REL "Warning: REL was deprecated in v0.17. Please use IREL instead." #-} Rel = IRel {-# WARNING_ON_USAGE Rel "Warning: Rel was deprecated in v0.17. Please use IRel instead." #-}
3-mid/impact/source/3d/dynamics/impact-d3-motion_state-default.ads
charlie5/lace
20
20970
with impact.d3.Transform; package impact.d3.motion_State.default -- -- The impact.d3.motion_State.default provides a common implementation to synchronize world transforms with offsets. -- is type Item is new impact.d3.motion_State.Item with record m_graphicsWorldTrans, m_centerOfMassOffset, m_startWorldTrans : Transform_3d; m_userPointer : access Any'Class; end record; type View is access all Item'Class; function to_motion_State (startTrans, centerOfMassOffset : Transform_3d := impact.d3.Transform.getIdentity) return Item; overriding procedure getWorldTransform (Self : in Item; worldTrans : out Transform_3d); -- -- Synchronizes world transform from user to physics. overriding procedure setWorldTransform (Self : in out Item; worldTrans : in Transform_3d); -- -- Synchronizes world transform from physics to user. -- Bullet only calls the update of worldtransform for active objects. end impact.d3.motion_State.default;
oeis/052/A052561.asm
neoneye/loda-programs
11
13209
; A052561: a(n) = (1 + 2^n) * n!. ; Submitted by <NAME> ; 2,3,10,54,408,3960,46800,650160,10362240,186157440,3719520000,81789523200,1962469555200,51017981414400,1428416301312000,42851181364992000,1371216880889856000,46621018262827008000,1678350255088066560000,63777188048246120448000,2551085089027836641280000,107145522648226967224320000,4714401872521258780262400000,216862460283961165007093760000,10409397473181734187101061120000,520469858147876666024067072000000,27064432220398125506645852160000000,1461479329012629326940523855872000000 mov $1,2 pow $1,$0 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). mul $1,$0 add $0,$1
test/asset/agda-stdlib-1.0/Data/Product/Relation/Binary/Lex/Strict.agda
omega12345/agda-mode
0
12109
------------------------------------------------------------------------ -- The Agda standard library -- -- Lexicographic products of binary relations ------------------------------------------------------------------------ -- The definition of lexicographic product used here is suitable if -- the left-hand relation is a strict partial order. {-# OPTIONS --without-K --safe #-} module Data.Product.Relation.Binary.Lex.Strict where open import Data.Product open import Data.Product.Relation.Binary.Pointwise.NonDependent as Pointwise using (Pointwise) open import Data.Sum using (inj₁; inj₂; _-⊎-_; [_,_]) open import Data.Empty open import Function open import Level open import Relation.Nullary open import Relation.Nullary.Product open import Relation.Nullary.Sum open import Relation.Binary open import Relation.Binary.Consequences module _ {a₁ a₂ ℓ₁ ℓ₂} {A₁ : Set a₁} {A₂ : Set a₂} where ------------------------------------------------------------------------ -- A lexicographic ordering over products ×-Lex : (_≈₁_ _<₁_ : Rel A₁ ℓ₁) → (_≤₂_ : Rel A₂ ℓ₂) → Rel (A₁ × A₂) _ ×-Lex _≈₁_ _<₁_ _≤₂_ = (_<₁_ on proj₁) -⊎- (_≈₁_ on proj₁) -×- (_≤₂_ on proj₂) ------------------------------------------------------------------------ -- Some properties which are preserved by ×-Lex (under certain -- assumptions). ×-reflexive : ∀ _≈₁_ _∼₁_ {_≈₂_ : Rel A₂ ℓ₂} _≤₂_ → _≈₂_ ⇒ _≤₂_ → (Pointwise _≈₁_ _≈₂_) ⇒ (×-Lex _≈₁_ _∼₁_ _≤₂_) ×-reflexive _ _ _ refl₂ = λ x≈y → inj₂ (proj₁ x≈y , refl₂ (proj₂ x≈y)) ×-irreflexive : ∀ {_≈₁_ _<₁_} → Irreflexive _≈₁_ _<₁_ → ∀ {_≈₂_ _<₂_ : Rel A₂ ℓ₂} → Irreflexive _≈₂_ _<₂_ → Irreflexive (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _<₁_ _<₂_) ×-irreflexive ir₁ ir₂ x≈y (inj₁ x₁<y₁) = ir₁ (proj₁ x≈y) x₁<y₁ ×-irreflexive ir₁ ir₂ x≈y (inj₂ x≈<y) = ir₂ (proj₂ x≈y) (proj₂ x≈<y) ×-transitive : ∀ {_≈₁_ _<₁_} → IsEquivalence _≈₁_ → _<₁_ Respects₂ _≈₁_ → Transitive _<₁_ → ∀ {_≤₂_} → Transitive _≤₂_ → Transitive (×-Lex _≈₁_ _<₁_ _≤₂_) ×-transitive {_≈₁_} {_<₁_} eq₁ resp₁ trans₁ {_≤₂_} trans₂ = trans where module Eq₁ = IsEquivalence eq₁ trans : Transitive (×-Lex _≈₁_ _<₁_ _≤₂_) trans (inj₁ x₁<y₁) (inj₁ y₁<z₁) = inj₁ (trans₁ x₁<y₁ y₁<z₁) trans (inj₁ x₁<y₁) (inj₂ y≈≤z) = inj₁ (proj₁ resp₁ (proj₁ y≈≤z) x₁<y₁) trans (inj₂ x≈≤y) (inj₁ y₁<z₁) = inj₁ (proj₂ resp₁ (Eq₁.sym $ proj₁ x≈≤y) y₁<z₁) trans (inj₂ x≈≤y) (inj₂ y≈≤z) = inj₂ ( Eq₁.trans (proj₁ x≈≤y) (proj₁ y≈≤z) , trans₂ (proj₂ x≈≤y) (proj₂ y≈≤z) ) ×-antisymmetric : ∀ {_≈₁_ _<₁_} → Symmetric _≈₁_ → Irreflexive _≈₁_ _<₁_ → Asymmetric _<₁_ → ∀ {_≈₂_ _≤₂_ : Rel A₂ ℓ₂} → Antisymmetric _≈₂_ _≤₂_ → Antisymmetric (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _<₁_ _≤₂_) ×-antisymmetric {_≈₁_} {_<₁_} sym₁ irrefl₁ asym₁ {_≈₂_} {_≤₂_} antisym₂ = antisym where antisym : Antisymmetric (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _<₁_ _≤₂_) antisym (inj₁ x₁<y₁) (inj₁ y₁<x₁) = ⊥-elim $ asym₁ x₁<y₁ y₁<x₁ antisym (inj₁ x₁<y₁) (inj₂ y≈≤x) = ⊥-elim $ irrefl₁ (sym₁ $ proj₁ y≈≤x) x₁<y₁ antisym (inj₂ x≈≤y) (inj₁ y₁<x₁) = ⊥-elim $ irrefl₁ (sym₁ $ proj₁ x≈≤y) y₁<x₁ antisym (inj₂ x≈≤y) (inj₂ y≈≤x) = proj₁ x≈≤y , antisym₂ (proj₂ x≈≤y) (proj₂ y≈≤x) ×-asymmetric : ∀ {_≈₁_ _<₁_} → Symmetric _≈₁_ → _<₁_ Respects₂ _≈₁_ → Asymmetric _<₁_ → ∀ {_<₂_} → Asymmetric _<₂_ → Asymmetric (×-Lex _≈₁_ _<₁_ _<₂_) ×-asymmetric {_≈₁_} {_<₁_} sym₁ resp₁ asym₁ {_<₂_} asym₂ = asym where irrefl₁ : Irreflexive _≈₁_ _<₁_ irrefl₁ = asym⟶irr resp₁ sym₁ asym₁ asym : Asymmetric (×-Lex _≈₁_ _<₁_ _<₂_) asym (inj₁ x₁<y₁) (inj₁ y₁<x₁) = asym₁ x₁<y₁ y₁<x₁ asym (inj₁ x₁<y₁) (inj₂ y≈<x) = irrefl₁ (sym₁ $ proj₁ y≈<x) x₁<y₁ asym (inj₂ x≈<y) (inj₁ y₁<x₁) = irrefl₁ (sym₁ $ proj₁ x≈<y) y₁<x₁ asym (inj₂ x≈<y) (inj₂ y≈<x) = asym₂ (proj₂ x≈<y) (proj₂ y≈<x) ×-respects₂ : ∀ {_≈₁_ _<₁_} → IsEquivalence _≈₁_ → _<₁_ Respects₂ _≈₁_ → {_≈₂_ _<₂_ : Rel A₂ ℓ₂} → _<₂_ Respects₂ _≈₂_ → (×-Lex _≈₁_ _<₁_ _<₂_) Respects₂ (Pointwise _≈₁_ _≈₂_) ×-respects₂ {_≈₁_} {_<₁_} eq₁ resp₁ {_≈₂_} {_<₂_} resp₂ = resp¹ , resp² where _<_ = ×-Lex _≈₁_ _<₁_ _<₂_ open IsEquivalence eq₁ renaming (sym to sym₁; trans to trans₁) resp¹ : ∀ {x} → (x <_) Respects (Pointwise _≈₁_ _≈₂_) resp¹ y≈y' (inj₁ x₁<y₁) = inj₁ (proj₁ resp₁ (proj₁ y≈y') x₁<y₁) resp¹ y≈y' (inj₂ x≈<y) = inj₂ ( trans₁ (proj₁ x≈<y) (proj₁ y≈y') , proj₁ resp₂ (proj₂ y≈y') (proj₂ x≈<y) ) resp² : ∀ {y} → (flip _<_ y) Respects (Pointwise _≈₁_ _≈₂_) resp² x≈x' (inj₁ x₁<y₁) = inj₁ (proj₂ resp₁ (proj₁ x≈x') x₁<y₁) resp² x≈x' (inj₂ x≈<y) = inj₂ ( trans₁ (sym₁ $ proj₁ x≈x') (proj₁ x≈<y) , proj₂ resp₂ (proj₂ x≈x') (proj₂ x≈<y) ) ×-decidable : ∀ {_≈₁_ _<₁_} → Decidable _≈₁_ → Decidable _<₁_ → ∀ {_≤₂_} → Decidable _≤₂_ → Decidable (×-Lex _≈₁_ _<₁_ _≤₂_) ×-decidable dec-≈₁ dec-<₁ dec-≤₂ x y = dec-<₁ (proj₁ x) (proj₁ y) ⊎-dec (dec-≈₁ (proj₁ x) (proj₁ y) ×-dec dec-≤₂ (proj₂ x) (proj₂ y)) ×-total₁ : ∀ {_≈₁_ _<₁_} → Total _<₁_ → ∀ {_≤₂_} → Total (×-Lex _≈₁_ _<₁_ _≤₂_) ×-total₁ total₁ x y with total₁ (proj₁ x) (proj₁ y) ... | inj₁ x₁<y₁ = inj₁ (inj₁ x₁<y₁) ... | inj₂ x₁>y₁ = inj₂ (inj₁ x₁>y₁) ×-total₂ : ∀ {_≈₁_ _<₁_} → Symmetric _≈₁_ → Trichotomous _≈₁_ _<₁_ → ∀ {_≤₂_} → Total _≤₂_ → Total (×-Lex _≈₁_ _<₁_ _≤₂_) ×-total₂ sym tri₁ total₂ x y with tri₁ (proj₁ x) (proj₁ y) ... | tri< x₁<y₁ _ _ = inj₁ (inj₁ x₁<y₁) ... | tri> _ _ y₁<x₁ = inj₂ (inj₁ y₁<x₁) ... | tri≈ _ x₁≈y₁ _ with total₂ (proj₂ x) (proj₂ y) ... | inj₁ x₂≤y₂ = inj₁ (inj₂ (x₁≈y₁ , x₂≤y₂)) ... | inj₂ y₂≤x₂ = inj₂ (inj₂ (sym x₁≈y₁ , y₂≤x₂)) ×-compare : {_≈₁_ _<₁_ : Rel A₁ ℓ₁} → Symmetric _≈₁_ → Trichotomous _≈₁_ _<₁_ → {_≈₂_ _<₂_ : Rel A₂ ℓ₂} → Trichotomous _≈₂_ _<₂_ → Trichotomous (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _<₁_ _<₂_) ×-compare sym₁ cmp₁ cmp₂ (x₁ , x₂) (y₁ , y₂) with cmp₁ x₁ y₁ ... | (tri< x₁<y₁ x₁≉y₁ x₁≯y₁) = tri< (inj₁ x₁<y₁) (x₁≉y₁ ∘ proj₁) [ x₁≯y₁ , x₁≉y₁ ∘ sym₁ ∘ proj₁ ] ... | (tri> x₁≮y₁ x₁≉y₁ x₁>y₁) = tri> [ x₁≮y₁ , x₁≉y₁ ∘ proj₁ ] (x₁≉y₁ ∘ proj₁) (inj₁ x₁>y₁) ... | (tri≈ x₁≮y₁ x₁≈y₁ x₁≯y₁) with cmp₂ x₂ y₂ ... | (tri< x₂<y₂ x₂≉y₂ x₂≯y₂) = tri< (inj₂ (x₁≈y₁ , x₂<y₂)) (x₂≉y₂ ∘ proj₂) [ x₁≯y₁ , x₂≯y₂ ∘ proj₂ ] ... | (tri> x₂≮y₂ x₂≉y₂ x₂>y₂) = tri> [ x₁≮y₁ , x₂≮y₂ ∘ proj₂ ] (x₂≉y₂ ∘ proj₂) (inj₂ (sym₁ x₁≈y₁ , x₂>y₂)) ... | (tri≈ x₂≮y₂ x₂≈y₂ x₂≯y₂) = tri≈ [ x₁≮y₁ , x₂≮y₂ ∘ proj₂ ] (x₁≈y₁ , x₂≈y₂) [ x₁≯y₁ , x₂≯y₂ ∘ proj₂ ] ------------------------------------------------------------------------ -- Collections of properties which are preserved by ×-Lex. ×-isPreorder : ∀ {_≈₁_ _∼₁_} → IsPreorder _≈₁_ _∼₁_ → ∀ {_≈₂_ _∼₂_} → IsPreorder _≈₂_ _∼₂_ → IsPreorder (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _∼₁_ _∼₂_) ×-isPreorder {_≈₁_} {_∼₁_} pre₁ {_∼₂_ = _∼₂_} pre₂ = record { isEquivalence = Pointwise.×-isEquivalence (isEquivalence pre₁) (isEquivalence pre₂) ; reflexive = ×-reflexive _≈₁_ _∼₁_ _∼₂_ (reflexive pre₂) ; trans = ×-transitive (isEquivalence pre₁) (∼-resp-≈ pre₁) (trans pre₁) {_≤₂_ = _∼₂_} (trans pre₂) } where open IsPreorder ×-isStrictPartialOrder : ∀ {_≈₁_ _<₁_} → IsStrictPartialOrder _≈₁_ _<₁_ → ∀ {_≈₂_ _<₂_} → IsStrictPartialOrder _≈₂_ _<₂_ → IsStrictPartialOrder (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _<₁_ _<₂_) ×-isStrictPartialOrder {_<₁_ = _<₁_} spo₁ {_<₂_ = _<₂_} spo₂ = record { isEquivalence = Pointwise.×-isEquivalence (isEquivalence spo₁) (isEquivalence spo₂) ; irrefl = ×-irreflexive {_<₁_ = _<₁_} (irrefl spo₁) {_<₂_ = _<₂_} (irrefl spo₂) ; trans = ×-transitive {_<₁_ = _<₁_} (isEquivalence spo₁) (<-resp-≈ spo₁) (trans spo₁) {_≤₂_ = _<₂_} (trans spo₂) ; <-resp-≈ = ×-respects₂ (isEquivalence spo₁) (<-resp-≈ spo₁) (<-resp-≈ spo₂) } where open IsStrictPartialOrder ×-isStrictTotalOrder : ∀ {_≈₁_ _<₁_} → IsStrictTotalOrder _≈₁_ _<₁_ → ∀ {_≈₂_ _<₂_} → IsStrictTotalOrder _≈₂_ _<₂_ → IsStrictTotalOrder (Pointwise _≈₁_ _≈₂_) (×-Lex _≈₁_ _<₁_ _<₂_) ×-isStrictTotalOrder {_<₁_ = _<₁_} spo₁ {_<₂_ = _<₂_} spo₂ = record { isEquivalence = Pointwise.×-isEquivalence (isEquivalence spo₁) (isEquivalence spo₂) ; trans = ×-transitive {_<₁_ = _<₁_} (isEquivalence spo₁) (<-resp-≈ spo₁) (trans spo₁) {_≤₂_ = _<₂_} (trans spo₂) ; compare = ×-compare (Eq.sym spo₁) (compare spo₁) (compare spo₂) } where open IsStrictTotalOrder ------------------------------------------------------------------------ -- "Packages" can also be combined. module _ {ℓ₁ ℓ₂ ℓ₃ ℓ₄} where ×-preorder : Preorder ℓ₁ ℓ₂ _ → Preorder ℓ₃ ℓ₄ _ → Preorder _ _ _ ×-preorder p₁ p₂ = record { isPreorder = ×-isPreorder (isPreorder p₁) (isPreorder p₂) } where open Preorder ×-strictPartialOrder : StrictPartialOrder ℓ₁ ℓ₂ _ → StrictPartialOrder ℓ₃ ℓ₄ _ → StrictPartialOrder _ _ _ ×-strictPartialOrder s₁ s₂ = record { isStrictPartialOrder = ×-isStrictPartialOrder (isStrictPartialOrder s₁) (isStrictPartialOrder s₂) } where open StrictPartialOrder ×-strictTotalOrder : StrictTotalOrder ℓ₁ ℓ₂ _ → StrictTotalOrder ℓ₃ ℓ₄ _ → StrictTotalOrder _ _ _ ×-strictTotalOrder s₁ s₂ = record { isStrictTotalOrder = ×-isStrictTotalOrder (isStrictTotalOrder s₁) (isStrictTotalOrder s₂) } where open StrictTotalOrder ------------------------------------------------------------------------ -- DEPRECATED NAMES ------------------------------------------------------------------------ -- Please use the new names as continuing support for the old names is -- not guaranteed. -- Version 0.15 _×-irreflexive_ = ×-irreflexive {-# WARNING_ON_USAGE _×-irreflexive_ "Warning: _×-irreflexive_ was deprecated in v0.15. Please use ×-irreflexive instead." #-} _×-isPreorder_ = ×-isPreorder {-# WARNING_ON_USAGE _×-isPreorder_ "Warning: _×-isPreorder_ was deprecated in v0.15. Please use ×-isPreorder instead." #-} _×-isStrictPartialOrder_ = ×-isStrictPartialOrder {-# WARNING_ON_USAGE _×-isStrictPartialOrder_ "Warning: _×-isStrictPartialOrder_ was deprecated in v0.15. Please use ×-isStrictPartialOrder instead." #-} _×-isStrictTotalOrder_ = ×-isStrictTotalOrder {-# WARNING_ON_USAGE _×-isStrictTotalOrder_ "Warning: _×-isStrictTotalOrder_ was deprecated in v0.15. Please use ×-isStrictTotalOrder instead." #-} _×-preorder_ = ×-preorder {-# WARNING_ON_USAGE _×-preorder_ "Warning: _×-preorder_ was deprecated in v0.15. Please use ×-preorder instead." #-} _×-strictPartialOrder_ = ×-strictPartialOrder {-# WARNING_ON_USAGE _×-strictPartialOrder_ "Warning: _×-strictPartialOrder_ was deprecated in v0.15. Please use ×-strictPartialOrder instead." #-} _×-strictTotalOrder_ = ×-strictTotalOrder {-# WARNING_ON_USAGE _×-strictTotalOrder_ "Warning: _×-strictTotalOrder_ was deprecated in v0.15. Please use ×-strictTotalOrder instead." #-} ×-≈-respects₂ = ×-respects₂ {-# WARNING_ON_USAGE ×-≈-respects₂ "Warning: ×-≈-respects₂ was deprecated in v0.15. Please use ×-respects₂ instead." #-}
architecture/design/logisim/test/interrupt_instructions.asm
sabertazimi/hust-lab
29
169572
<reponame>sabertazimi/hust-lab<gh_stars>10-100 # spec for mtc0 addi $s0, $zero, 233 mtc0 $s0, $12 addi $s0, $zero, 234 mtc0 $s0, $13 addi $s0, $zero, 235 mtc0 $s0, $14 # spec for mfc0 addi $s0, $zero, 0 mfc0 $s0, $12 mfc0 $s0, $13 mfc0 $s0, $14
src/firmware-tests/Platform/PowerManagementDummies.asm
pete-restall/Cluck2Sesame-Prototype
1
95639
<reponame>pete-restall/Cluck2Sesame-Prototype #include "Platform.inc" #include "TestDoubles.inc" radix decimal udata global powerManagementFlags global fastClockCount powerManagementFlags res 1 fastClockCount res 1 PowerManagementDummies code end
LibraBFT/Yasm/Yasm.agda
cwjnkins/bft-consensus-agda
0
2651
<gh_stars>0 {- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Base.PKCS open import LibraBFT.Base.Types import LibraBFT.Yasm.Base as LYB import LibraBFT.Yasm.System as LYS -- This module provides a single import for all Yasm modules module LibraBFT.Yasm.Yasm (ℓ-PeerState : Level) (ℓ-VSFP : Level) (parms : LYB.SystemParameters ℓ-PeerState) (ValidSenderForPK : LYS.ValidSenderForPK-type ℓ-PeerState ℓ-VSFP parms) (ValidSenderForPK-stable : LYS.ValidSenderForPK-stable-type ℓ-PeerState ℓ-VSFP parms ValidSenderForPK) where open LYB.SystemParameters parms open import LibraBFT.Yasm.Base public open import LibraBFT.Yasm.System ℓ-PeerState ℓ-VSFP parms public open import LibraBFT.Yasm.Properties ℓ-PeerState ℓ-VSFP parms ValidSenderForPK ValidSenderForPK-stable public open import Util.FunctionOverride PeerId _≟PeerId_ public
04/fill/Fill.asm
weezybusy/Nand2Tetris-solutions
0
85144
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by <NAME> Schocken, MIT Press. // File name: projects/04/Fill.asm // Runs an infinite loop that listens to the keyboard input. // When a key is pressed (any key), the program blackens the screen, // i.e. writes "black" in every pixel. When no key is pressed, the // program clears the screen, i.e. writes "white" in every pixel. (RESET) @SCREEN // read screen starting point address D=A @register // set register to the starting point of the screen M=D (CHECK_KBD) @KBD // listen to keyboard for input D=M @WHITEN // if (no input) goto WHITEN, else goto BLACKEN D;JEQ (BLACKEN) @color // set color to black M=-1 @SET // goto SET and apply the color 0;JMP (WHITEN) @color // set color to white M=0 @SET // goto SET and apply the color 0;JMP (SET) @color // read color D=M @register // paint the current register A=M M=D @register // increment register MD=M+1 @KBD // check if we're not out of the screen memory D=A-D @SET // if (not out of memory) paint next register D;JGT @RESET // else goto RESET and set screen to starting point 0;JMP
parsers-generic_source-keywords.adb
jrcarter/Ada_GUI
19
30690
-- -- -- procedure Copyright (c) <NAME> -- -- Parsers.Generic_Source.Keywords Luebeck -- -- Interface Summer, 2005 -- -- -- -- Last revision : 11:37 13 Oct 2007 -- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public License as -- -- published by the Free Software Foundation; either version 2 of -- -- the License, or (at your option) any later version. This library -- -- is distributed in the hope that it will be useful, but WITHOUT -- -- ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have -- -- received a copy of the GNU General Public License along with -- -- this library; if not, write to the Free Software Foundation, -- -- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from -- -- this unit, or you link this unit with other files to produce an -- -- executable, this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- --____________________________________________________________________-- with Ada.Characters.Handling; use Ada.Characters.Handling; with Parsers.Generic_Source.Get_Token; package body Parsers.Generic_Source.Keywords is use Keyword_Tables; Folder : Dictionary; procedure Check_Spelling (Name : String) is Symbol : Character; begin if Name'Length = 0 or else not Is_Letter (Name (Name'First)) then raise Constraint_Error; end if; for Index in Name'First + 1 .. Name'Last loop Symbol := Name (Index); if not (Is_Alphanumeric (Symbol) or else Symbol = '_') then raise Constraint_Error; end if; end loop; end Check_Spelling; function Check_Matched (Source : String; Pointer : Integer) return Boolean is begin return not ( Is_Alphanumeric (Source (Pointer)) or else Source (Pointer) = '_' ); end Check_Matched; procedure Get_Keyword is new Parsers.Generic_Source.Get_Token (Keyword_Raw_Tables); procedure Get ( Code : in out Source_Type; Token : out Keyword; Got_It : out Boolean ) is begin Get_Keyword (Code, Folder, Token, Got_It); end Get; begin for Item in Keyword'Range loop Add (Folder, Keyword'Image (Item), Item); end loop; end Parsers.Generic_Source.Keywords;
ADL/drivers/stm32h743/stm32-opamp.adb
JCGobbi/Nucleo-STM32H743ZI
0
19160
with Ada.Real_Time; package body STM32.OPAMP is ------------ -- Enable -- ------------ procedure Enable (This : in out Operational_Amplifier) is use Ada.Real_Time; begin This.CSR.OPAEN := True; -- Delay 4 us for OPAMP startup time. See DS12110 Rev 8 chapter 7.3.27 -- Operational amplifier characteristics. delay until Clock + Microseconds (4); end Enable; ------------- -- Disable -- ------------- procedure Disable (This : in out Operational_Amplifier) is begin This.CSR.OPAEN := False; end Disable; ------------- -- Enabled -- ------------- function Enabled (This : Operational_Amplifier) return Boolean is begin return This.CSR.OPAEN; end Enabled; ----------------------- -- Set_NI_Input_Mode -- ----------------------- procedure Set_NI_Input_Mode (This : in out Operational_Amplifier; Input : NI_Input_Mode) is begin This.CSR.FORCE_VP := Input = Calibration_Mode; end Set_NI_Input_Mode; ----------------------- -- Get_NI_Input_Mode -- ----------------------- function Get_NI_Input_Mode (This : Operational_Amplifier) return NI_Input_Mode is begin return NI_Input_Mode'Val (Boolean'Pos (This.CSR.FORCE_VP)); end Get_NI_Input_Mode; ----------------------- -- Set_NI_Input_Port -- ----------------------- procedure Set_NI_Input_Port (This : in out Operational_Amplifier; Input : NI_Input_Port) is begin This.CSR.VP_SEL := Input'Enum_Rep; end Set_NI_Input_Port; ----------------------- -- Get_NI_Input_Port -- ----------------------- function Get_NI_Input_Port (This : Operational_Amplifier) return NI_Input_Port is begin return NI_Input_Port'Val (This.CSR.VP_SEL); end Get_NI_Input_Port; ---------------------- -- Set_I_Input_Port -- ---------------------- procedure Set_I_Input_Port (This : in out Operational_Amplifier; Input : I_Input_Port) is begin This.CSR.VM_SEL := Input'Enum_Rep; end Set_I_Input_Port; ---------------------- -- Get_I_Input_Port -- ---------------------- function Get_I_Input_Port (This : Operational_Amplifier) return I_Input_Port is begin return I_Input_Port'Val (This.CSR.VM_SEL); end Get_I_Input_Port; ----------------------- -- Set_PGA_Mode_Gain -- ----------------------- procedure Set_PGA_Mode_Gain (This : in out Operational_Amplifier; Input : PGA_Mode_Gain) is begin This.CSR.PGA_GAIN := Input'Enum_Rep; end Set_PGA_Mode_Gain; ----------------------- -- Get_PGA_Mode_Gain -- ----------------------- function Get_PGA_Mode_Gain (This : Operational_Amplifier) return PGA_Mode_Gain is begin return PGA_Mode_Gain'Val (This.CSR.PGA_GAIN); end Get_PGA_Mode_Gain; -------------------- -- Set_Speed_Mode -- -------------------- procedure Set_Speed_Mode (This : in out Operational_Amplifier; Input : Speed_Mode) is begin This.CSR.OPAHSM := Input = HighSpeed_Mode; end Set_Speed_Mode; --------------------- -- Get_Speed_Mode -- --------------------- function Get_Speed_Mode (This : Operational_Amplifier) return Speed_Mode is begin return Speed_Mode'Val (Boolean'Pos (This.CSR.OPAHSM)); end Get_Speed_Mode; --------------------- -- Configure_Opamp -- --------------------- procedure Configure_Opamp (This : in out Operational_Amplifier; Param : Init_Parameters) is begin This.CSR := (VM_SEL => Param.Input_Minus'Enum_Rep, VP_SEL => Param.Input_Plus'Enum_Rep, PGA_GAIN => Param.PGA_Mode'Enum_Rep, OPAHSM => Boolean'Val (Param.Power_Mode'Enum_Rep), others => <>); end Configure_Opamp; ----------------------- -- Set_User_Trimming -- ----------------------- procedure Set_User_Trimming (This : in out Operational_Amplifier; Enabled : Boolean) is begin This.CSR.USERTRIM := Enabled; end Set_User_Trimming; ------------------------ -- Get_User_Trimming -- ------------------------ function Get_User_Trimming (This : Operational_Amplifier) return Boolean is begin return This.CSR.USERTRIM; end Get_User_Trimming; ------------------------- -- Set_Offset_Trimming -- ------------------------- procedure Set_Offset_Trimming (This : in out Operational_Amplifier; Pair : Differential_Pair; Input : UInt5) is begin if This.CSR.OPAHSM then case Pair is when NMOS => This.HSOTR.TRIMHSOFFSETN := Input; when PMOS => This.HSOTR.TRIMHSOFFSETP := Input; end case; else case Pair is when NMOS => This.OTR.TRIMOFFSETN := Input; when PMOS => This.OTR.TRIMOFFSETP := Input; end case; end if; end Set_Offset_Trimming; -------------------------- -- Get_Offset_Trimming -- -------------------------- function Get_Offset_Trimming (This : Operational_Amplifier; Pair : Differential_Pair) return UInt5 is begin if This.CSR.OPAHSM then case Pair is when NMOS => return This.HSOTR.TRIMHSOFFSETN; when PMOS => return This.HSOTR.TRIMHSOFFSETP; end case; else case Pair is when NMOS => return This.OTR.TRIMOFFSETN; when PMOS => return This.OTR.TRIMOFFSETP; end case; end if; end Get_Offset_Trimming; -------------------------- -- Set_Calibration_Mode -- -------------------------- procedure Set_Calibration_Mode (This : in out Operational_Amplifier; Enabled : Boolean) is begin This.CSR.CALON := Enabled; end Set_Calibration_Mode; -------------------------- -- Get_Calibration_Mode -- -------------------------- function Get_Calibration_Mode (This : Operational_Amplifier) return Boolean is begin return This.CSR.CALON; end Get_Calibration_Mode; --------------------------- -- Set_Calibration_Value -- --------------------------- procedure Set_Calibration_Value (This : in out Operational_Amplifier; Input : Calibration_Value) is begin This.CSR.CALSEL := Input'Enum_Rep; end Set_Calibration_Value; --------------------------- -- Get_Calibration_Value -- --------------------------- function Get_Calibration_Value (This : Operational_Amplifier) return Calibration_Value is begin return Calibration_Value'Val (This.CSR.CALSEL); end Get_Calibration_Value; --------------- -- Calibrate -- --------------- procedure Calibrate (This : in out Operational_Amplifier) is use Ada.Real_Time; Trimoffset : UInt5 := 0; begin -- 1. Enable OPAMP by setting the OPAMPxEN bit. if not Enabled (This) then Enable (This); end if; -- 2. Enable the user offset trimming by setting the USERTRIM bit. Set_User_Trimming (This, Enabled => True); -- 3. Connect VM and VP to the internal reference voltage by setting -- the CALON bit. Set_Calibration_Mode (This, Enabled => True); -- 4. Set CALSEL to 11 (OPAMP internal reference = 0.9 x VDDA) for NMOS, -- Set CALSEL to 01 (OPAMP internal reference = 0.1 x VDDA) for PMOS. for Pair in Differential_Pair'Range loop if Pair = NMOS then Set_Calibration_Value (This, Input => VREFOPAMP_Is_90_VDDA); else Set_Calibration_Value (This, Input => VREFOPAMP_Is_10_VDDA); end if; -- 5. In a loop, increment the TRIMOFFSETN (for NMOS) or TRIMOFFSETP -- (for PMOS) value. To exit from the loop, the OUTCAL bit must be -- reset (non-inverting < inverting). -- In this case, the TRIMOFFSETN value must be stored. Set_Offset_Trimming (This, Pair => Pair, Input => Trimoffset); -- Wait the OFFTRIMmax delay timing specified < 1 ms. delay until Clock + Milliseconds (1); while Get_Output_Status_Flag (This) = NI_Greater_Then_I loop Trimoffset := Trimoffset + 1; Set_Offset_Trimming (This, Pair => Pair, Input => Trimoffset); -- Wait the OFFTRIMmax delay timing specified < 1 ms. delay until Clock + Milliseconds (1); end loop; end loop; Set_User_Trimming (This, Enabled => False); Set_Calibration_Mode (This, Enabled => False); end Calibrate; ----------------------------- -- Get_Output_Status_Flag -- ----------------------------- function Get_Output_Status_Flag (This : Operational_Amplifier) return Output_Status_Flag is begin return Output_Status_Flag'Val (Boolean'Pos (This.CSR.CALOUT)); end Get_Output_Status_Flag; end STM32.OPAMP;
archive/agda-3/src/AgdaIssue2557.agda
m0davis/oscar
0
7384
<filename>archive/agda-3/src/AgdaIssue2557.agda {-# OPTIONS --allow-unsolved-metas #-} module AgdaIssue2557 where record Superclass : Set₁ where field super : Set open Superclass ⦃ … ⦄ public record Subclass : Set₁ where field ⦃ iSuperclass ⦄ : Superclass sub : super open Subclass postulate A : Set instance SuperclassA : Superclass Superclass.super SuperclassA = A → A postulate function-A : A → A test-1 : Subclass Subclass.sub test-1 = {!!} -- Goal: A → A test-2 : Subclass test-2 = record { sub = function-A } -- works test-3 : Subclass Subclass.iSuperclass test-3 = SuperclassA -- (could also put "it" here) Subclass.sub test-3 = function-A -- works test-4 : Subclass Subclass.sub test-4 = {!function-A!} -- fails -- test-5 : Subclass -- Subclass.sub test-5 x = {!!} -- fails test-6 : Subclass Subclass.sub test-6 = {!λ x → {!!}!} -- fails
ee/hot/remv.asm
olifink/smsqe
0
22440
; Function to remove HOTKEY V2.00  1988 <NAME> QJUMP section hotkey xdef hot_remv xref hot_thar xref hot_rter xref hk_remv xref ut_gxnm1 ;+++ ; SuperBASIC Remove hotkey item ; error = HOT_REMV (key or name) ;--- hot_remv jsr ut_gxnm1 ; get name of thing to remove bne.s hr_rts lea hk_remv,a2 ; remove jsr hot_thar ; (a1 relative a6) jmp hot_rter ; return error hr_rts rts end
asm/loader.asm
ddjohn/mordana
0
98126
loadKernel: mov bx, KERNEL_ADDRESS mov dh, 10 mov dl, [BOOT_DRIVE] call .loadDisk ret .loadDisk: push dx mov ah, 0x02 mov al, dh mov ch, 0x00 mov cl, 0x02 mov dh, 0x00 int 0x13 jc .error pop dx cmp dh, al jne .errorSectorsNotSame ret .error: mov si, STRING_DISK_ERROR call printString mov dx, ax mov si, dx call printHex jmp $ .errorSectorsNotSame: mov si, STRING_DISK_SECTOR_ERROR call printString jmp $ STRING_DISK_ERROR: db "Could not read from disk!", 10, 13, 0 STRING_DISK_SECTOR_ERROR: db "Could not read the specified amount of sectors from disk!", 10, 13, 0
agda-stdlib-0.9/README/Record.agda
qwe2/try-agda
1
4937
<reponame>qwe2/try-agda ------------------------------------------------------------------------ -- The Agda standard library -- -- An example of how the Record module can be used ------------------------------------------------------------------------ -- Taken from <NAME>'s paper "Dependently Typed Records in Type -- Theory". module README.Record where open import Data.Product open import Data.String open import Function using (flip) open import Level import Record open import Relation.Binary -- Let us use strings as labels. open Record String _≟_ -- Partial equivalence relations. PER : Signature _ PER = ∅ , "S" ∶ (λ _ → Set) , "R" ∶ (λ r → r · "S" → r · "S" → Set) , "sym" ∶ (λ r → Lift (Symmetric (r · "R"))) , "trans" ∶ (λ r → Lift (Transitive (r · "R"))) -- Given a PER the converse relation is also a PER. converse : (P : Record PER) → Record (PER With "S" ≔ (λ _ → P · "S") With "R" ≔ (λ _ → flip (P · "R"))) converse P = Rec′⇒Rec (PER With "S" ≔ (λ _ → P · "S") With "R" ≔ (λ _ → flip (P · "R"))) ((((_ ,) ,) , lift λ {_} → lower (P · "sym")) , (lift λ {_} yRx zRy → lower (P · "trans") zRy yRx))
hw5/danielsawyer-hw5-string_match.asm
sawyermade/architecture
16
178985
<filename>hw5/danielsawyer-hw5-string_match.asm .data getstr: .asciiz "\nEnter a string of at most 100 chars: " getchar: .asciiz "\nEnter a char: " get2char: .asciiz "\nEnter a string of two chars: " printo1: .asciiz "\nNumber of occurrences of " printo2: .asciiz " = " repeatstr: .asciiz "\nRepeat (Y/N): " str: .space 101 char: .space 2 char2: .space 3 .text main: #prints getstr li $v0, 4 la $a0, getstr syscall #stores string li $v0, 8 la $a0, str li $a1, 101 syscall #gets char li $v0, 4 la $a0, getchar syscall li $v0, 8 la $a0, char li $a1, 2 syscall #single occurance la $t0, str la $t2, char lb $t2, ($t2) li $t3, 0 li $t4, 32 loop1: lb $t1, ($t0) beq $t1, $zero, print1 beq $t1, $t2, count1 sub $t5, $t1, $t4 beq $t5, $t2, count1 add $t5, $t1, $t4 beq $t5, $t2, count1 addi $t0, $t0, 1 b loop1 count1: addi $t3, $t3, 1 addi $t0, $t0, 1 b loop1 print1: li $v0, 4 la $a0, printo1 syscall li $v0, 4 la $a0, char syscall li $v0, 4 la $a0, printo2 syscall li $v0, 1 move $a0, $t3 syscall #2 chars li $v0, 4 la $a0, get2char syscall li $v0, 8 la $a0, char2 li $a1, 3 syscall #2char occurance la $t0, str la $t2, char2 lb $t3, 1($t2) lb $t2, ($t2) li $t4, 0 li $t5, 32 loop2: lb $t1, ($t0) beq $t1, $zero, print2 beq $t1, $t2, nextchar sub $t6, $t1, $t5 beq $t6, $t2, nextchar add $t6, $t1, $t5 beq $t6, $t2, nextchar addi $t0, $t0, 1 b loop2 nextchar: lb $t1, 1($t0) beq $t1, $zero, print2 beq $t1, $t3, count2 sub $t6, $t1, $t5 beq $t6, $t3, count2 add $t6, $t1, $t5 beq $t6, $t3, count2 addi $t0, $t0, 1 b loop2 count2: addi $t4, $t4, 1 addi $t0, $t0, 1 b loop2 print2: li $v0, 4 la $a0, printo1 syscall li $v0, 4 la $a0, char2 syscall li $v0, 4 la $a0, printo2 syscall li $v0, 1 move $a0, $t4 syscall repeat: li $v0, 4 la $a0, repeatstr syscall li $v0, 8 la $a0, char li $a1, 2 syscall la $t0, char lb $t0, ($t0) li $t1, 89 li $t2, 121 beq $t0, $t1, main beq $t0, $t2, main end: li $v0, 10 syscall
etude/etude25.als
nishio/learning_alloy
1
4505
<filename>etude/etude25.als run { some rel: Int -> Int { rel = (1 -> 2) + (2 -> 3) + (2 -> 4) } }
New Reminder - Due in X hours.applescript
EvanLovely/clipboard-actions
9
697
<reponame>EvanLovely/clipboard-actions # Use : to seperate todo's title from hours from now due. Example: "title: 3" make a todo called "title" due in 3 hours. set _input to the clipboard set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ": "} set {_name, _hours} to {text item 1 of _input, text item 2 of _input} set AppleScript's text item delimiters to astid tell application "Reminders" set _task to make new reminder with properties {name:_name,due date:((current date) + _hours * hours)} # @todo create and copy a URL to the newly made task after end tell
test/link/high-low-a.asm
jmle/rgbds
522
162082
ldhilo : MACRO ld HIGH(\1),LOW(\2) ENDM SECTION "r0", ROM0[$0] ld HIGH(af),a ld HIGH(bc),LOW(bc) ld LOW(bc),HIGH(bc) ld HIGH(de),LOW(de) ld LOW(de),HIGH(de) ldhilo hl, hl ld LOW(hl),HIGH(hl) db HIGH(label+$AB) db LOW(label+$AB) db HIGH($1234) db LOW($1234) SECTION "o",OAM DS $10 label:
gcc-gcc-7_3_0-release/gcc/ada/a-dispat.ads
best08618/asylo
7
29336
<gh_stars>1-10 ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . D I S P A T C H I N G -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ package Ada.Dispatching is pragma Preelaborate (Dispatching); procedure Yield with Global => null; Dispatching_Policy_Error : exception; end Ada.Dispatching;
theorems/cw/cohomology/cochainequiv/FirstCoboundaryAbstractDefs.agda
timjb/HoTT-Agda
0
8906
<filename>theorems/cw/cohomology/cochainequiv/FirstCoboundaryAbstractDefs.agda {-# OPTIONS --without-K --rewriting #-} open import HoTT renaming (pt to ⊙pt) open import homotopy.Bouquet open import homotopy.FinWedge open import homotopy.LoopSpaceCircle open import homotopy.SphereEndomorphism open import groups.SphereEndomorphism open import cw.CW open import cw.FinCW open import cw.WedgeOfCells open import cw.DegreeByProjection {lzero} open import homotopy.DisjointlyPointedSet open import cohomology.Theory module cw.cohomology.cochainequiv.FirstCoboundaryAbstractDefs (OT : OrdinaryTheory lzero) (⊙fin-skel : ⊙FinSkeleton 1) where open OrdinaryTheory OT open import cohomology.Bouquet OT private ⊙skel = ⊙FinSkeleton-realize ⊙fin-skel fin-skel = ⊙FinSkeleton.skel ⊙fin-skel I = AttachedFinSkeleton.numCells fin-skel skel = ⊙Skeleton.skel ⊙skel dec = FinSkeleton-has-cells-with-dec-eq fin-skel endpoint = attaching-last skel I₋₁ = AttachedFinSkeleton.skel fin-skel ⊙head = ⊙cw-head ⊙skel pt = ⊙pt ⊙head open import cw.cohomology.reconstructed.TipCoboundary OT ⊙skel ⊙head-is-separable : is-separable ⊙head ⊙head-is-separable = Fin-has-dec-eq pt ⊙head-separate = separate-pt ⊙head-is-separable ⊙head-separate-equiv = (unite-pt ⊙head , separable-has-disjoint-pt ⊙head-is-separable)⁻¹ MinusPoint-⊙head-has-choice : has-choice 0 (MinusPoint ⊙head) lzero MinusPoint-⊙head-has-choice = MinusPoint-has-choice ⊙head-is-separable (Fin-has-choice 0 lzero) MinusPoint-⊙head-has-dec-eq : has-dec-eq (MinusPoint ⊙head) MinusPoint-⊙head-has-dec-eq = MinusPoint-has-dec-eq Fin-has-dec-eq ⊙function₀ : ⊙FinBouquet I 1 ⊙→ ⊙Susp (⊙Bouquet (MinusPoint ⊙head) 0) ⊙function₀ = ⊙Susp-fmap (⊙<– (Bouquet-⊙equiv-X ⊙head-is-separable)) ⊙∘ ⊙cw-∂-head'-before-Susp ⊙∘ ⊙–> (Bouquet-⊙equiv-Xₙ/Xₙ₋₁ skel) function₁ : Fin I → MinusPoint ⊙head → Sphere-endo 0 function₁ <I b x with Fin-has-dec-eq (fst b) (endpoint <I x) function₁ <I b x | inl _ = false function₁ <I b x | inr _ = true abstract ⊙function₀' : ⊙FinBouquet I 1 ⊙→ ⊙Susp (⊙Bouquet (MinusPoint ⊙head) 0) ⊙function₀' = ⊙function₀ ⊙function₀'-β : ⊙function₀' == ⊙function₀ ⊙function₀'-β = idp function₁' : Fin I → MinusPoint ⊙head → Sphere-endo 0 function₁' = function₁ function₁'-β : ∀ <I b → function₁' <I b == function₁ <I b function₁'-β _ _ = idp private mega-reduction-cases : ∀ <I b x → bwproj MinusPoint-⊙head-has-dec-eq b (<– (Bouquet-equiv-X ⊙head-is-separable) (endpoint <I x)) == function₁ <I b x mega-reduction-cases <I b x with Fin-has-dec-eq pt (endpoint <I x) mega-reduction-cases <I b x | inl _ with Fin-has-dec-eq (fst b) (endpoint <I x) mega-reduction-cases <I b x | inl pt=end | inl b=end = ⊥-rec (snd b (pt=end ∙ ! b=end)) mega-reduction-cases <I b x | inl _ | inr _ = idp mega-reduction-cases <I b x | inr _ with Fin-has-dec-eq (fst b) (endpoint <I x) mega-reduction-cases <I b x | inr _ | inl b=end = bwproj MinusPoint-⊙head-has-dec-eq b (bwin (endpoint <I x , _) false) =⟨ ap (λ b' → bwproj MinusPoint-⊙head-has-dec-eq b (bwin b' false)) $ ! $ Subtype=-out (MinusPoint-prop ⊙head) b=end ⟩ bwproj MinusPoint-⊙head-has-dec-eq b (bwin b false) =⟨ bwproj-bwin-diag MinusPoint-⊙head-has-dec-eq b false ⟩ false =∎ mega-reduction-cases <I b x | inr _ | inr b≠end = bwproj-bwin-≠ MinusPoint-⊙head-has-dec-eq (b≠end ∘ ap fst) false mega-reduction : ∀ <I b → Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ fst ⊙function₀' ∘ fwin <I ∼ Susp-fmap (function₁' <I b) mega-reduction <I b = Susp-elim idp idp λ x → ↓-='-in' $ ! $ ap (Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ fst ⊙function₀ ∘ fwin <I) (merid x) =⟨ ap-∘ ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable)) ∘ cw-∂-head'-before-Susp) (Bouquet-to-Xₙ/Xₙ₋₁ skel ∘ fwin <I) (merid x) ⟩ ap ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable)) ∘ cw-∂-head'-before-Susp) (ap (Bouquet-to-Xₙ/Xₙ₋₁ skel ∘ fwin <I) (merid x)) =⟨ ap (ap ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable)) ∘ cw-∂-head'-before-Susp)) (Bouquet-to-Xₙ/Xₙ₋₁-in-merid-β skel <I x) ⟩ ap ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable)) ∘ cw-∂-head'-before-Susp) (cfglue (endpoint <I x) ∙' ap cfcod (spoke <I x)) =⟨ ap-∘ ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable))) cw-∂-head'-before-Susp (cfglue (endpoint <I x) ∙' ap cfcod (spoke <I x)) ⟩ ap ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable))) (ap cw-∂-head'-before-Susp (cfglue (endpoint <I x) ∙' ap cfcod (spoke <I x))) =⟨ ap (ap ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable)))) ( ap-∙' cw-∂-head'-before-Susp (cfglue (endpoint <I x)) (ap cfcod (spoke <I x)) ∙ ap2 _∙'_ (cw-∂-head'-before-Susp-glue-β (endpoint <I x)) ( ∘-ap cw-∂-head'-before-Susp cfcod (spoke <I x) ∙ ap-cst south (spoke <I x))) ⟩ ap ( Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b) ∘ Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable))) (merid (endpoint <I x)) =⟨ ap-∘ (Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b)) (Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable))) (merid (endpoint <I x)) ⟩ ap (Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b)) (ap (Susp-fmap (<– (Bouquet-equiv-X ⊙head-is-separable))) (merid (endpoint <I x))) =⟨ ap (ap (Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b))) (SuspFmap.merid-β (<– (Bouquet-equiv-X ⊙head-is-separable)) (endpoint <I x)) ⟩ ap (Susp-fmap (bwproj MinusPoint-⊙head-has-dec-eq b)) (merid (<– (Bouquet-equiv-X ⊙head-is-separable) (endpoint <I x))) =⟨ SuspFmap.merid-β (bwproj MinusPoint-⊙head-has-dec-eq b) (<– (Bouquet-equiv-X ⊙head-is-separable) (endpoint <I x)) ⟩ merid (bwproj MinusPoint-⊙head-has-dec-eq b (<– (Bouquet-equiv-X ⊙head-is-separable) (endpoint <I x))) =⟨ ap merid (mega-reduction-cases <I b x) ⟩ merid (function₁ <I b x) =⟨ ! $ SuspFmap.merid-β (function₁ <I b) x ⟩ ap (Susp-fmap (function₁ <I b)) (merid x) =∎ open DegreeAtOne skel dec degree-matches' : ∀ <I b → merid (function₁' <I b false) ∙ ! (merid (function₁' <I b true)) == loop^ (degree <I (fst b)) degree-matches' <I b with Fin-has-dec-eq (fst b) (endpoint <I false) degree-matches' <I b | inl _ with Fin-has-dec-eq (fst b) (endpoint <I true) degree-matches' <I b | inl _ | inl _ = !-inv-r (merid false) degree-matches' <I b | inl _ | inr _ = idp degree-matches' <I b | inr _ with Fin-has-dec-eq (fst b) (endpoint <I true) degree-matches' <I b | inr _ | inl _ = ap (_∙ ! (merid false)) (! (!-! (merid true))) ∙ ∙-! (! (merid true)) (merid false) degree-matches' <I b | inr _ | inr _ = !-inv-r (merid true) degree-matches : ∀ <I b → ⊙SphereS-endo-degree 0 (Susp-fmap (function₁' <I b) , idp) == degree <I (fst b) degree-matches <I b = equiv-adj' ΩS¹-equiv-ℤ $ ap (Susp-fmap (function₁ <I b)) loop =⟨ ap-∙ (Susp-fmap (function₁ <I b)) (merid false) (! (merid true)) ⟩ ap (Susp-fmap (function₁ <I b)) (merid false) ∙ ap (Susp-fmap (function₁ <I b)) (! (merid true)) =⟨ ap2 _∙_ (SuspFmap.merid-β (function₁ <I b) false) ( ap-! (Susp-fmap (function₁ <I b)) (merid true) ∙ ap ! (SuspFmap.merid-β (function₁ <I b) true)) ⟩ merid (function₁ <I b false) ∙ ! (merid (function₁ <I b true)) =⟨ degree-matches' <I b ⟩ loop^ (degree <I (fst b)) =∎
oeis/135/A135466.asm
neoneye/loda-programs
11
83842
<reponame>neoneye/loda-programs ; A135466: a(n) = (2*n-8)^2 * 2^(n-3). ; 8,9,8,4,0,16,128,576,2048,6400,18432,50176,131072,331776,819200,1982464,4718592,11075584,25690112,58982400,134217728,303038464,679477248,1514143744,3355443200,7398752256,16240345088,35500589056,77309411328,167772160000,362924736512,782757789696,1683627180032,3612067495936,7730941132800,16509854285824,35184372088832,74835510165504,158879430213632,336725436006400,712483534798848,1505231418425344,3175389581017088,6689428743389184,14073748835532800,29572464740663296,62065232364699648 mov $1,$0 sub $0,4 pow $0,2 add $1,3 lpb $1 mul $0,2 sub $1,1 lpe div $0,16
Rings/Ideals/Definition.agda
Smaug123/agdaproofs
4
8520
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Groups.Lemmas open import Groups.Definition open import Groups.Subgroups.Definition open import Setoids.Setoids open import Sets.EquivalenceRelations open import Rings.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.Ideals.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) where open Ring R open Setoid S open Equivalence eq open Group additiveGroup open import Rings.Lemmas R open import Rings.Divisible.Definition R record Ideal {c : _} (pred : A → Set c) : Set (a ⊔ b ⊔ c) where field isSubgroup : Subgroup additiveGroup pred accumulatesTimes : {x : A} → {y : A} → pred x → pred (x * y) closedUnderPlus = Subgroup.closedUnderPlus isSubgroup closedUnderInverse = Subgroup.closedUnderInverse isSubgroup containsIdentity = Subgroup.containsIdentity isSubgroup isSubset = Subgroup.isSubset isSubgroup predicate = pred generatedIdealPred : A → A → Set (a ⊔ b) generatedIdealPred a b = a ∣ b generatedIdeal : (a : A) → Ideal (generatedIdealPred a) Subgroup.isSubset (Ideal.isSubgroup (generatedIdeal a)) {x} {y} x=y (c , prC) = c , transitive prC x=y Subgroup.closedUnderPlus (Ideal.isSubgroup (generatedIdeal a)) {g} {h} (c , prC) (d , prD) = (c + d) , transitive *DistributesOver+ (+WellDefined prC prD) Subgroup.containsIdentity (Ideal.isSubgroup (generatedIdeal a)) = 0G , timesZero Subgroup.closedUnderInverse (Ideal.isSubgroup (generatedIdeal a)) {g} (c , prC) = inverse c , transitive ringMinusExtracts (inverseWellDefined additiveGroup prC) Ideal.accumulatesTimes (generatedIdeal a) {x} {y} (c , prC) = (c * y) , transitive *Associative (*WellDefined prC reflexive)
open_terminal_here.scpt
amjith/zazu-open-terminal
6
1997
<filename>open_terminal_here.scpt set results to "" try tell application "Finder" to set results to POSIX path of (target of window 1 as alias) on error beep end try results tell application "Terminal" activate set currentTab to do script "cd '" & results & "'" end tell
tutorial/week6/problem3/src/main/mc/parser/MC.g4
khoidohpc/ppl-course
2
4293
grammar MC; @lexer::header { from lexererr import * } @lexer::members { def emit(self): tk = self.type if tk == self.UNCLOSE_STRING: result = super().emit(); raise UncloseString(result.text); elif tk == self.ILLEGAL_ESCAPE: result = super().emit(); raise IllegalEscape(result.text); elif tk == self.ERROR_CHAR: result = super().emit(); raise ErrorToken(result.text); else: return super().emit(); } options{ language=Python3; } exp: term COMPARE term | term ; // COMPARE is none-association term: factor EXPONENT term | factor ; factor: operand (ANDOR operand)* ; // ANDOR is left-association operand: INTLIT | BOOLIT | LB exp RB ; BOOLIT: 'true' | 'false' ; INTLIT: [0-9]+; LB: '(' ; RB: ')' ; COMPARE: '<' | '>' | '>=' | '<=' | '==' | '!=' ; EXPONENT: '^'; ANDOR: '&&' | '||' ; SEMI: ';' ; WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines ERROR_CHAR: .; UNCLOSE_STRING: .; ILLEGAL_ESCAPE: .;
src/common/keccak-types.ads
damaki/libkeccak
26
1090
------------------------------------------------------------------------------- -- Copyright (c) 2019, <NAME> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * The name of the copyright holder may not 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 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. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- This package defines common types used throughout the various packages -- in the library. ------------------------------------------------------------------------------- with Interfaces; -- @summary -- Common type definitions. package Keccak.Types with SPARK_Mode => On is type Unsigned_1 is mod 2**1 with Size => 1; type Unsigned_2 is mod 2**2 with Size => 2; type Unsigned_4 is mod 2**4 with Size => 4; subtype Byte is Interfaces.Unsigned_8; subtype Index_Number is Natural range 0 .. Natural'Last - 1; type Byte_Array is array (Index_Number range <>) of Byte; Null_Byte_Array : constant Byte_Array (1 .. 0) := (others => 0); ------------------ -- Shift_Left -- ------------------ function Shift_Left_1 (Value : in Unsigned_1; Amount : in Natural) return Unsigned_1 with Global => null, Inline, Pre => Amount <= 1; function Shift_Left_2 (Value : in Unsigned_2; Amount : in Natural) return Unsigned_2 with Global => null, Inline, Pre => Amount <= 2; function Shift_Left_4 (Value : in Unsigned_4; Amount : in Natural) return Unsigned_4 with Global => null, Inline, Pre => Amount <= 4; ------------------- -- Shift_Right -- ------------------- function Shift_Right_1 (Value : in Unsigned_1; Amount : in Natural) return Unsigned_1 with Global => null, Inline, Pre => Amount <= 1; function Shift_Right_2 (Value : in Unsigned_2; Amount : in Natural) return Unsigned_2 with Global => null, Inline, Pre => Amount <= 2; function Shift_Right_4 (Value : in Unsigned_4; Amount : in Natural) return Unsigned_4 with Global => null, Inline, Pre => Amount <= 4; ------------------- -- Rotate_Left -- ------------------- function Rotate_Left_1 (Value : in Unsigned_1; Amount : in Natural) return Unsigned_1 with Global => null, Inline, Pre => Amount <= 1; function Rotate_Left_2 (Value : in Unsigned_2; Amount : in Natural) return Unsigned_2 with Global => null, Inline, Pre => Amount <= 2; function Rotate_Left_4 (Value : in Unsigned_4; Amount : in Natural) return Unsigned_4 with Global => null, Inline, Pre => Amount <= 4; private use type Interfaces.Unsigned_8; ------------------ -- Shift_Left -- ------------------ function Shift_Left_1 (Value : in Unsigned_1; Amount : in Natural) return Unsigned_1 is (Unsigned_1 (Interfaces.Shift_Left (Byte (Value), Amount) and (2**1 - 1))); function Shift_Left_2 (Value : in Unsigned_2; Amount : in Natural) return Unsigned_2 is (Unsigned_2 (Interfaces.Shift_Left (Byte (Value), Amount) and (2**2 - 1))); function Shift_Left_4 (Value : in Unsigned_4; Amount : in Natural) return Unsigned_4 is (Unsigned_4 (Interfaces.Shift_Left (Byte (Value), Amount) and (2**4 - 1))); ------------------- -- Shift_Right -- ------------------- function Shift_Right_1 (Value : in Unsigned_1; Amount : in Natural) return Unsigned_1 is (Unsigned_1 (Interfaces.Shift_Right (Byte (Value), Amount) and (2**1 - 1))); function Shift_Right_2 (Value : in Unsigned_2; Amount : in Natural) return Unsigned_2 is (Unsigned_2 (Interfaces.Shift_Right (Byte (Value), Amount) and (2**2 - 1))); function Shift_Right_4 (Value : in Unsigned_4; Amount : in Natural) return Unsigned_4 is (Unsigned_4 (Interfaces.Shift_Right (Byte (Value), Amount) and (2**4 - 1))); ------------------- -- Rotate_Left -- ------------------- function Rotate_Left_1 (Value : in Unsigned_1; Amount : in Natural) return Unsigned_1 is (Value); function Rotate_Left_2 (Value : in Unsigned_2; Amount : in Natural) return Unsigned_2 is (Shift_Left_2 (Value, Amount) or Shift_Right_2 (Value, 2 - Amount)); function Rotate_Left_4 (Value : in Unsigned_4; Amount : in Natural) return Unsigned_4 is (Shift_Left_4 (Value, Amount) or Shift_Right_4 (Value, 4 - Amount)); end Keccak.Types;
applescript/left.applescript
jeremy5189/Sensortag-OSX-Remote
1
4154
<filename>applescript/left.applescript tell application "System Events" key code 123 end tell
agda/hott/core/sigma.agda
piyush-kurur/hott
0
5010
{-# OPTIONS --without-K #-} -- This module implements the dependent Σ-type. module hott.core.sigma where open import hott.core.universe record Σ {ℓ₀ ℓ₁} {A : Type ℓ₀} (B : A → Type ℓ₁) : Type (ℓ₀ ⊔ ℓ₁) where constructor _,_ field proj₁ : A proj₂ : B proj₁ -- The product type is just the non-dependent Σ-type. _×_ : ∀{ℓ₀ ℓ₁} (A : Type ℓ₀) (B : Type ℓ₁) → Type (ℓ₀ ⊔ ℓ₁) A × B = Σ λ (_ : A) → B -- Since the , constructor is infixr, we can write (a , (b , c)) as -- just (a , b , c). The convention that we follow for tuples is that -- of a list. We assign the paring function the least precedence -- because we would like to write all other stuff inside the tuple -- naturally e.g. (p ≡ q , q ≡ r) etc. We ensure that no other -- operator has 0 precedence. infixr 0 _,_ infixr 0 _×_ -- The projection to the first component. fst : ∀{ℓ₀ ℓ₁} {A : Type ℓ₀} {B : A → Type ℓ₁} → Σ B → A fst = Σ.proj₁ -- The projection to the second component. snd : ∀{ℓ₀ ℓ₁} {A : Type ℓ₀} {B : A → Type ℓ₁} → (σ : Σ B) → B (fst σ) snd = Σ.proj₂
src/main/antlr/com/logicmint/criteriaparser/Criteria.g4
nickebbutt/criteriaparser
0
6589
grammar Criteria; // Define a grammar called Hello @header { package com.logicmint.criteriaparser; } expression : '(' expression ')' # ParenthesisedExpression | condition # ConditionExpression | expression AND expression # AndExpression | expression OR expression # OrExpression ; condition : columnId comparison term # ColumnToTermCondition | columnId comparison columnId # ColumnToColumnCondition | columnId NOT? LIKE string_term # LikeCondition | columnId NOT? IN termlist # InCondition | columnId 'IS' NOT? null_term # NulLCondition ; comparison : '<=' # LessThanOrEquals | '>=' # GreaterThanOrEquals | '=' # Equals | '<' # LessThan | '>' # GreaterThan | '!=' # NotEquals ; termlist: '(' term (','term)* ')' ; term : int_term | string_term ; // Define these as rules rather than refer to the equivalent lexical tokens directly so that they are represented // as type specific callbacks in the ParseTreeListener and are therefore easy to attach custom logic to columnId : COLUMN_ID_TERM ; int_term : INT_TERM ; string_term : STRING_TERM; null_term : NULL_TERM; // Lexical Tokens AND: 'AND'; OR: 'OR'; LIKE: 'LIKE'; IN: 'IN'; NOT: 'NOT'; NULL_TERM: 'NULL'; INT_TERM: [-]?[0-9]+ ; COLUMN_ID_TERM: [a-zA-Z0-9_]+ ; STRING_TERM: '\'' .*? '\'' ; WS: [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines, \r (Windows)
target/cos_117/disasm/iop_overlay1/DDIAG.asm
jrrk2/cray-sim
49
172781
<gh_stars>10-100 0x0000 (0x000000) 0x2118- f:00020 d: 280 | A = OR[280] 0x0001 (0x000002) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007) 0x0002 (0x000004) 0x2908- f:00024 d: 264 | OR[264] = A 0x0003 (0x000006) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0004 (0x000008) 0x13FF- f:00011 d: 511 | A = A & 511 (0x01FF) 0x0005 (0x00000A) 0x291B- f:00024 d: 283 | OR[283] = A 0x0006 (0x00000C) 0x7437- f:00072 d: 55 | R = P + 55 (0x003D) 0x0007 (0x00000E) 0x8625- f:00103 d: 37 | P = P + 37 (0x002C), A # 0 0x0008 (0x000010) 0x2119- f:00020 d: 281 | A = OR[281] 0x0009 (0x000012) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001) 0x000A (0x000014) 0x8402- f:00102 d: 2 | P = P + 2 (0x000C), A = 0 0x000B (0x000016) 0x7010- f:00070 d: 16 | P = P + 16 (0x001B) 0x000C (0x000018) 0x2118- f:00020 d: 280 | A = OR[280] 0x000D (0x00001A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x000E (0x00001C) 0x2908- f:00024 d: 264 | OR[264] = A 0x000F (0x00001E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0010 (0x000020) 0x0E07- f:00007 d: 7 | A = A << 7 (0x0007) 0x0011 (0x000022) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001) 0x0012 (0x000024) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0013 (0x000026) 0x0C08- f:00006 d: 8 | A = A >> 8 (0x0008) 0x0014 (0x000028) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0015 (0x00002A) 0x1800-0x901C f:00014 d: 0 | A = 36892 (0x901C) 0x0017 (0x00002E) 0xE200- f:00161 d: 0 | IOB , fn001 0x0018 (0x000030) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x0019 (0x000032) 0x291A- f:00024 d: 282 | OR[282] = A 0x001A (0x000034) 0x7011- f:00070 d: 17 | P = P + 17 (0x002B) 0x001B (0x000036) 0x2119- f:00020 d: 281 | A = OR[281] 0x001C (0x000038) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002) 0x001D (0x00003A) 0x8402- f:00102 d: 2 | P = P + 2 (0x001F), A = 0 0x001E (0x00003C) 0x700D- f:00070 d: 13 | P = P + 13 (0x002B) 0x001F (0x00003E) 0x2118- f:00020 d: 280 | A = OR[280] 0x0020 (0x000040) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x0021 (0x000042) 0x2908- f:00024 d: 264 | OR[264] = A 0x0022 (0x000044) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0023 (0x000046) 0x1A00-0xFDFF f:00015 d: 0 | A = A & 65023 (0xFDFF) 0x0025 (0x00004A) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0026 (0x00004C) 0x1800-0x9000 f:00014 d: 0 | A = 36864 (0x9000) 0x0028 (0x000050) 0xE200- f:00161 d: 0 | IOB , fn001 0x0029 (0x000052) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x002A (0x000054) 0x291A- f:00024 d: 282 | OR[282] = A 0x002B (0x000056) 0x742C- f:00072 d: 44 | R = P + 44 (0x0057) 0x002C (0x000058) 0x3118- f:00030 d: 280 | A = (OR[280]) 0x002D (0x00005A) 0x1A00-0xFF7F f:00015 d: 0 | A = A & 65407 (0xFF7F) 0x002F (0x00005E) 0x3918- f:00034 d: 280 | (OR[280]) = A 0x0030 (0x000060) 0x0400- f:00002 d: 0 | I = 0 0x0031 (0x000062) 0x0000- f:00000 d: 0 | PASS 0x0032 (0x000064) 0x2118- f:00020 d: 280 | A = OR[280] 0x0033 (0x000066) 0x2897- f:00024 d: 151 | OR[151] = A 0x0034 (0x000068) 0x7E00-0x1947 f:00077 d: 0 | R = OR[0]+6471 (0x1947) 0x0036 (0x00006C) 0x0600- f:00003 d: 0 | I = 1 0x0037 (0x00006E) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x0038 (0x000070) 0x291C- f:00024 d: 284 | OR[284] = A 0x0039 (0x000072) 0x111C- f:00010 d: 284 | A = 284 (0x011C) 0x003A (0x000074) 0x5800- f:00054 d: 0 | B = A 0x003B (0x000076) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x003C (0x000078) 0x7C09- f:00076 d: 9 | R = OR[9] 0x003D (0x00007A) 0x211B- f:00020 d: 283 | A = OR[283] 0x003E (0x00007C) 0x5800- f:00054 d: 0 | B = A 0x003F (0x00007E) 0xE000- f:00160 d: 0 | IOB , fn000 0x0040 (0x000080) 0x0000- f:00000 d: 0 | PASS 0x0041 (0x000082) 0x4400- f:00042 d: 0 | C = 1, IOB = DN 0x0042 (0x000084) 0x8204- f:00101 d: 4 | P = P + 4 (0x0046), C = 1 0x0043 (0x000086) 0x4600- f:00043 d: 0 | C = 1, IOB = BZ 0x0044 (0x000088) 0x8202- f:00101 d: 2 | P = P + 2 (0x0046), C = 1 0x0045 (0x00008A) 0x7010- f:00070 d: 16 | P = P + 16 (0x0055) 0x0046 (0x00008C) 0x2118- f:00020 d: 280 | A = OR[280] 0x0047 (0x00008E) 0x141E- f:00012 d: 30 | A = A + 30 (0x001E) 0x0048 (0x000090) 0x2908- f:00024 d: 264 | OR[264] = A 0x0049 (0x000092) 0x1005- f:00010 d: 5 | A = 5 (0x0005) 0x004A (0x000094) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x004B (0x000096) 0x2118- f:00020 d: 280 | A = OR[280] 0x004C (0x000098) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x004D (0x00009A) 0x2908- f:00024 d: 264 | OR[264] = A 0x004E (0x00009C) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x004F (0x00009E) 0x1A00-0xFFFE f:00015 d: 0 | A = A & 65534 (0xFFFE) 0x0051 (0x0000A2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0052 (0x0000A4) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0053 (0x0000A6) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0054 (0x0000A8) 0x7002- f:00070 d: 2 | P = P + 2 (0x0056) 0x0055 (0x0000AA) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0056 (0x0000AC) 0x0200- f:00001 d: 0 | EXIT 0x0057 (0x0000AE) 0x0400- f:00002 d: 0 | I = 0 0x0058 (0x0000B0) 0x0000- f:00000 d: 0 | PASS 0x0059 (0x0000B2) 0x2118- f:00020 d: 280 | A = OR[280] 0x005A (0x0000B4) 0x1424- f:00012 d: 36 | A = A + 36 (0x0024) 0x005B (0x0000B6) 0x281D- f:00024 d: 29 | OR[29] = A 0x005C (0x0000B8) 0x211A- f:00020 d: 282 | A = OR[282] 0x005D (0x0000BA) 0x281C- f:00024 d: 28 | OR[28] = A 0x005E (0x0000BC) 0x7E00-0x1E02 f:00077 d: 0 | R = OR[0]+7682 (0x1E02) 0x0060 (0x0000C0) 0xEE00- f:00167 d: 0 | IOB , fn007 0x0061 (0x0000C2) 0x3118- f:00030 d: 280 | A = (OR[280]) 0x0062 (0x0000C4) 0x0E08- f:00007 d: 8 | A = A << 8 (0x0008) 0x0063 (0x0000C6) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001) 0x0064 (0x0000C8) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0065 (0x0000CA) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x0066 (0x0000CC) 0x3918- f:00034 d: 280 | (OR[280]) = A 0x0067 (0x0000CE) 0x2118- f:00020 d: 280 | A = OR[280] 0x0068 (0x0000D0) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018) 0x0069 (0x0000D2) 0x2913- f:00024 d: 275 | OR[275] = A 0x006A (0x0000D4) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x006B (0x0000D6) 0x291C- f:00024 d: 284 | OR[284] = A 0x006C (0x0000D8) 0x2113- f:00020 d: 275 | A = OR[275] 0x006D (0x0000DA) 0x291D- f:00024 d: 285 | OR[285] = A 0x006E (0x0000DC) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x006F (0x0000DE) 0x291E- f:00024 d: 286 | OR[286] = A 0x0070 (0x0000E0) 0x111C- f:00010 d: 284 | A = 284 (0x011C) 0x0071 (0x0000E2) 0x5800- f:00054 d: 0 | B = A 0x0072 (0x0000E4) 0x1800-0x0918 f:00014 d: 0 | A = 2328 (0x0918) 0x0074 (0x0000E8) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0075 (0x0000EA) 0x2006- f:00020 d: 6 | A = OR[6] 0x0076 (0x0000EC) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B) 0x0077 (0x0000EE) 0x2908- f:00024 d: 264 | OR[264] = A 0x0078 (0x0000F0) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0079 (0x0000F2) 0x3118- f:00030 d: 280 | A = (OR[280]) 0x007A (0x0000F4) 0x1A00-0xFEFF f:00015 d: 0 | A = A & 65279 (0xFEFF) 0x007C (0x0000F8) 0x3918- f:00034 d: 280 | (OR[280]) = A 0x007D (0x0000FA) 0x211B- f:00020 d: 283 | A = OR[283] 0x007E (0x0000FC) 0x5800- f:00054 d: 0 | B = A 0x007F (0x0000FE) 0x2006- f:00020 d: 6 | A = OR[6] 0x0080 (0x000100) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C) 0x0081 (0x000102) 0x2908- f:00024 d: 264 | OR[264] = A 0x0082 (0x000104) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0083 (0x000106) 0x0200- f:00001 d: 0 | EXIT 0x0084 (0x000108) 0x0000- f:00000 d: 0 | PASS 0x0085 (0x00010A) 0x0000- f:00000 d: 0 | PASS 0x0086 (0x00010C) 0x0000- f:00000 d: 0 | PASS 0x0087 (0x00010E) 0x0000- f:00000 d: 0 | PASS
programs/oeis/166/A166728.asm
karttu/loda
1
164875
; A166728: Positive integers with English names ending in "x". ; 6,26,36,46,56,66,76,86,96,106,126,136,146,156,166,176,186,196,206,226,236,246,256,266,276,286,296,306,326,336,346,356,366,376,386,396,406,426,436,446,456,466,476,486,496,506,526,536,546,556,566,576,586,596 mov $1,$0 mul $1,10 add $1,8 div $1,9 mul $1,10 add $1,6
smsq/java/host.asm
olifink/smsqe
0
87441
<gh_stars>0 ; SMSQmulator Host module V 1.02 (c) <NAME> 2012 ; ; this is the very start of the SMSQE binary ; based on ; SMSQ GOLD Card Host module v1.01 ; 2003-10-05 1.01 Fixed copy problem that could hang SMSQ/E later (MK) section host include 'dev8_keys_qdos_sms' include 'dev8_keys_stella_bl' include 'dev8_keys_java' data 4 ; flag for LRESPR base move.w #$2700,sr ; no interrupts move.l a7,d7 ; top of ram sub.l #jva.ssp,d7 ; minus space for ssp = new ramptop lea trailer,a0 pea base ; set base address for debug add.l sbl_mbase(a0),a0 jmp (a0) ; jump to "smsq_smsq_loader_asm" section trailer trailer dc.l 0 ; no header dc.l trailer-base ; length of module dc.l 0 ; length dc.l 0 ; checksum dc.l 0 ; no fixup dc.l 0 end
archive/agda-3/src/Oscar/Class/Smap.agda
m0davis/oscar
0
11027
<filename>archive/agda-3/src/Oscar/Class/Smap.agda open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Surjection open import Oscar.Data.Proposequality module Oscar.Class.Smap where open import Oscar.Class.Hmap public module Smap {𝔵₁ 𝔵₁'} {𝔛₁ : Ø 𝔵₁} {𝔛₁' : Ø 𝔵₁'} {𝔵₂ 𝔵₂'} {𝔛₂ : Ø 𝔵₂} {𝔛₂' : Ø 𝔵₂'} {𝔯₁₂} {𝔯₁₂'} (ℜ₁₂ : 𝔛₁ → 𝔛₂ → Ø 𝔯₁₂) (ℜ₁₂' : 𝔛₁' → 𝔛₂' → Ø 𝔯₁₂') (p₁ : 𝔛₁ → 𝔛₁') (p₂ : 𝔛₂ → 𝔛₂') where class = Hmap.class ℜ₁₂ (λ x y → ℜ₁₂' (p₁ x) (p₂ y)) type = ∀ {x y} → ℜ₁₂ x y → ℜ₁₂' (p₁ x) (p₂ y) method : ⦃ _ : class ⦄ → type method = Hmap.method ℜ₁₂ (λ x y → ℜ₁₂' (p₁ x) (p₂ y)) _ _ module _ {𝔵₁ 𝔯₁ 𝔵₂ 𝔯₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} {_∼₁_ : 𝔛₁ → 𝔛₁ → Ø 𝔯₁} (_∼₂_ : 𝔛₂ → 𝔛₂ → Ø 𝔯₂) (μ₁ μ₂ : Surjection.type 𝔛₁ 𝔛₂) where open Smap _∼₁_ _∼₂_ μ₁ μ₂ smap⟦_/_/_⟧ : ⦃ _ : class ⦄ → type smap⟦_/_/_⟧ = smap module ≡-Smap {𝔵₁ 𝔯₁ 𝔵₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (∼₁ : 𝔛₁ → 𝔛₁ → Ø 𝔯₁) (μ₁ μ₂ : Surjection.type 𝔛₁ 𝔛₂) = Smap ∼₁ _≡_ μ₁ μ₂ module _ {𝔵₁ 𝔯₁ 𝔵₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} {_∼₁_ : 𝔛₁ → 𝔛₁ → Ø 𝔯₁} (μ₁ μ₂ : Surjection.type 𝔛₁ 𝔛₂) where open Smap _∼₁_ _≡_ μ₁ μ₂ ≡-smap⟦_⟧ : ⦃ _ : class ⦄ → type ≡-smap⟦_⟧ = smap module Smap! {𝔵₁ 𝔯₁ 𝔵₂ 𝔯₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (∼₁ : 𝔛₁ → 𝔛₁ → Ø 𝔯₁) (∼₂ : 𝔛₂ → 𝔛₂ → Ø 𝔯₂) ⦃ _ : Surjection.class 𝔛₁ 𝔛₂ ⦄ = Smap ∼₁ ∼₂ surjection surjection module Smaparrow {𝔵₁ 𝔵₂ 𝔯 𝔭₁ 𝔭₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (ℜ : 𝔛₁ → 𝔛₁ → Ø 𝔯) (𝔓₁ : 𝔛₂ → Ø 𝔭₁) (𝔓₂ : 𝔛₂ → Ø 𝔭₂) (surjection₁ surjection₂ : Surjection.type 𝔛₁ 𝔛₂) = Smap ℜ (Arrow 𝔓₁ 𝔓₂) surjection₁ surjection₂ module _ {𝔵₁ 𝔯 𝔭₁ 𝔭₂} {𝔛₁ : Ø 𝔵₁} {ℜ : 𝔛₁ → 𝔛₁ → Ø 𝔯} {𝔓₁ : 𝔛₁ → Ø 𝔭₁} {𝔓₂ : 𝔛₁ → Ø 𝔭₂} where smaparrow = Smaparrow.method ℜ 𝔓₁ 𝔓₂ ¡ ¡ infixr 10 _◃_ _◃_ = smaparrow smaparrow[]syntax = _◃_ syntax smaparrow[]syntax 𝔛₂ x∼y fx = x∼y ◃[ 𝔛₂ ] fx module Smaparrow! {𝔵₁ 𝔵₂ 𝔯 𝔭₁ 𝔭₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (ℜ : 𝔛₁ → 𝔛₁ → Ø 𝔯) (𝔓₁ : 𝔛₂ → Ø 𝔭₁) (𝔓₂ : 𝔛₂ → Ø 𝔭₂) ⦃ _ : Surjection.class 𝔛₁ 𝔛₂ ⦄ = Smaparrow ℜ 𝔓₁ 𝔓₂ surjection surjection module Smaphomarrow {𝔵₁ 𝔯₁ 𝔵₂ 𝔯₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (ℜ : 𝔛₁ → 𝔛₁ → Ø 𝔯₁) (𝔓 : 𝔛₂ → Ø 𝔯₂) (surjection : Surjection.type 𝔛₁ 𝔛₂) = Smaparrow ℜ 𝔓 𝔓 surjection surjection module Smaphomarrow! {𝔵₁ 𝔯₁ 𝔵₂ 𝔯₂} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (ℜ : 𝔛₁ → 𝔛₁ → Ø 𝔯₁) (𝔓 : 𝔛₂ → Ø 𝔯₂) ⦃ _ : Surjection.class 𝔛₁ 𝔛₂ ⦄ = Smaphomarrow ℜ 𝔓 surjection
regtests/swagger-tests.adb
jquorning/swagger-ada
17
20712
----------------------------------------------------------------------- -- swagger-tests -- Unit tests for REST clients -- Copyright (C) 2018, 2020, 2021 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Log.Loggers; with Util.Test_Caller; with Swagger.Clients; with Ada.Text_IO; with TestAPI.Models; package body Swagger.Tests is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Swagger.Tests"); package Caller is new Util.Test_Caller (Test, "Swagger.Tests"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test unauthorized access", Test_Unauthorized'Access); Caller.Add_Test (Suite, "Test authorized access", Test_Authorized'Access); end Add_Tests; overriding procedure Set_Up (T : in out Test) is begin T.Server := To_UString (Util.Tests.Get_Parameter ("testapi.url")); end Set_Up; procedure Configure (T : in out Test; Client : in out TestAPI.Clients.Client_Type) is begin Client.Set_Server (To_String (T.Server)); Client.Set_Server (Util.Tests.Get_Parameter ("testapi.url")); end Configure; procedure Authenticate (T : in out Test; Cred : in out Swagger.Credentials.OAuth.OAuth2_Credential_Type) is Username : constant String := Util.Tests.Get_Parameter ("testapi.username"); Password : constant String := Util.Tests.Get_Parameter ("<PASSWORD>"); Client_Id : constant String := Util.Tests.Get_Parameter ("testapi.client_id"); Client_Sec : constant String := Util.Tests.Get_Parameter ("testapi.client_secret"); begin Cred.Set_Application_Identifier (Client_Id); Cred.Set_Application_Secret (Client_Sec); Cred.Set_Provider_URI (To_String (T.Server) & "/oauth/token"); Cred.Request_Token (Username, Password, "<PASSWORD>"); end Authenticate; -- ------------------------------ -- Test unauthorized operations. -- ------------------------------ procedure Test_Unauthorized (T : in out Test) is Client : TestAPI.Clients.Client_Type; Empty : Nullable_UString; begin T.Configure (Client); Client.Do_Create_Ticket (To_UString ("test"), Empty, Empty, Empty); T.Fail ("No authorization error exception was raised"); exception when Swagger.Clients.Authorization_Error => null; end Test_Unauthorized; -- ------------------------------ -- Test authorized operations. -- ------------------------------ procedure Test_Authorized (T : in out Test) is Client : TestAPI.Clients.Client_Type; Empty : Nullable_UString; Cred : aliased Swagger.Credentials.OAuth.OAuth2_Credential_Type; List : TestAPI.Models.Ticket_Type_Vectors.Vector; Count : Natural; T2 : TestAPI.Models.Ticket_Type; begin T.Configure (Client); T.Authenticate (Cred); Client.Set_Credentials (Cred'Unchecked_Access); Client.Do_Create_Ticket (To_UString ("test"), Empty, Empty, Empty); Util.Tests.Assert_Equals (T, 201, Client.Get_Status, "Invalid response status"); Ada.Text_IO.Put_Line (Client.Get_Header ("Location")); Client.Do_List_Tickets (Empty, Empty, List); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); Client.Do_Head_Ticket; Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); for Ticket of List loop Log.Info ("Ticket {0} - {1}", To_String (Ticket.Title), To_String (Ticket.Status)); Client.Do_Patch_Ticket (Tid => Ticket.Id, Owner => Ticket.Owner, Status => (Is_Null => False, Value => To_UString ("assigned")), Title => (Is_Null => True, Value => <>), Description => (Is_Null => False, Value => To_UString ("patch")), Result => Ticket); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); Client.Do_Update_Ticket (Tid => Ticket.Id, Owner => Ticket.Owner, Status => (Is_Null => False, Value => To_UString ("closed")), Title => (Is_Null => True, Value => <>), Description => (Is_Null => False, Value => To_UString ("ok")), Result => Ticket); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); Util.Tests.Assert_Equals (T, "closed", To_String (Ticket.Status), "Invalid status after Update_Ticket"); Util.Tests.Assert_Equals (T, "ok", To_String (Ticket.Description), "Invalid description after Update_Ticket"); Client.Do_Get_Ticket (Tid => Ticket.Id, Result => T2); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); Client.Do_Options_Ticket (Tid => Ticket.Id, Result => T2); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); end loop; Count := Natural (List.Length); Log.Info ("Number of tickets{0}", Natural'Image (Count)); Client.Do_List_Tickets (Empty, Empty, List); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); Count := Natural (List.Length); Log.Info ("Number of tickets{0}", Natural'Image (Count)); -- Delete each ticket, doing a DELETE operation. for Ticket of List loop Client.Do_Delete_Ticket (Tid => Ticket.Id); Util.Tests.Assert_Equals (T, 204, Client.Get_Status, "Invalid response status"); end loop; Client.Do_List_Tickets (Empty, Empty, List); Util.Tests.Assert_Equals (T, 200, Client.Get_Status, "Invalid response status"); Count := Natural (List.Length); Util.Tests.Assert_Equals (T, 0, Count, "The ticket list was not cleared"); end Test_Authorized; end Swagger.Tests;
demo/adainclude/s-mufalo.ads
e3l6/SSMDev
1
10397
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . M U L T I P R O C E S S O R S . F A I R _ L O C K S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2010, AdaCore -- -- -- -- GNARL 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. GNARL 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. -- -- -- -- -- -- -- -- -- -- -- -- 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/>. -- -- -- ------------------------------------------------------------------------------ with System.Multiprocessors.Spin_Locks; package System.Multiprocessors.Fair_Locks is pragma Preelaborate; -- The locks implemented in this package are fair among CPUs and must not -- be used to synchronize tasks assigned to the same CPU. --------------- -- Fair lock -- --------------- type Spinning_Array is array (CPU) of Boolean; pragma Volatile_Components (Spinning_Array); type Fair_Lock is limited record Spinning : Spinning_Array := (others => False); Lock : Spin_Locks.Spin_Lock; end record; procedure Initialize (Flock : in out Fair_Lock); pragma Inline (Initialize); -- Initialize the lock procedure Lock (Flock : in out Fair_Lock); pragma Inline (Lock); -- Loop until lock is acquired function Locked (Flock : Fair_Lock) return Boolean; pragma Inline (Locked); -- Return the current state of the lock procedure Try_Lock (Flock : in out Fair_Lock; Succeeded : out Boolean); pragma Inline (Try_Lock); -- Return True if the lock has been acquired, otherwise don't wait for the -- lock and return False. procedure Unlock (Flock : in out Fair_Lock); pragma Inline (Unlock); -- Release the lock and wake up the next waiting CPU (if any) end System.Multiprocessors.Fair_Locks;
alloy4fun_models/trainstlt/models/4/ANb4ZD43cDiybhs7G.als
Kaixi26/org.alloytools.alloy
0
4686
open main pred idANb4ZD43cDiybhs7G_prop5 { all t:Train { t.pos in Exit => Train' = Train - t t.pos in (Track - Exit) => { one tk:((t.pos).prox) | t.pos' = tk } } } pred __repair { idANb4ZD43cDiybhs7G_prop5 } check __repair { idANb4ZD43cDiybhs7G_prop5 <=> prop5o }
oeis/026/A026676.asm
neoneye/loda-programs
11
86556
; A026676: a(n) = T(n, floor(n/2)), T given by A026670. ; Submitted by <NAME>(w1) ; 1,1,3,4,11,16,43,65,173,267,707,1105,2917,4597,12111,19196,50503,80380,211263,337284,885831,1417582,3720995,5965622,15652239,25130844,65913927,105954110,277822147,447015744,1171853635,1886996681,4945846997,7969339643,20884526283,33670068133,88224662549,142301618265,372827899079,601586916703,1576001732485,2543852427847,6663706588179,10759094481491,28181895551161,45513214057191,119208323665543,192560373660245,504329070986033,814807864164497,2133944799315027,3448219788064105,9030384375443237 mov $3,$0 div $0,2 lpb $0 mov $2,$3 bin $2,$0 sub $0,1 add $1,$2 cmp $2,$1 sub $3,$2 add $3,1 lpe mov $0,$1 add $0,1
ErrorHandler.asm
DevEd2/HokeyPokey-GB
0
84943
; ================================================================ ; Error handler ; TO USE: Include this file anywhere in the Home bank then ; add a call to ErrorHandler to RST_38 ; ================================================================ ErrorHandler: push af xor a ld [DoHiColor],a ldh [rSCY],a ldh [rSCX],a pop af ; store stack pointer inc sp inc sp ld [tempSP],sp push hl push af ; store AF pop hl ld a,h ldh [tempAF],a ld a,l ldh [tempAF+1],a ; store BC ld a,b ldh [tempBC],a ld a,c ldh [tempBC+1],a ; store DE ld a,d ldh [tempDE],a ld a,e ldh [tempDE+1],a ; store HL pop hl ld a,h ldh [tempHL],a ld a,l ldh [tempHL+1],a ; store PC pop hl ; hl = old program counter ld a,h ldh [tempPC],a ld a,l ldh [tempPC+1],a ; store IF ldh a,[rIF] ldh [tempIF],a ; store IE ldh a,[rIE] ldh [tempIE],a ldh a,[rLCDC] and a jr z,.nowait ; if lcd is already disabled, jump .wait ; wait for VBlank before disabling the LCD ldh a,[rLY] cp $90 jr nz,.wait ; Note that it probably isn't a good idea to use halt to wait for VBlank ; because interrupts may not be enabled when an error occurs. xor a ldh [rLCDC],a ; disable LCD .nowait call ClearVRAM ; ld a,Bank(DebugFont) ; ldh [ROMBank],a ; ld [rROMB0],a xor a ld hl,Pal_Grayscale call LoadBGPalLine CopyTileset1BPP DebugFont,0,97 ld hl,ErrorHandlerTilemap call LoadScreenText call ClearAttribute DrawRegisterValues: ld de,tempAF ld hl,$9965 ld a,[de] inc de call DrawHex ld a,[de] inc de call DrawHex ld hl,$996f ld a,[de] inc de call DrawHex ld a,[de] inc de call DrawHex ld hl,$9985 ld a,[de] inc de call DrawHex ld a,[de] inc de call DrawHex ld hl,$998f ld a,[de] inc de call DrawHex ld a,[de] inc de call DrawHex inc de inc de ld hl,$99af ld a,[de] inc de call DrawHex ld a,[de] inc de call DrawHex ld hl,$99a5 ld a,[tempSP+1] call DrawHex ld a,[tempSP] call DrawHex ld a,[rIF] ld b,a ld hl,$99c8 call DrawBin ld a,[rIE] ld b,a ld hl,$99e8 call DrawBin ld a,%10010001 ldh [rLCDC],a ; call DS_Stop ErrorHandler_loop: halt jr ErrorHandler_loop DrawBin: bit 7,b call nz,.draw1 call z,.draw0 bit 6,b call nz,.draw1 call z,.draw0 bit 5,b call nz,.draw1 call z,.draw0 bit 4,b call nz,.draw1 call z,.draw0 bit 3,b call nz,.draw1 call z,.draw0 bit 2,b call nz,.draw1 call z,.draw0 bit 1,b call nz,.draw1 call z,.draw0 bit 0,b call nz,.draw1 ret nz .draw0 ld a,"0" - 32 ld [hl+],a ret .draw1 ld a,"1" - 32 ld [hl+],a ret ErrorHandlerTilemap: ; #################### db " - ERROR - " db " " db "An error has occured" db "and the game cannot " db "continue. Contact " db "the following email " db "address to report " db "this error: " db " <EMAIL> " db " " db "Registers: " db " AF=$???? BC=$???? " db " DE=$???? HL=$???? " db " SP=$???? PC=$???? " db " IF=%XXXXXXXX " db " IE=%XXXXXXXX " db " " db "Turn the power off. " ; #################### DebugFont: incbin "GFX/Font.bin"
programs/oeis/153/A153797.asm
karttu/loda
1
85625
; A153797: 7 times octagonal numbers: a(n) = 7*n*(3*n-2). ; 0,7,56,147,280,455,672,931,1232,1575,1960,2387,2856,3367,3920,4515,5152,5831,6552,7315,8120,8967,9856,10787,11760,12775,13832,14931,16072,17255,18480,19747,21056,22407,23800,25235,26712,28231,29792,31395,33040,34727,36456,38227,40040,41895,43792,45731,47712,49735,51800,53907,56056,58247,60480,62755,65072,67431,69832,72275,74760,77287,79856,82467,85120,87815,90552,93331,96152,99015,101920,104867,107856,110887,113960,117075,120232,123431,126672,129955,133280,136647,140056,143507,147000,150535,154112,157731,161392,165095,168840,172627,176456,180327,184240,188195,192192,196231,200312,204435,208600,212807,217056,221347,225680,230055,234472,238931,243432,247975,252560,257187,261856,266567,271320,276115,280952,285831,290752,295715,300720,305767,310856,315987,321160,326375,331632,336931,342272,347655,353080,358547,364056,369607,375200,380835,386512,392231,397992,403795,409640,415527,421456,427427,433440,439495,445592,451731,457912,464135,470400,476707,483056,489447,495880,502355,508872,515431,522032,528675,535360,542087,548856,555667,562520,569415,576352,583331,590352,597415,604520,611667,618856,626087,633360,640675,648032,655431,662872,670355,677880,685447,693056,700707,708400,716135,723912,731731,739592,747495,755440,763427,771456,779527,787640,795795,803992,812231,820512,828835,837200,845607,854056,862547,871080,879655,888272,896931,905632,914375,923160,931987,940856,949767,958720,967715,976752,985831,994952,1004115,1013320,1022567,1031856,1041187,1050560,1059975,1069432,1078931,1088472,1098055,1107680,1117347,1127056,1136807,1146600,1156435,1166312,1176231,1186192,1196195,1206240,1216327,1226456,1236627,1246840,1257095,1267392,1277731,1288112,1298535 mov $1,$0 mul $0,21 sub $0,14 mul $1,$0
data/radio/oaks_pkmn_talk_routes.asm
Dev727/ancientplatinum
28
179072
; Oak's Pokémon Talk will list wild Pokémon on these maps. OaksPKMNTalkRoutes: map_id ROUTE_29 map_id ROUTE_46 map_id ROUTE_30 map_id ROUTE_32 map_id ROUTE_34 map_id ROUTE_35 map_id ROUTE_37 map_id ROUTE_38 map_id ROUTE_39 map_id ROUTE_42 map_id ROUTE_43 map_id ROUTE_44 map_id ROUTE_45 map_id ROUTE_36 map_id ROUTE_31 .End
src/toml-generic_dump.ads
pmderodat/ada-toml
19
11927
generic type Output_Stream (<>) is limited private; -- Stream of bytes with procedure Put (Stream : in out Output_Stream; Bytes : String) is <>; -- Write all Bytes in Stream procedure TOML.Generic_Dump (Stream : in out Output_Stream; Value : TOML_Value) with Preelaborate, Pre => Value.Kind = TOML_Table; -- Turn the given Value into a valid TOML document and write it to Stream
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1875.asm
ljhsiun2/medusa
9
3970
<reponame>ljhsiun2/medusa<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r15 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x19d63, %rsi lea addresses_UC_ht+0x7d63, %rdi clflush (%rdi) cmp %r12, %r12 mov $118, %rcx rep movsq add $47234, %rsi lea addresses_A_ht+0x13a03, %rsi lea addresses_WC_ht+0xbef9, %rdi nop nop nop nop and %rax, %rax mov $11, %rcx rep movsw nop add %rsi, %rsi lea addresses_A_ht+0xd63, %rsi lea addresses_UC_ht+0xa07, %rdi nop cmp $5980, %r15 mov $17, %rcx rep movsw nop nop sub %rcx, %rcx lea addresses_WT_ht+0xae4a, %rsi lea addresses_A_ht+0x73e3, %rdi clflush (%rdi) nop nop nop nop nop add $23607, %rax mov $11, %rcx rep movsq sub %r15, %r15 lea addresses_UC_ht+0x10db3, %r15 and %r8, %r8 movw $0x6162, (%r15) nop nop nop nop nop xor %r12, %r12 lea addresses_A_ht+0x10663, %rsi lea addresses_WC_ht+0xbaa3, %rdi nop nop nop nop nop and %r14, %r14 mov $91, %rcx rep movsl nop nop nop add $62571, %r15 lea addresses_UC_ht+0x1c9e3, %rsi lea addresses_WT_ht+0xd763, %rdi nop nop nop sub %r15, %r15 mov $14, %rcx rep movsq nop nop nop cmp %rdi, %rdi lea addresses_D_ht+0x9863, %r8 and $21539, %rcx vmovups (%r8), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %r15 nop nop nop nop xor $56271, %rax lea addresses_normal_ht+0x18543, %rsi lea addresses_WC_ht+0x489e, %rdi nop nop nop sub %r14, %r14 mov $104, %rcx rep movsl nop nop nop cmp $55279, %r8 lea addresses_WC_ht+0x18563, %rcx nop nop cmp %rsi, %rsi mov $0x6162636465666768, %r12 movq %r12, (%rcx) nop nop nop nop add %r15, %r15 lea addresses_UC_ht+0x11063, %rsi lea addresses_UC_ht+0x1dec3, %rdi nop nop nop nop sub %r15, %r15 mov $127, %rcx rep movsl cmp $8781, %rdi lea addresses_WC_ht+0x19cc3, %rsi lea addresses_D_ht+0x1c163, %rdi nop nop nop nop nop xor %r12, %r12 mov $105, %rcx rep movsl nop nop nop nop nop xor %r8, %r8 lea addresses_normal_ht+0x1d503, %r14 nop nop nop nop nop add %r12, %r12 movw $0x6162, (%r14) lfence pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r8 push %r9 push %rcx push %rdi // Store mov $0x1c0cef0000000733, %r14 xor $53131, %r9 mov $0x5152535455565758, %r8 movq %r8, %xmm5 vmovups %ymm5, (%r14) nop nop nop nop nop and %r14, %r14 // Faulty Load lea addresses_RW+0x1c963, %rdi nop nop nop nop nop sub $43675, %r9 movb (%rdi), %r8b lea oracles, %rdi and $0xff, %r8 shlq $12, %r8 mov (%rdi,%r8,1), %r8 pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': True, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 7, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
tools/verdict-back-ends/verdict-bundle/verdict-lustre-translator/src/main/antlr4/com/ge/verdict/lustre/Lustre.g4
Syrupz-UO/VERDICT
22
622
grammar Lustre; program : (include | typeDecl | constDecl | node | contractNode | importedNode)* EOF ; include returns [java.io.File includeFile, com.ge.verdict.lustre.LustreParser.ProgramContext includeProgramContext] : 'include' STRING ';'? ; typeDecl : 'type' oneTypeDecl+ ; oneTypeDecl : ID ';' | ID '=' type ';' ; type returns [verdict.vdm.vdm_data.DataType dataType] : 'int' # intType | 'subrange' '[' bound ',' bound ']' 'of' 'int' # subrangeType | 'bool' # boolType | 'real' # realType | type '^' expr # arrayType | type '[' expr ']' # arrayType | '[' type (',' type)* ']' # tupleType | 'struct'? '{' field (';' field)* ';'? '}' # recordType | 'enum' '{' ID (',' ID)* '}' # enumType | identifier # userType ; bound : '-'? INT | ID ; expr returns [verdict.vdm.vdm_lustre.Expression expression] : BOOL # boolExpr | INT # intExpr | REAL # realExpr | identifier # idExpr | op = 'not' expr # unaryExpr | op = ('-' | 'pre' | 'current') expr # unaryExpr | op = ('int' | 'real') expr # castExpr | expr op = 'when' expr # binaryExpr | expr op = ('->' | 'fby') expr # binaryExpr | expr op = 'and' expr # binaryExpr | expr op = ('or' | 'xor') expr # binaryExpr | < assoc = right > expr op = '=>' expr # binaryExpr | expr op = ('<' | '<=' | '=' | '>=' | '>' | '<>') expr # binaryExpr | expr op = ('*' | '/' | '%' | 'div' | 'mod') expr # binaryExpr | expr op = ('+' | '-') expr # binaryExpr | 'if' expr 'then' expr 'else' expr # ifThenElseExpr | op = ('#' | 'nor') '(' expr (',' expr)* ')' # naryExpr | userOp '(' (expr (',' expr)*)? ')' # callExpr | '[' expr (',' expr)* ']' # arrayExpr | expr op = '^' expr # binaryExpr | expr op = '|' expr # binaryExpr | array = expr '[' selector = expr ('..' trancheEnd = expr ('step' sliceStep = expr)?)? ']' # arraySelectionExpr | expr '.' ID # recordProjectionExpr | ID '{' fieldExpr (';' fieldExpr)* '}' # recordExpr | '(' expr (',' expr)* ')' # listExpr | '{' expr (',' expr)* '}' # tupleExpr | 'merge' ID mergeCase+ # mergeExpr ; identifier : ID | ID? '::' ID ; userOp : (identifier | '*' | '/' | 'div' | 'mod' | '+' | '-' | '<' | '<=' | '>' | '>=' | '=' | '<>' | '|' | 'and' | 'or' | 'xor' | 'if') | iterator = ('map' | 'red' | 'fill' | 'fillred' | 'boolred') '<<' userOp (',' | ';') expr '>>' ; fieldExpr returns [verdict.vdm.vdm_lustre.FieldDefinition fieldDefinition] : ID '=' expr ; mergeCase : '(' (identifier | BOOL) '->' expr ')' ; field : ID (',' ID)* ':' type ; constDecl : 'const' oneConstDecl+ ; oneConstDecl : ID (',' ID)* (':' type)? ';' | ID (':' type)? '=' expr ';' ; node : 'unsafe'? 'extern'? nodeType = ('node' | 'function') ID staticParams? '(' input = paramList? ';'? ')' 'returns' '(' output = paramList? ')' ';'? inlineContract? importedContract* nodeBody? ; staticParams : '<<' staticParam (';' staticParam)? '>>' ; staticParam : 'type' ID | 'const' ID ':' type | 'unsafe'? ('node' | 'function') ID '(' paramList? ';'? ')' 'returns' '(' paramList? ')' ; paramList returns [java.util.List<verdict.vdm.vdm_lustre.NodeParameter> nodeParameters] : paramGroup (';' paramGroup)* ; paramGroup returns [java.util.List<verdict.vdm.vdm_lustre.NodeParameter> nodeParameters] : isConst = 'const'? ID (',' ID)* (':' type declaredClock?)? ; declaredClock : 'when' clockExpr ; clockExpr : identifier '(' ID ')' | ID | 'not' ID | 'not' '(' ID ')' ; inlineContract returns [verdict.vdm.vdm_lustre.ContractSpec spec] : '(*' '@' 'contract' (symbol | assume | guarantee | contractMode | contractImport)* '*)' ; symbol returns [verdict.vdm.vdm_lustre.SymbolDefinition def] : keyword = ('const' | 'var') ID (':' type)? '=' expr ';' ; assume returns [verdict.vdm.vdm_lustre.ContractItem item] : 'assume' expr ';' ; guarantee returns [verdict.vdm.vdm_lustre.ContractItem item] : 'guarantee' STRING? expr ';' ; contractMode returns [verdict.vdm.vdm_lustre.ContractMode mode] : 'mode' ID '(' ('require' require += expr ';')* ('ensure' ensure += expr ';')* ')' ';' ; contractImport returns [verdict.vdm.vdm_lustre.ContractImport imprt] : 'import' ID '(' (inputArg += expr)? (',' inputArg += expr)* ')' 'returns' '(' (outputArg += expr)? (',' outputArg += expr)* ')' ';' ; importedContract returns [verdict.vdm.vdm_lustre.ContractImport imprt] : '(*' '@' 'contract' 'import' ID '(' (inputArg += expr)? (',' inputArg += expr)* ')' 'returns' '(' (outputArg += expr)? (',' outputArg += expr)* ')' ';'? '*)' ; nodeBody returns [verdict.vdm.vdm_lustre.NodeBody body] : localDecl* 'let' definition* 'tel' ';'? ; localDecl returns [java.util.List<verdict.vdm.vdm_lustre.VariableDeclaration> variableDeclarations, java.util.List<verdict.vdm.vdm_lustre.ConstantDeclaration> constantDeclarations] : 'var' localVarDeclList+ | 'const' localConstDecl+ ; localVarDeclList returns [java.util.List<verdict.vdm.vdm_lustre.VariableDeclaration> variableDeclarations] : ID (',' ID)* (':' type declaredClock?)? ';' ; localConstDecl returns [verdict.vdm.vdm_lustre.ConstantDeclaration constantDeclaration] : ID (':' type)? '=' expr ';' ; importedNode : nodeType = ('node' | 'function') 'imported' ID '(' input = paramList? ')' 'returns' '(' output = paramList? ')' ';' inlineContract? ; contractNode : 'contract' ID '(' input = paramList? ')' 'returns' '(' output = paramList? ')' ';' contractSpec ; contractSpec returns [verdict.vdm.vdm_lustre.ContractSpec spec] : 'let' (symbol | assume | guarantee | contractMode | contractImport)* 'tel' ';'? ; definition : (equation | assertion | property | main | realizabilityInputs | ivc) ; equation returns [verdict.vdm.vdm_lustre.NodeEquation equa] : ('(' leftList ')' | leftList) '=' expr ';' ; leftList returns [verdict.vdm.vdm_lustre.NodeEquationLHS lhs] : left (',' left)* ; assertion : 'assert' expr ';' ; left : identifier | left '.' ID | left '[' expr ('..' expr)? ']' ; property returns [verdict.vdm.vdm_lustre.NodeProperty prop] : '--%PROPERTY' STRING? expr ';' | '--%PROPERTY' STRING? equation ';' ; main : '--%MAIN' ';'? ; realizabilityInputs : '--%REALIZABLE' (ID (',' ID)*)? ';' ; ivc : '--%IVC' (ID (',' ID)*)? ';' ; STRING : '"' ('\\\\' | '\\"' | ~ [\\"])* '"' ; REAL : INT '.' INT? Exponent? | INT Exponent ; fragment Exponent : 'E' ('+' | '-')? INT ; BOOL : 'true' | 'false' ; INT : [0-9]+ ; ID : [a-zA-Z_] [a-zA-Z_0-9]* ; WS : [ \t\n\r\f]+ -> skip ; SL_COMMENT : '--' (~ [%\n\r] ~ [\n\r]* | /* empty */) ('\r'? '\n')? -> channel(HIDDEN) ; ML_COMMENT : '(*' (~ '@' .*? | /* empty */) '*)' -> channel(HIDDEN) ; ML_COMMENT2 : '/*' .*? '*/' -> channel(HIDDEN) ; ERROR : . ;
Lab 2 Inputting/Lab2-2.X/main.asm
johannesunana/Microprocessor-Lab
0
7962
<reponame>johannesunana/Microprocessor-Lab #include "p16f84a.inc" ; CONFIG ; __config 0x3FFA __CONFIG _FOSC_HS & _WDTE_OFF & _PWRTE_OFF & _CP_OFF cblock 0x0C DELAY1 DELAY2 endc org 0x00 start bsf STATUS, RP0 bsf TRISA, TRISA0 clrw movlw 0x00 andwf TRISB bcf STATUS, RP0 andwf PORTB pattern1 clrw movlw 0x55 ;0b'0101 0101' movwf PORTB loop1 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 rrf PORTB, f ;move bits to the right btfsc PORTA, RA0 goto loop1 goto pattern2 pattern2 clrw movlw 0x01 ;0b'0000 0001' movwf PORTB loop2 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 rlf PORTB, f ;move bits to the left call delay btfsc PORTA, RA0 goto loop2 goto pattern3 pattern3 clrw movlw 0xF0 ;0b'1111 0000' movwf PORTB loop3 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 comf PORTB, f ;complement PORTB btfsc PORTA, RA0 goto loop3 goto pattern4 pattern4 clrw movlw 0xCC ;0b'1100 1100' movwf PORTB loop4 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 rrf PORTB, f ;move bits to the right btfsc PORTA, RA0 goto loop4 goto pattern1 delay loop decfsz DELAY1, f goto loop decfsz DELAY2 goto loop return end
hello.asm
YingkunZhou/i386-test
0
96089
%define IMM8 0xff %define IMM16 0xffff %define IMM32 0xffffffff default rel global _start section .text RET0: ret PUSH0: push rax POP0: pop rax ADD0: add rax, 0xffffff REG0: push ax REG1: push rcx REG2: push rdx REG2_: push dx REG3: push rbx REG4: push rsi REG5: push rdi REG6: push rsp REG7: push rbp REG8: push r8 REG9: push r9 REG10: push r10 REG11: push r11 REG12: push r12 REG13: push r13 REG14: push r14 REG15: push r15 REG15_: push r15w REGCS: mov ax, cs REGDS: mov ax, ds REGSS: mov ax, ss REGES: mov ax, es REGFS: mov ax, fs REGGS: mov ax, gs PUSHF_: pushf PUSHFQ_: pushfq FLD0: fld dword [x] MMX0: movq [ebp], mm0 MOV0: mov byte [l1] ,1 MOV1: mov word [l1], 1 MOV2: mov dword [l1], 1 MOV3: mov [l1], eax MOV4: mov [l1], ax MOV5: mov [l1], al MOV6: mov eax, [l1] MOV7: mov ax, [l1] MOV8: mov eax, 12 MOV9: mov ax, 12 MOV10: mov al, 12 MOV11: mov ah, 12 _start: mov rax, 0x2000004 ; system call for write mov rdi, 1 ; file handle 1 is stdout mov rsi, msg ; address the string message mov rdx, msg.len ; number of bytes syscall ; invoke operating system to do the write mov rax, 0x2000001 ; system call for exit mov rdi, 0 ; exit code 0 syscall ; invoke operating system to exit section .data msg: db "Hello World!", 10 ; note the newline at the end .len: equ $ - msg l0: dd 1.5 l1: db 00h, 04Fh, 012h, 0A4h l2: db 00h, 04Fh, 012h, 0A4h
tools/DOSBox-0.74Win/FSysFAT/avt/p1_asm/X1_Begin/P4.asm
cyberitsec/antivirus
1
2224
<reponame>cyberitsec/antivirus<filename>tools/DOSBox-0.74Win/FSysFAT/avt/p1_asm/X1_Begin/P4.asm ;Suma elemente vector in care se evita un salt conditionat (jz...in locul lui a fost pus jnz et1; si jmp final) mai mare de 127 sau -126 bytes .model small .data sum dw ? tab dw 2,7,15,20 .code start: mov ax,@data mov ds,ax xor ax,ax mov cx,4 mov si,ax test cx,cx jnz et1 jmp final et1: add ax,tab[si] add si,2 ;inc si inc si loop et1 mov sum,ax final: mov ax,4c00h int 21h end start
Working Disassembly/sonic3k.constants.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
0
97254
<filename>Working Disassembly/sonic3k.constants.asm ; Equates section - names for variables ; --------------------------------------------------------------------------- ; Object Status Table offsets ; --------------------------------------------------------------------------- ; universally followed object conventions: render_flags = 4 ; bitfield ; refer to SCHG for details height_pixels = 6 ; byte width_pixels = 7 ; byte priority = 8 ; word ; in units of $80 art_tile = $A ; word ; PCCVH AAAAAAAAAAA ; P = priority, CC = palette line, V = y-flip; H = x-flip, A = starting cell index of art mappings = $C ; long x_pos = $10 ; word, or long when extra precision is required y_pos = $14 ; word, or long when extra precision is required mapping_frame = $22 ; byte ; --------------------------------------------------------------------------- ; conventions followed by most objects: routine = 5 ; byte x_vel = $18 ; word y_vel = $1A ; word y_radius = $1E ; byte ; collision height / 2 x_radius = $1F ; byte ; collision width / 2 anim = $20 ; byte prev_anim = $21 ; byte ; when this isn't equal to anim the animation restarts anim_frame = $23 ; byte anim_frame_timer = $24 ; byte angle = $26 ; byte ; angle about axis into plane of the screen (00 = vertical, 360 degrees = 256) status = $2A ; bitfield ; refer to SCHG for details ; --------------------------------------------------------------------------- ; conventions followed by many objects but not Sonic/Tails/Knuckles: x_pixel = x_pos ; word ; x-coordinate for objects using screen positioning y_pixel = y_pos ; word ; y-coordinate for objects using screen positioning collision_flags = $28 ; byte ; TT SSSSSS ; TT = collision type, SSSSSS = size collision_property = $29 ; byte ; usage varies, bosses use it as a hit counter shield_reaction = $2B ; byte ; bit 3 = bounces off shield, bit 4 = negated by fire shield, bit 5 = negated by lightning shield, bit 6 = negated by bubble shield subtype = $2C ; byte ros_bit = $3B ; byte ; the bit to be cleared when an object is destroyed if the ROS flag is set ros_addr = $3C ; word ; the RAM address whose bit to clear when an object is destroyed if the ROS flag is set routine_secondary = $3C ; byte ; used by monitors for this purpose at least vram_art = $40 ; word ; address of art in VRAM (same as art_tile * $20) parent = $42 ; word ; address of the object that owns or spawned this one, if applicable child_dx = $42 ; byte ; X offset of child relative to parent child_dy = $43 ; byte ; Y offset of child relative to parent parent3 = $46 ; word ; parent of child objects parent2 = $48 ; word ; several objects use this instead respawn_addr = $48 ; word ; the address of this object's entry in the respawn table ; --------------------------------------------------------------------------- ; conventions specific to Sonic/Tails/Knuckles: ground_vel = $1C ; word ; overall velocity along ground, not updated when in the air double_jump_property = $25 ; byte ; remaining frames of flight / 2 for Tails, gliding-related for Knuckles flip_angle = $27 ; byte ; angle about horizontal axis (360 degrees = 256) status_secondary = $2B ; byte ; see SCHG for details air_left = $2C ; byte flip_type = $2D ; byte ; bit 7 set means flipping is inverted, lower bits control flipping type object_control = $2E ; byte ; bit 0 set means character can jump out, bit 7 set means he can't double_jump_flag = $2F ; byte ; meaning depends on current character, see SCHG for details flips_remaining = $30 ; byte flip_speed = $31 ; byte move_lock = $32 ; word ; horizontal control lock, counts down to 0 invulnerability_timer = $34 ; byte ; decremented every frame invincibility_timer = $35 ; byte ; decremented every 8 frames speed_shoes_timer = $36 ; byte ; decremented every 8 frames status_tertiary = $37 ; byte ; see SCHG for details character_id = $38 ; byte ; 0 for Sonic, 1 for Tails, 2 for Knuckles scroll_delay_counter = $39 ; byte ; incremented each frame the character is looking up/down, camera starts scrolling when this reaches 120 next_tilt = $3A ; byte ; angle on ground in front of character tilt = $3B ; byte ; angle on ground stick_to_convex = $3C ; byte ; used to make character stick to convex surfaces such as the rotating discs in CNZ spin_dash_flag = $3D ; byte ; bit 1 indicates spin dash, bit 7 indicates forced roll spin_dash_counter = $3E ; word jumping = $40 ; byte interact = $42 ; word ; RAM address of the last object the character stood on default_y_radius = $44 ; byte ; default value of y_radius default_x_radius = $45 ; byte ; default value of x_radius top_solid_bit = $46 ; byte ; the bit to check for top solidity (either $C or $E) lrb_solid_bit = $47 ; byte ; the bit to check for left/right/bottom solidity (either $D or $F) ; --------------------------------------------------------------------------- ; conventions followed by some/most bosses: boss_hitcount2 = $29 ; --------------------------------------------------------------------------- ; when childsprites are activated (i.e. bit #6 of render_flags set) mainspr_childsprites = $16 ; amount of child sprites sub2_x_pos = $18 ;x_vel sub2_y_pos = $1A ;y_vel sub2_mapframe = $1D sub3_x_pos = $1E ;y_radius sub3_y_pos = $20 ;anim sub3_mapframe = $23 ;anim_frame sub4_x_pos = $24 ;anim_frame_timer sub4_y_pos = $26 ;angle sub4_mapframe = $29 ;collision_property sub5_x_pos = $2A ;status sub5_y_pos = $2C ;subtype sub5_mapframe = $2F sub6_x_pos = $30 sub6_y_pos = $32 sub6_mapframe = $35 sub7_x_pos = $36 sub7_y_pos = $38 sub7_mapframe = $3B sub8_x_pos = $3C sub8_y_pos = $3E sub8_mapframe = $41 sub9_x_pos = $42 sub9_y_pos = $44 sub9_mapframe = $47 next_subspr = $6 ; --------------------------------------------------------------------------- ; property of all objects: object_size = $4A ; the size of an object's status table entry next_object = object_size ; --------------------------------------------------------------------------- ; unknown or inconsistently used offsets that are not applicable to sonic/tails: objoff_12 = 2+x_pos objoff_16 = 2+y_pos objoff_1C = $1C objoff_1D = $1D objoff_27 = $27 objoff_2E = $2E objoff_2F = $2F objoff_30 = $30 enum objoff_31=$31,objoff_32=$32,objoff_33=$33,objoff_34=$34,objoff_35=$35,objoff_36=$36,objoff_37=$37 enum objoff_38=$38,objoff_39=$39,objoff_3A=$3A,objoff_3B=$3B,objoff_3C=$3C,objoff_3D=$3D,objoff_3E=$3E enum objoff_3F=$3F,objoff_40=$40,objoff_41=$41,objoff_42=$42,objoff_43=$43,objoff_44=$44,objoff_45=$45 enum objoff_46=$46,objoff_47=$47,objoff_48=$48,objoff_49=$49 ; --------------------------------------------------------------------------- ; Bits 3-6 of an object's status after a SolidObject call is a ; bitfield with the following meaning: p1_standing_bit = 3 p2_standing_bit = p1_standing_bit + 1 p1_standing = 1<<p1_standing_bit p2_standing = 1<<p2_standing_bit pushing_bit_delta = 2 p1_pushing_bit = p1_standing_bit + pushing_bit_delta p2_pushing_bit = p1_pushing_bit + 1 p1_pushing = 1<<p1_pushing_bit p2_pushing = 1<<p2_pushing_bit standing_mask = p1_standing|p2_standing pushing_mask = p1_pushing|p2_pushing ; --------------------------------------------------------------------------- ; Controller Buttons ; ; Buttons bit numbers button_up: EQU 0 button_down: EQU 1 button_left: EQU 2 button_right: EQU 3 button_B: EQU 4 button_C: EQU 5 button_A: EQU 6 button_start: EQU 7 ; Buttons masks (1 << x == pow(2, x)) button_up_mask: EQU 1<<button_up ; $01 button_down_mask: EQU 1<<button_down ; $02 button_left_mask: EQU 1<<button_left ; $04 button_right_mask: EQU 1<<button_right ; $08 button_B_mask: EQU 1<<button_B ; $10 button_C_mask: EQU 1<<button_C ; $20 button_A_mask: EQU 1<<button_A ; $40 button_start_mask: EQU 1<<button_start ; $80 ; --------------------------------------------------------------------------- ; Player Status Variables Status_Facing = 0 Status_InAir = 1 Status_Roll = 2 Status_OnObj = 3 Status_RollJump = 4 Status_Push = 5 Status_Underwater = 6 ; --------------------------------------------------------------------------- ; Player status_secondary variables Status_Shield = 0 Status_Invincible = 1 Status_SpeedShoes = 2 Status_FireShield = 4 Status_LtngShield = 5 Status_BublShield = 6 ; --------------------------------------------------------------------------- ; Elemental Shield DPLC variables LastLoadedDPLC = $34 Art_Address = $38 DPLC_Address = $3C ; --------------------------------------------------------------------------- ; Address equates ; --------------------------------------------------------------------------- ; Z80 addresses Z80_RAM = $A00000 ; start of Z80 RAM Z80_RAM_end = $A02000 ; end of non-reserved Z80 RAM Z80_bus_request = $A11100 Z80_reset = $A11200 SRAM_access_flag = $A130F1 Security_addr = $A14000 ; --------------------------------------------------------------------------- ; I/O Area HW_Version = $A10001 HW_Port_1_Data = $A10003 HW_Port_2_Data = $A10005 HW_Expansion_Data = $A10007 HW_Port_1_Control = $A10009 HW_Port_2_Control = $A1000B HW_Expansion_Control = $A1000D HW_Port_1_TxData = $A1000F HW_Port_1_RxData = $A10011 HW_Port_1_SCtrl = $A10013 HW_Port_2_TxData = $A10015 HW_Port_2_RxData = $A10017 HW_Port_2_SCtrl = $A10019 HW_Expansion_TxData = $A1001B HW_Expansion_RxData = $A1001D HW_Expansion_SCtrl = $A1001F ; --------------------------------------------------------------------------- ; VDP addresses VDP_data_port = $C00000 VDP_control_port = $C00004 PSG_input = $C00011 ; --------------------------------------------------------------------------- ; sign-extends a 32-bit integer to 64-bit ; all RAM addresses are run through this function to allow them to work in both 16-bit and 32-bit addressing modes ramaddr function x,(-(x&$80000000)<<1)|x ; RAM addresses RAM_start = ramaddr( $FFFF0000 ) Chunk_table = ramaddr( $FFFF0000 ) ; $8000 bytes ; chunk (128x128) definitions, $80 bytes per definition Sprite_table_buffer_2 = ramaddr( $FF7880 ) ; $280 bytes ; alternate sprite table for player 1 in competition mode Sprite_table_buffer_P2 = ramaddr( $FF7B00 ) ; $280 bytes ; sprite table for player 2 in competition mode Sprite_table_buffer_P2_2 = ramaddr( $FF7D80 ) ; $280 bytes ; alternate sprite table for player 2 in competition mode Level_layout_header = ramaddr( $FFFF8000 ) ; 8 bytes ; first word = chunks per FG row, second word = chunks per BG row, third word = FG rows, fourth word = BG rows Level_layout_main = ramaddr( $FFFF8008 ) ; $40 word-sized line pointers followed by actual layout data Block_table = ramaddr( $FFFF9000 ) ; $1A00 bytes ; block (16x16) definitions, 8 bytes per definition Nem_code_table = ramaddr( $FFFFAA00 ) ; $200 bytes ; code table is built up here and then used during decompression Sprite_table_input = ramaddr( $FFFFAC00 ) ; $400 bytes ; 8 priority levels, $80 bytes per level Object_RAM = ramaddr( $FFFFB000 ) ; $1FCC bytes ; $4A bytes per object, 110 objects Player_1 = ramaddr( $FFFFB000 ) ; main character in 1 player mode, player 1 in Competition mode Player_2 = ramaddr( $FFFFB04A ) ; Tails in a Sonic and Tails game, player 2 in Competition mode Reserved_object_3 = ramaddr( $FFFFB094 ) ; during a level, an object whose sole purpose is to clear the collision response list is stored here Dynamic_object_RAM = ramaddr( $FFFFB0DE ) ; $1A04 bytes ; 90 objects Level_object_RAM = ramaddr( $FFFFCAE2 ) ; $4EA bytes ; various fixed in-level objects Breathing_bubbles = ramaddr( $FFFFCB2C ) ; for the main character Breathing_bubbles_P2 = ramaddr( $FFFFCB76 ) ; for Tails in a Sonic and Tails game Super_stars = ramaddr( $FFFFCBC0 ) ; for Super Sonic and Super Knuckles Hyper_trail = ramaddr( $FFFFCBC0 ) ; for Hyper Sonic and Hyper Knuckles Tails_tails_2P = ramaddr( $FFFFCBC0 ) ; Tails' tails in Competition mode Tails_tails = ramaddr( $FFFFCC0A ) ; Tails' tails Dust = ramaddr( $FFFFCC54 ) Dust_P2 = ramaddr( $FFFFCC9E ) Shield = ramaddr( $FFFFCCE8 ) Shield_P2 = ramaddr( $FFFFCD32 ) ; left over from Sonic 2 I'm guessing Hyper_Sonic_stars = ramaddr( $FFFFCD7C ) Super_Tails_birds = ramaddr( $FFFFCD7C ) Invincibility_stars = ramaddr( $FFFFCEA4 ) Kos_decomp_buffer = ramaddr( $FFFFD000 ) ; $1000 bytes ; each module in a KosM archive is decompressed here and then DMAed to VRAM H_scroll_buffer = ramaddr( $FFFFE000 ) ; $380 bytes ; horizontal scroll table is built up here and then DMAed to VRAM Collision_response_list = ramaddr( $FFFFE380 ) ; $80 bytes ; only objects in this list are processed by the collision response routines Stat_table = ramaddr( $FFFFE400 ) ; $100 bytes ; used by Tails' AI in a Sonic and Tails game Pos_table_P2 = ramaddr( $FFFFE400 ) ; $100 bytes ; used by Player 2 in competition mode Pos_table = ramaddr( $FFFFE500 ) ; $100 bytes Competition_saved_data = ramaddr( $FFFFE600 ) ; $54 bytes ; saved data from Competition Mode Saved_data = ramaddr( $FFFFE6AC ) ; $54 bytes ; saved data from 1 player mode Ring_status_table = ramaddr( $FFFFE700 ) ; $400 bytes ; 1 word per ring Object_respawn_table = ramaddr( $FFFFEB00 ) ; $300 bytes ; 1 byte per object, every object in the level gets an entry Camera_RAM = ramaddr( $FFFFEE00 ) ; various camera and scroll-related variables are stored here H_scroll_amount = ramaddr( $FFFFEE00 ) ; word ; number of pixels camera scrolled horizontally in the last frame * $100 V_scroll_amount = ramaddr( $FFFFEE02 ) ; word ; number of pixels camera scrolled vertically in the last frame * $100 H_scroll_amount_P2 = ramaddr( $FFFFEE04 ) ; word V_scroll_amount_P2 = ramaddr( $FFFFEE06 ) ; word Scroll_lock = ramaddr( $FFFFEE0A ) ; byte ; if this is set scrolling routines aren't called Scroll_lock_P2 = ramaddr( $FFFFEE0B ) ; byte Camera_target_min_X_pos = ramaddr( $FFFFEE0C ) ; word Camera_target_max_X_pos = ramaddr( $FFFFEE0E ) ; word Camera_target_min_Y_pos = ramaddr( $FFFFEE10 ) ; word Camera_target_max_Y_pos = ramaddr( $FFFFEE12 ) ; word Camera_min_X_pos = ramaddr( $FFFFEE14 ) ; word Camera_max_X_pos = ramaddr( $FFFFEE16 ) ; word Camera_min_Y_pos = ramaddr( $FFFFEE18 ) ; word Camera_max_Y_pos = ramaddr( $FFFFEE1A ) ; word ; this is the only one which ever differs from its target value Camera_min_X_pos_P2 = ramaddr( $FFFFEE1C ) ; word Camera_max_X_pos_P2 = ramaddr( $FFFFEE1E ) ; word Camera_min_Y_pos_P2 = ramaddr( $FFFFEE20 ) ; word Camera_max_Y_pos_P2 = ramaddr( $FFFFEE22 ) ; word H_scroll_frame_offset = ramaddr( $FFFFEE24 ) ; word ; if this is non-zero with value x, horizontal scrolling will be based on the player's position x / $100 + 1 frames ago Pos_table_index = ramaddr( $FFFFEE26 ) ; word ; goes up in increments of 4 H_scroll_frame_offset_P2 = ramaddr( $FFFFEE28 ) ; word Pos_table_index_P2 = ramaddr( $FFFFEE2A ) ; word Distance_from_screen_top = ramaddr( $FFFFEE2C ) ; word ; the vertical scroll manager scrolls the screen until the player's distance from the top of the screen is equal to this (or between this and this + $40 when in the air). $60 by default Distance_from_screen_top_P2 = ramaddr( $FFFFEE2E ) ; word Deform_lock = ramaddr( $FFFFEE30 ) ; byte Camera_max_Y_pos_changing = ramaddr( $FFFFEE32 ) ; byte ; set when the maximum camera Y pos is undergoing a change Dynamic_resize_routine = ramaddr( $FFFFEE33 ) ; byte Fast_V_scroll_flag = ramaddr( $FFFFEE39 ) ; byte ; if this is set vertical scroll when the player is on the ground and has a speed of less than $800 is capped at 24 pixels per frame instead of 6 V_scroll_value_P2_copy = ramaddr( $FFFFEE3A ) ; long ; upper word for foreground, lower word for background Ring_start_addr_ROM = ramaddr( $FFFFEE42 ) ; long ; address in the ring layout of the first ring whose X position is >= camera X position - 8 Ring_end_addr_ROM = ramaddr( $FFFFEE46 ) ; long ; address in the ring layout of the first ring whose X position is >= camera X position + 328 Ring_start_addr_RAM = ramaddr( $FFFFEE4A ) ; word ; address in the ring status table of the first ring whose X position is >= camera X position - 8 Apparent_zone_and_act = ramaddr( $FFFFEE4E ) ; word Apparent_zone = ramaddr( $FFFFEE4E ) ; byte ; always equal to actual zone Apparent_act = ramaddr( $FFFFEE4F ) ; byte ; for example, after AIZ gets burnt, this indicates act 1 even though it's actually act 2 Palette_fade_timer = ramaddr( $FFFFEE50 ) ; word ; the palette gets faded in until this timer expires Act_3_flag = ramaddr( $FFFFEE5E ) ; byte ; set when entering LRZ 3 or DEZ 3 directly from previous act. Prevents title card from loading Camera_X_pos_P2 = ramaddr( $FFFFEE60 ) ; word Camera_Y_pos_P2 = ramaddr( $FFFFEE64 ) ; word Camera_X_pos_P2_copy = ramaddr( $FFFFEE68 ) ; word Camera_Y_pos_P2_copy = ramaddr( $FFFFEE6C ) ; word Camera_X_pos = ramaddr( $FFFFEE78 ) ; word Camera_Y_pos = ramaddr( $FFFFEE7C ) ; word Camera_X_pos_copy = ramaddr( $FFFFEE80 ) ; word Camera_Y_pos_copy = ramaddr( $FFFFEE84 ) ; word Camera_X_pos_rounded = ramaddr( $FFFFEE88 ) ; word ; rounded down to the nearest block boundary ($10th pixel) Camera_Y_pos_rounded = ramaddr( $FFFFEE8A ) ; word ; rounded down to the nearest block boundary ($10th pixel) Camera_X_pos_BG_copy = ramaddr( $FFFFEE8C ) ; word Camera_Y_pos_BG_copy = ramaddr( $FFFFEE90 ) ; word Camera_X_pos_BG_rounded = ramaddr( $FFFFEE94 ) ; word ; rounded down to the nearest block boundary ($10th pixel) Camera_Y_pos_BG_rounded = ramaddr( $FFFFEE96 ) ; word ; rounded down to the nearest block boundary ($10th pixel) Plane_double_update_flag = ramaddr( $FFFFEEA4 ) ; word ; set when two block are to be updated instead of one (i.e. the camera's scrolled by more than $10 pixels) Special_V_int_routine = ramaddr( $FFFFEEA6 ) ; word Screen_X_wrap_value = ramaddr( $FFFFEEA8 ) ; word ; set to $FFFF Screen_Y_wrap_value = ramaddr( $FFFFEEAA ) ; word ; either $7FF or $FFF Camera_Y_pos_mask = ramaddr( $FFFFEEAC ) ; word ; either $7F0 or $FF0 Layout_row_index_mask = ramaddr( $FFFFEEAE ) ; word ; either $3C or $7C Not_ghost_flag = ramaddr( $FFFFEE49 ) ; byte ; set if Player 2 in competition mode isn't a ghost of player 1 Demo_data_addr = ramaddr( $FFFFEE52 ) ; long ; keeps getting incremented as the demo progresses Use_normal_sprite_table = ramaddr( $FFFFEF3C ) ; word ; if this is set Sprite_table_buffer and Sprite_table_buffer_P2 will be DMAed instead of Sprite_table_buffer_2 and Sprite_table_buffer_P2_2 SRAM_mask_interrupts_flag = ramaddr( $FFFFEF56 ) ; word ; if this is set SRAM routines will mask all interrupts (by setting the SR to $2700) Object_index_addr = ramaddr( $FFFFEF5A ) ; long ; points to either the object index for S3 levels or that for S&K levels Camera_Y_pos_coarse_back = ramaddr( $FFFFEF64 ) ; word ; Camera_Y_pos_coarse - $80 Ending_running_flag = ramaddr( $FFFFEF72 ) ; word ; the only thing this does is prevent the game from pausing Plane_buffer_2_addr = ramaddr( $FFFFEF74 ) ; long ; the address of the second plane buffer to process, if applicable Demo_number = ramaddr( $FFFFEF7A ) ; byte ; the currently running demo Ring_consumption_table = ramaddr( $FFFFEF80 ) ; $80 bytes ; stores the addresses of all rings currently being consumed Ring_consumption_count = ramaddr( $FFFFEF80 ) ; word ; the number of rings being consumed currently Ring_consumption_list = ramaddr( $FFFFEF82 ) ; $7E bytes ; the remaining part of the ring consumption table Target_water_palette = ramaddr( $FFFFF000 ) ; $80 bytes ; used by palette fading routines Water_palette = ramaddr( $FFFFF080 ) ; $80 bytes ; this is what actually gets displayed Water_palette_line_2 = ramaddr( $FFFFF0A0 ) ; $20 bytes Water_palette_line_3 = ramaddr( $FFFFF0C0 ) ; $20 bytes Water_palette_line_4 = ramaddr( $FFFFF0E0 ) ; $20 bytes Plane_buffer = ramaddr( $FFFFF100 ) ; $480 bytes ; used by level drawing routines VRAM_buffer = ramaddr( $FFFFF580 ) ; $80 bytes ; used to temporarily hold data while it is being transferred from one VRAM location to another Game_mode = ramaddr( $FFFFF600 ) ; byte Ctrl_1_logical = ramaddr( $FFFFF602 ) ; word ; both held and pressed Ctrl_1_held_logical = ramaddr( $FFFFF602 ) ; byte Ctrl_1_pressed_logical = ramaddr( $FFFFF603 ) ; byte Ctrl_1 = ramaddr( $FFFFF604 ) ; word ; both held and pressed Ctrl_1_held = ramaddr( $FFFFF604 ) ; byte ; all held buttons Ctrl_1_pressed = ramaddr( $FFFFF605 ) ; byte ; buttons being pressed newly this frame Ctrl_2 = ramaddr( $FFFFF606 ) ; word ; both held and pressed Ctrl_2_held = ramaddr( $FFFFF606 ) ; byte Ctrl_2_pressed = ramaddr( $FFFFF607 ) ; byte VDP_reg_1_command = ramaddr( $FFFFF60E ) ; word ; AND the lower byte by $BF and write to VDP control port to disable display, OR by $40 to enable Demo_timer = ramaddr( $FFFFF614 ) ; word ; the time left for a demo to start/run V_scroll_value = ramaddr( $FFFFF616 ) ; long ; both foreground and background V_scroll_value_FG = ramaddr( $FFFFF616 ) ; word V_scroll_value_BG = ramaddr( $FFFFF618 ) ; word V_scroll_value_P2 = ramaddr( $FFFFF61E ) ; long V_scroll_value_FG_P2 = ramaddr( $FFFFF61E ) ; word V_scroll_value_BG_P2 = ramaddr( $FFFFF620 ) ; word Teleport_active_timer = ramaddr( $FFFFF622 ) ; byte ; left over from Sonic 2 Teleport_active_flag = ramaddr( $FFFFF623 ) ; byte ; left over from Sonic 2 H_int_counter_command = ramaddr( $FFFFF624 ) ; word ; contains a command to write to VDP register $0A (line interrupt counter) H_int_counter = ramaddr( $FFFFF625 ) ; byte ; just the counter part of the command Palette_fade_info = ramaddr( $FFFFF626 ) ; word ; both index and count Palette_fade_index = ramaddr( $FFFFF626 ) ; byte ; colour to start fading from Palette_fade_count = ramaddr( $FFFFF627 ) ; byte ; the number of colours to fade Lag_frame_count = ramaddr( $FFFFF628 ) ; word ; more specifically, the number of times V-int routine 0 has run. Reset at the end of a normal frame V_int_routine = ramaddr( $FFFFF62A ) ; byte Sprites_drawn = ramaddr( $FFFFF62C ) ; byte ; used to ensure the sprite limit isn't exceeded Water_palette_data_addr = ramaddr( $FFFFF62E ) ; long ; points to the water palette data for the current level RNG_seed = ramaddr( $FFFFF636 ) ; long ; used by the random number generator Game_paused = ramaddr( $FFFFF63A ) ; word DMA_trigger_word = ramaddr( $FFFFF640 ) ; word ; transferred from RAM to avoid crashing the Mega Drive H_int_flag = ramaddr( $FFFFF644 ) ; word ; unless this is set H-int will return immediately Water_level = ramaddr( $FFFFF646 ) ; word ; keeps fluctuating Mean_water_level = ramaddr( $FFFFF648 ) ; word ; the steady central value of the water level Target_water_level = ramaddr( $FFFFF64A ) ; word Water_speed = ramaddr( $FFFFF64C ) ; byte ; this is added to or subtracted from Mean_water_level every frame till it reaches Target_water_level Water_entered_counter = ramaddr( $FFFFF64D ) ; byte ; incremented when entering and exiting water, read by the the floating AIZ spike log, cleared on level initialisation and dynamic events of certain levels Water_full_screen_flag = ramaddr( $FFFFF64E ) ; byte ; set if water covers the entire screen (i.e. the underwater pallete should be DMAed during V-int rather than the normal palette) Do_Updates_in_H_int = ramaddr( $FFFFF64F ) ; byte ; if this is set Do_Updates will be called from H-int instead of V-int Palette_frame = ramaddr( $FFFFF65C ) ; word Palette_timer = ramaddr( $FFFFF65E ) ; byte Super_Hyper_palette_status = ramaddr( $FFFFF65F ) ; byte ; appears to be a flag for the palette's current status: '0' for 'off', '1' for 'fading', -1 for 'fading done' Hyper_Sonic_flash_timer = ramaddr( $FFFFF666 ) ; byte ; used for Hyper Sonic's double jump move Super_Tails_flag = ramaddr( $FFFFF667 ) ; byte Palette_frame_Tails = ramaddr( $FFFFF668 ) ; byte ; Tails would use Palette_frame and Palette_timer, but they're reserved for his Super Flickies Palette_timer_Tails = ramaddr( $FFFFF669 ) ; byte Ctrl_2_logical = ramaddr( $FFFFF66A ) ; word ; both held and pressed Ctrl_2_held_logical = ramaddr( $FFFFF66A ) ; byte Ctrl_2_pressed_logical = ramaddr( $FFFFF66B ) ; byte Super_Hyper_frame_count = ramaddr( $FFFFF670 ) ; word Scroll_force_positions = ramaddr( $FFFFF676 ) ; byte ; if this is set scrolling will be based on the two variables below rather than the player's actual position Scroll_forced_X_pos = ramaddr( $FFFFF678 ) ; word Scroll_forced_Y_pos = ramaddr( $FFFFF67C ) ; word Nem_decomp_queue = ramaddr( $FFFFF680 ) ; $60 bytes ; 6 bytes per entry, first longword is source location and next word is VRAM destination Nem_decomp_source = ramaddr( $FFFFF680 ) ; long ; the compressed data location for the first entry in the queue Nem_decomp_destination = ramaddr( $FFFFF684 ) ; word ; destination in VRAM for the first entry in the queue Nem_decomp_vars = ramaddr( $FFFFF6E0 ) ; $20 bytes ; various variables used by the Nemesis decompression queue processor Nem_write_routine = ramaddr( $FFFFF6E0 ) ; long ; points to either Nem_PCD_WriteRowToVDP or Nem_PCD_WriteRowToVDP_XOR Nem_repeat_count = ramaddr( $FFFFF6E4 ) ; long ; stored repeat count for the current palette index Nem_palette_index = ramaddr( $FFFFF6E8 ) ; long ; the current palette index Nem_previous_row = ramaddr( $FFFFF6EC ) ; long ; used in XOR mode Nem_data_word = ramaddr( $FFFFF6F0 ) ; long ; contains the current compressed word being processed Nem_shift_value = ramaddr( $FFFFF6F4 ) ; long ; the number of bits the data word needs to be shifted by Nem_patterns_left = ramaddr( $FFFFF6F8 ) ; word ; the number of patterns remaining to be decompressed Nem_frame_patterns_left = ramaddr( $FFFFF6FA ) ; word ; the number of patterns remaining to be decompressed in the current frame Rings_manager_routine = ramaddr( $FFFFF710 ) ; byte Level_started_flag = ramaddr( $FFFFF711 ) ; byte Water_flag = ramaddr( $FFFFF730 ) ; byte Flying_carrying_Sonic_flag = ramaddr( $FFFFF73E ) ; byte ; set when Tails carries Sonic in a Sonic and Tails game Flying_picking_Sonic_timer = ramaddr( $FFFFF73F ) ; byte ; until this is 0 Tails can't pick Sonic up Ctrl_1_title = ramaddr( $FFFFF748 ) ; word ; copy of Ctrl_1, used on the title screen Ctrl_1_held_title = ramaddr( $FFFFF748 ) ; byte Ctrl_1_pressed_title = ramaddr( $FFFFF749 ) ; byte Sonic_Knux_top_speed = ramaddr( $FFFFF760 ) ; word Sonic_Knux_acceleration = ramaddr( $FFFFF762 ) ; word Sonic_Knux_deceleration = ramaddr( $FFFFF764 ) ; word Primary_Angle = ramaddr( $FFFFF768 ) ; byte Secondary_Angle = ramaddr( $FFFFF76A ) ; byte Object_load_routine = ramaddr( $FFFFF76C ) ; byte ; routine counter for the object loading manager Camera_X_pos_coarse = ramaddr( $FFFFF76E ) ; word ; rounded down to the nearest chunk boundary (128th pixel) Camera_Y_pos_coarse = ramaddr( $FFFFF770 ) ; word ; rounded down to the nearest chunk boundary (128th pixel) Object_load_addr_front = ramaddr( $FFFFF772 ) ; long ; the address inside the object placement data of the first object whose X pos is >= Camera_X_pos_coarse + $280 Object_load_addr_back = ramaddr( $FFFFF776 ) ; long ; the address inside the object placement data of the first object whose X pos is >= Camera_X_pos_coarse - $80 Object_respawn_index_front = ramaddr( $FFFFF77A ) ; word ; the object respawn table index for the object at Obj_load_addr_front Object_respawn_index_back = ramaddr( $FFFFF77C ) ; word ; the object respawn table index for the object at Obj_load_addr_back Collision_addr = ramaddr( $FFFFF796 ) ; long ; points to the primary or secondary collision data as appropriate Boss_flag = ramaddr( $FFFFF7AA ) ; byte ; set if a boss fight is going on Primary_collision_addr = ramaddr( $FFFFF7B4 ) ; long Secondary_collision_addr = ramaddr( $FFFFF7B8 ) ; long Reverse_gravity_flag = ramaddr( $FFFFF7C6 ) ; byte WindTunnel_flag = ramaddr( $FFFFF7C8 ) ; byte Ctrl_1_locked = ramaddr( $FFFFF7CA ) ; byte Ctrl_2_locked = ramaddr( $FFFFF7CB ) ; byte Chain_bonus_counter = ramaddr( $FFFFF7D0 ) ; word Time_bonus_countdown = ramaddr( $FFFFF7D2 ) ; word ; used on the results screen Ring_bonus_countdown = ramaddr( $FFFFF7D4 ) ; word ; used on the results screen Camera_X_pos_coarse_back = ramaddr( $FFFFF7DA ) ; word ; Camera_X_pos_coarse - $80 Level_trigger_array = ramaddr( $FFFFF7E0 ) ; $10 bytes ; used by buttons, etc. Anim_Counters = ramaddr( $FFFFF7F0 ) ; $10 bytes ; each word stores data on animated level art, including duration and current frame Sprite_table_buffer = ramaddr( $FFFFF800 ) ; $280 bytes DMA_queue = ramaddr( $FFFFFB00 ) ; $FC bytes ; stores all the VDP commands necessary to initiate a DMA transfer DMA_queue_slot = ramaddr( $FFFFFBFC ) ; long ; points to the next free slot on the queue Normal_palette = ramaddr( $FFFFFC00 ) ; $80 bytes Normal_palette_line_2 = ramaddr( $FFFFFC20 ) ; $20 bytes Normal_palette_line_3 = ramaddr( $FFFFFC40 ) ; $20 bytes Normal_palette_line_4 = ramaddr( $FFFFFC60 ) ; $20 bytes Target_palette = ramaddr( $FFFFFC80 ) ; $80 bytes ; used by palette fading routines Target_palette_line_2 = ramaddr( $FFFFFCA0 ) ; $20 bytes Target_palette_line_3 = ramaddr( $FFFFFCC0 ) ; $20 bytes Target_palette_line_4 = ramaddr( $FFFFFCE0 ) ; $20 bytes System_stack = ramaddr( $FFFFFE00 ) ; $100 bytes ; this is the top of the stack, it grows downwards Restart_level_flag = ramaddr( $FFFFFE02 ) ; word Level_frame_counter = ramaddr( $FFFFFE04 ) ; word ; the number of frames which have elapsed since the level started Debug_object = ramaddr( $FFFFFE06 ) ; byte ; the current position in the debug mode object list Debug_placement_mode = ramaddr( $FFFFFE08 ) ; word ; both routine and type Debug_placement_routine = ramaddr( $FFFFFE08 ) ; byte Debug_placement_type = ramaddr( $FFFFFE09 ) ; byte ; 0 = normal gameplay, 1 = normal object placement, 2 = frame cycling V_int_run_count = ramaddr( $FFFFFE0C ) ; long ; the number of times V-int has run Current_zone_and_act = ramaddr( $FFFFFE10 ) ; word Current_zone = ramaddr( $FFFFFE10 ) ; byte Current_act = ramaddr( $FFFFFE11 ) ; byte Life_count = ramaddr( $FFFFFE12 ) ; byte Current_special_stage = ramaddr( $FFFFFE16 ) ; byte Continue_count = ramaddr( $FFFFFE18 ) ; byte Super_Sonic_Knux_flag = ramaddr( $FFFFFE19 ) ; byte Time_over_flag = ramaddr( $FFFFFE1A ) ; byte Extra_life_flags = ramaddr( $FFFFFE1B ) ; byte Update_HUD_life_count = ramaddr( $FFFFFE1C ) ; byte Update_HUD_ring_count = ramaddr( $FFFFFE1D ) ; byte Update_HUD_timer = ramaddr( $FFFFFE1E ) ; byte Update_HUD_score = ramaddr( $FFFFFE1F ) ; byte Ring_count = ramaddr( $FFFFFE20 ) ; word Timer = ramaddr( $FFFFFE22 ) ; long Timer_minute = ramaddr( $FFFFFE23 ) ; byte Timer_second = ramaddr( $FFFFFE24 ) ; byte Timer_frame = ramaddr( $FFFFFE25 ) ; byte ; the second gets incremented when this reaches 60 Score = ramaddr( $FFFFFE26 ) ; long Last_star_post_hit = ramaddr( $FFFFFE2A ) ; byte ; the following variables are all saved when hitting a star post Saved_last_star_post_hit = ramaddr( $FFFFFE2B ) ; byte Saved_zone_and_act = ramaddr( $FFFFFE2C ) ; word Saved_X_pos = ramaddr( $FFFFFE2E ) ; word Saved_Y_pos = ramaddr( $FFFFFE30 ) ; word Saved_ring_count = ramaddr( $FFFFFE32 ) ; word Saved_timer = ramaddr( $FFFFFE34 ) ; long Saved_art_tile = ramaddr( $FFFFFE38 ) ; word Saved_solid_bits = ramaddr( $FFFFFE3A ) ; word ; copy of Player 1's top_solid_bit and lrb_solid_bit Saved_camera_X_pos = ramaddr( $FFFFFE3C ) ; word Saved_camera_Y_pos = ramaddr( $FFFFFE3E ) ; word Saved_mean_water_level = ramaddr( $FFFFFE40 ) ; word Saved_water_full_screen_flag = ramaddr( $FFFFFE42 ) ; byte Saved_extra_life_flags = ramaddr( $FFFFFE43 ) ; byte Saved_camera_max_Y_pos = ramaddr( $FFFFFE44 ) ; word Saved_dynamic_resize_routine = ramaddr( $FFFFFE46 ) ; word Saved_status_secondary = ramaddr( $FFFFFE47 ) ; word Special_bonus_entry_flag = ramaddr( $FFFFFE48 ) ; byte ; 1 for entering a Special Stage, 2 for entering a Bonus Stage ; the following variables are all saved when entering a special stage Saved2_last_star_post_hit = ramaddr( $FFFFFE49 ) ; byte Saved2_zone_and_act = ramaddr( $FFFFFE4A ) ; word Saved2_X_pos = ramaddr( $FFFFFE4C ) ; word Saved2_Y_pos = ramaddr( $FFFFFE4E ) ; word Saved2_ring_count = ramaddr( $FFFFFE50 ) ; word Saved2_timer = ramaddr( $FFFFFE52 ) ; long Saved2_art_tile = ramaddr( $FFFFFE56 ) ; word Saved2_solid_bits = ramaddr( $FFFFFE58 ) ; word Saved2_camera_X_pos = ramaddr( $FFFFFE5A ) ; word Saved2_camera_Y_pos = ramaddr( $FFFFFE5C ) ; word Saved2_mean_water_level = ramaddr( $FFFFFE5E ) ; word Saved2_water_full_screen_flag = ramaddr( $FFFFFE60 ) ; byte Saved2_extra_life_flags = ramaddr( $FFFFFE61 ) ; byte Saved2_camera_max_Y_pos = ramaddr( $FFFFFE62 ) ; word Saved2_dynamic_resize_routine = ramaddr( $FFFFFE64 ) ; byte Rings_frame_timer = ramaddr( $FFFFFEB2 ) ; byte Rings_frame = ramaddr( $FFFFFEB3 ) ; byte Ring_spill_anim_counter = ramaddr( $FFFFFEB6 ) ; byte Ring_spill_anim_frame = ramaddr( $FFFFFEB7 ) ; byte Ring_spill_anim_accum = ramaddr( $FFFFFEB8 ) ; byte Tails_top_speed = ramaddr( $FFFFFEC0 ) ; word Tails_acceleration = ramaddr( $FFFFFEC2 ) ; word Tails_deceleration = ramaddr( $FFFFFEC4 ) ; word Life_count_P2 = ramaddr( $FFFFFEC6 ) ; byte ; left over from Sonic 2 Total_ring_count = ramaddr( $FFFFFEC8 ) ; word ; left over from Sonic 2 Total_ring_count_P2 = ramaddr( $FFFFFECA ) ; word ; left over from Sonic 2 Ring_count_P2 = ramaddr( $FFFFFED0 ) ; word ; left over from Sonic 2 Timer_P2 = ramaddr( $FFFFFED2 ) ; long ; left over from Sonic 2 Timer_minute_P2 = ramaddr( $FFFFFED3 ) ; byte ; left over from Sonic 2 Score_P2 = ramaddr( $FFFFFED6 ) ; long ; left over from Sonic 2 Perfect_rings_left = ramaddr( $FFFFFF04 ) ; word ; left over from Sonic 2 Player_mode = ramaddr( $FFFFFF08 ) ; word ; 0 = Sonic and Tails, 1 = Sonic alone, 2 = Tails alone, 3 = Knuckles alone Player_option = ramaddr( $FFFFFF0A ) ; word ; option selected on level select, data select screen or Sonic & Knuckles title screen Kos_decomp_queue_count = ramaddr( $FFFFFF0E ) ; word ; the number of pieces of data on the queue. Sign bit set indicates a decompression is in progress Kos_decomp_stored_registers = ramaddr( $FFFFFF10 ) ; $28 bytes ; allows decompression to be spread over multiple frames Kos_decomp_stored_SR = ramaddr( $FFFFFF38 ) ; word Kos_decomp_bookmark = ramaddr( $FFFFFF3A ) ; long ; the address within the Kosinski queue processor at which processing is to be resumed Kos_description_field = ramaddr( $FFFFFF3E ) ; word ; used by the Kosinski queue processor the same way the stack is used by the normal Kosinski decompression routine Kos_decomp_queue = ramaddr( $FFFFFF40 ) ; $20 bytes ; 2 longwords per entry, first is source location and second is decompression location Kos_decomp_source = ramaddr( $FFFFFF40 ) ; long ; the compressed data location for the first entry in the queue Kos_decomp_destination = ramaddr( $FFFFFF44 ) ; long ; the decompression location for the first entry in the queue Kos_modules_left = ramaddr( $FFFFFF60 ) ; byte ; the number of modules left to decompresses. Sign bit set indicates a module is being decompressed/has been decompressed Kos_last_module_size = ramaddr( $FFFFFF62 ) ; word ; the uncompressed size of the last module in words. All other modules are $800 words Kos_module_queue = ramaddr( $FFFFFF64 ) ; $18 bytes ; 6 bytes per entry, first longword is source location and next word is VRAM destination Kos_module_source = ramaddr( $FFFFFF64 ) ; long ; the compressed data location for the first module in the queue Kos_module_destination = ramaddr( $FFFFFF68 ) ; word ; the VRAM destination for the first module in the queue Sound_test_sound = ramaddr( $FFFFFF84 ) ; word Title_screen_option = ramaddr( $FFFFFF86 ) ; byte Competition_mode_type = ramaddr( $FFFFFF8B ) ; byte ; 0 = grand prix, 3 = match race, -1 = time attack Total_bonus_countup = ramaddr( $FFFFFF8E ) ; word ; the total points to be added due to various bonuses this frame in the end of level results screen Level_music = ramaddr( $FFFFFF90 ) ; word Saved2_status_secondary = ramaddr( $FFFFFF96 ) ; byte Saved_apparent_zone_and_act = ramaddr( $FFFFFF9A ) ; word Saved2_apparent_zone_and_act = ramaddr( $FFFFFF9C ) ; word Blue_spheres_header_flag = ramaddr( $FFFFFF9F ) ; byte ; 0 = SEGA GENESIS, 1 = SEGA MEGA DRIVE SK_alone_flag = ramaddr( $FFFFFFAE ) ; word ; -1 if Sonic 3 isn't locked on Emerald_count = ramaddr( $FFFFFFB0 ) ; word ; both chaos and super emeralds Chaos_emerald_count = ramaddr( $FFFFFFB0 ) ; byte Super_emerald_count = ramaddr( $FFFFFFB1 ) ; byte Collected_emeralds_array = ramaddr( $FFFFFFB2 ) ; 7 bytes ; 1 byte per emerald, 0 = not collected, 1 = chaos emerald collected, 2 = grey super emerald, 3 = super emerald collected SK_special_stage_flag = ramaddr( $FFFFFFBB ) ; byte ; set if a Sonic & Knuckles special stage is being run Next_extra_life_score = ramaddr( $FFFFFFC0 ) ; long Next_extra_life_score_P2 = ramaddr( $FFFFFFC4 ) ; long ; left over from Sonic 2 Demo_mode_flag = ramaddr( $FFFFFFD0 ) ; word Next_demo_number = ramaddr( $FFFFFFD2 ) ; word V_blank_cycles = ramaddr( $FFFFFFD6 ) ; word ; the number of cycles between V-blanks Graphics_flags = ramaddr( $FFFFFFD8 ) ; byte ; bit 7 set = English system, bit 6 set = PAL system Debug_mode_flag = ramaddr( $FFFFFFDA ) ; word Level_select_flag = ramaddr( $FFFFFFE0 ) ; byte Slow_motion_flag = ramaddr( $FFFFFFE1 ) ; byte Debug_cheat_flag = ramaddr( $FFFFFFE2 ) ; word ; set if the debug cheat's been entered Competition_mode = ramaddr( $FFFFFFE8 ) ; word P1_character = ramaddr( $FFFFFFEA ) ; byte ; 0 = Sonic, 1 = Tails, 2 = Knuckles P2_character = ramaddr( $FFFFFFEB ) ; byte V_int_jump = ramaddr( $FFFFFFF0 ) ; 6 bytes ; contains an instruction to jump to the V-int handler V_int_addr = ramaddr( $FFFFFFF2 ) ; long H_int_jump = ramaddr( $FFFFFFF6 ) ; 6 bytes ; contains an instruction to jump to the H-int handler H_int_addr = ramaddr( $FFFFFFF8 ) ; long Checksum_string = ramaddr( $FFFFFFFC ) ; long ; set to 'SM&K' once the checksum routine has run ; --------------------------------------------------------------------------- ; Art tile stuff palette_line_0 = (0<<13) palette_line_1 = (1<<13) palette_line_2 = (2<<13) palette_line_3 = (3<<13) high_priority = (1<<15) tile_mask = $07FF drawing_mask = $7FFF ; --------------------------------------------------------------------------- ; VRAM and tile art base addresses. ; VRAM Reserved regions. VRAM_Plane_A_Name_Table = $C000 ; Extends until $CFFF VRAM_Plane_B_Name_Table = $E000 ; Extends until $EFFF ; Menu background. ArtTile_ArtKos_S3MenuBG = $0001 ; Competition mode. ArtTile_ArtKos_Competition_LevSel = $029F ArtTile_ArtKos_Competition_ModeSel = $034A ArtTile_ArtKos_Competition_Results = $034A ArtTile_ArtKos_Competition_CharSel = $05C9 ; Save screen. ArtTile_ArtKos_Save_Misc = $029F ArtTile_ArtKos_Save_Extra = $0454 ; --------------------------------------------------------------------------- ; Universal locations. ; Universal (used on all standard levels). ArtTile_ArtNem_Powerups = $04C4 ArtTile_ArtUnc_Sonic = $0680 ArtTile_ArtUnc_Tails_Tails = $06B0 ArtTile_ArtNem_Ring = $06BC ArtTile_ArtUnc_Shield = $079C ArtTile_ArtUnc_Shield_Sparks = $07BB ; Codepage for level select save codepage LEVELSELECT CHARSET '0','9', 16 CHARSET 'A','Z', 30 CHARSET 'a','z', 30 CHARSET '*', 26 CHARSET $A9, 27 ; '©' CHARSET ':', 28 CHARSET '.', 29 CHARSET ' ', 0 restore
dma/hdma_halt/main.asm
AntonioND/gbc-hw-tests
6
24268
INCLUDE "hardware.inc" INCLUDE "header.inc" SECTION "var",BSS ram_ptr: DS 2 SECTION "Main",HOME ;-------------------------------------------------------------------------- ;- Main() - ;-------------------------------------------------------------------------- Main: ; ----------------- ld a,$0A ld [$0000],a ; enable ram ld hl,$A000 ; ----------------- ld a,LCDCF_ON ld [rLCDC],a ; ----------------- ld b,4 call wait_ly DMA_COPY 0,$8000,20*16,1 ld a,0 ld [rIF],a ld a,IEF_VBLANK ld [rIE],a ld a,[rHDMA5] ld [hl+],a halt ld a,[rHDMA5] ld [hl+],a ld a,0 ld [rHDMA5],a ; stop now, who cares about the actual copy? push hl ld [hl],$12 inc hl ld [hl],$34 inc hl ld [hl],$56 inc hl ld [hl],$78 pop hl ; ----------------- ld b,4 call wait_ly DMA_COPY 0,$8000,20*16,1 ld a,0 ld [rIF],a ld a,IEF_VBLANK ld [rIE],a ld a,[rHDMA5] ld [hl+],a ld a,0 ld [rP1],a stop ld a,[rHDMA5] ld [hl+],a ld a,[rLY] ld [hl+],a add a,5 ld b,a call wait_ly ld a,[rHDMA5] ld [hl+],a ld a,0 ld [rHDMA5],a ; stop now, who cares about the actual copy? push hl ld [hl],$12 inc hl ld [hl],$34 inc hl ld [hl],$56 inc hl ld [hl],$78 pop hl ; ----------------- ld b,4 call wait_ly DMA_COPY 0,$8000,20*16,1 ld a,0 ld [rIF],a ld a,IEF_VBLANK ld [rIE],a ld a,[rHDMA5] ld [hl+],a ld a,0 ld [rP1],a call CPU_fast ld a,[rHDMA5] ld [hl+],a ld a,[rLY] ld [hl+],a add a,5 ld b,a call wait_ly ld a,[rHDMA5] ld [hl+],a ld a,0 ld [rHDMA5],a ; stop now, who cares about the actual copy? ; ----------------- push hl ld [hl],$12 inc hl ld [hl],$34 inc hl ld [hl],$56 inc hl ld [hl],$78 pop hl ld a,$00 ld [$0000],a ; disable ram ; ----------------- .end: halt jr .end
Asmt6/Asmt6_2.asm
wstern1234/COMSC-260
0
246076
<gh_stars>0 ; Asmt6_2.asm - Write a sequence of instructions that shift three memory words to the left by 1 bit position. INCLUDE Irvine32.inc .data wordArray WORD 810Dh, 0C064h,93ABh .code main PROC shr [wordArray + 2], 1 rcr [wordArray + 1], 1 rcr [wordArray], 1 INVOKE ExitProcess, 0 main ENDP END main
oeis/122/A122368.asm
neoneye/loda-programs
11
21170
<reponame>neoneye/loda-programs ; A122368: Dimension of 4-variable non-commutative harmonics (twisted derivative). The dimension of the space of non-commutative polynomials in 4 variables which are killed by all symmetric differential operators (where for a monomial w, d_{xi} ( xi w ) = w and d_{xi} ( xj w ) = 0 for i/=j). ; Submitted by <NAME>(s4) ; 1,3,11,42,162,627,2430,9423,36549,141777,549990,2133594,8276985,32109534,124565121,483235875,1874657763,7272519066,28212902154,109448714619,424593725526,1647162628047,6389978382405,24789187818585,96166809354006,373068100903986,1447274884693617,5614536828087846,21780951308996481,84496701055269123,327795255034909947,1271644074639027018,4933197255685779954,19137772627468166403,74242792687554059886,288016394245168201551,1117326549165427169541,4334540124848711382945,16815350989338928376454 mov $3,1 lpb $0 sub $0,1 add $1,$3 add $2,$3 mov $3,1 add $3,$2 mul $2,2 add $4,$1 add $3,$4 lpe mov $0,$3
src/compiling/ANTLR/grammar/TaskDeclarations.g4
jecassis/VSCode-SystemVerilog
75
4241
<gh_stars>10-100 grammar TaskDeclarations; import BlockItemDeclarations; task_declaration : 'task' ( lifetime )? task_body_declaration ; task_body_declaration : ( interface_identifier '.' | class_scope )? task_identifier ';' ( tf_item_declaration )* ( statement_or_null )* 'endtask' ( ':' task_identifier )? | ( interface_identifier '.' | class_scope )? task_identifier '(' ( tf_port_list )? ')' ';' ( block_item_declaration )* ( statement_or_null )* 'endtask' ( ':' task_identifier )? ; tf_item_declaration : block_item_declaration | tf_port_declaration ; tf_port_list : tf_port_item ( ',' tf_port_item )* ; tf_port_item : ( attribute_instance )* ( tf_port_direction )? ( 'var' )? data_type_or_implicit ( port_identifier ( variable_dimension )* ( '=' expression )? )? ; tf_port_direction : port_direction | 'const' 'ref' ; tf_port_declaration : ( attribute_instance )* tf_port_direction ( 'var' )? data_type_or_implicit list_of_tf_variable_identifiers ';' ; task_prototype : 'task' task_identifier ( '(' ( tf_port_list )? ')' )? ;
llvm-gcc-4.2-2.9/gcc/ada/a-wwunio.ads
vidkidz/crossbridge
1
823
<reponame>vidkidz/crossbridge ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . W I D E _ U N B O U N D E D _ I O -- -- -- -- S p e c -- -- -- -- This specification is adapted from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ -- Note: historically GNAT provided these subprograms as a child of the -- package Ada.Strings.Wide_Unbounded. So we implement this new Ada 2005 -- package by renaming the subprograms in that child. This is a more -- straightforward implementation anyway, since we need access to the -- internal representation of Unbounded_Wide_String. with Ada.Strings.Wide_Unbounded; with Ada.Strings.Wide_Unbounded.Wide_Text_IO; package Ada.Wide_Text_IO.Wide_Unbounded_IO is procedure Put (File : File_Type; Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put; procedure Put (Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put; procedure Put_Line (File : Wide_Text_IO.File_Type; Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put_Line; procedure Put_Line (Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put_Line; function Get_Line (File : File_Type) return Strings.Wide_Unbounded.Unbounded_Wide_String renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; function Get_Line return Strings.Wide_Unbounded.Unbounded_Wide_String renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; procedure Get_Line (File : File_Type; Item : out Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; procedure Get_Line (Item : out Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; end Ada.Wide_Text_IO.Wide_Unbounded_IO;
lib/am335x_sdk/ti/csl/arch/a15/V1/mmu_a15_gcc.asm
brandonbraun653/Apollo
2
8789
@ @ Copyright (c) 2015, Texas Instruments Incorporated @ @ 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 Texas Instruments Incorporated nor the names of @ its contributors may be used to endorse or promote products derived @ from this software without specific prior written permission. @ @ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" @ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, @ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR @ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR @ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, @ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, @ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; @ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, @ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR @ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, @ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @;******************************************************************************* @; @; mmu_a15_gcc.asm - A15 MMU assembly code @; @;****************************** Global Symbols ********************************* .global MMUA15InitASM .global MMUA15DisableASM .global MMUA15EnableASM .global MMUA15IsEnabledASM .global MMUA15WriteMAIRASM .global MMUA15TLBInvalidateASM .global MMUA15TLBInvalidateAllASM @;******************************* Code Section ********************************** @;================ MMUA15InitASM ================ .text .func MMUA15InitASM MMUA15InitASM: mov r0, #1 @ TTBR0 used and desc uses Long format lsl r0, r0, #31 @ Set TTBCR.EAE bit mcr p15, #0, r0, c2, c0, #2 @ write r0 to TTBCR isb @ flush instruction pipeline @ isb makes sure cp15 changes @ are visible to all subsequent @ instructions bx r14 .endfunc @;================ MMUA15DisableASM ================ .text .func MMUA15DisableASM MMUA15DisableASM: mrc p15, #0, r0, c1, c0, #0 @ read register c1 mov r1, #0x1 @ move #1 into r1 bic r0, r0, r1 @ clear bit 1 in r0 mcr p15, #0, r0, c1, c0, #0 @ mmu disabled (bit 1 = 0) bx r14 .endfunc @;================ MMUA15EnableASM ================ .text .func MMUA15EnableASM MMUA15EnableASM: mov r1, #0 mov r10, r0 @ get page table pointer mcrr p15, #0, r10, r1, c2 @ write TTBR0 with Module->tableBuf. mrc p15, #0, r0, c1, c0, #0 @ read register c1 mov r1, #0x1 @ move #1 into r1 orr r0, r0, r1 @ OR r1 with r0 into r0 mcr p15, #0, r0, c1, c0, #0 @ mmu enabled (bit 1 = 1) bx r14 .endfunc @;================ MMUA15IsEnabledASM ================ .text .func MMUA15IsEnabledASM MMUA15IsEnabledASM: mov r0, #0 mrc p15, #0, r1, c1, c0, #0 @ read register c1 to r1 tst r1, #0x1 @ test bit 1 movne r0, #1 @ if not 0, MMU is enabled bx r14 .endfunc @;================ MMUA15WriteMAIRASM ================ .text .func MMUA15WriteMAIRASM MMUA15WriteMAIRASM: and r2, r0, #0x3 @ attrIndx[1:0] gives byte offset lsl r2, r2, #0x3 @ multiply by 8 to get bit offset mov r3, #0xFF and r1, r1, r3 @ extract lsb byte from r1 lsl r1, r1, r2 @ r1 is the encoded attribute lsl r3, r3, r2 @ generate bit mask tst r0, #0x4 @ attrIndx[2] selects MAIR 0 or 1 bne mair1 mair0: mrc p15, #0, r0, c10, c2, #0 @ read MAIR0 into r0 bic r0, r0, r3 orr r0, r0, r1 @ OR encoded attribute with MAIR0 mcr p15, #0, r0, c10, c2, #0 @ write r0 to MAIR0 b exitSetMAIR mair1: mrc p15, #0, r0, c10, c2, #1 @ read MAIR1 into r0 bic r0, r0, r3 orr r0, r0, r1 @ OR encoded attribute with MAIR1 mcr p15, #0, r0, c10, c2, #1 @ write r0 to MAIR1 exitSetMAIR: isb @ flush instruction pipeline bx r14 .endfunc @;================ MMUA15TLBInvalidateASM ================ .text .func MMUA15TLBInvalidateASM MMUA15TLBInvalidateASM: dsb @ wait for invalidation to complete add r1, r0, r1 @ calculate last address lsr r0, r0, #12 @ align pagePtr lsl r0, r0, #12 tlbInv: mcr p15, #0, r0, c8, c7, #3 @ invalidate unified TLB add r0, r0, #4096 @ increment address by page size cmp r0, r1 @ compare to last address blo tlbInv @ loop if count > 0 dsb @ wait for invalidation to complete isb @ flush instruction pipeline bx r14 .endfunc @;================ MMUA15TLBInvalidateAllASM ================ .text .func MMUA15TLBInvalidateAllASM MMUA15TLBInvalidateAllASM: dsb @ wait for invalidation to complete mcr p15, #0, r0, c8, c7, #0 @ invalidate unified TLB dsb @ wait for invalidation to complete isb @ flush instruction pipeline bx r14 .endfunc
library/fmGUI_ManageSecurity/fmGUI_ManageSecurity_AccessRecord_OpenCalc.applescript
NYHTC/applescript-fm-helper
1
821
<reponame>NYHTC/applescript-fm-helper<filename>library/fmGUI_ManageSecurity/fmGUI_ManageSecurity_AccessRecord_OpenCalc.applescript<gh_stars>1-10 -- fmGUI_ManageSecurity_AccessRecord_OpenCalc({}) -- <NAME>, NYHTC -- open calc box ( or field-level access ) for the currently selected table of the record-access window in manage security (* HISTORY: 2020-03-04 ( dshockley ): Standardized version. 1.0 - 2017-07-06 ( eshagdar ):created REQUIRES: fmGUI_AppFrontMost windowWaitUntil *) on run fmGUI_ManageSecurity_AccessRecord_OpenCalc({calcFor:"field"}) --fmGUI_ManageSecurity_AccessRecord_OpenCalc({calcFor:5}) end run -------------------- -- START OF CODE -------------------- on fmGUI_ManageSecurity_AccessRecord_OpenCalc(prefs) -- version 2020-03-04-1531 set defaultPrefs to {calcFor:null} set prefs to prefs & defaultPrefs set calcFor to calcFor of prefs try fmGUI_AppFrontMost() if class of calcFor is equal to class of 1 then -- pop up button number is specified, so just use it set buttonNum to calcFor else if calcFor is equal to "view" then set buttonNum to 4 else if calcFor is equal to "edit" then set buttonNum to 1 else if calcFor is equal to "create" then set buttonNum to 2 else if calcFor is equal to "delete" then set buttonNum to 3 else if calcFor is equal to "field" then set buttonNum to 5 end if -- now open the specified calc box tell application "System Events" tell process "FileMaker Pro Advanced" click pop up button buttonNum of window 1 click menu item 2 of menu 1 of pop up button buttonNum of window 1 end tell end tell return windowWaitUntil({windowName:"Custom Record Privileges", windowNameTest:"is not"}) on error errMsg number errNum error "unable to fmGUI_ManageSecurity_AccessRecord_OpenCalc - " & errMsg number errNum end try end fmGUI_ManageSecurity_AccessRecord_OpenCalc -------------------- -- END OF CODE -------------------- on fmGUI_AppFrontMost() tell application "htcLib" to fmGUI_AppFrontMost() end fmGUI_AppFrontMost on windowWaitUntil(prefs) tell application "htcLib" to windowWaitUntil(prefs) end windowWaitUntil
libtool/src/gmp-6.1.2/mpn/x86_64/coreihwl/aorsmul_1.asm
kroggen/aergo
278
84417
dnl AMD64 mpn_addmul_1 and mpn_submul_1 optimised for Intel Haswell. dnl Contributed to the GNU project by <NAME>. dnl Copyright 2013 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. include(`../config.m4') C cycles/limb C AMD K8,K9 n/a C AMD K10 n/a C AMD bull n/a C AMD pile n/a C AMD steam ? C AMD bobcat n/a C AMD jaguar ? C Intel P4 n/a C Intel core n/a C Intel NHM n/a C Intel SBR n/a C Intel IBR n/a C Intel HWL 2.32 C Intel BWL ? C Intel atom n/a C VIA nano n/a C The loop of this code is the result of running a code generation and C optimisation tool suite written by <NAME> and <NAME>. C TODO C * Handle small n separately, for lower overhead. define(`rp', `%rdi') C rcx define(`up', `%rsi') C rdx define(`n_param', `%rdx') C r8 define(`v0_param',`%rcx') C r9 define(`n', `%rbp') define(`v0', `%rdx') ifdef(`OPERATION_addmul_1',` define(`ADDSUB', `add') define(`ADCSBB', `adc') define(`func', `mpn_addmul_1') ') ifdef(`OPERATION_submul_1',` define(`ADDSUB', `sub') define(`ADCSBB', `sbb') define(`func', `mpn_submul_1') ') ABI_SUPPORT(DOS64) ABI_SUPPORT(STD64) MULFUNC_PROLOGUE(mpn_addmul_1 mpn_submul_1) ASM_START() TEXT ALIGN(16) PROLOGUE(func) FUNC_ENTRY(4) push %rbx push %rbp push %r12 push %r13 mov n_param, n mov v0_param, v0 test $1, R8(n) jnz L(bx1) L(bx0): shr $2, n jc L(b10) L(b00): mulx( (up), %r13, %r12) mulx( 8,(up), %rbx, %rax) add %r12, %rbx adc $0, %rax mov (rp), %r12 mov 8(rp), %rcx mulx( 16,(up), %r9, %r8) lea -16(rp), rp lea 16(up), up ADDSUB %r13, %r12 jmp L(lo0) L(bx1): shr $2, n jc L(b11) L(b01): mulx( (up), %r11, %r10) jnz L(gt1) L(n1): ADDSUB %r11, (rp) mov $0, R32(%rax) adc %r10, %rax jmp L(ret) L(gt1): mulx( 8,(up), %r13, %r12) mulx( 16,(up), %rbx, %rax) lea 24(up), up add %r10, %r13 adc %r12, %rbx adc $0, %rax mov (rp), %r10 mov 8(rp), %r12 mov 16(rp), %rcx lea -8(rp), rp ADDSUB %r11, %r10 jmp L(lo1) L(b11): mulx( (up), %rbx, %rax) mov (rp), %rcx mulx( 8,(up), %r9, %r8) lea 8(up), up lea -24(rp), rp inc n C adjust n ADDSUB %rbx, %rcx jmp L(lo3) L(b10): mulx( (up), %r9, %r8) mulx( 8,(up), %r11, %r10) lea -32(rp), rp mov $0, R32(%rax) clc C clear cf jz L(end) C depends on old shift ALIGN(16) L(top): adc %rax, %r9 lea 32(rp), rp adc %r8, %r11 mulx( 16,(up), %r13, %r12) mov (rp), %r8 mulx( 24,(up), %rbx, %rax) lea 32(up), up adc %r10, %r13 adc %r12, %rbx adc $0, %rax mov 8(rp), %r10 mov 16(rp), %r12 ADDSUB %r9, %r8 mov 24(rp), %rcx mov %r8, (rp) ADCSBB %r11, %r10 L(lo1): mulx( (up), %r9, %r8) mov %r10, 8(rp) ADCSBB %r13, %r12 L(lo0): mov %r12, 16(rp) ADCSBB %rbx, %rcx L(lo3): mulx( 8,(up), %r11, %r10) mov %rcx, 24(rp) dec n jnz L(top) L(end): adc %rax, %r9 adc %r8, %r11 mov 32(rp), %r8 mov %r10, %rax adc $0, %rax mov 40(rp), %r10 ADDSUB %r9, %r8 mov %r8, 32(rp) ADCSBB %r11, %r10 mov %r10, 40(rp) adc $0, %rax L(ret): pop %r13 pop %r12 pop %rbp pop %rbx FUNC_EXIT() ret EPILOGUE()
test/Succeed/Issue3407.agda
cruhland/agda
1,989
7376
<filename>test/Succeed/Issue3407.agda data ⊥ : Set where record ⊤ : Set where data Bool : Set where false : Bool true : Bool True : Bool → Set True false = ⊥ True true = ⊤ Foo : (b : Bool) → True b → Set Foo true _ = ⊤ -- The problem rises because I have removed this impossible case. -- Foo false () test : (b : Bool) (t : True b) → Foo b t → ⊤ test true p x = _ test false p x = _
Kernel/drivers/asm/readkey.asm
agustinmorantes/TPE2SO
0
2744
GLOBAL readKeyRaw GLOBAL readKeyPoll readKeyRaw: mov rax,0 in al,0x64 and al,0x01 cmp al,0 jne .read mov rax,0 ret .read: in al,0x60 ret readKeyPoll: mov rax,0 .loop: in al,0x64 and al,0x01 cmp al,0 je .loop in al,0x60 ret
Examples/system/bootloader16/kernel.asm
agguro/linux-nasm
6
165062
;name: kernel.asm ; ;description: This is the "kernel" file which will be loaded by the bootloader. ; For the sake of simplicity it just displays a message on the screen. ; This "kernel" can on the other hand start memory management routines, loads ; a command prompt like DOS does or switch to protected mode or long mode for ; 64 bit operations. To make a long story short: here the main work starts. ; ;build: nasm -fbin kernel.asm -o kernel.bin bits 16 kernel: cli ;disable interrupts xor ax,ax mov ss,ax ;set stack segment and pointer mov sp,0xFFFF sti ;enable interrupts cld mov ax,0x2000 ;set all segments to match where kernel is loaded mov ds,ax ;after this, we don't need to bother with mov es,ax ;segments ever again,as its programs mov fs,ax ;live entirely in 64K mov gs,ax mov si,welcome pusha mov ah,0x0E ;int 10h teletype function .repeat: lodsb ;get char from string and al,al jz .done ;if char is zero, end of string int 0x10 ;otherwise, print it jmp .repeat ;and move on to next char .done: popa .loop: hlt jmp .loop welcome: db 'Kernel example by Agguro - Version 1.0.0.0', 10, 13, 0
test/Succeed/ImportWarningsB.agda
bennn/agda
0
4640
<reponame>bennn/agda module ImportWarningsB where -- all of the following files have warnings, which should be displayed -- when loading this file import Issue1988 import Issue2243 import Issue708quote import OldCompilerPragmas import RewritingEmptyPragma import Unreachable -- this warning will be ignored {-# REWRITE #-}
src/lib/math/fabs.asm
germix/sanos
57
16171
;----------------------------------------------------------------------------- ; fabs.asm - floating point absolute value ; Ported from <NAME>'s free C Runtime Library ;----------------------------------------------------------------------------- SECTION .text global fabs global _fabs fabs: _fabs: push ebp mov ebp,esp fld qword [ebp+8] ; Load real from stack fabs ; Take the absolute value pop ebp ret
programs/oeis/186/A186099.asm
neoneye/loda
22
21429
; A186099: Sum of divisors of n congruent to 1 or 5 mod 6. ; 1,1,1,1,6,1,8,1,1,6,12,1,14,8,6,1,18,1,20,6,8,12,24,1,31,14,1,8,30,6,32,1,12,18,48,1,38,20,14,6,42,8,44,12,6,24,48,1,57,31,18,14,54,1,72,8,20,30,60,6,62,32,8,1,84,12,68,18,24,48,72,1,74,38,31,20,96,14,80,6,1,42,84,8,108,44,30,12,90,6,112,24,32,48,120,1,98,57,12,31 seq $0,65330 ; a(n) = max { k | gcd(n, k) = k and gcd(k, 6) = 1 }. seq $0,4011 ; Theta series of D_4 lattice; Fourier coefficients of Eisenstein series E_{gamma,2}. div $0,24
test/asset/agda-stdlib-1.0/Data/Fin/Substitution/List.agda
omega12345/agda-mode
0
2286
------------------------------------------------------------------------ -- The Agda standard library -- -- Application of substitutions to lists, along with various lemmas ------------------------------------------------------------------------ -- This module illustrates how Data.Fin.Substitution.Lemmas.AppLemmas -- can be used. {-# OPTIONS --without-K --safe #-} open import Data.Fin.Substitution.Lemmas open import Data.Nat using (ℕ) module Data.Fin.Substitution.List {ℓ} {T : ℕ → Set ℓ} (lemmas₄ : Lemmas₄ T) where open import Data.List.Base open import Data.List.Properties open import Data.Fin.Substitution import Function as Fun open import Relation.Binary.PropositionalEquality open ≡-Reasoning private open module L = Lemmas₄ lemmas₄ using (_/_; id; _⊙_) infixl 8 _//_ _//_ : ∀ {m n} → List (T m) → Sub T m n → List (T n) ts // ρ = map (λ σ → σ / ρ) ts appLemmas : AppLemmas (λ n → List (T n)) T appLemmas = record { application = record { _/_ = _//_ } ; lemmas₄ = lemmas₄ ; id-vanishes = λ ts → begin ts // id ≡⟨ map-cong L.id-vanishes ts ⟩ map Fun.id ts ≡⟨ map-id ts ⟩ ts ∎ ; /-⊙ = λ {_ _ _ ρ₁ ρ₂} ts → begin ts // ρ₁ ⊙ ρ₂ ≡⟨ map-cong L./-⊙ ts ⟩ map (λ σ → σ / ρ₁ / ρ₂) ts ≡⟨ map-compose ts ⟩ ts // ρ₁ // ρ₂ ∎ } open AppLemmas appLemmas public hiding (_/_) renaming (_/✶_ to _//✶_)
Mail-archive/archive.scpt
cynikl/mac-scripts
0
4213
<filename>Mail-archive/archive.scpt -- based on -- http://support.indev.ca/kb/mao-advanced-techniques/applescript-to-archive-old-messages-in-current-mailbox set DestinFolderName to "Archive" -- mailbox to move messages to. If the account of a specific message does not have such a mailbox, no action will occur. set ArchiveDate to (current date) - (30 * days) tell application "Mail" set msgs to every message of message viewer 1 whose date received is less than ArchiveDate repeat with aMsg in msgs set acct to account of mailbox of aMsg -- see if the account of the message has an archive mailbox if name of every mailbox of acct contains DestinFolderName then -- if so, archive the message set archiveFolder to mailbox DestinFolderName of acct move aMsg to archiveFolder end if end repeat end tell
grammars/CIFLexer.g4
Sylvan-Materials/cifio
0
886
lexer grammar CIFLexer; DATA_ : [Dd] [Aa] [Tt] [Aa] Underscore ->pushMode(BlockHeadingMode); LOOP_ : Eol [Ll] [Oo] [Oo] [Pp] Underscore ; SAVE_ : Eol [Ss] [Aa] [Vv] [Ee] Underscore; Comments : Pound (OrdinaryChar|WhiteSpace|Dash|Double_Quote | Pound | Single_Quote | Semi | LBracket | RBracket)*; Tag : Eol Underscore OrdinaryChar(OrdinaryChar|Underscore|Dash|Numeric|Period|Double_Quote | Pound | Single_Quote | Semi | LBracket | RBracket)+; SingleQuotedString : Single_Quote ( '\\\'' | . )*? Single_Quote;//(OrdinaryChar|WhiteSpace|Space|Tab|Dash|Numeric|Period|Digit|'\\\'')+ Single_Quote; DoubleQuotedString : Double_Quote ( '\\"' | . )*? Double_Quote;//(OrdinaryChar|Space|Tab|'\\"')* Double_Quote; SemiColonTextField : Semi (.)+? Eol Semi;//Eol (WhiteSpace? (OrdinaryChar (OrdinaryChar|Space|Tab|Dash|Period|Underscore|Double_Quote|Single_Quote|Numeric)*)* Eol)* Semi ; Value : (Period | Questionmark | (OrdinaryChar|LBracket)(OrdinaryChar | LBracket | RBracket |Numeric|Period|Dash|Semi)* | Numeric); WhiteSpace : (TokenizedComments | Space | Tab)+ ; TokenizedComments : (Space | Tab | Eol)+ Comments+; Numeric : (Number | Number '(' UnsignedInteger ')' ); Number : (Float | Integer ); Float : ( ( (Plus|Dash) ? ( (Digit) * Period UnsignedInteger ) | (Digit) + Period ) | Integer Exponent ) (Exponent) ? ; fragment Exponent : (('e' | 'E' ) | ('e' | 'E' )( Plus | Dash )) UnsignedInteger; Integer : ( Plus | Dash )? UnsignedInteger; UnsignedInteger : ( Digit )+; Eol : '\n\r'|'\n'|'\r'; Semi : ';'; Pound : '#'; //Dollar : '$'; Underscore : '_'; Period : '.'; Questionmark : '?'; fragment LBracket : '['; fragment RBracket : ']'; Plus : '+'; Dash : '-'; Space : ' '; Tab : '\t'; Double_Quote : '"'; Single_Quote : '\''; OrdinaryChar : ( [a-z] | [A-Z] | '!' | '%' | '&' | '(' | ')' | '*' | Plus | ',' | Dash | Period | '/' | Digit | ':' | '<' | '=' | '>' | Questionmark | '@' | '\\' | '^' | '`' | '{' | '|' | '}' | '~' | '$' ) ; fragment Digit : '0'..'9'; //mode ANY; mode BlockHeadingMode; BHText : (OrdinaryChar|Dash|Underscore|Numeric|Double_Quote | Pound | Single_Quote | Semi | LBracket | RBracket)+ ->popMode;
src/SingleSorted/Example.agda
cilinder/formaltt
21
10792
<reponame>cilinder/formaltt module SingleSorted.Example where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open import Data.Product using (_×_; proj₁; proj₂; <_,_>; ∃; ∃-syntax; _,_) import Function using (_∘_) open import SingleSorted.AlgebraicTheory open import Categories.Category.Instance.Sets open import Categories.Category.Cartesian open import Agda.Primitive open import Categories.Category module Sets₀ where 𝒮 : Category (lsuc lzero) lzero lzero 𝒮 = Sets lzero open Sets₀ open Category 𝒮 -- Function extensionality postulate funext : ∀ {X : Set} {Y : X → Set} {f g : ∀ (x : X) → (Y x)} → (∀ (x : X) → ((f x) ≡ (g x))) → (f ≡ g) record singleton : Set where constructor ⋆ η-singleton : ∀ (x : singleton) → ⋆ ≡ x η-singleton ⋆ = refl prod-elem-structure : ∀ {A B : Set} {x : A × B} → ∃[ a ] ∃[ b ] (a , b) ≡ x prod-elem-structure {A} {B} {x} = proj₁ x Data.Product., (proj₂ x) , refl first-factor : ∀ {X A B : Obj} {f : X ⇒ A} {g : X ⇒ B} → proj₁ ∘ < f , g > ≡ f first-factor {X} {A} {B} {f} {g} = funext λ x → refl second-factor : ∀ {X A B : Obj} {f : X ⇒ A} {g : X ⇒ B} → proj₂ ∘ < f , g > ≡ g second-factor {X} {A} {B} {f} {g} = funext λ{ x → refl} unique-map-into-product : ∀ {X A B : Set} {h : X → A × B} {f : X → A} {g : X → B} {x : X} → (proj₁ ∘ h) x ≡ f x → (proj₂ ∘ h) x ≡ g x -------------------- → < f , g > x ≡ h x unique-map-into-product {X} {A} {B} {h} {f} {g} {x} eq1 eq2 rewrite first-factor {X} {A} {B} {f} {g} | second-factor {X} {A} {B} {f} {g} = {!!} cartesian-Sets : Cartesian 𝒮 cartesian-Sets = record { terminal = record { ⊤ = singleton ; ⊤-is-terminal = record { ! = λ{ x → ⋆} ; !-unique = λ{ f {x} → η-singleton (f x)} } } ; products = record { product = λ {A} {B} → record { A×B = A × B ; π₁ = proj₁ ; π₂ = proj₂ ; ⟨_,_⟩ = <_,_> ; project₁ = λ{ → refl} ; project₂ = λ{ → refl} ; unique = λ{ {X} {h} {f} {g} eq1 eq2 {x} → {!!}} } } }
data/phone/text/kenji_caller.asm
Dev727/ancientplatinum
28
105497
UnknownText_0x66dab: text "Anyway, we'll chat" line "again!" done UnknownText_0x66dc5: text "Are you still on" line "your journey?" para "I remain dedicated" line "to my training." para "Oooooaaarrrgh!" done UnknownText_0x66e17: text "I'm in training" line "now. I apologize," para "but call me back" line "another time." para "Oooooaaarrrgh!" done UnknownText_0x66e67: text "I apologize, but I" line "don't have time to" para "chat while I am in" line "training!" para "I'll have time to" line "chat tomorrow!" para "Yiiihah!" done UnknownText_0x66ed3: text "I plan to take a" line "lunch break, so" para "come see me then!" line "Ayiiiyah!" done KenjiBreakText: text "I'm taking a break" line "on ROUTE 45!" para "Why not drop by if" line "you are free?" done UnknownText_0x66f52: text "I rested up over" line "my lunch break." para "Now it's time to" line "resume training!" para "Oooryaah!" done
source/nodes/program-nodes-identifiers-set_defining_name.adb
reznikmm/gela
0
17055
<reponame>reznikmm/gela -- SPDX-FileCopyrightText: 2020-2021 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- procedure Program.Nodes.Identifiers.Set_Defining_Name (Self : not null Program.Elements.Identifiers.Identifier_Access; Value : Program.Elements.Defining_Identifiers.Defining_Identifier_Access) is begin Base_Identifier (Self.all).Corresponding_Defining_Identifier := Value; end Program.Nodes.Identifiers.Set_Defining_Name;
modules/int_temp0.asm
antuniooh/assembly-calculator
2
178222
<filename>modules/int_temp0.asm<gh_stars>1-10 org 0003h INT_TEMP0: MOV A, 70h CALL INCREMENT_CURSOR ACALL SUM CLR IE0 MOV R0, #0Ch MOV A, #50h ADD A, R0 MOV R0, A MOV A, @R0 ACALL CONTINUECODE
programs/oeis/131/A131669.asm
neoneye/loda
22
160252
; A131669: Odd digits followed by positive even digits. ; 1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8,1,3,5,7,9,2,4,6,8 mul $0,2 mod $0,9 add $0,1
ADL/devices/stm32-rcc.ads
JCGobbi/Nucleo-STM32G474RE
0
23716
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. 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. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- 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. -- -- -- ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); package STM32.RCC is procedure AHB_Force_Reset with Inline; procedure AHB_Release_Reset with Inline; procedure APB1_Force_Reset with Inline; procedure APB1_Release_Reset with Inline; procedure APB2_Force_Reset with Inline; procedure APB2_Release_Reset with Inline; procedure Backup_Domain_Reset; -- Disable LSE clock and RTC and reset its configurations. --------------------------------------------------------------------------- -- Clock Configuration -------------------------------------------------- --------------------------------------------------------------------------- --------------- -- HSE Clock -- --------------- procedure Set_HSE_Clock (Enable : Boolean; Bypass : Boolean := False; Enable_CSS : Boolean := False) with Post => HSE_Clock_Enabled = Enable; function HSE_Clock_Enabled return Boolean; --------------- -- LSE Clock -- --------------- type HSE_Capability is (Lowest_Drive, Low_Drive, High_Drive, Highest_Drive) with Size => 2; procedure Set_LSE_Clock (Enable : Boolean; Bypass : Boolean := False; Enable_CSS : Boolean := False; Capability : HSE_Capability) with Post => LSE_Clock_Enabled = Enable; function LSE_Clock_Enabled return Boolean; --------------- -- HSI Clock -- --------------- procedure Set_HSI_Clock (Enable : Boolean) with Post => HSI_Clock_Enabled = Enable; -- The HSI clock can't be disabled if it is used directly (via SW mux) as -- system clock or if the HSI is selected as reference clock for PLL with -- PLL enabled (PLLON bit set to ‘1’). It is set by hardware if it is used -- directly or indirectly as system clock. function HSI_Clock_Enabled return Boolean; ----------------- -- HSI48 Clock -- ----------------- procedure Set_HSI48_Clock (Enable : Boolean) with Post => HSI48_Clock_Enabled = Enable; function HSI48_Clock_Enabled return Boolean; --------------- -- LSI Clock -- --------------- procedure Set_LSI_Clock (Enable : Boolean) with Post => LSI_Clock_Enabled = Enable; function LSI_Clock_Enabled return Boolean; ------------------ -- System Clock -- ------------------ type SYSCLK_Clock_Source is (SYSCLK_SRC_HSI, SYSCLK_SRC_HSE, SYSCLK_SRC_PLL) with Size => 2; for SYSCLK_Clock_Source use (SYSCLK_SRC_HSI => 2#01#, SYSCLK_SRC_HSE => 2#10#, SYSCLK_SRC_PLL => 2#11#); procedure Configure_System_Clock_Mux (Source : SYSCLK_Clock_Source); ------------------------ -- AHB and APB Clocks -- ------------------------ type AHB_Prescaler_Enum is (DIV_2, DIV_4, DIV_8, DIV_16, DIV_64, DIV_128, DIV_256, DIV_512) with Size => 3; type AHB_Prescaler is record Enable : Boolean := False; Value : AHB_Prescaler_Enum := AHB_Prescaler_Enum'First; end record with Size => 4; for AHB_Prescaler use record Enable at 0 range 3 .. 3; Value at 0 range 0 .. 2; end record; procedure Configure_AHB_Clock_Prescaler (Value : AHB_Prescaler); -- The AHB clock bus is the CPU clock selected by the AHB prescaler. -- Example to create a variable: -- AHB_PRE : AHB_Prescaler := (Enable => True, Value => DIV_2); type APB_Prescaler_Enum is (DIV_2, DIV_4, DIV_8, DIV_16) with Size => 2; type APB_Prescaler is record Enable : Boolean; Value : APB_Prescaler_Enum := APB_Prescaler_Enum'First; end record with Size => 3; for APB_Prescaler use record Enable at 0 range 2 .. 2; Value at 0 range 0 .. 1; end record; type APB_Clock_Range is (APB_1, APB_2); procedure Configure_APB_Clock_Prescaler (Bus : APB_Clock_Range; Value : APB_Prescaler); -- The APB1 clock bus is the APB1 peripheral clock selected by the APB1 -- prescaler. -- The APB2 clock bus is the APB2 peripheral clock selected by the APB2 -- prescaler. -- Example to create a variable: -- APB_PRE : APB_Prescaler := (Enable => True, Value => DIV_2); ---------------- -- PLL Clocks -- ---------------- type PLL_Clock_Source is (PLL_No_Source_PWR_OFF, PLL_No_Source, PLL_SRC_HSI, PLL_SRC_HSE) with Size => 2; for PLL_Clock_Source use (PLL_No_Source_PWR_OFF => 2#00#, PLL_No_Source => 2#01#, PLL_SRC_HSI => 2#10#, PLL_SRC_HSE => 2#11#); procedure Configure_PLL_Source_Mux (Source : PLL_Clock_Source); subtype PLLM_Range is Integer range 1 .. 16; subtype PLLN_Range is Integer range 8 .. 127; subtype PLLP_Range is Integer range 2 .. 31; subtype PLLQ_Range is Integer range 2 .. 8 with Static_Predicate => (case PLLQ_Range is when 2 | 4 | 6 | 8 => True, when others => False); subtype PLLR_Range is Integer range 2 .. 8 with Static_Predicate => (case PLLR_Range is when 2 | 4 | 6 | 8 => True, when others => False); procedure Configure_PLL (Enable : Boolean; PLLM : PLLM_Range; PLLN : PLLN_Range; PLLP : PLLP_Range; Enable_Output_P : Boolean; PLLQ : PLLQ_Range; Enable_Output_Q : Boolean; PLLR : PLLR_Range; Enable_Output_R : Boolean); -- Configure PLL according with RM0440 rev 6 Chapter 7.2.4 section "PLL" -- pg 282. ------------------- -- Output Clocks -- ------------------- type MCO_Clock_Source is (MCOSEL_Disabled, MCOSEL_SYSCLK, MCOSEL_HSI, MCOSEL_HSE, MCOSEL_PLL, MCOSEL_LSI, MCOSEL_LSE, MCOSEL_HSI48) with Size => 4; for MCO_Clock_Source use (MCOSEL_Disabled => 2#0000#, MCOSEL_SYSCLK => 2#0001#, MCOSEL_HSI => 2#0011#, MCOSEL_HSE => 2#0100#, MCOSEL_PLL => 2#0101#, MCOSEL_LSI => 2#0110#, MCOSEL_LSE => 2#0111#, MCOSEL_HSI48 => 2#1000#); type MCO_Prescaler is (MCOPRE_DIV1, MCOPRE_DIV2, MCOPRE_DIV4, MCOPRE_DIV8, MCOPRE_DIV16) with Size => 3; for MCO_Prescaler use (MCOPRE_DIV1 => 2#000#, MCOPRE_DIV2 => 2#001#, MCOPRE_DIV4 => 2#010#, MCOPRE_DIV8 => 2#011#, MCOPRE_DIV16 => 2#100#); procedure Configure_MCO_Output_Clock (Source : MCO_Clock_Source; Value : MCO_Prescaler); -- Select the source for micro-controller clock output. type LSCO_Clock_Source is (LSI, LSE); procedure Configure_LSCO_Output_Clock (Enable : Boolean; Source : LSCO_Clock_Source := LSCO_Clock_Source'First); ------------------ -- Flash Memory -- ------------------ -- Flash wait states type FLASH_Wait_State is (FWS0, FWS1, FWS2, FWS3, FWS4) with Size => 4; procedure Set_FLASH_Latency (Latency : FLASH_Wait_State); -- Constants for Flash Latency -- with VCORE Range 1 boost mode | Range 1 normal mode -- 000: Zero wait state 0 < HCLK ≤ 34 MHz | 0 < HCLK ≤ 30 MHz -- 001: One wait state 34 < HCLK ≤ 68 MHz | 30 < HCLK ≤ 60 MHz -- 010: Two wait sates 68 < HCLK ≤ 102 MHz | 60 < HCLK ≤ 90 MHz -- 011: Three wait sates 102 < HCLK ≤ 136 MHz | 90 < HCLK ≤ 120 MHz -- 100: Four wait sates 136 < HCLK ≤ 170 MHz | 120 < HCLK ≤ 150 MHz -- RM0440 STM32G474 pg. 97 chapter 3.3.3 and pg. 129 chapter 3.7.1 ------------------- -- VCORE Scaling -- ------------------- type VCORE_Scaling_Selection is (Range_1, Range_2); for VCORE_Scaling_Selection use (Range_1 => 2#01#, Range_2 => 2#10#); procedure Set_VCORE_Scaling (Scale : VCORE_Scaling_Selection); -- Range 2 => PLL max. is 26 MHz, -- Range 1 => PLL max. is 150 MHz, -- Range 1 boost => PLL max. is 170 MHz, -- See RM0440 rev 6 Chapter 7.2.8 for frequency x voltage scaling. procedure PWR_Overdrive_Enable; -- Range 1 boost mode (R1MODE = 0) when SYSCLK ≤ 170 MHz. -- Range 1 normal mode (R1MODE = 1) when SYSCLK ≤ 150 MHz. -- See RM0440 ver 4 pg. 235 chapter 6.1.5 for other modes. end STM32.RCC;
src/libYARP_dev/56f807/cotroller_dc/Support/dispatch_x0.asm
robotology-legacy/yarp1
0
15072
<filename>src/libYARP_dev/56f807/cotroller_dc/Support/dispatch_x0.asm ;============================================================= ;=== FILE: dispatch_x0.asm ;=== ;=== Copyright (c)1998 Metrowerks, Inc. All rights reserved. ;============================================================= ; Recommended tab stop = 8. ;=============================================================================== ; SECTION: the floating point code SECTION fp_engine OPT CC GLOBAL ARTdispatch_x0 ; used in floating point library jump tables ARTdispatch_x0: ; TRICK: Avoid mysterious "add x0,x:(sp-1)", which ; seems to malfunction. It trashes x0 anyway (!) ; and fools the debugger when stepping. add x:(sp-1),x0 move x0,x:(sp-1) rts ENDSEC
test/Succeed/DefinitionalEquality.agda
shlevy/agda
1,989
17017
<reponame>shlevy/agda module DefinitionalEquality where data _==_ {A : Set}(x : A) : A -> Set where refl : x == x subst : {A : Set}(P : A -> Set){x y : A} -> x == y -> P y -> P x subst {A} P refl p = p data Nat : Set where zero : Nat suc : Nat -> Nat _+_ : Nat -> Nat -> Nat zero + m = m suc n + m = suc (n + m) -- This formulation of the associativity law guarantees that for closed n, but -- possibly open m and p the law holds definitionally. assoc : (n : Nat) -> (\m p -> n + (m + p)) == (\m p -> (n + m) + p) assoc zero = refl assoc (suc n) = subst (\ ∙ -> f ∙ == f (\m p -> ((n + m) + p))) (assoc n) refl where f = \(g : Nat -> Nat -> Nat)(m p : Nat) -> suc (g m p)
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_338.asm
ljhsiun2/medusa
9
165919
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r8 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x18945, %rsi lea addresses_WC_ht+0x7cd7, %rdi nop nop nop nop nop inc %rax mov $34, %rcx rep movsb nop nop nop and $32312, %rdi lea addresses_WT_ht+0x12f45, %r8 nop nop nop nop and %rbp, %rbp mov $0x6162636465666768, %r15 movq %r15, (%r8) nop nop nop nop xor %r15, %r15 lea addresses_WC_ht+0x8ec5, %rcx clflush (%rcx) nop nop dec %rax mov $0x6162636465666768, %r15 movq %r15, (%rcx) nop dec %rax lea addresses_A_ht+0x7fcd, %rcx nop nop nop inc %r15 movw $0x6162, (%rcx) add %rcx, %rcx lea addresses_WC_ht+0x1c52d, %rax nop nop nop nop lfence movl $0x61626364, (%rax) nop nop nop nop nop dec %rax lea addresses_UC_ht+0xa199, %rsi nop nop nop nop nop dec %rdi mov $0x6162636465666768, %r8 movq %r8, (%rsi) nop nop nop nop sub %r8, %r8 lea addresses_normal_ht+0x172f9, %rsi lea addresses_normal_ht+0x9335, %rdi nop nop nop nop nop xor %r14, %r14 mov $52, %rcx rep movsb nop inc %r14 lea addresses_normal_ht+0xfa2d, %rsi lea addresses_UC_ht+0xc7cb, %rdi nop and %r8, %r8 mov $65, %rcx rep movsl nop nop nop nop nop cmp $48518, %rcx lea addresses_UC_ht+0x18217, %rsi and %rcx, %rcx mov (%rsi), %r8 nop and %rcx, %rcx lea addresses_UC_ht+0x2bcb, %rbp xor $13710, %r8 mov $0x6162636465666768, %r15 movq %r15, %xmm0 movups %xmm0, (%rbp) nop sub $56631, %rsi lea addresses_WC_ht+0x1be45, %rax nop nop nop dec %rsi movl $0x61626364, (%rax) nop nop inc %rbp lea addresses_normal_ht+0x10d45, %r14 nop nop nop nop nop sub $46356, %rbp mov (%r14), %eax nop nop nop cmp $61686, %r14 lea addresses_normal_ht+0x1b545, %rsi lea addresses_UC_ht+0x1785, %rdi xor %rax, %rax mov $70, %rcx rep movsq sub %rax, %rax lea addresses_WC_ht+0x5785, %rsi lea addresses_WC_ht+0x1442f, %rdi clflush (%rsi) xor %r8, %r8 mov $103, %rcx rep movsw nop nop nop xor $31600, %rbp pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %r8 push %rbx push %rdi push %rdx // Faulty Load lea addresses_UC+0x17945, %r13 nop add $14489, %r15 movb (%r13), %bl lea oracles, %rdx and $0xff, %rbx shlq $12, %rbx mov (%rdx,%rbx,1), %rbx pop %rdx pop %rdi pop %rbx pop %r8 pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': True, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8}} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}} {'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 */
picovm/asm-src/logical-instructions.asm
seanmcelroy/picovm
0
13473
<reponame>seanmcelroy/picovm section .text global _start ; must be declared for using gcc _start: ; tell linker entry point mov ax, 8h ; getting 8 in the ax (EVEN) and ax, 1 ; and ax with 1 jz evnn mov eax, 4 ; system call number (sys_write) mov ebx, 1 ; file descriptor (stdout) mov ecx, odd_msg ; message to write mov edx, len2 ; length of message int 0x80 ; call kernel jmp outprog evnn: mov ah, 09h mov eax, 4 ; system call number (sys_write) mov ebx, 1 ; file descriptor (stdout) mov ecx, even_msg ; message to write mov edx, len1 ; length of message int 0x80 ; call kernel outprog: mov eax,1 ; system call number (sys_exit) int 0x80 ; call kernel section .data even_msg db 'Even Number!' ; message showing even number len1 equ $ - even_msg odd_msg db 'Odd Number!' ; message showing odd number len2 equ $ - odd_msg
Appl/WClock/wcMain.asm
steakknife/pcgeos
504
164476
<reponame>steakknife/pcgeos COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Palm Computing, Inc. 1992 -- All Rights Reserved PROJECT: PEN GEOS MODULE: World Clock FILE: wcMain.asm AUTHOR: <NAME>, Oct 15, 1992 REVISION HISTORY: Name Date Description ---- ---- ----------- rsf 10/15/92 Initial revision pam 10/16/96 Added Penelope specific changes. DESCRIPTION: ROUTINES: MSG_META_EXPOSED (WorldClockViewExposed) MSG_NOTIFY_DATE_TIME_CHANGE (WorldClockNotifyTimeDateChange) DisplayUserMessage if not _PENELOPE WorldClockMarkAppNotBusy WorldClockMarkAppBusy endif $Id: wcMain.asm,v 1.1 97/04/04 16:21:58 newdeal Exp $ $Id: wcMain.asm,v 1.1 97/04/04 16:21:58 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;------------------------------------------------------------------------------ ; Common GEODE stuff ;------------------------------------------------------------------------------ include wcGeode.def include wcApplication.def idata segment WorldClockApplicationClass ;declare the class CustomApplyInteractionClass GenFastInteractionClass GenNotSmallerThanWorldMapInteractionClass OptionsInteractionClass SpecialSizePrimaryClass idata ends include wc.rdef ;------------------------------------------------------------------------------ ; Class definition ;------------------------------------------------------------------------------ idata segment WorldClockProcessClass mask CLASSF_NEVER_SAVED ;; method PROC_NAME, CLASS_NAME, MSG_NAME ;------------------------------------------------------------------------------ ; GeoCalcProcessInstance ;------------------------------------------------------------------------------ ;procVars WorldClockProcessInstance <, ; Meta instance ;> RestoreStateBegin label byte changeCity CityPlaces mask HOME_CITY homeCityPtr word CITY_NOT_SELECTED homeCityTimeZone sword 0 homeCityX word 0 homeCityY word 0 destCityPtr word CITY_NOT_SELECTED destCityTimeZone sword 0 destCityX word 0 destCityY word 0 selectedTimeZone sword 0 citySummerTime CityPlaces NO_CITY systemClockCity CityPlaces mask HOME_CITY ;Whether the city being selected is from the listbox or is a ;user city. In Penelope, also used to determine whether the ;city listbox is sorted by city or by country. citySelection CitySelection 0 userCities CityPlaces NO_CITY ;cities using user city userCityTimeZone sword 0 userCityX word 0 userCityY word 0 userCityName TCHAR (USER_CITY_NAME_LENGTH_MAX + 1 + 8) dup (0) userCityMode byte FALSE ;picking city location from map ; The following are not determinable if the app starts up minimized ; since the deciding code is in the ui and decides from information ; in the non-minimized ui. We use the last known accurate values. haveTitleBar byte FALSE;is the primary's title displayed? formfactor ComputingDevice mask CD_UNKNOWN uiMinimized byte FALSE ; not minimized on startup ; ; The user may select a place for the user city and then cancel ; the action. These variables hold the user city's location until ; the user applies the choice. ; tempUserCityX word tempUserCityY word userSelectedCity word ; city last selected by user ; from the selection lists RestoreStateEnd label byte currentCountry word GIGS_NONE timerHandle hptr 0 destCityBlinkDrawn byte FALSE destCityCanBlink byte TRUE blinkerX word 0 blinkerY word 0 uiSetupSoUpdatingUIIsOk byte FALSE ; used to avoid using invalid ; handles during setup. Waits ; until ok. Also used to ; supress ui updating during ; shutdown because handles ; become invalid unorderly. blinkerCountOfBlinksLeftToDisplayBlinkerBecauseItJustMoved byte 0 ;used when moving the blinker ;guarantees blinker visible for at ;least one entire blink. This makes ;blinker visible on moves. See ;BlinkerMove in wcUI.asm. dataFileLoaded byte FALSE LocalDefNLString dataFilePath <"WCLOCK", 0> LocalDefNLString dataFileName <"WORLD.WCM", 0> idata ends ;------------------------------------------------------------------------------ ; Unitialized data ;------------------------------------------------------------------------------ udata segment winHandle hptr.Window ; variables for the city information cityInfoHandle hptr ; global block handle cityInfoSize word ; City Info size cityIndexHandle hptr ; global block handle cityNamesIndexHandle hptr ;chunk handle in cityIndexHandle countryCityNamesIndexHandle hptr ;chunk handle in cityIndexHandle countryNamesIndexHandle hptr ;chunk handle in cityIndexHandle firstCityInCountry word ; both for converting between cityInCountryCount word ; the city and ; country/city lists timeZoneInfoHandle hptr ; heap handle to block worldMapBitmapHandle hptr ; heap handle to block daylightStart word ;last calculated start position minuteCountdown word ;remaining timer ticks in minute ; the user may select a place for their user city and then cancel ; the action. These variables hold the user city's location until ; the user applys their choice. ; tempUserCityX word ; tempUserCityY word ; userSelectedCity word ; city last selected by user ; from the selection lists ; these values are read in from the data file. ; THE ORDER OF THESE MATCHES THEIR ORDER IN THE DATA FILE! DataFileVariablesBegin label byte versionWCM word ; data file version number datelinePosition sword ; position of the ; dateline in pixels worldWidth word ; width of world; may be larger ; than the map timeZoneCount word defaultHomeCity word ; city to use at startup defaultDestinationCity word ; city to use at startup defaultTimeZone word ; time zone of the default home city DataFileVariablesEnd label byte ; ;This variable is not used in any version so it causes a ;compiler warning. It's needed because of the data file format. ; ForceRef datelinePosition udata ends ;------------------------------------------------------------------------------ ; Code Resources ;------------------------------------------------------------------------------ include wcInitFile.asm include wcInit.asm include wcUI.asm include wcLists.asm ;if _PENELOPE include wcUser.asm include wcAlarm.asm ;endif CommonCode segment resource COMMENT @---------------------------------------------------------------------- FUNCTION: WorldClockExposedView -- MSG_META_EXPOSED for WorldClockProcessClass DESCRIPTION: Draw the world map bitmap in the genView PASS: ds - core block of geode es - core block di - MSG_EXPOSED cx - window dx - ? bp - ? si - ? REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- rsf 10/15 Initial version ------------------------------------------------------------------------------@ WorldClockViewExposed method WorldClockProcessClass, MSG_META_EXPOSED FXIP < GetResourceSegmentNS dgroup, es > EC < call ECCheckDGroupES > EC < call ECCheckDGroupDS ; don't draw the bitmap if there isn't one! Prevents a handle error. cmp es:[dataFileLoaded], TRUE LONG jne done mov di, cx ;set ^hdi = window handle call GrCreateState ;returns gstate in di ;Updating the window... call GrBeginUpdate call WorldClockUpdateDaylightBar ; Draw the world map bitmap in the view mov bx, es:[worldMapBitmapHandle] call MemLock mov ds, ax ;world map resource segment clr ax, dx, si ;bitmap at offset 0 mov bx, DAYLIGHT_AREA_HEIGHT ;bitmap at 0, DAYLIGHT_AREA_HEIGHT call GrDrawBitmap mov bx, es:[worldMapBitmapHandle] call MemUnlock ; have drawn the bitmap ; now it's time to draw a time zone if one's selected ; we prefer a look of partially inversion as opposed to 100% cmp es:[selectedTimeZone], NO_TIME_ZONE je selectedTimeZoneUpdated mov al, SDM_12_5 call GrSetAreaMask ; invert the time zones mov al, MM_INVERT call GrSetMixMode ; lock the time zone block mov bx, es:[timeZoneInfoHandle] call MemLock mov ds, ax mov ax, es:[selectedTimeZone] call WorldMapDrawTimeZone call MemUnlock selectedTimeZoneUpdated: call GrEndUpdate ;done updating... call GrDestroyState ;destroy our gstate ; There is a problem with the blinker when restoring from minimized ; state. uiMinimized is turned false. The blinker blinks and thinks ; it's drawn, This view exosed event is handled erasing the blinker. ; The blinker blinks, leaving an image, but turning off. To fix ; we indicate the blinker is no longer drawn. mov es:[destCityBlinkDrawn], FALSE done: ret WorldClockViewExposed endm COMMENT @------------------------------------------------------------------ METHOD: MSG_NOTIFY_DATE_TIME_CHANGE for WorldClockProcessClass DESCRIPTION: PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- rsf 10/23/92 Initial version ----------------------------------------------------------------------------@ WorldClockNotifyTimeDateChange method WorldClockProcessClass, MSG_NOTIFY_DATE_TIME_CHANGE .enter mov di, offset WorldClockProcessClass call ObjCallSuperNoLock call WorldClockCalibrateClock call WorldClockUpdateTimeDates .leave ret WorldClockNotifyTimeDateChange endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DisplayUserMessage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Display the world clock error box!! CALLED BY: GLOBAL (MSG_WC_DISPLAY_USER_MESSAGE, MSG_WC_DISPLAY_USER_MESSAGE_OPTR) or directly PASS: ES = DGroup BP = WCErrorValue CX:DX = Possible data for first string argument (fixed or optr) BX:SI = Possible data for second string argument (fixed or optr) RETURN: AX = InteractionCommand from error box DESTROYED: BX, DI, SI PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Must be running in the world clock process thread!! REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/3/90 Initial version Don 7/17/90 Added support for string arguments rsf 9/19/92 Copied into world clock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DisplayUserMessage method WorldClockProcessClass, \ MSG_WC_DISPLAY_USER_MESSAGE, MSG_WC_DISPLAY_USER_MESSAGE_OPTR uses bp, ds .enter push ax ; save the msg type ; Some set-up work ; ; test es:[systemStatus], SF_DISPLAY_ERRORS ; jz done ; jump to not display errors push bx, si ; save second string arguments GetResourceHandleNS ErrorBlock, bx call MemLock ; lock the block mov ds, ax ; set up the segment mov si, offset ErrorBlock:ErrorArray ; handle of error messages mov si, ds:[si] ; dereference the handle EC < cmp bp, WCUserErrorValue > EC < ERROR_GE WC_ERROR_BAD_DISPLAY_ERROR_VALUE > ; Put up the error box (always warning for now) ; add si, bp ; go to the correct messages mov ax, ds:[si+2] ; custom values => AX mov di, ds:[si] ; text handle => DI pop bx, si ; restore second string args pop bp sub sp, size StandardDialogParams push bp mov bp, sp add bp, size word mov ss:[bp].SDP_customFlags, ax mov ss:[bp].SDP_stringArg1.segment, cx mov ss:[bp].SDP_stringArg1.offset, dx mov ss:[bp].SDP_stringArg2.segment, bx mov ss:[bp].SDP_stringArg2.offset, si clr ax mov ss:[bp].SDP_customTriggers.segment, ax mov ss:[bp].SDP_customTriggers.offset, ax mov ss:[bp].SDP_helpContext.segment, ax ; no help context mov ss:[bp].SDP_helpContext.offset, ax ;no custom triggers GetResourceHandleNS ErrorBlock, bx pop ax cmp ax, MSG_WC_DISPLAY_USER_MESSAGE_OPTR je argsAreChunks ; pass params on stack mov ss:[bp].SDP_customString.segment, ds mov di, ds:[di] ; dereference message string mov ss:[bp].SDP_customString.offset, di call UserStandardDialog ; put up the dialog box call MemUnlock ; unlock the block after call jmp dialogGone argsAreChunks: call MemUnlock ; unlock the block before call mov ss:[bp].SDP_customString.segment, bx mov ss:[bp].SDP_customString.offset, di call UserStandardDialogOptr ; put up the dialog box dialogGone: ; Clean up ; ;done: .leave ret DisplayUserMessage endp COMMENT @------------------------------------------------------------------- FUNCTION: WorldClockMarkAppNotBusy DESCRIPTION: Remove busy cursor after things have finished. CALLED BY: PASS: RETURN: nothing DESTROYED: ax, bx, si, di PSEUDO CODE/STRATEGY: This forces the message onto the end of the queue so that everything else finishes first. REVISION HISTORY: Name Date Description ---- ---- ----------- rsf 6/16/93 Initial version ----------------------------------------------------------------------------@ WorldClockMarkAppNotBusy proc near ObjSend MSG_GEN_APPLICATION_MARK_NOT_BUSY, WorldClockApp, <mask MF_FORCE_QUEUE> ret WorldClockMarkAppNotBusy endp COMMENT @------------------------------------------------------------------- FUNCTION: WorldClockMarkAppBusy DESCRIPTION: Display busy cursor immeadiately CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- rsf 6/16/93 Initial version ----------------------------------------------------------------------------@ WorldClockMarkAppBusy proc near ObjCall MSG_GEN_APPLICATION_MARK_BUSY, WorldClockApp ret WorldClockMarkAppBusy endp COMMENT @------------------------------------------------------------------ METHOD: MSG_GEN_APPLICATION_MARK_BUSY for WorldClockApplicationClass DESCRIPTION: Mark the application busy only if the event queue is empty This solves problems with the application being marked not busy but when lots of work remains in the queue (because of list initializing). PASS: nothing RETURN: nothing DESTROYED: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- rsf 6/16/93 Initial version ----------------------------------------------------------------------------@ ifdef foo ; ; This code commented out because it seems to leave the cursor ; busy more than it should. rsf 6/18/93 WorldClockApplicationMarkNotBusy method dynamic WorldClockApplicationClass, \ MSG_GEN_APPLICATION_MARK_NOT_BUSY .enter clr bx call GeodeInfoQueue cmp ax, 0 je callSuperClass ; The queue isn't empty. Delay marking not busy by not doing it ; now and placing it on the end of the queue again. call WorldClockMarkAppNotBusy jmp done callSuperClass: mov ax, MSG_GEN_APPLICATION_MARK_NOT_BUSY mov di, offset WorldClockApplicationClass call ObjCallSuperNoLock done: .leave ret WorldClockApplicationMarkNotBusy endm endif CommonCode ends
PRG/levels/Airship/W2A.asm
narfman0/smb3_pp1
0
82858
<gh_stars>0 ; Original address was $AEAB ; World 2 Airship .word W2Airship_BossL ; Alternate level layout .word W2Airship_BossO ; Alternate object layout .byte LEVEL1_SIZE_08 | LEVEL1_YSTART_0B0 .byte LEVEL2_BGPAL_01 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_80 .byte LEVEL3_TILESET_10 | LEVEL3_VSCROLL_LOCKLOW | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX(10) | LEVEL4_INITACT_AIRSHIPB .byte LEVEL5_BGM_AIRSHIP | LEVEL5_TIME_300 .byte $0A, $1B, $97, $0A, $25, $97, $0D, $39, $94, $0D, $41, $9A, $0D, $54, $9A, $0C .byte $04, $19, $0D, $05, $19, $0E, $06, $19, $0F, $07, $20, $15, $10, $08, $20, $14 .byte $11, $0A, $30, $0B, $0C, $04, $03, $0D, $05, $03, $0E, $06, $03, $0F, $07, $03 .byte $50, $08, $0A, $51, $0A, $0B, $0D, $09, $04, $09, $1A, $1C, $0A, $1D, $15, $0B .byte $1E, $14, $0C, $1F, $1A, $09, $1A, $03, $0A, $1D, $03, $0B, $1E, $03, $0C, $1F .byte $03, $0D, $15, $41, $0C, $18, $42, $08, $1B, $05, $0B, $18, $01, $0D, $15, $01 .byte $10, $24, $20, $16, $11, $27, $20, $10, $12, $28, $1E, $13, $29, $1D, $10, $24 .byte $03, $11, $27, $03, $12, $28, $03, $13, $29, $03, $0E, $2F, $41, $08, $25, $05 .byte $0A, $20, $0C, $0B, $29, $01, $0D, $25, $A0, $0D, $2F, $01, $71, $2D, $64, $0C .byte $38, $1A, $0D, $3B, $14, $0E, $3C, $13, $0C, $38, $03, $0D, $3B, $03, $0E, $3C .byte $03, $0D, $33, $A2, $0B, $33, $42, $28, $3C, $00, $0A, $33, $01, $0B, $39, $05 .byte $0F, $36, $01, $13, $37, $70, $16, $41, $20, $13, $10, $41, $45, $11, $42, $44 .byte $03, $4B, $6F, $0B, $41, $05, $13, $4B, $A2, $17, $4B, $A0, $6E, $44, $52, $6E .byte $4D, $51, $72, $43, $52, $72, $4D, $55, $72, $47, $52, $6E, $48, $52, $11, $42 .byte $01, $13, $42, $01, $15, $42, $01, $0C, $54, $18, $0D, $56, $16, $0E, $57, $15 .byte $0F, $58, $20, $24, $10, $5F, $20, $1C, $0D, $56, $03, $0E, $57, $03, $0F, $58 .byte $03, $10, $5F, $03, $10, $53, $45, $10, $54, $45, $0B, $54, $05, $10, $53, $01 .byte $12, $53, $01, $14, $53, $01, $17, $54, $A0, $6E, $50, $52, $11, $60, $20, $1A .byte $12, $61, $30, $19, $11, $60, $03, $52, $61, $0B, $70, $63, $62, $0D, $6E, $41 .byte $0C, $6E, $01, $0B, $74, $1A, $0C, $74, $1A, $0D, $73, $1B, $0E, $72, $1B, $6A .byte $74, $2A, $29, $78, $91, $6E, $74, $63, $12, $7B, $70, $0C, $71, $42, $0B, $71 .byte $01, $E7, $02, $60, $FF
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1324.asm
ljhsiun2/medusa
9
93861
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1324.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0xe2ba, %rsi lea addresses_normal_ht+0x1b342, %rdi nop cmp %r11, %r11 mov $81, %rcx rep movsq nop nop nop and %r8, %r8 lea addresses_UC_ht+0xd132, %r11 nop nop nop nop sub $55409, %rdx mov $0x6162636465666768, %rdi movq %rdi, %xmm6 vmovups %ymm6, (%r11) nop nop nop inc %r8 lea addresses_D_ht+0x6ea, %r11 nop cmp %r10, %r10 movb $0x61, (%r11) nop nop nop nop cmp $52074, %r10 lea addresses_WT_ht+0x95aa, %rcx and $29718, %rdi movb $0x61, (%rcx) nop nop nop add %r11, %r11 lea addresses_WT_ht+0x1daa, %rdx nop nop nop xor $59433, %rsi movups (%rdx), %xmm0 vpextrq $0, %xmm0, %r10 nop nop sub %rsi, %rsi lea addresses_WC_ht+0x12daa, %rdi nop nop add %r10, %r10 mov (%rdi), %r8 nop nop nop dec %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %rbp push %rdx // Faulty Load lea addresses_D+0x1e5aa, %rdx inc %r15 mov (%rdx), %r10d lea oracles, %r8 and $0xff, %r10 shlq $12, %r10 mov (%r8,%r10,1), %r10 pop %rdx pop %rbp pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': True, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': True, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
source/main.asm
ladystarbreeze/mode7demo
1
163678
; mode7demo - GBA color demo using Mode 7. ; Copyright (c) 2020 <NAME> format binary as 'gba' include '../lib/header.asm' include '../lib/memory.inc' include '../lib/mmio.inc' .main: ; copy bitmap to EWRAM adr r0, .dma_config1 ldmia r0, {r0-r3} stmia r0, {r1-r3} ; wait for VBLANK mov r1, MMIO .loop_vblank_wait1: ldrh r0, [r1, DISPSTAT] ands r0, 1 beq .loop_vblank_wait1 .loop_vblank_wait2: ldrh r0, [r1, DISPSTAT] ands r0, 1 bne .loop_vblank_wait2 ; set up DMA0 adr r0, .dma_config2 ldmia r0, {r0-r3} stmia r0, {r1-r3} ; set up Mode 7 adr r0, .lcd_config ldmia r0, {r0-r1} strh r1, [r0] ; copy sync routine to IWRAM adr r0, .dma_config3 ldmia r0, {r0-r3} stmia r0, {r1-r3} ; set VCOUNT comparison value mov r4, MMIO mov r5, 0xE300 strh r5, [r4, DISPSTAT] mov r6, r2 ; set up r0-r3 for bitmap transfer adr r0, .dma_config4 ldmia r0, {r0-r3} bx r6 .loop_vcount_coincidence: ldrh r5, [r4, DISPSTAT] ands r5, 4 beq .loop_vcount_coincidence ; TODO: time this properly mov r7, 0x0100 orr r7, 0x0038 .loop_synchronization: subs r7, 1 bne .loop_synchronization ; start DMA3 stmia r0, {r1-r3} nop nop b .loop_vcount_coincidence .dma_config1: dw MMIO + DMA3SAD, ROM + .img, EWRAM, 0x84004B00 .dma_config2: dw MMIO + DMA0SAD, IWRAM, IWRAM, 0xA3400088 .dma_config3: dw MMIO + DMA3SAD, ROM + .loop_vcount_coincidence, IWRAM + 4, 0x84000011 .dma_config4: dw MMIO + DMA3SAD, EWRAM, PRAM, 0x80409600 .lcd_config: dw MMIO + DISPCNT, 0x0407 .img: file 'serena.img.bin'
day25/day25.adb
thorstel/Advent-of-Code-2018
2
10549
with Ada.Assertions; use Ada.Assertions; with Ada.Text_IO; use Ada.Text_IO; with Ada.Containers.Ordered_Maps; with Ada.Containers.Vectors; procedure Day25 is generic type T is private; with function "<" (Left, Right : T) return Boolean; package Disjoint_Sets is procedure Insert (Element : T); procedure Make_Union (Element1, Element2 : T); Number_Of_Sets : Natural := 0; private type Set_Element is record ID : T; Rank : Natural; Size : Natural; end record; function Find (Element : T) return Set_Element; package PM is new Ada.Containers.Ordered_Maps (Key_Type => T, Element_Type => Set_Element); Table : PM.Map; end Disjoint_Sets; package body Disjoint_Sets is function Find (Element : T) return Set_Element is Set : Set_Element := (Element, 0, 0); begin if not Table.Contains (Element) then Number_Of_Sets := Number_Of_Sets + 1; Set.Size := 1; Table.Insert (Element, Set); return Set; else Set := Table (Element); if Set.ID = Element then return Set; else declare Parent : constant Set_Element := Find (Set.ID); ID : constant T := Set.ID; begin Set.ID := Parent.ID; Table.Replace (ID, Set); return Parent; end; end if; end if; end Find; procedure Insert (Element : T) is Set : constant Set_Element := Find (Element); begin Assert (Set.Size > 0); end Insert; procedure Make_Union (Element1, Element2 : T) is Set1 : Set_Element := Find (Element1); Set2 : Set_Element := Find (Element2); ID1 : constant T := Set1.ID; ID2 : constant T := Set2.ID; begin if Set1.ID = Set2.ID then return; end if; Number_Of_Sets := Number_Of_Sets - 1; if (Set1.Rank < Set2.Rank) then Set1.ID := Set2.ID; Set2.Size := Set2.Size + Set1.Size; else Set2.ID := Set1.ID; Set1.Size := Set1.Size + Set2.Size; if Set1.Rank = Set2.Rank then Set1.Rank := Set1.Rank + 1; end if; end if; Table.Replace (ID1, Set1); Table.Replace (ID2, Set2); end Make_Union; end Disjoint_Sets; type Point_Type is array (Positive range 1 .. 4) of Integer; function Manhattan_Distance (P1, P2 : Point_Type) return Natural is Dist : Natural := 0; begin for I in Point_Type'Range loop Dist := Dist + abs (P1 (I) - P2 (I)); end loop; return Dist; end Manhattan_Distance; package PV is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Point_Type); package DS is new Disjoint_Sets (T => Point_Type, "<" => "<"); Points : PV.Vector; Input : File_Type; begin Open (Input, In_File, "input.txt"); while not End_Of_File (Input) loop declare Line : constant String := Get_Line (Input); Point : Point_Type; P : Positive := Point'First; F, L : Positive := Line'First; begin while L <= Line'Last loop if Line (L) = ',' or L = Line'Last then if L = Line'Last then Point (P) := Integer'Value (Line (F .. L)); else Point (P) := Integer'Value (Line (F .. L - 1)); end if; P := P + 1; F := L + 1; end if; L := L + 1; end loop; Assert (P = Point_Type'Last + 1, "Invalid Input"); DS.Insert (Point); for Point2 of Points loop if Manhattan_Distance (Point, Point2) <= 3 then DS.Make_Union (Point, Point2); end if; end loop; Points.Append (Point); end; end loop; Close (Input); Put_Line ("Number of constellations =" & Natural'Image (DS.Number_Of_Sets)); end Day25;
UPC Microcontroladores 2019-2/Semana 1/ls5a-semana1-not.X/latcheador.asm
tocache/picomones
5
87732
;Este es un comentario ;Programa hecho por <NAME> ;UPC San Miguel ;16 de agosto del 2019 list p=18f4550 ;Modelo del microcontrolador #include <p18f4550.inc> ;Libreria de nombre de registros ;Aqui deben de declararse los bits de configuracion (directivas de preprocesador) CONFIG FOSC = XT_XT ; Oscillator Selection bits (XT oscillator (XT)) CONFIG PWRT = ON ; Power-up Timer Enable bit (PWRT enabled) CONFIG BOR = OFF ; Brown-out Reset Enable bits (Brown-out Reset disabled in hardware and software) CONFIG WDT = OFF ; Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit)) CONFIG PBADEN = OFF ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset) CONFIG LVP = OFF ; Single-Supply ICSP Enable bit (Single-Supply ICSP disabled) org 0x0000 ;Vector de RESET goto confeg org 0x0020 ;Zona de programa de usuario confeg: bcf TRISD, 0 ;Puerto RD0 como salida ;Los puertos que son entradas no se ;necesitan declarar inicio: btfss PORTB, 0 ;Pregunto si el RB0 es uno goto inicio ;Salto aqui si es falso y me voy a la etiqueta inicio btg LATD, 0 ;Salto aqui si es verdadero y complemento a dos del puerto RD0 aunno: btfsc PORTB, 0 ;Pregunto si el RB0 es cero goto aunno ;Salto aqui si es falso y me voy a la etiqueta aunno goto inicio ;Salto aqui si es veradero y me voy a la etiqueta inicio end
OSSOURCE/except.asm
mooseman/smallOS
3
85798
<gh_stars>1-10 ; MMURTL Operating System Source Code ; Written by <NAME> ; ; This code is released to the public domain. ; "Share and enjoy....." ;) ; .DATA .INCLUDE MOSEDF.INC .INCLUDE TSS.INC .INCLUDE JOB.INC EXTRN DbgpTSSSave DD EXTRN dbgFAULT DD EXTRN dbgFltErc DD EXTRN dbgOldEIP DD EXTRN dbgOldCS DD EXTRN dbgOldEFlgs DD EXTRN DbgTSS DB EXTRN pRunTSS DD .CODE ;This file contains Exception Handlers and Debugger Entry ;and Exit code. ;============================================================================= ; Procedure jumped to by interrupt procedures to enter debugger ;============================================================================= ;EnterDebug ; ; This piece of code sets up to enter the debugger. If we get here, ; one of the exceptions has activated and has done a little work based ; on which exception is was, then it jumped here to enter the debugger. ; This code effectively replaces the interrupted task with the debugger ; task (without going through the kernel). First we copy the Page Dir ; entry from the current job into the debuggers job, then copy the CR3 ; register from the current TSS into the debugger's TSS. This makes the ; debugger operate in the current tasks memory space. All of the debugger's ; code and data are in OS protected pages (which are shared with all tasks), ; so this is OK to do even if the offending task referenced a bogus address. ; Next, we save the current pRunTSS and place the debugger's TSS in ; pRunTSS, then jump to the debugger's selector. This switches tasks. ; EnterDebug: PUSH EAX ;we MUST save caller's registers PUSH EBX ; and restore them before the PUSH EDX ; task switch into the debugger MOV EAX, pRunTSS ;pRunTSS -> EAX MOV EBX, [EAX+TSS_CR3] ;current CR3 -> EBX MOV EDX, OFFSET DbgTSS ;pDebuggerTSS -> EDX MOV [EDX+TSS_CR3], EBX ;CR3 -> DebuggerTSS MOV EAX, [EAX+TSS_pJCB] ;pCrntJCB -> EAX MOV EDX, [EDX+TSS_pJCB] ;pDebuggerJCB -> EDX MOV EBX, [EAX+JcbPD] ;CrntJob Page Dir -> EBX MOV [EDX+JcbPD], EBX ;Page Dir -> Debugger JCB MOV EAX, pRunTSS ;Save the current pRunTSS MOV DbgpTSSSave, EAX MOV EAX, OFFSET DbgTSS ;Install Debugger's as current MOV pRunTSS, EAX ;Set Dbgr as running task MOV BX, [EAX+Tid] MOV TSS_Sel, BX ;Set up debugger selector POP EDX ;make his registers right! POP EBX POP EAX JMP FWORD PTR [TSS] ;Switch tasks to debugger ;When the debugger exits, we come here PUSH dbgOldEFlgs ;Put the stack back the way it was PUSH dbgOldCS ; PUSH dbgOldEIP ; IRETD ;Go back to the caller ;============================================================================= ; INTERRUPT PROCEDURES FOR FAULTS ;============================================================================= ; This is the general purpose "We didn't expect this interrupt" interrupt ; This will place "99" in the upper left corner of the screen so we ; can see there are SPURIOUS interrupts!!!!! PUBLIC INTQ: PUSH EAX MOV EAX,07390739h ;99 - All unassigned ints come here MOV DS:VGATextBase+00h,EAX POP EAX IRETD ;===================== Divide By ZERO (Int 0) ============================ PUBLIC IntDivBy0: ; MOV EAX,07300730h ;00 ; MOV DS:VGATextBase+00h,EAX ; CLI ; HLT MOV dbgFAULT,00h ; Divide By Zero POP dbgOldEIP ; Get EIP of offender for debugger POP dbgOldCS ; POP dbgOldEFlgs ; JMP EnterDebug ;Enter debugger ;===================== Debugger Single Step (Int 1) ====================== PUBLIC IntDbgSS: POP dbgOldEIP ; Get EIP of offender for debugger POP dbgOldCS ; POP dbgOldEFlgs ; JMP EnterDebug ;Enter debugger ;===================== Debugger Entry (Int 3) =========================== PUBLIC IntDebug: POP dbgOldEIP ; Get EIP of offender for debugger POP dbgOldCS ; Get CS POP dbgOldEFlgs ; Get Flags JMP EnterDebug ;Enter debugger ;===================== OverFlow (Int 4) ================================== PUBLIC IntOverFlow: PUSH EAX MOV EAX,07340730h ;04 MOV DS:VGATextBase+00h,EAX CLI HLT ;========================== Bad Opcode (Int 6) ================================ PUBLIC INTOpCode: ; MOV EAX,07360730h ;06 ; MOV DS:VGATextBase+00h,EAX ; HLT MOV dbgFAULT,06h ; Invalid Opcode POP dbgOldEIP ; Get EIP of offender for debugger POP dbgOldCS ; POP dbgOldEFlgs ; JMP EnterDebug ;Enter debugger ;========================== Dbl Exception (Int 08)============================ PUBLIC IntDblExc: ; MOV EAX,07380730h ;08 ; MOV DS:VGATextBase+00h,EAX ; CLI ; HLT MOV dbgFAULT,08h ; Double Exception POP dbgFltErc ; Error Code pushed last by processor POP dbgOldEIP POP dbgOldCS POP dbgOldEFlgs POP dbgOldEFlgs ; JMP EnterDebug ;Enter debugger ;========================= Invalid TSS 10 ==================================== PUBLIC INTInvTss: MOV EAX,07300731h ;10 MOV DS:VGATextBase+00h,EAX CLI HLT MOV dbgFAULT,0Ah ; Invalid TSS POP dbgFltErc ; Error code pushed last by processor POP dbgOldEIP POP dbgOldCS POP dbgOldEFlgs JMP EnterDebug ;Enter debugger ;========================== Seg Not Present 11 =============================== PUBLIC INTNoSeg: MOV EAX,07310731h ;11 MOV DS:VGATextBase+00h,EAX CLI HLT ;========================== Stack Overflow 12 ================================ PUBLIC INTStkOvr: ; MOV EAX,07320731h ;12 ; MOV DS:VGATextBase+00h,EAX ; CLI ; HLT MOV dbgFAULT,0Ch ; Stack overflow POP dbgFltErc POP dbgOldEIP POP dbgOldCS POP dbgOldEFlgs JMP EnterDebug ;Enter debugger ;========================== GP 13 =========================================== PUBLIC IntGP: ; MOV EAX,07330731h ;13 ; MOV DS:VGATextBase+00h,EAX ; CLI ; HLT MOV dbgFAULT,0Dh ; GP Fault POP dbgFltErc POP dbgOldEIP POP dbgOldCS POP dbgOldEFlgs JMP EnterDebug ;Enter debugger ;========================== Page Fault 14 ==================================== PUBLIC INTPgFlt: ; MOV EAX,07340731h ;14 ; MOV DS:VGATextBase+00h,EAX ; CLI ; HLT MOV dbgFAULT,0Eh ; Page Fault POP dbgFltErc POP dbgOldEIP POP dbgOldCS POP dbgOldEFlgs JMP EnterDebug ;Enter debugger ;============================================================================= ; ISR for interrupt on PICU1 from Slave ;============================================================================= PUBLIC IntPICU2: ; IRQ Line 2 from Slave 8259 (Int22) PUSH EAX MOV EAX,07320750h ; From PICU#2 (P2) MOV DS:VGATextBase+100h,EAX PUSH 2 CALL FWORD PTR _EndOfIRQ POP EAX IRETD ;=============== end of module ==================
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_5192_447.asm
ljhsiun2/medusa
9
169224
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r14 push %r15 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0xa57a, %rdx nop nop add $2266, %r12 movups (%rdx), %xmm0 vpextrq $1, %xmm0, %r14 nop nop nop nop nop and %r11, %r11 lea addresses_D_ht+0x1e57a, %r8 nop nop nop nop nop sub %r9, %r9 mov $0x6162636465666768, %r15 movq %r15, (%r8) nop nop xor %r11, %r11 lea addresses_UC_ht+0x199e2, %rdx nop nop nop nop nop cmp %r12, %r12 vmovups (%rdx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %r15 nop nop nop and $57021, %rdx lea addresses_normal_ht+0xdbfa, %rsi lea addresses_A_ht+0x261a, %rdi nop sub %rdx, %rdx mov $109, %rcx rep movsb nop nop nop nop nop sub %r15, %r15 lea addresses_UC_ht+0x1501a, %rdx add %r12, %r12 movb (%rdx), %r11b nop nop sub $1101, %r15 lea addresses_WC_ht+0xd79a, %r9 nop nop and $17470, %rcx movw $0x6162, (%r9) nop nop sub $41132, %r9 lea addresses_D_ht+0x10b92, %r11 and %r9, %r9 mov $0x6162636465666768, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%r11) nop nop add %rcx, %rcx lea addresses_WC_ht+0x8dba, %r12 nop nop nop nop nop add $610, %rdi movups (%r12), %xmm7 vpextrq $1, %xmm7, %r8 nop nop cmp $33666, %r8 lea addresses_UC_ht+0x7b1a, %r9 clflush (%r9) nop nop nop nop nop sub %r15, %r15 movb (%r9), %r12b nop add $43911, %r9 lea addresses_WC_ht+0x1027a, %rsi lea addresses_D_ht+0xe97a, %rdi nop nop nop sub %r12, %r12 mov $15, %rcx rep movsw nop nop nop nop nop and $39473, %r14 lea addresses_normal_ht+0x9c30, %r12 clflush (%r12) nop nop inc %r8 mov $0x6162636465666768, %rsi movq %rsi, %xmm4 movups %xmm4, (%r12) and $46249, %rsi lea addresses_D_ht+0x2e86, %rdi nop nop nop nop add %r11, %r11 movb $0x61, (%rdi) nop cmp $44758, %r8 lea addresses_WC_ht+0xcd7a, %rsi nop and $43682, %r9 mov (%rsi), %r11w nop nop nop nop sub %r9, %r9 lea addresses_normal_ht+0x13972, %rsi lea addresses_normal_ht+0x10dde, %rdi clflush (%rdi) nop nop nop nop xor $22833, %r11 mov $86, %rcx rep movsq nop nop nop nop nop cmp %r8, %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r15 pop %r14 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r8 push %rax push %rbp // Store lea addresses_WC+0x1eb7a, %r8 nop nop add %r13, %r13 movw $0x5152, (%r8) and $53798, %r8 // Store mov $0x57c654000000097a, %r12 nop dec %rax mov $0x5152535455565758, %r13 movq %r13, %xmm6 vmovups %ymm6, (%r12) cmp $42172, %rbp // Faulty Load lea addresses_normal+0x1317a, %r10 nop sub $54894, %rax mov (%r10), %r13w lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rbp pop %rax pop %r8 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 11}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 9}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 10}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 2}} {'dst': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 4}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 3}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 2}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': True, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 4}} {'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 2}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 9}} {'dst': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}} {'34': 5192} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
libsrc/_DEVELOPMENT/adt/b_array/z80/__array_make_room_best_effort.asm
jpoikela/z88dk
640
172921
<reponame>jpoikela/z88dk SECTION code_clib SECTION code_adt_b_array PUBLIC __array_make_room_best_effort PUBLIC __0_array_make_room_best_effort EXTERN __array_make_room, __0_array_make_room __array_make_room_best_effort: ; Make room for n bytes at index idx (overwrite not insert) ; If idx > array.size, zero the resulting hole. ; If the array cannot hold all n bytes, make room for as ; many as possible. ; ; enter : de = & array.size ; hl = n ; bc = idx ; ; exit : success ; ; hl = & array.data[idx] ; bc = n_max ; a = 0 if room for all n bytes available (bc == n) ; -1 if room not available for all n bytes (bc < n) ; carry reset ; ; fail if idx > array.capacity ; ; bc = idx ; de = & array.capacity ; carry set ; ; uses : af, bc, de, hl call __array_make_room ret nc ; insufficient space in array, make best effort ex de,hl __0_array_make_room_best_effort: ; hl = & array.size ; bc = idx inc hl inc hl inc hl ; hl = & array.capacity + 1b ld d,(hl) dec hl ld e,(hl) ; de = array.capacity ex de,hl ; hl = array.capacity ; de = & array.capacity ; bc = idx or a sbc hl,bc ; hl = new_n = array.capacity - idx ret c ; if array.capacity < idx call springboard ; some items need to be on stack dec a ; a = -1 ret springboard: push hl ; save new_n push bc ; save idx ld l,e ld h,d inc hl ; hl = & array.capacity + 1b dec de ; de = & array.size + 1b ld a,(de) ldd ld b,a ld a,(de) ld c,a ; bc = old_size = array.size ld a,(hl) ld (de),a ; array.size = array.capacity dec hl ; hl = & array.size + 1b ; hl = & array.size + 1b ; bc = old_size ; stack = new_n, idx jp __0_array_make_room ; fill possible hole at idx
programs/oeis/160/A160174.asm
neoneye/loda
22
908
; A160174: a(n) = (2*n - 1)*(24*n^2 - 42*n + 19). ; 1,93,545,1645,3681,6941,11713,18285,26945,37981,51681,68333,88225,111645,138881,170221,205953,246365,291745,342381,398561,460573,528705,603245,684481,772701,868193,971245,1082145,1201181,1328641,1464813,1609985,1764445,1928481,2102381,2286433,2480925,2686145,2902381,3129921,3369053,3620065,3883245,4158881,4447261,4748673,5063405,5391745,5733981,6090401,6461293,6846945,7247645,7663681,8095341,8542913,9006685,9486945,9983981,10498081,11029533,11578625,12145645,12730881,13334621,13957153,14598765,15259745,15940381,16640961,17361773,18103105,18865245,19648481,20453101,21279393,22127645,22998145,23891181,24807041,25746013,26708385,27694445,28704481,29738781,30797633,31881325,32990145,34124381,35284321,36470253,37682465,38921245,40186881,41479661,42799873,44147805,45523745,46927981 mul $0,4 mov $1,1 add $1,$0 pow $1,3 mul $1,3 sub $1,$0 div $1,16 mul $1,4 add $1,1 mov $0,$1
Mid-Term/Solution/Q1.asm
pulok825/CSE331L-Section-1-Fall20-NSU
0
104238
.MODEL SMALL .STACK 100H .DATA PROMPT DB " DIGITS FROM 0-9 ARE-$" .CODE MAIN PROC DATA SEGMENT NUM1 DB ? NUM2 DB ? RESULT DB ? MSG1 DB 10, 13, "ENTER INTEGER 1:-$" MSG2 DB 10, 13, "ENTER INTEGER 2-$" MSG3 DB 10, 13, "ENTER RESULT OF MULTIPLICATION IS-$" ENDS
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_47_570.asm
ljhsiun2/medusa
9
170941
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r8 push %rcx push %rdi push %rsi lea addresses_WT_ht+0x9ce8, %rsi lea addresses_D_ht+0x1c78, %rdi nop xor %r11, %r11 mov $11, %rcx rep movsq nop nop nop sub $48841, %r13 lea addresses_WC_ht+0x157e8, %rsi lea addresses_UC_ht+0xeaa0, %rdi nop nop nop cmp %r8, %r8 mov $59, %rcx rep movsb nop nop nop nop inc %r11 lea addresses_A_ht+0x1a1e8, %r8 clflush (%r8) and $31708, %r13 mov (%r8), %si nop nop nop sub $75, %r11 lea addresses_WC_ht+0x1ce88, %r13 clflush (%r13) nop nop and %rcx, %rcx mov $0x6162636465666768, %r8 movq %r8, (%r13) nop nop inc %r8 lea addresses_D_ht+0x46e0, %rdi clflush (%rdi) nop nop nop nop nop add %r8, %r8 movups (%rdi), %xmm7 vpextrq $0, %xmm7, %r13 nop nop nop add %r8, %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %r9 push %rbp push %rdi push %rsi // Load lea addresses_US+0xe7e8, %r12 nop and $62491, %rdi mov (%r12), %esi nop and $39091, %r9 // Store lea addresses_PSE+0xa7e8, %r14 nop nop cmp %rdi, %rdi movb $0x51, (%r14) cmp %r9, %r9 // Store mov $0xbc8, %rbp cmp %r15, %r15 mov $0x5152535455565758, %r12 movq %r12, %xmm2 vmovups %ymm2, (%rbp) nop nop cmp $31903, %r14 // Store lea addresses_A+0x173e8, %r14 nop nop nop nop cmp %r15, %r15 movl $0x51525354, (%r14) nop nop nop nop cmp %r9, %r9 // Load lea addresses_RW+0x7744, %rsi nop nop sub $37352, %r14 mov (%rsi), %r9 nop nop and %rdi, %rdi // Faulty Load lea addresses_PSE+0xa7e8, %r14 nop and $20904, %rbp movb (%r14), %r15b lea oracles, %r12 and $0xff, %r15 shlq $12, %r15 mov (%r12,%r15,1), %r15 pop %rsi pop %rdi pop %rbp pop %r9 pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': True, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'51': 47} 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 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/commands-create.adb
GLADORG/glad-cli
0
3847
with Ada.Text_IO; with Ada.Directories; with Ada.Containers.Vectors; with Init_Project; with Blueprint; use Blueprint; package body Commands.Create is package IO renames Ada.Text_IO; package TT renames CLIC.TTY; package Dir renames Ada.Directories; use Ada.Directories; use Ada.Containers; ------------- -- Execute -- ------------- overriding procedure Execute ( Cmd : in out Command; Args : AAA.Strings.Vector) is begin if Args.Length > 0 then declare Path : String := Args.First_Element; ToDo : Action := Write; begin if Cmd.Dry_Run then IO.Put_Line(TT.Emph("You specified the dry-run flag, so no changes will be written.")); ToDo := DryRun; end if; if not Dir.Exists(Path) then if ToDo = Write then Dir.Create_Directory(Path); end if; end if; if Dir.Kind(Path) = Ada.Directories.Directory then Init_Project.Init(Path,ToDo); else IO.Put_Line(TT.Error(Path & " exists and is not a directory.")); end if; end; else IO.Put_Line(TT.Error("Command requires a project name to be specified.")); end if; end Execute; -------------------- -- Setup_Switches -- -------------------- overriding procedure Setup_Switches (Cmd : in out Command; Config : in out CLIC.Subcommand.Switches_Configuration) is use CLIC.Subcommand; begin Define_Switch (Config, Cmd.Dry_Run'Access, "", "-dry-run", "Dry-run"); end Setup_Switches; end Commands.Create;
programs/oeis/262/A262011.asm
neoneye/loda
22
243716
; A262011: a(n) = (1/n!) * Product_{k=1..n} (k^3 + 1). ; 1,2,9,84,1365,34398,1244061,61136712,3920391657,317987323290,31830531061329,3854387943062748,555353062796290941,93897387078942114486,18410594823692578876005,4143611208319076419026192,1061023445030203505546894289,306698188757554119191614031538,99387251945711843180260258108953 lpb $0 mov $0,45 add $1,1 lpe add $1,$0 mov $2,$0 mov $0,$1 add $2,1 lpb $0 mov $1,$0 sub $0,1 pow $1,2 sub $1,$0 mul $2,$1 lpe mov $0,$2
PRG/levels/Under/1-5.asm
narfman0/smb3_pp1
0
162810
; Original address was $AA41 ; 1-5 .word W105_CoinHeavL ; Alternate level layout .word W105_CoinHeavO ; Alternate object layout .byte LEVEL1_SIZE_09 | LEVEL1_YSTART_040 .byte LEVEL2_BGPAL_04 | LEVEL2_OBJPAL_09 | LEVEL2_XSTART_18 .byte LEVEL3_TILESET_13 | LEVEL3_VSCROLL_FREE | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX(3) | LEVEL4_INITACT_SLIDE .byte LEVEL5_BGM_UNDERGROUND | LEVEL5_TIME_300 .byte $40, $00, $0E, $80, $00, $1B, $77, $98, $17, $31, $08, $97, $3C, $32, $18, $65 .byte $00, $12, $88, $00, $43, $05, $08, $06, $13, $8C, $00, $5E, $09, $0C, $0A, $5A .byte $97, $0A, $53, $0A, $00, $0F, $DB, $0C, $0F, $74, $81, $06, $00, $84, $04, $00 .byte $85, $0D, $00, $86, $08, $00, $80, $10, $4B, $23, $8C, $14, $B4, $0E, $97, $15 .byte $83, $01, $17, $16, $04, $78, $16, $F1, $9A, $17, $90, $06, $9A, $1E, $50, $06 .byte $13, $24, $66, $18, $1F, $A1, $36, $19, $84, $60, $26, $DB, $8C, $23, $50, $03 .byte $6C, $26, $E0, $0D, $23, $83, $00, $29, $DB, $0C, $29, $07, $8C, $2A, $B0, $03 .byte $8C, $2E, $50, $02, $0D, $2E, $72, $70, $2C, $0C, $93, $25, $87, $07, $13, $2C .byte $04, $74, $2C, $E6, $99, $2F, $81, $06, $20, $27, $D4, $24, $27, $DC, $19, $2F .byte $01, $1A, $2F, $E0, $36, $2D, $A4, $60, $34, $D9, $8B, $34, $50, $00, $8A, $34 .byte $40, $00, $6A, $35, $01, $0B, $3C, $D0, $8A, $3D, $71, $04, $8C, $31, $B3, $04 .byte $0E, $3B, $63, $92, $38, $B1, $03, $90, $3C, $B3, $00, $8C, $3D, $B7, $06, $70 .byte $30, $04, $99, $36, $51, $02, $96, $39, $84, $01, $16, $38, $62, $16, $3B, $54 .byte $17, $3C, $92, $9A, $3F, $90, $02, $35, $3E, $84, $4C, $39, $07, $86, $3E, $00 .byte $E3, $77, $70, $8B, $34, $40, $03, $6B, $38, $D0, $86, $42, $75, $01, $06, $42 .byte $00, $07, $42, $D2, $06, $44, $15, $08, $4E, $23, $8B, $49, $70, $02, $86, $4F .byte $75, $00, $06, $4F, $00, $07, $4F, $D0, $8C, $44, $55, $03, $72, $44, $81, $8C .byte $48, $B5, $0C, $16, $45, $63, $17, $44, $A2, $9A, $42, $50, $03, $96, $46, $84 .byte $0B, $73, $48, $0D, $85, $44, $00, $86, $47, $00, $88, $4B, $00, $85, $4E, $00 .byte $06, $50, $15, $8B, $5D, $70, $04, $11, $55, $80, $0F, $5B, $66, $96, $55, $54 .byte $06, $16, $51, $04, $16, $55, $E0, $77, $51, $F2, $17, $55, $F2, $9A, $52, $90 .byte $02, $8C, $5C, $5E, $13, $6B, $55, $01, $20, $5C, $D1, $36, $53, $00, $86, $52 .byte $00, $87, $5E, $00, $85, $63, $76, $02, $05, $63, $00, $06, $63, $D1, $08, $62 .byte $00, $09, $62, $D1, $05, $66, $16, $8B, $6C, $70, $02, $6B, $6F, $00, $8B, $62 .byte $40, $00, $82, $65, $00, $86, $6D, $00, $00, $77, $DA, $8B, $77, $40, $00, $80 .byte $78, $5B, $17, $8C, $76, $B4, $02, $8C, $79, $53, $01, $11, $7A, $70, $8C, $7B .byte $B5, $07, $60, $7C, $EF, $70, $7C, $E0, $11, $7C, $0A, $00, $7F, $EF, $10, $7F .byte $E0, $11, $7F, $07, $0F, $70, $54, $94, $70, $56, $04, $74, $74, $E6, $97, $79 .byte $83, $08, $17, $79, $01, $18, $79, $E2, $20, $7D, $DD, $2C, $7D, $D8, $35, $75 .byte $A5, $36, $77, $A4, $83, $75, $00, $87, $74, $00, $90, $79, $B0, $00, $90, $7A .byte $50, $00, $8C, $83, $53, $03, $70, $83, $81, $8C, $87, $B3, $04, $8C, $8E, $5E .byte $01, $60, $8B, $EE, $00, $8E, $EF, $0F, $8B, $0A, $10, $8E, $E3, $97, $82, $53 .byte $05, $74, $86, $62, $94, $88, $86, $05, $80, $8C, $EB, $8B, $8C, $E6, $FF
Miei-sorgenti/new/Quarta lezione/Versione 1/sommaQuadrati.asm
DigiOhhh/LabArchitettura2-2017-2018
1
27752
# Si scriva il codice che calcola la somma dei primi N-1 numeri elevati al quadrato. # Nel caso in cui l’i-esimo numero da aggiungere sia multiplo del valore iniziale della somma, si termini il ciclo for. # # V = <intero inserito dall’utente>; # N = <intero inserito dall’utente>; # # Sum = V; # for (i = 1; i < N; i++) # { # if ((i * i) % V == 0) { # print «break»; # break; # } # # Sum += i * i; # } # print Sum .data begin: .asciiz "Inserisci un intero: " .align 2 err: .asciiz "break\n\n" .text .globl main main: li $v0, 51 la $a0, begin syscall move $s0, $a0 # $s0 <-- V la $a0, begin syscall move $s1, $a0 # $s1 <-- N move $s2, $s0 # $s2 <-- Sum li $t0, 1 # i = 1 for: bge $t0, $s1, end # i <? N mul $t1, $t0, $t0 div $t1, $s0 mfhi $t2 beqz $t2, interrupt add $s2, $s2, $t1 # Sum += i * i addi $t0, $t0, 1 # i++ bne $t0, $s1, for # i ?< N j end interrupt: li $v0, 4 la $a0, err syscall end: li $v0, 1 move $a0, $s2 syscall
oeis/082/A082877.asm
neoneye/loda-programs
11
174045
; A082877: a(n) = A002884(n) / A070731(n). ; Submitted by <NAME> ; 1,2,3,6,12,21,42,84,147,294 mov $2,1 mov $3,1 lpb $0 sub $0,1 dif $1,2 add $1,$3 add $3,$2 mov $2,$1 lpe mov $0,$3
tests/syntax_test_pragmas.asm
dougmasten/dougmasten-sublime-assembly-6809
5
82206
# SYNTAX TEST "Packages/Assembly-6809/Assembly-6809.sublime-syntax" # <- source.mc6809 ; Assembly pragmas (lwasm) ;------------------------------------------------ pragma dollarlocal # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^ keyword.operator pragma dollarnotlocal # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^ keyword.operator pragma index0tonone # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator pragma undefextern # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^ keyword.operator pragma cescapes # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma importundefexport # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^^ keyword.operator pragma pcaspcr # ^^^^^^ support.function.directive.assembler # ^^^^^^^ keyword.operator pragma shadow # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma list # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma autobranchlength # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^ keyword.operator pragma export # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma nosymbolcase # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator pragma symbolnocase # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator pragma condundefzero # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^ keyword.operator pragma 6809 # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma 6309 # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma 6800compat # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator pragma forwardrefmax # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^ keyword.operator pragma testmode # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma c # ^^^^^^ support.function.directive.assembler # ^ keyword.operator pragma cc # ^^^^^^ support.function.directive.assembler # ^^ keyword.operator pragma cd # ^^^^^^ support.function.directive.assembler # ^^ keyword.operator pragma ct # ^^^^^^ support.function.directive.assembler # ^^ keyword.operator pragma qrts # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma m80ext # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma 6809conv # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma 6309conv # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma newsource # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^ keyword.operator pragma oldsource # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^ keyword.operator pragma operandsizewarning # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^^^ keyword.operator pragma emuext # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma output # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma expandcond # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator ;------------------------------------------------ pragma nodollarlocal # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^ keyword.operator pragma nodollarnotlocal # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^ keyword.operator pragma noindex0tonone # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^ keyword.operator pragma noundefextern # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^ keyword.operator pragma nocescapes # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator pragma noimportundefexport # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^^^^ keyword.operator pragma nopcaspcr # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^ keyword.operator pragma noshadow # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma nolist # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma noautobranchlength # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^^^ keyword.operator pragma noexport # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma nosymbolcase # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator pragma nosymbolnocase # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^ keyword.operator pragma nocondundefzero # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^ keyword.operator pragma no6800compat # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator pragma noforwardrefmax # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^ keyword.operator pragma notestmode # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator pragma noc # ^^^^^^ support.function.directive.assembler # ^^^ keyword.operator pragma nocc # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma nocd # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma noct # ^^^^^^ support.function.directive.assembler # ^^^^ keyword.operator pragma noqrts # ^^^^^^ support.function.directive.assembler # ^^^^^^ keyword.operator pragma nom80ext # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma no6809conv # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator pragma no6309conv # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator pragma nonewsource # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^ keyword.operator pragma nooldsource # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^ keyword.operator pragma nooperandsizewarning # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^^^^^ keyword.operator pragma noemuext # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma nooutput # ^^^^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator pragma noexpandcond # ^^^^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator ;------------------------------------------------ *pragma c # ^^^^^^^ support.function.directive.assembler # ^ keyword.operator *pragmapush c # ^^^^^^^^^^^ support.function.directive.assembler # ^ keyword.operator *pragmapop c # ^^^^^^^^^^ support.function.directive.assembler # ^ keyword.operator ;------------------------------------------------ opt 6800compat # ^^^ support.function.directive.assembler # ^^^^^^^^^^ keyword.operator opt 6809 # ^^^ support.function.directive.assembler # ^^^^ keyword.operator opt 6309 # ^^^ support.function.directive.assembler # ^^^^ keyword.operator opt 6809conv # ^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator opt 6309conv # ^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator opt index0tonone # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator opt cescapes # ^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator opt importundefexport # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^^ keyword.operator opt undefextern # ^^^ support.function.directive.assembler # ^^^^^^^^^^^ keyword.operator opt export # ^^^ support.function.directive.assembler # ^^^^^^ keyword.operator opt dollarlocal # ^^^ support.function.directive.assembler # ^^^^^^^^^^^ keyword.operator opt dollarnotlocal # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^ keyword.operator opt pcaspcr # ^^^ support.function.directive.assembler # ^^^^^^^ keyword.operator opt shadow # ^^^ support.function.directive.assembler # ^^^^^^ keyword.operator opt autobranchlength # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^^^^^ keyword.operator opt nosymbolcase # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator opt symbolnocase # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^ keyword.operator opt condundefzero # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^^ keyword.operator opt forwardrefmax # ^^^ support.function.directive.assembler # ^^^^^^^^^^^^^ keyword.operator opt qrts # ^^^ support.function.directive.assembler # ^^^^ keyword.operator opt m80ext # ^^^ support.function.directive.assembler # ^^^^^^ keyword.operator opt testmode # ^^^ support.function.directive.assembler # ^^^^^^^^ keyword.operator opt c # ^^^ support.function.directive.assembler # ^ keyword.operator opt cd # ^^^ support.function.directive.assembler # ^^ keyword.operator opt ct # ^^^ support.function.directive.assembler # ^^ keyword.operator opt cc # ^^^ support.function.directive.assembler # ^^ keyword.operator opt c,cc,6309,6800compat #^^^ support.function.directive.assembler # ^ keyword.operator # ^ operator.separator # ^^ keyword.operator # ^ operator.separator # ^^^^ keyword.operator # ^ operator.separator # ^^^^^^^^^^ keyword.operator
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c5/c52103r.ada
best08618/asylo
7
18062
-- C52103R.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT LENGTHS MUST MATCH IN ARRAY AND SLICE ASSIGNMENTS. -- MORE SPECIFICALLY, TEST THAT ARRAY ASSIGNMENTS WITH MATCHING -- LENGTHS DO NOT CAUSE CONSTRAINT_ERROR TO BE RAISED AND -- ARE PERFORMED CORRECTLY. -- (OVERLAPS BETWEEN THE OPERANDS OF THE ASSIGNMENT STATEMENT -- ARE TREATED ELSWEWHERE.) -- THIS IS THE THIRD FILE IN -- DIVISION D : NULL LENGTHS NOT DETERMINABLE STATICALLY. -- RM 07/20/81 -- SPS 2/18/83 WITH REPORT; PROCEDURE C52103R IS USE REPORT ; BEGIN TEST( "C52103R" , "CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE" & " ASSIGNMENTS THE LENGTHS MUST MATCH" ); -- ( EACH DIVISION COMPRISES 3 FILES, -- COVERING RESPECTIVELY THE FIRST -- 3 , NEXT 2 , AND LAST 3 OF THE 8 -- SELECTIONS FOR THE DIVISION.) ------------------------------------------------------------------- -- (7) UNSLICED OBJECTS OF THE PREDEFINED TYPE 'STRING' (BY -- THEMSELVES). DECLARE ARR71 : STRING( IDENT_INT(1)..IDENT_INT(0) ) := "" ; ARR72 : STRING( IDENT_INT(5)..IDENT_INT(4) ) ; BEGIN -- STRING ASSIGNMENT: ARR72 := ARR71 ; -- CHECKING THE VALUES AFTER THE STRING ASSIGNMENT: IF ARR72 /= "" THEN FAILED( "STRING ASSIGNMENT NOT CORRECT (7)" ); END IF; EXCEPTION WHEN OTHERS => FAILED( "EXCEPTION RAISED - SUBTEST 7" ); END ; ------------------------------------------------------------------- -- (8) SLICED OBJECTS OF THE PREDEFINED TYPE 'STRING' , WITH -- STRING LITERALS. -- DECLARE ARR82 : STRING( IDENT_INT(5)..IDENT_INT(9) ) ; BEGIN -- INITIALIZATION OF LHS ARRAY: ARR82( IDENT_INT(5)..IDENT_INT(9) ) := "QUINC" ; -- STRING LITERAL ASSIGNMENT: ARR82( IDENT_INT(5)..IDENT_INT(9) ) ( IDENT_INT(6)..IDENT_INT(9) ) ( IDENT_INT(6)..IDENT_INT(5) ) := "" ; -- CHECKING THE VALUES AFTER THE SLICE ASSIGNMENT: IF ARR82 /= "QUINC" OR ARR82( IDENT_INT(5)..IDENT_INT(9) ) /= "QUINC" THEN FAILED( "SLICE ASSIGNMENT NOT CORRECT (8)" ); END IF; EXCEPTION WHEN OTHERS => FAILED( "EXCEPTION RAISED - SUBTEST 8" ); END ; ------------------------------------------------------------------- -- (9) SLICED OBJECTS OF THE PREDEFINED TYPE 'STRING' (BY -- THEMSELVES). -- DECLARE SUBTYPE TA92 IS STRING( IDENT_INT(5)..IDENT_INT(9) ) ; ARR91 : STRING( IDENT_INT(1)..IDENT_INT(5) ) := "ABCDE" ; ARR92 : TA92 ; BEGIN -- INITIALIZATION OF LHS ARRAY: ARR92( IDENT_INT(5)..IDENT_INT(9) ) := "QUINC" ; -- STRING SLICE ASSIGNMENT: ARR92( IDENT_INT(5)..IDENT_INT(9) ) ( IDENT_INT(6)..IDENT_INT(9) ) ( IDENT_INT(8)..IDENT_INT(7) ) := ARR91 ( IDENT_INT(1)..IDENT_INT(5) ) ( IDENT_INT(5)..IDENT_INT(4) ) ; -- CHECKING THE VALUES AFTER THE SLICE ASSIGNMENT: IF ARR92 /= "QUINC" OR ARR92( IDENT_INT(5)..IDENT_INT(9) ) /= "QUINC" THEN FAILED( "SLICE ASSIGNMENT NOT CORRECT (9)" ); END IF; EXCEPTION WHEN OTHERS => FAILED( "EXCEPTION RAISED - SUBTEST 9" ); END ; ------------------------------------------------------------------- RESULT ; END C52103R;
programs/oeis/232/A232580.asm
jmorken/loda
1
24128
<filename>programs/oeis/232/A232580.asm ; A232580: Number of binary sequences of length n that contain at least one contiguous subsequence 011. ; 0,0,0,1,4,12,31,74,168,369,792,1672,3487,7206,14788,30185,61356,124308,251199,506578,1019920,2050785,4119280,8267216,16580799,33236622,66594636,133385689,267089188,534692604,1070217247,2141780762,4285739832,8575004241,17155711368,34320650200,68656230751,137336619318,274712326804,549487899593,1099078133340,2198321846820,4396911607935,8794256710306,17589214829344,35179564561857,70360965435616,140724902086304,281454611699583,562917002141214,1125846590551452,2251713546113977,4503460043508052,9006973403307276 mov $2,$0 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 sub $0,1 mov $3,$0 cal $3,8466 ; a(n) = 2^n - Fibonacci(n+2). add $1,$3 lpe
colors3.asm
funkacer/ZX80
0
89658
DEVICE ZXSPECTRUM48 org $8000 last_k = 23560 ROM_CLS = $0DAF start: im 1 ld b, 255 loop: ld hl, last_k ld a, (hl) cp 112 jr z, cls rst $10 dec b jr z, cls jr loop cls: call ROM_CLS ld hl,last_k ld a,(hl) ; A = byte at address in HL (register,register indirect) rst $10 jr start ret ; Deployment: Snapshot SAVESNA "colors3.sna", start
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i7-7700_9_0x48_notsx.log_2204_188.asm
ljhsiun2/medusa
9
29486
<filename>Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i7-7700_9_0x48_notsx.log_2204_188.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r11 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1146d, %rax nop nop nop nop nop and %rbx, %rbx vmovups (%rax), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %r11 nop nop nop sub %rcx, %rcx lea addresses_A_ht+0xe26d, %rsi lea addresses_D_ht+0x1e005, %rdi nop nop nop inc %rdx mov $108, %rcx rep movsb nop nop nop nop nop and %rdi, %rdi lea addresses_A_ht+0x96ed, %rax nop nop nop cmp $31243, %rsi movl $0x61626364, (%rax) nop xor $56719, %rdi lea addresses_UC_ht+0xe798, %r11 nop cmp $49113, %rsi mov $0x6162636465666768, %rcx movq %rcx, (%r11) nop dec %rdi lea addresses_WC_ht+0x1c6d, %rdi nop nop nop add %rdx, %rdx mov $0x6162636465666768, %rax movq %rax, (%rdi) nop nop nop nop and $40221, %rsi lea addresses_A_ht+0xe802, %rbx dec %rdi vmovups (%rbx), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rcx nop nop nop nop cmp $8079, %rcx lea addresses_UC_ht+0x16d6d, %rbx nop nop add %r11, %r11 vmovups (%rbx), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rdi nop nop nop nop cmp $3682, %rdx lea addresses_normal_ht+0xc2ed, %rbx nop nop xor %r11, %r11 movups (%rbx), %xmm6 vpextrq $0, %xmm6, %rdx nop nop nop cmp %rdi, %rdi lea addresses_WT_ht+0xee6d, %rax inc %rbx movb $0x61, (%rax) nop nop nop sub %rbx, %rbx lea addresses_WT_ht+0x3e6d, %r11 nop nop nop nop mfence movups (%r11), %xmm5 vpextrq $0, %xmm5, %rdi nop nop nop nop nop add %r11, %r11 lea addresses_WT_ht+0xe869, %r11 nop nop nop add $16428, %rcx and $0xffffffffffffffc0, %r11 movaps (%r11), %xmm6 vpextrq $0, %xmm6, %rdi xor %rcx, %rcx lea addresses_normal_ht+0x52ad, %rbx nop nop nop sub %rdx, %rdx vmovups (%rbx), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %r11 and $16042, %rax lea addresses_D_ht+0x1dcc6, %rax nop nop nop inc %rcx movb $0x61, (%rax) nop inc %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r15 push %r8 push %rax push %rbx // Load lea addresses_D+0x457d, %rax nop nop nop xor $65300, %rbx vmovups (%rax), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %r15 nop nop nop nop nop cmp %r11, %r11 // Store mov $0x2a4d52000000066d, %rax clflush (%rax) nop nop nop nop nop add %r8, %r8 mov $0x5152535455565758, %r10 movq %r10, %xmm6 vmovups %ymm6, (%rax) nop xor %r15, %r15 // Store lea addresses_RW+0x2bed, %rax clflush (%rax) and $38005, %r14 mov $0x5152535455565758, %r15 movq %r15, %xmm2 vmovups %ymm2, (%rax) and $4197, %rax // Faulty Load mov $0x2a4d52000000066d, %r10 sub %r14, %r14 movaps (%r10), %xmm7 vpextrq $1, %xmm7, %r8 lea oracles, %r10 and $0xff, %r8 shlq $12, %r8 mov (%r10,%r8,1), %r8 pop %rbx pop %rax pop %r8 pop %r15 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_NC', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D', 'congruent': 4}} {'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_RW', 'congruent': 0}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_NC', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 9}} {'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 7, 'type': 'addresses_A_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 6}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 9}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 7}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 11}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': True, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 3}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 0}, 'OP': 'STOR'} {'f0': 1, '00': 2039, 'f8': 6, 'dc': 1, 'f7': 1, 'ec': 1, 'c5': 1, '40': 1, 'ff': 121, '19': 1, '73': 1, 'dd': 6, '4c': 1, 'cd': 1, '99': 1, '17': 2, 'ae': 1, 'e9': 1, '78': 1, 'e7': 13, 'eb': 1, '68': 2} 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 f8 00 00 00 00 00 00 00 00 00 ff 00 00 00 eb 00 00 00 e9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dc 00 00 00 ff 00 00 f8 00 00 f8 00 00 00 ff 00 00 00 00 ff 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 cd 00 00 00 00 00 f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 99 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 ff 00 00 00 00 ff 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 e7 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 e7 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 ff 00 00 00 00 ff 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 40 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 */