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
Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0x48.log_21829_2624.asm
ljhsiun2/medusa
9
23925
<filename>Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0x48.log_21829_2624.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1d2f8, %rdi and $10031, %rdx movw $0x6162, (%rdi) nop nop nop nop xor $21638, %rbp lea addresses_normal_ht+0xf2f8, %rsi lea addresses_A_ht+0x17338, %rdi nop nop nop nop nop dec %r10 mov $56, %rcx rep movsb cmp $22597, %rdx lea addresses_A_ht+0xf718, %rsi lea addresses_normal_ht+0x6ff8, %rdi xor %r12, %r12 mov $1, %rcx rep movsl nop and $62528, %rbx lea addresses_WC_ht+0x10738, %rsi add $3483, %rdi and $0xffffffffffffffc0, %rsi vmovaps (%rsi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r12 nop nop nop nop nop cmp %rbp, %rbp lea addresses_WT_ht+0xd118, %r10 nop cmp %r12, %r12 mov $0x6162636465666768, %rbx movq %rbx, %xmm4 vmovups %ymm4, (%r10) nop nop nop nop sub %rbx, %rbx lea addresses_UC_ht+0x1e40c, %rdi nop nop nop nop nop dec %rsi mov $0x6162636465666768, %r10 movq %r10, %xmm5 movups %xmm5, (%rdi) nop nop nop sub %r12, %r12 lea addresses_normal_ht+0x1aaf8, %r10 nop nop nop xor $47529, %rbp mov $0x6162636465666768, %rsi movq %rsi, %xmm0 movups %xmm0, (%r10) nop nop nop nop and $64742, %r10 lea addresses_UC_ht+0x91a2, %rsi lea addresses_WT_ht+0x18cdd, %rdi nop nop dec %rbx mov $73, %rcx rep movsl nop nop nop nop nop cmp %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r8 push %r9 push %rax push %rbp push %rdi // Store lea addresses_PSE+0x1a6f8, %rax nop nop add %r12, %r12 movl $0x51525354, (%rax) nop nop nop xor %r9, %r9 // Store lea addresses_UC+0x8e90, %rdi nop nop nop xor $57162, %rbp mov $0x5152535455565758, %r14 movq %r14, %xmm2 vmovups %ymm2, (%rdi) add %r9, %r9 // Store lea addresses_UC+0xc4f8, %r9 nop xor %r8, %r8 mov $0x5152535455565758, %rdi movq %rdi, (%r9) nop nop nop add %rbp, %rbp // Store lea addresses_A+0x16ef8, %rdi nop nop nop nop xor $20501, %r14 mov $0x5152535455565758, %rbp movq %rbp, %xmm0 vmovups %ymm0, (%rdi) nop nop nop nop nop dec %r8 // Faulty Load lea addresses_PSE+0x1a6f8, %rax nop add %r8, %r8 vmovntdqa (%rax), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %r12 lea oracles, %r9 and $0xff, %r12 shlq $12, %r12 mov (%r9,%r12,1), %r12 pop %rdi pop %rbp pop %rax pop %r9 pop %r8 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}} {'54': 21590, '00': 239} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
tests/remote_node_test.ads
jonashaggstrom/ada-canopen
6
9430
<reponame>jonashaggstrom/ada-canopen<gh_stars>1-10 with AUnit; with AUnit.Simple_Test_Cases; package Remote_Node_Test is type Test is new AUnit.Simple_Test_Cases.Test_Case with null record; function Name (T : Test) return AUnit.Message_String; procedure Run_Test (T : in out Test); end Remote_Node_Test;
works-done/Guia15/6-dado3=2dado1-3dado2.asm
axell-brendow/computer-architecture-i
0
90960
; area de codigo iniciara' a partir do endereco 2000H # ORG 2000H # BEGIN 2000H LHLD 2501 ; acessa o endereco 2501 na memoria, le um byte e guarda no registrador L, faz o mesmo processo com o registrador H no proximo byte MOV A, H ; coloca o conteudo do registrador H no acumulador SUB L ; subtrai o conteudo do registrador L no acumulador ADD A ; soma o conteudo do acumulador com o conteudo do acumulador SUB L ; subtrai o conteudo do registrador L no acumulador STA 2503 ; guarda o resultado no endereco 2503 HLT ; termina a execucao ; area de dados iniciara' a partir do endereco 2501H # ORG 2501H ; declara 2 bytes, com o primeiro comecando no endereco 2501H, e ja' inicia os valores nesses enderecos com 10 e 5 # DB 0AH, 05H
src/Prelude/List/Base.agda
t-more/agda-prelude
0
2026
module Prelude.List.Base where open import Prelude.Nat open import Prelude.Bool open import Prelude.Maybe open import Prelude.Product open import Prelude.Empty open import Prelude.Function open import Prelude.Functor open import Prelude.Applicative open import Prelude.Monad open import Prelude.Decidable open import Prelude.Equality open import Prelude.Ord open import Prelude.Semiring open import Prelude.Strict open import Prelude.Variables open import Agda.Builtin.List public infixr 5 _++_ pattern [_] x = x ∷ [] singleton : A → List A singleton x = x ∷ [] map : (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs _++_ : List A → List A → List A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ xs ++ ys length : List A → Nat length [] = 0 length (x ∷ xs) = 1 + length xs foldr : (A → B → B) → B → List A → B foldr f z [] = z foldr f z (x ∷ xs) = f x (foldr f z xs) foldl : (B → A → B) → B → List A → B foldl f z [] = z foldl f z (x ∷ xs) = foldl f (f z x) xs foldl! : (B → A → B) → B → List A → B foldl! f z [] = z foldl! f z (x ∷ xs) = force (f z x) λ z′ → foldl! f z′ xs reverse : List A → List A reverse xs = foldl (flip _∷_) [] xs concat : List (List A) → List A concat = foldr _++_ [] concatMap : (A → List B) → List A → List B concatMap f = concat ∘ map f filter : (A → Bool) → List A → List A filter p [] = [] filter p (x ∷ xs) = if p x then x ∷ filter p xs else filter p xs catMaybes : List (Maybe A) → List A catMaybes [] = [] catMaybes (x ∷ xs) = maybe (catMaybes xs) (_∷ catMaybes xs) x all? : (A → Bool) → List A → Bool all? p [] = true all? p (x ∷ xs) = p x && all? p xs any? : (A → Bool) → List A → Bool any? p [] = false any? p (x ∷ xs) = p x || any? p xs take : Nat → List A → List A take zero _ = [] take (suc n) [] = [] take (suc n) (x ∷ xs) = x ∷ take n xs drop : Nat → List A → List A drop zero xs = xs drop (suc n) [] = [] drop (suc n) (x ∷ xs) = drop n xs takeWhile : (A → Bool) → List A → List A takeWhile p [] = [] takeWhile p (x ∷ xs) = if p x then x ∷ takeWhile p xs else [] dropWhile : (A → Bool) → List A → List A dropWhile p [] = [] dropWhile p (x ∷ xs) = if p x then dropWhile p xs else x ∷ xs splitAt : Nat → List A → List A × List A splitAt zero xs = [] , xs splitAt (suc n) [] = [] , [] splitAt (suc n) (x ∷ xs) = first (x ∷_) (splitAt n xs) null : List A → Bool null [] = true null (_ ∷ _) = false elem : ⦃ Eq A ⦄ → A → List A → Bool elem x xs = not (null (filter (isYes ∘ _==_ x) xs)) lookup : ⦃ Eq A ⦄ → List (A × B) → A → Maybe B lookup [] _ = nothing lookup ((x₁ , v) ∷ xs) x = ifYes (x == x₁) then just v else lookup xs x nub : ⦃ Eq A ⦄ → List A → List A nub [] = [] nub (x ∷ xs) = x ∷ filter (isNo ∘ (x ==_)) (nub xs) index : List A → Nat → Maybe A index [] _ = nothing index (x ∷ xs) 0 = just x index (x ∷ xs) (suc i) = index xs i replicate : Nat → A → List A replicate zero x = [] replicate (suc n) x = x ∷ replicate n x zipWith : (A → B → C) → List A → List B → List C zipWith f [] _ = [] zipWith f _ [] = [] zipWith f (x ∷ xs) (y ∷ ys) = f x y ∷ zipWith f xs ys zip : List A → List B → List (A × B) zip = zipWith _,_ punctuate : A → List A → List A punctuate z [] = [] punctuate z [ x ] = [ x ] punctuate z (x ∷ xs) = x ∷ z ∷ punctuate z xs replicateA : ⦃ Applicative F ⦄ → Nat → F A → F (List A) replicateA zero _ = pure [] replicateA (suc n) x = pure _∷_ <*> x <*> replicateA n x module _ ⦃ _ : Semiring A ⦄ where sum : List A → A sum = foldl! _+_ zro product : List A → A product = foldl! _*_ one sumR : List A → A sumR = foldr _+_ zro productR : List A → A productR = foldr _*_ one module _ ⦃ _ : Ord A ⦄ where insert : A → List A → List A insert x [] = x ∷ [] insert x (y ∷ xs) = if x <? y then x ∷ y ∷ xs else y ∷ insert x xs sort : List A → List A sort [] = [] sort (x ∷ xs) = insert x (sort xs) infix 10 from_for_ from_to_ from_for_step_ from-to-step from_for_ : Nat → Nat → List Nat from 0 for 0 = [] -- make strict from a for 0 = [] from a for suc d = a ∷ from suc a for d from_for_step_ : Nat → Nat → Nat → List Nat from 0 for 0 step _ = [] -- make strict from a for 0 step _ = [] from a for suc c step d = a ∷ from a + d for c step d from_to_ : Nat → Nat → List Nat from a to b = from a for (suc b - a) syntax from-to-step d a b = from a to b step d from-to-step : (d : Nat) {{_ : NonZero d}} → Nat → Nat → List Nat from-to-step d a b = from a for 1 + (b - a) div d step d --- Equality --- cons-inj-tail : x ∷ xs ≡ y ∷ ys → xs ≡ ys cons-inj-tail refl = refl cons-inj-head : x ∷ xs ≡ y ∷ ys → x ≡ y cons-inj-head refl = refl private dec-∷ : Dec (x ≡ y) → Dec (xs ≡ ys) → Dec (x ∷ xs ≡ y ∷ ys) dec-∷ (yes refl) (yes refl) = yes refl dec-∷ _ (no neq) = no λ eq → neq (cons-inj-tail eq) dec-∷ (no neq) _ = no λ eq → neq (cons-inj-head eq) eqList : ⦃ Eq A ⦄ → (xs ys : List A) → Dec (xs ≡ ys) eqList [] [] = yes refl eqList [] (_ ∷ _) = no (λ ()) eqList (_ ∷ _) [] = no (λ ()) eqList (x ∷ xs) (y ∷ ys) = dec-∷ (x == y) (eqList xs ys) instance EqList : ⦃ Eq A ⦄ → Eq (List A) _==_ {{EqList}} = eqList --- Ord --- data LessList (_<_ : A → A → Set ℓ) : List A → List A → Set ℓ where nil<cons : LessList _<_ [] (x ∷ xs) head< : x < y → LessList _<_ (x ∷ xs) (y ∷ ys) tail< : LessList _<_ xs ys → LessList _<_ (x ∷ xs) (x ∷ ys) compareCons : ∀ {_<_ : A → A → Set ℓ} → Comparison _<_ x y → Comparison (LessList _<_) xs ys → Comparison (LessList _<_) (x ∷ xs) (y ∷ ys) compareCons (less lt) _ = less (head< lt) compareCons (greater gt) _ = greater (head< gt) compareCons (equal refl) (less lt) = less (tail< lt) compareCons (equal refl) (greater gt) = greater (tail< gt) compareCons (equal refl) (equal refl) = equal refl compareList : ∀ {_<_ : A → A → Set ℓ} (cmp : ∀ x y → Comparison _<_ x y) (xs ys : List A) → Comparison (LessList _<_) xs ys compareList cmp [] [] = equal refl compareList cmp [] (x ∷ ys) = less nil<cons compareList cmp (x ∷ xs) [] = greater nil<cons compareList cmp (x ∷ xs) (y ∷ ys) = compareCons (cmp x y) (compareList cmp xs ys) instance OrdList : ⦃ Ord A ⦄ → Ord (List A) OrdList = defaultOrd (compareList compare) OrdListLaws : ⦃ Ord/Laws A ⦄ → Ord/Laws (List A) Ord/Laws.super OrdListLaws = it less-antirefl {{OrdListLaws {A = A}}} (head< hd) = less-antirefl {A = A} hd less-antirefl {{OrdListLaws {A = A}}} (tail< tl) = less-antirefl {A = List A} tl less-trans {{OrdListLaws}} nil<cons (head< hd) = nil<cons less-trans {{OrdListLaws}} nil<cons (tail< tl) = nil<cons less-trans {{OrdListLaws {A = A}}} (head< hd) (head< hd₁) = head< (less-trans {A = A} hd hd₁) less-trans {{OrdListLaws {A = A}}} (head< hd) (tail< tl) = head< hd less-trans {{OrdListLaws {A = A}}} (tail< tl) (head< hd) = head< hd less-trans {{OrdListLaws {A = A}}} (tail< tl) (tail< tl₁) = tail< (less-trans {A = List A} tl tl₁) --- Functor --- instance FunctorList : Functor (List {ℓ}) fmap {{FunctorList}} = map FunctorList′ : Functor′ {ℓ₁} {ℓ₂} List fmap′ {{FunctorList′}} = map ApplicativeList : Applicative (List {ℓ}) pure {{ApplicativeList}} x = x ∷ [] _<*>_ {{ApplicativeList}} = monadAp (flip concatMap) ApplicativeList′ : Applicative′ {ℓ₁} {ℓ₂} List _<*>′_ {{ApplicativeList′}} = monadAp′ (flip concatMap) MonadList : Monad (List {ℓ}) _>>=_ {{MonadList}} xs f = concatMap f xs MonadList′ : Monad′ {ℓ₁} {ℓ₂} List _>>=′_ {{MonadList′}} xs f = concatMap f xs --- More functions --- IsPrefixOf : {A : Set ℓ} → List A → List A → Set ℓ IsPrefixOf xs ys = ∃ zs , ys ≡ xs ++ zs isPrefixOf : ⦃ Eq A ⦄ → (xs ys : List A) → Dec (IsPrefixOf xs ys) isPrefixOf [] ys = yes (ys , refl) isPrefixOf (x ∷ xs) [] = no λ where (zs , ()) isPrefixOf (x ∷ xs) (y ∷ ys) with y == x | isPrefixOf xs ys ... | yes y=x | yes (zs , xs⊑ys) = yes (zs , (_∷_ $≡ y=x *≡ xs⊑ys)) ... | _ | no noprefix = no λ where (zs , eq) → noprefix ((zs , cons-inj-tail eq)) ... | no y≠x | _ = no λ where (zs , eq) → y≠x (cons-inj-head eq) isPrefixOf? : ⦃ Eq A ⦄ → List A → List A → Bool isPrefixOf? xs ys = isYes (isPrefixOf xs ys) dropPrefix : ⦃ Eq A ⦄ → List A → List A → Maybe (List A) dropPrefix xs ys = case isPrefixOf xs ys of λ where (yes (tl , _)) → just tl (no _) → nothing commonPrefix : ⦃ Eq A ⦄ → (xs ys : List A) → ∃ zs , IsPrefixOf zs xs × IsPrefixOf zs ys commonPrefix [] ys = [] , (_ , refl) , (_ , refl) commonPrefix xs [] = [] , (_ , refl) , (_ , refl) commonPrefix (x ∷ xs) (y ∷ ys) with y == x | commonPrefix xs ys ... | yes y=x | zs , (xs₁ , eqx) , (ys₁ , eqy) = (x ∷ zs) , (xs₁ , (x ∷_ $≡ eqx)) , (ys₁ , (_∷_ $≡ y=x *≡ eqy)) ... | no _ | _ = [] , (_ , refl) , (_ , refl) commonPrefix! : ⦃ Eq A ⦄ → (xs ys : List A) → List A commonPrefix! xs ys = fst (commonPrefix xs ys) wordsBy : (A → Bool) → List A → List (List A) wordsBy {A = A} p = go in-word ∘ dropWhile p where data Mode : Set where in-word in-space : Mode cons : A → List (List A) → List (List A) cons x [] = [ x ] ∷ [] cons x (xs ∷ xss) = (x ∷ xs) ∷ xss go : Mode → List A → List (List A) go _ [] = [] go mode (x ∷ xs) with p x go mode (x ∷ xs) | false = cons x (go in-word xs) go in-word (x ∷ xs) | true = [] ∷ go in-space xs go in-space (x ∷ xs) | true = go in-space xs
programs/oeis/172/A172050.asm
karttu/loda
1
26263
<filename>programs/oeis/172/A172050.asm<gh_stars>1-10 ; A172050: A008585+A029907. ; 0,4,8,13,20,30,46,72,116,191,320,542,924,1580,2704,4625,7900,13470,22922,38928,65980,111619,188488,317758,534840,898900,1508696,2528917,4233956,7080606,11828710,19741272,32916164,54835655,91276304 mov $1,$0 mov $2,$0 cal $0,29907 ; a(n+1) = a(n) + a(n-1) + Fibonacci(n). mul $1,2 mov $3,$0 add $3,1 add $1,$3 sub $1,1 add $1,$2
examples/outdated-and-incorrect/lattice/Chain.agda
shlevy/agda
1,989
3325
module Chain { A : Set } (_==_ : A -> A -> Set ) (refl : (x : A) -> x == x) (trans : (x y z : A) -> x == y -> y == z -> x == z) where infix 2 chain>_ infixl 2 _===_ infix 3 _by_ chain>_ : (x : A) -> x == x chain> x = refl _ _===_ : {x y z : A} -> x == y -> y == z -> x == z xy === yz = trans _ _ _ xy yz _by_ : {x : A}(y : A) -> x == y -> x == y y by eq = eq
oeis/208/A208393.asm
neoneye/loda-programs
11
11618
; A208393: Number of 2 X n 0..2 arrays with new values 0..2 introduced in row major order and no element equal to more than two of its immediate leftward or upward or right-upward antidiagonal neighbors. ; Submitted by <NAME> ; 2,14,117,1017,8838,76806,667476,5800644,50410008,438083928,3807131472,33085555344,287527231584,2498731184736,21715012867392,188712490047552,1639989997584768,14252194920963456,123857499353216256,1076373164351510784,9354130310931383808,81291281473560135168,706455033654069384192,6139387958073915884544,53353833866515743381504,463666998680569442359296,4029458992643649999163392,35017673933232616647462912,304318145421722833174683648,2644651206973178365282246656,22983118528315763921306075136 seq $0,254657 ; Numbers of words on alphabet {0,1,...,8} with no subwords ii, where i is from {0,1,2}. mul $0,6 sub $0,1 div $0,4 add $0,1
programs/oeis/083/A083885.asm
karttu/loda
0
247636
; A083885: (4^n+2^n+0^n+(-2)^n)/4 ; 1,1,6,16,72,256,1056,4096,16512,65536,262656,1048576,4196352,16777216,67117056,268435456,1073774592,4294967296,17180000256,68719476736,274878431232,1099511627776,4398048608256,17592186044416,70368752566272,281474976710656,1125899940397056,4503599627370496 mov $7,$0 mov $9,2 lpb $9,1 clr $0,7 mov $0,$7 sub $9,1 add $0,$9 sub $0,1 mov $1,1 add $2,$0 mov $5,2 pow $5,$2 mov $2,$5 div $2,3 add $1,$2 mul $5,$1 mov $1,$5 mov $10,$9 lpb $10,1 mov $8,$1 sub $10,1 lpe lpe lpb $7,1 mov $7,0 sub $8,$1 lpe mov $1,$8
Cubical/HITs/SequentialColimit/Properties.agda
thomas-lamiaux/cubical
1
5058
{- This file contains: - Eliminators of direct limit, especially an index-shifting version; - Connectivity of inclusion maps. -} {-# OPTIONS --safe #-} module Cubical.HITs.SequentialColimit.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv.Properties open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Function open import Cubical.Data.Nat hiding (elim) open import Cubical.HITs.SequentialColimit.Base open import Cubical.Homotopy.Connected private variable ℓ ℓ' : Level module _ (X : Sequence ℓ) where open Sequence private inl∞ : (n : ℕ) → X .space n → Lim→ X inl∞ n = inl {n = n} record ElimData (P : Lim→ X → Type ℓ') : Type (ℓ-max ℓ ℓ') where field finl : {k : ℕ}(x : X .space k) → P (inl x) fpush : {k : ℕ}(x : X .space k) → PathP (λ i → P (push x i)) (finl x) (finl (X .map x)) record ElimShiftData (n : ℕ)(P : Lim→ X → Type ℓ') : Type (ℓ-max ℓ ℓ') where field finl : {k : ℕ}(x : X .space (k + n)) → P (inl x) fpush : {k : ℕ}(x : X .space (k + n)) → PathP (λ i → P (push x i)) (finl x) (finl (X .map x)) open ElimData open ElimShiftData ElimData→ElimShiftData : (n : ℕ)(P : Lim→ X → Type ℓ') → ElimData P → ElimShiftData n P ElimData→ElimShiftData n P datum .finl = datum .finl ElimData→ElimShiftData n P datum .fpush = datum .fpush -- Preliminary lemmas -- The difficulty is mainly due to natural numbers having no strict +-commutativity private alg-path : (a b : ℕ) → a + (1 + b) ≡ 1 + (a + b) alg-path a b = +-assoc a 1 b ∙ (λ i → +-comm a 1 i + b) module _ (P : Lim→ X → Type ℓ') (datum : ElimShiftData 0 P) where +-zero-0 : refl ≡ +-zero 0 +-zero-0 i j = isSet→SquareP (λ i j → isSetℕ) refl refl refl (+-zero 0) j i finl'-filler : (k : ℕ) → (i : I) → (x : X .space (+-zero k i)) → P (inl x) finl'-filler k i = transport-filler (λ i → (x : X .space (+-zero k i)) → P (inl x)) (datum .finl) i finl' : (k : ℕ) → (x : X .space k) → P (inl x) finl' k = finl'-filler k i1 finl'-0-eq : datum .finl ≡ finl' 0 finl'-0-eq = sym (transportRefl _) ∙ (λ j → transport (λ i → (x : X .space (+-zero-0 j i)) → P (inl x)) (datum .finl {k = 0})) fpush' : (k : ℕ) → (x : X .space k) → PathP (λ i → P (push x i)) (finl' k x) (finl' (1 + k) (X .map x)) fpush' k = transport (λ i → (x : X .space (+-zero k i)) → PathP (λ i → P (push x i)) (finl'-filler k i x) (finl'-filler (1 + k) i (X .map x))) (datum .fpush) ElimShiftData0→ElimData : ElimData P ElimShiftData0→ElimData .finl = finl' _ ElimShiftData0→ElimData .fpush = fpush' _ module _ (n : ℕ)(P : Lim→ X → Type ℓ') (datum : ElimShiftData (1 + n) P) where alg-path-0 : (b : ℕ) → refl ≡ alg-path 0 b alg-path-0 b i j = isSet→SquareP (λ i j → isSetℕ) refl refl refl (alg-path 0 b) j i finl-n-filler : (k : ℕ) → (i : I) → ((x : X .space (alg-path k n i)) → P (inl x)) finl-n-filler k i = transport-filler (λ i → (x : X .space (alg-path k n i)) → P (inl x)) (datum .finl) i finl-n : (k : ℕ) → (x : X .space ((1 + k) + n)) → P (inl x) finl-n k = finl-n-filler k i1 fpush-n : (k : ℕ) → (x : X .space ((1 + k) + n)) → PathP (λ i → P (push x i)) (finl-n k x) (finl-n (1 + k) (X .map x)) fpush-n k = transport (λ i → (x : X .space (alg-path k n i)) → PathP (λ i → P (push x i)) (finl-n-filler k i x) (finl-n-filler (1 + k) i (X .map x))) (datum .fpush) finl-0-filler : (x : X .space n) → (i : I) → P (push x i) finl-0-filler x i = transport-filler (λ i → P (push x (~ i))) (datum .finl {k = 0} (X .map x)) (~ i) finl-0 : (x : X .space n) → P (inl x) finl-0 x = finl-0-filler x i0 finl-0-eq : datum .finl {k = 0} ≡ finl-n 0 finl-0-eq = sym (transportRefl _) ∙ (λ j → transport (λ i → (x : X .space (alg-path-0 n j i)) → P (inl x)) (datum .finl {k = 0})) fpush-0 : (x : X .space n) → PathP (λ i → P (push x i)) (finl-0 x) (finl-n 0 (X .map x)) fpush-0 x i = hcomp (λ j → λ { (i = i0) → finl-0 x ; (i = i1) → finl-0-eq j (X .map x) }) (finl-0-filler x i) elimShiftDataSuc : ElimShiftData n P elimShiftDataSuc .finl {k = 0} = finl-0 elimShiftDataSuc .finl {k = suc k} = finl-n k elimShiftDataSuc .fpush {k = 0} = fpush-0 elimShiftDataSuc .fpush {k = suc k} = fpush-n k -- The eliminators elim : (P : Lim→ X → Type ℓ') → ElimData P → (x : Lim→ X) → P x elim P datum (inl x) = datum .finl x elim P datum (push x i) = datum .fpush x i elimShift : (n : ℕ) → (P : Lim→ X → Type ℓ') → ElimShiftData n P → (x : Lim→ X) → P x elimShift 0 _ datum = elim _ (ElimShiftData0→ElimData _ datum) elimShift (suc n) _ datum = elimShift n _ (elimShiftDataSuc _ _ datum) elimShiftβ : (n : ℕ)(k : ℕ) → (P : Lim→ X → Type ℓ') → (datum : ElimShiftData n P) → elimShift _ _ datum ∘ inl∞ (k + n) ≡ datum .finl elimShiftβ 0 0 _ datum = sym (finl'-0-eq _ datum) elimShiftβ 0 (suc k) P datum = transport (λ i → elimShift _ _ datum ∘ inl∞ (+-zero (suc k) (~ i)) ≡ finl'-filler P datum (suc k) (~ i)) refl elimShiftβ (suc n) 0 _ datum = elimShiftβ n _ _ (elimShiftDataSuc _ _ datum) ∙ sym (finl-0-eq _ _ datum) elimShiftβ (suc n) (suc k) P datum = transport (λ i → elimShift _ _ datum ∘ inl∞ (alg-path (suc k) n (~ i)) ≡ finl-n-filler n P datum (suc k) (~ i)) (elimShiftβ n (suc (suc k)) P (elimShiftDataSuc _ _ datum)) -- Lemma to lift sections open Iso private transpSec : (n : ℕ)(Y : Lim→ X → Type ℓ') (sec : (x : X .space n) → Y (inl x)) → (x : X .space n) → Y (inl (X .map x)) transpSec n Y sec x = transport (λ i → Y (push x i)) (sec x) module _ (d : ℕ)(n : ℕ) (conn : isConnectedFun d (X .map {n = n})) (Y : Lim→ X → TypeOfHLevel ℓ' d) where module _ (sec : (x : X .space n) → Y (inl (X .map x)) .fst) where lift-iso = elim.isIsoPrecompose _ d (Y ∘ inl) conn liftSec' : (x : X .space (1 + n)) → Y (inl x) .fst liftSec' = lift-iso .inv sec liftSecPath' : (x : X .space n) → sec x ≡ liftSec' (X .map x) liftSecPath' x i = lift-iso .rightInv sec (~ i) x module _ (sec : (x : X .space n) → Y (inl x) .fst) where liftSec : (x : X .space (1 + n)) → Y (inl x) .fst liftSec = liftSec' (transpSec n (λ x → Y x .fst) sec) liftSecPath : (x : X .space n) → PathP (λ i → Y (push x i) .fst) (sec x) (liftSec (X .map x)) liftSecPath x i = hcomp (λ j → λ { (i = i0) → sec x ; (i = i1) → liftSecPath' (transpSec n (λ x → Y x .fst) sec) x j }) (transport-filler (λ i → Y (push x i) .fst) (sec x) i) module _ (d : ℕ)(n : ℕ) (conn : (k : ℕ) → isConnectedFun d (X .map {n = k + n})) where private module _ (Y : Lim→ X → TypeOfHLevel ℓ' d) where lifting : (k : ℕ)(sec : (x : X .space n) → Y (inl x) .fst) → (x : X .space (k + n)) → Y (inl x) .fst lifting 0 sec = sec lifting (suc k) sec = liftSec d _ (conn _) Y (lifting k sec) liftingPath : (k : ℕ)(sec : (x : X .space n) → Y (inl x) .fst) → (x : X .space (k + n)) → PathP (λ i → Y (push x i) .fst) (lifting k sec x) (lifting (1 + k) sec (X .map x)) liftingPath k sec = liftSecPath d _ (conn _) Y (lifting k sec) liftingData : ((x : X .space n) → Y (inl x) .fst) → ElimShiftData n (λ x → Y x .fst) liftingData sec .finl = lifting _ sec liftingData sec .fpush = liftingPath _ sec hasSectionInl∘ : hasSection (λ (sec : (x : Lim→ X) → Y x .fst) → sec ∘ inl {n = n}) hasSectionInl∘ .fst sec = elimShift _ _ (liftingData sec) hasSectionInl∘ .snd sec = elimShiftβ _ _ _ (liftingData sec) -- Connectivity of inclusion map isConnectedInl∞ : isConnectedFun d (inl∞ n) isConnectedInl∞ = elim.isConnectedPrecompose _ _ hasSectionInl∘
agda/Esterel/CompletionCode.agda
florence/esterel-calculus
3
12747
module Esterel.CompletionCode where open import Data.Nat using (ℕ ; zero ; suc) renaming (_≟_ to _≟ℕ_ ; _⊔_ to _⊔ℕ_ ; _≤_ to _≤N_ ; _≤?_ to _≤?N_) open import Data.Nat.Properties using (⊔-⊓-isCommutativeSemiringWithoutOne) open import Function using (_∘_) open import Relation.Nullary using (Dec ; yes ; no) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality using (_≡_ ; refl ; cong) import Level import Relation.Binary open import Data.List using (List ; _∷_ ; [] ; _++_) open import Data.List.Any.Properties using (++⁻) renaming (++⁺ˡ to ++ˡ ; ++⁺ʳ to ++ʳ) open import Data.Sum using (_⊎_ ; inj₁ ; inj₂) open import Data.Empty using (⊥-elim) import Data.Bool open import Algebra.Structures using (IsCommutativeSemiringWithoutOne ; IsCommutativeMonoid) open import utility data CompletionCode : Set where nothin : CompletionCode pause : CompletionCode exit : ℕ → CompletionCode ↓* : CompletionCode → CompletionCode ↓* nothin = nothin ↓* pause = pause ↓* (exit zero) = nothin ↓* (exit (suc n)) = exit n exit-injective : ∀{n m} → exit n ≡ exit m → n ≡ m exit-injective refl = refl _≟_ : Decidable {A = CompletionCode} _≡_ nothin ≟ nothin = yes refl nothin ≟ pause = no λ() nothin ≟ exit _ = no λ() pause ≟ nothin = no λ() pause ≟ pause = yes refl pause ≟ exit _ = no λ() exit _ ≟ nothin = no λ() exit _ ≟ pause = no λ() exit n ≟ exit m with n ≟ℕ m ... | yes n≡m = yes (cong exit n≡m) ... | no ¬n≡m = no (¬n≡m ∘ exit-injective) open ListSet _≟_ _⊔_ : CompletionCode → CompletionCode → CompletionCode nothin ⊔ r = r pause ⊔ nothin = pause pause ⊔ r = r exit n ⊔ nothin = exit n exit n ⊔ pause = exit n exit n ⊔ exit m = exit (n ⊔ℕ m) ⊔-comm : ∀ c₁ c₂ → c₁ ⊔ c₂ ≡ c₂ ⊔ c₁ ⊔-comm nothin nothin = refl ⊔-comm nothin pause = refl ⊔-comm nothin (exit m) = refl ⊔-comm pause nothin = refl ⊔-comm pause pause = refl ⊔-comm pause (exit m) = refl ⊔-comm (exit n) nothin = refl ⊔-comm (exit n) pause = refl ⊔-comm (exit n) (exit m) rewrite IsCommutativeMonoid.comm (IsCommutativeSemiringWithoutOne.+-isCommutativeMonoid ⊔-⊓-isCommutativeSemiringWithoutOne) n m = refl data _≤_ : Relation.Binary.Rel CompletionCode Level.zero where nothin≤c : ∀ {c} -> nothin ≤ c pause≤pause : pause ≤ pause pause≤exit : ∀ {n} -> pause ≤ exit n exit≤exit : ∀ {n} {m} -> (n ≤N m) -> exit n ≤ exit m _≤?_ : Decidable _≤_ nothin ≤? c2 = yes nothin≤c pause ≤? nothin = no (λ ()) pause ≤? pause = yes pause≤pause pause ≤? exit x = yes pause≤exit exit n ≤? nothin = no (λ ()) exit n ≤? pause = no (λ ()) exit n ≤? exit m with n ≤?N m exit n ≤? exit m | yes n≤m = yes (exit≤exit n≤m) exit n ≤? exit m | no ¬n≤m = no ¬≤ where ¬≤ : Relation.Nullary.¬ (exit n ≤ exit m) ¬≤ (exit≤exit n) = ¬n≤m n codessub : (List CompletionCode) → (List CompletionCode) → Set codessub codes' codes = (∀ a → a ∈ codes' → a ∈ codes) codesub++ll : ∀{a b c} → codessub a b → codessub a (b ++ c) codesub++ll sub a a∈ = ++ˡ (sub a a∈) codesub++both : ∀{a b c d} → codessub a c → codessub b d → codessub (a ++ b) (c ++ d) codesub++both{a}{b}{c}{d} a⊂c b⊂d z z∈ with ++⁻ a z∈ ... | inj₁ z∈1 = ++ˡ (a⊂c z z∈1) ... | inj₂ z∈2 = ++ʳ c (b⊂d z z∈2) codesub- : ∀{a b} z → codessub a b → codessub (set-remove a z) (set-remove b z) codesub-{a}{b} z a⊂b x x∈ with z ≟ x ... | yes refl = ⊥-elim (set-remove-removed{x}{a} x∈) ... | no ¬refl = set-remove-not-removed ¬refl (a⊂b x (set-remove-mono-∈ z x∈))
wof/lcs/base/2F0.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
12032
copyright zengfr site:http://github.com/zengfr/romhack 001452 movea.w (A4)+, A1 [base+2F0] 001458 subq.w #1, ($302,A5) [base+2F0] 00152A move.w A0, -(A4) [base+2F0] 001530 addq.w #1, ($302,A5) [base+2F0] 01A7EA move.w A6, ($2f0,A5) [base+302] 01A7EE lea ($613c,A5), A0 [base+2F0] copyright zengfr site:http://github.com/zengfr/romhack
helloex1.adb
MatrixMike/AdaDemo1
1
21956
<reponame>MatrixMike/AdaDemo1 with Ada.text_IO; -- testing attributes 'Value and 'Image as applied to Integer procedure HelloEx1 is A,B,C : Integer; begin A := Integer'Value ( Ada.text_IO.Get_Line); B := Integer'Value ( Ada.text_IO.Get_Line); C := A + B ; if c = 0 then Ada.text_IO.Put_Line ("Result is 0 "); elsif C > 0 then Ada.text_IO.Put_Line ("Positive Result : " & Integer'Image(C)); else Ada.text_IO.Put_Line ("negative Result : " & Integer'Image(C)); end if; end HelloEx1;
programs/oeis/155/A155158.asm
karttu/loda
0
86282
; A155158: Period 4: repeat [1, 5, 7, 3]. ; 1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5,7,3,1,5 lpb $0,1 sub $0,4 lpe add $1,$0 add $1,$0 lpb $1,1 mov $1,$0 add $0,1 lpe mov $1,$0 mul $1,2 add $1,1
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_1113.asm
ljhsiun2/medusa
9
7621
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %rcx push %rdi push %rsi lea addresses_A_ht+0x68ec, %rsi lea addresses_UC_ht+0x1aa5c, %rdi nop nop nop nop sub $64776, %r10 mov $28, %rcx rep movsq nop nop nop xor %r10, %r10 lea addresses_WT_ht+0x535c, %r11 cmp %rsi, %rsi mov (%r11), %r13w nop nop nop nop inc %rcx pop %rsi pop %rdi pop %rcx pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %r8 push %r9 push %rdx // Store lea addresses_UC+0x1855c, %rdx nop nop cmp $23729, %r8 movb $0x51, (%rdx) nop and %r9, %r9 // Load mov $0x6eaed900000006fc, %r10 nop nop nop nop inc %r13 movups (%r10), %xmm1 vpextrq $1, %xmm1, %r15 nop nop nop nop add $29810, %r9 // Store lea addresses_WT+0x11e60, %r8 nop nop nop nop cmp $58917, %r9 mov $0x5152535455565758, %r10 movq %r10, (%r8) nop add $16651, %r8 // Faulty Load lea addresses_WT+0xc35c, %r9 nop nop nop nop nop dec %r11 movntdqa (%r9), %xmm5 vpextrq $0, %xmm5, %r13 lea oracles, %r15 and $0xff, %r13 shlq $12, %r13 mov (%r15,%r13,1), %r13 pop %rdx pop %r9 pop %r8 pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_UC', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 1, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}} [Faulty Load] {'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}} {'src': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'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 */
src/shaders/vme/intra_frame.asm
tizenorg/platform.upstream.libva-intel-driver
0
168342
<gh_stars>0 /* * Copyright © <2010>, Intel Corporation. * * This program is licensed under the terms and conditions of the * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at * http://www.opensource.org/licenses/eclipse-1.0.php. * */ // Modual name: IntraFrame.asm // // Make intra predition estimation for Intra frame // // // Now, begin source code.... // /* * __START */ __INTRA_START: mov (16) tmp_reg0.0<1>:UD 0x0:UD {align1}; mov (16) tmp_reg2.0<1>:UD 0x0:UD {align1}; mov (16) tmp_reg4.0<1>:UD 0x0:UD {align1} ; shl (2) read0_header.0<1>:D orig_xy_ub<2,2,1>:UB 4:UW {align1}; /* (x, y) * 16 */ add (1) read0_header.0<1>:D read0_header.0<0,1,0>:D -8:W {align1}; /* X offset */ add (1) read0_header.4<1>:D read0_header.4<0,1,0>:D -1:W {align1}; /* Y offset */ mov (1) read0_header.8<1>:UD BLOCK_32X1 {align1}; mov (1) read0_header.20<1>:UB thread_id_ub {align1}; /* dispatch id */ shl (2) read1_header.0<1>:D orig_xy_ub<2,2,1>:UB 4:UW {align1}; /* (x, y) * 16 */ add (1) read1_header.0<1>:D read1_header.0<0,1,0>:D -4:W {align1}; /* X offset */ mov (1) read1_header.8<1>:UD BLOCK_4X16 {align1}; mov (1) read1_header.20<1>:UB thread_id_ub {align1}; /* dispatch id */ shl (2) vme_m0.8<1>:UW orig_xy_ub<2,2,1>:UB 4:UW {align1}; /* (x, y) * 16 */ mov (1) vme_m0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ mul (1) obw_m0.8<1>:UD w_in_mb_uw<0,1,0>:UW orig_y_ub<0,1,0>:UB {align1}; add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD orig_x_ub<0,1,0>:UB {align1}; mov (1) obw_m0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ /* * Media Read Message -- fetch neighbor edge pixels */ /* ROW */ __INTRA_LOOP: mov (8) msg_reg0.0<1>:UD read0_header.0<8,8,1>:UD {align1}; send (8) msg_ind INEP_ROW<1>:UB null read(BIND_IDX_INEP, 0, 0, 4) mlen 1 rlen 1 {align1}; /* COL */ mov (8) msg_reg0.0<1>:UD read1_header.0<8,8,1>:UD {align1}; send (8) msg_ind INEP_COL0<1>:UB null read(BIND_IDX_INEP, 0, 0, 4) mlen 1 rlen 2 {align1}; /* * VME message */ /* m0 */ mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1}; /* m1 */ mov (1) intra_flag<1>:UW 0x0:UW {align1} ; and.z.f0.0 (1) null<1>:UW transform_8x8_ub<0,1,0>:UB 1:UW {align1}; (f0.0) mov (1) intra_part_mask_ub<1>:UB LUMA_INTRA_8x8_DISABLE {align1}; cmp.nz.f0.0 (1) null<1>:UW orig_x_ub<0,1,0>:UB 0:UW {align1}; /* X != 0 */ (f0.0) add (1) mb_intra_struct_ub<1>:UB mb_intra_struct_ub<0,1,0>:UB INTRA_PRED_AVAIL_FLAG_AE {align1}; /* A */ cmp.nz.f0.0 (1) null<1>:UW orig_y_ub<0,1,0>:UB 0:UW {align1}; /* Y != 0 */ (f0.0) add (1) mb_intra_struct_ub<1>:UB mb_intra_struct_ub<0,1,0>:UB INTRA_PRED_AVAIL_FLAG_B {align1}; /* B */ mul.nz.f0.0 (1) null<1>:UW orig_x_ub<0,1,0>:UB orig_y_ub<0,1,0>:UB {align1}; /* X * Y != 0 */ (f0.0) add (1) mb_intra_struct_ub<1>:UB mb_intra_struct_ub<0,1,0>:UB INTRA_PRED_AVAIL_FLAG_D {align1}; /* D */ add (1) tmp_x_w<1>:W orig_x_ub<0,1,0>:UB 1:UW {align1}; /* X + 1 */ add (1) tmp_x_w<1>:W w_in_mb_uw<0,1,0>:UW -tmp_x_w<0,1,0>:W {align1}; /* width - (X + 1) */ mul.nz.f0.0 (1) null<1>:UD tmp_x_w<0,1,0>:W orig_y_ub<0,1,0>:UB {align1}; /* (width - (X + 1)) * Y != 0 */ (f0.0) add (1) mb_intra_struct_ub<1>:UB mb_intra_struct_ub<0,1,0>:UB INTRA_PRED_AVAIL_FLAG_C {align1}; /* C */ and.nz.f0.0 (1) null<1>:UW slice_edge_ub<0,1,0>:UB 2:UW {align1}; (f0.0) and (1) mb_intra_struct_ub<1>:UB mb_intra_struct_ub<0,1,0>:UB 0xE0 {align1}; /* slice edge disable B,C,D*/ mov (8) vme_msg_1<1>:UD vme_m1.0<8,8,1>:UD {align1}; /* m2 */ mov (8) vme_msg_2<1>:UD 0x0:UD {align1}; /* m3 */ mov (1) INEP_ROW.0<1>:UD 0x0:UD {align1}; and (1) INEP_ROW.4<1>:UD INEP_ROW.4<0,1,0>:UD 0xFF000000:UD {align1}; mov (8) vme_msg_3<1>:UD INEP_ROW.0<8,8,1>:UD {align1}; /* m4 */ mov (8) vme_msg_4<1>:UD 0x0 {align1}; mov (16) vme_msg_4.0<1>:UB INEP_COL0.3<32,8,4>:UB {align1}; mov (1) vme_msg_4.16<1>:UD INTRA_PREDICTORE_MODE {align1}; send (8) vme_msg_ind vme_wb null vme( BIND_IDX_VME, 0, 0, VME_MESSAGE_TYPE_INTRA ) mlen vme_msg_length rlen vme_intra_wb_length {align1}; /* * Oword Block Write message */ mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; mov (1) msg_reg1.0<1>:UD vme_wb.0<0,1,0>:UD {align1}; mov (1) msg_reg1.4<1>:UD vme_wb.16<0,1,0>:UD {align1}; mov (1) msg_reg1.8<1>:UD vme_wb.20<0,1,0>:UD {align1}; mov (1) msg_reg1.12<1>:UD vme_wb.24<0,1,0>:UD {align1}; /* bind index 3, write 1 oword, msg type: 8(OWord Block Write) */ send (16) msg_ind obw_wb null data_port( OBW_CACHE_TYPE, OBW_MESSAGE_TYPE, OBW_CONTROL_0, OBW_BIND_IDX, OBW_WRITE_COMMIT_CATEGORY, OBW_HEADER_PRESENT ) mlen 2 rlen obw_wb_length {align1}; add (1) read0_header.0<1>:D read0_header.0<0,1,0>:D 16:W {align1}; /* X offset: X += 16 */ add (1) read1_header.0<1>:D read1_header.0<0,1,0>:D 16:W {align1}; /* X offset: X += 16 */ add (1) vme_m0.8<1>:UW vme_m0.8<0,1,0>:UW 16:UW {align1}; /* Y = Y, X += 16 */ add (1) orig_x_ub<1>:ub orig_x_ub<0,1,0>:ub 1:uw {align1} ; cmp.e.f0.0 (1) null<1>:uw w_in_mb_uw<0,1,0>:uw orig_x_ub<0,1,0>:ub {align1}; (f0.0)mov (1) orig_x_ub<1>:ub 0:uw {align1} ; (f0.0)add (1) orig_y_ub<1>:ub orig_y_ub<0,1,0>:ub 1:uw {align1} ; (f0.0)mov (1) read0_header.0<1>:D -8:W {align1}; /* X offset */ (f0.0)add (1) read0_header.4<1>:D read0_header.4<0,1,0>:D 16:W {align1}; /* Y offset */ (f0.0)mov (1) read1_header.0<1>:D -4:W {align1}; /* X offset */ (f0.0)add (1) read1_header.4<1>:D read1_header.4<0,1,0>:D 16:W {align1}; /* Y offset */ /* X = 0, Y += 16 */ (f0.0)mov (1) vme_m0.8<1>:UW 0:UW {align1}; (f0.0)add (1) vme_m0.10<1>:UW vme_m0.10<0,1,0>:UW 16:UW {align1}; add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 1:uw {align1}; /* the new offset */ add.z.f0.0 (1) num_macroblocks<1>:w num_macroblocks<0,1,0>:w -1:w {align1} ; (-f0.0)jmpi (1) __INTRA_LOOP ; __EXIT: /* * kill thread */ mov (8) msg_reg0<1>:UD r0<8,8,1>:UD {align1}; send (16) msg_ind acc0<1>UW null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT};
oeis/040/A040484.asm
neoneye/loda-programs
11
3251
<gh_stars>10-100 ; A040484: Continued fraction for sqrt(507). ; Submitted by <NAME>iga ; 22,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1 seq $0,40256 ; Continued fraction for sqrt(273). mul $0,7 div $0,5
dsl/antlr/Expr/Common.g4
y2ghost/study
0
663
lexer grammar Common; ID: [a-zA-Z]+; INT: [0-9]+; NEWLINE: '\r' ? '\n'; WS: [ \t]+ -> skip;
src/natools-web-comment_cookies-base_64.adb
faelys/natools-web
1
1688
<filename>src/natools-web-comment_cookies-base_64.adb ------------------------------------------------------------------------------ -- Copyright (c) 2017, <NAME> -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Encodings; package body Natools.Web.Comment_Cookies.Base_64 is function Encoder (Data : in S_Expressions.Atom) return String is begin return Key & S_Expressions.To_String (S_Expressions.Encodings.Encode_Base64 (Data)); end Encoder; function Decoder (Data : in String) return S_Expressions.Atom is begin if Data'Length > 0 then return S_Expressions.Encodings.Decode_Base64 (S_Expressions.To_Atom (Data (Data'First + 1 .. Data'Last))); else return S_Expressions.Null_Atom; end if; end Decoder; end Natools.Web.Comment_Cookies.Base_64;
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_21829_1166.asm
ljhsiun2/medusa
9
88087
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %rax push %rdx lea addresses_UC_ht+0x11b54, %rdx nop nop add $15677, %r11 movups (%rdx), %xmm4 vpextrq $1, %xmm4, %r13 nop nop nop sub %rax, %rax pop %rdx pop %rax pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %r8 push %r9 push %rdi // Store lea addresses_D+0x1c6fc, %rdi nop nop nop and %r11, %r11 mov $0x5152535455565758, %r13 movq %r13, %xmm1 movups %xmm1, (%rdi) nop nop dec %r9 // Store lea addresses_PSE+0x5214, %r13 nop nop nop nop nop and $38108, %r14 mov $0x5152535455565758, %r9 movq %r9, %xmm1 vmovups %ymm1, (%r13) nop nop xor %r9, %r9 // Store mov $0xbc4, %r14 nop nop nop add $24093, %r13 movl $0x51525354, (%r14) nop nop nop nop nop sub $22380, %r13 // Store lea addresses_US+0x2214, %r14 nop nop nop nop xor %r13, %r13 movb $0x51, (%r14) nop nop nop nop nop sub %r13, %r13 // Store lea addresses_WT+0x16a14, %r8 nop nop inc %r11 mov $0x5152535455565758, %rdi movq %rdi, (%r8) nop xor %r14, %r14 // Store lea addresses_WC+0xf5d4, %r13 nop nop nop nop xor $24725, %r11 movw $0x5152, (%r13) nop nop nop nop nop inc %rdi // Store lea addresses_UC+0x1c74, %r14 clflush (%r14) xor %r9, %r9 movb $0x51, (%r14) cmp %r11, %r11 // Store lea addresses_WC+0x1ba14, %r9 nop nop nop nop and %r8, %r8 movl $0x51525354, (%r9) cmp $5115, %rdi // Store lea addresses_PSE+0x3214, %r11 nop and $31183, %r9 movb $0x51, (%r11) nop nop nop xor $39402, %r9 // Faulty Load lea addresses_WC+0x1ba14, %r11 nop nop nop nop inc %r14 movntdqa (%r11), %xmm4 vpextrq $1, %xmm4, %r13 lea oracles, %r11 and $0xff, %r13 shlq $12, %r13 mov (%r11,%r13,1), %r13 pop %rdi pop %r9 pop %r8 pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 10, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'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 */
source/machine-w64-mingw32/x86_64/s-unwmap.ads
ytomino/drake
33
20249
<gh_stars>10-100 pragma License (Unrestricted); -- overridable runtime unit specialized for Windows (x86_64) with System.Unwind.Representation; with C.winnt; package System.Unwind.Mapping is pragma Preelaborate; -- signal alt stack type Signal_Stack_Type is private; -- register signal handler (init.c/seh_init.c) procedure Install_Exception_Handler (SEH : Address) is null with Export, -- for weak linking Convention => Ada, External_Name => "__drake_install_exception_handler"; procedure Install_Task_Exception_Handler ( SEH : Address; Signal_Stack : not null access Signal_Stack_Type) is null with Export, Convention => Ada, External_Name => "__drake_install_task_exception_handler"; procedure Reinstall_Exception_Handler is null with Export, Convention => Ada, External_Name => "__drake_reinstall_exception_handler"; -- equivalent to __gnat_map_SEH (seh_init.c) -- and Create_Machine_Occurrence_From_Signal_Handler (a-except-2005.adb) function New_Machine_Occurrence_From_SEH ( Exception_Record : C.winnt.struct_EXCEPTION_RECORD_ptr) return Representation.Machine_Occurrence_Access with Export, Convention => Ada, External_Name => "__drake_new_machine_occurrence_from_seh"; pragma No_Inline (New_Machine_Occurrence_From_SEH); private type Signal_Stack_Type is null record; pragma Suppress_Initialization (Signal_Stack_Type); end System.Unwind.Mapping;
Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca_notsx.log_21829_1269.asm
ljhsiun2/medusa
9
23081
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xe959, %rsi lea addresses_WT_ht+0x12f9c, %rdi nop nop nop nop nop and $10671, %rdx mov $120, %rcx rep movsl nop nop nop nop sub $38973, %r9 lea addresses_A_ht+0xb371, %r10 nop nop nop nop nop and $15500, %r12 mov $0x6162636465666768, %rsi movq %rsi, %xmm7 movups %xmm7, (%r10) nop sub $25370, %rdi lea addresses_A_ht+0xcf59, %rcx clflush (%rcx) sub %r10, %r10 mov (%rcx), %r9 nop nop sub %rsi, %rsi lea addresses_WT_ht+0x17f59, %rsi nop nop nop nop nop sub $16343, %r10 and $0xffffffffffffffc0, %rsi movaps (%rsi), %xmm5 vpextrq $0, %xmm5, %r9 nop xor $10695, %rcx lea addresses_WT_ht+0xeb59, %r10 xor %r9, %r9 mov $0x6162636465666768, %rdx movq %rdx, %xmm1 and $0xffffffffffffffc0, %r10 vmovntdq %ymm1, (%r10) add %r10, %r10 lea addresses_normal_ht+0xae59, %r12 nop nop nop nop add %rcx, %rcx mov (%r12), %dx nop nop nop nop nop and %r10, %r10 lea addresses_WT_ht+0xc259, %rcx nop nop xor %r10, %r10 movl $0x61626364, (%rcx) nop nop nop nop and $5731, %rsi lea addresses_D_ht+0x112d9, %rsi lea addresses_WT_ht+0x9fe9, %rdi nop nop nop xor $6382, %rdx mov $116, %rcx rep movsq nop xor $8725, %rdx lea addresses_A_ht+0x189b4, %rsi nop nop nop add $26194, %r12 mov (%rsi), %r9 nop nop nop sub %rdi, %rdi lea addresses_A_ht+0xe319, %rsi lea addresses_UC_ht+0x1151, %rdi nop nop cmp $33746, %r8 mov $71, %rcx rep movsb nop and %r8, %r8 lea addresses_A_ht+0x2775, %rsi lea addresses_A_ht+0x11b59, %rdi nop nop nop nop cmp $28242, %r9 mov $94, %rcx rep movsb and %r10, %r10 lea addresses_WT_ht+0x19219, %rdx nop nop sub $21544, %r8 movups (%rdx), %xmm1 vpextrq $1, %xmm1, %rsi nop nop inc %r10 lea addresses_A_ht+0x15248, %rsi lea addresses_UC_ht+0x1458e, %rdi nop nop nop nop and $10087, %r9 mov $18, %rcx rep movsb nop nop nop cmp %r12, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %rax push %rbp push %rcx push %rdi push %rsi // REPMOV lea addresses_WT+0x1fa9d, %rsi lea addresses_UC+0xe359, %rdi nop nop cmp $13077, %r14 mov $104, %rcx rep movsl nop nop nop inc %rsi // Store lea addresses_WT+0x1850d, %rsi nop nop sub %r14, %r14 movl $0x51525354, (%rsi) sub %r14, %r14 // Load lea addresses_WT+0x41f9, %r11 nop nop nop nop nop inc %rdi mov (%r11), %r14d nop nop nop nop inc %rcx // Load lea addresses_WT+0x12b59, %r14 nop sub $9962, %rsi movups (%r14), %xmm4 vpextrq $1, %xmm4, %rcx nop nop nop nop and %rcx, %rcx // Faulty Load lea addresses_UC+0xe359, %rcx nop nop nop nop and $8685, %rax mov (%rcx), %esi lea oracles, %rdi and $0xff, %rsi shlq $12, %rsi mov (%rdi,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC', 'NT': True, 'AVXalign': True, 'size': 32, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT'}, 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_UC'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': True, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 11}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
Task/Special-characters/Ada/special-characters-2.ada
LaudateCorpus1/RosettaCodeData
1
6952
<gh_stars>1-10 with Ada.Wide_Wide_Text_IO; use Ada.Wide_Wide_Text_IO; procedure Test is begin Put ("Unicode """ & ''' & """" & Wide_Wide_Character'Val (10)); end Test;
cohomology/Torus.agda
danbornside/HoTT-Agda
0
17304
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Theory {- Cohomology groups of the n-torus (S¹)ⁿ. - We have Ĉᵏ(Tⁿ) == C⁰(S⁰)^(n choose' k) where _choose'_ defined as below. - This argument could give Cᵏ((Sᵐ)ⁿ) with a little more work. -} module cohomology.Torus {i} (OT : OrdinaryTheory i) where open OrdinaryTheory OT open import cohomology.Sn OT open import cohomology.SphereProduct cohomology-theory open import cohomology.Unit cohomology-theory {- Almost n choose k, but with n choose' O = 0 for any n. -} _choose'_ : ℕ → ℤ → ℕ n choose' (neg _) = 0 n choose' O = 0 n choose' pos O = n O choose' (pos (S k)) = 0 S n choose' pos (S k) = (n choose' (pos k)) + (n choose' (pos (S k))) _-⊙Torus : ℕ → Ptd i O -⊙Torus = ⊙Lift ⊙Unit (S n) -⊙Torus = (⊙Sphere {i} 1) ⊙× (n -⊙Torus) C-nTorus : (k : ℤ) (n : ℕ) → C k (n -⊙Torus) == (C O (⊙Sphere 0)) ^ᴳ (n choose' k) C-nTorus (neg k) O = C-Unit-is-trivial (neg k) C-nTorus (neg k) (S n) = C-Sphere× (neg k) 1 (n -⊙Torus) ∙ ap (λ K → K ×ᴳ (C (neg k) (⊙Susp^ 1 (n -⊙Torus)) ×ᴳ C (neg k) (n -⊙Torus))) (C-Sphere-≠ (neg k) 1 (ℤ-neg≠pos _ _)) ∙ ×ᴳ-unit-l {G = C (neg k) (⊙Susp (n -⊙Torus)) ×ᴳ C (neg k) (n -⊙Torus)} ∙ ap (λ K → C (neg k) (⊙Susp (n -⊙Torus)) ×ᴳ K) (C-nTorus (neg k) n) ∙ ×ᴳ-unit-r {G = C (neg k) (⊙Susp (n -⊙Torus))} ∙ C-Susp (neg (S k)) (n -⊙Torus) ∙ C-nTorus (neg (S k)) n C-nTorus O O = C-Unit-is-trivial O C-nTorus O (S n) = C-Sphere× O 1 (n -⊙Torus) ∙ ap (λ K → K ×ᴳ (C O (⊙Susp (n -⊙Torus)) ×ᴳ C O (n -⊙Torus))) (C-Sphere-≠ O 1 (ℤ-O≠pos _)) ∙ ×ᴳ-unit-l {G = C O (⊙Susp (n -⊙Torus)) ×ᴳ C O (n -⊙Torus)} ∙ ap (λ K → C O (⊙Susp (n -⊙Torus)) ×ᴳ K) (C-nTorus O n) ∙ ×ᴳ-unit-r {G = C O (⊙Susp (n -⊙Torus))} ∙ C-Susp (neg O) (n -⊙Torus) ∙ C-nTorus (neg O) n C-nTorus (pos O) O = C-Unit-is-trivial (pos O) C-nTorus (pos O) (S n) = C-Sphere× (pos O) 1 (n -⊙Torus) ∙ ap (λ K → K ×ᴳ (C (pos O) (⊙Susp (n -⊙Torus)) ×ᴳ C (pos O) (n -⊙Torus))) (C-Sphere-diag 1) ∙ ap (λ K → C O (⊙Sphere O) ×ᴳ K) (ap2 _×ᴳ_ (C-Susp O (n -⊙Torus) ∙ C-nTorus O n) (C-nTorus (pos O) n) ∙ ×ᴳ-unit-l {G = C O (⊙Sphere 0) ^ᴳ (n choose' pos O)}) C-nTorus (pos (S k)) O = C-Unit-is-trivial (pos (S k)) C-nTorus (pos (S k)) (S n) = C-Sphere× (pos (S k)) 1 (n -⊙Torus) ∙ ap (λ K → K ×ᴳ (C (pos (S k)) (⊙Susp (n -⊙Torus)) ×ᴳ C (pos (S k)) (n -⊙Torus))) (C-Sphere-≠ (pos (S k)) 1 (ℕ-S≠O k ∘ pos-injective (S k) 0)) ∙ ×ᴳ-unit-l {G = (C (pos (S k)) (⊙Susp (n -⊙Torus)) ×ᴳ (C (pos (S k)) (n -⊙Torus)))} ∙ ap2 _×ᴳ_ (C-Susp (pos k) (n -⊙Torus) ∙ C-nTorus (pos k) n) (C-nTorus (pos (S k)) n) ∙ ^ᴳ-sum (C O (⊙Sphere 0)) (n choose' pos k) (n choose' pos (S k))
src/asm/boot.asm
jemtucker/opsys
1
20918
<reponame>jemtucker/opsys global start section .text ; Currently the CPU is in protected mode so only 32 bits available bits 32 start: ; Move Multiboot info pointer to edi to be passed into kernel_main mov esp, stack_top mov edi, ebx ; Point the first entry of the level 4 page table to the first entry in the ; p3 table mov eax, p3_table or eax, 0b11 mov dword [p4_table + 0], eax ; Point the first entry of the level 3 page table to the first entry in the ; p2 table mov eax, p2_table or eax, 0b11 mov dword [p3_table + 0], eax ; point each page table level two entry to a page mov ecx, 0 ; counter variable .map_p2_table: mov eax, 0x200000 ; 2MiB mul ecx or eax, 0b10000011 mov [p2_table + ecx * 8], eax inc ecx cmp ecx, 512 jne .map_p2_table ; Enable the paging ; move page table address to cr3 mov eax, p4_table mov cr3, eax ; enable PAE mov eax, cr4 or eax, 1 << 5 mov cr4, eax ; set the long mode bit mov ecx, 0xC0000080 rdmsr or eax, 1 << 8 wrmsr ; enable paging mov eax, cr0 or eax, 1 << 31 or eax, 1 << 16 mov cr0, eax ; Point the last entry in the P4 table back to itself ; AKA recursive table mapping. mov eax, p4_table or eax, 0b11 ; present + writable mov [p4_table + 511 * 8], eax ; load Global Descriptor Table lgdt [gdt64.pointer] ; update selectors mov ax, gdt64.data mov ss, ax mov ds, ax mov es, ax ; jump to long mode! extern long_mode_start jmp gdt64.code:long_mode_start section .bss align 4096 ; Reserve the bytes for each table p4_table: resb 4096 p3_table: resb 4096 p2_table: resb 4096 stack_bottom: resb 4096 * 2 ; Stack size stack_top: ; Set up Global Descriptor Table section .rodata gdt64: dq 0 .code: equ $ - gdt64 dq (1<<44) | (1<<47) | (1<<41) | (1<<43) | (1<<53) .data: equ $ - gdt64 dq (1<<44) | (1<<47) | (1<<41) .pointer: dw .pointer - gdt64 - 1 dq gdt64
src/yaml/text-builder.adb
My-Colaborations/dynamo
15
3292
-- part of ParserTools, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "copying.txt" package body Text.Builder is procedure Init (Object : in out Reference; Pool : Text.Pool.Reference; Initial_Size : Positive := 255) is begin null; end Init; function Create (Pool : Text.Pool.Reference; Initial_Size : Positive := 255) return Reference is begin return Ret : Reference do Init (Ret, Pool, Initial_Size); end return; end Create; function Initialized (Object : Reference) return Boolean is (True); procedure Append (Object : in out Reference; Value : String) is begin Ada.Strings.Unbounded.Append (Object.Buffer, Value); end Append; procedure Append (Object : in out Reference; Value : Character) is begin Ada.Strings.Unbounded.Append (Object.Buffer, Value); end Append; procedure Append (Object : in out Reference; Value : Text.Reference) is begin Ada.Strings.Unbounded.Append (Object.Buffer, Value); end Append; function Lock (Object : in out Reference) return Text.Reference is begin return Object.Buffer; end Lock; function Length (Object : Reference) return Natural is (Ada.Strings.Unbounded.Length (Object.Buffer)); end Text.Builder;
oeis/098/A098385.asm
neoneye/loda-programs
11
7155
; A098385: Ordered factorizations over hook-type prime signatures with exactly three distinct primes (third column of A098348). ; Submitted by <NAME> ; 13,44,132,368,976,2496,6208,15104,36096,84992,197632,454656,1036288,2342912,5259264,11730944,26017792,57409536,126091264,275775488,600834048,1304428544,2822766592,6090129408,13103005696,28118614016,60196651008,128580583424,274072600576,583041810432,1238024323072,2624225017856,5553392713728,11733850652672,24756191494144,52158082842624,109745004347392,230622563926016,484059994128384,1014849232437248,2125355976491008,4446425022726144,9293072277962752,19404181206990848,40479620088201216 add $0,4 mov $1,2 pow $1,$0 pow $0,2 sub $0,4 mul $0,$1 add $1,$0 mov $0,$1 div $0,16
oeis/095/A095166.asm
neoneye/loda-programs
11
169946
; A095166: Group the natural numbers >= 1 so that the n-th group contains n(n+1)/2 numbers and obtain the group sum. ; Submitted by <NAME> ; 1,9,45,155,420,966,1974,3690,6435,10615,16731,25389,37310,53340,74460,101796,136629,180405,234745,301455,382536,480194,596850,735150,897975,1088451,1309959,1566145,1860930,2198520,2583416,3020424,3514665 add $0,2 mov $1,$0 bin $0,2 bin $1,3 mul $1,2 add $1,$0 add $1,1 mul $0,$1 div $0,2
editkanji.asm
hwreverse/PC-G850V
7
179779
<reponame>hwreverse/PC-G850V 10 ORG 400H 20 ; leaving space for RAMDISK.ASM 30 ; used as a debug tool 40 JP MAIN 50WSTSR EQU 0BFB2H 60CLOSSR EQU 0BCEBH 70OPENSR EQU 0BCE8H 80INITSR EQU 0871AH 90REGOUT EQU 0BD03H 100PUTSTR EQU 0BFF1H 110INKEY EQU 0BE53H 120PUTCHR EQU 0BE62H 130WAITK EQU 0BFCDH 140RPTCHR EQU 0BFEEH 150GPF EQU 0BFD0H 160LDPSTR EQU 0BD00H 170MAIN: CALL CLS 180 LD HL,FIRST 190 LD A,15 200 LD (KNUM),A ; CHAR # 210 LD (COLUMN),A ; COLUMN # 220 CALL INITSR 230 CALL OPENSR 240 LD HL,GREET 250 CALL WSTSR 260MAIN00: LD A,(KNUM) 270 CP 0 280 JP Z,MAIN01 290 LD B,A 300 LD DE,12 310MAIN02: ADD HL,DE 320 DJNZ MAIN02 330MAIN01: XOR A 340 LD (ROW),A 350 LD BC,12 360 LD DE,DBUF 370 LDIR 380MAIN06: LD HL,DBUF 390 LD DE,BUFFER 400 XOR A 410 LD (COLUMN),A 420MAIN05: LD A,(HL) ; CHAR DATA 430 AND 3 440 PUSH HL ; SAVE BACK DATA PTR 450 LD HL,PATERN 460 CP 0 470 JP Z,MAIN03 480 LD B,A 490MAIN04: INC HL 500 DJNZ MAIN04 ; INCREMENT PATERN PTR 510MAIN03: LD A,(HL) ; GET PATERN 520 POP HL ; GET BACK DATA PTR 530 LD (DE),A 540 INC DE 550 LD (DE),A 560 INC DE 570 LD (DE),A 580 INC DE 590 LD (DE),A 600 INC DE ; 4 COLUMNS 610 LD A,(HL) ; CHAR DATA 620 RRCA 630 RRCA ; 10765432 640 LD (HL),A 650 INC HL 660 LD A,(COLUMN) ; COLUMN COUNT 670 INC A 680 LD (COLUMN),A 690 CP 12 700 JP NZ,MAIN05 710 LD HL,BUFFER 720 LD B,48 730 LD E,0 740 LD A,(ROW) 750 LD D,A 760 CALL GPF ; DISPLAY 770 LD A,(ROW) 780 INC A 790 LD (ROW),A 800 CP 4 ; NIBBLE COUNT 810 JP NZ,MAIN06 820 LD HL,SECOND 830MAIN10: LD A,(KNUM) 840 CP 0 850 JP Z,MAIN11 860 LD B,A 870 LD DE,6 880MAIN12: ADD HL,DE 890 DJNZ MAIN12 900MAIN11: EX DE,HL 910 CALL UNPACK 920 LD A,4 930MAIN16: LD (ROW),A 940 LD HL,DBUF 950 LD DE,BUFFER 960 XOR A 970 LD (COLUMN),A 980MAIN15: LD A,(HL) ; CHAR DATA 990 AND 3 1000 PUSH HL ; SAVE BACK DATA PTR 1010 LD HL,PATERN 1020 CP 0 1030 JP Z,MAIN13 1040 LD B,A 1050MAIN14: INC HL 1060 DJNZ MAIN14 ; INCREMENT PATERN PTR 1070MAIN13: LD A,(HL) ; GET PATERN 1080 POP HL ; GET BACK DATA PTR 1090 LD (DE),A 1100 INC DE 1110 LD (DE),A 1120 INC DE 1130 LD (DE),A 1140 INC DE 1150 LD (DE),A 1160 INC DE ; 4 COLUMNS 1170 LD A,(HL) ; CHAR DATA 1180 RRCA 1190 RRCA ; 10765432 1200 LD (HL),A 1210 INC HL 1220 LD A,(COLUMN) ; COLUMN COUNT 1230 INC A 1240 LD (COLUMN),A 1250 CP 12 1260 JP NZ,MAIN15 1270 LD HL,BUFFER 1280 LD B,48 1290 LD E,0 1300 LD A,(ROW) 1310 LD D,A 1320 CALL GPF ; DISPLAY 1330 LD A,(ROW) 1340 INC A 1350 CP 6 1360 JP NZ,MAIN16 ; NIBBLE COUNT 1365 CALL WAITK 1370 LD HL,BUFFER 1380 LD B,48 1390 LD DE,0 1400 XOR A 1410 LD (POSX),A 1420 LD (POSX+1),A 1430 LD (POSY),A 1440 CALL LDPSTR 1450EDIT00: LD HL,BUFFER 1460 LD BC,(POSX) 1470 ADD HL,BC 1480 LD A,(POSY) 1490 AND 1 1500 CP 1 ; ODD LINE 1510 JP Z,EDIT01 1520 ; EVEN LINE: PRESERVE HIGH NIBBLE 1530 LD A,(HL) 1540 LD (TMP),A 1550 AND 0F0H 1560 LD B,A 1570 LD A,(HL) 1580 AND 0FH 1590 XOR 0FH 1600 OR B 1610 JP EDIT02 1620EDIT01: ; ODD LINE: PRESERVE LOW NIBBLE 1630 LD A,(HL) 1640 AND 0FH 1650 LD B,A 1660 LD A,(HL) 1670 AND 0F0H 1680 XOR 0F0H 1690 OR B 1700EDIT02: LD (HL),A 1710 INC HL 1720 LD (HL),A 1730 INC HL 1740 LD (HL),A 1750 INC HL 1760 LD (HL),A 1770 LD HL,BUFFER 1780 LD E,0 1790 LD A,(POSY) 1800 RRCA 1810 AND 0FH 1820 LD D,A 1830 LD B,48 1840 CALL GPF 1850 CALL VBWEHT 2080EDIT05: LD HL,BUFFER 2090 LD BC,(POSX) 2100 ADD HL,BC 2110 LD A,(TMP) 2120 LD (HL),A 2130 INC HL 2140 LD (HL),A 2150 INC HL 2160 LD (HL),A 2170 INC HL 2180 LD (HL),A 2190 LD HL,BUFFER 2200 LD E,0 2210 LD A,(POSY) 2220 RRCA 2230 AND 0FH 2240 LD D,A 2250 LD B,48 2260 CALL GPF 2270 CALL VBWEHT 2290 CALL INKEY 2300 CP 0 2310 JP Z,EDIT00 2320 CP 50H 2330 RET Z 2340 CP 51H 2350 RET Z 2360 CP 1 2370 RET Z 2380 CP 3AH 2390 RET Z 2400 CP 1FH ; DOWN 2410 JP Z,GODOWN 2420 CP 20H ; UP 2430 JP Z,GOUP 2440 CP 21H ; LEFT 2450 JP Z,GOLEFT 2460 CP 20H ; RIGHT 2470 JP Z,GORITE 2480 CP 1EH ; SPACE 2490 JP Z,SPACE 2500EDIT08: LD HL,AFTER1 2510 LD A,(POSY) 2520 CALL BYTE 2530 LD HL,AFTER0 2540 CALL WSTSR 2550 JP EDIT00 2560GODOWN: LD HL,BFR01 2570 LD A,(POSY) 2580 CALL BYTE 2590 LD HL,BFR00 2600 CALL WSTSR 2610 LD A,(POSY) 2620 INC A 2630 LD (POSY),A 2640 CP 12 2650 JP M,EDIT08 2660 XOR A 2670 LD (POSY),A 2680 JP EDIT08 2690GORITE: LD A,(POSX) 2700 INC A 2710 LD (POSX),A 2720 CP 12 2730 JP M,EDIT00 2740 XOR A 2750 LD (POSX),A 2760 JP EDIT00 2770GOUP: LD HL,BFR01 2780 LD A,(POSY) 2790 CALL BYTE 2800 LD HL,BFR00 2810 CALL WSTSR 2820 LD A,(POSY) 2830 DEC A 2840 LD (POSY),A 2850 CP 0FFH 2860 JP NZ,EDIT08 2870 LD A,11 2880 LD (POSY),A 2890 JP EDIT08 2900GOLEFT: LD A,(POSX) 2910 DEC A 2920 LD (POSX),A 2930 CP 0FFH 2940 JP NZ,EDIT00 2950 LD A,11 2960 LD (POSX),A 2970 JP EDIT00 2980SPACE: LD A,(POSY) 2990 AND 1 3000 CP 1 ; ODD LINE 3010 JP Z,EDIT03 3020 ; EVEN LINE: PRESERVE HIGH NIBBLE 3030 LD A,(TMP) 3040 AND 0F0H 3050 LD B,A 3060 LD A,(TMP) 3070 AND 0FH 3080 XOR 0FH 3090 OR B 3100 JP EDIT04 3110EDIT03: ; ODD LINE: PRESERVE LOW NIBBLE 3120 LD A,(TMP) 3130 AND 0FH 3140 LD B,A 3150 LD A,(TMP) 3160 AND 0F0H 3170 XOR 0F0H 3180 OR B 3190EDIT04: LD (TMP),A 3200 JP EDIT00 3210VBWEHT: LD B,250 3220BWEHT: PUSH BC 3230 CALL WEHT ; ~1 millisec 3240 POP BC 3250 DJNZ BWEHT 3260 RET 3270WEHT: LD B,241 3280WEHT0: NOP 3290 NOP 3300 NOP 3310 NOP 3320 NOP 3330 DJNZ WEHT0 3340 RET 3350CLS: LD B,144 3360 LD DE,0 3370CLS0: LD A,32 3380 CALL RPTCHR 3390 RET 3400CLLN: LD B,24 3410 LD E,0 3420 JP CLS0 3430UNPACK: ; HL = BUFFER 3440 LD HL,DBUF 3450 LD B,6 ; specific to this code 3460UNPAK0: LD A,(DE) ; DE = DATA 3470 AND 0F0H 3480 RLCA 3490 RLCA 3500 RLCA 3510 RLCA 3520 LD (HL),A 3530 INC HL 3540 LD A,(DE) 3550 AND 0FH 3560 LD (HL),A 3570 INC HL 3580 INC DE 3590 DJNZ UNPAK0 3600 RET 3610BYTE: PUSH AF 3620 AND 0F0H 3630 RRCA 3640 RRCA 3650 RRCA 3660 RRCA 3670 CALL NIBBLE 3680 INC HL 3690 POP AF 3700 AND 15 3710 CALL NIBBLE 3720 INC HL 3730 RET 3740NIBBLE: SUB 10 3750 JP M,ZERO9 3760 ADD A,7 3770ZERO9: ADD A,58 3780 LD (HL),A 3790 RET 3800FIRST: 3810 DB 020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,00H ; 一 3820 DB 02H,02H,02H,02H,02H,0FEH,0FEH,02H,02H,02H,02H,00H ; 丁 3830 DB 020H,020H,020H,0FFH,0FEH,010H,010H,010H,010H,010H,018H,00H ; 七 3840 DB 0CH,0CH,07CH,0CCH,0CH,08CH,0FFH,0EH,0CH,0CH,0CH,00H ; 丈 3850 DB 00H,02H,062H,062H,062H,062H,062H,062H,062H,02H,00H,00H ; 三 3860 DB 00H,00H,00H,00H,0FEH,0FFH,010H,010H,010H,010H,00H,00H ; 上 3870 DB 02H,02H,02H,02H,02H,0FEH,032H,022H,062H,0C2H,02H,00H ; 下 3880 DB 082H,0C2H,062H,032H,01AH,0FEH,016H,032H,062H,042H,082H,00H ; 不 3890 DB 00H,00H,0FEH,092H,092H,092H,092H,092H,0FEH,00H,00H,00H ; 且 3900 DB 08H,018H,0FEH,08H,08H,0FFH,088H,088H,0FFH,018H,08H,00H ; 世 3910 DB 00H,00H,0FEH,022H,022H,022H,022H,0E2H,021H,020H,020H,00H ; 丘 3920 DB 0F2H,012H,012H,092H,0D2H,07EH,0D2H,092H,012H,012H,0F2H,00H ; 丙 3930 DB 0FCH,0CCH,084H,084H,084H,0FFH,084H,084H,084H,0CCH,0FCH,00H ; 中 3940 DB 08H,028H,072H,0E8H,0BFH,08H,08H,08H,0F8H,00H,00H,00H ; 丸 3950 DB 040H,0E0H,07EH,042H,04EH,04AH,052H,042H,0FEH,0FEH,040H,00H ; 丹 3960 DB 00H,072H,072H,072H,0C9H,0FEH,0CEH,072H,072H,072H,00H,00H ; 主 3970 DB 060H,030H,0CH,07H,084H,0C4H,0FCH,08CH,00H,00H,00H,00H ; 久 3980 DB 02H,012H,012H,012H,012H,01EH,092H,0D2H,073H,031H,00H,00H ; 乏 3990 DB 020H,0AAH,0FAH,0AAH,0AAH,0FEH,0AAH,0ABH,0F9H,0A9H,0A8H,00H ; 乗 4000 DB 02H,082H,0C2H,062H,032H,01AH,0EH,06H,06H,00H,00H,00H ; 乙 4010 DB 08H,08H,08H,0FCH,01FH,08H,08H,0F8H,0F0H,00H,00H,00H ; 九 4020 DB 01EH,092H,0DEH,0F1H,0B9H,085H,0FEH,0FFH,00H,00H,00H,00H ; 乳 4030 DB 0FAH,0AAH,0AFH,0AAH,0FAH,018H,02EH,0A7H,0E4H,064H,04H,00H ; 乾 4040 DB 092H,092H,0FEH,0FFH,091H,091H,00H,0FFH,00H,00H,00H,00H ; 乱 4050 DB 02H,02H,02H,02H,02H,0F2H,012H,0AH,0EH,06H,00H,00H ; 了 4060 DB 082H,0DAH,0DAH,0D2H,0D6H,0FFH,0D2H,0D2H,0DAH,0DAH,082H,00H ; 事 4070 DB 00H,04H,04H,04H,04H,04H,04H,04H,04H,04H,00H,00H ; 二 4080 DB 02H,02H,0F2H,09EH,092H,092H,092H,092H,0F2H,02H,02H,00H ; 互 4090 DB 00H,022H,022H,0E2H,07EH,026H,022H,022H,0E2H,02H,00H,00H ; 五 4100 DB 088H,088H,0CCH,0FFH,088H,088H,088H,0FFH,0CCH,088H,088H,00H ; 井 4110 DB 02H,0FAH,09AH,0FEH,09AH,09AH,0FEH,09AH,09AH,0FAH,02H,00H ; 亜 4120 DB 08H,0F8H,08H,08H,0CH,0FH,0CH,08H,08H,08H,08H,00H ; 亡 4130 DB 064H,024H,014H,06CH,0C4H,07H,0C4H,06CH,01CH,034H,024H,00H ; 交 4140 DB 02H,05AH,07AH,06AH,06AH,06BH,0EAH,0EAH,0FAH,05AH,02H,00H ; 享 4150 DB 06H,076H,0F6H,096H,096H,097H,096H,096H,0D6H,076H,06H,00H ; 京 4160 DB 00H,00H,00H,0C0H,078H,01FH,070H,080H,00H,00H,00H,00H ; 人 4170 DB 00H,00H,0FEH,062H,022H,022H,022H,022H,022H,062H,0FEH,00H ; 日 4180 DB 00H,08H,088H,0C8H,068H,038H,0FFH,038H,068H,0C8H,088H,08H ; 本 4190 DB 00H,0D5H,0D5H,0D5H,055H,020H,0A9H,0BFH,0AFH,0A9H,0B9H,0A1H ; 語 4200 DB 00H,00H,00H,02H,082H,072H,03EH,070H,0C0H,00H,00H,00H ; 入 4210 DB 00H,08H,08H,08H,088H,0FFH,0CH,08H,08H,08H,0C8H,0F8H ; 力 4220SECOND: 4230 DB 00H,00H,00H,00H,00H,00H ; 一 4240 DB 00H,088H,08FH,030H,00H,00H ; 丁 4250 DB 00H,07H,07CH,0CCH,0C4H,070H ; 七 4260 DB 08CH,046H,033H,064H,0C8H,080H ; 丈 4270 DB 044H,044H,044H,044H,044H,040H ; 三 4280 DB 044H,044H,077H,044H,044H,040H ; 上 4290 DB 00H,00H,0FH,00H,00H,00H ; 下 4300 DB 00H,00H,0FH,00H,00H,00H ; 不 4310 DB 044H,074H,044H,044H,074H,040H ; 且 4320 DB 00H,0F4H,045H,044H,044H,040H ; 世 4330 DB 044H,074H,044H,047H,044H,040H ; 丘 4340 DB 0F3H,031H,00H,09H,09DH,070H ; 丙 4350 DB 00H,00H,0FH,00H,00H,00H ; 中 4360 DB 0C6H,031H,011H,00H,0F8H,0C6H ; 丸 4370 DB 0C3H,00H,00H,088H,0F7H,00H ; 丹 4380 DB 0CCH,0CCH,0CFH,0CCH,0CCH,0C0H ; 主 4390 DB 0C4H,063H,010H,01H,034H,0C0H ; 久 4400 DB 0C3H,036H,079H,088H,088H,080H ; 乏 4410 DB 0C4H,063H,01FH,013H,064H,0C0H ; 乗 4420 DB 075H,044H,044H,044H,044H,070H ; 乙 4430 DB 0C6H,031H,00H,07H,0F8H,0C6H ; 九 4440 DB 019H,0F1H,00H,03FH,088H,0E2H ; 乳 4450 DB 022H,0F2H,020H,0E9H,088H,0C2H ; 乾 4460 DB 0F4H,044H,04FH,0FH,088H,0E2H ; 乱 4470 DB 00H,088H,08FH,00H,00H,00H ; 了 4480 DB 02H,02AH,0AFH,022H,027H,00H ; 事 4490 DB 066H,066H,066H,066H,066H,060H ; 二 4500 DB 044H,054H,044H,047H,044H,040H ; 互 4510 DB 044H,047H,044H,044H,074H,040H ; 五 4520 DB 084H,030H,00H,0FH,00H,00H ; 井 4530 DB 045H,047H,054H,075H,045H,040H ; 亜 4540 DB 07H,044H,0CCH,0CCH,0CCH,040H ; 亡 4550 DB 08CH,046H,033H,036H,04CH,080H ; 交 4560 DB 033H,03BH,0BFH,033H,033H,030H ; 享 4570 DB 046H,018H,08FH,00H,016H,040H ; 京 4580 DB 0C6H,031H,00H,01H,036H,0C0H ; 人 4590 DB 00H,0F4H,044H,044H,044H,0F0H ; 日 4600 DB 03H,010H,033H,0F3H,030H,013H ; 本 4610 DB 0FH,044H,070H,0FCH,044H,0CFH ; 語 4620 DB 0CH,043H,010H,00H,013H,06CH ; 入 4630 DB 0CH,047H,010H,08H,088H,070H ; 力 4640TMP: DB 0 4650KCOUNT: DB 41 4660KNUM: DB 0 4670PATERN: DB 0, 0FH, 0F0H, 0FFH 4680COLUMN: DB 0 4690ROW: DB 0 4700DBUF: DEFS 12 4710BUFFER: DEFS 256 4720POSY: DB 0 4730POSX: DW 0 4740GREET: DB 13,10,'- Edit Kanji started -',13,10,0 4750BFR00: DB 'Before adjustment, posY = 0x' 4760BFR01: DB 0,0,13,10,0 4770AFTER0: DB 'After adjustment, posY = 0x' 4780AFTER1: DB 0,0,13,10,0 
alloy4fun_models/trashltl/models/5/WTbuEEQKuadPtCMG6.als
Kaixi26/org.alloytools.alloy
0
3585
<gh_stars>0 open main pred idWTbuEEQKuadPtCMG6_prop6 { all f:File | always f in Trash implies always f in Trash } pred __repair { idWTbuEEQKuadPtCMG6_prop6 } check __repair { idWTbuEEQKuadPtCMG6_prop6 <=> prop6o }
src/main/fragment/mos6502-common/vbsaa=vbsaa_minus_pbsc1_derefidx_vbuxx.asm
jbrandwood/kickc
2
94890
<reponame>jbrandwood/kickc<gh_stars>1-10 sec sbc {c1},x
projects/06/max/MaxL.asm
qckpckt/nand2tetris
0
241162
<gh_stars>0 @0 D=M @1 D=D-M @10 D;JGT @1 D=M @12 0;JMP @0 D=M @2 M=D @14 0;JMP
programs/oeis/069/A069132.asm
karttu/loda
1
90649
; A069132: Centered 19-gonal numbers. ; 1,20,58,115,191,286,400,533,685,856,1046,1255,1483,1730,1996,2281,2585,2908,3250,3611,3991,4390,4808,5245,5701,6176,6670,7183,7715,8266,8836,9425,10033,10660,11306,11971,12655,13358,14080,14821,15581,16360,17158,17975,18811,19666,20540,21433,22345,23276,24226,25195,26183,27190,28216,29261,30325,31408,32510,33631,34771,35930,37108,38305,39521,40756,42010,43283,44575,45886,47216,48565,49933,51320,52726,54151,55595,57058,58540,60041,61561,63100,64658,66235,67831,69446,71080,72733,74405,76096,77806,79535,81283,83050,84836,86641,88465,90308,92170,94051,95951,97870,99808,101765,103741,105736,107750,109783,111835,113906,115996,118105,120233,122380,124546,126731,128935,131158,133400,135661,137941,140240,142558,144895,147251,149626,152020,154433,156865,159316,161786,164275,166783,169310,171856,174421,177005,179608,182230,184871,187531,190210,192908,195625,198361,201116,203890,206683,209495,212326,215176,218045,220933,223840,226766,229711,232675,235658,238660,241681,244721,247780,250858,253955,257071,260206,263360,266533,269725,272936,276166,279415,282683,285970,289276,292601,295945,299308,302690,306091,309511,312950,316408,319885,323381,326896,330430,333983,337555,341146,344756,348385,352033,355700,359386,363091,366815,370558,374320,378101,381901,385720,389558,393415,397291,401186,405100,409033,412985,416956,420946,424955,428983,433030,437096,441181,445285,449408,453550,457711,461891,466090,470308,474545,478801,483076,487370,491683,496015,500366,504736,509125,513533,517960,522406,526871,531355,535858,540380,544921,549481,554060,558658,563275,567911,572566,577240,581933,586645,591376 sub $1,$0 bin $1,2 mul $1,19 add $1,1
orka_simd/src/x86/gnat/orka-simd-avx-singles-swizzle.ads
onox/orka
52
12404
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 onox <<EMAIL>> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Orka.SIMD.SSE.Singles; package Orka.SIMD.AVX.Singles.Swizzle is pragma Pure; use SIMD.SSE.Singles; function Shuffle (Left, Right : m256; Mask : Unsigned_32) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_shufps256"; -- Shuffle the 32-bit floats in Left and Right using the given Mask. -- The first, second, fifth, and sixth float are retrieved from Left. -- The third, fourth, seventh, and eight float are retrieved from Right. -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_a_b_c_d : constant Unsigned_32 := a or b * 4 or c * 16 or d * 64; -- -- a and b select the floats to use from Left, c and d from Right. function Unpack_High (Left, Right : m256) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_unpckhps256"; -- Unpack and interleave the 32-bit floats from the upper halves of -- the 128-bit lanes of Left and Right as follows: -- Left (3), Right (3), Left (4), Right (4) -- Left (7), Right (7), Left (8), Right (8) function Unpack_Low (Left, Right : m256) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_unpcklps256"; -- Unpack and interleave the 32-bit floats from the lower halves of -- the 128-bit lanes of Left and Right as follows: -- Left (1), Right (1), Left (2), Right (2) -- Left (5), Right (5), Left (6), Right (6) function Duplicate_H (Elements : m256) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_movshdup256"; -- Duplicate second, fourth, sixth and eight element as follows: -- Elements (2), Elements (2), Elements (4), Elements (4) -- Elements (6), Elements (6), Elements (8), Elements (8) function Duplicate_L (Elements : m256) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_movsldup256"; -- Duplicate first, third, fifth and seventh element as follows: -- Elements (1), Elements (1), Elements (3), Elements (3) -- Elements (5), Elements (5), Elements (7), Elements (7) function Blend (Left, Right : m256; Mask : Unsigned_32) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendps256"; -- Select elements from two sources (Left and Right) using a constant mask function Blend (Left, Right, Mask : m256) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendvps256"; -- Select elements from two sources (Left and Right) using a variable mask function Cast (Elements : m256) return m128 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_ps_ps256"; function Extract (Elements : m256; Mask : Unsigned_32) return m128 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vextractf128_ps256"; -- Extract 128-bit from either the lower half (Mask = 0) or upper -- half (Mask = 1) function Insert (Left : m256; Right : m128; Mask : Unsigned_32) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vinsertf128_ps256"; -- Insert Right into the lower half (Mask = 0) or upper half (Mask = 1) function Permute (Elements : m128; Mask : Unsigned_32) return m128 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vpermilps"; -- Shuffle elements using just Elements. Similar to Shuffle (Elements, Elements, Mask) function Permute (Elements : m256; Mask : Unsigned_32) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vpermilps256"; -- Shuffle elements using just Elements. Similar to Shuffle (Elements, Elements, Mask) function Permute_Lanes (Left, Right : m256; Mask : Unsigned_32) return m256 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vperm2f128_ps256"; -- Shuffle 128-bit lanes. -- -- Bits 1-2 of Mask are used to control which of the four 128-bit lanes -- to use for the lower half (128-bit) of the result. Bits 5-6 to select -- a lane for the upper half of the result: -- -- 0 => Left (1 .. 4) -- 1 => Left (5 .. 8) -- 2 => Right (1 .. 4) -- 3 => Right (5 .. 8) -- -- Bits 4 and 8 are used to zero the corresponding half (lower or upper). -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_zu_zl_u_l : constant Unsigned_32 := zu * 128 or zl * 8 or u * 16 or l; -- -- u and l are numbers between 0 and 3 (see above). zu and zl are either 0 or 1 -- to zero a lane. end Orka.SIMD.AVX.Singles.Swizzle;
3-mid/impact/source/3d/collision/shapes/impact-d3-material.adb
charlie5/lace
20
6115
package body impact.d3.Material is function to_Material (friction, restitution : math.Real) return Item is Self : Item; begin Self.m_friction := friction; Self.m_restitution := restitution; return Self; end to_Material; end impact.d3.Material;
src/test/ref/string-escapes-10.asm
jbrandwood/kickc
2
4045
<gh_stars>1-10 // Test octal escapes in chars // Commodore 64 PRG executable file .file [name="string-escapes-10.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) .const MSG1 = 'a' .const MSG2 = 'b' .const MSG3 = 'c' .const MSG4 = '\$ff' .label SCREEN = $400 .segment Code main: { // SCREEN[0] = MSG1 lda #MSG1 sta SCREEN // SCREEN[1] = MSG2 lda #MSG2 sta SCREEN+1 // SCREEN[2] = MSG3 lda #MSG3 sta SCREEN+2 // SCREEN[3] = MSG4 lda #MSG4 sta SCREEN+3 // } rts }
oeis/144/A144952.asm
neoneye/loda-programs
11
167399
; A144952: Total walk count of molecular graphs for linear alkanes with n carbon atoms. ; Submitted by <NAME>(w3) ; 0,1,5,16,44,111,268,627,1439,3250,7259,16050,35219,76730,166229,358180,768416,1641555,3494596,7414203,15685328,33091399,69647978,146250009,306490602,641044849,1338507476,2790140995,5807567462,12070739253,25056394988,51946330763,107573145767 sub $1,$0 lpb $0 mov $2,$0 sub $0,1 seq $2,182555 ; G.f.: (3-4*x-sqrt(1-4*x^2))/(2*(1-2*x)^2). add $1,$2 lpe mov $0,$1
programs/oeis/027/A027764.asm
karttu/loda
1
169131
; A027764: a(n) = (n+1)*binomial(n+1,4). ; 4,25,90,245,560,1134,2100,3630,5940,9295,14014,20475,29120,40460,55080,73644,96900,125685,160930,203665,255024,316250,388700,473850,573300,688779,822150,975415,1150720,1350360,1576784,1832600,2120580,2443665,2804970,3207789,3655600,4152070,4701060,5306630,5973044,6704775,7506510,8383155,9339840,10381924,11515000,12744900,14077700,15519725,17077554,18758025,20568240,22515570,24607660,26852434,29258100,31833155,34586390,37526895,40664064,44007600,47567520,51354160,55378180,59650569,64182650,68986085,74072880,79455390,85146324,91158750,97506100,104202175,111261150,118697579,126526400,134762940,143422920,152522460,162078084,172106725,182625730,193652865,205206320,217304714,229967100,243212970,257062260,271535355,286653094,302436775,318908160,336089480,354003440,372673224,392122500,412375425,433456650,455391325,478205104,501924150,526575140,552185270,578782260,606394359,635050350,664779555,695611840,727577620,760707864,795034100,830588420,867403485,905512530,944949369,985748400,1027944610,1071573580,1116671490,1163275124,1211421875,1261149750,1312497375,1365504000,1420209504,1476654400,1534879840,1594927620,1656840185,1720660634,1786432725,1854200880,1924010190,1995906420,2069936014,2146146100,2224584495,2305299710,2388340955,2473758144,2561601900,2651923560,2744775180,2840209540,2938280149,3039041250,3142547825,3248855600,3358021050,3470101404,3585154650,3703239540,3824415595,3948743110,4076283159,4207097600,4341249080,4478801040,4619817720,4764364164,4912506225,5064310570,5219844685,5379176880,5542376294,5709512900,5880657510,6055881780,6235258215,6418860174,6606761875,6799038400,6995765700,7197020600,7402880804,7613424900,7828732365,8048883570,8273959785,8504043184,8739216850,8979564780,9225171890,9476124020,9732507939,9994411350,10261922895,10535132160,10814129680,11099006944,11389856400,11686771460,11989846505,12299176890,12614858949,12936990000,13265668350,13600993300,13943065150,14291985204,14647855775,15010780190,15380862795,15758208960,16142925084,16535118600,16934897980,17342372740,17757653445,18180851714,18612080225,19051452720,19499084010,19955089980,20419587594,20892694900,21374531035,21865216230,22364871815,22873620224,23391585000,23918890800,24455663400,25002029700,25558117729,26124056650,26699976765,27286009520,27882287510,28488944484,29106115350,29733936180,30372544215,31022077870,31682676739,32354481600,33037634420,33732278360,34438557780,35156618244,35886606525,36628670610,37382959705,38149624240,38928815874,39720687500,40525393250,41343088500,42173929875 add $0,4 mov $1,$0 bin $0,4 mul $1,$0
Projectpassword.asm
wellingtonj1/Arq-de-Comps---1
0
97717
<gh_stars>0 ;PUC-ECEC-CMP1057-ARQ1- ;12/02/19 ;<NAME> <NAME> ; ; Trabalhocomparastr.asm segment .bss ;dados nao inicializados mens2 resb 100 mens5 resb 100 segment .data mens1 db"Digite uma senha de 6 caracteres intercalando maiuscula de minusculas: ",10 tam1 equ $-mens1 limpatela db 27,"[H",27,"[J" limptam equ $-limpatela mens3 db "Tenta advinhar a senha que foi digitada agora!",10 tam3 equ $-mens3 mensacerto db"Vocẽ acertou !!!",10 tamacerto equ $- mensacerto menserro db 27,"[H",27,"[J",10,"Muitas tentativas erradas, Para o bem da humanidade fechamos o programa! *-* ",10,10 tamerro equ $- menserro segment .text global _start _start: mov edx,limptam ;limpa a tela mov ecx,limpatela call printstr mov edx,tam1 ;quantidade de caracteres, no caso ele imprime o tamanho armazenado em tamm mov ecx,mens1 ;ponteiro da string call printstr mov edx,7 ; maximo armazenado mov ecx,mens2 ; buffer destino call readstr; Em eax retorna o nº de caracteres armazenados cmp eax,7 ;Validando a quantidade de caracteres jne _start ;Se for < que 6 volta pro inicio mov ecx,eax ;limite xor esi,esi call valida cmp esi,6 jne _start mov edi,3 mov edx,limptam ;limpa a tela para 2° usuario mov ecx,limpatela call printstr tentativasenha: dec edi mov edx,tam3 ;quantidade de caracteres, no caso ele imprime o tamanho armazenado em tamm mov ecx,mens3 ;ponteiro da string call printstr mov edx,100 ; maximo armazenado mov ecx,mens5 ; buffer destino call readstr;Em eax retorna o nº de caracteres armazenados xor esi,esi call comparaduas cmp esi,7 jne wile call acerto fim: mov eax,1 ; serviço EXIT int 80h ;encerra (mesmo kernel para executar.. esse é o padrão) ;Procedure area printstr: mov ebx,0 mov eax,4 int 80h ret ;Procedure area wile: cmp edi,0 je erro call tentativasenha ret ;Other Procedure readstr: mov ebx,1 mov eax,3 int 80h ret ;Other Procedure valida: mov al,[mens2+esi] ;car. origem cmp al,"A" ; A C E jb sair cmp al,"Z" jg sair inc esi mov al,[mens2+esi] cmp ax,"a" ; b d f jb sair cmp ax,"z" jg sair inc esi cmp esi,6 jne valida sair: ret ;Other Procedure comparaduas: mov al,[mens2+esi] mov ah,[mens5+esi] cmp al,ah jne final inc esi cmp esi,7 jne comparaduas final: ret ;Other Procedure acerto: mov edx,tamacerto mov ecx,mensacerto call printstr ret ;Other Procedure erro: mov edx,tamerro mov ecx,menserro call printstr call fim ret
src/pyensae/languages/SimpleWorkflow.g4
mohamedelkansouli/Ensae_py2
28
1679
<filename>src/pyensae/languages/SimpleWorkflow.g4 grammar SimpleWorkflow; parse : final_stmt* EOF ; final_stmt : if_stmt | for_stmt | affectation_stmt_comma | stmt_comma ; ///// // variable ///// affectation_stmt_comma : affectation_stmt ';' ; affectation_stmt : 'set' variable_name '=' expression ; ///// // for ///// for_stmt : 'for' '(' variable_name 'in' function_call ')' '{' final_stmt+ '}' ; ///// // if ///// if_stmt : 'if' '(' expression ')' '{' final_stmt+ '}' ('else' '{' final_stmt+ '}')? ; evaluation_function : Identifier ; ///////////// // expression ///////////// expression : expression_no_binary | (expression_no_binary binary_operator expression ) ; expression_no_binary : constant | variable_name | data_or_module_output | ('(' expression ')') | (unary_operator expression_no_binary ) | function_call ; function_call : evaluation_function '(' expression? (',' expression)* ')' ; variable_name : Identifier ; binary_operator : '+' | '-' | '*' | '/' | '%' | '&&' | '||' | '==' | '!=' | '<=' | '>=' | '>' | '<' ; unary_operator : '-' | '+' | '!' ; //////// // stmt //////// stmt_comma : stmt ';' ; stmt : connect_stmt | data_stmt | module_stmt ; connect_stmt : ('connect' data_or_module_output ('to' | '->') module_input ) | ('connect' '(' data_or_module_output ',' module_input ')' ) ; data_or_module_output : element_name ('.' inout_name)? ; module_input : element_name ('.' inout_name)? ; data_stmt : element_name '=' data_name ; module_stmt : element_name '=' module_call ; //////// // rules //////// module_call : module_name '(' list_param_affectation ')' ; element_name : Identifier ; list_param_affectation : param_affectation? (',' param_affectation)* ; param_affectation : param_name '=' expression ; param_name : Identifier ; inout_name : Identifier ; module_name : 'flowmodule' '.' ( Identifier | STRING ) // for autocompletion ; data_name : 'flowdata' '.' (Identifier | STRING ) // for autocompletion ; constant : integer_number | real_number | string_literal ; string_literal : STRING ; integer_number : Sign? Digits ; real_number : (Sign? Digits '.' Digits ('e' Sign? Digits)?) | (Sign? Digits 'e' Sign? Digits) ; ///////// // tokens ///////// Digits : DIGIT+ ; Identifier : LETTER LETTER_DIGIT* ; Sign : '+' | '-' ; STRING : STRING_DOUBLE_QUOTE | STRING_QUOTE ; STRING_DOUBLE_QUOTE : '"' (NO_DOUBLE_QUOTE | '\\"')* '"' ; STRING_QUOTE : '\'' (NO_QUOTE | '\\\'')* '\'' ; fragment NO_QUOTE : ~['] ; fragment NO_DOUBLE_QUOTE : ~["] ; fragment LETTER_DIGIT : LETTER | DIGIT ; fragment DIGIT : [0-9] ; fragment LETTER : [a-zA-Z\u0080-\u00FF_] ; LINE_COMMENT: '#' .*? '\r'? '\n' {skip();} ; WS : [ \t\r\n] -> skip ;
gcc-gcc-7_3_0-release/gcc/ada/par-ch5.adb
best08618/asylo
7
19447
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P A R . C H 5 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Style_Checks (All_Checks); -- Turn off subprogram body ordering check. Subprograms are in order by RM -- section rather than alphabetical. with Sinfo.CN; use Sinfo.CN; separate (Par) package body Ch5 is -- Local functions, used only in this chapter function P_Case_Statement return Node_Id; function P_Case_Statement_Alternative return Node_Id; function P_Exit_Statement return Node_Id; function P_Goto_Statement return Node_Id; function P_If_Statement return Node_Id; function P_Label return Node_Id; function P_Null_Statement return Node_Id; function P_Assignment_Statement (LHS : Node_Id) return Node_Id; -- Parse assignment statement. On entry, the caller has scanned the left -- hand side (passed in as Lhs), and the colon-equal (or some symbol -- taken to be an error equivalent such as equal). function P_Begin_Statement (Block_Name : Node_Id := Empty) return Node_Id; -- Parse begin-end statement. If Block_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the block. If Block_Name is -- Empty on entry (the default), then the block statement is unlabeled. function P_Declare_Statement (Block_Name : Node_Id := Empty) return Node_Id; -- Parse declare block. If Block_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the block. If Block_Name is -- Empty on entry (the default), then the block statement is unlabeled. function P_For_Statement (Loop_Name : Node_Id := Empty) return Node_Id; -- Parse for statement. If Loop_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the loop. If Loop_Name is -- Empty on entry (the default), then the for statement is unlabeled. function P_Iterator_Specification (Def_Id : Node_Id) return Node_Id; -- Parse an iterator specification. The defining identifier has already -- been scanned, as it is the common prefix between loop and iterator -- specification. function P_Loop_Statement (Loop_Name : Node_Id := Empty) return Node_Id; -- Parse loop statement. If Loop_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the loop. If Loop_Name is -- Empty on entry (the default), then the loop statement is unlabeled. function P_While_Statement (Loop_Name : Node_Id := Empty) return Node_Id; -- Parse while statement. If Loop_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the loop. If Loop_Name is -- Empty on entry (the default), then the while statement is unlabeled. function Set_Loop_Block_Name (L : Character) return Name_Id; -- Given a letter 'L' for a loop or 'B' for a block, returns a name -- of the form L_nn or B_nn where nn is a serial number obtained by -- incrementing the variable Loop_Block_Count. procedure Then_Scan; -- Scan past THEN token, testing for illegal junk after it --------------------------------- -- 5.1 Sequence of Statements -- --------------------------------- -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT} {LABEL} -- Note: the final label is an Ada 2012 addition. -- STATEMENT ::= -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT -- SIMPLE_STATEMENT ::= NULL_STATEMENT -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT -- | REQUEUE_STATEMENT | DELAY_STATEMENT -- | ABORT_STATEMENT | RAISE_STATEMENT -- | CODE_STATEMENT -- COMPOUND_STATEMENT ::= -- IF_STATEMENT | CASE_STATEMENT -- | LOOP_STATEMENT | BLOCK_STATEMENT -- | ACCEPT_STATEMENT | SELECT_STATEMENT -- This procedure scans a sequence of statements. The caller sets SS_Flags -- to indicate acceptable termination conditions for the sequence: -- SS_Flags.Eftm Terminate on ELSIF -- SS_Flags.Eltm Terminate on ELSE -- SS_Flags.Extm Terminate on EXCEPTION -- SS_Flags.Ortm Terminate on OR -- SS_Flags.Tatm Terminate on THEN ABORT (Token = ABORT on return) -- SS_Flags.Whtm Terminate on WHEN -- SS_Flags.Unco Unconditional terminate after scanning one statement -- In addition, the scan is always terminated by encountering END or the -- end of file (EOF) condition. If one of the six above terminators is -- encountered with the corresponding SS_Flags flag not set, then the -- action taken is as follows: -- If the keyword occurs to the left of the expected column of the end -- for the current sequence (as recorded in the current end context), -- then it is assumed to belong to an outer context, and is considered -- to terminate the sequence of statements. -- If the keyword occurs to the right of, or in the expected column of -- the end for the current sequence, then an error message is output, -- the keyword together with its associated context is skipped, and -- the statement scan continues until another terminator is found. -- Note that the first action means that control can return to the caller -- with Token set to a terminator other than one of those specified by the -- SS parameter. The caller should treat such a case as equivalent to END. -- In addition, the flag SS_Flags.Sreq is set to True to indicate that at -- least one real statement (other than a pragma) is required in the -- statement sequence. During the processing of the sequence, this -- flag is manipulated to indicate the current status of the requirement -- for a statement. For example, it is turned off by the occurrence of a -- statement, and back on by a label (which requires a following statement) -- Error recovery: cannot raise Error_Resync. If an error occurs during -- parsing a statement, then the scan pointer is advanced past the next -- semicolon and the parse continues. function P_Sequence_Of_Statements (SS_Flags : SS_Rec) return List_Id is Statement_Required : Boolean; -- This flag indicates if a subsequent statement (other than a pragma) -- is required. It is initialized from the Sreq flag, and modified as -- statements are scanned (a statement turns it off, and a label turns -- it back on again since a statement must follow a label). -- Note : this final requirement is lifted in Ada 2012. Statement_Seen : Boolean; -- In Ada 2012, a label can end a sequence of statements, but the -- sequence cannot contain only labels. This flag is set whenever a -- label is encountered, to enforce this rule at the end of a sequence. Declaration_Found : Boolean := False; -- This flag is set True if a declaration is encountered, so that the -- error message about declarations in the statement part is only -- given once for a given sequence of statements. Scan_State_Label : Saved_Scan_State; Scan_State : Saved_Scan_State; Statement_List : List_Id; Block_Label : Name_Id; Id_Node : Node_Id; Name_Node : Node_Id; procedure Junk_Declaration; -- Procedure called to handle error of declaration encountered in -- statement sequence. procedure Test_Statement_Required; -- Flag error if Statement_Required flag set ---------------------- -- Junk_Declaration -- ---------------------- procedure Junk_Declaration is begin if (not Declaration_Found) or All_Errors_Mode then Error_Msg_SC -- CODEFIX ("declarations must come before BEGIN"); Declaration_Found := True; end if; Skip_Declaration (Statement_List); end Junk_Declaration; ----------------------------- -- Test_Statement_Required -- ----------------------------- procedure Test_Statement_Required is function All_Pragmas return Boolean; -- Return True if statement list is all pragmas ----------------- -- All_Pragmas -- ----------------- function All_Pragmas return Boolean is S : Node_Id; begin S := First (Statement_List); while Present (S) loop if Nkind (S) /= N_Pragma then return False; else Next (S); end if; end loop; return True; end All_Pragmas; -- Start of processing for Test_Statement_Required begin if Statement_Required then -- Check no statement required after label in Ada 2012, and that -- it is OK to have nothing but pragmas in a statement sequence. if Ada_Version >= Ada_2012 and then not Is_Empty_List (Statement_List) and then ((Nkind (Last (Statement_List)) = N_Label and then Statement_Seen) or else All_Pragmas) then -- This Ada 2012 construct not allowed in a compiler unit Check_Compiler_Unit ("null statement list", Token_Ptr); declare Null_Stm : constant Node_Id := Make_Null_Statement (Token_Ptr); begin Set_Comes_From_Source (Null_Stm, False); Append_To (Statement_List, Null_Stm); end; -- If not Ada 2012, or not special case above, give error message else Error_Msg_BC -- CODEFIX ("statement expected"); end if; end if; end Test_Statement_Required; -- Start of processing for P_Sequence_Of_Statements begin Statement_List := New_List; Statement_Required := SS_Flags.Sreq; Statement_Seen := False; loop Ignore (Tok_Semicolon); begin if Style_Check then Style.Check_Indentation; end if; -- Deal with reserved identifier (in assignment or call) if Is_Reserved_Identifier then Save_Scan_State (Scan_State); -- at possible bad identifier Scan; -- and scan past it -- We have an reserved word which is spelled in identifier -- style, so the question is whether it really is intended -- to be an identifier. if -- If followed by a semicolon, then it is an identifier, -- with the exception of the cases tested for below. (Token = Tok_Semicolon and then Prev_Token /= Tok_Return and then Prev_Token /= Tok_Null and then Prev_Token /= Tok_Raise and then Prev_Token /= Tok_End and then Prev_Token /= Tok_Exit) -- If followed by colon, colon-equal, or dot, then we -- definitely have an identifier (could not be reserved) or else Token = Tok_Colon or else Token = Tok_Colon_Equal or else Token = Tok_Dot -- Left paren means we have an identifier except for those -- reserved words that can legitimately be followed by a -- left paren. or else (Token = Tok_Left_Paren and then Prev_Token /= Tok_Case and then Prev_Token /= Tok_Delay and then Prev_Token /= Tok_If and then Prev_Token /= Tok_Elsif and then Prev_Token /= Tok_Return and then Prev_Token /= Tok_When and then Prev_Token /= Tok_While and then Prev_Token /= Tok_Separate) then -- Here we have an apparent reserved identifier and the -- token past it is appropriate to this usage (and would -- be a definite error if this is not an identifier). What -- we do is to use P_Identifier to fix up the identifier, -- and then fall into the normal processing. Restore_Scan_State (Scan_State); -- back to the ID Scan_Reserved_Identifier (Force_Msg => False); -- Not a reserved identifier after all (or at least we can't -- be sure that it is), so reset the scan and continue. else Restore_Scan_State (Scan_State); -- back to the reserved word end if; end if; -- Now look to see what kind of statement we have case Token is -- Case of end or EOF when Tok_End | Tok_EOF => -- These tokens always terminate the statement sequence Test_Statement_Required; exit; -- Case of ELSIF when Tok_Elsif => -- Terminate if Eftm set or if the ELSIF is to the left -- of the expected column of the end for this sequence if SS_Flags.Eftm or else Start_Column < Scope.Table (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip past ELSIF Condition then else Error_Msg_SC ("ELSIF not allowed here"); Scan; -- past ELSIF Discard_Junk_Node (P_Expression_No_Right_Paren); Then_Scan; Statement_Required := False; end if; -- Case of ELSE when Tok_Else => -- Terminate if Eltm set or if the else is to the left -- of the expected column of the end for this sequence if SS_Flags.Eltm or else Start_Column < Scope.Table (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip past else else Error_Msg_SC ("ELSE not allowed here"); Scan; -- past ELSE Statement_Required := False; end if; -- Case of exception when Tok_Exception => Test_Statement_Required; -- If Extm not set and the exception is not to the left of -- the expected column of the end for this sequence, then we -- assume it belongs to the current sequence, even though it -- is not permitted. if not SS_Flags.Extm and then Start_Column >= Scope.Table (Scope.Last).Ecol then Error_Msg_SC ("exception handler not permitted here"); Scan; -- past EXCEPTION Discard_Junk_List (Parse_Exception_Handlers); end if; -- Always return, in the case where we scanned out handlers -- that we did not expect, Parse_Exception_Handlers returned -- with Token being either end or EOF, so we are OK. exit; -- Case of OR when Tok_Or => -- Terminate if Ortm set or if the or is to the left of the -- expected column of the end for this sequence. if SS_Flags.Ortm or else Start_Column < Scope.Table (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip past or else Error_Msg_SC ("OR not allowed here"); Scan; -- past or Statement_Required := False; end if; -- Case of THEN (deal also with THEN ABORT) when Tok_Then => Save_Scan_State (Scan_State); -- at THEN Scan; -- past THEN -- Terminate if THEN ABORT allowed (ATC case) exit when SS_Flags.Tatm and then Token = Tok_Abort; -- Otherwise we treat THEN as some kind of mess where we did -- not see the associated IF, but we pick up assuming it had -- been there. Restore_Scan_State (Scan_State); -- to THEN Append_To (Statement_List, P_If_Statement); Statement_Required := False; -- Case of WHEN (error because we are not in a case) when Tok_Others | Tok_When => -- Terminate if Whtm set or if the WHEN is to the left of -- the expected column of the end for this sequence. if SS_Flags.Whtm or else Start_Column < Scope.Table (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip when Choice {| Choice} => else Error_Msg_SC ("WHEN not allowed here"); Scan; -- past when Discard_Junk_List (P_Discrete_Choice_List); TF_Arrow; Statement_Required := False; end if; -- Cases of statements starting with an identifier when Tok_Identifier => Check_Bad_Layout; -- Save scan pointers and line number in case block label Id_Node := Token_Node; Block_Label := Token_Name; Save_Scan_State (Scan_State_Label); -- at possible label Scan; -- past Id -- Check for common case of assignment, since it occurs -- frequently, and we want to process it efficiently. if Token = Tok_Colon_Equal then Scan; -- past the colon-equal Append_To (Statement_List, P_Assignment_Statement (Id_Node)); Statement_Required := False; -- Check common case of procedure call, another case that -- we want to speed up as much as possible. elsif Token = Tok_Semicolon then Change_Name_To_Procedure_Call_Statement (Id_Node); Append_To (Statement_List, Id_Node); Scan; -- past semicolon Statement_Required := False; -- Here is the special test for a suspicious label, more -- accurately a suspicious name, which we think perhaps -- should have been a label. If next token is one of -- LOOP, FOR, WHILE, DECLARE, BEGIN, then make an entry -- in the suspicious label table. if Token = Tok_Loop or else Token = Tok_For or else Token = Tok_While or else Token = Tok_Declare or else Token = Tok_Begin then Suspicious_Labels.Append ((Proc_Call => Id_Node, Semicolon_Loc => Prev_Token_Ptr, Start_Token => Token_Ptr)); end if; -- Check for case of "go to" in place of "goto" elsif Token = Tok_Identifier and then Block_Label = Name_Go and then Token_Name = Name_To then Error_Msg_SP -- CODEFIX ("goto is one word"); Append_To (Statement_List, P_Goto_Statement); Statement_Required := False; -- Check common case of = used instead of :=, just so we -- give a better error message for this special misuse. elsif Token = Tok_Equal then T_Colon_Equal; -- give := expected message Append_To (Statement_List, P_Assignment_Statement (Id_Node)); Statement_Required := False; -- Check case of loop label or block label elsif Token = Tok_Colon or else (Token in Token_Class_Labeled_Stmt and then not Token_Is_At_Start_Of_Line) then T_Colon; -- past colon (if there, or msg for missing one) -- Test for more than one label loop exit when Token /= Tok_Identifier; Save_Scan_State (Scan_State); -- at second Id Scan; -- past Id if Token = Tok_Colon then Error_Msg_SP ("only one label allowed on block or loop"); Scan; -- past colon on extra label -- Use the second label as the "real" label Scan_State_Label := Scan_State; -- We will set Error_name as the Block_Label since -- we really don't know which of the labels might -- be used at the end of the loop or block. Block_Label := Error_Name; -- If Id with no colon, then backup to point to the -- Id and we will issue the message below when we try -- to scan out the statement as some other form. else Restore_Scan_State (Scan_State); -- to second Id exit; end if; end loop; -- Loop_Statement (labeled Loop_Statement) if Token = Tok_Loop then Append_To (Statement_List, P_Loop_Statement (Id_Node)); -- While statement (labeled loop statement with WHILE) elsif Token = Tok_While then Append_To (Statement_List, P_While_Statement (Id_Node)); -- Declare statement (labeled block statement with -- DECLARE part) elsif Token = Tok_Declare then Append_To (Statement_List, P_Declare_Statement (Id_Node)); -- Begin statement (labeled block statement with no -- DECLARE part) elsif Token = Tok_Begin then Append_To (Statement_List, P_Begin_Statement (Id_Node)); -- For statement (labeled loop statement with FOR) elsif Token = Tok_For then Append_To (Statement_List, P_For_Statement (Id_Node)); -- Improper statement follows label. If we have an -- expression token, then assume the colon was part -- of a misplaced declaration. elsif Token not in Token_Class_Eterm then Restore_Scan_State (Scan_State_Label); Junk_Declaration; -- Otherwise complain we have inappropriate statement else Error_Msg_AP ("loop or block statement must follow label"); end if; Statement_Required := False; -- Here we have an identifier followed by something -- other than a colon, semicolon or assignment symbol. -- The only valid possibility is a name extension symbol elsif Token in Token_Class_Namext then Restore_Scan_State (Scan_State_Label); -- to Id Name_Node := P_Name; -- Skip junk right parens in this context Ignore (Tok_Right_Paren); -- Check context following call if Token = Tok_Colon_Equal then Scan; -- past colon equal Append_To (Statement_List, P_Assignment_Statement (Name_Node)); Statement_Required := False; -- Check common case of = used instead of := elsif Token = Tok_Equal then T_Colon_Equal; -- give := expected message Append_To (Statement_List, P_Assignment_Statement (Name_Node)); Statement_Required := False; -- Check apostrophe cases elsif Token = Tok_Apostrophe then Append_To (Statement_List, P_Code_Statement (Name_Node)); Statement_Required := False; -- The only other valid item after a name is ; which -- means that the item we just scanned was a call. elsif Token = Tok_Semicolon then Change_Name_To_Procedure_Call_Statement (Name_Node); Append_To (Statement_List, Name_Node); Scan; -- past semicolon Statement_Required := False; -- A slash following an identifier or a selected -- component in this situation is most likely a period -- (see location of keys on keyboard). elsif Token = Tok_Slash and then (Nkind (Name_Node) = N_Identifier or else Nkind (Name_Node) = N_Selected_Component) then Error_Msg_SC -- CODEFIX ("""/"" should be ""."""); Statement_Required := False; raise Error_Resync; -- Else we have a missing semicolon else TF_Semicolon; -- Normal processing as though semicolon were present Change_Name_To_Procedure_Call_Statement (Name_Node); Append_To (Statement_List, Name_Node); Statement_Required := False; end if; -- If junk after identifier, check if identifier is an -- instance of an incorrectly spelled keyword. If so, we -- do nothing. The Bad_Spelling_Of will have reset Token -- to the appropriate keyword, so the next time round the -- loop we will process the modified token. Note that we -- check for ELSIF before ELSE here. That's not accidental. -- We don't want to identify a misspelling of ELSE as -- ELSIF, and in particular we do not want to treat ELSEIF -- as ELSE IF. else Restore_Scan_State (Scan_State_Label); -- to identifier if Bad_Spelling_Of (Tok_Abort) or else Bad_Spelling_Of (Tok_Accept) or else Bad_Spelling_Of (Tok_Case) or else Bad_Spelling_Of (Tok_Declare) or else Bad_Spelling_Of (Tok_Delay) or else Bad_Spelling_Of (Tok_Elsif) or else Bad_Spelling_Of (Tok_Else) or else Bad_Spelling_Of (Tok_End) or else Bad_Spelling_Of (Tok_Exception) or else Bad_Spelling_Of (Tok_Exit) or else Bad_Spelling_Of (Tok_For) or else Bad_Spelling_Of (Tok_Goto) or else Bad_Spelling_Of (Tok_If) or else Bad_Spelling_Of (Tok_Loop) or else Bad_Spelling_Of (Tok_Or) or else Bad_Spelling_Of (Tok_Pragma) or else Bad_Spelling_Of (Tok_Raise) or else Bad_Spelling_Of (Tok_Requeue) or else Bad_Spelling_Of (Tok_Return) or else Bad_Spelling_Of (Tok_Select) or else Bad_Spelling_Of (Tok_When) or else Bad_Spelling_Of (Tok_While) then null; -- If not a bad spelling, then we really have junk else Scan; -- past identifier again -- If next token is first token on line, then we -- consider that we were missing a semicolon after -- the identifier, and process it as a procedure -- call with no parameters. if Token_Is_At_Start_Of_Line then Change_Name_To_Procedure_Call_Statement (Id_Node); Append_To (Statement_List, Id_Node); T_Semicolon; -- to give error message Statement_Required := False; -- Otherwise we give a missing := message and -- simply abandon the junk that is there now. else T_Colon_Equal; -- give := expected message raise Error_Resync; end if; end if; end if; -- Statement starting with operator symbol. This could be -- a call, a name starting an assignment, or a qualified -- expression. when Tok_Operator_Symbol => Check_Bad_Layout; Name_Node := P_Name; -- An attempt at a range attribute or a qualified expression -- must be illegal here (a code statement cannot possibly -- allow qualification by a function name). if Token = Tok_Apostrophe then Error_Msg_SC ("apostrophe illegal here"); raise Error_Resync; end if; -- Scan possible assignment if we have a name if Expr_Form = EF_Name and then Token = Tok_Colon_Equal then Scan; -- past colon equal Append_To (Statement_List, P_Assignment_Statement (Name_Node)); else Change_Name_To_Procedure_Call_Statement (Name_Node); Append_To (Statement_List, Name_Node); end if; TF_Semicolon; Statement_Required := False; -- Label starting with << which must precede real statement -- Note: in Ada 2012, the label may end the sequence. when Tok_Less_Less => if Present (Last (Statement_List)) and then Nkind (Last (Statement_List)) /= N_Label then Statement_Seen := True; end if; Append_To (Statement_List, P_Label); Statement_Required := True; -- Pragma appearing as a statement in a statement sequence when Tok_Pragma => Check_Bad_Layout; Append_To (Statement_List, P_Pragma); -- Abort_Statement when Tok_Abort => Check_Bad_Layout; Append_To (Statement_List, P_Abort_Statement); Statement_Required := False; -- Accept_Statement when Tok_Accept => Check_Bad_Layout; Append_To (Statement_List, P_Accept_Statement); Statement_Required := False; -- Begin_Statement (Block_Statement with no declare, no label) when Tok_Begin => Check_Bad_Layout; Append_To (Statement_List, P_Begin_Statement); Statement_Required := False; -- Case_Statement when Tok_Case => Check_Bad_Layout; Append_To (Statement_List, P_Case_Statement); Statement_Required := False; -- Block_Statement with DECLARE and no label when Tok_Declare => Check_Bad_Layout; Append_To (Statement_List, P_Declare_Statement); Statement_Required := False; -- Delay_Statement when Tok_Delay => Check_Bad_Layout; Append_To (Statement_List, P_Delay_Statement); Statement_Required := False; -- Exit_Statement when Tok_Exit => Check_Bad_Layout; Append_To (Statement_List, P_Exit_Statement); Statement_Required := False; -- Loop_Statement with FOR and no label when Tok_For => Check_Bad_Layout; Append_To (Statement_List, P_For_Statement); Statement_Required := False; -- Goto_Statement when Tok_Goto => Check_Bad_Layout; Append_To (Statement_List, P_Goto_Statement); Statement_Required := False; -- If_Statement when Tok_If => Check_Bad_Layout; Append_To (Statement_List, P_If_Statement); Statement_Required := False; -- Loop_Statement when Tok_Loop => Check_Bad_Layout; Append_To (Statement_List, P_Loop_Statement); Statement_Required := False; -- Null_Statement when Tok_Null => Check_Bad_Layout; Append_To (Statement_List, P_Null_Statement); Statement_Required := False; -- Raise_Statement when Tok_Raise => Check_Bad_Layout; Append_To (Statement_List, P_Raise_Statement); Statement_Required := False; -- Requeue_Statement when Tok_Requeue => Check_Bad_Layout; Append_To (Statement_List, P_Requeue_Statement); Statement_Required := False; -- Return_Statement when Tok_Return => Check_Bad_Layout; Append_To (Statement_List, P_Return_Statement); Statement_Required := False; -- Select_Statement when Tok_Select => Check_Bad_Layout; Append_To (Statement_List, P_Select_Statement); Statement_Required := False; -- While_Statement (Block_Statement with while and no loop) when Tok_While => Check_Bad_Layout; Append_To (Statement_List, P_While_Statement); Statement_Required := False; -- Anything else is some kind of junk, signal an error message -- and then raise Error_Resync, to merge with the normal -- handling of a bad statement. when others => if Token in Token_Class_Declk then Junk_Declaration; else Error_Msg_BC -- CODEFIX ("statement expected"); raise Error_Resync; end if; end case; -- On error resynchronization, skip past next semicolon, and, since -- we are still in the statement loop, look for next statement. We -- set Statement_Required False to avoid an unnecessary error message -- complaining that no statement was found (i.e. we consider the -- junk to satisfy the requirement for a statement being present). exception when Error_Resync => Resync_Past_Semicolon_Or_To_Loop_Or_Then; Statement_Required := False; end; exit when SS_Flags.Unco; end loop; return Statement_List; end P_Sequence_Of_Statements; -------------------- -- 5.1 Statement -- -------------------- --------------------------- -- 5.1 Simple Statement -- --------------------------- -- Parsed by P_Sequence_Of_Statements (5.1) ----------------------------- -- 5.1 Compound Statement -- ----------------------------- -- Parsed by P_Sequence_Of_Statements (5.1) ------------------------- -- 5.1 Null Statement -- ------------------------- -- NULL_STATEMENT ::= null; -- The caller has already checked that the current token is null -- Error recovery: cannot raise Error_Resync function P_Null_Statement return Node_Id is Null_Stmt_Node : Node_Id; begin Null_Stmt_Node := New_Node (N_Null_Statement, Token_Ptr); Scan; -- past NULL TF_Semicolon; return Null_Stmt_Node; end P_Null_Statement; ---------------- -- 5.1 Label -- ---------------- -- LABEL ::= <<label_STATEMENT_IDENTIFIER>> -- STATEMENT_IDENTIFIER ::= DIRECT_NAME -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier -- (not an OPERATOR_SYMBOL) -- The caller has already checked that the current token is << -- Error recovery: can raise Error_Resync function P_Label return Node_Id is Label_Node : Node_Id; begin Label_Node := New_Node (N_Label, Token_Ptr); Scan; -- past << Set_Identifier (Label_Node, P_Identifier (C_Greater_Greater)); T_Greater_Greater; Append_Elmt (Label_Node, Label_List); return Label_Node; end P_Label; ------------------------------- -- 5.1 Statement Identifier -- ------------------------------- -- Statement label is parsed by P_Label (5.1) -- Loop label is parsed by P_Loop_Statement (5.5), P_For_Statement (5.5) -- or P_While_Statement (5.5) -- Block label is parsed by P_Begin_Statement (5.6) or -- P_Declare_Statement (5.6) ------------------------------- -- 5.2 Assignment Statement -- ------------------------------- -- ASSIGNMENT_STATEMENT ::= -- variable_NAME := EXPRESSION; -- Error recovery: can raise Error_Resync function P_Assignment_Statement (LHS : Node_Id) return Node_Id is Assign_Node : Node_Id; begin Assign_Node := New_Node (N_Assignment_Statement, Prev_Token_Ptr); Set_Name (Assign_Node, LHS); Set_Expression (Assign_Node, P_Expression_No_Right_Paren); TF_Semicolon; return Assign_Node; end P_Assignment_Statement; ----------------------- -- 5.3 If Statement -- ----------------------- -- IF_STATEMENT ::= -- if CONDITION then -- SEQUENCE_OF_STATEMENTS -- {elsif CONDITION then -- SEQUENCE_OF_STATEMENTS} -- [else -- SEQUENCE_OF_STATEMENTS] -- end if; -- The caller has checked that the initial token is IF (or in the error -- case of a mysterious THEN, the initial token may simply be THEN, in -- which case, no condition (or IF) was scanned). -- Error recovery: can raise Error_Resync function P_If_Statement return Node_Id is If_Node : Node_Id; Elsif_Node : Node_Id; Loc : Source_Ptr; procedure Add_Elsif_Part; -- An internal procedure used to scan out a single ELSIF part. On entry -- the ELSIF (or an ELSE which has been determined should be ELSIF) is -- scanned out and is in Prev_Token. procedure Check_If_Column; -- An internal procedure used to check that THEN, ELSE, or ELSIF -- appear in the right place if column checking is enabled (i.e. if -- they are the first token on the line, then they must appear in -- the same column as the opening IF). procedure Check_Then_Column; -- This procedure carries out the style checks for a THEN token -- Note that the caller has set Loc to the Source_Ptr value for -- the previous IF or ELSIF token. function Else_Should_Be_Elsif return Boolean; -- An internal routine used to do a special error recovery check when -- an ELSE is encountered. It determines if the ELSE should be treated -- as an ELSIF. A positive decision (TRUE returned, is made if the ELSE -- is followed by a sequence of tokens, starting on the same line as -- the ELSE, which are not expression terminators, followed by a THEN. -- On entry, the ELSE has been scanned out. procedure Add_Elsif_Part is begin if No (Elsif_Parts (If_Node)) then Set_Elsif_Parts (If_Node, New_List); end if; Elsif_Node := New_Node (N_Elsif_Part, Prev_Token_Ptr); Loc := Prev_Token_Ptr; Set_Condition (Elsif_Node, P_Condition); Check_Then_Column; Then_Scan; Set_Then_Statements (Elsif_Node, P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq)); Append (Elsif_Node, Elsif_Parts (If_Node)); end Add_Elsif_Part; procedure Check_If_Column is begin if RM_Column_Check and then Token_Is_At_Start_Of_Line and then Start_Column /= Scope.Table (Scope.Last).Ecol then Error_Msg_Col := Scope.Table (Scope.Last).Ecol; Error_Msg_SC ("(style) this token should be@"); end if; end Check_If_Column; procedure Check_Then_Column is begin if Token = Tok_Then then Check_If_Column; if Style_Check then Style.Check_Then (Loc); end if; end if; end Check_Then_Column; function Else_Should_Be_Elsif return Boolean is Scan_State : Saved_Scan_State; begin if Token_Is_At_Start_Of_Line then return False; else Save_Scan_State (Scan_State); loop if Token in Token_Class_Eterm then Restore_Scan_State (Scan_State); return False; else Scan; -- past non-expression terminating token if Token = Tok_Then then Restore_Scan_State (Scan_State); return True; end if; end if; end loop; end if; end Else_Should_Be_Elsif; -- Start of processing for P_If_Statement begin If_Node := New_Node (N_If_Statement, Token_Ptr); Push_Scope_Stack; Scope.Table (Scope.Last).Etyp := E_If; Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scope.Table (Scope.Last).Labl := Error; Scope.Table (Scope.Last).Node := If_Node; if Token = Tok_If then Loc := Token_Ptr; Scan; -- past IF Set_Condition (If_Node, P_Condition); -- Deal with misuse of IF expression => used instead -- of WHEN expression => if Token = Tok_Arrow then Error_Msg_SC -- CODEFIX ("THEN expected"); Scan; -- past the arrow Pop_Scope_Stack; -- remove unneeded entry raise Error_Resync; end if; Check_Then_Column; else Error_Msg_SC ("no IF for this THEN"); Set_Condition (If_Node, Error); end if; Then_Scan; Set_Then_Statements (If_Node, P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq)); -- This loop scans out else and elsif parts loop if Token = Tok_Elsif then Check_If_Column; if Present (Else_Statements (If_Node)) then Error_Msg_SP ("ELSIF cannot appear after ELSE"); end if; Scan; -- past ELSIF Add_Elsif_Part; elsif Token = Tok_Else then Check_If_Column; Scan; -- past ELSE if Else_Should_Be_Elsif then Error_Msg_SP -- CODEFIX ("ELSE should be ELSIF"); Add_Elsif_Part; else -- Here we have an else that really is an else if Present (Else_Statements (If_Node)) then Error_Msg_SP ("only one ELSE part allowed"); Append_List (P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq), Else_Statements (If_Node)); else Set_Else_Statements (If_Node, P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq)); end if; end if; -- If anything other than ELSE or ELSIF, exit the loop. The token -- had better be END (and in fact it had better be END IF), but -- we will let End_Statements take care of checking that. else exit; end if; end loop; End_Statements; return If_Node; end P_If_Statement; -------------------- -- 5.3 Condition -- -------------------- -- CONDITION ::= boolean_EXPRESSION function P_Condition return Node_Id is begin return P_Condition (P_Expression_No_Right_Paren); end P_Condition; function P_Condition (Cond : Node_Id) return Node_Id is begin -- It is never possible for := to follow a condition, so if we get -- a := we assume it is a mistyped equality. Note that we do not try -- to reconstruct the tree correctly in this case, but we do at least -- give an accurate error message. if Token = Tok_Colon_Equal then while Token = Tok_Colon_Equal loop Error_Msg_SC -- CODEFIX (""":="" should be ""="""); Scan; -- past junk := Discard_Junk_Node (P_Expression_No_Right_Paren); end loop; return Cond; -- Otherwise check for redundant parentheses -- If the condition is a conditional or a quantified expression, it is -- parenthesized in the context of a condition, because of a separate -- syntax rule. else if Style_Check and then Paren_Count (Cond) > 0 then if not Nkind_In (Cond, N_If_Expression, N_Case_Expression, N_Quantified_Expression) or else Paren_Count (Cond) > 1 then Style.Check_Xtra_Parens (First_Sloc (Cond)); end if; end if; -- And return the result return Cond; end if; end P_Condition; ------------------------- -- 5.4 Case Statement -- ------------------------- -- CASE_STATEMENT ::= -- case EXPRESSION is -- CASE_STATEMENT_ALTERNATIVE -- {CASE_STATEMENT_ALTERNATIVE} -- end case; -- The caller has checked that the first token is CASE -- Can raise Error_Resync function P_Case_Statement return Node_Id is Case_Node : Node_Id; Alternatives_List : List_Id; First_When_Loc : Source_Ptr; begin Case_Node := New_Node (N_Case_Statement, Token_Ptr); Push_Scope_Stack; Scope.Table (Scope.Last).Etyp := E_Case; Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scope.Table (Scope.Last).Labl := Error; Scope.Table (Scope.Last).Node := Case_Node; Scan; -- past CASE Set_Expression (Case_Node, P_Expression_No_Right_Paren); TF_Is; -- Prepare to parse case statement alternatives Alternatives_List := New_List; P_Pragmas_Opt (Alternatives_List); First_When_Loc := Token_Ptr; -- Loop through case statement alternatives loop -- If we have a WHEN or OTHERS, then that's fine keep going. Note -- that it is a semantic check to ensure the proper use of OTHERS if Token = Tok_When or else Token = Tok_Others then Append (P_Case_Statement_Alternative, Alternatives_List); -- If we have an END, then probably we are at the end of the case -- but we only exit if Check_End thinks the END was reasonable. elsif Token = Tok_End then exit when Check_End; -- Here if token is other than WHEN, OTHERS or END. We definitely -- have an error, but the question is whether or not to get out of -- the case statement. We don't want to get out early, or we will -- get a slew of junk error messages for subsequent when tokens. -- If the token is not at the start of the line, or if it is indented -- with respect to the current case statement, then the best guess is -- that we are still supposed to be inside the case statement. We -- complain about the missing WHEN, and discard the junk statements. elsif not Token_Is_At_Start_Of_Line or else Start_Column > Scope.Table (Scope.Last).Ecol then Error_Msg_BC ("WHEN (case statement alternative) expected"); -- Here is a possibility for infinite looping if we don't make -- progress. So try to process statements, otherwise exit declare Error_Ptr : constant Source_Ptr := Scan_Ptr; begin Discard_Junk_List (P_Sequence_Of_Statements (SS_Whtm)); exit when Scan_Ptr = Error_Ptr and then Check_End; end; -- Here we have a junk token at the start of the line and it is -- not indented. If Check_End thinks there is a missing END, then -- we will get out of the case, otherwise we keep going. else exit when Check_End; end if; end loop; -- Make sure we have at least one alternative if No (First_Non_Pragma (Alternatives_List)) then Error_Msg ("WHEN expected, must have at least one alternative in case", First_When_Loc); return Error; else Set_Alternatives (Case_Node, Alternatives_List); return Case_Node; end if; end P_Case_Statement; ------------------------------------- -- 5.4 Case Statement Alternative -- ------------------------------------- -- CASE_STATEMENT_ALTERNATIVE ::= -- when DISCRETE_CHOICE_LIST => -- SEQUENCE_OF_STATEMENTS -- The caller has checked that the initial token is WHEN or OTHERS -- Error recovery: can raise Error_Resync function P_Case_Statement_Alternative return Node_Id is Case_Alt_Node : Node_Id; begin if Style_Check then Style.Check_Indentation; end if; Case_Alt_Node := New_Node (N_Case_Statement_Alternative, Token_Ptr); T_When; -- past WHEN (or give error in OTHERS case) Set_Discrete_Choices (Case_Alt_Node, P_Discrete_Choice_List); TF_Arrow; Set_Statements (Case_Alt_Node, P_Sequence_Of_Statements (SS_Sreq_Whtm)); return Case_Alt_Node; end P_Case_Statement_Alternative; ------------------------- -- 5.5 Loop Statement -- ------------------------- -- LOOP_STATEMENT ::= -- [LOOP_STATEMENT_IDENTIFIER:] -- [ITERATION_SCHEME] loop -- SEQUENCE_OF_STATEMENTS -- end loop [loop_IDENTIFIER]; -- ITERATION_SCHEME ::= -- while CONDITION -- | for LOOP_PARAMETER_SPECIFICATION -- The parsing of loop statements is handled by one of three functions -- P_Loop_Statement, P_For_Statement or P_While_Statement depending -- on the initial keyword in the construct (excluding the identifier) -- P_Loop_Statement -- This function parses the case where no iteration scheme is present -- The caller has checked that the initial token is LOOP. The parameter -- is the node identifiers for the loop label if any (or is set to Empty -- if there is no loop label). -- Error recovery : cannot raise Error_Resync function P_Loop_Statement (Loop_Name : Node_Id := Empty) return Node_Id is Loop_Node : Node_Id; Created_Name : Node_Id; begin Push_Scope_Stack; Scope.Table (Scope.Last).Labl := Loop_Name; Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scope.Table (Scope.Last).Etyp := E_Loop; Loop_Node := New_Node (N_Loop_Statement, Token_Ptr); TF_Loop; if No (Loop_Name) then Created_Name := Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Loop_Node, True); Set_Identifier (Loop_Node, Created_Name); Scope.Table (Scope.Last).Labl := Created_Name; else Set_Identifier (Loop_Node, Loop_Name); end if; Append_Elmt (Loop_Node, Label_List); Set_Statements (Loop_Node, P_Sequence_Of_Statements (SS_Sreq)); End_Statements (Loop_Node); return Loop_Node; end P_Loop_Statement; -- P_For_Statement -- This function parses a loop statement with a FOR iteration scheme -- The caller has checked that the initial token is FOR. The parameter -- is the node identifier for the block label if any (or is set to Empty -- if there is no block label). -- Note: the caller fills in the Identifier field if a label was present -- Error recovery: can raise Error_Resync function P_For_Statement (Loop_Name : Node_Id := Empty) return Node_Id is Loop_Node : Node_Id; Iter_Scheme_Node : Node_Id; Loop_For_Flag : Boolean; Created_Name : Node_Id; Spec : Node_Id; begin Push_Scope_Stack; Scope.Table (Scope.Last).Labl := Loop_Name; Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scope.Table (Scope.Last).Etyp := E_Loop; Loop_For_Flag := (Prev_Token = Tok_Loop); Scan; -- past FOR Iter_Scheme_Node := New_Node (N_Iteration_Scheme, Token_Ptr); Spec := P_Loop_Parameter_Specification; if Nkind (Spec) = N_Loop_Parameter_Specification then Set_Loop_Parameter_Specification (Iter_Scheme_Node, Spec); else Set_Iterator_Specification (Iter_Scheme_Node, Spec); end if; -- The following is a special test so that a miswritten for loop such -- as "loop for I in 1..10;" is handled nicely, without making an extra -- entry in the scope stack. We don't bother to actually fix up the -- tree in this case since it's not worth the effort. Instead we just -- eat up the loop junk, leaving the entry for what now looks like an -- unmodified loop intact. if Loop_For_Flag and then Token = Tok_Semicolon then Error_Msg_SC ("LOOP belongs here, not before FOR"); Pop_Scope_Stack; return Error; -- Normal case else Loop_Node := New_Node (N_Loop_Statement, Token_Ptr); if No (Loop_Name) then Created_Name := Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Loop_Node, True); Set_Identifier (Loop_Node, Created_Name); Scope.Table (Scope.Last).Labl := Created_Name; else Set_Identifier (Loop_Node, Loop_Name); end if; TF_Loop; Set_Statements (Loop_Node, P_Sequence_Of_Statements (SS_Sreq)); End_Statements (Loop_Node); Set_Iteration_Scheme (Loop_Node, Iter_Scheme_Node); Append_Elmt (Loop_Node, Label_List); return Loop_Node; end if; end P_For_Statement; -- P_While_Statement -- This procedure scans a loop statement with a WHILE iteration scheme -- The caller has checked that the initial token is WHILE. The parameter -- is the node identifier for the block label if any (or is set to Empty -- if there is no block label). -- Error recovery: cannot raise Error_Resync function P_While_Statement (Loop_Name : Node_Id := Empty) return Node_Id is Loop_Node : Node_Id; Iter_Scheme_Node : Node_Id; Loop_While_Flag : Boolean; Created_Name : Node_Id; begin Push_Scope_Stack; Scope.Table (Scope.Last).Labl := Loop_Name; Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scope.Table (Scope.Last).Etyp := E_Loop; Loop_While_Flag := (Prev_Token = Tok_Loop); Iter_Scheme_Node := New_Node (N_Iteration_Scheme, Token_Ptr); Scan; -- past WHILE Set_Condition (Iter_Scheme_Node, P_Condition); -- The following is a special test so that a miswritten for loop such -- as "loop while I > 10;" is handled nicely, without making an extra -- entry in the scope stack. We don't bother to actually fix up the -- tree in this case since it's not worth the effort. Instead we just -- eat up the loop junk, leaving the entry for what now looks like an -- unmodified loop intact. if Loop_While_Flag and then Token = Tok_Semicolon then Error_Msg_SC ("LOOP belongs here, not before WHILE"); Pop_Scope_Stack; return Error; -- Normal case else Loop_Node := New_Node (N_Loop_Statement, Token_Ptr); TF_Loop; if No (Loop_Name) then Created_Name := Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Loop_Node, True); Set_Identifier (Loop_Node, Created_Name); Scope.Table (Scope.Last).Labl := Created_Name; else Set_Identifier (Loop_Node, Loop_Name); end if; Set_Statements (Loop_Node, P_Sequence_Of_Statements (SS_Sreq)); End_Statements (Loop_Node); Set_Iteration_Scheme (Loop_Node, Iter_Scheme_Node); Append_Elmt (Loop_Node, Label_List); return Loop_Node; end if; end P_While_Statement; --------------------------------------- -- 5.5 Loop Parameter Specification -- --------------------------------------- -- LOOP_PARAMETER_SPECIFICATION ::= -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION -- Error recovery: cannot raise Error_Resync function P_Loop_Parameter_Specification return Node_Id is Loop_Param_Specification_Node : Node_Id; ID_Node : Node_Id; Scan_State : Saved_Scan_State; begin Save_Scan_State (Scan_State); ID_Node := P_Defining_Identifier (C_In); -- If the next token is OF, it indicates an Ada 2012 iterator. If the -- next token is a colon, this is also an Ada 2012 iterator, including -- a subtype indication for the loop parameter. Otherwise we parse the -- construct as a loop parameter specification. Note that the form -- "for A in B" is ambiguous, and must be resolved semantically: if B -- is a discrete subtype this is a loop specification, but if it is an -- expression it is an iterator specification. Ambiguity is resolved -- during analysis of the loop parameter specification. if Token = Tok_Of or else Token = Tok_Colon then Error_Msg_Ada_2012_Feature ("iterator", Token_Ptr); return P_Iterator_Specification (ID_Node); end if; -- The span of the Loop_Parameter_Specification starts at the -- defining identifier. Loop_Param_Specification_Node := New_Node (N_Loop_Parameter_Specification, Sloc (ID_Node)); Set_Defining_Identifier (Loop_Param_Specification_Node, ID_Node); if Token = Tok_Left_Paren then Error_Msg_SC ("subscripted loop parameter not allowed"); Restore_Scan_State (Scan_State); Discard_Junk_Node (P_Name); elsif Token = Tok_Dot then Error_Msg_SC ("selected loop parameter not allowed"); Restore_Scan_State (Scan_State); Discard_Junk_Node (P_Name); end if; T_In; if Token = Tok_Reverse then Scan; -- past REVERSE Set_Reverse_Present (Loop_Param_Specification_Node, True); end if; Set_Discrete_Subtype_Definition (Loop_Param_Specification_Node, P_Discrete_Subtype_Definition); return Loop_Param_Specification_Node; exception when Error_Resync => return Error; end P_Loop_Parameter_Specification; ---------------------------------- -- 5.5.1 Iterator_Specification -- ---------------------------------- function P_Iterator_Specification (Def_Id : Node_Id) return Node_Id is Node1 : Node_Id; begin Node1 := New_Node (N_Iterator_Specification, Sloc (Def_Id)); Set_Defining_Identifier (Node1, Def_Id); if Token = Tok_Colon then Scan; -- past : Set_Subtype_Indication (Node1, P_Subtype_Indication); end if; if Token = Tok_Of then Set_Of_Present (Node1); Scan; -- past OF elsif Token = Tok_In then Scan; -- past IN elsif Prev_Token = Tok_In and then Present (Subtype_Indication (Node1)) then -- Simplest recovery is to transform it into an element iterator. -- Error message on 'in" has already been emitted when parsing the -- optional constraint. Set_Of_Present (Node1); Error_Msg_N ("subtype indication is only legal on an element iterator", Subtype_Indication (Node1)); else return Error; end if; if Token = Tok_Reverse then Scan; -- past REVERSE Set_Reverse_Present (Node1, True); end if; Set_Name (Node1, P_Name); return Node1; end P_Iterator_Specification; -------------------------- -- 5.6 Block Statement -- -------------------------- -- BLOCK_STATEMENT ::= -- [block_STATEMENT_IDENTIFIER:] -- [declare -- DECLARATIVE_PART] -- begin -- HANDLED_SEQUENCE_OF_STATEMENTS -- end [block_IDENTIFIER]; -- The parsing of block statements is handled by one of the two functions -- P_Declare_Statement or P_Begin_Statement depending on whether or not -- a declare section is present -- P_Declare_Statement -- This function parses a block statement with DECLARE present -- The caller has checked that the initial token is DECLARE -- Error recovery: cannot raise Error_Resync function P_Declare_Statement (Block_Name : Node_Id := Empty) return Node_Id is Block_Node : Node_Id; Created_Name : Node_Id; begin Block_Node := New_Node (N_Block_Statement, Token_Ptr); Push_Scope_Stack; Scope.Table (Scope.Last).Etyp := E_Name; Scope.Table (Scope.Last).Lreq := Present (Block_Name); Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Labl := Block_Name; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scan; -- past DECLARE if No (Block_Name) then Created_Name := Make_Identifier (Sloc (Block_Node), Set_Loop_Block_Name ('B')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Block_Node, True); Set_Identifier (Block_Node, Created_Name); Scope.Table (Scope.Last).Labl := Created_Name; else Set_Identifier (Block_Node, Block_Name); end if; Append_Elmt (Block_Node, Label_List); Parse_Decls_Begin_End (Block_Node); return Block_Node; end P_Declare_Statement; -- P_Begin_Statement -- This function parses a block statement with no DECLARE present -- The caller has checked that the initial token is BEGIN -- Error recovery: cannot raise Error_Resync function P_Begin_Statement (Block_Name : Node_Id := Empty) return Node_Id is Block_Node : Node_Id; Created_Name : Node_Id; begin Block_Node := New_Node (N_Block_Statement, Token_Ptr); Push_Scope_Stack; Scope.Table (Scope.Last).Etyp := E_Name; Scope.Table (Scope.Last).Lreq := Present (Block_Name); Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Labl := Block_Name; Scope.Table (Scope.Last).Sloc := Token_Ptr; if No (Block_Name) then Created_Name := Make_Identifier (Sloc (Block_Node), Set_Loop_Block_Name ('B')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Block_Node, True); Set_Identifier (Block_Node, Created_Name); Scope.Table (Scope.Last).Labl := Created_Name; else Set_Identifier (Block_Node, Block_Name); end if; Append_Elmt (Block_Node, Label_List); Scope.Table (Scope.Last).Ecol := Start_Column; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scan; -- past BEGIN Set_Handled_Statement_Sequence (Block_Node, P_Handled_Sequence_Of_Statements); End_Statements (Handled_Statement_Sequence (Block_Node)); return Block_Node; end P_Begin_Statement; ------------------------- -- 5.7 Exit Statement -- ------------------------- -- EXIT_STATEMENT ::= -- exit [loop_NAME] [when CONDITION]; -- The caller has checked that the initial token is EXIT -- Error recovery: can raise Error_Resync function P_Exit_Statement return Node_Id is Exit_Node : Node_Id; function Missing_Semicolon_On_Exit return Boolean; -- This function deals with the following specialized situation -- -- when 'x' => -- exit [identifier] -- when 'y' => -- -- This looks like a messed up EXIT WHEN, when in fact the problem -- is a missing semicolon. It is called with Token pointing to the -- WHEN token, and returns True if a semicolon is missing before -- the WHEN as in the above example. ------------------------------- -- Missing_Semicolon_On_Exit -- ------------------------------- function Missing_Semicolon_On_Exit return Boolean is State : Saved_Scan_State; begin if not Token_Is_At_Start_Of_Line then return False; elsif Scope.Table (Scope.Last).Etyp /= E_Case then return False; else Save_Scan_State (State); Scan; -- past WHEN Scan; -- past token after WHEN if Token = Tok_Arrow then Restore_Scan_State (State); return True; else Restore_Scan_State (State); return False; end if; end if; end Missing_Semicolon_On_Exit; -- Start of processing for P_Exit_Statement begin Exit_Node := New_Node (N_Exit_Statement, Token_Ptr); Scan; -- past EXIT if Token = Tok_Identifier then Set_Name (Exit_Node, P_Qualified_Simple_Name); elsif Style_Check then -- This EXIT has no name, so check that -- the innermost loop is unnamed too. Check_No_Exit_Name : for J in reverse 1 .. Scope.Last loop if Scope.Table (J).Etyp = E_Loop then if Present (Scope.Table (J).Labl) and then Comes_From_Source (Scope.Table (J).Labl) then -- Innermost loop in fact had a name, style check fails Style.No_Exit_Name (Scope.Table (J).Labl); end if; exit Check_No_Exit_Name; end if; end loop Check_No_Exit_Name; end if; if Token = Tok_When and then not Missing_Semicolon_On_Exit then Scan; -- past WHEN Set_Condition (Exit_Node, P_Condition); -- Allow IF instead of WHEN, giving error message elsif Token = Tok_If then T_When; Scan; -- past IF used in place of WHEN Set_Condition (Exit_Node, P_Expression_No_Right_Paren); end if; TF_Semicolon; return Exit_Node; end P_Exit_Statement; ------------------------- -- 5.8 Goto Statement -- ------------------------- -- GOTO_STATEMENT ::= goto label_NAME; -- The caller has checked that the initial token is GOTO (or TO in the -- error case where GO and TO were incorrectly separated). -- Error recovery: can raise Error_Resync function P_Goto_Statement return Node_Id is Goto_Node : Node_Id; begin Goto_Node := New_Node (N_Goto_Statement, Token_Ptr); Scan; -- past GOTO (or TO) Set_Name (Goto_Node, P_Qualified_Simple_Name_Resync); Append_Elmt (Goto_Node, Goto_List); No_Constraint; TF_Semicolon; return Goto_Node; end P_Goto_Statement; --------------------------- -- Parse_Decls_Begin_End -- --------------------------- -- This function parses the construct: -- DECLARATIVE_PART -- begin -- HANDLED_SEQUENCE_OF_STATEMENTS -- end [NAME]; -- The caller has built the scope stack entry, and created the node to -- whose Declarations and Handled_Statement_Sequence fields are to be -- set. On return these fields are filled in (except in the case of a -- task body, where the handled statement sequence is optional, and may -- thus be Empty), and the scan is positioned past the End sequence. -- If the BEGIN is missing, then the parent node is used to help construct -- an appropriate missing BEGIN message. Possibilities for the parent are: -- N_Block_Statement declare block -- N_Entry_Body entry body -- N_Package_Body package body (begin part optional) -- N_Subprogram_Body procedure or function body -- N_Task_Body task body -- Note: in the case of a block statement, there is definitely a DECLARE -- present (because a Begin statement without a DECLARE is handled by the -- P_Begin_Statement procedure, which does not call Parse_Decls_Begin_End. -- Error recovery: cannot raise Error_Resync procedure Parse_Decls_Begin_End (Parent : Node_Id) is Body_Decl : Node_Id; Decls : List_Id; Parent_Nkind : Node_Kind; Spec_Node : Node_Id; HSS : Node_Id; procedure Missing_Begin (Msg : String); -- Called to post a missing begin message. In the normal case this is -- posted at the start of the current token. A special case arises when -- P_Declarative_Items has previously found a missing begin, in which -- case we replace the original error message. procedure Set_Null_HSS (Parent : Node_Id); -- Construct an empty handled statement sequence and install in Parent -- Leaves HSS set to reference the newly constructed statement sequence. ------------------- -- Missing_Begin -- ------------------- procedure Missing_Begin (Msg : String) is begin if Missing_Begin_Msg = No_Error_Msg then Error_Msg_BC (Msg); else Change_Error_Text (Missing_Begin_Msg, Msg); -- Purge any messages issued after than, since a missing begin -- can cause a lot of havoc, and it is better not to dump these -- cascaded messages on the user. Purge_Messages (Get_Location (Missing_Begin_Msg), Prev_Token_Ptr); end if; end Missing_Begin; ------------------ -- Set_Null_HSS -- ------------------ procedure Set_Null_HSS (Parent : Node_Id) is Null_Stm : Node_Id; begin Null_Stm := Make_Null_Statement (Token_Ptr); Set_Comes_From_Source (Null_Stm, False); HSS := Make_Handled_Sequence_Of_Statements (Token_Ptr, Statements => New_List (Null_Stm)); Set_Comes_From_Source (HSS, False); Set_Handled_Statement_Sequence (Parent, HSS); end Set_Null_HSS; -- Start of processing for Parse_Decls_Begin_End begin Decls := P_Declarative_Part; if Ada_Version = Ada_83 then Check_Later_Vs_Basic_Declarations (Decls, During_Parsing => True); end if; -- Here is where we deal with the case of IS used instead of semicolon. -- Specifically, if the last declaration in the declarative part is a -- subprogram body still marked as having a bad IS, then this is where -- we decide that the IS should really have been a semicolon and that -- the body should have been a declaration. Note that if the bad IS -- had turned out to be OK (i.e. a decent begin/end was found for it), -- then the Bad_Is_Detected flag would have been reset by now. Body_Decl := Last (Decls); if Present (Body_Decl) and then Nkind (Body_Decl) = N_Subprogram_Body and then Bad_Is_Detected (Body_Decl) then -- OK, we have the case of a bad IS, so we need to fix up the tree. -- What we have now is a subprogram body with attached declarations -- and a possible statement sequence. -- First step is to take the declarations that were part of the bogus -- subprogram body and append them to the outer declaration chain. -- In other words we append them past the body (which we will later -- convert into a declaration). Append_List (Declarations (Body_Decl), Decls); -- Now take the handled statement sequence of the bogus body and -- set it as the statement sequence for the outer construct. Note -- that it may be empty (we specially allowed a missing BEGIN for -- a subprogram body marked as having a bad IS -- see below). Set_Handled_Statement_Sequence (Parent, Handled_Statement_Sequence (Body_Decl)); -- Next step is to convert the old body node to a declaration node Spec_Node := Specification (Body_Decl); Change_Node (Body_Decl, N_Subprogram_Declaration); Set_Specification (Body_Decl, Spec_Node); -- Final step is to put the declarations for the parent where -- they belong, and then fall through the IF to scan out the -- END statements. Set_Declarations (Parent, Decls); -- This is the normal case (i.e. any case except the bad IS case) -- If we have a BEGIN, then scan out the sequence of statements, and -- also reset the expected column for the END to match the BEGIN. else Set_Declarations (Parent, Decls); if Token = Tok_Begin then if Style_Check then Style.Check_Indentation; end if; Error_Msg_Col := Scope.Table (Scope.Last).Ecol; if RM_Column_Check and then Token_Is_At_Start_Of_Line and then Start_Column /= Error_Msg_Col then Error_Msg_SC ("(style) BEGIN in wrong column, should be@"); else Scope.Table (Scope.Last).Ecol := Start_Column; end if; Scope.Table (Scope.Last).Sloc := Token_Ptr; Scan; -- past BEGIN Set_Handled_Statement_Sequence (Parent, P_Handled_Sequence_Of_Statements); -- No BEGIN present else Parent_Nkind := Nkind (Parent); -- A special check for the missing IS case. If we have a -- subprogram body that was marked as having a suspicious -- IS, and the current token is END, then we simply confirm -- the suspicion, and do not require a BEGIN to be present if Parent_Nkind = N_Subprogram_Body and then Token = Tok_End and then Scope.Table (Scope.Last).Etyp = E_Suspicious_Is then Scope.Table (Scope.Last).Etyp := E_Bad_Is; -- Otherwise BEGIN is not required for a package body, so we -- don't mind if it is missing, but we do construct a dummy -- one (so that we have somewhere to set End_Label). -- However if we have something other than a BEGIN which -- looks like it might be statements, then we signal a missing -- BEGIN for these cases as well. We define "something which -- looks like it might be statements" as a token other than -- END, EOF, or a token which starts declarations. elsif Parent_Nkind = N_Package_Body and then (Token = Tok_End or else Token = Tok_EOF or else Token in Token_Class_Declk) then Set_Null_HSS (Parent); -- These are cases in which a BEGIN is required and not present else Set_Null_HSS (Parent); -- Prepare to issue error message Error_Msg_Sloc := Scope.Table (Scope.Last).Sloc; Error_Msg_Node_1 := Scope.Table (Scope.Last).Labl; -- Now issue appropriate message if Parent_Nkind = N_Block_Statement then Missing_Begin ("missing BEGIN for DECLARE#!"); elsif Parent_Nkind = N_Entry_Body then Missing_Begin ("missing BEGIN for ENTRY#!"); elsif Parent_Nkind = N_Subprogram_Body then if Nkind (Specification (Parent)) = N_Function_Specification then Missing_Begin ("missing BEGIN for function&#!"); else Missing_Begin ("missing BEGIN for procedure&#!"); end if; -- The case for package body arises only when -- we have possible statement junk present. elsif Parent_Nkind = N_Package_Body then Missing_Begin ("missing BEGIN for package body&#!"); else pragma Assert (Parent_Nkind = N_Task_Body); Missing_Begin ("missing BEGIN for task body&#!"); end if; -- Here we pick up the statements after the BEGIN that -- should have been present but was not. We don't insist -- on statements being present if P_Declarative_Part had -- already found a missing BEGIN, since it might have -- swallowed a lone statement into the declarative part. if Missing_Begin_Msg /= No_Error_Msg and then Token = Tok_End then null; else Set_Handled_Statement_Sequence (Parent, P_Handled_Sequence_Of_Statements); end if; end if; end if; end if; -- Here with declarations and handled statement sequence scanned if Present (Handled_Statement_Sequence (Parent)) then End_Statements (Handled_Statement_Sequence (Parent)); else End_Statements; end if; -- We know that End_Statements removed an entry from the scope stack -- (because it is required to do so under all circumstances). We can -- therefore reference the entry it removed one past the stack top. -- What we are interested in is whether it was a case of a bad IS. if Scope.Table (Scope.Last + 1).Etyp = E_Bad_Is then Error_Msg -- CODEFIX ("|IS should be "";""", Scope.Table (Scope.Last + 1).S_Is); Set_Bad_Is_Detected (Parent, True); end if; end Parse_Decls_Begin_End; ------------------------- -- Set_Loop_Block_Name -- ------------------------- function Set_Loop_Block_Name (L : Character) return Name_Id is begin Name_Buffer (1) := L; Name_Buffer (2) := '_'; Name_Len := 2; Loop_Block_Count := Loop_Block_Count + 1; Add_Nat_To_Name_Buffer (Loop_Block_Count); return Name_Find; end Set_Loop_Block_Name; --------------- -- Then_Scan -- --------------- procedure Then_Scan is begin TF_Then; while Token = Tok_Then loop Error_Msg_SC -- CODEFIX ("redundant THEN"); TF_Then; end loop; if Token = Tok_And or else Token = Tok_Or then Error_Msg_SC ("unexpected logical operator"); Scan; -- past logical operator if (Prev_Token = Tok_And and then Token = Tok_Then) or else (Prev_Token = Tok_Or and then Token = Tok_Else) then Scan; end if; Discard_Junk_Node (P_Expression); end if; if Token = Tok_Then then Scan; end if; end Then_Scan; end Ch5;
mastersystem/zxb-sms-2012-02-23/zxb-sms/wip/zxb/library-asm/divf16.asm
gb-archive/really-old-stuff
10
95295
#include once <div32.asm> __DIVF16: ; 16.16 Fixed point Division (signed) ; DE.HL = Dividend, Stack Top = Divisor ; A = Dividend, B = Divisor => A / B exx pop hl ; return address pop de ; low part ex (sp), hl ; CALLEE Convention ; H'L'D'E' => Dividend ex de, hl ; D'E'.H'L' Dividend __DIVF16START: ; FAST Entry: DEHL => Dividend, D'E'H'L' => Divisor ld a, d ; Save sign ex af, af' bit 7, d ; Negative? call nz, __NEG32 ; Negates DEHL exx ; Now works with D'E'.H'L' ex af, af' xor d ex af, af' ; Stores sign of the result for later bit 7, d ; Negative? call nz, __NEG32 exx ; Now we have DE.HL => Dividend ld b, 16 __SHIFTALOOP: ; Tries to shift Dividend to the left bit 7, d jp nz, __SHIFTB add hl, hl ex de, hl adc hl, hl ex de, hl djnz __SHIFTALOOP jp __DOF16_DIVRDY __SHIFTB: ; Cannot shift Dividend more to the left, try to shift Divisor to the right ld a, b exx ld b, a ; Divisor is in DEHL __SHIFTBLOOP: bit 1, l jp nz, __DOF16_DIVIDE sra d rr e rr h rr l djnz __SHIFTBLOOP __DOF16_DIVIDE: ld a, b exx ld b, a __DOF16_DIVRDY: exx ex de, hl push bc call __DIVU32START pop bc xor a or b jp z, __ENDF16DIV __SHIFTCLOOP: add hl, hl ; Shift DECIMAL PART << 1 ex de, hl adc hl, hl ; Shift INTEGER PART << 1 Plus Carry ex de, hl djnz __SHIFTCLOOP __ENDF16DIV: ; Put the sign on the result ex af, af' ; Recovers sign and 128 ; positive? ret z jp __NEG32 ; Negates DEHL and returns from there
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr30.adb
best08618/asylo
7
26987
-- PR ada/48844 -- Reported by <NAME> <<EMAIL>> */ -- { dg-do compile } procedure Discr30 is generic type Source is private; type Target is private; function Conversion (S : Source) return Target; function Conversion (S : Source) return Target is type Source_Wrapper is tagged record S : Source; end record; type Target_Wrapper is tagged record T : Target; end record; type Selector is (Source_Field, Target_Field); type Magic (Sel : Selector := Target_Field) is record case Sel is when Source_Field => S : Source_Wrapper; when Target_Field => T : Target_Wrapper; end case; end record; M : Magic; function Convert (T : Target_Wrapper) return Target is begin M := (Sel => Source_Field, S => (S => S)); return T.T; end Convert; begin return Convert (M.T); end Conversion; type Integer_Access is access all Integer; I : aliased Integer; I_Access : Integer_Access := I'Access; function Convert is new Conversion (Integer_Access, Integer); begin I := Convert (I_Access); end;
examples/feather_stm32f405/charlie_wing/src/main.adb
rocher/Ada_Drivers_Library
192
18820
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, 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. -- -- -- ------------------------------------------------------------------------------ with Feather_STM32F405.I2C; with AdaFruit.CharlieWing; with HAL; use HAL; procedure Main is Matrix : AdaFruit.CharlieWing.Device (Feather_STM32F405.I2C.Controller, 0); pragma Style_Checks (Off); A : constant := 1; Text : constant array (AdaFruit.CharlieWing.Y_Coord, 0 .. 74) of HAL.Bit := ((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, others => 0), (A, 0, 0, 0, A, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, 0, 0, 0, 0, A, A, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, others => 0), (A, A, 0, A, A, 0, 0, A, A, 0, 0, A, 0, 0, A, 0, 0, A, A, 0, 0, 0, A, 0, 0, 0, A, 0, 0, 0, 0, A, A, A, 0, A, 0, 0, 0, 0, 0, A, 0, 0, A, 0, 0, A, A, A, 0, 0, A, A, 0, others => 0), (A, 0, A, 0, A, 0, 0, 0, 0, A, 0, A, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, 0, A, 0, A, A, 0, 0, A, 0, 0, A, A, A, 0, 0, 0, A, 0, 0, A, 0, A, 0, 0, A, 0, 0, 0, 0, A, others => 0), (A, 0, 0, 0, A, 0, 0, A, A, A, 0, A, A, 0, 0, 0, A, A, A, A, 0, 0, A, 0, A, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, A, A, A, 0, A, 0, 0, A, 0, 0, A, A, A, others => 0), (A, 0, 0, 0, A, 0, A, 0, 0, A, 0, A, 0, A, 0, 0, A, 0, 0, 0, 0, 0, A, A, 0, A, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, A, 0, 0, A, 0, A, 0, 0, A, others => 0), (A, 0, 0, 0, A, 0, 0, A, A, A, 0, A, 0, 0, A, 0, 0, A, A, 0, 0, 0, A, 0, 0, 0, A, 0, A, A, A, 0, A, A, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, A, A, 0, 0, A, A, A, others => 0)); pragma Style_Checks (On); begin Feather_STM32F405.I2C.Initialize (400_000); Matrix.Initialize; Matrix.Fill (10); loop for Column in Text'Range (2) loop for X in AdaFruit.CharlieWing.X_Coord loop for Y in AdaFruit.CharlieWing.Y_Coord loop if Text (Y, (X + Column) mod Text'Length (2)) = 1 then Matrix.Enable (X, Y); else Matrix.Disable (X, Y); end if; end loop; end loop; delay 0.1; end loop; end loop; end Main;
Programs/sergey_printEcho.asm
JetStarBlues/Intel-8080-Emulator
4
175862
; ------------------------------------------------------------------------ ; From, ; http://www.malinov.com/Home/sergeys-projects/minimax8085 ; ; USART (8251) test code ; Prints "8085" to the serial port, and then echoes received characters. ; ------------------------------------------------------------------------ ; USART registers USART_DATA EQU 08h USART_CMD EQU 09h START: LXI H, 0C000h ; Load 0xC0000 to stack pointer? SPHL CALL USART_INIT ; Send '8085' to serial port BANNER: MVI A, 38h ; '8' MOV C, A CALL USART_OUT MVI A, 30h ; '0' MOV C, A CALL USART_OUT MVI A, 38h ; '8' MOV C, A CALL USART_OUT MVI A, 35h ; '5' MOV C, A CALL USART_OUT MVI A, 0Dh ; CR MOV C, A CALL USART_OUT MVI A, 0Ah ; LF MOV C, A CALL USART_OUT ; Echo characters received from serial port ECHO_LOOP: CALL USART_IN MOV C, A CALL USART_OUT JMP ECHO_LOOP ; Initialize 8251 USART USART_INIT: ; Set USART to command mode - configure sync operation, write two dumy sync characters MVI A, 00h OUT USART_CMD OUT USART_CMD OUT USART_CMD ; Issue reset command MVI A, 40h OUT USART_CMD ; Write mode instruction - 1 stop bit, no parity, 8bits, divide clock by 16 MVI A, 4Eh OUT USART_CMD ; Write command instruction - activate RTS, reset error flags, enable RX, activate DTR, enable TX MVI A, 37h OUT USART_CMD ; Clear the data register IN USART_DATA RET ; Read character from USART USART_IN: IN USART_CMD ; Read USART status ANI 2 ; Test RX_ready bit JZ USART_IN ; If zero, retry (wait till the data is ready) IN USART_DATA ; Else, read the character/data RET ; Write character to USART USART_OUT: IN USART_CMD ; Read USART status ANI 1 ; Test TX_ready bit JZ USART_OUT ; If zero, wait till ready MOV A, C ; Else, write the character OUT USART_DATA RET
Chapter 1/1.7 - Long Mode/boot.asm
gmarino2048/64bit-os-tutorial
87
97780
; ; Long Mode ; ; boot.asm ; ; Set Program Origin [org 0x7C00] ; 16-bit Mode [bits 16] ; Initialize the base pointer and the stack pointer ; The initial values should be fine for what we've done so far, ; but it's better to do it explicitly mov bp, 0x0500 mov sp, bp ; Before we do anything else, we want to save the ID of the boot ; drive, which the BIOS stores in register dl. We can offload this ; to a specific location in memory mov byte[boot_drive], dl ; Print Message mov bx, msg_hello_world call print_bios ; Load the next sector ; The first sector's already been loaded, so we start with the second sector ; of the drive. Note: Only bl will be used mov bx, 0x0002 ; Now we want to load 2 sectors to load our entire bootloader. mov cx, 0x0002 ; Finally, we want to store the new sector immediately after the first ; loaded sector, at adress 0x7E00. This will help a lot with jumping between ; different sectors of the bootloader. mov dx, 0x7E00 ; Now we're fine to load the new sectors call load_bios ; And elevate our CPU to 32-bit mode call elevate_bios ; Infinite Loop bootsector_hold: jmp $ ; Infinite loop ; INCLUDES %include "real_mode/print.asm" %include "real_mode/print_hex.asm" %include "real_mode/load.asm" %include "real_mode/gdt.asm" %include "real_mode/elevate.asm" ; DATA STORAGE AREA ; String Message msg_hello_world: db `\r\nHello World, from the BIOS!\r\n`, 0 ; Boot drive storage boot_drive: db 0x00 ; Pad boot sector for magic number times 510 - ($ - $$) db 0x00 ; Magic number dw 0xAA55 ; BEGIN SECOND SECTOR. THIS ONE CONTAINS 32-BIT CODE ONLY bootsector_extended: begin_protected: [bits 32] ; Clear vga memory output call clear_protected ; Detect long mode ; This function will return if there's no error call detect_lm_protected ; Test VGA-style print function mov esi, protected_alert call print_protected ; Initialize the page table call init_pt_protected call elevate_protected jmp $ ; Infinite Loop ; INCLUDE protected-mode functions %include "protected_mode/clear.asm" %include "protected_mode/print.asm" %include "protected_mode/detect_lm.asm" %include "protected_mode/init_pt.asm" %include "protected_mode/gdt.asm" %include "protected_mode/elevate.asm" ; Define necessary constants vga_start: equ 0x000B8000 vga_extent: equ 80 * 25 * 2 ; VGA Memory is 80 chars wide by 25 chars tall (one char is 2 bytes) kernel_start: equ 0x00100000 ; Kernel is at 1MB style_wb: equ 0x0F ; Define messages protected_alert: db `64-bit long mode supported`, 0 ; Fill with zeros to the end of the sector times 512 - ($ - bootsector_extended) db 0x00 begin_long_mode: [bits 64] mov rdi, style_blue call clear_long mov rdi, style_blue mov rsi, long_mode_note call print_long jmp $ %include "long_mode/clear.asm" %include "long_mode/print.asm" long_mode_note: db `Now running in fully-enabled, 64-bit long mode!`, 0 style_blue: equ 0x1F times 512 - ($ - begin_long_mode) db 0x00
source/oasis/program-elements-function_renaming_declarations.ads
optikos/oasis
0
19
<reponame>optikos/oasis -- Copyright (c) 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Declarations; with Program.Lexical_Elements; with Program.Elements.Defining_Names; with Program.Elements.Parameter_Specifications; with Program.Elements.Expressions; with Program.Elements.Aspect_Specifications; package Program.Elements.Function_Renaming_Declarations is pragma Pure (Program.Elements.Function_Renaming_Declarations); type Function_Renaming_Declaration is limited interface and Program.Elements.Declarations.Declaration; type Function_Renaming_Declaration_Access is access all Function_Renaming_Declaration'Class with Storage_Size => 0; not overriding function Name (Self : Function_Renaming_Declaration) return not null Program.Elements.Defining_Names.Defining_Name_Access is abstract; not overriding function Parameters (Self : Function_Renaming_Declaration) return Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access is abstract; not overriding function Result_Subtype (Self : Function_Renaming_Declaration) return not null Program.Elements.Element_Access is abstract; not overriding function Renamed_Function (Self : Function_Renaming_Declaration) return Program.Elements.Expressions.Expression_Access is abstract; not overriding function Aspects (Self : Function_Renaming_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access is abstract; not overriding function Has_Not (Self : Function_Renaming_Declaration) return Boolean is abstract; not overriding function Has_Overriding (Self : Function_Renaming_Declaration) return Boolean is abstract; not overriding function Has_Not_Null (Self : Function_Renaming_Declaration) return Boolean is abstract; type Function_Renaming_Declaration_Text is limited interface; type Function_Renaming_Declaration_Text_Access is access all Function_Renaming_Declaration_Text'Class with Storage_Size => 0; not overriding function To_Function_Renaming_Declaration_Text (Self : aliased in out Function_Renaming_Declaration) return Function_Renaming_Declaration_Text_Access is abstract; not overriding function Not_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Overriding_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Function_Token (Self : Function_Renaming_Declaration_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Left_Bracket_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Right_Bracket_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Return_Token (Self : Function_Renaming_Declaration_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Not_Token_2 (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Null_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Renames_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function With_Token (Self : Function_Renaming_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Semicolon_Token (Self : Function_Renaming_Declaration_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Function_Renaming_Declarations;
Src/terminal.ads
SMerrony/dashera
23
1600
-- Copyright (C)2021,2022 <NAME> -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. package Terminal is type Emulation_T is (D200, D210); type Terminal_T is tagged record Emulation : Emulation_T; Cursor_X, Cursor_Y : Natural; In_Command, In_Extended_Command : Boolean; Getting_X_Addr, Getting_Y_Addr : Boolean; New_X_Addr, New_Y_Addr : Natural; Roll_Enabled, Protection_Enabled : Boolean; Holding : Boolean; Skip_Byte : Boolean; Expecting : Boolean; Raw_Mode : Boolean; -- in rawMode all host data is passed straight through to rawChan -- Selection_Region... -- Log_File : File; -- Display : Display_Acc_T; Blinking, Dimmed, Reversed, Underscored, Protectd : Boolean; Updated : Boolean; end record; type Terminal_Acc_T is access all Terminal_T; task type Processor is entry Start (Termin : in Terminal_Acc_T); entry Accept_Data (Str : in String); entry Stop; end Processor; type Processor_Acc is access Processor; Processor_Task : Processor_Acc; function Create (Emul : in Emulation_T) return Terminal_Acc_T; procedure Self_Test (T : in out Terminal_T); procedure Process (T : in out Terminal_T; Str : in String); end Terminal;
programs/oeis/306/A306279.asm
karttu/loda
0
169719
; A306279: Numbers congruent to 3 or 18 mod 22. ; 3,18,25,40,47,62,69,84,91,106,113,128,135,150,157,172,179,194,201,216,223,238,245,260,267,282,289,304,311,326,333,348,355,370,377,392,399,414,421,436,443,458,465,480,487,502,509,524,531,546,553,568 mov $1,32 add $1,$0 div $0,2 mul $0,8 mul $1,15 sub $1,$0 sub $1,477
libsrc/_DEVELOPMENT/adt/w_array/c/sccz80/w_array_append_callee.asm
meesokim/z88dk
0
241564
<filename>libsrc/_DEVELOPMENT/adt/w_array/c/sccz80/w_array_append_callee.asm ; size_t w_array_append(w_array_t *a, void *item) SECTION code_adt_w_array PUBLIC w_array_append_callee w_array_append_callee: pop hl pop bc ex (sp),hl INCLUDE "adt/w_array/z80/asm_w_array_append.asm"
oeis/142/A142266.asm
neoneye/loda-programs
11
176318
; A142266: Primes congruent to 17 mod 43. ; Submitted by <NAME> ; 17,103,619,877,1049,1307,1823,2081,2339,2683,3371,3457,4231,4919,5521,5693,5779,6037,6553,6983,7069,7499,7757,8101,8273,9133,9391,9649,9907,10079,10337,10853,10939,11197,11369,11971,12143,12401,12487,12659,12917,13003,13691,14207,14293,14551,14723,15497,15583,16529,16787,17389,18077,18593,18679,20399,20743,21001,21517,22291,22549,22721,22807,23581,23753,24097,24527,25301,25903,26161,26591,26849,27107,27967,29429,30203,30977,31063,31321,31751,32009,32353,32611,32783,32869,34159,34589,34847,35363 mov $1,8 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,2 mov $3,$1 mul $3,2 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,43 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mul $1,2 mov $0,$1 sub $0,85
Agda/21-pushouts.agda
hemangandhi/HoTT-Intro
333
15402
<gh_stars>100-1000 {-# OPTIONS --without-K --allow-unsolved-metas --exact-split #-} module 21-pushouts where import 20-pullbacks open 20-pullbacks public -- Section 14.1 {- We define the type of cocones with vertex X on a span. Since we will use it later on, we will also characterize the identity type of the type of cocones with a given vertex X. -} cocone : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → UU l4 → UU _ cocone {A = A} {B = B} f g X = Σ (A → X) (λ i → Σ (B → X) (λ j → (i ∘ f) ~ (j ∘ g))) {- We characterize the identity type of the type of cocones with vertex C. -} coherence-htpy-cocone : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c c' : cocone f g X) → (K : (pr1 c) ~ (pr1 c')) (L : (pr1 (pr2 c)) ~ (pr1 (pr2 c'))) → UU (l1 ⊔ l4) coherence-htpy-cocone f g c c' K L = ((pr2 (pr2 c)) ∙h (L ·r g)) ~ ((K ·r f) ∙h (pr2 (pr2 c'))) htpy-cocone : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} → cocone f g X → cocone f g X → UU (l1 ⊔ (l2 ⊔ (l3 ⊔ l4))) htpy-cocone f g c c' = Σ ((pr1 c) ~ (pr1 c')) ( λ K → Σ ((pr1 (pr2 c)) ~ (pr1 (pr2 c'))) ( coherence-htpy-cocone f g c c' K)) reflexive-htpy-cocone : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → htpy-cocone f g c c reflexive-htpy-cocone f g (pair i (pair j H)) = pair refl-htpy (pair refl-htpy htpy-right-unit) htpy-cocone-eq : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c c' : cocone f g X) → Id c c' → htpy-cocone f g c c' htpy-cocone-eq f g c .c refl = reflexive-htpy-cocone f g c is-contr-total-htpy-cocone : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → is-contr (Σ (cocone f g X) (htpy-cocone f g c)) is-contr-total-htpy-cocone f g c = is-contr-total-Eq-structure ( λ i' jH' K → Σ ((pr1 (pr2 c)) ~ (pr1 jH')) ( coherence-htpy-cocone f g c (pair i' jH') K)) ( is-contr-total-htpy (pr1 c)) ( pair (pr1 c) refl-htpy) ( is-contr-total-Eq-structure ( λ j' H' → coherence-htpy-cocone f g c ( pair (pr1 c) (pair j' H')) ( refl-htpy)) ( is-contr-total-htpy (pr1 (pr2 c))) ( pair (pr1 (pr2 c)) refl-htpy) ( is-contr-is-equiv' ( Σ (((pr1 c) ∘ f) ~ ((pr1 (pr2 c)) ∘ g)) (λ H' → (pr2 (pr2 c)) ~ H')) ( tot (λ H' M → htpy-right-unit ∙h M)) ( is-equiv-tot-is-fiberwise-equiv (λ H' → is-equiv-htpy-concat _ _)) ( is-contr-total-htpy (pr2 (pr2 c))))) is-equiv-htpy-cocone-eq : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c c' : cocone f g X) → is-equiv (htpy-cocone-eq f g c c') is-equiv-htpy-cocone-eq f g c = fundamental-theorem-id c ( reflexive-htpy-cocone f g c) ( is-contr-total-htpy-cocone f g c) ( htpy-cocone-eq f g c) eq-htpy-cocone : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c c' : cocone f g X) → htpy-cocone f g c c' → Id c c' eq-htpy-cocone f g c c' = inv-is-equiv (is-equiv-htpy-cocone-eq f g c c') {- Given a cocone c on a span S with vertex X, and a type Y, the function cocone-map sends a function X → Y to a new cocone with vertex Y. -} cocone-map : {l1 l2 l3 l4 l5 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} {Y : UU l5} → cocone f g X → (X → Y) → cocone f g Y cocone-map f g (pair i (pair j H)) h = pair (h ∘ i) (pair (h ∘ j) (h ·l H)) cocone-map-id : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → Id (cocone-map f g c id) c cocone-map-id f g (pair i (pair j H)) = eq-pair refl (eq-pair refl (eq-htpy (λ s → ap-id (H s)))) cocone-map-comp : {l1 l2 l3 l4 l5 l6 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) {Y : UU l5} (h : X → Y) {Z : UU l6} (k : Y → Z) → Id (cocone-map f g c (k ∘ h)) (cocone-map f g (cocone-map f g c h) k) cocone-map-comp f g (pair i (pair j H)) h k = eq-pair refl (eq-pair refl (eq-htpy (λ s → ap-comp k h (H s)))) {- A cocone c on a span S is said to satisfy the universal property of the pushout of S if the function cocone-map is an equivalence for every type Y. -} universal-property-pushout : {l1 l2 l3 l4 : Level} (l : Level) {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} → cocone f g X → UU _ universal-property-pushout l f g c = (Y : UU l) → is-equiv (cocone-map f g {Y = Y} c) map-universal-property-pushout : {l1 l2 l3 l4 l5 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → ( up-c : {l : Level} → universal-property-pushout l f g c) {Y : UU l5} → cocone f g Y → (X → Y) map-universal-property-pushout f g c up-c {Y} = inv-is-equiv (up-c Y) htpy-cocone-map-universal-property-pushout : { l1 l2 l3 l4 l5 : Level} {S : UU l1} {A : UU l2} {B : UU l3} ( f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → ( up-c : {l : Level} → universal-property-pushout l f g c) { Y : UU l5} (d : cocone f g Y) → htpy-cocone f g ( cocone-map f g c ( map-universal-property-pushout f g c up-c d)) ( d) htpy-cocone-map-universal-property-pushout f g c up-c {Y} d = htpy-cocone-eq f g ( cocone-map f g c (map-universal-property-pushout f g c up-c d)) ( d) ( issec-inv-is-equiv (up-c Y) d) uniqueness-map-universal-property-pushout : { l1 l2 l3 l4 l5 : Level} {S : UU l1} {A : UU l2} {B : UU l3} ( f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → ( up-c : {l : Level} → universal-property-pushout l f g c) → { Y : UU l5} (d : cocone f g Y) → is-contr ( Σ (X → Y) (λ h → htpy-cocone f g (cocone-map f g c h) d)) uniqueness-map-universal-property-pushout f g c up-c {Y} d = is-contr-is-equiv' ( fib (cocone-map f g c) d) ( tot (λ h → htpy-cocone-eq f g (cocone-map f g c h) d)) ( is-equiv-tot-is-fiberwise-equiv ( λ h → is-equiv-htpy-cocone-eq f g (cocone-map f g c h) d)) ( is-contr-map-is-equiv (up-c Y) d) {- We derive a 3-for-2 property of pushouts, analogous to the 3-for-2 property of pullbacks. -} triangle-cocone-cocone : { l1 l2 l3 l4 l5 l6 : Level} { S : UU l1} {A : UU l2} {B : UU l3} {X : UU l4} {Y : UU l5} { f : S → A} {g : S → B} (c : cocone f g X) (d : cocone f g Y) ( h : X → Y) (KLM : htpy-cocone f g (cocone-map f g c h) d) ( Z : UU l6) → ( cocone-map f g d) ~ ((cocone-map f g c) ∘ (λ (k : Y → Z) → k ∘ h)) triangle-cocone-cocone {Y = Y} {f = f} {g = g} c d h KLM Z k = inv ( ( cocone-map-comp f g c h k) ∙ ( ap ( λ t → cocone-map f g t k) ( eq-htpy-cocone f g (cocone-map f g c h) d KLM))) is-equiv-up-pushout-up-pushout : { l1 l2 l3 l4 l5 : Level} { S : UU l1} {A : UU l2} {B : UU l3} {X : UU l4} {Y : UU l5} ( f : S → A) (g : S → B) (c : cocone f g X) (d : cocone f g Y) → ( h : X → Y) (KLM : htpy-cocone f g (cocone-map f g c h) d) → ( up-c : {l : Level} → universal-property-pushout l f g c) → ( up-d : {l : Level} → universal-property-pushout l f g d) → is-equiv h is-equiv-up-pushout-up-pushout f g c d h KLM up-c up-d = is-equiv-is-equiv-precomp h ( λ l Z → is-equiv-right-factor ( cocone-map f g d) ( cocone-map f g c) ( precomp h Z) ( triangle-cocone-cocone c d h KLM Z) ( up-c Z) ( up-d Z)) up-pushout-up-pushout-is-equiv : { l1 l2 l3 l4 l5 : Level} { S : UU l1} {A : UU l2} {B : UU l3} {X : UU l4} {Y : UU l5} ( f : S → A) (g : S → B) (c : cocone f g X) (d : cocone f g Y) → ( h : X → Y) (KLM : htpy-cocone f g (cocone-map f g c h) d) → is-equiv h → ( up-c : {l : Level} → universal-property-pushout l f g c) → {l : Level} → universal-property-pushout l f g d up-pushout-up-pushout-is-equiv f g c d h KLM is-equiv-h up-c Z = is-equiv-comp ( cocone-map f g d) ( cocone-map f g c) ( precomp h Z) ( triangle-cocone-cocone c d h KLM Z) ( is-equiv-precomp-is-equiv h is-equiv-h Z) ( up-c Z) up-pushout-is-equiv-up-pushout : { l1 l2 l3 l4 l5 : Level} { S : UU l1} {A : UU l2} {B : UU l3} {X : UU l4} {Y : UU l5} ( f : S → A) (g : S → B) (c : cocone f g X) (d : cocone f g Y) → ( h : X → Y) (KLM : htpy-cocone f g (cocone-map f g c h) d) → ( up-d : {l : Level} → universal-property-pushout l f g d) → is-equiv h → {l : Level} → universal-property-pushout l f g c up-pushout-is-equiv-up-pushout f g c d h KLM up-d is-equiv-h Z = is-equiv-left-factor ( cocone-map f g d) ( cocone-map f g c) ( precomp h Z) ( triangle-cocone-cocone c d h KLM Z) ( up-d Z) ( is-equiv-precomp-is-equiv h is-equiv-h Z) uniquely-unique-pushout : { l1 l2 l3 l4 l5 : Level} { S : UU l1} {A : UU l2} {B : UU l3} {X : UU l4} {Y : UU l5} ( f : S → A) (g : S → B) (c : cocone f g X) (d : cocone f g Y) → ( up-c : {l : Level} → universal-property-pushout l f g c) → ( up-d : {l : Level} → universal-property-pushout l f g d) → is-contr ( Σ (X ≃ Y) (λ e → htpy-cocone f g (cocone-map f g c (map-equiv e)) d)) uniquely-unique-pushout f g c d up-c up-d = is-contr-total-Eq-substructure ( uniqueness-map-universal-property-pushout f g c up-c d) ( is-subtype-is-equiv) ( map-universal-property-pushout f g c up-c d) ( htpy-cocone-map-universal-property-pushout f g c up-c d) ( is-equiv-up-pushout-up-pushout f g c d ( map-universal-property-pushout f g c up-c d) ( htpy-cocone-map-universal-property-pushout f g c up-c d) ( up-c) ( up-d)) {- We will assume that every span has a pushout. Moreover, we will introduce some further terminology to facilitate working with these pushouts. -} postulate pushout : {l1 l2 l3 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → UU (l1 ⊔ l2 ⊔ l3) postulate inl-pushout : {l1 l2 l3 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → A → pushout f g postulate inr-pushout : {l1 l2 l3 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → B → pushout f g postulate glue-pushout : {l1 l2 l3 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → ((inl-pushout f g) ∘ f) ~ ((inr-pushout f g) ∘ g) cocone-pushout : {l1 l2 l3 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → cocone f g (pushout f g) cocone-pushout f g = pair ( inl-pushout f g) ( pair ( inr-pushout f g) ( glue-pushout f g)) postulate up-pushout : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) → universal-property-pushout l4 f g (cocone-pushout f g) cogap : { l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} ( f : S → A) (g : S → B) → { X : UU l4} (c : cocone f g X) → pushout f g → X cogap f g = map-universal-property-pushout f g ( cocone-pushout f g) ( up-pushout f g) is-pushout : { l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} ( f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) is-pushout f g c = is-equiv (cogap f g c) -- Section 14.2 Suspensions suspension-structure : {l1 l2 : Level} (X : UU l1) (Y : UU l2) → UU (l1 ⊔ l2) suspension-structure X Y = Σ Y (λ N → Σ Y (λ S → (x : X) → Id N S)) suspension-cocone' : {l1 l2 : Level} (X : UU l1) (Y : UU l2) → UU (l1 ⊔ l2) suspension-cocone' X Y = cocone (const X unit star) (const X unit star) Y cocone-suspension-structure : {l1 l2 : Level} (X : UU l1) (Y : UU l2) → suspension-structure X Y → suspension-cocone' X Y cocone-suspension-structure X Y (pair N (pair S merid)) = pair ( const unit Y N) ( pair ( const unit Y S) ( merid)) universal-property-suspension' : (l : Level) {l1 l2 : Level} (X : UU l1) (Y : UU l2) (susp-str : suspension-structure X Y) → UU (lsuc l ⊔ l1 ⊔ l2) universal-property-suspension' l X Y susp-str-Y = universal-property-pushout l ( const X unit star) ( const X unit star) ( cocone-suspension-structure X Y susp-str-Y) is-suspension : (l : Level) {l1 l2 : Level} (X : UU l1) (Y : UU l2) → UU (lsuc l ⊔ l1 ⊔ l2) is-suspension l X Y = Σ (suspension-structure X Y) (universal-property-suspension' l X Y) suspension : {l : Level} → UU l → UU l suspension X = pushout (const X unit star) (const X unit star) N-susp : {l : Level} {X : UU l} → suspension X N-susp {X = X} = inl-pushout (const X unit star) (const X unit star) star S-susp : {l : Level} {X : UU l} → suspension X S-susp {X = X} = inr-pushout (const X unit star) (const X unit star) star merid-susp : {l : Level} {X : UU l} → X → Id (N-susp {X = X}) (S-susp {X = X}) merid-susp {X = X} = glue-pushout (const X unit star) (const X unit star) sphere : ℕ → UU lzero sphere zero-ℕ = bool sphere (succ-ℕ n) = suspension (sphere n) N-sphere : (n : ℕ) → sphere n N-sphere zero-ℕ = true N-sphere (succ-ℕ n) = N-susp S-sphere : (n : ℕ) → sphere n S-sphere zero-ℕ = false S-sphere (succ-ℕ n) = S-susp {- We now work towards Lemma 17.2.2. -} suspension-cocone : {l1 l2 : Level} (X : UU l1) (Z : UU l2) → UU _ suspension-cocone X Z = Σ Z (λ z1 → Σ Z (λ z2 → (x : X) → Id z1 z2)) ev-suspension : {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} → (susp-str-Y : suspension-structure X Y) → (Z : UU l3) → (Y → Z) → suspension-cocone X Z ev-suspension (pair N (pair S merid)) Z h = pair (h N) (pair (h S) (h ·l merid)) universal-property-suspension : (l : Level) {l1 l2 : Level} (X : UU l1) (Y : UU l2) → suspension-structure X Y → UU (lsuc l ⊔ l1 ⊔ l2) universal-property-suspension l X Y susp-str-Y = (Z : UU l) → is-equiv (ev-suspension susp-str-Y Z) comparison-suspension-cocone : {l1 l2 : Level} (X : UU l1) (Z : UU l2) → suspension-cocone' X Z ≃ suspension-cocone X Z comparison-suspension-cocone X Z = equiv-toto ( λ z1 → Σ Z (λ z2 → (x : X) → Id z1 z2)) ( equiv-ev-star' Z) ( λ z1 → equiv-toto ( λ z2 → (x : X) → Id (z1 star) z2) ( equiv-ev-star' Z) ( λ z2 → equiv-id ((x : X) → Id (z1 star) (z2 star)))) map-comparison-suspension-cocone : {l1 l2 : Level} (X : UU l1) (Z : UU l2) → suspension-cocone' X Z → suspension-cocone X Z map-comparison-suspension-cocone X Z = map-equiv (comparison-suspension-cocone X Z) is-equiv-map-comparison-suspension-cocone : {l1 l2 : Level} (X : UU l1) (Z : UU l2) → is-equiv (map-comparison-suspension-cocone X Z) is-equiv-map-comparison-suspension-cocone X Z = is-equiv-map-equiv (comparison-suspension-cocone X Z) triangle-ev-suspension : {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} → (susp-str-Y : suspension-structure X Y) → (Z : UU l3) → ( ( map-comparison-suspension-cocone X Z) ∘ ( cocone-map ( const X unit star) ( const X unit star) ( cocone-suspension-structure X Y susp-str-Y))) ~ ( ev-suspension susp-str-Y Z) triangle-ev-suspension (pair N (pair S merid)) Z h = refl is-equiv-ev-suspension : { l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} → ( susp-str-Y : suspension-structure X Y) → ( up-Y : universal-property-suspension' l3 X Y susp-str-Y) → ( Z : UU l3) → is-equiv (ev-suspension susp-str-Y Z) is-equiv-ev-suspension {X = X} susp-str-Y up-Y Z = is-equiv-comp ( ev-suspension susp-str-Y Z) ( map-comparison-suspension-cocone X Z) ( cocone-map ( const X unit star) ( const X unit star) ( cocone-suspension-structure X _ susp-str-Y)) ( htpy-inv (triangle-ev-suspension susp-str-Y Z)) ( up-Y Z) ( is-equiv-map-comparison-suspension-cocone X Z) {- Pointed maps and pointed homotopies. -} pointed-fam : {l1 : Level} (l : Level) (X : UU-pt l1) → UU (lsuc l ⊔ l1) pointed-fam l (pair X x) = Σ (X → UU l) (λ P → P x) pointed-Π : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) → UU (l1 ⊔ l2) pointed-Π (pair X x) (pair P p) = Σ ((x' : X) → P x') (λ f → Id (f x) p) pointed-htpy : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) → (f g : pointed-Π X P) → UU (l1 ⊔ l2) pointed-htpy (pair X x) (pair P p) (pair f α) g = pointed-Π (pair X x) (pair (λ x' → Id (f x') (pr1 g x')) (α ∙ (inv (pr2 g)))) pointed-refl-htpy : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) → (f : pointed-Π X P) → pointed-htpy X P f f pointed-refl-htpy (pair X x) (pair P p) (pair f α) = pair refl-htpy (inv (right-inv α)) pointed-htpy-eq : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) → (f g : pointed-Π X P) → Id f g → pointed-htpy X P f g pointed-htpy-eq X P f .f refl = pointed-refl-htpy X P f is-contr-total-pointed-htpy : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) (f : pointed-Π X P) → is-contr (Σ (pointed-Π X P) (pointed-htpy X P f)) is-contr-total-pointed-htpy (pair X x) (pair P p) (pair f α) = is-contr-total-Eq-structure ( λ g β (H : f ~ g) → Id (H x) (α ∙ (inv β))) ( is-contr-total-htpy f) ( pair f refl-htpy) ( is-contr-equiv' ( Σ (Id (f x) p) (λ β → Id β α)) ( equiv-tot (λ β → equiv-con-inv refl β α)) ( is-contr-total-path' α)) is-equiv-pointed-htpy-eq : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) → (f g : pointed-Π X P) → is-equiv (pointed-htpy-eq X P f g) is-equiv-pointed-htpy-eq X P f = fundamental-theorem-id f ( pointed-refl-htpy X P f) ( is-contr-total-pointed-htpy X P f) ( pointed-htpy-eq X P f) eq-pointed-htpy : {l1 l2 : Level} (X : UU-pt l1) (P : pointed-fam l2 X) → (f g : pointed-Π X P) → (pointed-htpy X P f g) → Id f g eq-pointed-htpy X P f g = inv-is-equiv (is-equiv-pointed-htpy-eq X P f g) -- Section 14.3 Duality of pushouts and pullbacks {- The universal property of the pushout of a span S can also be stated as a pullback-property: a cocone c = (pair i (pair j H)) with vertex X satisfies the universal property of the pushout of S if and only if the square Y^X -----> Y^B | | | | V V Y^A -----> Y^S is a pullback square for every type Y. Below, we first define the cone of this commuting square, and then we introduce the type pullback-property-pushout, which states that the above square is a pullback. -} htpy-precomp : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g) (C : UU l3) → (precomp f C) ~ (precomp g C) htpy-precomp H C h = eq-htpy (h ·l H) compute-htpy-precomp : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : UU l3) → (htpy-precomp (refl-htpy' f) C) ~ refl-htpy compute-htpy-precomp f C h = eq-htpy-refl-htpy (h ∘ f) cone-pullback-property-pushout : {l1 l2 l3 l4 l : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) (Y : UU l) → cone (λ (h : A → Y) → h ∘ f) (λ (h : B → Y) → h ∘ g) (X → Y) cone-pullback-property-pushout f g {X} c Y = pair ( precomp (pr1 c) Y) ( pair ( precomp (pr1 (pr2 c)) Y) ( htpy-precomp (pr2 (pr2 c)) Y)) pullback-property-pushout : {l1 l2 l3 l4 : Level} (l : Level) {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → UU (l1 ⊔ (l2 ⊔ (l3 ⊔ (l4 ⊔ lsuc l)))) pullback-property-pushout l {S} {A} {B} f g {X} c = (Y : UU l) → is-pullback ( precomp f Y) ( precomp g Y) ( cone-pullback-property-pushout f g c Y) {- In order to show that the universal property of pushouts is equivalent to the pullback property, we show that the maps cocone-map and the gap map fit in a commuting triangle, where the third map is an equivalence. The claim then follows from the 3-for-2 property of equivalences. -} triangle-pullback-property-pushout-universal-property-pushout : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → {l : Level} (Y : UU l) → ( cocone-map f g c) ~ ( ( tot (λ i' → tot (λ j' p → htpy-eq p))) ∘ ( gap (λ h → h ∘ f) (λ h → h ∘ g) (cone-pullback-property-pushout f g c Y))) triangle-pullback-property-pushout-universal-property-pushout {S = S} {A = A} {B = B} f g (pair i (pair j H)) Y h = eq-pair refl (eq-pair refl (inv (issec-eq-htpy (h ·l H)))) pullback-property-pushout-universal-property-pushout : {l1 l2 l3 l4 : Level} (l : Level) {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → universal-property-pushout l f g c → pullback-property-pushout l f g c pullback-property-pushout-universal-property-pushout l f g (pair i (pair j H)) up-c Y = let c = (pair i (pair j H)) in is-equiv-right-factor ( cocone-map f g c) ( tot (λ i' → tot (λ j' p → htpy-eq p))) ( gap (λ h → h ∘ f) (λ h → h ∘ g) (cone-pullback-property-pushout f g c Y)) ( triangle-pullback-property-pushout-universal-property-pushout f g c Y) ( is-equiv-tot-is-fiberwise-equiv ( λ i' → is-equiv-tot-is-fiberwise-equiv ( λ j' → funext (i' ∘ f) (j' ∘ g)))) ( up-c Y) universal-property-pushout-pullback-property-pushout : {l1 l2 l3 l4 : Level} (l : Level) {S : UU l1} {A : UU l2} {B : UU l3} (f : S → A) (g : S → B) {X : UU l4} (c : cocone f g X) → pullback-property-pushout l f g c → universal-property-pushout l f g c universal-property-pushout-pullback-property-pushout l f g (pair i (pair j H)) pb-c Y = let c = (pair i (pair j H)) in is-equiv-comp ( cocone-map f g c) ( tot (λ i' → tot (λ j' p → htpy-eq p))) ( gap (λ h → h ∘ f) (λ h → h ∘ g) (cone-pullback-property-pushout f g c Y)) ( triangle-pullback-property-pushout-universal-property-pushout f g c Y) ( pb-c Y) ( is-equiv-tot-is-fiberwise-equiv ( λ i' → is-equiv-tot-is-fiberwise-equiv ( λ j' → funext (i' ∘ f) (j' ∘ g)))) cocone-compose-horizontal : { l1 l2 l3 l4 l5 l6 : Level} { A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} ( f : A → X) (i : A → B) (k : B → C) → ( c : cocone f i Y) (d : cocone (pr1 (pr2 c)) k Z) → cocone f (k ∘ i) Z cocone-compose-horizontal f i k (pair j (pair g H)) (pair l (pair h K)) = pair ( l ∘ j) ( pair ( h) ( (l ·l H) ∙h (K ·r i))) {- is-pushout-rectangle-is-pushout-right-square : ( l : Level) { l1 l2 l3 l4 l5 l6 : Level} { A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} ( f : A → X) (i : A → B) (k : B → C) → ( c : cocone f i Y) (d : cocone (pr1 (pr2 c)) k Z) → universal-property-pushout l f i c → universal-property-pushout l (pr1 (pr2 c)) k d → universal-property-pushout l f (k ∘ i) (cocone-compose-horizontal f i k c d) is-pushout-rectangle-is-pushout-right-square l f i k c d up-Y up-Z = universal-property-pushout-pullback-property-pushout l f (k ∘ i) ( cocone-compose-horizontal f i k c d) ( λ T → is-pullback-htpy {!!} {!!} {!!} {!!} {!!} {!!} {!!}) -} -- Examples of pushouts {- The cofiber of a map. -} cofiber : {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A → B) → UU (l1 ⊔ l2) cofiber {A = A} f = pushout f (const A unit star) cocone-cofiber : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → cocone f (const A unit star) (cofiber f) cocone-cofiber {A = A} f = cocone-pushout f (const A unit star) inl-cofiber : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → B → cofiber f inl-cofiber {A = A} f = pr1 (cocone-cofiber f) inr-cofiber : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → unit → cofiber f inr-cofiber f = pr1 (pr2 (cocone-cofiber f)) pt-cofiber : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → cofiber f pt-cofiber {A = A} f = inr-cofiber f star cofiber-ptd : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → UU-pt (l1 ⊔ l2) cofiber-ptd f = pair (cofiber f) (pt-cofiber f) up-cofiber : { l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → ( {l : Level} → universal-property-pushout l f (const A unit star) (cocone-cofiber f)) up-cofiber {A = A} f = up-pushout f (const A unit star) _*_ : {l1 l2 : Level} (A : UU l1) (B : UU l2) → UU (l1 ⊔ l2) A * B = pushout (pr1 {A = A} {B = λ x → B}) pr2 cocone-join : {l1 l2 : Level} (A : UU l1) (B : UU l2) → cocone (pr1 {A = A} {B = λ x → B}) pr2 (A * B) cocone-join A B = cocone-pushout pr1 pr2 up-join : {l1 l2 : Level} (A : UU l1) (B : UU l2) → ( {l : Level} → universal-property-pushout l ( pr1 {A = A} {B = λ x → B}) pr2 (cocone-join A B)) up-join A B = up-pushout pr1 pr2 inl-join : {l1 l2 : Level} (A : UU l1) (B : UU l2) → A → A * B inl-join A B = pr1 (cocone-join A B) inr-join : {l1 l2 : Level} (A : UU l1) (B : UU l2) → B → A * B inr-join A B = pr1 (pr2 (cocone-join A B)) glue-join : {l1 l2 : Level} (A : UU l1) (B : UU l2) (t : A × B) → Id (inl-join A B (pr1 t)) (inr-join A B (pr2 t)) glue-join A B = pr2 (pr2 (cocone-join A B)) _∨_ : {l1 l2 : Level} (A : UU-pt l1) (B : UU-pt l2) → UU-pt (l1 ⊔ l2) A ∨ B = pair ( pushout ( const unit (pr1 A) (pr2 A)) ( const unit (pr1 B) (pr2 B))) ( inl-pushout ( const unit (pr1 A) (pr2 A)) ( const unit (pr1 B) (pr2 B)) ( pr2 A)) indexed-wedge : {l1 l2 : Level} (I : UU l1) (A : I → UU-pt l2) → UU-pt (l1 ⊔ l2) indexed-wedge I A = pair ( cofiber (λ i → pair i (pr2 (A i)))) ( pt-cofiber (λ i → pair i (pr2 (A i)))) wedge-inclusion : {l1 l2 : Level} (A : UU-pt l1) (B : UU-pt l2) → pr1 (A ∨ B) → (pr1 A) × (pr1 B) wedge-inclusion {l1} {l2} (pair A a) (pair B b) = inv-is-equiv ( up-pushout ( const unit A a) ( const unit B b) ( A × B)) ( pair ( λ x → pair x b) ( pair ( λ y → pair a y) ( refl-htpy))) -- Exercises -- Exercise 13.1 -- Exercise 13.2 is-equiv-universal-property-pushout : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (f : S → A) (g : S → B) (c : cocone f g C) → is-equiv f → ({l : Level} → universal-property-pushout l f g c) → is-equiv (pr1 (pr2 c)) is-equiv-universal-property-pushout {A = A} {B} f g (pair i (pair j H)) is-equiv-f up-c = is-equiv-is-equiv-precomp j ( λ l T → is-equiv-is-pullback' ( λ (h : A → T) → h ∘ f) ( λ (h : B → T) → h ∘ g) ( cone-pullback-property-pushout f g (pair i (pair j H)) T) ( is-equiv-precomp-is-equiv f is-equiv-f T) ( pullback-property-pushout-universal-property-pushout l f g (pair i (pair j H)) up-c T)) equiv-universal-property-pushout : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (e : S ≃ A) (g : S → B) (c : cocone (map-equiv e) g C) → ({l : Level} → universal-property-pushout l (map-equiv e) g c) → B ≃ C equiv-universal-property-pushout e g c up-c = pair ( pr1 (pr2 c)) ( is-equiv-universal-property-pushout ( map-equiv e) ( g) ( c) ( is-equiv-map-equiv e) ( up-c)) is-equiv-universal-property-pushout' : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (f : S → A) (g : S → B) (c : cocone f g C) → is-equiv g → ({l : Level} → universal-property-pushout l f g c) → is-equiv (pr1 c) is-equiv-universal-property-pushout' f g (pair i (pair j H)) is-equiv-g up-c = is-equiv-is-equiv-precomp i ( λ l T → is-equiv-is-pullback ( precomp f T) ( precomp g T) ( cone-pullback-property-pushout f g (pair i (pair j H)) T) ( is-equiv-precomp-is-equiv g is-equiv-g T) ( pullback-property-pushout-universal-property-pushout l f g (pair i (pair j H)) up-c T)) equiv-universal-property-pushout' : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (f : S → A) (e : S ≃ B) (c : cocone f (map-equiv e) C) → ({l : Level} → universal-property-pushout l f (map-equiv e) c) → A ≃ C equiv-universal-property-pushout' f e c up-c = pair ( pr1 c) ( is-equiv-universal-property-pushout' ( f) ( map-equiv e) ( c) ( is-equiv-map-equiv e) ( up-c)) universal-property-pushout-is-equiv : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (f : S → A) (g : S → B) (c : cocone f g C) → is-equiv f → is-equiv (pr1 (pr2 c)) → ({l : Level} → universal-property-pushout l f g c) universal-property-pushout-is-equiv f g (pair i (pair j H)) is-equiv-f is-equiv-j {l} = let c = (pair i (pair j H)) in universal-property-pushout-pullback-property-pushout l f g c ( λ T → is-pullback-is-equiv' ( λ h → h ∘ f) ( λ h → h ∘ g) ( cone-pullback-property-pushout f g c T) ( is-equiv-precomp-is-equiv f is-equiv-f T) ( is-equiv-precomp-is-equiv j is-equiv-j T)) universal-property-pushout-is-equiv' : {l1 l2 l3 l4 : Level} {S : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (f : S → A) (g : S → B) (c : cocone f g C) → is-equiv g → is-equiv (pr1 c) → ({l : Level} → universal-property-pushout l f g c) universal-property-pushout-is-equiv' f g (pair i (pair j H)) is-equiv-g is-equiv-i {l} = let c = (pair i (pair j H)) in universal-property-pushout-pullback-property-pushout l f g c ( λ T → is-pullback-is-equiv ( precomp f T) ( precomp g T) ( cone-pullback-property-pushout f g c T) ( is-equiv-precomp-is-equiv g is-equiv-g T) ( is-equiv-precomp-is-equiv i is-equiv-i T)) is-contr-suspension-is-contr : {l : Level} {X : UU l} → is-contr X → is-contr (suspension X) is-contr-suspension-is-contr {l} {X} is-contr-X = is-contr-is-equiv' ( unit) ( pr1 (pr2 (cocone-pushout (const X unit star) (const X unit star)))) ( is-equiv-universal-property-pushout ( const X unit star) ( const X unit star) ( cocone-pushout ( const X unit star) ( const X unit star)) ( is-equiv-is-contr (const X unit star) is-contr-X is-contr-unit) ( up-pushout (const X unit star) (const X unit star))) ( is-contr-unit) is-contr-cofiber-is-equiv : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-equiv f → is-contr (cofiber f) is-contr-cofiber-is-equiv {A = A} {B} f is-equiv-f = is-contr-is-equiv' ( unit) ( pr1 (pr2 (cocone-cofiber f))) ( is-equiv-universal-property-pushout ( f) ( const A unit star) ( cocone-cofiber f) ( is-equiv-f) ( up-cofiber f)) ( is-contr-unit) is-equiv-cofiber-point : {l : Level} {B : UU l} (b : B) → is-equiv (pr1 (cocone-pushout (const unit B b) (const unit unit star))) is-equiv-cofiber-point {l} {B} b = is-equiv-universal-property-pushout' ( const unit B b) ( const unit unit star) ( cocone-pushout (const unit B b) (const unit unit star)) ( is-equiv-is-contr (const unit unit star) is-contr-unit is-contr-unit) ( up-pushout (const unit B b) (const unit unit star)) is-equiv-inr-join-empty : {l : Level} (X : UU l) → is-equiv (inr-join empty X) is-equiv-inr-join-empty X = is-equiv-universal-property-pushout ( pr1 {A = empty} {B = λ t → X}) ( pr2) ( cocone-join empty X) ( is-equiv-pr1-prod-empty X) ( up-join empty X) left-unit-law-join : {l : Level} (X : UU l) → X ≃ (empty * X) left-unit-law-join X = pair (inr-join empty X) (is-equiv-inr-join-empty X) is-equiv-inl-join-empty : {l : Level} (X : UU l) → is-equiv (inl-join X empty) is-equiv-inl-join-empty X = is-equiv-universal-property-pushout' ( pr1) ( pr2) ( cocone-join X empty) ( is-equiv-pr2-prod-empty X) ( up-join X empty) right-unit-law-join : {l : Level} (X : UU l) → X ≃ (X * empty) right-unit-law-join X = pair (inl-join X empty) (is-equiv-inl-join-empty X) inv-map-left-unit-law-prod : {l : Level} (X : UU l) → X → (unit × X) inv-map-left-unit-law-prod X = pair star issec-inv-map-left-unit-law-prod : {l : Level} (X : UU l) → (pr2 ∘ (inv-map-left-unit-law-prod X)) ~ id issec-inv-map-left-unit-law-prod X x = refl isretr-inv-map-left-unit-law-prod : {l : Level} (X : UU l) → ((inv-map-left-unit-law-prod X) ∘ pr2) ~ id isretr-inv-map-left-unit-law-prod X (pair star x) = refl is-equiv-left-unit-law-prod : {l : Level} (X : UU l) → is-equiv (pr2 {A = unit} {B = λ t → X}) is-equiv-left-unit-law-prod X = is-equiv-has-inverse ( inv-map-left-unit-law-prod X) ( issec-inv-map-left-unit-law-prod X) ( isretr-inv-map-left-unit-law-prod X) left-unit-law-prod : {l : Level} (X : UU l) → (unit × X) ≃ X left-unit-law-prod X = pair pr2 (is-equiv-left-unit-law-prod X) is-equiv-inl-join-unit : {l : Level} (X : UU l) → is-equiv (inl-join unit X) is-equiv-inl-join-unit X = is-equiv-universal-property-pushout' ( pr1) ( pr2) ( cocone-join unit X) ( is-equiv-left-unit-law-prod X) ( up-join unit X) left-zero-law-join : {l : Level} (X : UU l) → is-contr (unit * X) left-zero-law-join X = is-contr-equiv' ( unit) ( pair (inl-join unit X) (is-equiv-inl-join-unit X)) ( is-contr-unit) inv-map-right-unit-law-prod : {l : Level} (X : UU l) → X → X × unit inv-map-right-unit-law-prod X x = pair x star issec-inv-map-right-unit-law-prod : {l : Level} (X : UU l) → (pr1 ∘ (inv-map-right-unit-law-prod X)) ~ id issec-inv-map-right-unit-law-prod X x = refl isretr-inv-map-right-unit-law-prod : {l : Level} (X : UU l) → ((inv-map-right-unit-law-prod X) ∘ pr1) ~ id isretr-inv-map-right-unit-law-prod X (pair x star) = refl is-equiv-right-unit-law-prod : {l : Level} (X : UU l) → is-equiv (pr1 {A = X} {B = λ t → unit}) is-equiv-right-unit-law-prod X = is-equiv-has-inverse ( inv-map-right-unit-law-prod X) ( issec-inv-map-right-unit-law-prod X) ( isretr-inv-map-right-unit-law-prod X) right-unit-law-prod : {l : Level} (X : UU l) → (X × unit) ≃ X right-unit-law-prod X = pair pr1 (is-equiv-right-unit-law-prod X) is-equiv-inr-join-unit : {l : Level} (X : UU l) → is-equiv (inr-join X unit) is-equiv-inr-join-unit X = is-equiv-universal-property-pushout ( pr1) ( pr2) ( cocone-join X unit) ( is-equiv-right-unit-law-prod X) ( up-join X unit) right-zero-law-join : {l : Level} (X : UU l) → is-contr (X * unit) right-zero-law-join X = is-contr-equiv' ( unit) ( pair (inr-join X unit) (is-equiv-inr-join-unit X)) ( is-contr-unit) unit-pt : UU-pt lzero unit-pt = pair unit star is-contr-pt : {l : Level} → UU-pt l → UU l is-contr-pt A = is-contr (pr1 A) -- Exercise 16.2 -- ev-disjunction : -- {l1 l2 l3 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (R : UU-Prop l3) → -- ((type-Prop P) * (type-Prop Q) → (type-Prop R)) → -- (type-Prop P → type-Prop R) × (type-Prop Q → type-Prop R) -- ev-disjunction P Q R f = -- pair -- ( f ∘ (inl-join (type-Prop P) (type-Prop Q))) -- ( f ∘ (inr-join (type-Prop P) (type-Prop Q))) -- comparison-ev-disjunction : -- {l1 l2 l3 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (R : UU-Prop l3) → -- cocone-join (type-Prop P) (type-Prop Q) (type-Prop R) -- universal-property-disjunction-join-prop : -- {l1 l2 l3 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (R : UU-Prop l3) → -- is-equiv (ev-disjunction P Q R)
oeis/166/A166720.asm
neoneye/loda-programs
11
169837
; A166720: Trisection A165342(3n). ; Submitted by <NAME> ; 0,3,3,9,12,15,9,21,6,27,15,33,18,39,21,45,12,51,27,57,240,63,33,69,18,75,39,81,42,87,45,93,24,99,51,105,108,111,57,117,30,123,63,129,66,135,69,141,36,147,75,153,312,159 seq $0,168485 ; A165342(3n)/3. mul $0,3
models/amalgam/misc/need-compare-whole-tree.als
transclosure/Amalgam
4
4010
/* Provenance of why C$0 in C and why (C$0, B$0, D$0) in field are isomorphic. If the tool does not output a model that has `(C$0, B$0, D$0)`, then users wouldn't be able to discover the overconstraint, which is that `all x : B | some x.field` is unintended */ sig A {} sig B {} sig D {} one sig C { field: (A + B) -> D } { all x : A + B | some x.field } run {} for 1 run {} for 2 run {} for 3 run {} for 4 run {} for 5 run {} for 6 run {} for 7
sound/musicasm/LRZ1.asm
NatsumiFox/Sonic-3-93-Nov-03
7
163429
LRZ1_Header: sHeaderInit ; Z80 offset is $BC62 sHeaderPatch LRZ1_Patches sHeaderCh $06, $03 sHeaderTempo $01, $26 sHeaderDAC LRZ1_DAC sHeaderFM LRZ1_FM1, $0C, $1C sHeaderFM LRZ1_FM2, $0C, $18 sHeaderFM LRZ1_FM3, $0C, $0F sHeaderFM LRZ1_FM4, $0C, $0C sHeaderFM LRZ1_FM5, $0C, $0C sHeaderPSG LRZ1_PSG1, $F4, $05, $00, v0C sHeaderPSG LRZ1_PSG2, $F4, $05, $00, v0C sHeaderPSG LRZ1_PSG3, $F4, $01, $00, v0C dc.b $F2, $F2 ; Unused LRZ1_DAC: dc.b dKick, $0C, dElectricFloorTom, $02, nRst, $04, dElectricFloorTom, $06 dc.b dSnare, $22, nRst, $0E, dSnare, $0C, nRst, dKick dc.b dElectricFloorTom, $02, nRst, $04, dElectricFloorTom, $06, dSnare, $24 dc.b nRst, $0C, dSnare, $06, dElectricFloorTom, $04, nRst, $02 dc.b dMidpitchSnare, $0A, nRst, $02, dKick, $0C, dElectricFloorTom, $02 dc.b nRst, $04, dElectricFloorTom, $06, dSnare, $22, nRst, $0E dc.b dSnare, $0A, nRst, $0E, dKick, $0C, dElectricFloorTom, $02 dc.b nRst, $04, dElectricFloorTom, $06, dSnare, $1E, nRst, $12 dc.b dSnare, $06, dElectricFloorTom, $02, nRst, $04, dMidpitchSnare, $0A dc.b nRst, $02, dKick, $08, nRst, $04, dElectricFloorTom, $02 dc.b nRst, $04, dElectricFloorTom, $06, dSnare, $1C, nRst, $14 dc.b dSnare, $0C, nRst, dKick, $0A, nRst, $02, dElectricFloorTom dc.b nRst, $04, dElectricFloorTom, $06, dSnare, $1E, nRst, $12 dc.b dSnare, $06, dElectricFloorTom, $02, nRst, $04, dMidpitchSnare, $0A dc.b nRst, $02, dKick, $0A, nRst, $02, dElectricFloorTom, nRst dc.b $04, dElectricFloorTom, $06, dSnare, $20, nRst, $10, dSnare dc.b $0C, nRst, dKick, $0A, nRst, $02, dElectricFloorTom, nRst dc.b $04, dElectricFloorTom, $06, dSnare, $18, nRst, dSnare, $06 dc.b dElectricFloorTom, $02, nRst, $04, dMidpitchSnare, $0C, dKick, $0A dc.b nRst, $02, dElectricFloorTom, nRst, $04, dElectricFloorTom, $06, dSnare dc.b $20, nRst, $10, dSnare, $0A, nRst, $0E, dKick dc.b $0C, dElectricFloorTom, $02, nRst, $04, dElectricFloorTom, $06, dSnare dc.b $1C, nRst, $14, dSnare, $06, dElectricFloorTom, $02, nRst dc.b $04, dMidpitchSnare, $0C, dKick, $0A, nRst, $02, dElectricFloorTom dc.b nRst, $04, dElectricFloorTom, $06, dSnare, $1C, nRst, $14 dc.b dSnare, $0C, nRst, dKick, dElectricFloorTom, $02, nRst, $04 dc.b dElectricFloorTom, $06, dSnare, $18, nRst, dSnare, $06, dElectricFloorTom dc.b $02, nRst, $04, dMidpitchSnare, $0A, nRst, $02, dKick dc.b $06, dKick, dKick, dKick, dSnare, nRst, $1E, dElectricFloorTom dc.b $02, nRst, $04, dElectricFloorTom, $06, dSnare, $04, nRst dc.b $02, dKick, $06, dMidpitchSnare, $04, nRst, $08, dKick dc.b $06, dKick, dKick, dKick, dSnare, $04, nRst, $20 dc.b dElectricFloorTom, $02, nRst, $04, dElectricFloorTom, $06, dSnare, $04 dc.b nRst, $02, dKick, $06, dMidpitchSnare, nRst, dKick, $04 dc.b nRst, $08, dKick, $04, nRst, $02, dKick, $06 dc.b dSnare, $0A, nRst, $02, dKick, $08, nRst, $04 dc.b dKick, $06, dKick, $10, nRst, $02, dSnare, $0C dc.b dKick, $04, nRst, $02, dKick, $10, nRst, $02 dc.b dKick, $08, nRst, $04, dSnare, nRst, $02, dKick dc.b $10, nRst, $02, dKick, $0E, nRst, $04, dSnare dc.b nRst, $02, dSnare, $04, nRst, $02, dSnare, $06 dc.b dSnare, $04, nRst, $08, dKick, $06, nRst, dKick dc.b $04, nRst, $02, dKick, $06, dSnare, $02, nRst dc.b $0A, dKick, $04, nRst, $02, dKick, $10, nRst dc.b $02, dElectricFloorTom, nRst, $04, dElectricFloorTom, $06, dSnare, $04 dc.b nRst, $02, dKick, nRst, $04, dMidpitchSnare, $06, nRst dc.b dKick, $02, nRst, $0A, dKick, $04, nRst, $02 dc.b dSnare, $06, dKick, dKick, $04, nRst, $02, dSnare dc.b nRst, $16, dKick, $06, dKick, $04, nRst, $02 dc.b dSnare, nRst, $04, dElectricFloorTom, $02, nRst, $04, dMidpitchSnare dc.b nRst, $08, dKick, $02, nRst, $0A, dKick, $04 dc.b nRst, $02, dKick, $06, dSnare, $02, nRst, $0A dc.b dKick, $04, nRst, $02, dKick, $12, dKick, $06 dc.b dKick, dSnare, $02, nRst, $04, dElectricFloorTom, $02, nRst dc.b $04, dMidpitchSnare, nRst, $08, dKick, $04, nRst, $08 dc.b dKick, $02, nRst, $04, dSnare, $06, dKick, $02 dc.b nRst, $04, dKick, nRst, $02, dSnare, nRst, $16 dc.b dKick, $04, nRst, $02, dKick, $04, nRst, $02 dc.b dSnare, $04, nRst, $02, dSnare, $06, dSnare, $02 dc.b nRst, $04, dSnare, $06 sJump LRZ1_DAC dc.b $F2, $F2 ; Unused LRZ1_FM1: sPatFM $06 ssDetune $01 ssModZ80 $0A, $01, $03, $06 dc.b nA2, $0A, nRst, $02, nC3, $04, nRst, $02 dc.b nA2, $0A, nRst, $02, nB2, $0A, nRst, $02 dc.b nG2, $0C, nA2, $0A, nRst, $02, nG2, $06 dc.b nF2, $08, nRst, $04, nE2, $04, nRst, $08 dc.b nA2, $0C, nC3, $04, nRst, $02, nA2, $0C dc.b nB2, $0A, nRst, $02, nG2, $0A, nRst, $02 dc.b nA2, $0A, nRst, $02, nD2, $06, nG2, $0C dc.b nE2, $04, nRst, $08, nA2, $0A, nRst, $02 dc.b nC3, $04, nRst, $02, nA2, $0C, nB2, $0A dc.b nRst, $02, nG2, $0A, nRst, $02, nA2, $0A dc.b nRst, $02, nG2, $06, nF2, $0C, nE2, $04 dc.b nRst, $08, nA2, $0C, nC3, $04, nRst, $02 dc.b nA2, $0C, nB2, $0A, nRst, $02, nG2, $0A dc.b nRst, $02, nA2, $0A, nRst, $02, nD2, $06 dc.b nG2, $0C, nE2, $04, nRst, $08, nA2, $0A dc.b nRst, $02, nC3, $04, nRst, $02, nA2, $0A dc.b nRst, $02, nB2, $0A, nRst, $02, nG2, $0C dc.b nA2, $0A, nRst, $02, nG2, $06, nF2, $08 dc.b nRst, $04, nE2, $04, nRst, $08, nA2, $0C dc.b nC3, $04, nRst, $02, nA2, $0C, nB2, $0A dc.b nRst, $02, nG2, $0A, nRst, $02, nA2, $0A dc.b nRst, $02, nD2, $06, nG2, $0C, nE2, $04 dc.b nRst, $08, nA2, $0A, nRst, $02, nC3, $04 dc.b nRst, $02, nA2, $0C, nB2, $0A, nRst, $02 dc.b nG2, $0A, nRst, $02, nA2, $0A, nRst, $02 dc.b nG2, $06, nF2, $0C, nE2, $04, nRst, $08 dc.b nA2, $0C, nC3, $04, nRst, $02, nA2, $0C dc.b nB2, $0A, nRst, $02, nG2, $0A, nRst, $02 dc.b nA2, $0A, nRst, $02, nD2, $06, nG2, $0C dc.b nE2, $04, nRst, $08, nA2, $0A, nRst, $02 dc.b nC3, $04, nRst, $02, nA2, $0A, nRst, $02 dc.b nB2, $0A, nRst, $02, nG2, $0C, nA2, $0A dc.b nRst, $02, nG2, $06, nF2, $08, nRst, $04 dc.b nE2, $04, nRst, $08, nA2, $0C, nC3, $04 dc.b nRst, $02, nA2, $0C, nB2, $0A, nRst, $02 dc.b nG2, $0A, nRst, $02, nA2, $0A, nRst, $02 dc.b nD2, $06, nG2, $0C, nE2, $04, nRst, $08 dc.b nA2, $0A, nRst, $02, nC3, $04, nRst, $02 dc.b nA2, $0C, nB2, $0A, nRst, $02, nG2, $0A dc.b nRst, $02, nA2, $0A, nRst, $02, nG2, $06 dc.b nF2, $0C, nE2, $04, nRst, $08, nA2, $0C dc.b nC3, $04, nRst, $02, nA2, $0C, nB2, $0A dc.b nRst, $02, nG2, $0A, nRst, $02, nA2, $0A dc.b nRst, $02, nD2, $06, nG2, $0C, nE2, $04 dc.b nRst, $08 sPatFM $06 ssDetune $03 ssModZ80 $00, $01, $03, $06 dc.b nF3, $04, nRst, $02, nF3, $04, nRst, $02 dc.b nF3, $04, nRst, $02, nF3, $04, nRst, $1A dc.b nA3, $02, nB3, $02, nC4, $0E, nC4, $12 dc.b nE4, $06, nRst, $06, nG3, $04, nRst, $02 dc.b nG3, $04, nRst, $02, nG3, $04, nRst, $02 dc.b nG3, $04, nRst, $1C, nG3, $14, nRst, $02 dc.b nD4, $10, nRst, $14, nA3, $0C, nG3, $06 dc.b nRst, $06, nA3, $04, nRst, $08, nC4, $10 dc.b nRst, $02, nB3, $04, nRst, $0C, nA3, $06 dc.b nRst, $08, nB3, $10, nRst, $02, nC4, $04 dc.b nRst, $0E, nD4, $04, nRst, $08, nE4, $16 dc.b nRst, $02, nB3, $16, nRst, $02 sPatFM $0C ssDetune $03 ssModZ80 $00, $01, $03, $06 saVolFM $F6 dc.b nE3, $0C, nA2, $04, nRst, $02, nE3, $04 dc.b nRst, $0E, nA2, $24, nC3, $16, nRst, $02 dc.b nB2, $06, nRst, $06, nB2, $04, nRst, $02 dc.b nD3, $06, nRst, $0C, nC3, $36, nRst, $06 dc.b nE3, $0C, nA2, $04, nRst, $02, nE3, $04 dc.b nRst, $0E, nA2, $24, nC3, $16, nRst, $02 dc.b nB2, $06, nRst, $06, nB2, $04, nRst, $02 dc.b nD3, $06, nRst, $06, nB2, $04, nRst, $02 dc.b nC3, $3C saVolFM $0A sJump LRZ1_FM1 dc.b $F2 ; Unused LRZ1_FM2: sPatFM $0B ssDetune $FF ssModZ80 $0A, $01, $03, $06 dc.b nA3, $0A, nRst, $02, nC4, $04, nRst, $02 dc.b nA3, $0A, nRst, $02, nB3, $0A, nRst, $02 dc.b nG3, $0C, nA3, $0A, nRst, $02, nG3, $06 dc.b nF3, $08, nRst, $04, nE3, $04, nRst, $08 dc.b nA3, $0C, nC4, $04, nRst, $02, nA3, $0C dc.b nB3, $0A, nRst, $02, nG3, $0A, nRst, $02 dc.b nA3, $0A, nRst, $02, nD3, $06, nG3, $0C dc.b nE3, $04, nRst, $08, nA3, $0A, nRst, $02 dc.b nC4, $04, nRst, $02, nA3, $0C, nB3, $0A dc.b nRst, $02, nG3, $0A, nRst, $02, nA3, $0A dc.b nRst, $02, nG3, $08, nRst, $0A, nE3, $04 dc.b nRst, $08, nA3, $0C, nC4, $04, nRst, $02 dc.b nA3, $0C, nB3, $0A, nRst, $02, nG3, $0A dc.b nRst, $02, nA3, $0A, nRst, $02, nD3, $06 dc.b nG3, $0C, nE3, $04, nRst, $08, nA3, $0A dc.b nRst, $02, nC4, $06, nA3, $0C, nB3, $0C dc.b nG3, $0C, nA3, $0A, nRst, $02, nG3, $08 dc.b nRst, $0A, nE3, $04, nRst, $08, nA3, $0A dc.b nRst, $02, nC4, $06, nA3, $0C, nB3, $0A dc.b nRst, $02, nG3, $0C, nA3, $0A, nRst, $02 dc.b nD3, $04, nRst, $02, nG3, $0C, nE3, $04 dc.b nRst, $08, nA3, $0A, nRst, $02, nC4, $06 dc.b nA3, $0C, nB3, $0A, nRst, $02, nG3, $0C dc.b nA3, $0A, nRst, $02, nG3, $08, nRst, $0A dc.b nE3, $04, nRst, $08, nA3, $0A, nRst, $02 dc.b nC4, $06, nA3, $0A, nRst, $02, nB3, $0A dc.b nRst, $02, nG3, $0C, nA3, $0A, nRst, $02 dc.b nD3, $06, nG3, $0C, nE3, $04, nRst, $08 dc.b nA3, $0C, nC4, $06, nA3, $0C, nB3, $0C dc.b nG3, $0C, nA3, $0A, nRst, $02, nG3, $08 dc.b nRst, $0A, nE3, $04, nRst, $08, nA3, $0C dc.b nC4, $06, nA3, $0C, nB3, $0A, nRst, $02 dc.b nG3, $0C, nA3, $08, nRst, $04, nD3, $06 dc.b nG3, $0C, nE3, $04, nRst, $08, nA3, $0C dc.b nC4, $06, nA3, $0C, nB3, $0C, nG3, $0C dc.b nA3, $0A, nRst, $02, nG3, $08, nRst, $0A dc.b nE3, $04, nRst, $08, nA3, $0A, nRst, $02 dc.b nC4, $06, nA3, $0C, nB3, $0A, nRst, $02 dc.b nG3, $0C, nA3, $0A, nRst, $02, nD3, $06 dc.b nG3, $0E, nRst, $0A sPatFM $06 ssDetune $FD ssModZ80 $00, $01, $03, $06 dc.b nC4, $04, nRst, $02, nC4, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nC4, $04, nRst, $1A dc.b nF4, $02, nG4, $02, nA4, $0E, nA4, $12 dc.b nC5, $06, nB4, $02, nA4, $02, nG4, $02 dc.b nD4, $04, nRst, $02, nD4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nD4, $04, nRst, $1A dc.b nEb4, $02, nE4, $14, nRst, $02, nB4, $10 dc.b nB4, $02, nA4, $02, nG4, $02, nF4, $02 dc.b nRst, $0C, nC4, $0C, nC4, $06, nRst, $06 dc.b nC4, $04, nRst, $08, nE4, $10, nRst, $02 dc.b nE4, $04, nRst, $0C, nE4, $06, nRst, $08 dc.b nF4, $10, nRst, $02, nF4, $04, nRst, $0E dc.b nF4, $04, nRst, $08, nG4, $16, nRst, $02 dc.b nD4, $16, nRst, $02 sPatFM $0C ssDetune $FD ssModZ80 $00, $01, $03, $06 saVolFM $F6 dc.b nC4, $0C, nF3, $04, nRst, $02, nC4, $04 dc.b nRst, $0E, nF3, $24, nA3, $16, nRst, $02 dc.b nG3, $06, nRst, $06, nG3, $04, nRst, $02 dc.b nB3, $06, nRst, $0C, nA3, $36, nRst, $06 dc.b nC4, $0C, nF3, $04, nRst, $02, nC4, $04 dc.b nRst, $0E, nF3, $24, nA3, $16, nRst, $02 dc.b nG3, $06, nRst, $06, nG3, $04, nRst, $02 dc.b nB3, $06, nRst, $06, nG3, $04, nRst, $02 dc.b nA3, $3C saVolFM $0A sJump LRZ1_FM2 dc.b $F2 ; Unused LRZ1_FM3: sPatFM $15 ssDetune $00 ssModZ80 $0F, $01, $03, $06 LRZ1_Jump1: dc.b nA1, $04, nRst, $08, nG1, $02, nRst, $04 dc.b nA1, $44, nRst, $0A, nF1, $04, nRst, $08 dc.b nF1, $02, nRst, $04, nF1, $04, nRst, $08 dc.b nF1, $04, nRst, $08, nG1, $2E, nRst, $08 dc.b nA1, $04, nRst, $08, nG1, $02, nRst, $04 dc.b nA1, $42, nRst, $0C, nF1, $04, nRst, $08 dc.b nF1, $02, nRst, $04, nF1, $04, nRst, $08 dc.b nF1, $04, nRst, $08, nG1, $2E, nRst, $08 dc.b nA1, $04, nRst, $08, nG1, $02, nRst, $04 dc.b nA1, $44, nRst, $0A, nF1, $04, nRst, $08 dc.b nF1, $02, nRst, $04, nF1, $04, nRst, $08 dc.b nF1, $04, nRst, $08, nG1, $2A, nRst, $0C dc.b nA1, $04, nRst, $08, nG1, $02, nRst, $04 dc.b nA1, $42, nRst, $0C, nF1, $04, nRst, $08 dc.b nF1, $02, nRst, $04, nF1, $04, nRst, $08 dc.b nF1, $04, nRst, $08, nG1, $2C, nRst, $0A dc.b nA1, $04, nRst, $08, nG1, $04, nRst, $02 dc.b nA1, $46, nRst, $08, nF1, $04, nRst, $08 dc.b nF1, $02, nRst, $04, nF1, $04, nRst, $08 dc.b nF1, $04, nRst, $08, nG1, $2E, nRst, $08 dc.b nA1, $04, nRst, $08, nG1, $04, nRst, $02 dc.b nA1, $44, nRst, $0A, nF1, $04, nRst, $08 dc.b nF1, $02, nRst, $04, nF1, $04, nRst, $08 dc.b nF1, $04, nRst, $08, nG1, $2C, nRst, $0A dc.b nF1, $04, nRst, $02, nF1, $04, nRst, $02 dc.b nF1, $04, nRst, $02, nF1, $06, nF1, $02 dc.b nRst, $46, nG1, $04, nRst, $02, nG1, $04 dc.b nRst, $02, nG1, $04, nRst, $02, nG1, $04 dc.b nRst, $02, nG1, $04, nRst, $14, nC2, $10 dc.b nRst, $08, nG1, $0E, nRst, $0A, nA1, $04 dc.b nRst, $08, nG1, $02, nRst, $04, nA1, $08 dc.b nRst, $0A, nC2, $04, nRst, $08, nB1, $02 dc.b nRst, $04, nC2, $08, nRst, $0A, nD2, $04 dc.b nRst, $08, nC2, $02, nRst, $04, nD2, $08 dc.b nRst, $0A, nE2, $04, nRst, $08, nD2, $02 dc.b nRst, $04, nE2, $08, nRst, $0A, nG2, $16 dc.b nRst, $02, nG1, $16, nRst, $02, nA1, $02 dc.b nRst, $0A, nA1, $04, nRst, $02, nA1, $08 dc.b nRst, $0A, nC2, $04, nRst, $08, nC2, $06 dc.b nC2, $04, nRst, $0E, nD2, $04, nRst, $02 dc.b nC2, $06, nA1, $02, nRst, $0A, nG1, $06 dc.b nRst, $0C, nG1, $06, nRst, $0C, nA1, $24 dc.b nRst, $18, nA1, $04, nRst, $08, nA1, $04 dc.b nRst, $02, nA1, $06, nRst, $0C, nC2, $06 dc.b nRst, $06, nC2, $04, nRst, $02, nC2, $04 dc.b nRst, $0E, nD2, $02, nRst, $04, nC2, $06 dc.b nA1, $04, nRst, $08, nG1, $06, nRst, $0C dc.b nG1, $06, nRst, $0C, nA1, $36, nRst, $06 sJump LRZ1_Jump1 dc.b $F2 ; Unused LRZ1_FM4: sPan spLeft sPatFM $0C ssDetune $FE ssModZ80 $0F, $01, $06, $06 LRZ1_Jump2: dc.b nRst, $60, nRst, $60, nRst, $60, nRst, $54 dc.b nD4, $06, nEb4, $06, nE4, $12, nG4, $04 dc.b nRst, $0E, nC4, $22, nRst, $02, nE4, $04 dc.b nRst, $08, nA3, $10, nRst, $02, nC4, $04 dc.b nRst, $02, nE4, $48, nD4, $06, nEb4, $06 dc.b nE4, $12, nG4, $04, nRst, $0E, nC4, $20 dc.b nRst, $04, nE4, $04, nRst, $08, nD4, $12 dc.b nC4, $06, nA3, $48 sPatFM $0C ssDetune $FE ssModZ80 $0F, $01, $06, $06 dc.b nD4, $06, nEb4, $06, nE4, $12, nG4, $04 dc.b nRst, $0E, nC4, $22, nRst, $02, nE4, $04 dc.b nRst, $08, nA3, $12, nC4, $06, nE4, $48 dc.b nD4, $06, nEb4, $06, nE4, $10, nRst, $02 dc.b nG4, $04, nRst, $0E, nC4, $24, nE4, $04 dc.b nRst, $08, nD4, $12, nC4, $06, nA3, $48 dc.b nE4, $06, nF4, $06, nG4, $24, nC4, $36 dc.b nRst, $06, nG4, $18, nA4, $04, nRst, $08 dc.b nG4, $38, nRst, $10, nA4, $0C, nG4, $06 dc.b nRst, $06, nA4, $04, nRst, $08, nC5, $10 dc.b nRst, $02, nB4, $04, nRst, $0C, nA4, $06 dc.b nRst, $08, nB4, $10, nRst, $02, nC5, $04 dc.b nRst, $0E, nD5, $04, nRst, $08, nC5, $16 dc.b nRst, $02, nB4, $16, nRst, $02 sPatFM $0C ssDetune $FE ssModZ80 $0F, $01, $06, $06 dc.b nE5, $0C, nA4, $06, nE5, $04, nRst, $0E dc.b nA4, $22, nRst, $02, nC5, $14, nRst, $04 dc.b nB4, $06, nRst, $06, nB4, $04, nRst, $02 dc.b nD5, $06, nRst, $06, nB4, $04, nRst, $02 dc.b nC5, $32, nRst, $0A, nE5, $0C, nA4, $04 dc.b nRst, $02, nE5, $06, nRst, $0C, nA4, $22 dc.b nRst, $02, nC5, $14, nRst, $04, nB4, $06 dc.b nRst, $06, nB4, $04, nRst, $02, nD5, $06 dc.b nRst, $06, nB4, $04, nRst, $02, nC5, $26 dc.b nRst, $16 sJump LRZ1_Jump2 dc.b $F2 ; Unused LRZ1_FM5: dc.b nRst, $02 sPatFM $0C ssDetune $02 ssModZ80 $0F, $01, $06, $06 sPan spRight LRZ1_Jump3: dc.b nRst, $60, nRst, $60, nRst, $60, nRst, $54 dc.b nD4, $06, nEb4, $06, nE4, $12, nG4, $04 dc.b nRst, $0E, nC4, $22, nRst, $02, nE4, $04 dc.b nRst, $08, nA3, $10, nRst, $02, nC4, $04 dc.b nRst, $02, nE4, $48, nD4, $06, nEb4, $06 dc.b nE4, $12, nG4, $04, nRst, $0E, nC4, $20 dc.b nRst, $04, nE4, $04, nRst, $08, nD4, $12 dc.b nC4, $06, nA3, $48 sPatFM $0C ssDetune $02 ssModZ80 $0F, $01, $06, $06 sPan spRight dc.b nD4, $06, nEb4, $06, nE4, $12, nG4, $04 dc.b nRst, $0E, nC4, $22, nRst, $02, nE4, $04 dc.b nRst, $08, nA3, $12, nC4, $06, nE4, $48 dc.b nD4, $06, nEb4, $06, nE4, $10, nRst, $02 dc.b nG4, $04, nRst, $0E, nC4, $24, nE4, $04 dc.b nRst, $08, nD4, $12, nC4, $06, nA3, $48 dc.b nE4, $06, nF4, $06, nG4, $24, nC4, $36 dc.b nRst, $06, nG4, $18, nA4, $04, nRst, $08 dc.b nG4, $38, nRst, $10, nA4, $0C, nG4, $06 dc.b nRst, $06, nA4, $04, nRst, $08, nC5, $10 dc.b nRst, $02, nB4, $04, nRst, $0C, nA4, $06 dc.b nRst, $08, nB4, $10, nRst, $02, nC5, $04 dc.b nRst, $0E, nD5, $04, nRst, $08, nC5, $16 dc.b nRst, $02, nB4, $16, nRst, $02 sPatFM $0C ssDetune $02 ssModZ80 $0F, $01, $06, $06 sPan spRight dc.b nE5, $0C, nA4, $06, nE5, $04, nRst, $0E dc.b nA4, $22, nRst, $02, nC5, $14, nRst, $04 dc.b nB4, $06, nRst, $06, nB4, $04, nRst, $02 dc.b nD5, $06, nRst, $06, nB4, $04, nRst, $02 dc.b nC5, $32, nRst, $0A, nE5, $0C, nA4, $04 dc.b nRst, $02, nE5, $06, nRst, $0C, nA4, $22 dc.b nRst, $02, nC5, $14, nRst, $04, nB4, $06 dc.b nRst, $06, nB4, $04, nRst, $02, nD5, $06 dc.b nRst, $06, nB4, $04, nRst, $02, nC5, $26 dc.b nRst, $16 sJump LRZ1_Jump3 dc.b $F2 ; Unused LRZ1_PSG1: dc.b nRst, $01 sVolEnvPSG v04 ssDetune $FF LRZ1_Jump4: dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nF3, $04, nRst, $08, nF3, $04, nRst, $08 dc.b nF3, $0A, nRst, $02, nC3, $04, nRst, $02 dc.b nF3, $04, nRst, $08, nF3, $0A, nRst, $02 dc.b nC3, $04, nRst, $02, nF3, $0C, nC3, $06 dc.b nRst, $06, nG3, $06, nRst, $06, nG3, $04 dc.b nRst, $08, nG3, $0A, nRst, $02, nD3, $04 dc.b nRst, $02, nG3, $06, nRst, $06, nG3, $0A dc.b nRst, $02, nD3, $04, nRst, $02, nG3, $0C dc.b nD3, $08, nRst, $04, nD3, $04, nRst, $02 dc.b nF3, $04, nRst, $02, nA3, $04, nRst, $02 dc.b nG3, $04, nRst, $02, nF3, $04, nRst, $02 dc.b nE3, $04, nRst, $02, nG3, $04, nRst, $02 dc.b nB3, $04, nRst, $02, nD4, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nB3, $04, nRst, $02 dc.b nA3, $04, nRst, $02, nA3, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nC4, $04, nRst, $02 dc.b nB3, $04, nRst, $02, nB3, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nF4, $04, nRst, $02 dc.b nE4, $04, nRst, $02, nD4, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nG4, $04, nRst, $02 dc.b nF4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nC4, $04, nRst, $02 dc.b nG3, $06, nA3, $04, nRst, $02, nA3, $04 dc.b nRst, $02, nA3, $04, nRst, $02, nA3, $04 dc.b nRst, $0E, nC4, $04, nRst, $02, nC4, $04 dc.b nRst, $02, nC4, $04, nRst, $02, nC4, $04 dc.b nRst, $0E, nD4, $04, nRst, $02, nD4, $04 dc.b nRst, $02, nC4, $04, nRst, $08, nB3, $04 dc.b nRst, $08, nB3, $04, nRst, $02, nB3, $04 dc.b nRst, $08, nB3, $04, nRst, $02, nC4, $04 dc.b nRst, $14, nC4, $04, nRst, $02, nC4, $04 dc.b nRst, $02, nC4, $04, nRst, $02, nC4, $04 dc.b nRst, $02, nB3, $04, nRst, $08, nA3, $04 dc.b nRst, $02, nA3, $04, nRst, $02, nA3, $04 dc.b nRst, $02, nA3, $04, nRst, $02, nA3, $04 dc.b nRst, $08, nC4, $04, nRst, $02, nC4, $04 dc.b nRst, $02, nC4, $04, nRst, $02, nC4, $04 dc.b nRst, $0E, nD4, $04, nRst, $02, nC4, $04 dc.b nRst, $02, nB3, $04, nRst, $08, nG3, $04 dc.b nRst, $0E, nG3, $04, nRst, $0E, nA3, $26 dc.b nRst, $16 sJump LRZ1_Jump4 dc.b $F2 ; Unused LRZ1_PSG2: sVolEnvPSG v04 LRZ1_Jump5: dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nA3, $06, nA4, $06, nRst, $06, nA3, $06 dc.b nA4, $06, nRst, $06, nA3, $06, nA4, $06 dc.b nRst, $06, nA3, $06, nA4, $06, nRst, $06 dc.b nA3, $06, nRst, $06, nA4, $06, nRst, $06 dc.b nF3, $06, nF4, $06, nRst, $06, nF3, $06 dc.b nF4, $06, nRst, $06, nF3, $06, nG3, $06 dc.b nRst, $06, nG4, $06, nG3, $06, nRst, $06 dc.b nG4, $06, nRst, $06, nG3, $06, nRst, $06 dc.b nF3, $04, nRst, $08, nF3, $04, nRst, $08 dc.b nF3, $0A, nRst, $02, nC3, $04, nRst, $02 dc.b nF3, $04, nRst, $08, nF3, $0A, nRst, $02 dc.b nC3, $04, nRst, $02, nF3, $0C, nC3, $06 dc.b nRst, $06, nG3, $06, nRst, $06, nG3, $04 dc.b nRst, $08, nG3, $0A, nRst, $02, nD3, $04 dc.b nRst, $02, nG3, $06, nRst, $06, nG3, $0A dc.b nRst, $02, nD3, $04, nRst, $02, nG3, $0C dc.b nD3, $08, nRst, $04, nD3, $04, nRst, $02 dc.b nF3, $04, nRst, $02, nA3, $04, nRst, $02 dc.b nG3, $04, nRst, $02, nF3, $04, nRst, $02 dc.b nE3, $04, nRst, $02, nG3, $04, nRst, $02 dc.b nB3, $04, nRst, $02, nD4, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nB3, $04, nRst, $02 dc.b nA3, $04, nRst, $02, nA3, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nC4, $04, nRst, $02 dc.b nB3, $04, nRst, $02, nB3, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nF4, $04, nRst, $02 dc.b nE4, $04, nRst, $02, nD4, $04, nRst, $02 dc.b nC4, $04, nRst, $02, nG4, $04, nRst, $02 dc.b nF4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nD4, $04, nRst, $02, nC4, $04, nRst, $02 dc.b nG3, $06, nC4, $04, nRst, $08, nC4, $04 dc.b nRst, $02, nC5, $04, nRst, $08, nC4, $04 dc.b nRst, $02, nE4, $04, nRst, $02, nE5, $04 dc.b nRst, $08, nE4, $04, nRst, $02, nE4, $04 dc.b nRst, $02, nE5, $04, nRst, $02, nD5, $04 dc.b nRst, $02, nD5, $06, nC5, $02, nRst, $0A dc.b nB3, $04, nRst, $08, nB3, $04, nRst, $02 dc.b nB4, $04, nRst, $08, nB3, $04, nRst, $02 dc.b nE4, $04, nRst, $02, nE5, $04, nRst, $08 dc.b nE4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nE4, $04, nRst, $1A, nC4, $04, nRst, $08 dc.b nC4, $04, nRst, $02, nC5, $04, nRst, $08 dc.b nC4, $04, nRst, $02, nE4, $04, nRst, $02 dc.b nE5, $04, nRst, $08, nE4, $04, nRst, $02 dc.b nE4, $04, nRst, $02, nE5, $04, nRst, $02 dc.b nD5, $04, nRst, $02, nC5, $06, nA4, $02 dc.b nRst, $0A, nB3, $04, nRst, $08, nB3, $04 dc.b nRst, $02, nB4, $04, nRst, $08, nB3, $04 dc.b nRst, $02, nE4, $04, nRst, $02, nE5, $04 dc.b nRst, $08, nE4, $04, nRst, $02, nE4, $04 dc.b nRst, $02, nE4, $04, nRst, $1A sJump LRZ1_Jump5 dc.b $F2 ; Unused LRZ1_PSG3: sVolEnvPSG v02 sNoisePSG $E7 LRZ1_Jump6: dc.b nRst, $0C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $3C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $18 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $3C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $18 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $3C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $18 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $3C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $18 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $3C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $18 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $3C sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $48 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $12 sVolEnvPSG v08 dc.b nBb6, $48 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $12 sVolEnvPSG v08 dc.b nBb6, $60, $60, $48 sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v01 dc.b nBb6, $12 sVolEnvPSG v08 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $5A sVolEnvPSG v01 dc.b nBb6, $06 sVolEnvPSG v08 dc.b nBb6, $60, $0C sJump LRZ1_Jump6 dc.b $F2 ; Unused LRZ1_Patches: ; Patch $00 ; $3C ; $01, $00, $00, $00, $1F, $1F, $15, $1F ; $11, $0D, $12, $05, $07, $04, $09, $02 ; $55, $3A, $25, $1A, $1A, $80, $07, $80 spAlgorithm $04 spFeedback $07 spDetune $00, $00, $00, $00 spMultiple $01, $00, $00, $00 spRateScale $00, $00, $00, $00 spAttackRt $1F, $15, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $11, $12, $0D, $05 spSustainLv $05, $02, $03, $01 spDecayRt $07, $09, $04, $02 spReleaseRt $05, $05, $0A, $0A spTotalLv $1A, $07, $00, $00 ; Patch $01 ; $3D ; $01, $01, $01, $01, $94, $19, $19, $19 ; $0F, $0D, $0D, $0D, $07, $04, $04, $04 ; $25, $1A, $1A, $1A, $15, $80, $80, $80 spAlgorithm $05 spFeedback $07 spDetune $00, $00, $00, $00 spMultiple $01, $01, $01, $01 spRateScale $02, $00, $00, $00 spAttackRt $14, $19, $19, $19 spAmpMod $00, $00, $00, $00 spSustainRt $0F, $0D, $0D, $0D spSustainLv $02, $01, $01, $01 spDecayRt $07, $04, $04, $04 spReleaseRt $05, $0A, $0A, $0A spTotalLv $15, $00, $00, $00 ; Patch $02 ; $03 ; $00, $D7, $33, $02, $5F, $9F, $5F, $1F ; $13, $0F, $0A, $0A, $10, $0F, $02, $09 ; $35, $15, $25, $1A, $13, $16, $15, $80 spAlgorithm $03 spFeedback $00 spDetune $00, $03, $0D, $00 spMultiple $00, $03, $07, $02 spRateScale $01, $01, $02, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $13, $0A, $0F, $0A spSustainLv $03, $02, $01, $01 spDecayRt $10, $02, $0F, $09 spReleaseRt $05, $05, $05, $0A spTotalLv $13, $15, $16, $00 ; Patch $03 ; $34 ; $70, $72, $31, $31, $1F, $1F, $1F, $1F ; $10, $06, $06, $06, $01, $06, $06, $06 ; $35, $1A, $15, $1A, $10, $80, $18, $80 spAlgorithm $04 spFeedback $06 spDetune $07, $03, $07, $03 spMultiple $00, $01, $02, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $10, $06, $06, $06 spSustainLv $03, $01, $01, $01 spDecayRt $01, $06, $06, $06 spReleaseRt $05, $05, $0A, $0A spTotalLv $10, $18, $00, $00 ; Patch $04 ; $3E ; $77, $71, $32, $31, $1F, $1F, $1F, $1F ; $0D, $06, $00, $00, $08, $06, $00, $00 ; $15, $0A, $0A, $0A, $1B, $80, $80, $80 spAlgorithm $06 spFeedback $07 spDetune $07, $03, $07, $03 spMultiple $07, $02, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $0D, $00, $06, $00 spSustainLv $01, $00, $00, $00 spDecayRt $08, $00, $06, $00 spReleaseRt $05, $0A, $0A, $0A spTotalLv $1B, $00, $00, $00 ; Patch $05 ; $34 ; $33, $41, $7E, $74, $5B, $9F, $5F, $1F ; $04, $07, $07, $08, $00, $00, $00, $00 ; $FF, $FF, $EF, $FF, $23, $80, $29, $87 spAlgorithm $04 spFeedback $06 spDetune $03, $07, $04, $07 spMultiple $03, $0E, $01, $04 spRateScale $01, $01, $02, $00 spAttackRt $1B, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $04, $07, $07, $08 spSustainLv $0F, $0E, $0F, $0F spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $23, $29, $00, $07 ; Patch $06 ; $3A ; $01, $07, $01, $01, $8E, $8E, $8D, $53 ; $0E, $0E, $0E, $03, $00, $00, $00, $07 ; $1F, $FF, $1F, $0F, $18, $28, $27, $80 spAlgorithm $02 spFeedback $07 spDetune $00, $00, $00, $00 spMultiple $01, $01, $07, $01 spRateScale $02, $02, $02, $01 spAttackRt $0E, $0D, $0E, $13 spAmpMod $00, $00, $00, $00 spSustainRt $0E, $0E, $0E, $03 spSustainLv $01, $01, $0F, $00 spDecayRt $00, $00, $00, $07 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $18, $27, $28, $00 ; Patch $07 ; $3C ; $32, $32, $71, $42, $1F, $18, $1F, $1E ; $07, $1F, $07, $1F, $00, $00, $00, $00 ; $1F, $0F, $1F, $0F, $1E, $80, $0C, $80 spAlgorithm $04 spFeedback $07 spDetune $03, $07, $03, $04 spMultiple $02, $01, $02, $02 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $18, $1E spAmpMod $00, $00, $00, $00 spSustainRt $07, $07, $1F, $1F spSustainLv $01, $01, $00, $00 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1E, $0C, $00, $00 ; Patch $08 ; $3C ; $71, $72, $3F, $34, $8D, $52, $9F, $1F ; $09, $00, $00, $0D, $00, $00, $00, $00 ; $23, $08, $02, $F7, $15, $80, $1D, $87 spAlgorithm $04 spFeedback $07 spDetune $07, $03, $07, $03 spMultiple $01, $0F, $02, $04 spRateScale $02, $02, $01, $00 spAttackRt $0D, $1F, $12, $1F spAmpMod $00, $00, $00, $00 spSustainRt $09, $00, $00, $0D spSustainLv $02, $00, $00, $0F spDecayRt $00, $00, $00, $00 spReleaseRt $03, $02, $08, $07 spTotalLv $15, $1D, $00, $07 ; Patch $09 ; $3D ; $01, $01, $00, $00, $8E, $52, $14, $4C ; $08, $08, $0E, $03, $00, $00, $00, $00 ; $1F, $1F, $1F, $1F, $1B, $80, $80, $9B spAlgorithm $05 spFeedback $07 spDetune $00, $00, $00, $00 spMultiple $01, $00, $01, $00 spRateScale $02, $00, $01, $01 spAttackRt $0E, $14, $12, $0C spAmpMod $00, $00, $00, $00 spSustainRt $08, $0E, $08, $03 spSustainLv $01, $01, $01, $01 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1B, $00, $00, $1B ; Patch $0A ; $3A ; $31, $53, $31, $41, $8D, $4F, $15, $52 ; $06, $08, $07, $04, $02, $00, $00, $00 ; $1F, $1F, $2F, $2F, $19, $20, $2A, $80 spAlgorithm $02 spFeedback $07 spDetune $03, $03, $05, $04 spMultiple $01, $01, $03, $01 spRateScale $02, $00, $01, $01 spAttackRt $0D, $15, $0F, $12 spAmpMod $00, $00, $00, $00 spSustainRt $06, $07, $08, $04 spSustainLv $01, $02, $01, $02 spDecayRt $02, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $19, $2A, $20, $00 ; Patch $0B ; $3C ; $36, $31, $76, $71, $94, $9F, $96, $9F ; $12, $00, $14, $0F, $04, $0A, $04, $0D ; $2F, $0F, $4F, $2F, $33, $80, $1A, $80 spAlgorithm $04 spFeedback $07 spDetune $03, $07, $03, $07 spMultiple $06, $06, $01, $01 spRateScale $02, $02, $02, $02 spAttackRt $14, $16, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $12, $14, $00, $0F spSustainLv $02, $04, $00, $02 spDecayRt $04, $04, $0A, $0D spReleaseRt $0F, $0F, $0F, $0F spTotalLv $33, $1A, $00, $00 ; Patch $0C ; $34 ; $33, $41, $7E, $74, $5B, $9F, $5F, $1F ; $04, $07, $07, $08, $00, $00, $00, $00 ; $FF, $FF, $EF, $FF, $23, $90, $29, $97 spAlgorithm $04 spFeedback $06 spDetune $03, $07, $04, $07 spMultiple $03, $0E, $01, $04 spRateScale $01, $01, $02, $00 spAttackRt $1B, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $04, $07, $07, $08 spSustainLv $0F, $0E, $0F, $0F spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $23, $29, $10, $17 ; Patch $0D ; $38 ; $63, $31, $31, $31, $10, $13, $1A, $1B ; $0E, $00, $00, $00, $00, $00, $00, $00 ; $3F, $0F, $0F, $0F, $1A, $19, $1A, $80 spAlgorithm $00 spFeedback $07 spDetune $06, $03, $03, $03 spMultiple $03, $01, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $10, $1A, $13, $1B spAmpMod $00, $00, $00, $00 spSustainRt $0E, $00, $00, $00 spSustainLv $03, $00, $00, $00 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1A, $1A, $19, $00 ; Patch $0E ; $3A ; $31, $25, $73, $41, $5F, $1F, $1F, $9C ; $08, $05, $04, $1E, $03, $04, $02, $06 ; $2F, $2F, $1F, $0F, $29, $27, $1F, $80 spAlgorithm $02 spFeedback $07 spDetune $03, $07, $02, $04 spMultiple $01, $03, $05, $01 spRateScale $01, $00, $00, $02 spAttackRt $1F, $1F, $1F, $1C spAmpMod $00, $00, $00, $00 spSustainRt $08, $04, $05, $1E spSustainLv $02, $01, $02, $00 spDecayRt $03, $02, $04, $06 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $29, $1F, $27, $00 ; Patch $0F ; $04 ; $71, $41, $31, $31, $12, $12, $12, $12 ; $00, $00, $00, $00, $00, $00, $00, $00 ; $0F, $0F, $0F, $0F, $23, $80, $23, $80 spAlgorithm $04 spFeedback $00 spDetune $07, $03, $04, $03 spMultiple $01, $01, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $12, $12, $12, $12 spAmpMod $00, $00, $00, $00 spSustainRt $00, $00, $00, $00 spSustainLv $00, $00, $00, $00 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $23, $23, $00, $00 ; Patch $10 ; $14 ; $75, $72, $35, $32, $9F, $9F, $9F, $9F ; $05, $05, $00, $0A, $05, $05, $07, $05 ; $2F, $FF, $0F, $2F, $1E, $80, $14, $80 spAlgorithm $04 spFeedback $02 spDetune $07, $03, $07, $03 spMultiple $05, $05, $02, $02 spRateScale $02, $02, $02, $02 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $05, $00, $05, $0A spSustainLv $02, $00, $0F, $02 spDecayRt $05, $07, $05, $05 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1E, $14, $00, $00 ; Patch $11 ; $3D ; $01, $00, $01, $02, $12, $1F, $1F, $14 ; $07, $02, $02, $0A, $05, $05, $05, $05 ; $2F, $2F, $2F, $AF, $1C, $80, $82, $80 spAlgorithm $05 spFeedback $07 spDetune $00, $00, $00, $00 spMultiple $01, $01, $00, $02 spRateScale $00, $00, $00, $00 spAttackRt $12, $1F, $1F, $14 spAmpMod $00, $00, $00, $00 spSustainRt $07, $02, $02, $0A spSustainLv $02, $02, $02, $0A spDecayRt $05, $05, $05, $05 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1C, $02, $00, $00 ; Patch $12 ; $1C ; $73, $72, $33, $32, $94, $99, $94, $99 ; $08, $0A, $08, $0A, $00, $05, $00, $05 ; $3F, $4F, $3F, $4F, $1E, $80, $19, $80 spAlgorithm $04 spFeedback $03 spDetune $07, $03, $07, $03 spMultiple $03, $03, $02, $02 spRateScale $02, $02, $02, $02 spAttackRt $14, $14, $19, $19 spAmpMod $00, $00, $00, $00 spSustainRt $08, $08, $0A, $0A spSustainLv $03, $03, $04, $04 spDecayRt $00, $00, $05, $05 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1E, $19, $00, $00 ; Patch $13 ; $31 ; $33, $01, $00, $00, $9F, $1F, $1F, $1F ; $0D, $0A, $0A, $0A, $0A, $07, $07, $07 ; $FF, $AF, $AF, $AF, $1E, $1E, $1E, $80 spAlgorithm $01 spFeedback $06 spDetune $03, $00, $00, $00 spMultiple $03, $00, $01, $00 spRateScale $02, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $0D, $0A, $0A, $0A spSustainLv $0F, $0A, $0A, $0A spDecayRt $0A, $07, $07, $07 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1E, $1E, $1E, $00 ; Patch $14 ; $3A ; $70, $76, $30, $71, $1F, $95, $1F, $1F ; $0E, $0F, $05, $0C, $07, $06, $06, $07 ; $2F, $4F, $1F, $5F, $21, $12, $28, $80 spAlgorithm $02 spFeedback $07 spDetune $07, $03, $07, $07 spMultiple $00, $00, $06, $01 spRateScale $00, $00, $02, $00 spAttackRt $1F, $1F, $15, $1F spAmpMod $00, $00, $00, $00 spSustainRt $0E, $05, $0F, $0C spSustainLv $02, $01, $04, $05 spDecayRt $07, $06, $06, $07 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $21, $28, $12, $00 ; Patch $15 ; $28 ; $71, $00, $30, $01, $1F, $1F, $1D, $1F ; $13, $13, $06, $05, $03, $03, $02, $05 ; $4F, $4F, $2F, $3F, $0E, $14, $1E, $80 spAlgorithm $00 spFeedback $05 spDetune $07, $03, $00, $00 spMultiple $01, $00, $00, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1D, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $13, $06, $13, $05 spSustainLv $04, $02, $04, $03 spDecayRt $03, $02, $03, $05 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $0E, $1E, $14, $00 ; Patch $16 ; $3E ; $38, $01, $7A, $34, $59, $D9, $5F, $9C ; $0F, $04, $0F, $0A, $02, $02, $05, $05 ; $AF, $AF, $66, $66, $28, $80, $A3, $80 spAlgorithm $06 spFeedback $07 spDetune $03, $07, $00, $03 spMultiple $08, $0A, $01, $04 spRateScale $01, $01, $03, $02 spAttackRt $19, $1F, $19, $1C spAmpMod $00, $00, $00, $00 spSustainRt $0F, $0F, $04, $0A spSustainLv $0A, $06, $0A, $06 spDecayRt $02, $05, $02, $05 spReleaseRt $0F, $06, $0F, $06 spTotalLv $28, $23, $00, $00 ; Patch $17 ; $39 ; $32, $31, $72, $71, $1F, $1F, $1F, $1F ; $00, $00, $00, $00, $00, $00, $00, $00 ; $0F, $0F, $0F, $0F, $1B, $32, $28, $80 spAlgorithm $01 spFeedback $07 spDetune $03, $07, $03, $07 spMultiple $02, $02, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $00, $00, $00, $00 spSustainLv $00, $00, $00, $00 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1B, $28, $32, $00 ; Patch $18 ; $07 ; $34, $74, $32, $71, $1F, $1F, $1F, $1F ; $0A, $0A, $05, $03, $00, $00, $00, $00 ; $3F, $3F, $2F, $2F, $8A, $8A, $80, $80 spAlgorithm $07 spFeedback $00 spDetune $03, $03, $07, $07 spMultiple $04, $02, $04, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $0A, $05, $0A, $03 spSustainLv $03, $02, $03, $02 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $0A, $00, $0A, $00 ; Patch $19 ; $3A ; $31, $37, $31, $31, $8D, $8D, $8E, $53 ; $0E, $0E, $0E, $03, $00, $00, $00, $00 ; $1F, $FF, $1F, $0F, $17, $28, $26, $80 spAlgorithm $02 spFeedback $07 spDetune $03, $03, $03, $03 spMultiple $01, $01, $07, $01 spRateScale $02, $02, $02, $01 spAttackRt $0D, $0E, $0D, $13 spAmpMod $00, $00, $00, $00 spSustainRt $0E, $0E, $0E, $03 spSustainLv $01, $01, $0F, $00 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $17, $26, $28, $00 ; Patch $1A ; $3B ; $3A, $31, $71, $74, $DF, $1F, $1F, $DF ; $00, $0A, $0A, $05, $00, $05, $05, $03 ; $0F, $5F, $1F, $5F, $32, $1E, $0F, $80 spAlgorithm $03 spFeedback $07 spDetune $03, $07, $03, $07 spMultiple $0A, $01, $01, $04 spRateScale $03, $00, $00, $03 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $00, $0A, $0A, $05 spSustainLv $00, $01, $05, $05 spDecayRt $00, $05, $05, $03 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $32, $0F, $1E, $00 ; Patch $1B ; $3A ; $32, $56, $32, $42, $8D, $4F, $15, $52 ; $06, $08, $07, $04, $02, $00, $00, $00 ; $1F, $1F, $2F, $2F, $19, $20, $2A, $80 spAlgorithm $02 spFeedback $07 spDetune $03, $03, $05, $04 spMultiple $02, $02, $06, $02 spRateScale $02, $00, $01, $01 spAttackRt $0D, $15, $0F, $12 spAmpMod $00, $00, $00, $00 spSustainRt $06, $07, $08, $04 spSustainLv $01, $02, $01, $02 spDecayRt $02, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $19, $2A, $20, $00 ; Patch $1C ; $2C ; $71, $74, $32, $32, $1F, $12, $1F, $12 ; $00, $0A, $00, $0A, $00, $00, $00, $00 ; $0F, $1F, $0F, $1F, $16, $80, $17, $80 spAlgorithm $04 spFeedback $05 spDetune $07, $03, $07, $03 spMultiple $01, $02, $04, $02 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $12, $12 spAmpMod $00, $00, $00, $00 spSustainRt $00, $00, $0A, $0A spSustainLv $00, $00, $01, $01 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $16, $17, $00, $00 ; Patch $1D ; $3A ; $01, $07, $01, $01, $8E, $8E, $8D, $53 ; $0E, $0E, $0E, $03, $00, $00, $00, $07 ; $1F, $FF, $1F, $0F, $18, $28, $27, $8F spAlgorithm $02 spFeedback $07 spDetune $00, $00, $00, $00 spMultiple $01, $01, $07, $01 spRateScale $02, $02, $02, $01 spAttackRt $0E, $0D, $0E, $13 spAmpMod $00, $00, $00, $00 spSustainRt $0E, $0E, $0E, $03 spSustainLv $01, $01, $0F, $00 spDecayRt $00, $00, $00, $07 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $18, $27, $28, $0F ; Patch $1E ; $36 ; $7A, $32, $51, $11, $1F, $1F, $59, $1C ; $0A, $0D, $06, $0A, $07, $00, $02, $02 ; $AF, $5F, $5F, $5F, $1E, $8B, $81, $80 spAlgorithm $06 spFeedback $06 spDetune $07, $05, $03, $01 spMultiple $0A, $01, $02, $01 spRateScale $00, $01, $00, $00 spAttackRt $1F, $19, $1F, $1C spAmpMod $00, $00, $00, $00 spSustainRt $0A, $06, $0D, $0A spSustainLv $0A, $05, $05, $05 spDecayRt $07, $02, $00, $02 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1E, $01, $0B, $00 ; Patch $1F ; $3C ; $71, $72, $3F, $34, $8D, $52, $9F, $1F ; $09, $00, $00, $0D, $00, $00, $00, $00 ; $23, $08, $02, $F7, $15, $85, $1D, $8A spAlgorithm $04 spFeedback $07 spDetune $07, $03, $07, $03 spMultiple $01, $0F, $02, $04 spRateScale $02, $02, $01, $00 spAttackRt $0D, $1F, $12, $1F spAmpMod $00, $00, $00, $00 spSustainRt $09, $00, $00, $0D spSustainLv $02, $00, $00, $0F spDecayRt $00, $00, $00, $00 spReleaseRt $03, $02, $08, $07 spTotalLv $15, $1D, $05, $0A ; Patch $20 ; $3E ; $77, $71, $32, $31, $1F, $1F, $1F, $1F ; $0D, $06, $00, $00, $08, $06, $00, $00 ; $15, $0A, $0A, $0A, $1B, $8F, $8F, $8F spAlgorithm $06 spFeedback $07 spDetune $07, $03, $07, $03 spMultiple $07, $02, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $0D, $00, $06, $00 spSustainLv $01, $00, $00, $00 spDecayRt $08, $00, $06, $00 spReleaseRt $05, $0A, $0A, $0A spTotalLv $1B, $0F, $0F, $0F ; Patch $21 ; $07 ; $34, $74, $32, $71, $1F, $1F, $1F, $1F ; $0A, $0A, $05, $03, $00, $00, $00, $00 ; $3F, $3F, $2F, $2F, $8A, $8A, $8A, $8A spAlgorithm $07 spFeedback $00 spDetune $03, $03, $07, $07 spMultiple $04, $02, $04, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $0A, $05, $0A, $03 spSustainLv $03, $02, $03, $02 spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $0A, $0A, $0A, $0A
src/fullscreen.applescript
XReyRobert/termtile
1,450
42
set _config to run script alias ((path to me as text) & "::config.scpt") set _terminalApp to terminalApp of _config if (offset of "iTerm" in _terminalApp) is not 0 then -- key code 36 is the return key tell application "System Events" to key code 36 using command down else tell application "System Events" to keystroke "f" using {command down, control down} end if
programs/oeis/314/A314848.asm
neoneye/loda
22
173272
; A314848: Coordination sequence Gal.5.110.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,5,9,14,18,24,28,33,37,42,47,51,56,60,66,70,75,79,84,89,93,98,102,108,112,117,121,126,131,135,140,144,150,154,159,163,168,173,177,182,186,192,196,201,205,210,215,219,224,228 mov $1,$0 mul $1,2 sub $1,4 mov $2,$0 add $0,4 lpb $1 trn $1,4 add $0,$1 trn $1,2 sub $0,$1 add $0,1 trn $1,3 lpe lpb $2 add $0,3 sub $2,1 lpe sub $0,3
test/interaction/TopScope.agda
shlevy/agda
3
8836
module _ where open import Common.Bool private unused = true used = true private module Private where not-in-scope = true in-scope = used
SimpleCPU/Python/example3.asm
ivandumas/Multiprocesadores
0
103634
// Data memory example MOV R0, #99; // Load R0 with constant 99 MOV 3, R0; // Store R0 (99) to DMEM[3] MOV R1, #1; // Load R1 with constant 1 MOV R2, 3; // Load R2 with DMEM[3] (which is 99) ADD R3, R2, R1; // R3 gets result of 100 MOV R3, #0;
src/util/sprite/left.asm
olifink/qspread
0
10292
* Sprite left * * Mode 4 * +|---------------+ * | a | * | aa aa| * | aaaa aa | * -aaaaaaaaaaaa - * | aaaa aa | * | aa aa| * | a | * +|---------------+ * section sprite xdef mes_left mes_left dc.w $0100,$0000 dc.w 16,7,0,3 dc.l sc4_left-* dc.l sm4_left-* dc.l 0 sc4_left dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0202,$0000 dc.w $0C0C,$0303 dc.w $3C3C,$0C0C dc.w $FFFF,$F0F0 dc.w $3C3C,$0C0C dc.w $0C0C,$0303 dc.w $0202,$0000 sm4_left dc.w $0202,$0000 dc.w $0C0C,$0303 dc.w $3C3C,$0C0C dc.w $FFFF,$F0F0 dc.w $3C3C,$0C0C dc.w $0C0C,$0303 dc.w $0202,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 dc.w $0000,$0000 * end
libsrc/_DEVELOPMENT/adt/p_queue/c/sdcc_iy/p_queue_init_fastcall.asm
jpoikela/z88dk
640
104876
; void p_queue_init_fastcall(void *p) SECTION code_clib SECTION code_adt_p_queue PUBLIC _p_queue_init_fastcall EXTERN asm_p_queue_init defc _p_queue_init_fastcall = asm_p_queue_init
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2_notsx.log_83_531.asm
ljhsiun2/medusa
9
80908
<filename>Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2_notsx.log_83_531.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x6d8d, %rsi lea addresses_WC_ht+0x17219, %rdi nop nop nop nop xor $3654, %rbp mov $4, %rcx rep movsw nop nop add %rax, %rax lea addresses_WC_ht+0xb0e5, %rsi lea addresses_normal_ht+0x10a35, %rdi nop lfence mov $75, %rcx rep movsq nop nop nop nop nop cmp %rdi, %rdi lea addresses_A_ht+0xe5e5, %rsi lea addresses_normal_ht+0x145c5, %rdi nop nop nop nop inc %r14 mov $58, %rcx rep movsb nop nop nop nop nop dec %rbp lea addresses_normal_ht+0xae5, %rbp cmp %r10, %r10 movl $0x61626364, (%rbp) sub %rsi, %rsi lea addresses_WT_ht+0xf855, %rsi nop nop nop add $46738, %rcx movb (%rsi), %al nop nop nop xor %rdi, %rdi lea addresses_D_ht+0x13ce5, %r10 nop add %rcx, %rcx mov (%r10), %ebp nop and %rdi, %rdi lea addresses_UC_ht+0x1a465, %r14 nop nop nop nop nop inc %rax mov $0x6162636465666768, %rsi movq %rsi, (%r14) nop nop inc %rax pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r8 push %rax push %rbx push %rcx push %rdi push %rsi // Store lea addresses_D+0x4e5, %r8 nop nop nop cmp %r11, %r11 movw $0x5152, (%r8) nop nop cmp $7360, %rax // Load lea addresses_RW+0x179a1, %r13 nop add $16385, %rcx mov (%r13), %rbx nop nop cmp %rcx, %rcx // REPMOV lea addresses_RW+0x11ce5, %rsi lea addresses_normal+0xa273, %rdi nop add $49327, %rbx mov $100, %rcx rep movsq nop nop nop nop add $4184, %r13 // Store lea addresses_D+0x114e5, %r11 nop nop sub %rsi, %rsi mov $0x5152535455565758, %rdi movq %rdi, %xmm7 movups %xmm7, (%r11) nop inc %rdi // Store lea addresses_RW+0x11ce5, %r13 nop nop nop nop dec %r8 mov $0x5152535455565758, %r11 movq %r11, %xmm2 vmovups %ymm2, (%r13) nop nop nop sub $31360, %rax // Store lea addresses_D+0x140dc, %r8 nop nop nop add %rax, %rax mov $0x5152535455565758, %r11 movq %r11, %xmm3 vmovups %ymm3, (%r8) nop nop nop nop nop inc %rsi // Store lea addresses_RW+0x1d27d, %rcx nop nop nop nop nop add $19959, %r13 mov $0x5152535455565758, %rax movq %rax, %xmm6 movups %xmm6, (%rcx) and %rbx, %rbx // Store lea addresses_RW+0x11ce5, %r8 inc %r12 mov $0x5152535455565758, %rdi movq %rdi, %xmm6 movups %xmm6, (%r8) nop nop nop sub $12624, %r8 // Faulty Load lea addresses_RW+0x11ce5, %r8 nop nop nop cmp $18190, %rcx movups (%r8), %xmm7 vpextrq $0, %xmm7, %r13 lea oracles, %rcx and $0xff, %r13 shlq $12, %r13 mov (%rcx,%r13,1), %r13 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': True, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_RW', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_normal', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'58': 83} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
Assembler/AssemblyCode/NOT.asm
KPU-RISC/KPU
8
27
<filename>Assembler/AssemblyCode/NOT.asm ; Write register D to the Output Port MOV D, 11110000b MOV E, 00001111b NOT D NOT D SHR D NOT E NOT E SHL E NOT D NOT D SHR D NOT E NOT E SHL E NOT D NOT D SHR D NOT E NOT E SHL E NOT D NOT D SHR D NOT E NOT E SHL E
kern/i686/tasking/switch.asm
greck2908/LudOS
44
96221
<reponame>greck2908/LudOS extern tss global task_switch task_switch: ; Structure : ; eax...edi ; eflags ; eip pushfd pushad ; eax to edi including esp cli mov dword [esp+0x0c], 0xcafebabe ; set dummy_esp to a sentinel value mov eax, [esp+0x28] ; *from mov [eax], esp ; from->esp = esp mov eax, [esp+0x2c] ; *to mov esp, [eax] ; esp = to->esp mov dword [tss+0x4], esp ; update tss field popad popfd ret ; [esp] contains the return address
programs/oeis/016/A016198.asm
karttu/loda
0
169879
<filename>programs/oeis/016/A016198.asm ; A016198: Expansion of 1/((1-x)(1-2x)(1-5x)). ; 1,8,47,250,1281,6468,32467,162590,813461,4068328,20343687,101722530,508620841,2543120588,12715635707,63578244070,317891351421,1589457019248,7947285620527,39736429151210,198682147853201,993410743460308,4967053725690147,24835268645227950 add $0,1 mov $3,2 lpb $0,1 sub $0,1 sub $1,$5 mov $2,$1 add $3,$4 add $3,$1 add $4,$3 sub $4,$1 add $1,$3 trn $1,3 mov $5,$2 add $5,$1 trn $5,1 add $1,$5 add $1,4 sub $3,$3 mov $5,2 lpe sub $1,3
Orders/WellFounded/Induction.agda
Smaug123/agdaproofs
4
12774
<filename>Orders/WellFounded/Induction.agda {-# OPTIONS --safe --warning=error --without-K #-} open import Functions.Definition open import Orders.WellFounded.Definition module Orders.WellFounded.Induction {a b : _} {A : Set a} {_<_ : Rel {a} {b} A} (wf : WellFounded _<_) where private foldAcc : {c : _} (P : A → Set c) → (∀ x → (∀ y → y < x → P y) → P x) → ∀ z → Accessible _<_ z → P z foldAcc P inductionProof = go where go : (z : A) → (Accessible _<_ z) → P z go z (access prf) = inductionProof z (λ y yLessZ → go y (prf y yLessZ)) rec : {c : _} (P : A → Set c) → (∀ x → (∀ y → y < x → P y) → P x) → (∀ z → P z) rec P inductionProof z = foldAcc P inductionProof _ (wf z)
oeis/037/A037009.asm
neoneye/loda-programs
11
168243
<reponame>neoneye/loda-programs ; A037009: Consider an n X n board with a knight's path, not necessarily closed, that visits every square exactly once; number the squares [ 1..n^2 ] along the path; a(n) = maximal number of prime numbered squares that can be attacked by a queen. ; Submitted by <NAME>(l1) ; 0,0,0,0,9,11,15,18,22,25 mov $4,$0 mov $7,$0 lpb $4 mov $0,$7 mov $2,0 sub $4,1 sub $0,$4 mov $1,1 mov $3,$0 mul $3,4 div $3,8 sub $3,1 mul $3,4 lpb $3 sub $0,2 mul $1,$3 add $1,$3 mov $5,$0 cmp $5,0 add $0,$5 div $1,$0 add $2,$1 div $3,$0 sub $3,1 lpe add $6,$2 lpe mov $0,$6
libsrc/_DEVELOPMENT/alloc/obstack/c/sccz80/obstack_object_size.asm
teknoplop/z88dk
8
28240
; =============================================================== ; Dec 2013 ; =============================================================== ; ; size_t obstack_object_size(struct obstack *ob) ; ; Return the size in bytes of the currently growing object. ; ; =============================================================== SECTION code_clib SECTION code_alloc_obstack PUBLIC obstack_object_size EXTERN asm_obstack_object_size defc obstack_object_size = asm_obstack_object_size
cpupixie.asm
Team-Digital-Fairy/CPUPixie
1
84859
<reponame>Team-Digital-Fairy/CPUPixie section .text org 0x100 jmp _entry ; call entry so I can main() ;NCommander's itoa function. _addressToHex: push bp mov bp,sp xor ax, ax xor dx, dx mov di, [bp+6] ; string add di, 4 mov ax, [bp+4] ; num mov bx, 16 mov cx, [bp+8] ; loop counter processloop: div bx cmp dx, 9 jg handleHex add dl, 0x30 jmp loadByte handleHex: sub dl, 10 add dl, 0x41 loadByte: mov byte [di], dl dec di xor dx, dx dec cx jnz processloop mov ax, dx pop bp ret ; Print String function: ; Push DX the pointer in DS ; call this. printstr: push ax xor ax,ax ; Clear AX mov ah, 9 ; calling 0x0900 on 0x21: STDOUT int 0x21 pop ax ret check_acflag: push bp mov bp,sp pushfd pop eax ; read EFLAGS mov ecx, eax ; save EFLAGS to ECX push 8 push teststr mov ax, [check_acflag_string1] ; bp+4 push eax call _addressToHex mov dx,teststr call printstr xor eax, 0x40000 ; AC bit in EFLAGS push eax ; save modified EFLAGS popfd ; set eflags pushfd ; get new ELFLAGS pop eax ; store EFLAGS into EAX push 8 push teststr mov ax, [check_acflag_string1] ; bp+4 push eax call _addressToHex mov dx,teststr call printstr xor eax, ecx ; cannot toggle AC? it's 386. mov ax, 0 jz _end_check_acflag; it's 386. push ecx ; restore EFLAGS popfd mov ax, 1 ; it's 486. _end_check_acflag: pop bp ret check_iopl: push bp mov bp,sp ; Retrive flag xor ax,ax ; Clear AX pushf pop ax mov cx, ax ; Copy current FLAG to cx, just in case. ; draw on screen push 4 push teststr mov ax, [check_iopl] push ax call _addressToHex mov dx,teststr call printstr push cx popf pop bp ret _entry: mov dx, helloworld call printstr mov dx, digifairy_intro call printstr mov dx,debug1 call printstr _detect_8086: mov ax, _8086_detected push ax ; Get the return address onto the stack for RETN mov bx, 0 shr bx, (_8086c_detected - $) ; !this trashes BX! ; This assembles into C1 EB [imm8]. ; C1 is an invalid instruction (theoretically), but it is actually ; an undocumented equivalent to RETN. ; EB is a documented JMP rel8, so clones that don't copy the C1 functionality ; Will fall into this. pop ax ; The 8086 check passed, so we will get this off the stack ; also this means that this is atleast 186. call check_iopl call check_acflag cmp ax,1 ; if ax == 1; that this is 486. because AC exists. je print486 print386: mov dx, cpu386 call printstr jmp _exit print486: mov dx, cpu486 call printstr jmp _exit _nop_slide_buffer: nop ; Nop slide, because we're jumping 3 bytes too early nop ; Keep in mind, this MUST be within 255 bytes of shr bx, (_8086c_detected - $) nop ; Since that is a jmp [imm8] nop _8086c_detected: mov dx, cpu8086c ; Clones may not interpret C1 as RETN, we can take advantage of that call printstr jmp _exit _8086_detected: mov dx, cpu8086 ; The official 8086 interpretes C1 as RETN call printstr jmp _exit _exit: mov ax, 0x4C00 int 0x21 ; Return to DOS nop ; Memo ;push 4 ; Loop counter bp+8 ;push teststr ; bp+6 is where string would be written into. 8088 does not have a ROM and RAM discrimination. ;mov ax, [_addressToHex] ; bp+4 ;push 0x7E0E ;call _addressToHex ;mov dx,teststr ;call printstr section .data ; 80x25. add nesscery new lines if you wanna. print big text. ; 0123456789012345678901234 helloworld: db `Hello World from NASM.\r\n$` digifairy_intro:db `Made with <3\nfrom Team Digital Fairy!\r\n"Vespire:Our highness says\r\nthat you should have a great day!"\r\n$` ;isv86: db `This PC is running under V86 mode.\r\n$` ;v86_debug: db `DBG: in detect_v86\r\n$` ;v86_not_found: db `This PC is running under non-V86 mode\r\n$` check_acflag_string1: db ` XXXXXXXX\r\n$` teststr: db ` XXXX\r\n$` ;teststr4: db ` XXXX\r\n$` cpu8086: db `this CPU is an 8088.\r\n$` cpu8086c: db `this CPU is an 8088 clone.\r\n$` cpu186: db `this CPU is an 186.\r\n$` cpu286: db `this CPU is an 286.\r\n$` cpu386: db `this CPU is an 386.\r\n$` cpu486: db `this CPU is an 486.\r\n$` cpu486_cpuid: db `this CPU is an 486, CPUID capable.\r\n$` debug1: db `debug: running 8086 detection\r\n$`
resources/antlr-introduction/NestedLists.g4
arminnh/c-to-p-compilers
1
6522
grammar NestedLists; nstdlst : '(' lst ')'; lst : itm | itm (',' itm)* | ; itm : '(' lst ')' | INT; INT : ['-']?[0-9]+;
oscm-app-iaas/resources/firewall_policy_grammar/FWPolicyParser.g4
TecArt/servicecatalog-development
56
1499
parser grammar FWPolicyParser; options { tokenVocab=FWPolicyLexer; } @header {package org.oscm.app.iaas.fwpolicy; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import org.oscm.app.iaas.data.FWPolicy; import org.oscm.app.iaas.data.FWPolicy.Protocol; } policies returns [List<FWPolicy> pList] @init { $pList = new ArrayList<FWPolicy>(); } @after{ for (Iterator<FWPolicy> it = $pList.iterator(); it.hasNext(); ) { FWPolicy p = it.next(); if (p.getDstPort() != null && p.getDstPort().indexOf(",") > 0) { String portList = p.getDstPort(); StringTokenizer tk = new StringTokenizer(portList, ","); p.setDstPort((String) tk.nextElement()); while (tk.hasMoreElements()) { String port = (String) tk.nextElement(); FWPolicy pol = p.clone(); pol.setDstPort(port); $pList.add(pol); it = $pList.iterator(); // due to concurrent modification exception } } if (p.getSrcPort().indexOf(",") > 0) { String portList = p.getSrcPort(); StringTokenizer tk = new StringTokenizer(portList, ","); p.setSrcPort((String) tk.nextElement()); while (tk.hasMoreElements()) { String port = (String) tk.nextElement(); FWPolicy pol = p.clone(); pol.setSrcPort(port); $pList.add(pol); it = $pList.iterator(); // due to concurrent modification exception } } } } : policy[$pList] (SEMICOLON policy[$pList])* EOF ; policy [List<FWPolicy> pList] locals[ FWPolicy p ] @init { $p = new FWPolicy(); $p.setAction(Action.Accept); $p.setSrc(null); $p.setSrcPort("any"); $p.setDst(null); $p.setDstPort("any"); $p.setProtocol(Protocol.TCP); $p.setDstService("NONE"); $p.setDstType("IP"); } @after{ $pList.add($p); } : source_zone[$p] (source_ip[$p])? (source_port[$p])? ARROW dest_zone[$p] (dest_service[$p] | (dest_ip[$p])? (dest_port[$p])? (protocol[$p])? ) ; source_zone [FWPolicy p]: (ZONE) { $p.setSrcZone($ZONE.getText()); } ; source_ip [FWPolicy p]: (IP) { // remove the double quotes String ip = $IP.getText(); if (ip.indexOf("\"") == 0) { ip = ip.substring(1, ip.length() - 1); } $p.setSrc(ip); } ; source_port [FWPolicy p]: (PORT) { // remove the leading colon String port = $PORT.getText().substring(1); $p.setSrcPort(port); } ; dest_zone [FWPolicy p]: (ZONE) { $p.setDstZone($ZONE.getText()); } ; dest_service [FWPolicy p]: (SERVICE) { // remove the left and right parenthesis String service = $SERVICE.getText(); service = service.substring(1, service.length() - 1); $p.setDstService(service); $p.setDstType(null); $p.setDstPort(null); $p.setProtocol(null); } ; dest_ip [FWPolicy p]: (IP) { // remove the double quotes String ip = $IP.getText(); if (ip.indexOf("\"") == 0) { ip = ip.substring(1, ip.length() - 1); } $p.setDst(ip); } ; dest_port [FWPolicy p]: (PORT) { // remove the leading colon String port = $PORT.getText().substring(1); $p.setDstPort(port); } ; protocol [FWPolicy p]: (PROTOCOL) { // remove the leading hashmark String ptcl = $PROTOCOL.getText().substring(1); if( "tcp".equals(ptcl) ) $p.setProtocol(Protocol.TCP); else if( "udp".equals(ptcl) ) $p.setProtocol(Protocol.UDP); else if( "tcpudp".equals(ptcl) ) $p.setProtocol(Protocol.TCP_UDP); else if( "icmp".equals(ptcl) ) $p.setProtocol(Protocol.ICMP); } ;
oeis/289/A289426.asm
neoneye/loda-programs
11
28265
; A289426: a(n) = length of longest circuit code K(n,5). ; Submitted by <NAME>(s1) ; 0,4,6,8,10,12,14,16,24,28,40 mov $4,$0 mov $9,$0 lpb $4 mov $0,$9 sub $4,1 sub $0,$4 mov $1,2 mov $2,1 mov $3,$0 mul $3,5 mov $7,0 lpb $3 mul $2,$3 add $1,$2 add $7,1 mov $5,$7 div $5,3 mov $10,$5 cmp $10,0 add $5,$10 div $1,$5 add $1,1 add $5,10 div $2,$5 sub $3,1 lpe mov $6,5 pow $6,$0 div $2,$6 mov $10,$2 cmp $10,0 add $2,$10 div $1,$2 mov $0,$1 mod $0,10 mul $0,2 add $8,$0 lpe mov $0,$8
programs/oeis/255/A255225.asm
karttu/loda
0
28295
; A255225: Number of (n+2)X(5+2) 0..1 arrays with no 3x3 subblock diagonal sum 0 and no antidiagonal sum 0 and no row sum 2 and no column sum 2 ; 61,67,76,88,106,133,172,229,313,436,616,880,1267,1834,2665,3883,5668,8284,12118,17737,25972,38041,55729,81652,119644,175324,256927,376522,551797,808675,1185148,1736896,2545522,3730621,5467468,8012941,11743513,17210932,25223824,36967288,54178171,79401946,116369185,170547307,249949204,366318340,536865598,786814753,1153133044,1689998593,2476813297,3629946292,5319944836,7796758084,11426704327,16746649114,24543407149,35970111427,52716760492,77260167592,113230278970,165947039413,243207206956,356437485877,522384525241,765591732148,1122029217976,1644413743168,2410005475267,3532034693194,5176448436313,7586453911531,11118488604676,16294937040940,23881390952422,34999879557049,51294816597940,75176207550313,110176087107313,161470903705204,236647111255468,346823198362732,508294102067887,744941213323306,1091764411685989,1600058513753827,2344999727077084,3436764138763024,5036822652516802,7381822379593837 add $0,1 mov $1,1 mov $2,1 lpb $0,1 sub $0,1 mov $4,$2 mov $2,$3 add $2,2 mov $3,$1 add $1,$4 lpe add $1,1 mul $1,2 sub $1,4 mul $1,2 sub $1,4 div $1,4 mul $1,3 add $1,61
nasm/exclusive_or_logical_operator_56fa3c5ce4d45d2a52001b3c.asm
p85/codewars-solutions
0
88993
<reponame>p85/codewars-solutions SECTION .text global xorf ; Returns a boolean indicating whether one of the arguments is true. ; arg0 = (bool) A boolean. ; arg1 = (bool) A boolean. ; return value = (bool) true if one argument is true, else false. xorf: xor rdi,rsi mov rax,rdi ret
Data/Bits.agda
oisdk/agda-playground
6
17529
{-# OPTIONS --without-K --safe #-} module Data.Bits where open import Level infixr 8 0∷_ 1∷_ data Bits : Type where [] : Bits 0∷_ : Bits → Bits 1∷_ : Bits → Bits
oeis/099/A099158.asm
neoneye/loda-programs
11
161449
<reponame>neoneye/loda-programs ; A099158: a(n) = 5^(n-1) * U(n-1, 7/5) where U is the Chebyshev polynomial of the second kind. ; Submitted by <NAME> ; 0,1,14,171,2044,24341,289674,3446911,41014904,488035881,5807129734,69098919251,822206626164,9783419785021,116412711336194,1385192464081191,16482376713731824,196123462390215761 mul $0,2 mov $1,1 lpb $0 sub $0,1 mov $2,$3 mul $2,6 add $3,$1 add $1,$2 lpe mov $0,$3 div $0,2
src/natools-accumulators.ads
faelys/natools
0
23662
------------------------------------------------------------------------------ -- Copyright (c) 2011, <NAME> -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Natools.Accumulators is a collection of interfaces for data structures -- -- that allow efficient accumulation of data. -- -- -- -- String_Accumulator is meant for creation of long strings through -- -- repeated calls of Append, and later retrieval of the full buffer through -- -- one of the To_String subprograms. Length, Tail and Unappend are -- -- helper utilities that might not be very efficient but can occasionnally -- -- be useful. Hard_Reset and Soft_Reset both clear the internal state, with -- -- Soft_Reset aimed for speed while Hard_Reset aims for best memory release -- -- -- -- String_Accumulator_Stack adds a stack structure on top of -- -- String_Accumulator, to allow temporary substrings to be created using -- -- similar facilities. All operations on String_Accumulator except -- -- Hard_Reset and Soft_Reset, when applied to String_Accumulator_Stack, are -- -- meant to be forwarded to the top accumulator of the stack. Push and Pop -- -- change the stack state, while Hard_Reset and Soft_Reset apply to the -- -- whole stack, with the same semantics as for String_Accumulator. -- ------------------------------------------------------------------------------ package Natools.Accumulators is pragma Pure (Accumulators); type String_Accumulator is interface; procedure Append (To : in out String_Accumulator; Text : String) is abstract; -- Append the given String to the internal buffer procedure Hard_Reset (Acc : in out String_Accumulator) is abstract; -- Empty the internal buffer and free all possible memory function Length (Acc : String_Accumulator) return Natural is abstract; -- Return the length of the internal buffer procedure Soft_Reset (Acc : in out String_Accumulator) is abstract; -- Empty the internal buffer for reuse function Tail (Acc : String_Accumulator; Size : Natural) return String is abstract; -- Return the last characters from the internal buffer function To_String (Acc : String_Accumulator) return String is abstract; -- Output the whole internal buffer as a String procedure To_String (Acc : String_Accumulator; Output : out String) is abstract; -- Write the whole internal buffer into the String, which must be -- large enough. procedure Unappend (From : in out String_Accumulator; Text : String) is abstract; -- Remove the given suffix from the internal buffer -- Do nothing if the given text is not a prefix the internal buffer type String_Accumulator_Stack is interface and String_Accumulator; procedure Push (Acc : in out String_Accumulator_Stack) is abstract; -- Push the current internal buffer and start with an empty one procedure Pop (Acc : in out String_Accumulator_Stack) is abstract; -- Drop the current internal buffer and use the previsouly pushed one -- instead -- Raise Program_Error when trying to pop the last internal buffer end Natools.Accumulators;
oeis/341/A341952.asm
neoneye/loda-programs
11
96593
<reponame>neoneye/loda-programs ; A341952: Let x = (prime(n+1) - prime(n))/2 modulo 3 for n >= 2, then a(n) = -1 if x = 2, otherwise a(n) = x. ; Submitted by <NAME> ; 1,1,-1,1,-1,1,-1,0,1,0,-1,1,-1,0,0,1,0,-1,1,0,-1,0,1,-1,1,-1,1,-1,1,-1,0,1,-1,1,0,0,-1,0,0,1,-1,1,-1,1,0,0,-1,1,-1,0,1,-1,0,0,0,1,0,-1,1,-1,1,-1,1,-1,1,0,-1,1,-1,0,1,0,0,-1,0,1,-1,1,-1,1,-1,1,0,-1,0,1,-1,1,-1,0,1,-1,1,-1,0,0,1,0,0,-1 seq $0,28334 ; Differences between consecutive odd primes, divided by 2. mod $0,3 dif $0,-2
src/Web/Semantic/DL/Integrity/Closed/Properties.agda
agda/agda-web-semantic
9
2054
<reponame>agda/agda-web-semantic open import Data.Product using ( _×_ ; _,_ ; swap ) open import Data.Sum using ( inj₁ ; inj₂ ) open import Relation.Nullary using ( ¬_ ; yes ; no ) open import Relation.Unary using ( _∈_ ) open import Web.Semantic.DL.ABox using ( ABox ; ε ; _,_ ; _∼_ ; _∈₁_ ; _∈₂_ ) open import Web.Semantic.DL.ABox.Interp using ( Interp ; ⌊_⌋ ; ind ; ind⁻¹ ; Surjective ; surj✓ ) open import Web.Semantic.DL.ABox.Interp.Morphism using ( _≲_ ; _≃_ ; _,_ ; ≲⌊_⌋ ; ≲-resp-ind ) open import Web.Semantic.DL.ABox.Interp.Meet using ( meet ; meet-lb ; meet-glb ; meet-uniq ; meet-surj ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ) open import Web.Semantic.DL.Concept using ( Concept ; ⟨_⟩ ; ¬⟨_⟩ ; ⊤ ; ⊥ ; _⊔_ ; _⊓_ ; ∀[_]_ ; ∃⟨_⟩_ ; ≤1 ; >1 ; neg ) open import Web.Semantic.DL.Concept.Model using ( _⟦_⟧₁ ; neg-sound ; neg-complete ) open import Web.Semantic.DL.Integrity.Closed using ( Mediated₀ ; Initial₀ ; sur_⊨₀_ ; _,_ ) open import Web.Semantic.DL.Integrity.Closed.Alternate using ( _⊫_∼_ ; _⊫_∈₁_ ; _⊫_∈₂_ ; _⊫t_ ; _⊫a_ ; _⊫k_ ; eq ; rel ; rev ; +atom ; -atom ; top ; inj₁ ; inj₂ ; all ; ex ; uniq ; ¬uniq ; cn ; rl ; dis ; ref ; irr ; tra ; ε ; _,_ ) open import Web.Semantic.DL.KB using ( KB ; tbox ; abox ) open import Web.Semantic.DL.KB.Model using ( _⊨_ ; Interps ; ⊨-resp-≃ ) open import Web.Semantic.DL.Role using ( Role ; ⟨_⟩ ; ⟨_⟩⁻¹ ) open import Web.Semantic.DL.Role.Model using ( _⟦_⟧₂ ) open import Web.Semantic.DL.Signature using ( Signature ) open import Web.Semantic.DL.TBox using ( TBox ; ε ; _,_ ; _⊑₁_ ; _⊑₂_ ; Dis ; Ref ; Irr ; Tra ) open import Web.Semantic.DL.TBox.Interp using ( _⊨_≈_ ; ≈-sym ; ≈-trans ) open import Web.Semantic.DL.TBox.Interp.Morphism using ( ≲-resp-≈ ; iso ) open import Web.Semantic.DL.TBox.Model using ( _⊨t_ ) open import Web.Semantic.Util using ( ExclMiddle ; ExclMiddle₁ ; smaller-excl-middle ; is! ; is✓ ; tt ; elim ) module Web.Semantic.DL.Integrity.Closed.Properties (excl-middle₁ : ExclMiddle₁) {Σ : Signature} {X : Set} where -- The two definitions of closed-world integrity coincide for surjective interpretations. -- Note that this requires excluded middle, as the alternate definition assumes a classical logic, -- for example interpreting C ⊑ D as (¬ C ⊔ D) being a tautology. min : KB Σ X → Interp Σ X min K = meet excl-middle₁ (Interps K) excl-middle : ExclMiddle excl-middle = smaller-excl-middle excl-middle₁ sound∼ : ∀ K x y → (K ⊫ x ∼ y) → (⌊ min K ⌋ ⊨ x ≈ y) sound∼ K x y (eq K⊫x∼y) = is! K⊫x∼y complete∼ : ∀ K x y → (⌊ min K ⌋ ⊨ x ≈ y) → (K ⊫ x ∼ y) complete∼ K x y x≈y = eq (is✓ x≈y) sound₂ : ∀ K R xy → (K ⊫ xy ∈₂ R) → (xy ∈ ⌊ min K ⌋ ⟦ R ⟧₂) sound₂ K ⟨ r ⟩ (x , y) (rel K⊫xy∈r) = is! K⊫xy∈r sound₂ K ⟨ r ⟩⁻¹ (x , y) (rev K⊫yx∈r) = is! K⊫yx∈r complete₂ : ∀ K R xy → (xy ∈ ⌊ min K ⌋ ⟦ R ⟧₂) → (K ⊫ xy ∈₂ R) complete₂ K ⟨ r ⟩ (x , y) xy∈⟦r⟧ = rel (is✓ xy∈⟦r⟧) complete₂ K ⟨ r ⟩⁻¹ (x , y) yx∈⟦r⟧ = rev (is✓ yx∈⟦r⟧) sound₁ : ∀ K C x → (K ⊫ x ∈₁ C) → (x ∈ ⌊ min K ⌋ ⟦ C ⟧₁) sound₁ K ⟨ c ⟩ x (+atom K⊨x∈c) = is! K⊨x∈c sound₁ K ¬⟨ c ⟩ x (-atom K⊭x∈c) = λ x∈⟦c⟧ → K⊭x∈c (is✓ x∈⟦c⟧) sound₁ K ⊤ x top = tt sound₁ K ⊥ x () sound₁ K (C ⊓ D) x (K⊫x∈C , K⊫x∈D) = (sound₁ K C x K⊫x∈C , sound₁ K D x K⊫x∈D) sound₁ K (C ⊔ D) x (inj₁ K⊫x∈C) = inj₁ (sound₁ K C x K⊫x∈C) sound₁ K (C ⊔ D) x (inj₂ K⊫x∈D) = inj₂ (sound₁ K D x K⊫x∈D) sound₁ K (∀[ R ] C) x (all K⊫x∈∀RC) = λ y xy∈⟦R⟧ → sound₁ K C y (K⊫x∈∀RC y (complete₂ K R _ xy∈⟦R⟧)) sound₁ K (∃⟨ R ⟩ C) x (ex y K⊫xy∈R K⊫y∈C) = (y , sound₂ K R _ K⊫xy∈R , sound₁ K C y K⊫y∈C) sound₁ K (≤1 R) x (uniq K⊫x∈≤1R) = λ y z xy∈⟦R⟧ xz∈⟦R⟧ → sound∼ K y z (K⊫x∈≤1R y z (complete₂ K R _ xy∈⟦R⟧) (complete₂ K R _ xz∈⟦R⟧)) sound₁ K (>1 R) x (¬uniq y z K⊫xy∈R K⊫xz∈R K⊯y∼z) = ( y , z , sound₂ K R _ K⊫xy∈R , sound₂ K R _ K⊫xz∈R , λ y≈z → K⊯y∼z (complete∼ K y z y≈z) ) complete₁ : ∀ K C x → (x ∈ ⌊ min K ⌋ ⟦ C ⟧₁) → (K ⊫ x ∈₁ C) complete₁ K ⟨ c ⟩ x x∈⟦c⟧ = +atom (is✓ x∈⟦c⟧) complete₁ K ¬⟨ c ⟩ x x∉⟦c⟧ = -atom (λ K⊫x∈c → x∉⟦c⟧ (is! K⊫x∈c)) complete₁ K ⊤ x x∈⟦C⟧ = top complete₁ K ⊥ x () complete₁ K (C ⊓ D) x (x∈⟦C⟧ , x∈⟦D⟧) = (complete₁ K C x x∈⟦C⟧ , complete₁ K D x x∈⟦D⟧) complete₁ K (C ⊔ D) x (inj₁ x∈⟦C⟧) = inj₁ (complete₁ K C x x∈⟦C⟧) complete₁ K (C ⊔ D) x (inj₂ x∈⟦D⟧) = inj₂ (complete₁ K D x x∈⟦D⟧) complete₁ K (∀[ R ] C) x x∈⟦∀RC⟧ = all (λ y K⊫xy∈R → complete₁ K C y (x∈⟦∀RC⟧ y (sound₂ K R _ K⊫xy∈R))) complete₁ K (∃⟨ R ⟩ C) x (y , xy∈⟦R⟧ , y∈⟦C⟧) = ex y (complete₂ K R (x , y) xy∈⟦R⟧) (complete₁ K C y y∈⟦C⟧) complete₁ K (≤1 R) x x∈⟦≤1R⟧ = uniq (λ y z K⊫xy∈R K⊫xz∈R → complete∼ K y z (x∈⟦≤1R⟧ y z (sound₂ K R _ K⊫xy∈R) (sound₂ K R _ K⊫xz∈R))) complete₁ K (>1 R) x (y , z , xy∈⟦R⟧ , xz∈⟦R⟧ , y≉z) = ¬uniq y z (complete₂ K R _ xy∈⟦R⟧) (complete₂ K R _ xz∈⟦R⟧) (λ K⊫y∼z → y≉z (sound∼ K y z K⊫y∼z)) ⊫-impl-min⊨ : ∀ K L → (K ⊫k L) → (min K ⊨ L) ⊫-impl-min⊨ K L (K⊫T , K⊫A) = ( J⊨T K⊫T , J⊨A K⊫A ) where J : Interp Σ X J = min K J⊨T : ∀ {T} → (K ⊫t T) → (⌊ J ⌋ ⊨t T) J⊨T ε = tt J⊨T (K⊫T , K⊫U) = (J⊨T K⊫T , J⊨T K⊫U) J⊨T (rl Q R K⊫Q⊑R) = λ {xy} xy∈⟦Q⟧ → sound₂ K R xy (K⊫Q⊑R xy (complete₂ K Q xy xy∈⟦Q⟧)) J⊨T (cn C D K⊫C⊑D) = λ {x} → lemma x (K⊫C⊑D x) where lemma : ∀ x → (K ⊫ x ∈₁ (neg C ⊔ D)) → (x ∈ ⌊ J ⌋ ⟦ C ⟧₁) → (x ∈ ⌊ J ⌋ ⟦ D ⟧₁) lemma x (inj₁ K⊫x∈¬C) x∈⟦C⟧ = elim (neg-sound ⌊ J ⌋ {x} C (sound₁ K (neg C) x K⊫x∈¬C) x∈⟦C⟧) lemma x (inj₂ K⊫x∈D) x∈⟦C⟧ = sound₁ K D x K⊫x∈D J⊨T (dis Q R K⊫DisQR) = λ {xy} xy∈⟦Q⟧ xy∈⟦R⟧ → K⊫DisQR xy (complete₂ K Q xy xy∈⟦Q⟧) (complete₂ K R xy xy∈⟦R⟧) J⊨T (ref R K⊫RefR) = λ x → sound₂ K R (x , x) (K⊫RefR x) J⊨T (irr R K⊫IrrR) = λ x xx∈⟦R⟧ → K⊫IrrR x (complete₂ K R (x , x) xx∈⟦R⟧) J⊨T (tra R K⊫TraR) = λ {x} {y} {z} xy∈⟦R⟧ yz∈⟦R⟧ → sound₂ K R (x , z) (K⊫TraR x y z (complete₂ K R (x , y) xy∈⟦R⟧) (complete₂ K R (y , z) yz∈⟦R⟧)) J⊨A : ∀ {A} → (K ⊫a A) → (J ⊨a A) J⊨A ε = tt J⊨A (K⊫A , K⊫B) = (J⊨A K⊫A , J⊨A K⊫B) J⊨A (eq x y K⊫x∼y) = sound∼ K x y K⊫x∼y J⊨A (rl (x , y) r K⊫xy∈r) = sound₂ K ⟨ r ⟩ (x , y) K⊫xy∈r J⊨A (cn x c K⊫x∈c) = sound₁ K ⟨ c ⟩ x K⊫x∈c min⊨-impl-⊫ : ∀ K L → (min K ⊨ L) → (K ⊫k L) min⊨-impl-⊫ K L (J⊨T , J⊨A) = ( K⊫T (tbox L) J⊨T , K⊫A (abox L) J⊨A ) where J : Interp Σ X J = min K K⊫T : ∀ T → (⌊ J ⌋ ⊨t T) → (K ⊫t T) K⊫T ε J⊨ε = ε K⊫T (T , U) (J⊨T , J⊨U) = (K⊫T T J⊨T , K⊫T U J⊨U) K⊫T (Q ⊑₂ R) J⊨Q⊑R = rl Q R (λ xy K⊫xy∈Q → complete₂ K R xy (J⊨Q⊑R (sound₂ K Q xy K⊫xy∈Q))) K⊫T (C ⊑₁ D) J⊨C⊑D = cn C D lemma where lemma : ∀ x → (K ⊫ x ∈₁ neg C ⊔ D) lemma x with excl-middle (x ∈ ⌊ J ⌋ ⟦ C ⟧₁) lemma x | yes x∈⟦C⟧ = inj₂ (complete₁ K D x (J⊨C⊑D x∈⟦C⟧)) lemma x | no x∉⟦C⟧ = inj₁ (complete₁ K (neg C) x (neg-complete excl-middle ⌊ J ⌋ C x∉⟦C⟧)) K⊫T (Dis Q R) J⊨DisQR = dis Q R (λ xy K⊫xy∈Q K⊫xy∈R → J⊨DisQR (sound₂ K Q xy K⊫xy∈Q) (sound₂ K R xy K⊫xy∈R)) K⊫T (Ref R) J⊨RefR = ref R (λ x → complete₂ K R (x , x) (J⊨RefR x)) K⊫T (Irr R) J⊨IrrR = irr R (λ x K⊫xx∈R → J⊨IrrR x (sound₂ K R (x , x) K⊫xx∈R)) K⊫T (Tra R) J⊨TrR = tra R (λ x y z K⊫xy∈R K⊫yz∈R → complete₂ K R (x , z) (J⊨TrR (sound₂ K R (x , y) K⊫xy∈R) (sound₂ K R (y , z) K⊫yz∈R))) K⊫A : ∀ A → (J ⊨a A) → (K ⊫a A) K⊫A ε J⊨ε = ε K⊫A (A , B) (J⊨A , J⊨B) = (K⊫A A J⊨A , K⊫A B J⊨B) K⊫A (x ∼ y) x≈y = eq x y (complete∼ K x y x≈y) K⊫A (x ∈₁ c) x∈⟦c⟧ = cn x c (complete₁ K ⟨ c ⟩ x x∈⟦c⟧) K⊫A ((x , y) ∈₂ r) xy∈⟦r⟧ = rl (x , y) r (complete₂ K ⟨ r ⟩ (x , y) xy∈⟦r⟧) min-med : ∀ (K : KB Σ X) J → (J ⊨ K) → Mediated₀ (min K) J min-med K J J⊨K = (meet-lb excl-middle₁ (Interps K) J J⊨K , meet-uniq excl-middle₁ (Interps K) J J⊨K) min-init : ∀ (K : KB Σ X) → (K ⊫k K) → (min K ∈ Initial₀ K) min-init K K⊫K = ( ⊫-impl-min⊨ K K K⊫K , min-med K) min-uniq : ∀ (I : Interp Σ X) (K : KB Σ X) → (I ∈ Surjective) → (I ∈ Initial₀ K) → (I ≃ min K) min-uniq I K I∈Surj (I⊨K , I-med) = ( iso ≲⌊ meet-glb excl-middle₁ (Interps K) I I∈Surj lemma₁ ⌋ ≲⌊ meet-lb excl-middle₁ (Interps K) I I⊨K ⌋ (λ x → ≈-sym ⌊ I ⌋ (surj✓ I∈Surj x)) (λ x → is! (lemma₂ x)) , λ x → is! (lemma₂ x)) where lemma₁ : ∀ J J⊨K → I ≲ J lemma₁ J J⊨K with I-med J J⊨K lemma₁ J J⊨K | (I≲J , I≲J-uniq) = I≲J lemma₂ : ∀ x J J⊨K → ⌊ J ⌋ ⊨ ind J (ind⁻¹ I∈Surj (ind I x)) ≈ ind J x lemma₂ x J J⊨K = ≈-trans ⌊ J ⌋ (≈-sym ⌊ J ⌋ (≲-resp-ind (lemma₁ J J⊨K) (ind⁻¹ I∈Surj (ind I x)))) (≈-trans ⌊ J ⌋ (≲-resp-≈ ≲⌊ lemma₁ J J⊨K ⌋ (≈-sym ⌊ I ⌋ (surj✓ I∈Surj (ind I x)))) (≲-resp-ind (lemma₁ J J⊨K) x)) ⊫-impl-⊨₀ : ∀ (KB₁ KB₂ : KB Σ X) → (KB₁ ⊫k KB₁) → (KB₁ ⊫k KB₂) → (sur KB₁ ⊨₀ KB₂) ⊫-impl-⊨₀ KB₁ KB₂ KB₁⊫KB₁ KB₁⊫KB₂ = ( min KB₁ , meet-surj excl-middle₁ (Interps KB₁) , min-init KB₁ KB₁⊫KB₁ , ⊫-impl-min⊨ KB₁ KB₂ KB₁⊫KB₂ ) ⊨₀-impl-⊫₁ : ∀ (KB₁ KB₂ : KB Σ X) → (sur KB₁ ⊨₀ KB₂) → (KB₁ ⊫k KB₁) ⊨₀-impl-⊫₁ KB₁ KB₂ (I , I∈Surj , (I⊨KB₁ , I-med) , I⊨KB₂) = min⊨-impl-⊫ KB₁ KB₁ (⊨-resp-≃ (min-uniq I KB₁ I∈Surj (I⊨KB₁ , I-med)) KB₁ I⊨KB₁) ⊨₀-impl-⊫₂ : ∀ (KB₁ KB₂ : KB Σ X) → (sur KB₁ ⊨₀ KB₂) → (KB₁ ⊫k KB₂) ⊨₀-impl-⊫₂ KB₁ KB₂ (I , I∈Surj , I-init , I⊨KB₂) = min⊨-impl-⊫ KB₁ KB₂ (⊨-resp-≃ (min-uniq I KB₁ I∈Surj I-init) KB₂ I⊨KB₂)
Assembly Practice/8_bit addition/Sources/main.asm
asheemchhetri/ECE362
0
7162
;Write a program to add the numbers stored at memory locations $1000, $1001, and $1002 ;and store the sum at memory location $1010. org $800 ldaa $1000 adda $1001 adda $1002 staa $1010 end
etude/etude18.als
nishio/learning_alloy
1
3933
<gh_stars>1-10 one sig StateManager { state: set State } sig State {} //fact { // all s: State | s in StateManager.state //} run {} for exactly 3 State
engine/events/basement_key.asm
Dev727/ancientplatinum
28
94761
_BasementKey: ; Are we even in the right map to use this? ld a, [wMapGroup] cp GROUP_GOLDENROD_UNDERGROUND jr nz, .nope ld a, [wMapNumber] cp MAP_GOLDENROD_UNDERGROUND jr nz, .nope ; Are we on the tile in front of the door? call GetFacingTileCoord ld a, d cp 22 jr nz, .nope ld a, e cp 10 jr nz, .nope ; Let's use the Basement Key ld hl, .BasementKeyScript call QueueScript ld a, TRUE ld [wItemEffectSucceeded], a ret .nope ld a, FALSE ld [wItemEffectSucceeded], a ret .BasementKeyScript: closetext farsjump BasementDoorScript
Examples/b16.asm
satadriver/LiunuxOS
0
88250
<reponame>satadriver/LiunuxOS TITLE (.asm) ; This program ; Last update: Include Irvine16.inc .data .code main PROC mov ax,@data mov ds,ax exit main ENDP END main
boot/memory.asm
semahawk/kernel
0
242025
<reponame>semahawk/kernel enter_unreal_mode: ; disable interrupts cli ; save the data segment push ds ; load the GDT lgdt [gdt] ; set the PE bit mov eax, cr0 or al, 1 mov cr0, eax ; tell 386/486 not to crash jmp $+2 ; select the code descriptor mov bx, 0x08 mov ds, bx ; unset the PE bit, back to real mode and al, 0xfe mov cr0, eax ; restore the data segment pop ds ; enable interrupts sti ret detect_memory: xor eax, eax mov es, eax mov edi, memory_map ; point es:edi to the memory map buffer mov eax, 0xe820 xor ebx, ebx ; ebx must be 0 mov ecx, 24 ; ask for 24 bytes mov edx, 0x534d4150 int 15h jc .fail mov edx, 0x534d4150 cmp eax, edx jne .fail ; ebx == 0 implies list is only 1 entry long (so, worthless) test ebx, ebx je .fail jmp .skip_interrupt .next_entry: mov eax, 0xe820 mov ecx, 24 ; ask for 24 bytes mov [es:di + 20], dword 1 ; force a valid ACPI 3.X entry int 15h jc .ok ; carry set means "end of list already reached" mov edx, 0x534d4150 ; repair potentially trashed register .skip_interrupt: jcxz .skip_entry ; skip any 0 length entries cmp cl, 20 ; got a 24 byte ACPI 3.X response? jbe .not_extended test byte [es:di + 20], 1 ; if so: is the "ignore this data" bit clear? je .skip_entry .not_extended: mov ecx, [es:di + 8] ; get lower dword of memory region length or ecx, [es:di + 12] ; "or" it with upper dword to test for zero jz .skip_entry ; if length qword is 0; skip entry add edi, 24 ; point to the next entry in the buffer .skip_entry: test ebx, ebx ; if ebx is 0, list is complete jne .next_entry .ok: clc ; I'm not sure if that's necessary ret .fail: error ; vi: ft=nasm:ts=2:sw=2 expandtab
alloy4fun_models/trashltl/models/5/YPWWvNPemRmKXvMfz.als
Kaixi26/org.alloytools.alloy
0
3394
open main pred idYPWWvNPemRmKXvMfz_prop6 { always ( all f: File | f in Trash triggered f in Trash ) } pred __repair { idYPWWvNPemRmKXvMfz_prop6 } check __repair { idYPWWvNPemRmKXvMfz_prop6 <=> prop6o }
programs/oeis/133/A133405.asm
neoneye/loda
22
93819
<gh_stars>10-100 ; A133405: a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4). ; 0,0,0,1,3,9,26,78,234,703,2109,6327,18980,56940,170820,512461,1537383,4612149,13836446,41509338,124528014,373584043,1120752129,3362256387,10086769160,30260307480,90780922440,272342767321,817028301963,2451084905889,7353254717666 mov $1,3 pow $1,$0 add $1,6 div $1,7 add $1,9 div $1,4 sub $1,2 mov $0,$1
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_PAL/Fra_asm/zel_init.asm
prismotizm/gigaleak
0
246671
<gh_stars>0 Name: zel_init.asm Type: file Size: 281006 Last-Modified: '2016-05-13T04:20:48Z' SHA-1: 94EB80770B2AE442EE6C9EA6D65B29332E1D054E Description: null
14-factorial/factorial.asm
gashev/assembly-examples
1
240924
<reponame>gashev/assembly-examples<filename>14-factorial/factorial.asm<gh_stars>1-10 extern exit extern printf SECTION .data format: db '%d! = %d', 10, 0 SECTION .text GLOBAL _start _start: ; Init factorial. mov rax, 1 ; Init index. mov rbx, 0 loop: ; Calc next factorial inc rbx mul rbx ; Print push rax mov rdx, rax ; Store factorial mov rsi, rbx ; Store index mov rdi, format ; Output format mov rax, 0 call printf pop rax ; Compare index value. cmp rbx, 10 jl loop end: ; Exit application. mov rdi, 0 call exit
programs/oeis/060/A060416.asm
jmorken/loda
1
86308
; A060416: a(n) = n*4^n - 1. ; 1,3,31,191,1023,5119,24575,114687,524287,2359295,10485759,46137343,201326591,872415231,3758096383,16106127359,68719476735,292057776127,1236950581247,5222680231935,21990232555519,92358976733183,387028092977151,1618481116086271,6755399441055743 mov $1,2 lpb $0 pow $1,$0 pow $1,2 mul $1,$0 trn $0,$1 lpe sub $1,1
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/test_call.adb
best08618/asylo
7
7173
<reponame>best08618/asylo<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/test_call.adb -- { dg-do compile } with System; with Ada.Unchecked_Conversion; procedure Test_Call is type F_ACC is access function (Str : String) return String; function Do_Something (V : F_Acc) return System.Address is begin return System.Null_Address; end Do_Something; function BUG_1 (This : access Integer) return F_Acc is begin return null; end BUG_1; function Unch is new Ada.Unchecked_Conversion (F_Acc, System.Address); Func : System.Address := Unch (BUG_1 (null)); V : System.Address := Do_Something (BUG_1 (null)); begin null; end Test_Call;
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_PutSprClr_callee.asm
meesokim/z88dk
0
173196
<filename>libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_PutSprClr_callee.asm<gh_stars>0 ; void __CALLEE__ sp1_PutSprClr_callee(uchar **sprdest, struct sp1_ap *src, uchar n) ; 02.2006 aralbrec, Sprite Pack v3.0 ; sinclair zx version SECTION code_temp_sp1 PUBLIC sp1_PutSprClr_callee sp1_PutSprClr_callee: pop hl pop bc ld b,c pop de ex (sp),hl INCLUDE "temp/sp1/zx/sprites/asm_sp1_PutSprClr.asm"
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_390_1066.asm
ljhsiun2/medusa
9
14661
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_D_ht+0x9cc1, %r10 xor $10132, %r8 movw $0x6162, (%r10) nop nop nop nop nop add %r9, %r9 lea addresses_D_ht+0xa979, %r12 nop nop nop nop nop and %rax, %rax mov $0x6162636465666768, %r11 movq %r11, (%r12) nop nop nop dec %r10 lea addresses_D_ht+0xb419, %rsi lea addresses_UC_ht+0x2d69, %rdi nop nop nop nop add $48083, %r11 mov $90, %rcx rep movsq nop sub %r10, %r10 lea addresses_A_ht+0x1a6c9, %r12 nop nop nop nop nop xor $12280, %r10 movl $0x61626364, (%r12) nop nop dec %rcx lea addresses_WT_ht+0x3a1b, %rdi nop nop nop nop nop dec %r8 mov $0x6162636465666768, %r11 movq %r11, (%rdi) nop nop nop cmp $27808, %r12 lea addresses_D_ht+0x51a5, %r9 nop nop nop nop cmp $32652, %r12 movb $0x61, (%r9) sub %r9, %r9 lea addresses_normal_ht+0x2b9, %r12 nop nop nop nop dec %rdi mov $0x6162636465666768, %r8 movq %r8, %xmm4 movups %xmm4, (%r12) nop nop nop cmp %rax, %rax lea addresses_WC_ht+0x17a85, %rsi lea addresses_WC_ht+0x1cb79, %rdi nop nop nop sub $16370, %r11 mov $40, %rcx rep movsq nop lfence lea addresses_D_ht+0xf8b9, %rax nop nop nop nop nop cmp $50733, %rdi movb $0x61, (%rax) nop xor %r9, %r9 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r8 push %rax push %rbp push %rdi push %rdx // Load mov $0x5d9b400000000fd9, %r14 nop nop nop nop xor $58868, %r10 mov (%r14), %r8 nop nop cmp $62538, %rbp // Load lea addresses_WC+0x19e79, %r14 add %rax, %rax vmovaps (%r14), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %r8 nop nop nop xor %rdi, %rdi // Store lea addresses_normal+0x6859, %r10 nop nop cmp %rdx, %rdx mov $0x5152535455565758, %r8 movq %r8, %xmm0 movups %xmm0, (%r10) nop nop nop nop add %rdx, %rdx // Faulty Load lea addresses_PSE+0x1a8b9, %rbp nop nop nop nop nop inc %rdi mov (%rbp), %rdx lea oracles, %r10 and $0xff, %rdx shlq $12, %rdx mov (%r10,%rdx,1), %rdx pop %rdx pop %rdi pop %rbp pop %rax pop %r8 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': True}} {'33': 390} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
Include/IOName_Standard.asm
absindx/NES-RamEdit
0
6984
<gh_stars>0 ;-------------------------------------------------- ; IO name - Standard(PPU, APU) ;-------------------------------------------------- IO_PPU_Setting = $2000 ; npsbsimm IO_PPU_Display = $2001 ; rgbsbsbc IO_PPU_Status = $2002 ; v0cs---- IO_PPU_SpriteAddress = $2003 ; dddddddd IO_PPU_SpriteAccess = $2004 ; dddddddd IO_PPU_Scroll = $2005 ; dddddddd IO_PPU_VRAMAddress = $2006 ; dddddddd IO_PPU_VRAMAccess = $2007 ; dddddddd IO_APU_Square1_1 = $4000 ; ddlerrrr IO_APU_Square1_2 = $4001 ; fssshrrr IO_APU_Square1_3 = $4002 ; ffffffff IO_APU_Square1_4 = $4003 ; cccccfff IO_APU_Square2_1 = $4004 ; ddlerrrr IO_APU_Square2_2 = $4005 ; fssshrrr IO_APU_Square2_3 = $4006 ; ffffffff IO_APU_Square2_4 = $4007 ; cccccfff IO_APU_Triangle_1 = $4008 ; flllllll ;IO_APU_Triangle_2 = $4009 ; -------- IO_APU_Triangle_3 = $400A ; ffffffff IO_APU_Triangle_4 = $400B ; cccccfff IO_APU_Noise_1 = $400C ; --lerrrr ;IO_APU_Noise_2 = $400D ; -------- IO_APU_Noise_3 = $400E ; r---ffff IO_APU_Noise_4 = $400F ; ccccc--- IO_APU_DPCM_1 = $4010 ; ir--ffff IO_APU_DPCM_2 = $4011 ; -fffffff IO_APU_DPCM_3 = $4012 ; aaaaaaaa IO_APU_DPCM_4 = $4013 ; llllllll IO_Sprite_DMA = $4014 ; aaaaaaaa IO_APU_KeyonFlag = $4015 ; ii-dntss IO_Controller_Port1 = $4016 ; ---ccccc IO_Controller_Port2 = $4017 ; u--ccccc
dataToTestOn/asm/test.asm
Epacik/8051-ASM-Plugin
1
88639
LJMP START ORG 100H START: MOV R0,#30H ;adres bufora wyboru wskaźnika MOV R1,#38H ;adres bufora danych wskaźnika MOV R3, #23 MOV A,#01111110B MOVX @R0,A ;wpisz wybrane wskaźniki MOV A,#00000110B MOVX @R1,A ;wpisz wybrane segmenty CLR P1.6 ;włącz wyświetlacz 7-segm SJMP $
src/fixed_types-short.ads
gusthoff/fixed_types
0
29076
------------------------------------------------------------------------------- -- -- FIXED TYPES -- -- Fixed_Short & Fixed_Sat_Short definitions -- -- The MIT License (MIT) -- -- Copyright (c) 2015 <NAME> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to -- deal in the Software without restriction, including without limitation the -- rights to use, copy, modify, merge, publish, distribute, sublicense, and / -- or sell copies of the Software, and to permit persons to whom the Software -- is furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -- IN THE SOFTWARE. ------------------------------------------------------------------------------- with Ada.Unchecked_Conversion; package Fixed_Types.Short is Fixed_Depth : constant Positive := 16; type Fixed_Short is delta 1.0 / 2.0 ** (Fixed_Depth - 1) range -1.0 .. 1.0 with Size => Fixed_Depth; type Fixed_Sat_Short is new Fixed_Short; pragma Suppress (Overflow_Check, on => Fixed_Short); pragma Suppress (Range_Check, on => Fixed_Short); -- pragma Suppress (All_checks, on => Fixed_Short); type Fixed_Integer_Short is range -2**(Fixed_Depth - 1) .. 2**(Fixed_Depth - 1) - 1 with Size => Fixed_Depth; type Modular_Short is mod 2 ** Fixed_Depth with Size => Fixed_Depth; function To_Fixed_Integer_Short is new Ada.Unchecked_Conversion (Fixed_Short, Fixed_Integer_Short); function To_Fixed_Integer_Short is new Ada.Unchecked_Conversion (Fixed_Sat_Short, Fixed_Integer_Short); function To_Fixed_Short is new Ada.Unchecked_Conversion (Fixed_Integer_Short, Fixed_Short); function To_Fixed_Sat_Short is new Ada.Unchecked_Conversion (Fixed_Integer_Short, Fixed_Sat_Short); function Fixed_Short_To_Mod_Short is new Ada.Unchecked_Conversion (Fixed_Short, Modular_Short); function Fixed_Sat_Short_To_Mod_Short is new Ada.Unchecked_Conversion (Fixed_Sat_Short, Modular_Short); overriding function "abs" (A : Fixed_Sat_Short) return Fixed_Sat_Short; overriding function "+" (A, B : Fixed_Sat_Short) return Fixed_Sat_Short; overriding function "-" (A, B : Fixed_Sat_Short) return Fixed_Sat_Short; overriding function "-" (A : Fixed_Sat_Short) return Fixed_Sat_Short; not overriding function "*" (A, B : Fixed_Sat_Short) return Fixed_Sat_Short; overriding function "*" (A : Fixed_Sat_Short; B : Integer) return Fixed_Sat_Short; end Fixed_Types.Short;
src/asf-events-faces-actions.adb
jquorning/ada-asf
12
27753
<filename>src/asf-events-faces-actions.adb ----------------------------------------------------------------------- -- asf-events-faces-actions -- Actions Events -- Copyright (C) 2009, 2010, 2011, 2012, 2013 <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. ----------------------------------------------------------------------- package body ASF.Events.Faces.Actions is -- ------------------------------ -- Get the method expression to invoke -- ------------------------------ function Get_Method (Event : in Action_Event) return EL.Expressions.Method_Expression is begin return Event.Method; end Get_Method; -- ------------------------------ -- Get the method binding with the Ada bean object to invoke. -- ------------------------------ function Get_Method_Info (Event : in Action_Event; Context : in Contexts.Faces.Faces_Context'Class) return EL.Expressions.Method_Info is begin return Event.Method.Get_Method_Info (Context => Context.Get_ELContext.all); end Get_Method_Info; -- ------------------------------ -- Post an <b>Action_Event</b> on the component. -- ------------------------------ procedure Post_Event (UI : in out Components.Base.UIComponent'Class; Method : in EL.Expressions.Method_Expression) is Ev : constant Action_Event_Access := new Action_Event; begin Ev.Phase := ASF.Events.Phases.INVOKE_APPLICATION; Ev.Component := UI'Unchecked_Access; Ev.Method := Method; UI.Queue_Event (Ev.all'Access); end Post_Event; end ASF.Events.Faces.Actions;
core/move.asm
cristoferfb/columns
0
169081
<gh_stars>0 ; Esto basicamente checkea si es posible realizar ; un movimiento hacia alguna direccion, de ser posible ; se modifican las variables correspondientes down: call check_down mov al,[block_y] cmp al,18 je no_move inc al mov [block_y],al ret right: call check_rc mov al,[block_x] cmp al,22 je no_move inc al mov [block_x],al ret left: call check_lc mov al,[block_x] cmp al,17 je no_move dec al mov [block_x],al ret no_move: ret change: ; Esto rota los colores ; del bloque actual mov al,[cblock_color_1] mov ah,[cblock_color_2] mov [cblock_color_2],al mov al,[cblock_color_3] mov [cblock_color_3],ah mov [cblock_color_1],al ret
src/implementation/cl-memory-images.adb
flyx/OpenCLAda
8
12970
-------------------------------------------------------------------------------- -- Copyright (c) 2013, <NAME> <<EMAIL>> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- with CL.Helpers; with CL.API; with CL.Enumerations; package body CL.Memory.Images is function Image_Size_Info is new Helpers.Get_Parameter (Return_T => CL.Size, Parameter_T => Enumerations.Image_Info, C_Getter => API.Get_Image_Info); function Supported_Image_Formats (Context : Contexts.Context; Mode : Access_Kind; Img_Type : Image_Type; Use_Host_Memory : Boolean := False) return Image_Format_List is Flags : constant Memory_Flags := Create_Flags (Mode => Mode, Alloc_Host_Ptr => Use_Host_Memory, Use_Host_Ptr => False, Copy_Host_Ptr => False); Num_Values : aliased UInt; Error : Enumerations.Error_Code; begin Error := API.Get_Supported_Image_Formats (CL_Object (Context).Location, To_Bitfield (Flags), Img_Type, 0, System.Null_Address, Num_Values'Unchecked_Access); Helpers.Error_Handler (Error); declare Returned_Values : Image_Format_List (1 .. Integer (Num_Values)); begin Error := API.Get_Supported_Image_Formats (CL_Object (Context).Location, To_Bitfield (Flags), Img_Type, Num_Values, Returned_Values (1)'Address, null); Helpers.Error_Handler (Error); return Returned_Values; end; end Supported_Image_Formats; package body Constructors is -- Analogous to Create_Buffer function Create_Image2D (Context : Contexts.Context'Class; Mode : Access_Kind; Format : Image_Format; Width : CL.Size; Height : CL.Size; Row_Pitch : CL.Size; Use_Host_Memory : Boolean := False) return Image2D is Flags : constant Memory_Flags := Create_Flags (Mode => Mode, Alloc_Host_Ptr => Use_Host_Memory, Use_Host_Ptr => False, Copy_Host_Ptr => False); Raw_Object : System.Address; Error : aliased Enumerations.Error_Code; Format_Obj : aliased Image_Format := Format; begin Raw_Object := API.Create_Image2D (CL_Object (Context).Location, To_Bitfield (Flags), Format_Obj'Unchecked_Access, Width, Height, Row_Pitch, System.Null_Address, Error'Unchecked_Access); Helpers.Error_Handler (Error); return Image2D'(Ada.Finalization.Controlled with Location => Raw_Object); end Create_Image2D; -- Analogous to Create_Buffer function Create_Image3D (Context : Contexts.Context'Class; Mode : Access_Kind; Format : Image_Format; Width : CL.Size; Height : CL.Size; Depth : CL.Size; Row_Pitch : CL.Size; Slice_Pitch : CL.Size; Use_Host_Memory : Boolean := False) return Image3D is Flags : constant Memory_Flags := Create_Flags (Mode => Mode, Alloc_Host_Ptr => Use_Host_Memory, Use_Host_Ptr => False, Copy_Host_Ptr => False); Raw_Object : System.Address; Error : aliased Enumerations.Error_Code; Format_Obj : aliased Image_Format := Format; begin Raw_Object := API.Create_Image3D (CL_Object (Context).Location, To_Bitfield (Flags), Format_Obj'Unchecked_Access, Width, Height, Depth, Row_Pitch, Slice_Pitch, System.Null_Address, Error'Unchecked_Access); Helpers.Error_Handler (Error); return Image3D'(Ada.Finalization.Controlled with Location => Raw_Object); end Create_Image3D; function Create_Image2D_From_Source (Context : Contexts.Context'Class; Mode : Access_Kind; Format : Image_Format; Width : CL.Size; Height : CL.Size; Row_Pitch : CL.Size; Source : Element_List; Use_Source_As_Image : Boolean := False; Use_Host_Memory : Boolean := False) return Image2D is Flags : Memory_Flags; Raw_Object : System.Address; Error : aliased Enumerations.Error_Code; Element_Format : aliased Image_Format := Format; begin if Use_Source_As_Image then if not Use_Host_Memory then raise Invalid_Value with "Use_Source_As_Buffer requires Use_Host_Memory."; end if; Flags := Create_Flags (Mode => Mode, Use_Host_Ptr => True, Copy_Host_Ptr => False, Alloc_Host_Ptr => False); else Flags := Create_Flags (Mode => Mode, Use_Host_Ptr => False, Copy_Host_Ptr => True, Alloc_Host_Ptr => Use_Host_Memory); end if; -- check if Source has required size. -- do not check for other errors as this will be done by OpenCL. if (Row_Pitch = 0) then if (Source'Length < Width * Height) then raise Invalid_Source_Size; end if; elsif (Source'Size / System.Storage_Unit < Row_Pitch * Height) then raise Invalid_Source_Size; end if; Raw_Object := API.Create_Image2D (Context => CL_Object (Context).Location, Flags => To_Bitfield (Flags), Format => Element_Format'Unchecked_Access, Width => Width, Height => Height, Row_Pitch => Row_Pitch, Host_Ptr => Source (1)'Address, Error => Error'Unchecked_Access); Helpers.Error_Handler (Error); return Image2D'(Ada.Finalization.Controlled with Location => Raw_Object); end Create_Image2D_From_Source; function Create_Image3D_From_Source (Context : Contexts.Context'Class; Mode : Access_Kind; Format : Image_Format; Width : CL.Size; Height : CL.Size; Depth : CL.Size; Row_Pitch : CL.Size; Slice_Pitch : CL.Size; Source : Element_List; Use_Source_As_Image : Boolean := False; Use_Host_Memory : Boolean := False) return Image3D is Flags : Memory_Flags; Raw_Object : System.Address; Error : aliased Enumerations.Error_Code; Element_Format : aliased Image_Format := Format; begin if Use_Source_As_Image then if not Use_Host_Memory then raise Invalid_Value with "Use_Source_As_Buffer requires Use_Host_Memory."; end if; Flags := Create_Flags (Mode => Mode, Use_Host_Ptr => True, Copy_Host_Ptr => False, Alloc_Host_Ptr => False); else Flags := Create_Flags (Mode => Mode, Use_Host_Ptr => False, Copy_Host_Ptr => True, Alloc_Host_Ptr => Use_Host_Memory); end if; if Slice_Pitch = 0 then if Row_Pitch = 0 then if Source'Length < Width * Height * Depth then raise Invalid_Source_Size; end if; elsif Source'Size < Row_Pitch * Height * Depth then raise Invalid_Source_Size; end if; elsif Source'Size < Slice_Pitch * Depth then raise Invalid_Source_Size; end if; Raw_Object := API.Create_Image3D (Context => CL_Object (Context).Location, Flags => To_Bitfield (Flags), Format => Element_Format'Unchecked_Access, Width => Width, Height => Height, Depth => Depth, Row_Pitch => Row_Pitch, Slice_Pitch => Slice_Pitch, Host_Ptr => Source (1)'Address, Error => Error'Unchecked_Access); Helpers.Error_Handler (Error); return Image3D'(Ada.Finalization.Controlled with Location => Raw_Object); end Create_Image3D_From_Source; end Constructors; function Format (Source : Image) return Image_Format is function Getter is new Helpers.Get_Parameter (Return_T => Image_Format, Parameter_T => Enumerations.Image_Info, C_Getter => API.Get_Image_Info); begin return Getter (Source, Enumerations.Format); end Format; function Element_Size (Source : Image) return CL.Size is begin return Image_Size_Info (Source, Enumerations.Element_Size); end Element_Size; function Row_Pitch (Source : Image) return CL.Size is begin return Image_Size_Info (Source, Enumerations.Row_Pitch); end Row_Pitch; function Slice_Pitch (Source : Image3D) return CL.Size is begin return Image_Size_Info (Source, Enumerations.Slice_Pitch); end Slice_Pitch; function Width (Source : Image) return CL.Size is begin return Image_Size_Info (Source, Enumerations.Width); end Width; function Height (Source : Image) return CL.Size is begin return Image_Size_Info (Source, Enumerations.Height); end Height; function Depth (Source : Image3D) return CL.Size is begin return Image_Size_Info (Source, Enumerations.Depth); end Depth; end CL.Memory.Images;
libsrc/math/cpcmath/float.asm
RC2014Z80/z88dk
8
97749
; ; CPC Maths Routines ; ; August 2003 **_|warp6|_** <kbaccam /at/ free.fr> ; ; $Id: float.asm,v 1.4 2016-06-22 19:50:49 dom Exp $ ; SECTION code_fp INCLUDE "cpcfp.def" INCLUDE "cpcfirm.def" PUBLIC float EXTERN int_inv_sgn PUBLIC floatc EXTERN fa .float ld a,h push af bit 7,h call nz,int_inv_sgn ; hl=-hl si nz pop af ld de,fa+1 call firmware .floatc defw CPCFP_INT_2_FLO ; (fa+1)<-hl et signe=bit 7,a ret
test/Fail/Issue964.agda
shlevy/agda
1,989
944
<gh_stars>1000+ -- Andreas, 2016-08-04, issue #964 -- Allow open metas and interaction points in imported files -- {-# OPTIONS -v import:100 #-} -- {-# OPTIONS -v meta.postulate:20 #-} -- {-# OPTIONS -v tc.conv.level:50 #-} open import Common.Level open import Common.Equality postulate something : Set₁ open import Common.Issue964.UnsolvedMetas something test = M.N.meta3 shouldFail : _≡_ {A = Level} meta (lsuc (lsuc lzero)) shouldFail = refl -- WAS: WEIRD ERROR: -- Set (Set .Issue964.UnsolvedMetas.1) != Set₂ -- when checking that the expression refl has type -- meta ≡ lsuc (lsuc lzero) -- NOW: -- Set (.Issue964.UnsolvedMetas.unsolved#meta.1 something) != Set₂ -- when checking that the expression refl has type -- meta ≡ lsuc (lsuc lzero)
source/oasis/program-elements-identifiers.ads
reznikmm/gela
0
3244
<reponame>reznikmm/gela -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Element_Vectors; with Program.Elements.Expressions; with Program.Lexical_Elements; with Program.Elements.Defining_Identifiers; package Program.Elements.Identifiers is pragma Pure (Program.Elements.Identifiers); type Identifier is limited interface and Program.Elements.Expressions.Expression; type Identifier_Access is access all Identifier'Class with Storage_Size => 0; not overriding function Image (Self : Identifier) return Text is abstract; not overriding function Corresponding_Defining_Identifier (Self : Identifier) return Program.Elements.Defining_Identifiers.Defining_Identifier_Access is abstract; type Identifier_Text is limited interface; type Identifier_Text_Access is access all Identifier_Text'Class with Storage_Size => 0; not overriding function To_Identifier_Text (Self : in out Identifier) return Identifier_Text_Access is abstract; not overriding function Identifier_Token (Self : Identifier_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; type Identifier_Vector is limited interface and Program.Element_Vectors.Element_Vector; type Identifier_Vector_Access is access all Identifier_Vector'Class with Storage_Size => 0; overriding function Element (Self : Identifier_Vector; Index : Positive) return not null Program.Elements.Element_Access is abstract with Post'Class => Element'Result.Is_Identifier; function To_Identifier (Self : Identifier_Vector'Class; Index : Positive) return not null Identifier_Access is (Self.Element (Index).To_Identifier); end Program.Elements.Identifiers;