max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_631_1917.asm | ljhsiun2/medusa | 9 | 245547 | <filename>Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_631_1917.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x700d, %rdx
nop
nop
cmp $24574, %rcx
mov (%rdx), %ebx
nop
inc %r12
lea addresses_D_ht+0x56b3, %rax
nop
nop
nop
nop
nop
sub $2589, %r12
mov $0x6162636465666768, %r14
movq %r14, %xmm2
and $0xffffffffffffffc0, %rax
movntdq %xmm2, (%rax)
nop
and %r12, %r12
lea addresses_WC_ht+0x18ab3, %rsi
lea addresses_WT_ht+0x11fe3, %rdi
nop
nop
xor %r12, %r12
mov $57, %rcx
rep movsq
nop
nop
nop
and %rdi, %rdi
lea addresses_UC_ht+0x10ab3, %rsi
lea addresses_normal_ht+0x1e2b3, %rdi
nop
nop
nop
nop
cmp $49965, %rax
mov $50, %rcx
rep movsq
nop
add %rax, %rax
lea addresses_normal_ht+0x10db3, %r12
nop
nop
nop
nop
nop
sub %rax, %rax
mov $0x6162636465666768, %rsi
movq %rsi, (%r12)
nop
nop
nop
nop
and $35644, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
// Load
lea addresses_PSE+0xe2b3, %rdi
nop
xor $40194, %rcx
movups (%rdi), %xmm0
vpextrq $0, %xmm0, %r14
nop
nop
nop
xor $24530, %rcx
// Store
mov $0x1c89390000000fb3, %r11
nop
nop
cmp %r9, %r9
movb $0x51, (%r11)
cmp $24637, %r14
// Store
lea addresses_UC+0xeeb3, %rdi
nop
nop
nop
nop
sub $31299, %rcx
movl $0x51525354, (%rdi)
nop
nop
nop
cmp %r11, %r11
// Load
lea addresses_RW+0x8a7c, %r11
nop
inc %r8
mov (%r11), %rax
nop
nop
nop
nop
cmp $47261, %rax
// Faulty Load
lea addresses_PSE+0xe2b3, %rcx
nop
nop
nop
cmp %rax, %rax
vmovups (%rcx), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r8
lea oracles, %r14
and $0xff, %r8
shlq $12, %r8
mov (%r14,%r8,1), %r8
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_PSE', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_NC', 'size': 1, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_UC', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 8, 'AVXalign': True}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 1, 'NT': True, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': True, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}}
{'33': 631}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
Streams/Substream.agda | hbasold/Sandbox | 0 | 5851 | <reponame>hbasold/Sandbox
-- | In this module we show that the substream relation is transitive.
open import Streams
open import Relation.Binary.PropositionalEquality as P
open import Data.Product
open import Function.Equivalence
mutual
record F : Set where
coinductive
field out : Fμ
data Fμ : Set where
pres : F → Fμ
drop : Fμ → Fμ
open F public
μfilter : ∀{A} → Fμ → Stream A → Stream A
filter : ∀{A} → F → Stream A → Stream A
filter x = μfilter (out x)
hd (μfilter (pres x) s) = hd s
tl (μfilter (pres x) s) = filter x (tl s)
μfilter (drop u) s = μfilter u (tl s)
comp : F → F → F
μcomp : Fμ → Fμ → Fμ
out (comp x y) = μcomp (out x) (out y)
μcomp (pres x) (pres y) = pres (comp x y)
μcomp (pres x) (drop v) = drop (μcomp (out x) v)
μcomp (drop u) v = drop (μcomp u v)
_•_ : F → F → F
y • x = comp x y
_•μ_ : Fμ → Fμ → Fμ
v •μ u = μcomp u v
filter-comp : ∀{A} → ∀ x y (s : Stream A) →
filter (y • x) s ~ filter y (filter x s)
μfilter-comp : ∀{A} → ∀ u v (s : Stream A) →
μfilter (v •μ u) s ~ μfilter v (μfilter u s)
filter-comp x y s = μfilter-comp (out x) (out y) s
hd~(μfilter-comp (pres x) (pres y) s) = refl
tl~(μfilter-comp (pres x) (pres y) s) = filter-comp x y (tl s)
μfilter-comp (pres x) (drop v) s = μfilter-comp (out x) v (tl s)
-- The following cases are just the same, they need to be there for Agda to
-- reduce the definition of μcomp
μfilter-comp (drop u) (pres x) s = μfilter-comp u (pres x) (tl s)
μfilter-comp (drop u) (drop v) s = μfilter-comp u (drop v) (tl s)
_≤[_]_ : ∀{A} → Stream A → F → Stream A → Set
s ≤[ x ] t = s ~ filter x t
_≤μ[_]_ : ∀{A} → Stream A → Fμ → Stream A → Set
s ≤μ[ x ] t = s ~ μfilter x t
mutual
record _≤_ {A : Set} (s t : Stream A) : Set where
coinductive
field out≤ : s ≤μ t
data _≤μ_ {A : Set} (s t : Stream A) : Set where
ma : hd s ≡ hd t → (tl s) ≤ (tl t) → s ≤μ t
sk : s ≤μ (tl t) → s ≤μ t
open _≤_ public
witness : ∀{A} {s t : Stream A} → s ≤ t → F
xwitness : ∀{A} {s t : Stream A} → s ≤μ t → Fμ
out (witness p) = xwitness (out≤ p)
xwitness (ma _ t≤) = pres (witness t≤)
xwitness (sk u) = drop (xwitness u)
impl₁ : ∀{A} {s t : Stream A} → (p : s ≤ t) → s ≤[ witness p ] t
ximpl₁ : ∀{A} {s t : Stream A} → (p : s ≤μ t) → s ≤μ[ xwitness p ] t
impl₁ {A} {s} {t} p = ximpl₁ (out≤ p)
hd~ (ximpl₁ (ma h≡ t≤)) = h≡
tl~ (ximpl₁ (ma h≡ t≤)) = impl₁ t≤
ximpl₁ (sk q) = ximpl₁ q
impl₂ : ∀{A} {s t : Stream A} (x : F) → s ≤[ x ] t → s ≤ t
ximpl₂ : ∀{A} {s t : Stream A} (u : Fμ) → s ≤μ[ u ] t → s ≤μ t
out≤ (impl₂ x p) = ximpl₂ (out x) p
ximpl₂ (pres x) p = ma (hd~ p) (impl₂ x (tl~ p))
ximpl₂ (drop u) p = sk (ximpl₂ u p)
≤⇔filter-≤ : ∀{A} (s t : Stream A) →
s ≤ t ⇔ ∃ λ p → s ≤[ p ] t
≤⇔filter-≤ s t = equivalence (λ x → witness x , impl₁ x)
(λ {(x , p) → impl₂ x p})
filter-resp~ : ∀{A} {s t : Stream A} (x : F) →
s ~ t → filter x s ~ filter x t
μfilter-resp~ : ∀{A} {s t : Stream A} (u : Fμ) →
s ~ t → μfilter u s ~ μfilter u t
filter-resp~ x p = μfilter-resp~ (out x) p
hd~ (μfilter-resp~ (pres x) p) = hd~ p
tl~ (μfilter-resp~ (pres x) p) = filter-resp~ x (tl~ p)
μfilter-resp~ (drop u) p = μfilter-resp~ u (tl~ p)
{-
We prove transitivity of the witnessed substream relation by
r ~ filter x s
~ filter x (filter y t)
~ filter (comp x y) t
-}
≤-filter-trans : ∀{A} {r s t : Stream A} {x y} →
r ≤[ x ] s → s ≤[ y ] t → r ≤[ x • y ] t
≤-filter-trans {x = x} {y} p q =
~trans p (
~trans (filter-resp~ x q)
(~sym (filter-comp y x _)))
≤-trans : ∀{A} {r s t : Stream A} →
r ≤ s → s ≤ t → r ≤ t
≤-trans p q = impl₂ (witness p • witness q)
(≤-filter-trans {x = witness p}
{y = witness q}
(impl₁ p)
(impl₁ q)
)
-- lem : ∀{A} {s t : Stream A} → hd s ≡ hd t → tl s ≤ tl t → t ≤μ tl s → tl t ≤μ tl s
-- lem s0≡t0 t'≤s' (ma t0≡s1 t'≤s'') with out≤ t'≤s'
-- lem s0≡t0 t'≤s' (ma t0≡s1 t'≤s'') | ma s1≡t1 s''≤t'' = ma (P.sym s1≡t1) {!!}
-- lem s0≡t0 t'≤s' (ma t0≡s1 t'≤s'') | sk p = {!!}
-- lem {s = s} s0≡t0 s'≤t' (sk p) = {!!}
-- ≤-antisym : ∀{A} {s t : Stream A} →
-- s ≤ t → t ≤ s → s ~ t
-- ≤μ-antisym : ∀{A} {s t : Stream A} →
-- s ≤μ t → t ≤μ s → s ~ t
-- ≤-antisym p q = ≤μ-antisym (out≤ p) (out≤ q)
-- hd~ (≤μ-antisym (ma hs≡ht ts≤tt) _) = hs≡ht
-- tl~ (≤μ-antisym (ma hs≡ht ts≤tt) (ma ht≡hs tt≤ts)) = ≤-antisym ts≤tt tt≤ts
-- tl~ (≤μ-antisym (ma hs≡ht ts≤tt) (sk q)) = ≤μ-antisym (out≤ ts≤tt) {!!}
-- ≤μ-antisym (sk p) q = {!!}
{-
------------------
--- Try to convince Agda that x = zip(ev(x), odd(x)) is well-defined.
even : ∀{A} → Stream A → Stream A
hd (even s) = hd s
tl (even s) = even (tl (tl s))
odd : ∀{A} → Stream A → Stream A
odd s = even (tl s)
zips : ∀{A} → Stream A → Stream A → Stream A
hd (zips s t) = hd s
tl (zips s t) = zips t (tl s)
open import Data.Nat
foo : Stream ℕ
hd foo = 0
tl foo = zips (even foo) (odd foo)
-- H : Stream ℕ → Stream ℕ → Stream ℕ
-- f : ℕ → Stream ℕ → Stream ℕ → Stream ℕ
-- H s t = f (hd t) s t
-- hd (f zero s t) = hd s
-- tl (f zero s t) = H s (tl t)
-- f (suc n) s t = f n (tl s) t
-}
|
Tree.agda | nad/codata | 1 | 16517 | <filename>Tree.agda
------------------------------------------------------------------------
-- Possibly infinite binary trees
------------------------------------------------------------------------
module Tree where
open import Codata.Musical.Notation
import Relation.Binary.PropositionalEquality as PropEq
open PropEq using (_≡_)
data Tree (A : Set) : Set where
leaf : Tree A
node : (l : ∞ (Tree A)) (x : A) (r : ∞ (Tree A)) → Tree A
map : ∀ {A B} → (A → B) → Tree A → Tree B
map f leaf = leaf
map f (node l x r) = node (♯ map f (♭ l)) (f x) (♯ map f (♭ r))
data _≈_ {A : Set} : (t₁ t₂ : Tree A) → Set where
leaf : leaf ≈ leaf
node : ∀ {l₁ l₂ x₁ x₂ r₁ r₂}
(l≈ : ∞ (♭ l₁ ≈ ♭ l₂)) (x≡ : x₁ ≡ x₂) (r≈ : ∞ (♭ r₁ ≈ ♭ r₂)) →
node l₁ x₁ r₁ ≈ node l₂ x₂ r₂
refl : ∀ {A} (t : Tree A) → t ≈ t
refl leaf = leaf
refl (node l x r) = node (♯ refl (♭ l)) PropEq.refl (♯ refl (♭ r))
trans : ∀ {A} {t₁ t₂ t₃ : Tree A} →
t₁ ≈ t₂ → t₂ ≈ t₃ → t₁ ≈ t₃
trans leaf leaf = leaf
trans (node l≈ x≡ r≈) (node l≈′ x≡′ r≈′) =
node (♯ trans (♭ l≈) (♭ l≈′)) (PropEq.trans x≡ x≡′)
(♯ trans (♭ r≈) (♭ r≈′))
map-cong : ∀ {A B} (f : A → B) {t₁ t₂ : Tree A} →
t₁ ≈ t₂ → map f t₁ ≈ map f t₂
map-cong f leaf = leaf
map-cong f (node l≈ x≡ r≈) =
node (♯ map-cong f (♭ l≈)) (PropEq.cong f x≡) (♯ map-cong f (♭ r≈))
|
llvm-gcc-4.2-2.9/gcc/ada/exp_sel.ads | vidkidz/crossbridge | 1 | 13589 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ S E L --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Routines used in Chapter 9 for the expansion of dispatching triggers in
-- select statements (Ada 2005: AI-345)
with Types; use Types;
package Exp_Sel is
function Build_Abort_Block
(Loc : Source_Ptr;
Abr_Blk_Ent : Entity_Id;
Cln_Blk_Ent : Entity_Id;
Blk : Node_Id) return Node_Id;
-- Generate:
-- begin
-- Blk
-- exception
-- when Abort_Signal => Abort_Undefer;
-- end;
-- Abr_Blk_Ent is the name of the generated block, Cln_Blk_Ent is the name
-- of the encapsulated cleanup block, Blk is the actual block name.
function Build_B
(Loc : Source_Ptr;
Decls : List_Id) return Entity_Id;
-- Generate:
-- B : Boolean := False;
-- Append the object declaration to the list and return its defining
-- identifier.
function Build_C
(Loc : Source_Ptr;
Decls : List_Id) return Entity_Id;
-- Generate:
-- C : Ada.Tags.Prim_Op_Kind;
-- Append the object declaration to the list and return its defining
-- identifier.
function Build_Cleanup_Block
(Loc : Source_Ptr;
Blk_Ent : Entity_Id;
Stmts : List_Id;
Clean_Ent : Entity_Id) return Node_Id;
-- Generate:
-- declare
-- procedure _clean is
-- begin
-- ...
-- end _clean;
-- begin
-- Stmts
-- at end
-- _clean;
-- end;
-- Blk_Ent is the name of the generated block, Stmts is the list of
-- encapsulated statements and Clean_Ent is the parameter to the
-- _clean procedure.
function Build_K
(Loc : Source_Ptr;
Decls : List_Id;
Obj : Entity_Id) return Entity_Id;
-- Generate
-- K : Ada.Tags.Tagged_Kind :=
-- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag (Obj));
-- where Obj is the pointer to a secondary table. Append the object
-- declaration to the list and return its defining identifier.
function Build_S
(Loc : Source_Ptr;
Decls : List_Id) return Entity_Id;
-- Generate:
-- S : Integer;
-- Append the object declaration to the list and return its defining
-- identifier.
function Build_S_Assignment
(Loc : Source_Ptr;
S : Entity_Id;
Obj : Entity_Id;
Call_Ent : Entity_Id) return Node_Id;
-- Generate:
-- S := Ada.Tags.Get_Offset_Index (
-- Ada.Tags.Tag (Obj), DT_Position (Call_Ent));
-- where Obj is the pointer to a secondary table, Call_Ent is the entity
-- of the dispatching call name. Return the generated assignment.
end Exp_Sel;
|
Util/llvm/bindings/ada/analysis/llvm_analysis-binding.ads | ianloic/unladen-swallow | 5 | 2442 | <reponame>ianloic/unladen-swallow<gh_stars>1-10
-- This file is generated by SWIG. Do *not* modify by hand.
--
with llvm;
with Interfaces.C.Strings;
package LLVM_Analysis.Binding is
function LLVMVerifyModule
(M : in llvm.LLVMModuleRef;
Action : in LLVM_Analysis.LLVMVerifierFailureAction;
OutMessage : access Interfaces.C.Strings.chars_ptr)
return Interfaces.C.int;
function LLVMVerifyFunction
(Fn : in llvm.LLVMValueRef;
Action : in LLVM_Analysis.LLVMVerifierFailureAction)
return Interfaces.C.int;
procedure LLVMViewFunctionCFG (Fn : in llvm.LLVMValueRef);
procedure LLVMViewFunctionCFGOnly (Fn : in llvm.LLVMValueRef);
private
pragma Import (C, LLVMVerifyModule, "Ada_LLVMVerifyModule");
pragma Import (C, LLVMVerifyFunction, "Ada_LLVMVerifyFunction");
pragma Import (C, LLVMViewFunctionCFG, "Ada_LLVMViewFunctionCFG");
pragma Import (C, LLVMViewFunctionCFGOnly, "Ada_LLVMViewFunctionCFGOnly");
end LLVM_Analysis.Binding;
|
python_src/other/export/screen_1_3.asm | fjpena/sword-of-ianna-msx2 | 43 | 23340 | org $0000
; Object types
OBJECT_NONE EQU 0
OBJECT_SWITCH EQU 1
OBJECT_DOOR EQU 2
OBJECT_DOOR_DESTROY EQU 3
OBJECT_FLOOR_DESTROY EQU 4
OBJECT_WALL_DESTROY EQU 5
OBJECT_BOX_LEFT EQU 6
OBJECT_BOX_RIGHT EQU 7
OBJECT_JAR EQU 8
OBJECT_TELEPORTER EQU 9
; Pickable object types
OBJECT_KEY_GREEN EQU 11
OBJECT_KEY_BLUE EQU 12
OBJECT_KEY_YELLOW EQU 13
OBJECT_BREAD EQU 14
OBJECT_MEAT EQU 15
OBJECT_HEALTH EQU 16
OBJECT_KEY_RED EQU 17
OBJECT_KEY_WHITE EQU 18
OBJECT_KEY_PURPLE EQU 19
; Object types for enemies
OBJECT_ENEMY_SKELETON EQU 20
OBJECT_ENEMY_ORC EQU 21
OBJECT_ENEMY_MUMMY EQU 22
OBJECT_ENEMY_TROLL EQU 23
OBJECT_ENEMY_ROCK EQU 24
OBJECT_ENEMY_KNIGHT EQU 25
OBJECT_ENEMY_DALGURAK EQU 26
OBJECT_ENEMY_GOLEM EQU 27
OBJECT_ENEMY_OGRE EQU 28
OBJECT_ENEMY_MINOTAUR EQU 29
OBJECT_ENEMY_DEMON EQU 30
OBJECT_ENEMY_SECONDARY EQU 31
Screen_1_3:
DB 17, 1, 2, 3, 6, 7, 4, 3, 35, 36, 20, 144, 0, 0, 35, 36
DB 36, 4, 8, 9, 3, 2, 8, 73, 74, 252, 0, 0, 145, 146, 254, 35
DB 17, 44, 34, 0, 8, 8, 34, 29, 18, 69, 0, 144, 0, 127, 177, 17
DB 18, 0, 0, 0, 0, 0, 0, 35, 36, 0, 0, 0, 0, 0, 35, 36
DB 36, 40, 32, 0, 0, 0, 0, 0, 73, 74, 20, 0, 0, 144, 45, 39
DB 63, 32, 32, 0, 0, 0, 0, 0, 75, 76, 147, 0, 0, 0, 58, 22
DB 17, 19, 19, 19, 20, 0, 0, 0, 150, 0, 144, 145, 0, 21, 19, 23
DB 18, 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 144, 0, 23
DB 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, 24
DB 14, 15, 14, 14, 15, 14, 15, 14, 15, 15, 14, 14, 15, 15, 14, 15
HardScreen_1_3:
DB 85, 85, 88, 5
DB 85, 85, 80, 5
DB 85, 85, 80, 5
DB 84, 1, 80, 5
DB 84, 0, 88, 5
DB 84, 0, 80, 5
DB 106, 128, 0, 41
DB 64, 0, 0, 1
DB 64, 0, 0, 1
DB 85, 85, 85, 85
Obj_1_3:
DB 1 ; PLAYER
DB 31, OBJECT_ENEMY_ORC, 2, 7, 1, 33
DB 0, OBJECT_NONE, 0, 0, 0, 0 ; EMPTY ENEMY
DB 32, OBJECT_DOOR, 15, 5, 0, 43
DB 38, OBJECT_BOX_RIGHT, 2, 4, 15, 44
DB 0, OBJECT_NONE, 0, 0, 0, 0 ; EMPTY OBJECT
DB 0, OBJECT_NONE, 0, 0, 0, 0 ; EMPTY OBJECT
DB 0, OBJECT_NONE, 0, 0, 0, 0 ; EMPTY OBJECT
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/atomic7_2.adb | best08618/asylo | 7 | 7908 | <gh_stars>1-10
--- { dg-do run }
with Atomic7_Pkg1; use Atomic7_Pkg1;
procedure Atomic7_2 is
begin
if I /= 1 then
raise Program_Error;
end if;
end;
|
oeis/112/A112576.asm | neoneye/loda-programs | 11 | 92893 | <reponame>neoneye/loda-programs
; A112576: A Chebyshev-related transform of the Fibonacci numbers.
; Submitted by <NAME>
; 0,1,1,4,6,16,29,67,132,288,588,1253,2597,5480,11430,24020,50233,105383,220632,462528,968808,2030377,4253641,8913436,18675174,39131464,81989909,171795691,359958780,754224480,1580315220,3311234189,6937996589,14537159456,30459599814,63821847404,133725490801,280194273743,587089298928,1230124781952,2577472914192,5400563687377,11315768349073,23709861715060,49679130160710,104092383269440,218104143687437,456992301619987,957533219252148,2006313597155232,4203816809604252,8808232080197813
lpb $0
sub $0,1
sub $4,$1
add $1,$3
sub $4,$5
add $4,1
add $4,$2
mov $5,$4
mov $4,$2
mov $2,$3
add $4,$1
add $5,$4
mov $3,$5
lpe
mov $0,$3
|
oeis/125/A125107.asm | neoneye/loda-programs | 11 | 13013 | ; A125107: Subtract compositions (A011782) from Catalan numbers (A000108).
; Submitted by <NAME>
; 0,0,0,1,6,26,100,365,1302,4606,16284,57762,205964,738804,2666248,9678461,35324902,129579254,477507628,1767001046,6563596132,24465218444,91480466488,343055419346,1289895758716,4861929624236,18367319517720
mov $3,$0
seq $0,262543 ; Number of rooted asymmetrical polyenoids of type U_n* having n edges.
mov $2,2
pow $2,$3
sub $0,$2
div $0,2
|
tools/scitools/conf/understand/ada/ada95/s-fatgen.ads | brucegua/moocos | 1 | 21131 | <filename>tools/scitools/conf/understand/ada/ada95/s-fatgen.ads
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . F A T _ G E N --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- This specification comes from the Generic Primitive Functions standard. --
-- In accordance with the copyright of that document, you can freely copy --
-- and modify this specification, provided that if you do redistribute it, --
-- then any changes that you have made must be clearly indicated. --
-- --
------------------------------------------------------------------------------
-- This generic package provides a target independent implementation of the
-- floating-point attributes that denote functions. The implementations here
-- are portable, but very slow. The runtime contains a set of instantiations
-- of this package for all predefined floating-point types, and these should
-- be replaced by efficient assembly language code where possible.
generic
type T is digits <>;
package System.Fat_Gen is
subtype UI is Integer;
-- The runtime representation of universal integer for the purposes of
-- this package is integer. The expander generates conversions for the
-- actual type used. For functions returning universal integer, there
-- is no problem, since the result always is in range of integer. For
-- input arguments, the expander has to do some special casing to deal
-- with the (very annoying!) cases of out of range values. If we used
-- Long_Long_Integer to represent universal, then there would be no
-- problem, but the resulting inefficiency would be annoying.
function Adjacent (X, Towards : T) return T;
function Ceiling (X : T) return T;
function Compose (Fraction : T; Exponent : UI) return T;
function Copy_Sign (Value, Sign : T) return T;
function Exponent (X : T) return UI;
function Floor (X : T) return T;
function Fraction (X : T) return T;
function Leading_Part (X : T; Radix_Digits : UI) return T;
function Machine (X : T) return T;
function Model (X : T) return T;
function Pred (X : T) return T;
function Remainder (X, Y : T) return T;
function Rounding (X : T) return T;
function Scaling (X : T; Adjustment : UI) return T;
function Succ (X : T) return T;
function Truncation (X : T) return T;
function Unbiased_Rounding (X : T) return T;
private
pragma Inline (Machine);
pragma Inline (Model);
end System.Fat_Gen;
|
LentoCore/Grammar/LentoLexer.g4 | Lento-lang/Lento-Antlr4 | 0 | 5843 | lexer grammar LentoLexer;
/*
Similar grammar:
- https://github.com/antlr/grammars-v4/blob/master/csharp/CSharpLexer.g4
- https://github.com/antlr/grammars-v4/blob/master/csharp/CSharpParser.g4
- https://github.com/antlr/grammars-v4/blob/master/python/python3/Python3Lexer.g4
*/
channels { COMMENTS }
SP: (' ' | '\t')+;
NL: ('\r' | '\n' | '\r\n')+;
COMMENT_SINGLE: '//' (~[\r\n])* -> channel(COMMENTS);
COMMENT_MULTI: '/*' .*? '*/' -> channel(COMMENTS);
fragment LETTER: [a-z] | [A-Z];
fragment DIGIT: [0-9];
fragment DIGIT_HEX: DIGIT | [A-F] | [a-f];
fragment DIGIT_BINARY: '0' | '1';
fragment DECIMAL_POINT: '.';
fragment NUMBER_PREFIX_HEX: '0x';
fragment NUMBER_PREFIX_BINARY: '0b';
INTEGER: DIGIT+; /* Negative numbers are not supported by lexer, but '-' is implemented as a unary negation function */
FLOATING_POINT: INTEGER? DECIMAL_POINT DIGIT+;
NUMBER_HEX: NUMBER_PREFIX_HEX DIGIT_HEX+;
NUMBER_BINARY: NUMBER_PREFIX_BINARY DIGIT_BINARY+;
IDENTIFIER: LETTER+ (DIGIT | LETTER | '_')*;
IDENTIFIER_NAMESPACED: IDENTIFIER (SEPARATOR_DOT IDENTIFIER)+; /* var, a, b or System.Console */
IDENTIFIER_IGNORE: '_' DIGIT* IDENTIFIER?;
ATOM: ':' IDENTIFIER;
ESCAPED
: '\\u' DIGIT_HEX DIGIT_HEX DIGIT_HEX DIGIT_HEX
| '\\"' /* \" */
| '\\\'' /* \' */
| '\\\\' /* \\ */
| '\\' .
;
SPRING: '"' (ESCAPED | ~'"')* '"';
CHARACTER: '\'' (ESCAPED | ~'\'') '\''; /* Must be validated in evaluator that it contains only one character, Todo: validate in lexer*/
LPAREN: '(';
RPAREN: ')';
LBRACKET: '[';
RBRACKET: ']';
LBRACE: '{';
RBRACE: '}';
ASSIGN: '=';
SEPARATOR_COMMA: ',';
SEPARATOR_DOT: '.';
COLON: ':';
SEMI_COLON: ';';
OPERATOR /* NOT: SEPARATOR_COMMA or EXPRESSION_SEPARATOR */
: (ASSIGN
| COLON
| '*'
| '/'
| '+'
| '-'
| '!'
| '&'
| '$'
| '|'
| '<'
| '>'
| '^'
| '%'
| '#'
| '?'
| '~'
| '@'
)+; |
programs/oeis/022/A022309.asm | karttu/loda | 0 | 21625 | ; A022309: a(n) = a(n-1) + a(n-2) + 1 for n>1, a(0)=0, a(1)=4.
; 0,4,5,10,16,27,44,72,117,190,308,499,808,1308,2117,3426,5544,8971,14516,23488,38005,61494,99500,160995,260496,421492,681989,1103482,1785472,2888955,4674428,7563384,12237813,19801198,32039012,51840211,83879224,135719436,219598661,355318098,574916760,930234859,1505151620,2435386480,3940538101,6375924582,10316462684,16692387267,27008849952,43701237220,70710087173,114411324394,185121411568,299532735963,484654147532,784186883496,1268841031029,2053027914526,3321868945556,5374896860083,8696765805640,14071662665724,22768428471365,36840091137090,59608519608456,96448610745547,156057130354004,252505741099552,408562871453557,661068612553110,1069631484006668,1730700096559779,2800331580566448,4531031677126228,7331363257692677
mov $1,1
mov $2,4
lpb $0,1
sub $0,1
mov $3,$2
mov $2,$1
add $1,$3
lpe
sub $1,1
|
vp8/decoder/arm/neon/dequant_idct_neon.asm | CM-Archive/android_external_libvpx | 3 | 23843 | <reponame>CM-Archive/android_external_libvpx
;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing project authors may
; be found in the AUTHORS file in the root of the source tree.
;
EXPORT |vp8_dequant_idct_add_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
;void vp8_dequant_idct_neon(short *input, short *dq, unsigned char *pred,
; unsigned char *dest, int pitch, int stride)
; r0 short *input,
; r1 short *dq,
; r2 unsigned char *pred
; r3 unsigned char *dest
; sp int pitch
; sp+4 int stride
|vp8_dequant_idct_add_neon| PROC
vld1.16 {q3, q4}, [r0]
vld1.16 {q5, q6}, [r1]
ldr r1, [sp] ; pitch
vld1.32 {d14[0]}, [r2], r1
vld1.32 {d14[1]}, [r2], r1
vld1.32 {d15[0]}, [r2], r1
vld1.32 {d15[1]}, [r2]
ldr r1, [sp, #4] ; stride
ldr r12, _CONSTANTS_
vmul.i16 q1, q3, q5 ;input for short_idct4x4llm_neon
vmul.i16 q2, q4, q6
;|short_idct4x4llm_neon| PROC
vld1.16 {d0}, [r12]
vswp d3, d4 ;q2(vp[4] vp[12])
vqdmulh.s16 q3, q2, d0[2]
vqdmulh.s16 q4, q2, d0[0]
vqadd.s16 d12, d2, d3 ;a1
vqsub.s16 d13, d2, d3 ;b1
vshr.s16 q3, q3, #1
vshr.s16 q4, q4, #1
vqadd.s16 q3, q3, q2
vqadd.s16 q4, q4, q2
vqsub.s16 d10, d6, d9 ;c1
vqadd.s16 d11, d7, d8 ;d1
vqadd.s16 d2, d12, d11
vqadd.s16 d3, d13, d10
vqsub.s16 d4, d13, d10
vqsub.s16 d5, d12, d11
vtrn.32 d2, d4
vtrn.32 d3, d5
vtrn.16 d2, d3
vtrn.16 d4, d5
; memset(input, 0, 32) -- 32bytes
vmov.i16 q14, #0
vswp d3, d4
vqdmulh.s16 q3, q2, d0[2]
vqdmulh.s16 q4, q2, d0[0]
vqadd.s16 d12, d2, d3 ;a1
vqsub.s16 d13, d2, d3 ;b1
vmov q15, q14
vshr.s16 q3, q3, #1
vshr.s16 q4, q4, #1
vqadd.s16 q3, q3, q2
vqadd.s16 q4, q4, q2
vqsub.s16 d10, d6, d9 ;c1
vqadd.s16 d11, d7, d8 ;d1
vqadd.s16 d2, d12, d11
vqadd.s16 d3, d13, d10
vqsub.s16 d4, d13, d10
vqsub.s16 d5, d12, d11
vst1.16 {q14, q15}, [r0]
vrshr.s16 d2, d2, #3
vrshr.s16 d3, d3, #3
vrshr.s16 d4, d4, #3
vrshr.s16 d5, d5, #3
vtrn.32 d2, d4
vtrn.32 d3, d5
vtrn.16 d2, d3
vtrn.16 d4, d5
vaddw.u8 q1, q1, d14
vaddw.u8 q2, q2, d15
vqmovun.s16 d0, q1
vqmovun.s16 d1, q2
vst1.32 {d0[0]}, [r3], r1
vst1.32 {d0[1]}, [r3], r1
vst1.32 {d1[0]}, [r3], r1
vst1.32 {d1[1]}, [r3]
bx lr
ENDP ; |vp8_dequant_idct_add_neon|
; Constant Pool
_CONSTANTS_ DCD cospi8sqrt2minus1
cospi8sqrt2minus1 DCD 0x4e7b4e7b
sinpi8sqrt2 DCD 0x8a8c8a8c
END
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_1010_787.asm | ljhsiun2/medusa | 9 | 14563 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x1c5ef, %rsi
lea addresses_UC_ht+0xd6b5, %rdi
nop
nop
xor %rdx, %rdx
mov $56, %rcx
rep movsb
nop
nop
nop
nop
cmp $8709, %r14
lea addresses_A_ht+0x1db41, %r11
nop
xor %rdi, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
movups %xmm2, (%r11)
nop
nop
nop
add %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r15
push %rax
push %rcx
push %rdi
push %rdx
// Load
lea addresses_WT+0x12c95, %rax
nop
nop
nop
nop
and $49343, %rdi
mov (%rax), %rcx
nop
nop
nop
nop
sub %rcx, %rcx
// Store
mov $0x15, %rdi
nop
nop
dec %r11
mov $0x5152535455565758, %rdx
movq %rdx, %xmm3
movups %xmm3, (%rdi)
nop
dec %r15
// Store
lea addresses_PSE+0x18de5, %rcx
inc %r15
movl $0x51525354, (%rcx)
nop
nop
nop
nop
sub $33290, %r15
// Store
lea addresses_PSE+0x100b5, %r13
nop
nop
nop
nop
and %rdi, %rdi
movl $0x51525354, (%r13)
nop
nop
cmp %r15, %r15
// Store
lea addresses_A+0x1b995, %rax
nop
and %rcx, %rcx
movw $0x5152, (%rax)
nop
nop
add $28439, %rdi
// Store
lea addresses_A+0x7e95, %r15
nop
nop
inc %rcx
movw $0x5152, (%r15)
nop
nop
nop
nop
nop
xor $13010, %r11
// Store
lea addresses_WT+0x6f4d, %rax
nop
nop
xor $258, %rdi
movw $0x5152, (%rax)
nop
nop
sub $13150, %r13
// Store
lea addresses_WT+0x18a15, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
add $50030, %r11
mov $0x5152535455565758, %rdx
movq %rdx, %xmm4
vmovaps %ymm4, (%rdi)
nop
nop
nop
cmp %r11, %r11
// Store
lea addresses_UC+0x1b295, %rax
nop
nop
nop
xor $11783, %r11
movb $0x51, (%rax)
nop
add %r13, %r13
// Faulty Load
lea addresses_WT+0x12c95, %r13
nop
xor %r15, %r15
mov (%r13), %rdi
lea oracles, %rax
and $0xff, %rdi
shlq $12, %rdi
mov (%rax,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_P', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WT', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': True}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_UC', 'size': 1, 'AVXalign': True}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False}}
{'39': 1010}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_916.asm | ljhsiun2/medusa | 9 | 163335 | <filename>Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_916.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x90aa, %rbp
nop
nop
and %r10, %r10
mov $0x6162636465666768, %r9
movq %r9, %xmm1
movups %xmm1, (%rbp)
nop
nop
nop
nop
nop
add %r8, %r8
lea addresses_A_ht+0xa38a, %rsi
lea addresses_WC_ht+0xcca9, %rdi
nop
nop
and %rdx, %rdx
mov $13, %rcx
rep movsl
nop
nop
cmp %r10, %r10
lea addresses_WC_ht+0x138a, %r9
nop
nop
sub $17061, %rdi
movl $0x61626364, (%r9)
nop
nop
nop
nop
xor %rdx, %rdx
lea addresses_UC_ht+0x11f2a, %rdi
nop
add %r8, %r8
movb $0x61, (%rdi)
nop
nop
sub $47914, %rsi
lea addresses_WC_ht+0x1016a, %r8
nop
nop
cmp $30396, %rdx
movw $0x6162, (%r8)
nop
nop
nop
nop
and $29688, %r8
lea addresses_WC_ht+0x67da, %rsi
nop
nop
nop
nop
sub $11914, %rbp
movb $0x61, (%rsi)
nop
nop
cmp %rcx, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r9
push %rdx
push %rsi
// Faulty Load
lea addresses_RW+0x778a, %r9
nop
nop
nop
nop
xor %r11, %r11
vmovups (%r9), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %rdx
lea oracles, %r13
and $0xff, %rdx
shlq $12, %rdx
mov (%r13,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %r9
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 2, 'NT': False, 'same': True, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 4}}
{'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
*/
|
Tests/resources/test_proj/other/MacAppleScriptApp/MacAppleScriptApp/AppDelegate.applescript | TheAngryDarling/SwiftXcodeProj | 0 | 4420 | <reponame>TheAngryDarling/SwiftXcodeProj<filename>Tests/resources/test_proj/other/MacAppleScriptApp/MacAppleScriptApp/AppDelegate.applescript
--
-- AppDelegate.applescript
-- MacAppleScriptApp
--
-- Created by <NAME> on 2019-06-12.
-- Copyright © 2019 <NAME>. All rights reserved.
--
script AppDelegate
property parent : class "NSObject"
-- IBOutlets
property theWindow : missing value
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
|
Transynther/x86/_processed/NONE/_st_zr_/i7-7700_9_0x48_notsx.log_21829_1858.asm | ljhsiun2/medusa | 9 | 104465 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x40e4, %rsi
lea addresses_D_ht+0x18927, %rdi
clflush (%rsi)
nop
nop
nop
nop
xor %r12, %r12
mov $32, %rcx
rep movsl
nop
nop
nop
nop
and $53933, %rsi
lea addresses_WC_ht+0x2b15, %r12
clflush (%r12)
nop
nop
nop
nop
nop
xor $51755, %r11
mov $0x6162636465666768, %rdx
movq %rdx, %xmm0
movups %xmm0, (%r12)
nop
nop
add %rcx, %rcx
lea addresses_normal_ht+0x17d8d, %rcx
clflush (%rcx)
and $57041, %rbx
movb (%rcx), %dl
nop
nop
nop
sub %r12, %r12
lea addresses_D_ht+0x5645, %rsi
lea addresses_normal_ht+0x1c2b5, %rdi
clflush (%rsi)
nop
nop
nop
nop
and $29352, %rax
mov $126, %rcx
rep movsw
nop
nop
nop
nop
cmp %r12, %r12
lea addresses_UC_ht+0x7fb5, %rcx
nop
nop
nop
and %r12, %r12
movb $0x61, (%rcx)
nop
nop
nop
sub $15750, %rdx
lea addresses_D_ht+0x19731, %rdi
nop
nop
nop
nop
cmp %r12, %r12
movb $0x61, (%rdi)
xor %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %rax
push %rbp
push %rbx
push %rdx
push %rsi
// Store
lea addresses_UC+0x27b5, %rbp
nop
nop
nop
nop
and $36641, %r8
movw $0x5152, (%rbp)
nop
nop
nop
nop
inc %rbp
// Store
lea addresses_normal+0x1448d, %rdx
cmp %rbp, %rbp
mov $0x5152535455565758, %rax
movq %rax, (%rdx)
nop
nop
nop
nop
and %rbx, %rbx
// Store
mov $0xc75, %r8
nop
nop
nop
and $18196, %rax
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
vmovups %ymm5, (%r8)
// Exception!!!
nop
nop
nop
nop
mov (0), %rax
nop
nop
nop
nop
and %rdx, %rdx
// Store
lea addresses_normal+0x1a3d, %rbp
nop
nop
and %rsi, %rsi
mov $0x5152535455565758, %r8
movq %r8, %xmm7
vmovaps %ymm7, (%rbp)
nop
nop
nop
cmp %r8, %r8
// Load
lea addresses_WT+0x1c635, %rsi
and $50645, %rbx
mov (%rsi), %ax
nop
nop
nop
nop
nop
cmp %r8, %r8
// Faulty Load
lea addresses_A+0x117b5, %r13
clflush (%r13)
nop
nop
sub %rsi, %rsi
mov (%r13), %eax
lea oracles, %rdx
and $0xff, %rax
shlq $12, %rax
mov (%rdx,%rax,1), %rax
pop %rsi
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_normal', 'congruent': 2}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT', 'congruent': 4}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 0}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_normal_ht', 'congruent': 3}}
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 2}, 'OP': 'STOR'}
{'52': 19, '00': 21810}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
ffight/lcs/boss/2.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 243400 | <reponame>zengfr/arcade_game_romhacking_sourcecode_top_secret_data<gh_stars>1-10
copyright zengfr site:http://github.com/zengfr/romhack
03D4C8 move.b #$2, ($3,A6) [boss+2]
03ED60 clr.b ($3,A6) [boss+2]
copyright zengfr site:http://github.com/zengfr/romhack
|
programs/oeis/164/A164355.asm | neoneye/loda | 22 | 86849 | ; A164355: Expansion of (1 - x^2)^4 * (1 - x^5) / ((1 - x)^5 * (1 - x^4)^2) in powers of x.
; 1,5,11,15,18,25,33,35,36,45,55,55,54,65,77,75,72,85,99,95,90,105,121,115,108,125,143,135,126,145,165,155,144,165,187,175,162,185,209,195,180,205,231,215,198,225,253,235,216,245,275,255,234,265,297,275,252,285,319,295,270,305,341,315,288,325,363,335,306,345,385,355,324,365,407,375,342,385,429,395,360,405,451,415,378,425,473,435,396,445,495,455,414,465,517,475,432,485,539,495
mov $2,$0
seq $0,186813 ; a(n) = n if n odd, a(2n) = 3n if n odd, a(4n) = 2n.
mov $4,$0
cmp $4,0
add $0,$4
mov $3,$2
mul $3,4
add $0,$3
|
project/adl/boards/HiFive1/src/hifive1.ads | corentingay/ada_epita | 2 | 14195 | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with FE310.Device; use FE310.Device;
with FE310.GPIO; use FE310.GPIO;
package HiFive1 is
HF1_Pin_0 : GPIO_Point renames P16;
HF1_Pin_1 : GPIO_Point renames P17;
HF1_Pin_2 : GPIO_Point renames P18;
HF1_Pin_3 : GPIO_Point renames P19; -- Green LED
HF1_Pin_4 : GPIO_Point renames P20;
HF1_Pin_5 : GPIO_Point renames P21; -- Blue LED
HF1_Pin_6 : GPIO_Point renames P22; -- Red LED
HF1_Pin_7 : GPIO_Point renames P23;
HF1_Pin_8 : GPIO_Point renames P00;
HF1_Pin_9 : GPIO_Point renames P01;
HF1_Pin_10 : GPIO_Point renames P02;
HF1_Pin_11 : GPIO_Point renames P03;
HF1_Pin_12 : GPIO_Point renames P04;
HF1_Pin_13 : GPIO_Point renames P05;
-- HF1_Pin_14 is not connected
HF1_Pin_15 : GPIO_Point renames P09;
HF1_Pin_16 : GPIO_Point renames P10;
HF1_Pin_17 : GPIO_Point renames P11;
HF1_Pin_18 : GPIO_Point renames P12;
HF1_Pin_19 : GPIO_Point renames P13;
end HiFive1;
|
programs/oeis/151/A151779.asm | neoneye/loda | 22 | 94974 | ; A151779: a(1)=1; for n > 1, a(n)=6*5^{wt(n-1)-1}.
; 1,6,6,30,6,30,30,150,6,30,30,150,30,150,150,750,6,30,30,150,30,150,150,750,30,150,150,750,150,750,750,3750,6,30,30,150,30,150,150,750,30,150,150,750,150,750,750,3750,30,150,150,750,150,750,750,3750,150,750,750,3750,750,3750,3750,18750,6,30,30,150,30,150,150,750,30,150,150,750,150,750,750,3750,30,150,150,750,150,750,750,3750,150,750,750,3750,750,3750,3750,18750,30,150,150,750
mov $1,$0
lpb $1
div $0,2
sub $1,$0
lpe
mov $0,5
pow $0,$1
mul $0,6
div $0,5
|
test_programs/vga_clrscr.asm | mfkiwl/QNICE-FPGA-hyperRAM | 53 | 96954 | ;; VGA clear screen test
;; done by sy2002 in December 2015
#include "../dist_kit/sysdef.asm"
#include "../dist_kit/monitor.def"
.ORG 0x8000
MOVE IO$TIL_DISPLAY, R7
MOVE VGA$STATE, R1
MOVE @R1, @R7
RSUB WAIT_KEY, 1
MOVE VGA$CR_X, R0
MOVE 1, @R0
MOVE @R0, R2
MOVE VGA$CR_Y, R0
MOVE 1, @R0
MOVE @R0, R3
SHL 8, R2
OR R3, R2
MOVE R2, @R7
RSUB WAIT_KEY, 1
MOVE @R1, @R7
RSUB WAIT_KEY, 1
; execute the clear screen command and in parallel
; switch the font color to blue
MOVE 0x01E1, @R1
; As the execution of the clear screen takes a while,
; you will read the busy bit (bit 9) and the clear
; screen bit (bit 8) as '1' when reading the status
; register directly after issuing the clear screen
; command. Therefore, the value 3E1 should be shown
; on the TIL.
MOVE @R1, @R7
RSUB WAIT_KEY, 1
ABRA QMON$MAIN_LOOP, 1
; wait for a keypress on uart
WAIT_KEY INCRB ; next register bank
MOVE IO$UART_SRA, R0
MOVE IO$UART_RHRA, R1
WAIT_FOR_CHAR MOVE @R0, R2
AND 0x0001, R2
RBRA WAIT_FOR_CHAR, Z
MOVE @R1, R3
DECRB ; previous register bank
RET
|
Override/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.nasm | LeeLeahy/quarkfsp | 2 | 25916 | ;------------------------------------------------------------------------------
;
; Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php.
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Abstract:
;
; Provide FSP API entry points.
;
;------------------------------------------------------------------------------
section .text
;
; Following are fixed PCDs
;
extern ASM_PFX(_gPcd_FixedAtBuild_PcdTemporaryRamBase)
extern ASM_PFX(_gPcd_FixedAtBuild_PcdTemporaryRamSize)
extern ASM_PFX(_gPcd_FixedAtBuild_PcdFspTemporaryRamSize)
extern ASM_PFX(_gPcd_FixedAtBuild_PcdFspAreaSize)
;
; Following functions will be provided in C
;
extern ASM_PFX(SecStartup)
extern ASM_PFX(FspApiCallingCheck)
extern ASM_PFX(TempRamExitApi)
extern ASM_PFX(FspSiliconInitApi)
extern ASM_PFX(NotifyPhaseApi)
;
; Following functions will be provided in PlatformSecLib
;
extern ASM_PFX(AsmGetFspBaseAddress)
extern ASM_PFX(AsmGetFspInfoHeader)
extern ASM_PFX(GetBootFirmwareVolumeOffset)
extern ASM_PFX(Loader2PeiSwitchStack)
;
; Define the data length that we saved on the stack top
;
DATA_LEN_OF_PER0 equ 0x018
DATA_LEN_OF_MCUD equ 0x018
DATA_LEN_AT_STACK_TOP equ (DATA_LEN_OF_PER0 + DATA_LEN_OF_MCUD + 4)
;----------------------------------------------------------------------------
; TempRamInit API
;
; TempRamInit API is an empty API since Quark SoC does not support CAR.
;
;----------------------------------------------------------------------------
global ASM_PFX(TempRamInitApi)
ASM_PFX(TempRamInitApi):
;
; Check Parameter
;
mov eax, [esp+4]
cmp eax, 0
mov eax, 0x80000002
jz TempRamInitExit
;
; Set ECX/EDX to the bootloader temporary memory range
;
mov ecx, [ASM_PFX(PcdGet32 (PcdTemporaryRamBase))]
mov edx, ecx
add edx, [ASM_PFX(PcdGet32 (PcdTemporaryRamSize))]
sub edx, [ASM_PFX(PcdGet32 (PcdFspTemporaryRamSize))]
; EAX - error flag
xor eax, eax
TempRamInitExit:
ret
;----------------------------------------------------------------------------
; FspInit API
;
; This FSP API will perform the processor and chipset initialization.
; This API will not return. Instead, it transfers the control to the
; ContinuationFunc provided in the parameter.
;
;----------------------------------------------------------------------------
global ASM_PFX(FspInitApi)
ASM_PFX(FspInitApi):
mov eax, 1
jmp FspApiCommon
;----------------------------------------------------------------------------
; FspMemoryInit API
;
; This FSP API is called after TempRamInit and initializes the memory.
;
;----------------------------------------------------------------------------
global ASM_PFX(FspMemoryInitApi)
ASM_PFX(FspMemoryInitApi):
;
; Save stack address in ecx
;
pushad
mov ecx, esp
;
; Enable FSP STACK
;
mov esp, [ASM_PFX(PcdGet32 (PcdTemporaryRamBase))]
add esp, [ASM_PFX(PcdGet32 (PcdTemporaryRamSize))]
push DATA_LEN_OF_MCUD ; Size of the data region
push 0x4455434D ; Signature of the data region 'MCUD'
push 0x00800000 ; Code size
push 0xff800000 ; Code base
push 0 ; Microcode size, 0, no ucode for Quark
push 0 ; Microcode base, 0, no ucode for Quark
;
; Save API entry/exit timestamp into stack
;
push DATA_LEN_OF_PER0 ; Size of the data region
push 0x30524550 ; Signature of the data region 'PER0'
xor edx, edx
push edx
xor eax, eax
push eax
rdtsc
push edx
push eax
;
; Terminator for the data on stack
;
push 0
;
; Restore stack address
;
mov esp, ecx
popad
;
; Call MemoryInit
;
mov eax, 3
jmp FspApiCommon
;----------------------------------------------------------------------------
; FspApiCommon API
;
; This is the FSP API common entry point to resume the FSP execution
;
;----------------------------------------------------------------------------
FspApiCommon:
;
; EAX holds the API index
;
;
; Stack must be ready
;
push eax
add esp, 4
cmp eax, [esp-4]
jz FspApiCommonL0
mov eax, 0x80000003
jmp FspApiCommonExit
FspApiCommonL0:
;
; Verify the calling condition
;
pushad
push dword [esp+(4*8)+4] ; push ApiParam
push eax ; push ApiIdx
call ASM_PFX(FspApiCallingCheck)
add esp, 8
cmp eax, 0
jz FspApiCommonL1
mov [esp+(4*7)], eax
popad
ret
FspApiCommonL1:
popad
cmp eax, 1 ; FspInit API
jz FspApiCommonL2
cmp eax, 3 ; FspMemoryInit API
jz FspApiCommonL2
call ASM_PFX(AsmGetFspInfoHeader)
jmp ASM_PFX(Loader2PeiSwitchStack)
FspApiCommonL2:
;
; FspInit and FspMemoryInit APIs, setup the initial stack frame
;
;
; Place holder to store the FspInfoHeader pointer
;
push eax
;
; Update the FspInfoHeader pointer
;
push eax
call ASM_PFX(AsmGetFspInfoHeader)
mov [esp+4], eax
pop eax
;
; Create a Task Frame in the stack for the Boot Loader
;
pushfd ; 2 pushf for 4 byte alignment
cli
pushad
;
; Reserve 8 bytes for IDT save/restore
;
sub esp, 8
sidt [esp]
;
; Setup new FSP stack
;
mov edi, esp
mov esp, [ASM_PFX(PcdGet32(PcdTemporaryRamBase))]
add esp, [ASM_PFX(PcdGet32(PcdTemporaryRamSize))]
sub esp, (DATA_LEN_AT_STACK_TOP + 0x40)
;
; Pass the API Idx to SecStartup
;
push eax
;
; Pass the BootLoader stack to SecStartup
;
push edi
;
; Pass entry point of the PEI core
;
call ASM_PFX(AsmGetFspBaseAddress)
mov edi, eax
add edi, [ASM_PFX(PcdGet32(PcdFspAreaSize))]
sub edi, 0x20
add eax, [ds:edi]
push eax
;
; Pass BFV into the PEI Core
; It uses relative address to calucate the actual boot FV base
; For FSP implementation with single FV, PcdFspBootFirmwareVolumeBase and
; PcdFspAreaBaseAddress are the same. For FSP with mulitple FVs,
; they are different. The code below can handle both cases.
;
call ASM_PFX(AsmGetFspBaseAddress)
mov edi, eax
call ASM_PFX(GetBootFirmwareVolumeOffset)
add eax, edi
push eax
;
; Pass stack base and size into the PEI Core
;
mov eax, [ASM_PFX(PcdGet32(PcdTemporaryRamBase))]
add eax, [ASM_PFX(PcdGet32(PcdTemporaryRamSize))]
sub eax, [ASM_PFX(PcdGet32(PcdFspTemporaryRamSize))]
push eax
push dword [ASM_PFX(PcdGet32(PcdFspTemporaryRamSize))]
;
; Pass Control into the PEI Core
;
call ASM_PFX(SecStartup)
add esp, 4
FspApiCommonExit:
ret
;----------------------------------------------------------------------------
;
; Procedure: _ModuleEntryPoint
;
; Input: None
;
; Output: None
;
; Destroys: Assume all registers
;
; Description:
;
; Transition to non-paged flat-model protected mode from a
; hard-coded GDT that provides exactly two descriptors.
; This is a bare bones transition to protected mode only
; used for a while in PEI and possibly DXE.
;
; After enabling protected mode, a far jump is executed to
; transfer to PEI using the newly loaded GDT.
;
; Return: None
;
;----------------------------------------------------------------------------
global ASM_PFX(_ModuleEntryPoint)
ASM_PFX(_ModuleEntryPoint):
jmp $
;
; Reference the routines to get the linker to pull them in
;
jmp ASM_PFX(TempRamInitApi)
jmp ASM_PFX(FspInitApi)
jmp ASM_PFX(TempRamExitApi)
jmp ASM_PFX(FspSiliconInitApi)
jmp ASM_PFX(NotifyPhaseApi)
|
src/day-1/adventofcode-day_1.adb | persan/advent-of-code-2020 | 0 | 16181 | <reponame>persan/advent-of-code-2020<gh_stars>0
pragma Ada_2012;
package body Adventofcode.Day_1 is
----------
-- Eval --
----------
function Eval (Book : Expenses; To : Currency) return Currency is
begin
for A in Book'Range loop
for B in A + 1 .. Book'Last loop
if Book (A) + Book (B) = To then
return Book (A) * Book (B);
end if;
end loop;
end loop;
return 0;
end Eval;
function Eval3 (Book : Expenses; To : Currency) return Currency is
begin
for A in Book'Range loop
for B in A + 1 .. Book'Last loop
for C in B + 1 .. Book'Last loop
if Book (A) + Book (B) + Book (C) = To then
return Book (A) * Book (B) * Book (C);
end if;
end loop;
end loop;
end loop;
return 0;
end Eval3;
end Adventofcode.Day_1;
|
src/Cancellation.agda | nad/chi | 2 | 13307 | <reponame>nad/chi
------------------------------------------------------------------------
-- Some cancellation lemmas
------------------------------------------------------------------------
open import Atom
module Cancellation (atoms : χ-atoms) where
open import Equality.Propositional
open import Prelude hiding (const)
open import Chi atoms
open import Values atoms
cancel-const :
∀ {c₁ c₂ es₁ es₂} →
Exp.const c₁ es₁ ≡ const c₂ es₂ →
c₁ ≡ c₂ × es₁ ≡ es₂
cancel-const refl = refl , refl
cancel-lambda :
∀ {x₁ x₂ e₁ e₂} →
Exp.lambda x₁ e₁ ≡ lambda x₂ e₂ →
x₁ ≡ x₂ × e₁ ≡ e₂
cancel-lambda refl = refl , refl
cancel-rec :
∀ {x₁ x₂ e₁ e₂} →
Exp.rec x₁ e₁ ≡ rec x₂ e₂ →
x₁ ≡ x₂ × e₁ ≡ e₂
cancel-rec refl = refl , refl
cancel-apply :
∀ {e₁₁ e₁₂ e₂₁ e₂₂} →
Exp.apply e₁₁ e₂₁ ≡ apply e₁₂ e₂₂ →
e₁₁ ≡ e₁₂ × e₂₁ ≡ e₂₂
cancel-apply refl = refl , refl
cancel-case :
∀ {e₁ e₂ bs₁ bs₂} →
Exp.case e₁ bs₁ ≡ case e₂ bs₂ →
e₁ ≡ e₂ × bs₁ ≡ bs₂
cancel-case refl = refl , refl
cancel-var :
∀ {x₁ x₂} →
Exp.var x₁ ≡ var x₂ → x₁ ≡ x₂
cancel-var refl = refl
cancel-branch :
∀ {c₁ c₂ xs₁ xs₂ e₁ e₂} →
Br.branch c₁ xs₁ e₁ ≡ branch c₂ xs₂ e₂ →
c₁ ≡ c₂ × xs₁ ≡ xs₂ × e₁ ≡ e₂
cancel-branch refl = refl , refl , refl
|
tests/BasicTest.r.asm | sdsmdg/RISC-processor | 43 | 245718 | <filename>tests/BasicTest.r.asm
; This test is modified version of original content provided
; under CC-by-NC-SA license by MIT OCW.
; Basic test of Processor
; Primary Tests:
; > Memory Tests: Write to memory address : 0x3FC
; > Register Tests: Load each register with its index
; > Instruction Tests: Test subset of instructions:
; ADD, SUB, AND, OR, XOR, "A" (LDR), SHL, SHR, SRA,
; CMPEQ, CMPLT, CMPLE, ADDC, SUBC, ANDC, ORC, XORC,
; ST, LD, SHLC, SHRC, SRAC, CMPEQC, CMPLTC, CMPLEC
; This program ends after 250 cycles, following writes to memory are
; performed during the program
; on cycle 14: should write 0x00000002 PC = 0x034
; on cycle 41: should write 0x0000011A PC = 0x0A0
; on cycle 69: should write 0x00011F12 PC = 0x110
; on cycle 112: should write 0x047C7B8C PC = 0x1BC
; on cycle 126: should write 0xC7B8C7A7 PC = 0x1F4
; on cycle 158: should write 0xA17A11C7 PC = 0x274
; on cycle 188: should write 0xA1638E2C PC = 0x2EC
; on cycle 235: should write 0x871C71C7 PC = 0x3A8
; on cycle 242: should write 0x47A2B9C0 PC = 0x3C4
;
; First load each register with its
; number using only OP instructions
;
AND %r31, %r31, %r0
CMPEQ %r31, %r31, %r1
ADD %r1, %r1, %r2
OR %r2, %r1, %r3
SHL %r1, %r2, %r4
SHL %r0, %r1, %r0 XOR %r0, %r1, %r0
SHL %r0, %r1, %r0 XOR %r0, %r2, %r0
SHL %r0, %r1, %r0 XOR %r0, %r3, %r0
SHL %r0, %r1, %r0 XOR %r0, %r4, %r0
ST %r0, 0x3FC, %r31 ; cycle 14: should write 0x2
XOR %r4, %r1, %r5
SHL %r3, %r1, %r6
OR %r2, %r5, %r7
SHL %r1, %r3, %r8
ADD %r5, %r5, %r9
SUB %r9, %r1, %r9
ADD %r3, %r7, %r10
OR %r8, %r3, %r11
SHL %r6, %r10, %r12
SHR %r12, %r9, %r12
SHL %r0, %r1, %r0
XOR %r0, %r5, %r0
SHL %r0, %r1, %r0
XOR %r0, %r6, %r0
SHL %r0, %r1, %r0
XOR %r0, %r7, %r0
SHL %r0, %r1, %r0
XOR %r0, %r8, %r0
SHL %r0, %r1, %r0
XOR %r0, %r9, %r0
SHL %r0, %r1, %r0
XOR %r0, %r10, %r0
SHL %r0, %r1, %r0
XOR %r0, %r11, %r0
SHL %r0, %r1, %r0
XOR %r0, %r12, %r0
ST %r0,0x3FC, %r31 ; cycle 41: should write 0x11A
ADD %r7, %r6, %r13
ADD %r9, %r5, %r14
XOR %r10, %r5, %r15
XOR %r15, %r7, %r16
ADD %r16, %r16, %r16
ADD %r4, %r13, %r17
ADD %r15, %r15, %r18
SUB %r18, %r12, %r18
OR %r18, %r1, %r19
CMPLT %r17, %r18, %r20
ADD %r19, %r20, %r20
SHL %r0, %r1, %r0
XOR %r0, %r13, %r0
SHL %r0, %r1, %r0
XOR %r0, %r14, %r0
SHL %r0, %r1, %r0
XOR %r0, %r15, %r0
SHL %r0, %r1, %r0
XOR %r0, %r16, %r0
SHL %r0, %r1, %r0
XOR %r0, %r17, %r0
SHL %r0, %r1, %r0
XOR %r0, %r18, %r0
SHL %r0, %r1, %r0
XOR %r0, %r19, %r0
SHL %r0, %r1, %r0
XOR %r0, %r20, %r0
ST %r0,0x3FC,%r31 ; cycle 69: should write 0x11F12
SHL %r16, %r20, %r21
SHL %r21, %r7, %r21
SRA %r21, %r20, %r21
SRA %r21, %r9, %r21
SUB %r17, %r21, %r21
CMPLE %r19, %r20, %r22
ADD %r22, %r21, %r22
OR %r20, %r3, %r23
SHL %r6, %r2, %r24
SHL %r5, %r3, %r25
SUB %r25, %r15, %r25
SUB %r4, %r24, %r26
SUB %r6, %r26, %r26
ADD %r14, %r13, %r27
SHL %r27, %r27, %r28
SHR %r28, %r27, %r28
ADD %r1, %r28, %r28
SHL %r15, %r23, %r29
SRA %r29, %r23, %r29
ADD %r29, %r14, %r29
AND %r29, %r28, %r30
XOR %r30, %r2, %r30
SHL %r0, %r1, %r0
XOR %r0, %r21, %r0
SHL %r0, %r1, %r0
XOR %r0, %r22, %r0
SHL %r0, %r1, %r0
XOR %r0, %r23, %r0
SHL %r0, %r1, %r0
XOR %r0, %r24, %r0
SHL %r0, %r1, %r0
XOR %r0, %r25, %r0
SHL %r0, %r1, %r0
XOR %r0, %r26, %r0
SHL %r0, %r1, %r0
XOR %r0, %r27, %r0
SHL %r0, %r1, %r0
XOR %r0, %r28, %r0
SHL %r0, %r1, %r0
XOR %r0, %r29, %r0
SHL %r0, %r1, %r0
XOR %r0, %r30, %r0
ST %r0,0x3FC,%r31 ; cycle 112: should write 0x47C7B8C
;
; Now test OPC instructions
; by loading setting each reg
; to 2^reg+1 - 1
;
ORC %r31, 3, %r1
XORC %r1, 4, %r2
ORC %r2, -1, %r3
ANDC %r3, 15, %r3
ADDC %r3, 16, %r4
SHL %r0, %r1, %r0
XOR %r0, %r1, %r0
SHL %r0, %r1, %r0
XOR %r0, %r2, %r0
SHL %r0, %r1, %r0
XOR %r0, %r3, %r0
SHL %r0, %r1, %r0
XOR %r0, %r4, %r0
ST %r0,0x3FC,%r31 ; cycle 126: should write 0xC7B8C7A7
SUBC %r4, -32, %r5
CMPEQC %r5, 63, %r6
ADDC %r6, 126, %r6
CMPLTC %r6, 128, %r7
SUBC %r7, -254, %r7
CMPLECr31, 7, %r8
ORC %r8, 0x1fe, %r8
CMPEQC %r8, 0x1fe, %r9
ADDC %r9, 0x3ff, %r9
CMPLTC %r9, 0x3fe, %r10
XORC %r10, 0x7ff, %r10
CMPLEC %r10, 0x7fe, %r11
XORC %r11, 0xfff, %r11
SHLC %r11, 1, %r12
XORC %r12, 1, %r12
SHL %r0, %r1, %r0
XOR %r0, %r5, %r0
SHL %r0, %r1, %r0
XOR %r0, %r6, %r0
SHL %r0, %r1, %r0
XOR %r0, %r7, %r0
SHL %r0, %r1, %r0
XOR %r0, %r8, %r0
SHL %r0, %r1, %r0
XOR %r0, %r9, %r0
SHL %r0, %r1, %r0
XOR %r0, %r10, %r0
SHL %r0, %r1, %r0
XOR %r0, %r11, %r0
SHL %r0, %r1, %r0
XOR %r0, %r12, %r0
ST %r0,0x3FC,%r31 ; cycle 158: should write 0xA17A11C7
ADDC %r31, -1, %r13
SHRC %r13, 18, %r13
ADDC %r13, 0x4000, %r14
ADDC %r14, 1, %r15
ADDC %r15, 0x7fff, %r15
ADDC %r31, -1, %r16
SHRC %r16, 15, %r16
SUBC %r31, 16384, %r17
SHRC %r17, 14, %r17
SHLC %r17, 1, %r18
ADDC %r18, 1, %r18
SHLC %r18, 1, %r19
ADDC %r19, 1, %r19
SHL %r0, %r1, %r0
XOR %r0, %r13, %r0
SHL %r0, %r1, %r0
XOR %r0, %r14, %r0
SHL %r0, %r1, %r0
XOR %r0, %r15, %r0
SHL %r0, %r1, %r0
XOR %r0, %r16, %r0
SHL %r0, %r1, %r0
XOR %r0, %r17, %r0
SHL %r0, %r1, %r0
XOR %r0, %r18, %r0
SHL %r0, %r1, %r0
XOR %r0, %r19, %r0
SHL %r0, %r1, %r0
XOR %r0, %r20, %r0
ST %r0,0x3FC,%r31 ; cycle 188: should write 0xA1638E2C
SUBC %r31, 1, %r20
SRAC %r20, 31, %r20
SHRC %r20, 11, %r20
SRAC %r20, 12, %r21
SHLC %r21, 13, %r21
ADDC %r21, 8191, %r21
ANDC %r21, -1, %r22
SHLC %r22, 1, %r22
ADDC %r22, 1, %r22
SHLC %r22, 1, %r23
SUBC %r23, -1, %r23
ORC %r31, 0x3ff, %r24
SHLC %r24, 15, %r24
XORC %r24, 0x7fff, %r24
SUBC %r31, 1, %r25
SHRC %r25, 6, %r25
SUBC %r31, 1, %r26
SHRC %r26, 5, %r26
SUBC %r31, 1, %r27
SHRC %r27, 4, %r27
SUBC %r31, 1, %r28
SHRC %r28, 3, %r28
SUBC %r31, 1, %r29
SHRC %r29, 2, %r29
SUBC %r31, 1, %r30
SHRC %r30, 1, %r30
SHL %r0, %r1, %r0
XOR %r0, %r21, %r0
SHL %r0, %r1, %r0
XOR %r0, %r22, %r0
SHL %r0, %r1, %r0
XOR %r0, %r23, %r0
SHL %r0, %r1, %r0
XOR %r0, %r24, %r0
SHL %r0, %r1, %r0
XOR %r0, %r25, %r0
SHL %r0, %r1, %r0
XOR %r0, %r26, %r0
SHL %r0, %r1, %r0
XOR %r0, %r27, %r0
SHL %r0, %r1, %r0
XOR %r0, %r28, %r0
SHL %r0, %r1, %r0
XOR %r0, %r29, %r0
SHL %r0, %r1, %r0
XOR %r0, %r30, %r0
ST %r0,0x3FC,%r31 ; cycle 235: should write 0x871C71C7
; test LD and ST
LD %r31, 0, %r2 ; location 0
SHL %r0, %r1, %r0
XOR %r0, %r2, %r0
LDr1,5,r3 ; location 8
SHL %r0, %r1, %r0
XOR %r0, %r3, %r0
ST %r0,0x3FC,%r31 ; cycle 242: should write 0x47A2B9C0
.breakpoint
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
ADD %r31, %r31, %r31
|
cohesion/david_jaz_261/Axiom/C0.agda | glangmead/formalization | 6 | 8779 | <reponame>glangmead/formalization
{-# OPTIONS --without-K --rewriting #-}
open import Basics
open import lib.Basics
open import Flat
module Axiom.C0 {@♭ i j : ULevel} (@♭ I : Type i) (@♭ R : I → Type j) where
postulate C0 : {@♭ k : ULevel} (@♭ A : Type k)
(p : (index : I) → (is-equiv (λ (a : A) → λ (r : R index) → a)))
→ A is-discrete
|
.emacs.d/elpa/wisi-3.0.1/wisitoken-parse-lr.adb | caqg/linux-home | 0 | 28766 | -- Abstract :
--
-- See spec.
--
-- Copyright (C) 2013-2015, 2017, 2018, 2019 Free Software Foundation, Inc.
--
-- This file is part of the WisiToken package.
--
-- The WisiToken package is free software; you can redistribute it
-- and/or modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 3, or
-- (at your option) any later version. The WisiToken package is
-- distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or
-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-- License for more details. You should have received a copy of the
-- GNU General Public License distributed with the WisiToken package;
-- see file GPL.txt. If not, write to the Free Software Foundation,
-- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- As a special exception, if other files instantiate generics from
-- this unit, or you link this unit with other files to produce an
-- executable, this unit does not by itself cause the resulting
-- executable to be covered by the GNU General Public License. This
-- exception does not however invalidate any other reasons why the
-- executable file might be covered by the GNU Public License.
pragma License (GPL);
with Ada.Exceptions;
with Ada.Strings.Maps;
with Ada.Strings.Fixed;
with Ada.Text_IO;
with GNATCOLL.Mmap;
package body WisiToken.Parse.LR is
----------
-- Public subprograms, declaration order
function Image (Item : in Parse_Action_Rec; Descriptor : in WisiToken.Descriptor) return String
is
use Ada.Containers;
begin
case Item.Verb is
when Shift =>
return "(Shift," & State_Index'Image (Item.State) & ")";
when Reduce =>
return "(Reduce," & Count_Type'Image (Item.Token_Count) & ", " &
Image (Item.Production.LHS, Descriptor) & "," & Trimmed_Image (Item.Production.RHS) & ")";
when Accept_It =>
return "(Accept It)";
when Error =>
return "(Error)";
end case;
end Image;
procedure Put (Trace : in out WisiToken.Trace'Class; Item : in Parse_Action_Rec)
is
use Ada.Containers;
begin
case Item.Verb is
when Shift =>
Trace.Put ("shift and goto state" & State_Index'Image (Item.State), Prefix => False);
when Reduce =>
Trace.Put
("reduce" & Count_Type'Image (Item.Token_Count) & " tokens to " &
Image (Item.Production.LHS, Trace.Descriptor.all),
Prefix => False);
when Accept_It =>
Trace.Put ("accept it", Prefix => False);
when Error =>
Trace.Put ("ERROR", Prefix => False);
end case;
end Put;
function Equal (Left, Right : in Parse_Action_Rec) return Boolean
is
use all type Ada.Containers.Count_Type;
begin
if Left.Verb = Right.Verb then
case Left.Verb is
when Shift =>
return Left.State = Right.State;
when Reduce | Accept_It =>
return Left.Production.LHS = Right.Production.LHS and Left.Token_Count = Right.Token_Count;
when Error =>
return True;
end case;
else
return False;
end if;
end Equal;
function Is_In (Item : in Parse_Action_Rec; List : in Parse_Action_Node_Ptr) return Boolean
is
Node : Parse_Action_Node_Ptr := List;
begin
loop
exit when Node = null;
if Equal (Item, Node.Item) then
return True;
end if;
Node := Node.Next;
end loop;
return False;
end Is_In;
function Compare (Left, Right : in Token_ID) return SAL.Compare_Result
is begin
if Left < Right then
return SAL.Less;
elsif Left = Right then
return SAL.Equal;
else
return SAL.Greater;
end if;
end Compare;
procedure Add
(List : in out Action_Arrays.Vector;
Symbol : in Token_ID;
Action : in Parse_Action_Rec)
is begin
declare
Node : constant Action_Arrays.Find_Reference_Type := List.Find (Symbol);
begin
if Node.Element /= null then
declare
I : Parse_Action_Node_Ptr := Node.Element.Actions;
begin
loop
exit when I.Next = null;
I := I.Next;
end loop;
I.Next := new Parse_Action_Node'(Action, null);
return;
end;
end if;
end;
List.Insert ((Symbol, new Parse_Action_Node'(Action, null)));
end Add;
function To_Vector (Item : in Kernel_Info_Array) return Kernel_Info_Arrays.Vector
is begin
return Result : Kernel_Info_Arrays.Vector do
Result.Set_First_Last (Item'First, Item'Last);
for I in Item'Range loop
Result (I) := Item (I);
end loop;
end return;
end To_Vector;
function Strict_Image (Item : in Kernel_Info) return String
is begin
return "(" & Trimmed_Image (Item.LHS) & "," & Token_ID'Image (Item.Before_Dot) & "," &
Ada.Containers.Count_Type'Image (Item.Length_After_Dot) & ", " &
(if Item.Recursive then "True" else "False") & ")";
end Strict_Image;
function Strict_Image (Item : in Minimal_Action) return String
is begin
case Item.Verb is
when Shift =>
return "(Shift," & Token_ID'Image (Item.ID) & "," & State_Index'Image (Item.State) & ")";
when Reduce =>
return "(Reduce," & Token_ID'Image (Item.Nonterm) & "," &
Ada.Containers.Count_Type'Image (Item.Token_Count) & ")";
end case;
end Strict_Image;
function Image (Item : in Minimal_Action; Descriptor : in WisiToken.Descriptor) return String
is begin
case Item.Verb is
when Shift =>
return "Shift " & Image (Item.ID, Descriptor);
when Reduce =>
return "Reduce to " & Image (Item.Nonterm, Descriptor);
end case;
end Image;
function To_Vector (Item : in Minimal_Action_Array) return Minimal_Action_Arrays.Vector
is begin
return Result : Minimal_Action_Arrays.Vector do
Result.Set_First_Last (Item'First, Item'Last);
for I in Item'Range loop
Result.Replace_Element (I, Item (I));
end loop;
end return;
end To_Vector;
procedure Add_Action
(State : in out LR.Parse_State;
Symbol : in Token_ID;
State_Index : in WisiToken.State_Index)
is begin
Add (State.Action_List, Symbol, (Shift, State_Index));
end Add_Action;
procedure Add_Action
(State : in out LR.Parse_State;
Symbol : in Token_ID;
Verb : in LR.Parse_Action_Verbs;
Production : in Production_ID;
RHS_Token_Count : in Ada.Containers.Count_Type;
Semantic_Action : in WisiToken.Syntax_Trees.Semantic_Action;
Semantic_Check : in Semantic_Checks.Semantic_Check)
is
Action : constant Parse_Action_Rec :=
(case Verb is
when Reduce => (Reduce, Production, Semantic_Action, Semantic_Check, RHS_Token_Count),
when Accept_It => (Accept_It, Production, Semantic_Action, Semantic_Check, RHS_Token_Count),
when others => raise SAL.Programmer_Error);
begin
Add (State.Action_List, Symbol, Action);
end Add_Action;
procedure Add_Action
(State : in out Parse_State;
Symbols : in Token_ID_Array;
Production : in Production_ID;
RHS_Token_Count : in Ada.Containers.Count_Type;
Semantic_Action : in WisiToken.Syntax_Trees.Semantic_Action;
Semantic_Check : in WisiToken.Semantic_Checks.Semantic_Check)
is begin
-- We assume WisiToken.BNF.Output_Ada_Common.Duplicate_Reduce is True
-- for this state; no conflicts, all the same action.
for Symbol of Symbols loop
Add_Action
(State, Symbol, Reduce, Production, RHS_Token_Count,
Semantic_Action, Semantic_Check);
end loop;
end Add_Action;
procedure Add_Conflict
(State : in out LR.Parse_State;
Symbol : in Token_ID;
Reduce_Production : in Production_ID;
RHS_Token_Count : in Ada.Containers.Count_Type;
Semantic_Action : in WisiToken.Syntax_Trees.Semantic_Action;
Semantic_Check : in Semantic_Checks.Semantic_Check)
is
Conflict : constant Parse_Action_Rec :=
(Reduce, Reduce_Production, Semantic_Action, Semantic_Check, RHS_Token_Count);
Ref : constant Action_Arrays.Find_Reference_Constant_Type := State.Action_List.Find_Constant (Symbol);
Node : Parse_Action_Node_Ptr := Ref.Actions;
begin
loop
exit when Node.Next = null;
Node := Node.Next;
end loop;
Node.Next := new Parse_Action_Node'(Conflict, null);
end Add_Conflict;
procedure Add_Goto
(State : in out LR.Parse_State;
Symbol : in Token_ID;
To_State : in State_Index)
is begin
State.Goto_List.Insert ((Symbol, To_State));
end Add_Goto;
function Goto_For
(Table : in Parse_Table;
State : in State_Index;
ID : in Token_ID)
return Unknown_State_Index
is
Ref : constant Goto_Arrays.Find_Reference_Constant_Type := Table.States (State).Goto_List.Find_Constant (ID);
begin
if Ref.Element = null then
-- We can only get here during error recovery.
return Unknown_State;
else
return Ref.State;
end if;
end Goto_For;
function Action_For
(Table : in Parse_Table;
State : in State_Index;
ID : in Token_ID)
return Parse_Action_Node_Ptr
is
Ref : constant Action_Arrays.Find_Reference_Constant_Type := Table.States (State).Action_List.Find_Constant (ID);
begin
if Ref.Element = null then
return Table.Error_Action;
end if;
return Ref.Actions;
end Action_For;
function Expecting (Table : in Parse_Table; State : in State_Index) return Token_ID_Set
is
Result : Token_ID_Set := (Table.First_Terminal .. Table.Last_Terminal => False);
begin
for Action of Table.States (State).Action_List loop
Result (Action.Symbol) := True;
end loop;
return Result;
end Expecting;
procedure Free_Table (Table : in out Parse_Table_Ptr)
is
procedure Free is new Ada.Unchecked_Deallocation (Parse_Table, Parse_Table_Ptr);
Parse_Action : Parse_Action_Node_Ptr;
Temp_Parse_Action : Parse_Action_Node_Ptr;
begin
if Table = null then
return;
end if;
for State of Table.States loop
for Action of State.Action_List loop
Parse_Action := Action.Actions;
loop
exit when Parse_Action = null;
Temp_Parse_Action := Parse_Action;
Parse_Action := Parse_Action.Next;
Free (Temp_Parse_Action);
end loop;
end loop;
end loop;
Free (Table);
end Free_Table;
function Get_Text_Rep
(File_Name : in String;
McKenzie_Param : in McKenzie_Param_Type;
Actions : in Semantic_Action_Array_Arrays.Vector)
return Parse_Table_Ptr
is
use Ada.Text_IO;
File : GNATCOLL.Mmap.Mapped_File;
Region : GNATCOLL.Mmap.Mapped_Region;
Buffer : GNATCOLL.Mmap.Str_Access;
Buffer_Abs_Last : Integer; -- Buffer'Last, except Buffer has no bounds
Buffer_Last : Integer := 0; -- Last char read from Buffer
Delimiters : constant Ada.Strings.Maps.Character_Set := Ada.Strings.Maps.To_Set (" ;" & ASCII.LF);
function Check_Semicolon return Boolean
is begin
if Buffer (Buffer_Last) = ';' then
-- There is a space, newline, or newline and space after ';'. Leave
-- Buffer_Last on newline for Check_New_Line.
Buffer_Last := Buffer_Last + 1;
return True;
else
return False;
end if;
end Check_Semicolon;
procedure Check_Semicolon
is begin
if Buffer (Buffer_Last) = ';' then
-- There is a space, newline, or newline and space after ';'. Leave
-- Buffer_Last on newline for Check_New_Line.
Buffer_Last := Buffer_Last + 1;
else
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Buffer_Last),
"expecting semicolon, found '" & Buffer (Buffer_Last) & "'");
end if;
end Check_Semicolon;
function Check_EOI return Boolean
is begin
return Buffer_Last >= Buffer_Abs_Last;
end Check_EOI;
procedure Check_New_Line
is
use Ada.Strings.Maps;
begin
if Buffer (Buffer_Last) = ASCII.LF then
-- There is a space or semicolon after some newlines.
if Is_In (Buffer (Buffer_Last + 1), Delimiters) then
Buffer_Last := Buffer_Last + 1;
end if;
else
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Buffer_Last),
"expecting new_line, found '" & Buffer (Buffer_Last) & "'");
end if;
end Check_New_Line;
type Buffer_Region is record
First : Integer;
Last : Integer;
end record;
function Next_Value return Buffer_Region;
pragma Inline (Next_Value);
function Next_Value return Buffer_Region
is
use Ada.Strings.Fixed;
First : constant Integer := Buffer_Last + 1;
begin
Buffer_Last := Index (Buffer.all, Delimiters, First);
return (First, Buffer_Last - 1);
end Next_Value;
procedure Raise_Gen_Next_Value_Constraint_Error (Name : String; Region : Buffer_Region);
pragma No_Return (Raise_Gen_Next_Value_Constraint_Error);
procedure Raise_Gen_Next_Value_Constraint_Error (Name : String; Region : Buffer_Region)
is begin
-- Factored out from Gen_Next_Value to make Inline efficient.
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Region.First),
"expecting " & Name & ", found '" & Buffer (Region.First .. Region.Last) & "'");
end Raise_Gen_Next_Value_Constraint_Error;
generic
type Value_Type is (<>);
Name : in String;
function Gen_Next_Value return Value_Type;
pragma Inline (Gen_Next_Value);
function Gen_Next_Value return Value_Type
is
Region : constant Buffer_Region := Next_Value;
begin
return Value_Type'Value (Buffer (Region.First .. Region.Last));
exception
when Constraint_Error =>
Raise_Gen_Next_Value_Constraint_Error (Name, Region);
end Gen_Next_Value;
function Next_State_Index is new Gen_Next_Value (State_Index, "State_Index");
function Next_Token_ID is new Gen_Next_Value (Token_ID, "Token_ID");
function Next_Integer is new Gen_Next_Value (Integer, "Integer");
function Next_Parse_Action_Verbs is new Gen_Next_Value (Parse_Action_Verbs, "Parse_Action_Verbs");
function Next_Boolean is new Gen_Next_Value (Boolean, "Boolean");
function Next_Count_Type is new Gen_Next_Value (Ada.Containers.Count_Type, "Count_Type");
begin
File := GNATCOLL.Mmap.Open_Read (File_Name);
Region := GNATCOLL.Mmap.Read (File);
Buffer := GNATCOLL.Mmap.Data (Region);
Buffer_Abs_Last := GNATCOLL.Mmap.Last (Region);
declare
use Ada.Containers;
-- We don't read the discriminants in the aggregate, because
-- aggregate evaluation order is not guaranteed.
State_First : constant State_Index := Next_State_Index;
State_Last : constant State_Index := Next_State_Index;
First_Terminal : constant Token_ID := Next_Token_ID;
Last_Terminal : constant Token_ID := Next_Token_ID;
First_Nonterminal : constant Token_ID := Next_Token_ID;
Last_Nonterminal : constant Token_ID := Next_Token_ID;
Table : constant Parse_Table_Ptr := new Parse_Table
(State_First, State_Last, First_Terminal, Last_Terminal, First_Nonterminal, Last_Nonterminal);
begin
Check_New_Line;
Table.McKenzie_Param := McKenzie_Param;
for State of Table.States loop
declare
Actions_Done : Boolean := False;
begin
State.Action_List.Set_Capacity (Next_Count_Type);
loop
declare
Node_I : Action_Node;
Node_J : Parse_Action_Node_Ptr := new Parse_Action_Node;
Action_Done : Boolean := False;
Verb : Parse_Action_Verbs;
begin
Node_I.Actions := Node_J;
loop
Verb := Next_Parse_Action_Verbs;
Node_J.Item :=
(case Verb is
when Shift => (Verb => Shift, others => <>),
when Reduce => (Verb => Reduce, others => <>),
when Accept_It => (Verb => Accept_It, others => <>),
when Error => (Verb => Error));
case Verb is
when Shift =>
Node_J.Item.State := Next_State_Index;
when Reduce | Accept_It =>
Node_J.Item.Production.LHS := Next_Token_ID;
Node_J.Item.Production.RHS := Next_Integer;
if Next_Boolean then
Node_J.Item.Action := Actions
(Node_J.Item.Production.LHS)(Node_J.Item.Production.RHS).Action;
else
Node_J.Item.Action := null;
end if;
if Next_Boolean then
Node_J.Item.Check := Actions
(Node_J.Item.Production.LHS)(Node_J.Item.Production.RHS).Check;
else
Node_J.Item.Check := null;
end if;
Node_J.Item.Token_Count := Next_Count_Type;
when Error =>
raise SAL.Programmer_Error;
end case;
if Check_Semicolon then
Action_Done := True;
Node_I.Symbol := Next_Token_ID;
if Check_Semicolon then
Actions_Done := True;
end if;
end if;
exit when Action_Done;
Node_J.Next := new Parse_Action_Node;
Node_J := Node_J.Next;
end loop;
Check_New_Line;
State.Action_List.Insert (Node_I);
end;
exit when Actions_Done;
end loop;
end;
if Check_Semicolon then
-- No Gotos
null;
else
State.Goto_List.Set_Capacity (Next_Count_Type);
declare
Node : Goto_Node;
begin
loop
Node.Symbol := Next_Token_ID;
Node.State := Next_State_Index;
State.Goto_List.Insert (Node);
exit when Check_Semicolon;
end loop;
end;
end if;
Check_New_Line;
declare
First : constant Count_Type := Next_Count_Type;
Last : constant Integer := Next_Integer;
begin
if Last = -1 then
-- State.Kernel not set for state 0
null;
else
State.Kernel.Set_First_Last (First, Count_Type (Last));
for I in State.Kernel.First_Index .. State.Kernel.Last_Index loop
State.Kernel (I).LHS := Next_Token_ID;
State.Kernel (I).Before_Dot := Next_Token_ID;
State.Kernel (I).Length_After_Dot := Next_Count_Type;
end loop;
end if;
end;
Check_New_Line;
if Check_Semicolon then
-- No minimal action
null;
else
declare
First : constant Count_Type := Next_Count_Type;
Last : constant Count_Type := Next_Count_Type;
begin
State.Minimal_Complete_Actions.Set_First_Last (First, Last);
end;
for I in State.Minimal_Complete_Actions.First_Index .. State.Minimal_Complete_Actions.Last_Index loop
declare
Verb : constant Minimal_Verbs := Next_Parse_Action_Verbs;
ID : Token_ID;
Action_State : State_Index;
Count : Ada.Containers.Count_Type;
begin
case Verb is
when Shift =>
ID := Next_Token_ID;
Action_State := Next_State_Index;
State.Minimal_Complete_Actions.Replace_Element (I, (Shift, ID, Action_State));
when Reduce =>
ID := Next_Token_ID;
Count := Next_Count_Type;
State.Minimal_Complete_Actions.Replace_Element (I, (Reduce, ID, Count));
end case;
end;
end loop;
Check_Semicolon;
end if;
Check_New_Line;
exit when Check_EOI;
end loop;
Table.Error_Action := new Parse_Action_Node'((Verb => Error), null);
return Table;
end;
exception
when Name_Error =>
raise User_Error with "parser table text file '" & File_Name & "' not found.";
when SAL.Programmer_Error =>
raise;
when E : others =>
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Buffer_Last),
Ada.Exceptions.Exception_Name (E) & ": " & Ada.Exceptions.Exception_Message (E));
end Get_Text_Rep;
function Compare (Left, Right : in Insert_Delete_Op) return SAL.Compare_Result
is
Left_Token_Index : constant WisiToken.Token_Index :=
(case Insert_Delete_Op_Label'(Left.Op) is
when Insert => Left.Ins_Token_Index,
when Delete => Left.Del_Token_Index);
Right_Token_Index : constant WisiToken.Token_Index :=
(case Insert_Delete_Op_Label'(Right.Op) is
when Insert => Right.Ins_Token_Index,
when Delete => Right.Del_Token_Index);
begin
if Left_Token_Index < Right_Token_Index then
return SAL.Less;
elsif Left_Token_Index = Right_Token_Index then
return SAL.Equal;
else
return SAL.Greater;
end if;
end Compare;
function Equal (Left : in Config_Op; Right : in Insert_Op) return Boolean
is begin
return Left.Op = Insert and then
Left.Ins_ID = Right.Ins_ID and then
Left.Ins_Token_Index = Right.Ins_Token_Index;
end Equal;
function None (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
begin
for I in First_Index (Ops) .. Last_Index (Ops) loop
if Constant_Ref (Ops, I).Op /= Op then
return False;
end if;
end loop;
return True;
end None;
function None_Since_FF (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
begin
for I in reverse First_Index (Ops) .. Last_Index (Ops) loop
declare
O : Config_Op renames Constant_Ref (Ops, I);
begin
exit when O.Op = Fast_Forward;
if O.Op = Op then
return False;
end if;
end;
end loop;
return True;
end None_Since_FF;
function Only_Since_FF (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
use all type Ada.Containers.Count_Type;
begin
if Length (Ops) = 0 or else Constant_Ref (Ops, Last_Index (Ops)).Op /= Op then
return False;
else
for I in reverse First_Index (Ops) .. Last_Index (Ops) loop
declare
O : Config_Op renames Constant_Ref (Ops, I);
begin
exit when O.Op = Fast_Forward;
if O.Op /= Op then
return False;
end if;
end;
end loop;
return True;
end if;
end Only_Since_FF;
function Any (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
begin
for I in First_Index (Ops) .. Last_Index (Ops) loop
declare
O : Config_Op renames Constant_Ref (Ops, I);
begin
if O.Op = Op then
return True;
end if;
end;
end loop;
return False;
end Any;
function Valid_Tree_Indices (Stack : in Recover_Stacks.Stack; Depth : in SAL.Base_Peek_Type) return Boolean
is
use all type WisiToken.Syntax_Trees.Node_Index;
begin
for I in 1 .. Depth loop
if Stack.Peek (I).Tree_Index = Syntax_Trees.Invalid_Node_Index then
return False;
end if;
end loop;
return True;
end Valid_Tree_Indices;
procedure Set_Key (Item : in out Configuration; Key : in Integer)
is begin
Item.Cost := Key;
end Set_Key;
procedure Accumulate (Data : in McKenzie_Data; Counts : in out Strategy_Counts)
is
procedure Proc (Config : in Configuration)
is begin
for I in Config.Strategy_Counts'Range loop
Counts (I) := Counts (I) + Config.Strategy_Counts (I);
end loop;
end Proc;
begin
Data.Results.Process (Proc'Unrestricted_Access);
end Accumulate;
end WisiToken.Parse.LR;
|
programs/oeis/023/A023022.asm | jmorken/loda | 1 | 97766 | <filename>programs/oeis/023/A023022.asm
; A023022: Number of partitions of n into two relatively prime parts. After initial term, this is the "half-totient" function phi(n)/2 (A000010(n)/2).
; 1,1,1,2,1,3,2,3,2,5,2,6,3,4,4,8,3,9,4,6,5,11,4,10,6,9,6,14,4,15,8,10,8,12,6,18,9,12,8,20,6,21,10,12,11,23,8,21,10,16,12,26,9,20,12,18,14,29,8,30,15,18,16,24,10,33,16,22,12,35,12,36,18,20,18,30,12,39,16,27,20,41,12,32,21,28,20,44,12,36,22,30,23,36,16,48,21,30,20,50,16,51,24,24,26,53,18,54,20,36,24,56,18,44,28,36,29,48,16,55,30,40,30,50,18,63,32,42,24,65,20,54,33,36,32,68,22,69,24,46,35,60,24,56,36,42,36,74,20,75,36,48,30,60,24,78,39,52,32,66,27,81,40,40,41,83,24,78,32,54,42,86,28,60,40,58,44,89,24,90,36,60,44,72,30,80,46,54,36,95,32,96,48,48,42,98,30,99,40,66,50,84,32,80,51,66,48,90,24,105,52,70,53,84,36,90,54,72,40,96,36,111,48,60,56,113,36,114,44,60,56,116,36,92,58,78,48,119,32,120,55,81,60,84,40,108,60,82,50,125
add $0,1
cal $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n.
mov $1,$0
sub $1,1
div $1,2
add $1,1
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/s-intman.ads | djamal2727/Main-Bearing-Analytical-Model | 0 | 5514 | <reponame>djamal2727/Main-Bearing-Analytical-Model<gh_stars>0
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This package encapsulates and centralizes information about all uses of
-- interrupts (or signals), including the target-dependent mapping of
-- interrupts (or signals) to exceptions.
-- Unlike the original design, System.Interrupt_Management can only be used
-- for tasking systems.
-- PLEASE DO NOT put any subprogram declarations with arguments of type
-- Interrupt_ID into the visible part of this package. The type Interrupt_ID
-- is used to derive the type in Ada.Interrupts, and adding more operations
-- to that type would be illegal according to the Ada Reference Manual. This
-- is the reason why the signals sets are implemented using visible arrays
-- rather than functions.
with System.OS_Interface;
with Interfaces.C;
package System.Interrupt_Management is
pragma Preelaborate;
type Interrupt_Mask is limited private;
type Interrupt_ID is new Interfaces.C.int
range 0 .. System.OS_Interface.Max_Interrupt;
type Interrupt_Set is array (Interrupt_ID) of Boolean;
-- The following objects serve as constants, but are initialized in the
-- body to aid portability. This permits us to use more portable names for
-- interrupts, where distinct names may map to the same interrupt ID
-- value.
-- For example, suppose SIGRARE is a signal that is not defined on all
-- systems, but is always reserved when it is defined. If we have the
-- convention that ID zero is not used for any "real" signals, and SIGRARE
-- = 0 when SIGRARE is not one of the locally supported signals, we can
-- write:
-- Reserved (SIGRARE) := True;
-- and the initialization code will be portable.
Abort_Task_Interrupt : Interrupt_ID;
-- The interrupt that is used to implement task abort if an interrupt is
-- used for that purpose. This is one of the reserved interrupts.
Keep_Unmasked : Interrupt_Set := (others => False);
-- Keep_Unmasked (I) is true iff the interrupt I is one that must be kept
-- unmasked at all times, except (perhaps) for short critical sections.
-- This includes interrupts that are mapped to exceptions (see
-- System.Interrupt_Exceptions.Is_Exception), but may also include
-- interrupts (e.g. timer) that need to be kept unmasked for other
-- reasons. Where interrupts are implemented as OS signals, and signal
-- masking is per-task, the interrupt should be unmasked in ALL TASKS.
Reserve : Interrupt_Set := (others => False);
-- Reserve (I) is true iff the interrupt I is one that cannot be permitted
-- to be attached to a user handler. The possible reasons are many. For
-- example, it may be mapped to an exception used to implement task abort,
-- or used to implement time delays.
procedure Initialize;
-- Initialize the various variables defined in this package. This procedure
-- must be called before accessing any object from this package, and can be
-- called multiple times.
private
type Interrupt_Mask is new System.OS_Interface.sigset_t;
-- In some implementations Interrupt_Mask is represented as a linked list
procedure Adjust_Context_For_Raise
(Signo : System.OS_Interface.Signal;
Ucontext : System.Address);
pragma Import
(C, Adjust_Context_For_Raise, "__gnat_adjust_context_for_raise");
-- Target specific hook performing adjustments to the signal's machine
-- context, to be called before an exception may be raised from a signal
-- handler. This service is provided by init.c, together with the
-- non-tasking signal handler.
end System.Interrupt_Management;
|
programs/oeis/339/A339825.asm | karttu/loda | 0 | 15635 | <reponame>karttu/loda<filename>programs/oeis/339/A339825.asm
; A339825: Odd bisection of the infinite Fibonacci word A003849.
; 1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,1
mul $0,2
mov $1,3
mov $2,3
add $2,$0
cal $2,189661 ; Fixed point of the morphism 0->010, 1->10 starting with 0.
sub $1,$0
add $1,$2
add $1,$0
sub $1,3
|
src/grammars/Corax.g4 | CorvusPrudens/Cp | 0 | 6659 | grammar Corax;
// parsey
parse : (function | variable_init | struct_)* EOF;
scope : OBRACE (variable_init | statement | label)* CBRACE;
control : return_ | break_ | breakall | continue_;
return_ : RETURN expression? SEMI;
break_ : BREAK SEMI;
breakall : BREAKALL SEMI;
continue_ : CONTINUE SEMI;
label : NAME COLON;
variable_init : variable_def
| variable_dec;
variable_def : type (assignment | variable list) SEMI;
variable_dec : type NAME array_init? SEMI;
call : variable OPAREN ( | type | expression (COMMA expression)* COMMA?) CPAREN SEMI;
array_init : OBRACKET expression? CBRACKET;
type : NAME;
list : (array_init EQUALS OBRACE expression (COMMA expression)* COMMA? CBRACE);
variable : NAME accessor?;
accessor : arrow
| dot
| indexer;
arrow : ARROW variable;
dot : DOT variable;
indexer : OBRACKET expression CBRACKET;
// macros will be handled by a proper pre-processor
operand : NUMBER
| variable
| preop
| postop
;
preop : adjacent variable;
postop : variable adjacent;
adjacent : INCREMENT | DECREMENT;
statement : assignment SEMI | control | if_ | while_ | for_ | call | preop SEMI | postop SEMI | empty;
empty : SEMI;
assignment : variable (EQUALS | COMPOUND) expression;
expression : combination (OPERATOR combination)*;
combination : operand
| subgroup
;
subgroup : OPAREN operand (OPERATOR operand)* CPAREN;
struct_ : STRUCT NAME EQUALS OBRACE variable+ CBRACE SEMI;
if_ : IF condition (scope | statement) else_*;
else_ : ELSE (IF condition)? (scope | statement);
condition : OPAREN (expression | conditional) CPAREN;
conditional : expression COMPARATOR expression;
for_ : FOR for_construct (scope | statement);
for_construct : OPAREN (statement | variable_init) (expression SEMI | conditional SEMI | empty) for_end CPAREN;
for_end : | assignment | preop | postop;
while_ : WHILE condition (statement | scope);
function : function_def
| function_dec SEMI;
function_dec : type NAME OPAREN ( | type | type NAME (COMMA type NAME)* COMMA?) CPAREN;
function_def : function_dec scope;
STRING : '"' (~["\r\n] | '""' | '\\"')* '"';
CHAR : '\'' (('\\'.)|~[\\]) '\'';
COMMENT : '//' ~[\n\r]* [\n\r] -> skip;
COMMENT_BLOCK : '/*' .*? '*/' -> skip;
TEST_BLOCK : '$' .*? '$end' -> skip;
PRAGMA : '#pragma';
OBRACE : '{';
CBRACE : '}';
OBRACKET : '[';
CBRACKET : ']';
OPAREN : '(';
CPAREN : ')';
COMMA : ',';
SEMI : ';';
COLON : ':';
ARROW : '->';
DOT : '.';
STRUCT : 'struct';
IF : 'if';
ELSE : 'else';
FOR : 'for';
WHILE : 'while';
RETURN : 'return';
BREAK : 'break';
BREAKALL : 'breakall';
CONTINUE : 'continue';
NAME : [a-zA-Z_][a-zA-Z_0-9]*;
COMPOUND : [+\-*/] '=';
OPERATOR : [+\-*/%] | '**';
COMPARATOR : [><] '='? | '==';
EQUALS : '=';
INCREMENT : '++';
DECREMENT : '--';
fragment DEC : [1-9][0-9_]* | '0';
fragment HEX : '0x'[0-9A-Fa-f][0-9A-Fa-f_]*;
fragment BIN : '0b'[0-1][0-1_]*;
fragment FLT : ([1-9][0-9_]* | '0') '.' ([1-9][0-9_]* | '0');
NUMBER : DEC | BIN | HEX | FLT; |
alloy4fun_models/trashltl/models/5/YeSqwerdsjrskASDJ.als | Kaixi26/org.alloytools.alloy | 0 | 4169 | <filename>alloy4fun_models/trashltl/models/5/YeSqwerdsjrskASDJ.als
open main
pred idYeSqwerdsjrskASDJ_prop6 {
always some f:File | (always f in Trash) releases (f in Trash and after f in Trash)
}
pred __repair { idYeSqwerdsjrskASDJ_prop6 }
check __repair { idYeSqwerdsjrskASDJ_prop6 <=> prop6o } |
programs/oeis/304/A304161.asm | neoneye/loda | 22 | 85000 | ; A304161: a(n) = 2*n^3 - 4*n^2 + 10*n - 2 (n>=1).
; 6,18,46,102,198,346,558,846,1222,1698,2286,2998,3846,4842,5998,7326,8838,10546,12462,14598,16966,19578,22446,25582,28998,32706,36718,41046,45702,50698,56046,61758,67846,74322,81198,88486,96198,104346,112942,121998,131526,141538,152046,163062,174598,186666,199278,212446,226182,240498,255406,270918,287046,303802,321198,339246,357958,377346,397422,418198,439686,461898,484846,508542,532998,558226,584238,611046,638662,667098,696366,726478,757446,789282,821998,855606,890118,925546,961902,999198,1037446,1076658,1116846,1158022,1200198,1243386,1287598,1332846,1379142,1426498,1474926,1524438,1575046,1626762,1679598,1733566,1788678,1844946,1902382,1960998
mov $1,$0
pow $0,2
add $0,4
add $0,$1
mul $0,$1
add $0,3
mul $0,2
|
oeis/005/A005327.asm | neoneye/loda-programs | 11 | 243212 | ; A005327: Certain subgraphs of a directed graph (inverse binomial transform of A005321).
; Submitted by <NAME>
; 1,0,1,6,91,2820,177661,22562946,5753551231,2940064679040,3007686166657921,6156733583148764286,25211824022994189751171,206510050572345408251841660,3383254158526734823389921915781,110859089012445519958017571414396026,7265150398430617150448681542642443563911,952250527872699420526459138475687720365378680,249625810128133044195067577937432206079741463311241,130875567114648489341899395234082519028929412575060610166,137232847787242539711682158357578077390759658790894179304813451
mov $3,1
lpb $0
sub $0,1
mov $4,$1
add $1,$3
add $1,$4
add $2,1
mul $1,$2
mul $2,2
mov $3,$4
lpe
mov $0,$3
|
programs/oeis/337/A337030.asm | neoneye/loda | 22 | 81249 | <reponame>neoneye/loda<gh_stars>10-100
; A337030: a(n) is the number of squarefree composite numbers < prime(n).
; 0,0,0,1,2,2,4,4,6,7,8,11,13,14,15,16,19,19,22,24,24,27,28,31,35,35,36,38,38,40,46,48,50,51,56,56,58,61,63,64,67,67,73,73,75,75,82,90,91,91,93,96,96,99,102,105,108,108,110,111,112,117,124,126,126,127,136,138,142,142,142,146,149,151,153,155,157,162,164,168,174,174,179,179,183,184,187,191,192,193,195,201,205,206,210,212,214,221,221,229
mov $1,$0
seq $0,112929 ; Number of squarefree integers less than the n-th prime.
sub $0,$1
sub $0,1
|
source/libgela/gela-hash-crc-b32.adb | faelys/gela-asis | 4 | 16238 | <gh_stars>1-10
------------------------------------------------------------------------------
-- <NAME> A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
package body Gela.Hash.CRC.b32 is
Keys : constant array (CRC32 range 0 .. 255) of CRC32 :=
(0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615,
3915621685, 2657392035, 249268274, 2044508324, 3772115230, 2547177864,
162941995, 2125561021, 3887607047, 2428444049, 498536548, 1789927666,
4089016648, 2227061214, 450548861, 1843258603, 4107580753, 2211677639,
325883990, 1684777152, 4251122042, 2321926636, 335633487, 1661365465,
4195302755, 2366115317, 997073096, 1281953886, 3579855332, 2724688242,
1006888145, 1258607687, 3524101629, 2768942443, 901097722, 1119000684,
3686517206, 2898065728, 853044451, 1172266101, 3705015759, 2882616665,
651767980, 1373503546, 3369554304, 3218104598, 565507253, 1454621731,
3485111705, 3099436303, 671266974, 1594198024, 3322730930, 2970347812,
795835527, 1483230225, 3244367275, 3060149565, 1994146192, 31158534,
2563907772, 4023717930, 1907459465, 112637215, 2680153253, 3904427059,
2013776290, 251722036, 2517215374, 3775830040, 2137656763, 141376813,
2439277719, 3865271297, 1802195444, 476864866, 2238001368, 4066508878,
1812370925, 453092731, 2181625025, 4111451223, 1706088902, 314042704,
2344532202, 4240017532, 1658658271, 366619977, 2362670323, 4224994405,
1303535960, 984961486, 2747007092, 3569037538, 1256170817, 1037604311,
2765210733, 3554079995, 1131014506, 879679996, 2909243462, 3663771856,
1141124467, 855842277, 2852801631, 3708648649, 1342533948, 654459306,
3188396048, 3373015174, 1466479909, 544179635, 3110523913, 3462522015,
1591671054, 702138776, 2966460450, 3352799412, 1504918807, 783551873,
3082640443, 3233442989, 3988292384, 2596254646, 62317068, 1957810842,
3939845945, 2647816111, 81470997, 1943803523, 3814918930, 2489596804,
225274430, 2053790376, 3826175755, 2466906013, 167816743, 2097651377,
4027552580, 2265490386, 503444072, 1762050814, 4150417245, 2154129355,
426522225, 1852507879, 4275313526, 2312317920, 282753626, 1742555852,
4189708143, 2394877945, 397917763, 1622183637, 3604390888, 2714866558,
953729732, 1340076626, 3518719985, 2797360999, 1068828381, 1219638859,
3624741850, 2936675148, 906185462, 1090812512, 3747672003, 2825379669,
829329135, 1181335161, 3412177804, 3160834842, 628085408, 1382605366,
3423369109, 3138078467, 570562233, 1426400815, 3317316542, 2998733608,
733239954, 1555261956, 3268935591, 3050360625, 752459403, 1541320221,
2607071920, 3965973030, 1969922972, 40735498, 2617837225, 3943577151,
1913087877, 83908371, 2512341634, 3803740692, 2075208622, 213261112,
2463272603, 3855990285, 2094854071, 198958881, 2262029012, 4057260610,
1759359992, 534414190, 2176718541, 4139329115, 1873836001, 414664567,
2282248934, 4279200368, 1711684554, 285281116, 2405801727, 4167216745,
1634467795, 376229701, 2685067896, 3608007406, 1308918612, 956543938,
2808555105, 3495958263, 1231636301, 1047427035, 2932959818, 3654703836,
1088359270, 936918000, 2847714899, 3736837829, 1202900863, 817233897,
3183342108, 3401237130, 1404277552, 615818150, 3134207493, 3453421203,
1423857449, 601450431, 3009837614, 3294710456, 1567103746, 711928724,
3020668471, 3272380065, 1510334235, 755167117);
subtype Byte is CRC32 range 0 .. 255;
procedure Update_Hash
(This : in out Hasher;
Value : in Byte);
pragma Inline (Update_Hash);
------------
-- Update --
------------
procedure Update
(This : in out Hasher;
Value : in String) is
begin
This.Length := This.Length + Value'Length;
if This.Length > Maximum_Length then
raise Maximum_Length_Error;
end if;
for J in Value'Range loop
Update_Hash (This, Character'Pos (Value (J)));
end loop;
end Update;
-----------------
-- Wide_Update --
-----------------
procedure Wide_Update
(This : in out Hasher;
Value : in Wide_String) is
begin
This.Length := This.Length + 2 * Value'Length;
if This.Length > Maximum_Length then
raise Maximum_Length_Error;
end if;
for J in Value'Range loop
Update_Hash (This, Wide_Character'Pos (Value (J)) and 16#FF#);
Update_Hash (This, Shift_Right (Wide_Character'Pos (Value (J)), 8));
end loop;
end Wide_Update;
----------------------
-- Wide_Wide_Update --
----------------------
procedure Wide_Wide_Update
(This : in out Hasher;
Value : in Wide_Wide_String)
is
subtype W is Wide_Wide_Character;
begin
This.Length := This.Length + 4 * Value'Length;
if This.Length > Maximum_Length then
raise Maximum_Length_Error;
end if;
for J in Value'Range loop
Update_Hash (This, W'Pos (Value (J)) and 16#FF#);
Update_Hash (This, Shift_Right (W'Pos (Value (J)), 8) and 16#FF#);
Update_Hash (This, Shift_Right (W'Pos (Value (J)), 16) and 16#FF#);
Update_Hash (This, Shift_Right (W'Pos (Value (J)), 24));
end loop;
end Wide_Wide_Update;
------------
-- Update --
------------
procedure Update
(This : in out Hasher;
Value : in Ada.Streams.Stream_Element_Array) is
begin
This.Length := This.Length + Value'Length;
if This.Length > Maximum_Length then
raise Maximum_Length_Error;
end if;
for J in Value'Range loop
Update_Hash (This, CRC32 (Value (J)));
end loop;
end Update;
---------------
-- Calculate --
---------------
function Calculate (Value : in String) return CRC32 is
H : Hasher;
begin
Update (H, Value);
return Result (H);
end Calculate;
--------------------
-- Wide_Calculate --
--------------------
function Wide_Calculate (Value : in Wide_String) return CRC32 is
H : Hasher;
begin
Wide_Update (H, Value);
return Result (H);
end Wide_Calculate;
---------------
-- Calculate --
---------------
function Wide_Wide_Calculate (Value : in Wide_Wide_String) return CRC32 is
H : Hasher;
begin
Wide_Wide_Update (H, Value);
return Result (H);
end Wide_Wide_Calculate;
---------------
-- Calculate --
---------------
function Calculate
(Value : in Ada.Streams.Stream_Element_Array)
return CRC32
is
H : Hasher;
begin
Update (H, Value);
return Result (H);
end Calculate;
-------------
-- To_Hash --
-------------
function To_Hash (T : in CRC32) return Hash_Type is
begin
return Hash_Type (T);
end To_Hash;
---------------
-- Calculate --
---------------
function Calculate (Value : in String) return Hash_Type is
begin
return To_Hash (Calculate (Value));
end Calculate;
--------------------
-- Wide_Calculate --
--------------------
function Wide_Calculate (Value : in Wide_String) return Hash_Type is
begin
return To_Hash (Wide_Calculate (Value));
end Wide_Calculate;
---------------
-- Calculate --
---------------
function Wide_Wide_Calculate
(Value : in Wide_Wide_String)
return Hash_Type
is
begin
return To_Hash (Wide_Wide_Calculate (Value));
end Wide_Wide_Calculate;
---------------
-- Calculate --
---------------
function Calculate
(Value : in Ada.Streams.Stream_Element_Array)
return Hash_Type
is
begin
return To_Hash (Calculate (Value));
end Calculate;
------------
-- Update --
------------
procedure Update_Hash
(This : in out Hasher;
Value : in Byte)
is
begin
This.Cm_Reg := Shift_Right (This.Cm_Reg, 8) xor
Keys (Value xor (This.Cm_Reg and 16#0000_00FF#));
end Update_Hash;
------------
-- Result --
------------
function Result (This : in Hasher) return CRC32 is
begin
return This.Cm_Reg xor 16#FFFFFFFF#;
end Result;
end Gela.Hash.CRC.b32;
------------------------------------------------------------------------------
-- Copyright (c) 2006, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- * this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- * notice, this list of conditions and the following disclaimer in the
-- * documentation and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the <NAME>, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
game.asm | oxypomme/CallOfVid-19 | 1 | 174216 | %include oxylib/oxysound.asm
%include oxylib/oxygame.asm
%include oxylib/oxyrand.asm
; on inclut le sprite du virus, situé dans le dossier assets
%include assets/drawV3.asm
%include assets/drawV3a.asm
DSEG SEGMENT
; position du joueur
playerX DW ?
playerY DW ?
; 1 si le joueur pointe à droite
playerRight DB ?
; 1 si le joueur a gagné, 2 si c'est une nouvelle partie
g_playerWin DW 2
; coordonnées du projectile
projX DW ?
projY DW ?
; 1 si le projectile pointe à droite
projRight DB ?
; position des ennemis
mobsX DW 0, 0, 0, 0
mobsY DW 0, 0, 0, 0
; 1 si les ennemis sont visibles
mobsShowing DW 0, 0, 0, 0
; titre
titleLbl DB "Call Of VID-19"
l_titleLbl EQU $-titleLbl
; jouer
playBtn DB "Play"
l_playBtn EQU $-playBtn
; ordonnée du bouton jouer
_PLAYy_ EQU 92
; quitter
quitBtn DB "Quit"
l_quitBtn EQU $-quitBtn
; ordonnée du bouton quitter
_QUITy_ EQU 115
; message de victoire
winLbl DB "The VID-19 isn't a treat anymore !"
l_winLbl EQU $-winLbl
; message de défaite
looseLbl DB "You failed to stem the VID-19 !"
l_looseLbl EQU $-looseLbl
; taille du joueur
_g_playerSize DW 16
; pixels par touche appuyés du deplacement du joueur
_g_playerSpeed DW 8
; taille du projectile
_g_projSize DW 16
; pixels par mise à jour du jeu du deplacement du projectile
_g_projSpeed DW 2
; taille du virus en pixel
_g_virSize DW 16
; pixels par mise à jour du jeu du deplacement des virus
_g_virSpeed DW 1
; 1 si un projectile est affiché à l'écran
g_projShow DB 0
; 1 si le joueur doit être affiché dans son sprite alternatif (animation)
g_altSprite DB 0
; compteur de frames pendant qu'un sprite joueur est affiché (animation)
g_spriteCounter DW 0
; compteur de frames pendant qu'un sprite joueur de recul est affiché (animation)
g_fireFrames DW 60
; ordonnée du curseur dans le menu
g_cursY DW _PLAYy_
; compteur de frames après un déplacement du joueur (animation)
g_moveFrames DW 60
; dernier type de mouvement fait par le joueur (haut, bas, gauche, droite)
g_lastDepl DW 0
; compteur de frames pendant qu'un sprite ennemi est affiché (animation)
g_virusAnimFrames DW 0
DSEG ENDS
SPAWNVIRUS MACRO virX, virY, show
push DX
oxrGETRND 100h, DX
add DX, 20h
mov virX, DX
oxrGETRND 88h, DX
add DX, 20h
mov virY, DX
mov show, 1
pop DX
ENDM
; g_INIT
;
; initialise une nouvelle partie
g_INIT PROC NEAR
mov playerX, 16
mov playerY, 16
mov playerRight, 1
mov projX, 0
mov projY, 0
mov projRight, 1
; SPAWNVIRUS mobsX, mobsY, mobsShowing
mov mobsX, 166
mov mobsY, 159
mov mobsShowing, 1
; SPAWNVIRUS mobsX+2, mobsY+2, mobsShowing+2
mov mobsX+2, 136
mov mobsY+2, 156
mov mobsShowing+2, 1
; SPAWNVIRUS mobsX+4, mobsY+4, mobsShowing+4
mov mobsX+4, 258
mov mobsY+4, 166
mov mobsShowing+4, 1
; SPAWNVIRUS mobsX+6, mobsY+6, mobsShowing+6
mov mobsX+6, 165
mov mobsY+6, 57
mov mobsShowing+6, 1
mov g_playerWin, 2
mov g_projShow, 0
mov g_altSprite, 0
mov g_spriteCounter, 0
mov g_fireFrames, 60
mov g_moveFrames, 60
mov g_lastDepl, 0
mov g_virusAnimFrames, 0
ret
g_INIT ENDP
; CLEARVIRUS
;
; efface une zone de la taille d'un virus
; X : absisse du point haut gauche de la zone
; Y : ordonnée du point haut gauche de la zone
CLEARVIRUS MACRO X, Y
oxg_CLEARSOMETHING X, Y, 2, 2
ENDM
; CLEARPROJ
;
; efface le projectile
CLEARPROJ PROC NEAR
oxg_CLEARSOMETHING projX, projY, 2, 1
ret
CLEARPROJ ENDP
; CLEARPLAYER
;
; efface le joueur
CLEARPLAYER PROC NEAR
oxg_CLEARSOMETHING playerX, playerY, 1, 1
ret
CLEARPLAYER ENDP
; g_DRAWPLAYER
;
; dessine le joueur
g_DRAWPLAYER PROC FAR
cmp playerRight, 0
jnz gPdrawR
; la magie fait que ça fonctionne
cmp g_fireFrames, 30 ; priorité à l'animation de tir
jbe gPdrawFireL
cmp g_moveFrames, 30 ; animation de déplacement
jbe gPdrawMoveL
cmp g_altSprite, 0 ;animation idle
jnz gPdrawAltL
%include assets/drawPl.asm
jmp gPdrawEnd
gPdrawFireL:
%include assets/drawPlF.asm
jmp gPdrawEnd
gPdrawMoveL:
cmp g_lastDepl, 1
je gPdrawULeft
cmp g_lastDepl, 2
je gPdrawDLeft
%include assets/drawPMoL.asm
jmp gPdrawEnd
gPdrawULeft:
%include assets/drawPUpL.asm
jmp gPdrawEnd
gPdrawDLeft:
%include assets/drawPDoL.asm
jmp gPdrawEnd
gPdrawAltL:
%include assets/drawPlA.asm
jmp gPdrawEnd
gPdrawR:
cmp g_fireFrames, 30
jbe gPdrawFireR
cmp g_moveFrames, 30
jbe gPdrawMoveR
cmp g_altSprite, 0
jnz gPdrawAltR
%include assets/drawPr.asm
jmp gPdrawEnd
gPdrawMoveR:
cmp g_lastDepl, 1
je gPdrawURight
cmp g_lastDepl, 2
je gPdrawDRight
%include assets/drawPMoR.asm
jmp gPdrawEnd
gPdrawURight:
%include assets/drawPUpR.asm
jmp gPdrawEnd
gPdrawDRight:
%include assets/drawPDoR.asm
jmp gPdrawEnd
gPdrawFireR:
%include assets/drawPrF.asm
jmp gPdrawEnd
gPdrawAltR:
%include assets/drawPrA.asm
gPdrawEnd:
ret
g_DRAWPLAYER ENDP
; g_DRAWBULLET
;
; dessine le projectile
g_DRAWBULLET PROC NEAR
call CLEARPROJ
cmp projRight, 0
jnz gBanimR
call ANIMATEBULLETL
jmp gBanimEnd
gBanimR:
call ANIMATEBULLETR
gBanimEnd:
cmp g_projShow, 0
je gBdrawEnd
cmp projRight, 0
jnz gBdrawR
%include assets/drawSerL.asm
jmp gBdrawEnd
gBdrawR:
%include assets/drawSerR.asm
gBdrawEnd:
ret
g_DRAWBULLET ENDP
; PLAYERCOLLIDEMOB
;
; réalise les tests de collision entre le joueur et les mobs
g_PLAYERCOLLIDEMOB PROC FAR
push AX
push BX
cmp mobsShowing, 0
jz isOnMobTwo
mov AX, mobsX
cmp playerX, AX
jl playerIsOnMobTwo
add AX, _g_virSize
cmp playerX, AX
jg playerIsOnMobTwo
mov BX, _g_virSize
;sar BX, 1
mov AX, mobsY
sub AX, BX
cmp playerY, AX
jl playerIsOnMobTwo
add AX, _g_virSize
cmp playerY, AX
jg playerIsOnMobTwo
mov g_playerWin, 0
;collision mob 1
playerIsOnMobTwo:
cmp mobsShowing+2, 0
jz playerIsOnMobThr
mov AX, mobsX+2
cmp playerX, AX
jl playerIsOnMobThr
add AX, _g_virSize
cmp playerX, AX
jg playerIsOnMobThr
mov BX, _g_virSize
;sar BX, 1
mov AX, mobsY+2
sub AX, BX
cmp playerY, AX
jl playerIsOnMobThr
add AX, _g_virSize
cmp playerY, AX
jg playerIsOnMobThr
mov g_playerWin, 0
;collision mob 2
playerIsOnMobThr:
cmp mobsShowing+4, 0
jz playerIsOnMobFou
mov AX, mobsX+4
cmp playerX, AX
jl playerIsOnMobFou
add AX, _g_virSize
cmp playerX, AX
jg playerIsOnMobFou
mov BX, _g_virSize
;sar BX, 1
mov AX, mobsY+4
sub AX, BX
cmp playerY, AX
jl playerIsOnMobFou
add AX, _g_virSize
cmp playerY, AX
jg playerIsOnMobFou
mov g_playerWin, 0
;collision mob 3
playerIsOnMobFou:
cmp mobsShowing+6, 0
jz endPlayerCollide
mov AX, mobsX+6
cmp playerX, AX
jl endPlayerCollide
add AX, _g_virSize
cmp playerX, AX
jg endPlayerCollide
mov BX, _g_virSize
;sar BX, 1
mov AX, mobsY+6
sub AX, BX
cmp playerY, AX
jl endPlayerCollide
add AX, _g_virSize
cmp playerY, AX
jg endPlayerCollide
mov g_playerWin, 0
;collision mob 4
endPlayerCollide:
pop BX
pop AX
ret
g_PLAYERCOLLIDEMOB ENDP
; BULLETCOLLIDEMOBS
;
; réalise les tests de collision entre le projectile et les mobs
BULLETCOLLIDEMOBS PROC FAR
push AX
push BX
cmp mobsShowing, 0
jz isOnMobTwo
mov AX, mobsX
cmp projX, AX
jl isOnMobTwo
add AX, _g_virSize
cmp projX, AX
jg isOnMobTwo
mov BX, _g_virSize
sar BX, 1
mov AX, mobsY
sub AX, BX
cmp projY, AX
jl isOnMobTwo
add AX, _g_virSize
cmp projY, AX
jg isOnMobTwo
mov g_projShow, 0
mov mobsShowing, 0
CLEARVIRUS mobsX, mobsY
isOnMobTwo:
cmp mobsShowing+2, 0
jz isOnMobThr
mov AX, mobsX+2
cmp projX, AX
jl isOnMobThr
add AX, _g_virSize
cmp projX, AX
jg isOnMobThr
mov BX, _g_virSize
sar BX, 1
mov AX, mobsY+2
sub AX, BX
cmp projY, AX
jl isOnMobThr
add AX, _g_virSize
cmp projY, AX
jg isOnMobThr
mov g_projShow, 0
mov mobsShowing+2, 0
CLEARVIRUS mobsX+2, mobsY+2
isOnMobThr:
cmp mobsShowing+4, 0
jz isOnMobFou
mov AX, mobsX+4
cmp projX, AX
jl isOnMobFou
add AX, _g_virSize
cmp projX, AX
jg isOnMobFou
mov BX, _g_virSize
sar BX, 1
mov AX, mobsY+4
sub AX, BX
cmp projY, AX
jl isOnMobFou
add AX, _g_virSize
cmp projY, AX
jg isOnMobFou
mov g_projShow, 0
mov mobsShowing+4, 0
CLEARVIRUS mobsX+4, mobsY+4
isOnMobFou:
cmp mobsShowing+6, 0
jz endCollide
mov AX, mobsX+6
cmp projX, AX
jl endCollide
add AX, _g_virSize
cmp projX, AX
jg endCollide
mov BX, _g_virSize
sar BX, 1
mov AX, mobsY+6
sub AX, BX
cmp projY, AX
jl endCollide
add AX, _g_virSize
cmp projY, AX
jg endCollide
mov g_projShow, 0
mov mobsShowing+6, 0
CLEARVIRUS mobsX+6, mobsY+6
endCollide:
pop BX
pop AX
ret
BULLETCOLLIDEMOBS ENDP
; ANIMATEBULLETR
;
; réalise les animation du projectile quand il va vers la droite
ANIMATEBULLETR PROC NEAR
push AX
mov AX, projX
add AX, _g_projSpeed
mov projX, AX
mov AX, 140h
sub AX, _g_projSize
cmp projX, AX
jl endBAnimR
mov g_projShow, 0
call CLEARPROJ
endBAnimR:
call BULLETCOLLIDEMOBS
pop AX
ret
ANIMATEBULLETR ENDP
; ANIMATEBULLETL
;
; réalise les animation du projectile quand il va vers la gauche
ANIMATEBULLETL PROC NEAR
push AX
mov AX, projX
sub AX, _g_projSpeed
mov projX, AX
mov AX, 0h
;add AX, _g_projSize
cmp projX, AX
jg endBAnimL
mov g_projShow, 0
call CLEARPROJ
endBAnimL:
call BULLETCOLLIDEMOBS
pop AX
ret
ANIMATEBULLETL ENDP
; g_ANIMATEPLAYER
;
; mets à jour les variables d'animation du joueur
g_ANIMATEPLAYER PROC NEAR
inc g_spriteCounter
cmp g_fireFrames, 60
ja gAnimSkipFireFrames
inc g_fireFrames
gAnimSkipFireFrames:
cmp g_moveFrames, 60
ja gAnimSkipMoveFrames
inc g_moveFrames
gAnimSkipMoveFrames:
cmp g_spriteCounter, 40
jne gAnimRet
xor g_altSprite, 1
mov g_spriteCounter, 0
gAnimRet:
call CLEARPLAYER
call g_DRAWPLAYER
ret
g_ANIMATEPLAYER ENDP
; g_ANIMATEVIRUSES
;
; anime les virus
g_ANIMATEVIRUSES PROC NEAR
inc g_virusAnimFrames
cmp g_virusAnimFrames, 60
jne gAnimVirusFramesEnd
mov g_virusAnimFrames, 0
gAnimVirusFramesEnd:
ret
g_ANIMATEVIRUSES ENDP
; g_PFORWARD
;
; code exécuté quand la touche du haut est pressée
g_PFORWARD PROC NEAR
push AX
push BX
call CLEARPLAYER
mov g_lastDepl, 1
mov g_moveFrames, 0
mov AX, playerY
mov BX, 0h
;add BX, _g_playerSize
cmp AX, BX
jne moveFor
jmp finallyFor
moveFor:
sub AX, _g_playerSpeed
mov playerY, AX
finallyFor:
call g_DRAWPLAYER
pop BX
pop AX
ret
g_PFORWARD ENDP
; g_PLEFTWARD
;
; code exécuté quand la touche de gauche est pressée
g_PLEFTWARD PROC NEAR
push AX
push BX
mov playerRight, 0
call CLEARPLAYER
mov g_lastDepl, 0
mov g_moveFrames, 0
mov AX, playerX
mov BX, 0h
;add BX, _g_playerSize
cmp AX, BX
jne moveRig
jmp finallyRig
moveRig:
sub AX, _g_playerSpeed
mov playerX, AX
finallyRig:
call g_DRAWPLAYER
pop BX
pop AX
ret
g_PLEFTWARD ENDP
; g_PBACKWARD
;
; code exécuté quand la touche du bas est pressée
g_PBACKWARD PROC NEAR
push AX
push BX
call CLEARPLAYER
mov g_lastDepl, 2
mov g_moveFrames, 0
mov AX, playerY
mov BX, 0B8h
;sub BX, _g_playerSize
cmp AX, BX
jne moveBac
jmp finallyBac
moveBac:
add AX, _g_playerSpeed
mov playerY, AX
finallyBac:
call g_DRAWPLAYER
pop BX
pop AX
ret
g_PBACKWARD ENDP
; g_PRIGHTWARD
;
; code exécuté quand la touche de droite est pressée
g_PRIGHTWARD PROC NEAR
push AX
push BX
mov playerRight, 1
call CLEARPLAYER
mov g_lastDepl, 0
mov g_moveFrames, 0
mov AX, playerX
mov BX, 140h
sub BX, _g_playerSize
;sub BX, _g_playerSize
cmp AX, BX
jne moveLef
jmp finallyLef
moveLef:
add AX, _g_playerSpeed
mov playerX, AX
finallyLef:
call g_DRAWPLAYER
pop BX
pop AX
ret
g_PRIGHTWARD ENDP
; g_SHOOT
;
; code exécuté lorsque le joueur tire
g_SHOOT PROC NEAR
cmp g_fireFrames, 50
jl endShoot
oxsPLAYSOUND _A_, 1
call CLEARPROJ
push AX
push BX
mov g_fireFrames, 0
mov AL, playerRight
mov projRight, AL
mov AX, playerX
mov BX, _g_playerSize
sar BX, 1 ; div by 2
cmp playerRight, 0
jz shootLeft
add AX, BX
jmp shootNext
shootLeft:
sub AX, BX
shootNext:
mov projX, AX
mov AX, playerY
mov projY, AX
pop BX
pop AX
mov g_projShow, 1
endShoot:
ret
g_SHOOT ENDP
; g_MENU
;
; gestion du menu
g_MENU PROC NEAR
push AX
push BX
push CX
push DX
oxgFILLS 0, 0, 39, 24, _WHITE_
oxgFILLS 11, 5, 28, 15, _BLACK_
oxgSETCURSOR 13, 7
mov BX, 0001h
lea DX, titleLbl
mov CX, l_titleLbl
mov AH, 40h
int 21h
; on écrit le premier boutton (jouer)
oxgSETCURSOR 18, 10
mov BX, 0001h
lea DX, playBtn
mov CX, l_playBtn
mov AH, 40h
int 21h
; on écrit le deuxième boutton (quitter)
oxgSETCURSOR 18, 13
mov BX, 0001h
lea DX, quitBtn
mov CX, l_quitBtn
mov AH, 40h
int 21h
oxgSETCURSOR 0, 0
; on va écrire l'état du jeu (gagnant ou perdant)
mov BX, 0001h
cmp g_playerWin, 2
je skipWin
cmp g_playerWin, 1
jne menuLoose
oxgFILLS 2, 1, 37, 3, _BLACK_
oxgSETCURSOR 3, 2
lea DX, winLbl
mov CX, l_winLbl
jmp menuWrite
menuLoose:
oxgFILLS 4, 1, 36, 3, _BLACK_
oxgSETCURSOR 5, 2
lea DX, looseLbl
mov CX, l_looseLbl
menuWrite:
mov AH, 40h
int 21h
skipWin:
pop DX
pop CX
pop BX
pop AX
ret
g_MENU ENDP
; g_CHECKWIN
;
; vérifie si le joueur à gagné
g_CHECKWIN PROC NEAR
cmp mobsShowing, 0
jnz finallyCheckWin
cmp mobsShowing+2, 0
jnz finallyCheckWin
cmp mobsShowing+4, 0
jnz finallyCheckWin
cmp mobsShowing+6, 0
jnz finallyCheckWin
mov g_playerWin, 1
finallyCheckWin:
ret
g_CHECKWIN ENDP
; g_DRAWMOBS
;
; dessine les virus
g_DRAWMOBS PROC FAR
cmp g_virusAnimFrames, 30
ja drawAltVir
cmp mobsShowing, 0
jz drawSecVirus
CLEARVIRUS mobsX, mobsY
DRAWVIRUSo mobsX, mobsY
drawSecVirus:
cmp mobsShowing+2, 0
jz drawThiVirus
CLEARVIRUS mobsX+2, mobsY+2
DRAWVIRUSo mobsX+2, mobsY+2
drawThiVirus:
cmp mobsShowing+4, 0
jz drawFouVirus
CLEARVIRUS mobsX+4, mobsY+4
DRAWVIRUSo mobsX+4, mobsY+4
drawFouVirus:
cmp mobsShowing+6, 0
jz nextDraw
CLEARVIRUS mobsX+6, mobsY+6
DRAWVIRUSo mobsX+6, mobsY+6
jmp nextDraw
drawAltVir:
cmp mobsShowing, 0
jz drawAltSecVirus
CLEARVIRUS mobsX, mobsY
DRAWVIRao mobsX, mobsY
drawAltSecVirus:
cmp mobsShowing+2, 0
jz drawAltThiVirus
CLEARVIRUS mobsX+2, mobsY+2
DRAWVIRao mobsX+2, mobsY+2
drawAltThiVirus:
cmp mobsShowing+4, 0
jz drawAltFouVirus
CLEARVIRUS mobsX+4, mobsY+4
DRAWVIRao mobsX+4, mobsY+4
drawAltFouVirus:
cmp mobsShowing+6, 0
jz nextDraw
CLEARVIRUS mobsX+6, mobsY+6
DRAWVIRao mobsX+6, mobsY+6
nextDraw:
ret
g_DRAWMOBS ENDP
|
src/semantica-assemblador.ads | alvaromb/Compilemon | 1 | 29224 | <reponame>alvaromb/Compilemon<gh_stars>1-10
with Ada.Text_Io,
Ada.Strings,
Ada.Strings.Fixed,
Ada.Strings.Maps;
use Ada.Text_Io,
Ada.Strings,
Ada.Strings.Fixed,
Ada.Strings.Maps;
package Semantica.Assemblador is
Error_Assemblador : exception;
procedure Genera_Assemblador
(Nom_Fitxer : in String);
private
Nproc : Num_Proc := 0;
Fitxer_Asmbl : File_Type;
end Semantica.Assemblador;
|
examples/StateSized/GUI/ShipBitMap.agda | agda/ooAgda | 23 | 31 | module StateSized.GUI.ShipBitMap where
open import StateSizedIO.GUI.WxBindingsFFI
ship : Bitmap
ship = bitmap "./StateSized/GUI/ship.ico"
|
source/amf/dd/amf-internals-tables-dd_attributes.adb | svn2github/matreshka | 24 | 11706 | <filename>source/amf/dd/amf-internals-tables-dd_attributes.adb
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Internals.Links;
with AMF.Internals.Tables.DC_Notification;
with AMF.Internals.Tables.DD_Element_Table;
with AMF.Internals.Tables.DD_Types;
with AMF.Internals.Tables.DG_Metamodel;
package body AMF.Internals.Tables.DD_Attributes is
use type Matreshka.Internals.Strings.Shared_String_Access;
-- Canvas
--
-- 5 Canvas::backgroundColor
-- 4 Canvas::backgroundFill
-- 3 GraphicalElement::clipPath
-- 2 GraphicalElement::group
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 3 Group::member
-- 4 Canvas::packagedFill
-- 5 Canvas::packagedMarker
-- 6 Canvas::packagedStyle
-- 2 GraphicalElement::sharedStyle
-- Circle
--
-- 5 Circle::center
-- 3 GraphicalElement::clipPath
-- 2 GraphicalElement::group
-- 4 Circle::radius
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- ClipPath
--
-- 3 GraphicalElement::clipPath
-- 4 ClipPath::clippedElement
-- 2 GraphicalElement::group
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 3 Group::member
-- 2 GraphicalElement::sharedStyle
-- Ellipse
--
-- 5 Ellipse::center
-- 3 GraphicalElement::clipPath
-- 2 GraphicalElement::group
-- 4 Ellipse::radii
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- Group
--
-- 3 GraphicalElement::clipPath
-- 2 GraphicalElement::group
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 3 Group::member
-- 2 GraphicalElement::sharedStyle
-- Image
--
-- 4 Image::bounds
-- 3 GraphicalElement::clipPath
-- 2 GraphicalElement::group
-- 6 Image::isAspectRatioPreserved
-- 5 Image::source
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- Line
--
-- 3 GraphicalElement::clipPath
-- 8 Line::end
-- 5 MarkedElement::endMarker
-- 2 GraphicalElement::group
-- 6 MarkedElement::midMarker
-- 7 Line::start
-- 4 MarkedElement::startMarker
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- LinearGradient
--
-- 2 Fill::canvas
-- 3 Gradient::stop
-- 1 Fill::transform
-- 4 LinearGradient::x1
-- 5 LinearGradient::x2
-- 6 LinearGradient::y1
-- 7 LinearGradient::y2
--
-- MarkedElement
--
-- 3 GraphicalElement::clipPath
-- 5 MarkedElement::endMarker
-- 2 GraphicalElement::group
-- 6 MarkedElement::midMarker
-- 4 MarkedElement::startMarker
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- Marker
--
-- 4 Marker::canvas
-- 3 GraphicalElement::clipPath
-- 2 GraphicalElement::group
-- 6 Marker::reference
-- 5 Marker::size
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 3 Group::member
-- 2 GraphicalElement::sharedStyle
-- Path
--
-- 3 GraphicalElement::clipPath
-- 7 Path::command
-- 5 MarkedElement::endMarker
-- 2 GraphicalElement::group
-- 6 MarkedElement::midMarker
-- 4 MarkedElement::startMarker
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- Pattern
--
-- 4 Pattern::bounds
-- 2 Fill::canvas
-- 3 Pattern::tile
-- 1 Fill::transform
--
-- Polygon
--
-- 3 GraphicalElement::clipPath
-- 5 MarkedElement::endMarker
-- 2 GraphicalElement::group
-- 6 MarkedElement::midMarker
-- 7 Polygon::point
-- 4 MarkedElement::startMarker
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- Polyline
--
-- 3 GraphicalElement::clipPath
-- 5 MarkedElement::endMarker
-- 2 GraphicalElement::group
-- 6 MarkedElement::midMarker
-- 7 Polyline::point
-- 4 MarkedElement::startMarker
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- RadialGradient
--
-- 2 Fill::canvas
-- 5 RadialGradient::centerX
-- 6 RadialGradient::centerY
-- 7 RadialGradient::focusX
-- 8 RadialGradient::focusY
-- 4 RadialGradient::radius
-- 3 Gradient::stop
-- 1 Fill::transform
--
-- Rectangle
--
-- 4 Rectangle::bounds
-- 3 GraphicalElement::clipPath
-- 5 Rectangle::cornerRadius
-- 2 GraphicalElement::group
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
-- Style
--
-- 1 Style::fill
-- 2 Style::fillColor
-- 3 Style::fillOpacity
-- 12 Style::fontBold
-- 10 Style::fontColor
-- 11 Style::fontItalic
-- 9 Style::fontName
-- 8 Style::fontSize
-- 14 Style::fontStrikeThrough
-- 13 Style::fontUnderline
-- 6 Style::strokeColor
-- 7 Style::strokeDashLength
-- 5 Style::strokeOpacity
-- 4 Style::strokeWidth
--
-- Text
--
-- 6 Text::alignment
-- 4 Text::bounds
-- 3 GraphicalElement::clipPath
-- 5 Text::data
-- 2 GraphicalElement::group
-- 1 GraphicalElement::transform
--
-- 1 GraphicalElement::localStyle
-- 2 GraphicalElement::sharedStyle
----------------------------
-- Internal_Get_Alignment --
----------------------------
function Internal_Get_Alignment
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Alignment_Kind is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Alignment_Kind_Value;
end Internal_Get_Alignment;
-----------------------------------
-- Internal_Get_Background_Color --
-----------------------------------
function Internal_Get_Background_Color
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Optional_DC_Color is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Color_Holder;
end Internal_Get_Background_Color;
----------------------------------
-- Internal_Get_Background_Fill --
----------------------------------
function Internal_Get_Background_Fill
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Background_Fill;
-------------------------
-- Internal_Get_Bounds --
-------------------------
function Internal_Get_Bounds
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Bounds is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Bounds_Value;
end Internal_Get_Bounds;
-------------------------
-- Internal_Get_Canvas --
-------------------------
function Internal_Get_Canvas
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Linear_Gradient =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Pattern =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Radial_Gradient =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Canvas;
-------------------------
-- Internal_Get_Center --
-------------------------
function Internal_Get_Center
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Point is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Point_Value;
end Internal_Get_Center;
---------------------------
-- Internal_Get_Center_X --
---------------------------
function Internal_Get_Center_X
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value;
end Internal_Get_Center_X;
---------------------------
-- Internal_Get_Center_Y --
---------------------------
function Internal_Get_Center_Y
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Real_Value;
end Internal_Get_Center_Y;
----------------------------
-- Internal_Get_Clip_Path --
----------------------------
function Internal_Get_Clip_Path
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Circle =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Ellipse =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Image =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Rectangle =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Text =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Clip_Path;
----------------------------------
-- Internal_Get_Clipped_Element --
----------------------------------
function Internal_Get_Clipped_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Clipped_Element;
--------------------------
-- Internal_Get_Command --
--------------------------
function Internal_Get_Command
(Self : AMF.Internals.AMF_Element)
return AMF.DG.Sequence_Of_Path_Command is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Path_Collection;
end Internal_Get_Command;
--------------------------------
-- Internal_Get_Corner_Radius --
--------------------------------
function Internal_Get_Corner_Radius
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value;
end Internal_Get_Corner_Radius;
-----------------------
-- Internal_Get_Data --
-----------------------
function Internal_Get_Data
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access is
begin
return
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).String_Value;
end Internal_Get_Data;
----------------------
-- Internal_Get_End --
----------------------
function Internal_Get_End
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Point is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Point_Value;
end Internal_Get_End;
-----------------------------
-- Internal_Get_End_Marker --
-----------------------------
function Internal_Get_End_Marker
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_End_Marker;
-----------------------
-- Internal_Get_Fill --
-----------------------
function Internal_Get_Fill
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Style =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (1).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Fill;
-----------------------------
-- Internal_Get_Fill_Color --
-----------------------------
function Internal_Get_Fill_Color
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Optional_DC_Color is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Color_Holder;
end Internal_Get_Fill_Color;
-------------------------------
-- Internal_Get_Fill_Opacity --
-------------------------------
function Internal_Get_Fill_Opacity
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Real_Holder;
end Internal_Get_Fill_Opacity;
--------------------------
-- Internal_Get_Focus_X --
--------------------------
function Internal_Get_Focus_X
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Value;
end Internal_Get_Focus_X;
--------------------------
-- Internal_Get_Focus_Y --
--------------------------
function Internal_Get_Focus_Y
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Real_Value;
end Internal_Get_Focus_Y;
----------------------------
-- Internal_Get_Font_Bold --
----------------------------
function Internal_Get_Font_Bold
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Boolean is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (12).Boolean_Holder;
end Internal_Get_Font_Bold;
-----------------------------
-- Internal_Get_Font_Color --
-----------------------------
function Internal_Get_Font_Color
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Optional_DC_Color is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (10).Color_Holder;
end Internal_Get_Font_Color;
------------------------------
-- Internal_Get_Font_Italic --
------------------------------
function Internal_Get_Font_Italic
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Boolean is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (11).Boolean_Holder;
end Internal_Get_Font_Italic;
----------------------------
-- Internal_Get_Font_Name --
----------------------------
function Internal_Get_Font_Name
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access is
begin
return
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (9).String_Value;
end Internal_Get_Font_Name;
----------------------------
-- Internal_Get_Font_Size --
----------------------------
function Internal_Get_Font_Size
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Real_Holder;
end Internal_Get_Font_Size;
--------------------------------------
-- Internal_Get_Font_Strike_Through --
--------------------------------------
function Internal_Get_Font_Strike_Through
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Boolean is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (14).Boolean_Holder;
end Internal_Get_Font_Strike_Through;
---------------------------------
-- Internal_Get_Font_Underline --
---------------------------------
function Internal_Get_Font_Underline
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Boolean is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (13).Boolean_Holder;
end Internal_Get_Font_Underline;
------------------------
-- Internal_Get_Group --
------------------------
function Internal_Get_Group
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Circle =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Ellipse =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Image =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Rectangle =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Text =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Group;
--------------------------------------------
-- Internal_Get_Is_Aspect_Ratio_Preserved --
--------------------------------------------
function Internal_Get_Is_Aspect_Ratio_Preserved
(Self : AMF.Internals.AMF_Element)
return Boolean is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Boolean_Value;
end Internal_Get_Is_Aspect_Ratio_Preserved;
------------------------------
-- Internal_Get_Local_Style --
------------------------------
function Internal_Get_Local_Style
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Circle =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Ellipse =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Image =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Rectangle =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when AMF.Internals.Tables.DD_Types.E_DG_Text =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 1;
when others =>
raise Program_Error;
end case;
end Internal_Get_Local_Style;
-------------------------
-- Internal_Get_Member --
-------------------------
function Internal_Get_Member
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 3;
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 3;
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 3;
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 3;
when others =>
raise Program_Error;
end case;
end Internal_Get_Member;
-----------------------------
-- Internal_Get_Mid_Marker --
-----------------------------
function Internal_Get_Mid_Marker
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Mid_Marker;
--------------------------------
-- Internal_Get_Packaged_Fill --
--------------------------------
function Internal_Get_Packaged_Fill
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 4;
when others =>
raise Program_Error;
end case;
end Internal_Get_Packaged_Fill;
----------------------------------
-- Internal_Get_Packaged_Marker --
----------------------------------
function Internal_Get_Packaged_Marker
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 5;
when others =>
raise Program_Error;
end case;
end Internal_Get_Packaged_Marker;
---------------------------------
-- Internal_Get_Packaged_Style --
---------------------------------
function Internal_Get_Packaged_Style
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 6;
when others =>
raise Program_Error;
end case;
end Internal_Get_Packaged_Style;
------------------------
-- Internal_Get_Point --
------------------------
function Internal_Get_Point
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Sequence_Of_DC_Point is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Point_Collection;
end Internal_Get_Point;
------------------------
-- Internal_Get_Radii --
------------------------
function Internal_Get_Radii
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Dimension is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Dimension_Value;
end Internal_Get_Radii;
-------------------------
-- Internal_Get_Radius --
-------------------------
function Internal_Get_Radius
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Value;
end Internal_Get_Radius;
----------------------------
-- Internal_Get_Reference --
----------------------------
function Internal_Get_Reference
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Point is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Point_Value;
end Internal_Get_Reference;
-------------------------------
-- Internal_Get_Shared_Style --
-------------------------------
function Internal_Get_Shared_Style
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Circle =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Ellipse =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Image =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Rectangle =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when AMF.Internals.Tables.DD_Types.E_DG_Text =>
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (0).Collection + 2;
when others =>
raise Program_Error;
end case;
end Internal_Get_Shared_Style;
-----------------------
-- Internal_Get_Size --
-----------------------
function Internal_Get_Size
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Dimension is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Dimension_Value;
end Internal_Get_Size;
-------------------------
-- Internal_Get_Source --
-------------------------
function Internal_Get_Source
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access is
begin
return
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).String_Value;
end Internal_Get_Source;
------------------------
-- Internal_Get_Start --
------------------------
function Internal_Get_Start
(Self : AMF.Internals.AMF_Element)
return AMF.DC.DC_Point is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Point_Value;
end Internal_Get_Start;
-------------------------------
-- Internal_Get_Start_Marker --
-------------------------------
function Internal_Get_Start_Marker
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Start_Marker;
-----------------------
-- Internal_Get_Stop --
-----------------------
function Internal_Get_Stop
(Self : AMF.Internals.AMF_Element)
return AMF.DG.Set_Of_DG_Gradient_Stop is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Gradient_Collection;
end Internal_Get_Stop;
-------------------------------
-- Internal_Get_Stroke_Color --
-------------------------------
function Internal_Get_Stroke_Color
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Optional_DC_Color is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Color_Holder;
end Internal_Get_Stroke_Color;
-------------------------------------
-- Internal_Get_Stroke_Dash_Length --
-------------------------------------
function Internal_Get_Stroke_Dash_Length
(Self : AMF.Internals.AMF_Element)
return AMF.Real_Collections.Sequence_Of_Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Collection;
end Internal_Get_Stroke_Dash_Length;
---------------------------------
-- Internal_Get_Stroke_Opacity --
---------------------------------
function Internal_Get_Stroke_Opacity
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Holder;
end Internal_Get_Stroke_Opacity;
-------------------------------
-- Internal_Get_Stroke_Width --
-------------------------------
function Internal_Get_Stroke_Width
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Holder;
end Internal_Get_Stroke_Width;
-----------------------
-- Internal_Get_Tile --
-----------------------
function Internal_Get_Tile
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Pattern =>
return
AMF.Internals.Links.Opposite_Element
(AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Link, Self);
when others =>
raise Program_Error;
end case;
end Internal_Get_Tile;
----------------------------
-- Internal_Get_Transform --
----------------------------
function Internal_Get_Transform
(Self : AMF.Internals.AMF_Element)
return AMF.DG.Sequence_Of_DG_Transform is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (1).Transform_Collection;
end Internal_Get_Transform;
---------------------
-- Internal_Get_X1 --
---------------------
function Internal_Get_X1
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Value;
end Internal_Get_X1;
---------------------
-- Internal_Get_X2 --
---------------------
function Internal_Get_X2
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value;
end Internal_Get_X2;
---------------------
-- Internal_Get_Y1 --
---------------------
function Internal_Get_Y1
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Real_Value;
end Internal_Get_Y1;
---------------------
-- Internal_Get_Y2 --
---------------------
function Internal_Get_Y2
(Self : AMF.Internals.AMF_Element)
return AMF.Real is
begin
return AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Value;
end Internal_Get_Y2;
----------------------------
-- Internal_Set_Alignment --
----------------------------
procedure Internal_Set_Alignment
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Alignment_Kind)
is
Old : AMF.DC.DC_Alignment_Kind;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Alignment_Kind_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Alignment_Kind_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Text_Alignment, Old, To);
end Internal_Set_Alignment;
-----------------------------------
-- Internal_Set_Background_Color --
-----------------------------------
procedure Internal_Set_Background_Color
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.Optional_DC_Color)
is
Old : AMF.DC.Optional_DC_Color;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Color_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Color_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Canvas_Background_Color, Old, To);
end Internal_Set_Background_Color;
----------------------------------
-- Internal_Set_Background_Fill --
----------------------------------
procedure Internal_Set_Background_Fill
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Canvas_Background_Fill_Canvas,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_Background_Fill;
-------------------------
-- Internal_Set_Bounds --
-------------------------
procedure Internal_Set_Bounds
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Bounds)
is
Old : AMF.DC.DC_Bounds;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Bounds_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Bounds_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Image_Bounds, Old, To);
end Internal_Set_Bounds;
-------------------------
-- Internal_Set_Canvas --
-------------------------
procedure Internal_Set_Canvas
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Linear_Gradient =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Canvas_Packaged_Fill_Canvas,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Canvas_Packaged_Marker_Canvas,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Pattern =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Canvas_Packaged_Fill_Canvas,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Radial_Gradient =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Canvas_Packaged_Fill_Canvas,
To,
Self);
when others =>
raise Program_Error;
end case;
end Internal_Set_Canvas;
-------------------------
-- Internal_Set_Center --
-------------------------
procedure Internal_Set_Center
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Point)
is
Old : AMF.DC.DC_Point;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Point_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Point_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Circle_Center, Old, To);
end Internal_Set_Center;
---------------------------
-- Internal_Set_Center_X --
---------------------------
procedure Internal_Set_Center_X
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Radial_Gradient_Center_X, Old, To);
end Internal_Set_Center_X;
---------------------------
-- Internal_Set_Center_Y --
---------------------------
procedure Internal_Set_Center_Y
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Radial_Gradient_Center_Y, Old, To);
end Internal_Set_Center_Y;
----------------------------
-- Internal_Set_Clip_Path --
----------------------------
procedure Internal_Set_Clip_Path
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Circle =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Ellipse =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Image =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Rectangle =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Text =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_Clip_Path;
----------------------------------
-- Internal_Set_Clipped_Element --
----------------------------------
procedure Internal_Set_Clipped_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Graphical_Element_Clip_Path_Clipped_Element,
To,
Self);
when others =>
raise Program_Error;
end case;
end Internal_Set_Clipped_Element;
--------------------------------
-- Internal_Set_Corner_Radius --
--------------------------------
procedure Internal_Set_Corner_Radius
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Rectangle_Corner_Radius, Old, To);
end Internal_Set_Corner_Radius;
-----------------------
-- Internal_Set_Data --
-----------------------
procedure Internal_Set_Data
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access)
is
Old : Matreshka.Internals.Strings.Shared_String_Access;
begin
Old :=
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).String_Value;
DD_Element_Table.Table (Self).Member (5).String_Value := To;
Matreshka.Internals.Strings.Reference
(DD_Element_Table.Table (Self).Member (5).String_Value);
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Text_Data, Old, To);
Matreshka.Internals.Strings.Dereference (Old);
end Internal_Set_Data;
----------------------
-- Internal_Set_End --
----------------------
procedure Internal_Set_End
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Point)
is
Old : AMF.DC.DC_Point;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Point_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Point_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Line_End, Old, To);
end Internal_Set_End;
-----------------------------
-- Internal_Set_End_Marker --
-----------------------------
procedure Internal_Set_End_Marker
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_End_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_End_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_End_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_End_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_End_Marker_Marked_Element,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_End_Marker;
-----------------------
-- Internal_Set_Fill --
-----------------------
procedure Internal_Set_Fill
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Style =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Style_Fill_Style,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_Fill;
-----------------------------
-- Internal_Set_Fill_Color --
-----------------------------
procedure Internal_Set_Fill_Color
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.Optional_DC_Color)
is
Old : AMF.DC.Optional_DC_Color;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Color_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (2).Color_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Fill_Color, Old, To);
end Internal_Set_Fill_Color;
-------------------------------
-- Internal_Set_Fill_Opacity --
-------------------------------
procedure Internal_Set_Fill_Opacity
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Real)
is
Old : AMF.Optional_Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Real_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (3).Real_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Fill_Opacity, Old, To);
end Internal_Set_Fill_Opacity;
--------------------------
-- Internal_Set_Focus_X --
--------------------------
procedure Internal_Set_Focus_X
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Radial_Gradient_Focus_X, Old, To);
end Internal_Set_Focus_X;
--------------------------
-- Internal_Set_Focus_Y --
--------------------------
procedure Internal_Set_Focus_Y
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Radial_Gradient_Focus_Y, Old, To);
end Internal_Set_Focus_Y;
----------------------------
-- Internal_Set_Font_Bold --
----------------------------
procedure Internal_Set_Font_Bold
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Boolean)
is
Old : AMF.Optional_Boolean;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (12).Boolean_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (12).Boolean_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Bold, Old, To);
end Internal_Set_Font_Bold;
-----------------------------
-- Internal_Set_Font_Color --
-----------------------------
procedure Internal_Set_Font_Color
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.Optional_DC_Color)
is
Old : AMF.DC.Optional_DC_Color;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (10).Color_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (10).Color_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Color, Old, To);
end Internal_Set_Font_Color;
------------------------------
-- Internal_Set_Font_Italic --
------------------------------
procedure Internal_Set_Font_Italic
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Boolean)
is
Old : AMF.Optional_Boolean;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (11).Boolean_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (11).Boolean_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Italic, Old, To);
end Internal_Set_Font_Italic;
----------------------------
-- Internal_Set_Font_Name --
----------------------------
procedure Internal_Set_Font_Name
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access)
is
Old : Matreshka.Internals.Strings.Shared_String_Access;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (9).String_Value;
DD_Element_Table.Table (Self).Member (9).String_Value := To;
if DD_Element_Table.Table (Self).Member (9).String_Value /= null then
Matreshka.Internals.Strings.Reference
(DD_Element_Table.Table (Self).Member (9).String_Value);
end if;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Name, Old, To);
if Old /= null then
Matreshka.Internals.Strings.Reference (Old);
end if;
end Internal_Set_Font_Name;
----------------------------
-- Internal_Set_Font_Size --
----------------------------
procedure Internal_Set_Font_Size
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Real)
is
Old : AMF.Optional_Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Real_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (8).Real_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Size, Old, To);
end Internal_Set_Font_Size;
--------------------------------------
-- Internal_Set_Font_Strike_Through --
--------------------------------------
procedure Internal_Set_Font_Strike_Through
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Boolean)
is
Old : AMF.Optional_Boolean;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (14).Boolean_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (14).Boolean_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Strike_Through, Old, To);
end Internal_Set_Font_Strike_Through;
---------------------------------
-- Internal_Set_Font_Underline --
---------------------------------
procedure Internal_Set_Font_Underline
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Boolean)
is
Old : AMF.Optional_Boolean;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (13).Boolean_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (13).Boolean_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Font_Underline, Old, To);
end Internal_Set_Font_Underline;
------------------------
-- Internal_Set_Group --
------------------------
procedure Internal_Set_Group
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Canvas =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Circle =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Clip_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Ellipse =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Group =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Image =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Marker =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Rectangle =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when AMF.Internals.Tables.DD_Types.E_DG_Text =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Group_Member_Group,
To,
Self);
when others =>
raise Program_Error;
end case;
end Internal_Set_Group;
--------------------------------------------
-- Internal_Set_Is_Aspect_Ratio_Preserved --
--------------------------------------------
procedure Internal_Set_Is_Aspect_Ratio_Preserved
(Self : AMF.Internals.AMF_Element;
To : Boolean)
is
Old : Boolean;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Boolean_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Boolean_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Image_Is_Aspect_Ratio_Preserved, Old, To);
end Internal_Set_Is_Aspect_Ratio_Preserved;
-----------------------------
-- Internal_Set_Mid_Marker --
-----------------------------
procedure Internal_Set_Mid_Marker
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Mid_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Mid_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Mid_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Mid_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Mid_Marker_Marked_Element,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_Mid_Marker;
------------------------
-- Internal_Set_Radii --
------------------------
procedure Internal_Set_Radii
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Dimension)
is
Old : AMF.DC.DC_Dimension;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Dimension_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Dimension_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Ellipse_Radii, Old, To);
end Internal_Set_Radii;
-------------------------
-- Internal_Set_Radius --
-------------------------
procedure Internal_Set_Radius
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Circle_Radius, Old, To);
end Internal_Set_Radius;
----------------------------
-- Internal_Set_Reference --
----------------------------
procedure Internal_Set_Reference
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Point)
is
Old : AMF.DC.DC_Point;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Point_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Point_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Marker_Reference, Old, To);
end Internal_Set_Reference;
-----------------------
-- Internal_Set_Size --
-----------------------
procedure Internal_Set_Size
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Dimension)
is
Old : AMF.DC.DC_Dimension;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Dimension_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Dimension_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Marker_Size, Old, To);
end Internal_Set_Size;
-------------------------
-- Internal_Set_Source --
-------------------------
procedure Internal_Set_Source
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access)
is
Old : Matreshka.Internals.Strings.Shared_String_Access;
begin
Old :=
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).String_Value;
DD_Element_Table.Table (Self).Member (5).String_Value := To;
Matreshka.Internals.Strings.Reference
(DD_Element_Table.Table (Self).Member (5).String_Value);
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Image_Source, Old, To);
Matreshka.Internals.Strings.Dereference (Old);
end Internal_Set_Source;
------------------------
-- Internal_Set_Start --
------------------------
procedure Internal_Set_Start
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.DC_Point)
is
Old : AMF.DC.DC_Point;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Point_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Point_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Line_Start, Old, To);
end Internal_Set_Start;
-------------------------------
-- Internal_Set_Start_Marker --
-------------------------------
procedure Internal_Set_Start_Marker
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Line =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Start_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Marked_Element =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Start_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Path =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Start_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polygon =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Start_Marker_Marked_Element,
Self,
To);
when AMF.Internals.Tables.DD_Types.E_DG_Polyline =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Marked_Element_Start_Marker_Marked_Element,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_Start_Marker;
-------------------------------
-- Internal_Set_Stroke_Color --
-------------------------------
procedure Internal_Set_Stroke_Color
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.Optional_DC_Color)
is
Old : AMF.DC.Optional_DC_Color;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Color_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Color_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Stroke_Color, Old, To);
end Internal_Set_Stroke_Color;
---------------------------------
-- Internal_Set_Stroke_Opacity --
---------------------------------
procedure Internal_Set_Stroke_Opacity
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Real)
is
Old : AMF.Optional_Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Stroke_Opacity, Old, To);
end Internal_Set_Stroke_Opacity;
-------------------------------
-- Internal_Set_Stroke_Width --
-------------------------------
procedure Internal_Set_Stroke_Width
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Real)
is
Old : AMF.Optional_Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Holder;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Holder := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Style_Stroke_Width, Old, To);
end Internal_Set_Stroke_Width;
-----------------------
-- Internal_Set_Tile --
-----------------------
procedure Internal_Set_Tile
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element) is
begin
case AMF.Internals.Tables.DD_Element_Table.Table (Self).Kind is
when AMF.Internals.Tables.DD_Types.E_DG_Pattern =>
AMF.Internals.Links.Create_Link
(AMF.Internals.Tables.DG_Metamodel.MA_DG_Pattern_Tile_Pattern,
Self,
To);
when others =>
raise Program_Error;
end case;
end Internal_Set_Tile;
---------------------
-- Internal_Set_X1 --
---------------------
procedure Internal_Set_X1
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (4).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Linear_Gradient_X1, Old, To);
end Internal_Set_X1;
---------------------
-- Internal_Set_X2 --
---------------------
procedure Internal_Set_X2
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (5).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Linear_Gradient_X2, Old, To);
end Internal_Set_X2;
---------------------
-- Internal_Set_Y1 --
---------------------
procedure Internal_Set_Y1
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (6).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Linear_Gradient_Y1, Old, To);
end Internal_Set_Y1;
---------------------
-- Internal_Set_Y2 --
---------------------
procedure Internal_Set_Y2
(Self : AMF.Internals.AMF_Element;
To : AMF.Real)
is
Old : AMF.Real;
begin
Old := AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Value;
AMF.Internals.Tables.DD_Element_Table.Table (Self).Member (7).Real_Value := To;
AMF.Internals.Tables.DC_Notification.Notify_Attribute_Set
(Self, AMF.Internals.Tables.DG_Metamodel.MP_DG_Linear_Gradient_Y2, Old, To);
end Internal_Set_Y2;
end AMF.Internals.Tables.DD_Attributes;
|
target/cos_117/disasm/iop_overlay1/BXDIS.asm | jrrk2/cray-sim | 49 | 100055 | <reponame>jrrk2/cray-sim
0x0000 (0x000000) 0x2102- f:00020 d: 258 | A = OR[258]
0x0001 (0x000002) 0x1413- f:00012 d: 19 | A = A + 19 (0x0013)
0x0002 (0x000004) 0x2908- f:00024 d: 264 | OR[264] = A
0x0003 (0x000006) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0004 (0x000008) 0x291A- f:00024 d: 282 | OR[282] = A
0x0005 (0x00000A) 0x2102- f:00020 d: 258 | A = OR[258]
0x0006 (0x00000C) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0007 (0x00000E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0008 (0x000010) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0009 (0x000012) 0x291C- f:00024 d: 284 | OR[284] = A
0x000A (0x000014) 0x211C- f:00020 d: 284 | A = OR[284]
0x000B (0x000016) 0x1E00-0x7530 f:00017 d: 0 | A = A - 30000 (0x7530)
0x000D (0x00001A) 0x291C- f:00024 d: 284 | OR[284] = A
0x000E (0x00001C) 0x2102- f:00020 d: 258 | A = OR[258]
0x000F (0x00001E) 0x1412- f:00012 d: 18 | A = A + 18 (0x0012)
0x0010 (0x000020) 0x2908- f:00024 d: 264 | OR[264] = A
0x0011 (0x000022) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0012 (0x000024) 0x291D- f:00024 d: 285 | OR[285] = A
0x0013 (0x000026) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0014 (0x000028) 0x292E- f:00024 d: 302 | OR[302] = A
0x0015 (0x00002A) 0x1104- f:00010 d: 260 | A = 260 (0x0104)
0x0016 (0x00002C) 0x292F- f:00024 d: 303 | OR[303] = A
0x0017 (0x00002E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0018 (0x000030) 0x2930- f:00024 d: 304 | OR[304] = A
0x0019 (0x000032) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x001A (0x000034) 0x2931- f:00024 d: 305 | OR[305] = A
0x001B (0x000036) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x001C (0x000038) 0x2932- f:00024 d: 306 | OR[306] = A
0x001D (0x00003A) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x001E (0x00003C) 0x2933- f:00024 d: 307 | OR[307] = A
0x001F (0x00003E) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0020 (0x000040) 0x5800- f:00054 d: 0 | B = A
0x0021 (0x000042) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0022 (0x000044) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0023 (0x000046) 0x8602- f:00103 d: 2 | P = P + 2 (0x0025), A # 0
0x0024 (0x000048) 0x7009- f:00070 d: 9 | P = P + 9 (0x002D)
0x0025 (0x00004A) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x0026 (0x00004C) 0x292E- f:00024 d: 302 | OR[302] = A
0x0027 (0x00004E) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0028 (0x000050) 0x5800- f:00054 d: 0 | B = A
0x0029 (0x000052) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x002B (0x000056) 0x7C09- f:00076 d: 9 | R = OR[9]
0x002C (0x000058) 0x7219- f:00071 d: 25 | P = P - 25 (0x0013)
0x002D (0x00005A) 0x2121- f:00020 d: 289 | A = OR[289]
0x002E (0x00005C) 0x1420- f:00012 d: 32 | A = A + 32 (0x0020)
0x002F (0x00005E) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0030 (0x000060) 0x291B- f:00024 d: 283 | OR[283] = A
0x0031 (0x000062) 0x211B- f:00020 d: 283 | A = OR[283]
0x0032 (0x000064) 0x14C0- f:00012 d: 192 | A = A + 192 (0x00C0)
0x0033 (0x000066) 0x292A- f:00024 d: 298 | OR[298] = A
0x0034 (0x000068) 0x2121- f:00020 d: 289 | A = OR[289]
0x0035 (0x00006A) 0x290E- f:00024 d: 270 | OR[270] = A
0x0036 (0x00006C) 0x1104- f:00010 d: 260 | A = 260 (0x0104)
0x0037 (0x00006E) 0x290D- f:00024 d: 269 | OR[269] = A
0x0038 (0x000070) 0x210D- f:00020 d: 269 | A = OR[269]
0x0039 (0x000072) 0x8406- f:00102 d: 6 | P = P + 6 (0x003F), A = 0
0x003A (0x000074) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x003B (0x000076) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x003C (0x000078) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x003D (0x00007A) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x003E (0x00007C) 0x7206- f:00071 d: 6 | P = P - 6 (0x0038)
0x003F (0x00007E) 0x101D- f:00010 d: 29 | A = 29 (0x001D)
0x0040 (0x000080) 0x292E- f:00024 d: 302 | OR[302] = A
0x0041 (0x000082) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0042 (0x000084) 0x292F- f:00024 d: 303 | OR[303] = A
0x0043 (0x000086) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0044 (0x000088) 0x5800- f:00054 d: 0 | B = A
0x0045 (0x00008A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0046 (0x00008C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0047 (0x00008E) 0x2006- f:00020 d: 6 | A = OR[6]
0x0048 (0x000090) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0049 (0x000092) 0x2908- f:00024 d: 264 | OR[264] = A
0x004A (0x000094) 0x3108- f:00030 d: 264 | A = (OR[264])
0x004B (0x000096) 0x292C- f:00024 d: 300 | OR[300] = A
0x004C (0x000098) 0x2006- f:00020 d: 6 | A = OR[6]
0x004D (0x00009A) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x004E (0x00009C) 0x2908- f:00024 d: 264 | OR[264] = A
0x004F (0x00009E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0050 (0x0000A0) 0x292D- f:00024 d: 301 | OR[301] = A
0x0051 (0x0000A2) 0x2006- f:00020 d: 6 | A = OR[6]
0x0052 (0x0000A4) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0053 (0x0000A6) 0x2908- f:00024 d: 264 | OR[264] = A
0x0054 (0x0000A8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0055 (0x0000AA) 0x212C- f:00020 d: 300 | A = OR[300]
0x0056 (0x0000AC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0058), A = 0
0x0057 (0x0000AE) 0x700C- f:00070 d: 12 | P = P + 12 (0x0063)
0x0058 (0x0000B0) 0x212D- f:00020 d: 301 | A = OR[301]
0x0059 (0x0000B2) 0x8402- f:00102 d: 2 | P = P + 2 (0x005B), A = 0
0x005A (0x0000B4) 0x7009- f:00070 d: 9 | P = P + 9 (0x0063)
0x005B (0x0000B6) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x005C (0x0000B8) 0x292E- f:00024 d: 302 | OR[302] = A
0x005D (0x0000BA) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x005E (0x0000BC) 0x5800- f:00054 d: 0 | B = A
0x005F (0x0000BE) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x0061 (0x0000C2) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0062 (0x0000C4) 0x7223- f:00071 d: 35 | P = P - 35 (0x003F)
0x0063 (0x0000C6) 0x212A- f:00020 d: 298 | A = OR[298]
0x0064 (0x0000C8) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0065 (0x0000CA) 0x2908- f:00024 d: 264 | OR[264] = A
0x0066 (0x0000CC) 0x212C- f:00020 d: 300 | A = OR[300]
0x0067 (0x0000CE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0068 (0x0000D0) 0x212A- f:00020 d: 298 | A = OR[298]
0x0069 (0x0000D2) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x006A (0x0000D4) 0x2908- f:00024 d: 264 | OR[264] = A
0x006B (0x0000D6) 0x212D- f:00020 d: 301 | A = OR[301]
0x006C (0x0000D8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x006D (0x0000DA) 0x100D- f:00010 d: 13 | A = 13 (0x000D)
0x006E (0x0000DC) 0x292E- f:00024 d: 302 | OR[302] = A
0x006F (0x0000DE) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0070 (0x0000E0) 0x292F- f:00024 d: 303 | OR[303] = A
0x0071 (0x0000E2) 0x1800-0x010A f:00014 d: 0 | A = 266 (0x010A)
0x0073 (0x0000E6) 0x2930- f:00024 d: 304 | OR[304] = A
0x0074 (0x0000E8) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0075 (0x0000EA) 0x5800- f:00054 d: 0 | B = A
0x0076 (0x0000EC) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x0078 (0x0000F0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0079 (0x0000F2) 0x2006- f:00020 d: 6 | A = OR[6]
0x007A (0x0000F4) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x007B (0x0000F6) 0x2908- f:00024 d: 264 | OR[264] = A
0x007C (0x0000F8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x007D (0x0000FA) 0x292B- f:00024 d: 299 | OR[299] = A
0x007E (0x0000FC) 0x8422- f:00102 d: 34 | P = P + 34 (0x00A0), A = 0
0x007F (0x0000FE) 0x100E- f:00010 d: 14 | A = 14 (0x000E)
0x0080 (0x000100) 0x292E- f:00024 d: 302 | OR[302] = A
0x0081 (0x000102) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0082 (0x000104) 0x292F- f:00024 d: 303 | OR[303] = A
0x0083 (0x000106) 0x212B- f:00020 d: 299 | A = OR[299]
0x0084 (0x000108) 0x2930- f:00024 d: 304 | OR[304] = A
0x0085 (0x00010A) 0x212A- f:00020 d: 298 | A = OR[298]
0x0086 (0x00010C) 0x2931- f:00024 d: 305 | OR[305] = A
0x0087 (0x00010E) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0088 (0x000110) 0x5800- f:00054 d: 0 | B = A
0x0089 (0x000112) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x008B (0x000116) 0x7C09- f:00076 d: 9 | R = OR[9]
0x008C (0x000118) 0x2006- f:00020 d: 6 | A = OR[6]
0x008D (0x00011A) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x008E (0x00011C) 0x2908- f:00024 d: 264 | OR[264] = A
0x008F (0x00011E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0090 (0x000120) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x0091 (0x000122) 0x292E- f:00024 d: 302 | OR[302] = A
0x0092 (0x000124) 0x212C- f:00020 d: 300 | A = OR[300]
0x0093 (0x000126) 0x292F- f:00024 d: 303 | OR[303] = A
0x0094 (0x000128) 0x212D- f:00020 d: 301 | A = OR[301]
0x0095 (0x00012A) 0x2930- f:00024 d: 304 | OR[304] = A
0x0096 (0x00012C) 0x211B- f:00020 d: 283 | A = OR[283]
0x0097 (0x00012E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0098 (0x000130) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0099 (0x000132) 0x2932- f:00024 d: 306 | OR[306] = A
0x009A (0x000134) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x009B (0x000136) 0x2933- f:00024 d: 307 | OR[307] = A
0x009C (0x000138) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x009D (0x00013A) 0x5800- f:00054 d: 0 | B = A
0x009E (0x00013C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x009F (0x00013E) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00A0 (0x000140) 0x101E- f:00010 d: 30 | A = 30 (0x001E)
0x00A1 (0x000142) 0x292E- f:00024 d: 302 | OR[302] = A
0x00A2 (0x000144) 0x212C- f:00020 d: 300 | A = OR[300]
0x00A3 (0x000146) 0x292F- f:00024 d: 303 | OR[303] = A
0x00A4 (0x000148) 0x212D- f:00020 d: 301 | A = OR[301]
0x00A5 (0x00014A) 0x2930- f:00024 d: 304 | OR[304] = A
0x00A6 (0x00014C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x00A7 (0x00014E) 0x2931- f:00024 d: 305 | OR[305] = A
0x00A8 (0x000150) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x00A9 (0x000152) 0x5800- f:00054 d: 0 | B = A
0x00AA (0x000154) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00AB (0x000156) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00AC (0x000158) 0x211C- f:00020 d: 284 | A = OR[284]
0x00AD (0x00015A) 0x1605- f:00013 d: 5 | A = A - 5 (0x0005)
0x00AE (0x00015C) 0x8003- f:00100 d: 3 | P = P + 3 (0x00B1), C = 0
0x00AF (0x00015E) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x00B0 (0x000160) 0x291C- f:00024 d: 284 | OR[284] = A
0x00B1 (0x000162) 0x211C- f:00020 d: 284 | A = OR[284]
0x00B2 (0x000164) 0x0A04- f:00005 d: 4 | A = A < 4 (0x0004)
0x00B3 (0x000166) 0x291E- f:00024 d: 286 | OR[286] = A
0x00B4 (0x000168) 0x211C- f:00020 d: 284 | A = OR[284]
0x00B5 (0x00016A) 0x0A05- f:00005 d: 5 | A = A < 5 (0x0005)
0x00B6 (0x00016C) 0x291F- f:00024 d: 287 | OR[287] = A
0x00B7 (0x00016E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00B8 (0x000170) 0x2920- f:00024 d: 288 | OR[288] = A
0x00B9 (0x000172) 0x211A- f:00020 d: 282 | A = OR[282]
0x00BA (0x000174) 0x251E- f:00022 d: 286 | A = A + OR[286]
0x00BB (0x000176) 0x2922- f:00024 d: 290 | OR[290] = A
0x00BC (0x000178) 0x211B- f:00020 d: 283 | A = OR[283]
0x00BD (0x00017A) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x00BE (0x00017C) 0x2923- f:00024 d: 291 | OR[291] = A
0x00BF (0x00017E) 0x2121- f:00020 d: 289 | A = OR[289]
0x00C0 (0x000180) 0x2520- f:00022 d: 288 | A = A + OR[288]
0x00C1 (0x000182) 0x2924- f:00024 d: 292 | OR[292] = A
0x00C2 (0x000184) 0x3123- f:00030 d: 291 | A = (OR[291])
0x00C3 (0x000186) 0x8471- f:00102 d: 113 | P = P + 113 (0x0134), A = 0
0x00C4 (0x000188) 0x3123- f:00030 d: 291 | A = (OR[291])
0x00C5 (0x00018A) 0x1A00-0x0FFF f:00015 d: 0 | A = A & 4095 (0x0FFF)
0x00C7 (0x00018E) 0x3924- f:00034 d: 292 | (OR[292]) = A
0x00C8 (0x000190) 0x3123- f:00030 d: 291 | A = (OR[291])
0x00C9 (0x000192) 0x1A00-0xF000 f:00015 d: 0 | A = A & 61440 (0xF000)
0x00CB (0x000196) 0x2917- f:00024 d: 279 | OR[279] = A
0x00CC (0x000198) 0x2124- f:00020 d: 292 | A = OR[292]
0x00CD (0x00019A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00CE (0x00019C) 0x2908- f:00024 d: 264 | OR[264] = A
0x00CF (0x00019E) 0x2123- f:00020 d: 291 | A = OR[291]
0x00D0 (0x0001A0) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00D1 (0x0001A2) 0x2909- f:00024 d: 265 | OR[265] = A
0x00D2 (0x0001A4) 0x3109- f:00030 d: 265 | A = (OR[265])
0x00D3 (0x0001A6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00D4 (0x0001A8) 0x2124- f:00020 d: 292 | A = OR[292]
0x00D5 (0x0001AA) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00D6 (0x0001AC) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D7 (0x0001AE) 0x2123- f:00020 d: 291 | A = OR[291]
0x00D8 (0x0001B0) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00D9 (0x0001B2) 0x2909- f:00024 d: 265 | OR[265] = A
0x00DA (0x0001B4) 0x3109- f:00030 d: 265 | A = (OR[265])
0x00DB (0x0001B6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00DC (0x0001B8) 0x101F- f:00010 d: 31 | A = 31 (0x001F)
0x00DD (0x0001BA) 0x2916- f:00024 d: 278 | OR[278] = A
0x00DE (0x0001BC) 0x2117- f:00020 d: 279 | A = OR[279]
0x00DF (0x0001BE) 0x8602- f:00103 d: 2 | P = P + 2 (0x00E1), A # 0
0x00E0 (0x0001C0) 0x7004- f:00070 d: 4 | P = P + 4 (0x00E4)
0x00E1 (0x0001C2) 0x2116- f:00020 d: 278 | A = OR[278]
0x00E2 (0x0001C4) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x00E3 (0x0001C6) 0x2916- f:00024 d: 278 | OR[278] = A
0x00E4 (0x0001C8) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00E5 (0x0001CA) 0x292E- f:00024 d: 302 | OR[302] = A
0x00E6 (0x0001CC) 0x1800-0x0030 f:00014 d: 0 | A = 48 (0x0030)
0x00E8 (0x0001D0) 0x292F- f:00024 d: 303 | OR[303] = A
0x00E9 (0x0001D2) 0x211D- f:00020 d: 285 | A = OR[285]
0x00EA (0x0001D4) 0x2930- f:00024 d: 304 | OR[304] = A
0x00EB (0x0001D6) 0x2116- f:00020 d: 278 | A = OR[278]
0x00EC (0x0001D8) 0x2931- f:00024 d: 305 | OR[305] = A
0x00ED (0x0001DA) 0x1019- f:00010 d: 25 | A = 25 (0x0019)
0x00EE (0x0001DC) 0x2932- f:00024 d: 306 | OR[306] = A
0x00EF (0x0001DE) 0x101A- f:00010 d: 26 | A = 26 (0x001A)
0x00F0 (0x0001E0) 0x2933- f:00024 d: 307 | OR[307] = A
0x00F1 (0x0001E2) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x00F2 (0x0001E4) 0x5800- f:00054 d: 0 | B = A
0x00F3 (0x0001E6) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x00F5 (0x0001EA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00F6 (0x0001EC) 0x2123- f:00020 d: 291 | A = OR[291]
0x00F7 (0x0001EE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00F8 (0x0001F0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00F9 (0x0001F2) 0x2122- f:00020 d: 290 | A = OR[290]
0x00FA (0x0001F4) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00FB (0x0001F6) 0x2909- f:00024 d: 265 | OR[265] = A
0x00FC (0x0001F8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00FD (0x0001FA) 0x3709- f:00033 d: 265 | A = A - (OR[265])
0x00FE (0x0001FC) 0x2925- f:00024 d: 293 | OR[293] = A
0x00FF (0x0001FE) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0100 (0x000200) 0x292E- f:00024 d: 302 | OR[302] = A
0x0101 (0x000202) 0x1800-0x0030 f:00014 d: 0 | A = 48 (0x0030)
0x0103 (0x000206) 0x292F- f:00024 d: 303 | OR[303] = A
0x0104 (0x000208) 0x2125- f:00020 d: 293 | A = OR[293]
0x0105 (0x00020A) 0x2930- f:00024 d: 304 | OR[304] = A
0x0106 (0x00020C) 0x1064- f:00010 d: 100 | A = 100 (0x0064)
0x0107 (0x00020E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0108 (0x000210) 0x101B- f:00010 d: 27 | A = 27 (0x001B)
0x0109 (0x000212) 0x2932- f:00024 d: 306 | OR[306] = A
0x010A (0x000214) 0x101C- f:00010 d: 28 | A = 28 (0x001C)
0x010B (0x000216) 0x2933- f:00024 d: 307 | OR[307] = A
0x010C (0x000218) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x010D (0x00021A) 0x5800- f:00054 d: 0 | B = A
0x010E (0x00021C) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x0110 (0x000220) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0111 (0x000222) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0112 (0x000224) 0x292E- f:00024 d: 302 | OR[302] = A
0x0113 (0x000226) 0x1800-0x001B f:00014 d: 0 | A = 27 (0x001B)
0x0115 (0x00022A) 0x292F- f:00024 d: 303 | OR[303] = A
0x0116 (0x00022C) 0x2127- f:00020 d: 295 | A = OR[295]
0x0117 (0x00022E) 0x2930- f:00024 d: 304 | OR[304] = A
0x0118 (0x000230) 0x2128- f:00020 d: 296 | A = OR[296]
0x0119 (0x000232) 0x2931- f:00024 d: 305 | OR[305] = A
0x011A (0x000234) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x011B (0x000236) 0x2932- f:00024 d: 306 | OR[306] = A
0x011C (0x000238) 0x2126- f:00020 d: 294 | A = OR[294]
0x011D (0x00023A) 0x2933- f:00024 d: 307 | OR[307] = A
0x011E (0x00023C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x011F (0x00023E) 0x2934- f:00024 d: 308 | OR[308] = A
0x0120 (0x000240) 0x101C- f:00010 d: 28 | A = 28 (0x001C)
0x0121 (0x000242) 0x2935- f:00024 d: 309 | OR[309] = A
0x0122 (0x000244) 0x101D- f:00010 d: 29 | A = 29 (0x001D)
0x0123 (0x000246) 0x2936- f:00024 d: 310 | OR[310] = A
0x0124 (0x000248) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0125 (0x00024A) 0x5800- f:00054 d: 0 | B = A
0x0126 (0x00024C) 0x1800-0x2D18 f:00014 d: 0 | A = 11544 (0x2D18)
0x0128 (0x000250) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0129 (0x000252) 0x2129- f:00020 d: 297 | A = OR[297]
0x012A (0x000254) 0x1664- f:00013 d: 100 | A = A - 100 (0x0064)
0x012B (0x000256) 0x8004- f:00100 d: 4 | P = P + 4 (0x012F), C = 0
0x012C (0x000258) 0x8403- f:00102 d: 3 | P = P + 3 (0x012F), A = 0
0x012D (0x00025A) 0x1064- f:00010 d: 100 | A = 100 (0x0064)
0x012E (0x00025C) 0x2929- f:00024 d: 297 | OR[297] = A
0x012F (0x00025E) 0x2124- f:00020 d: 292 | A = OR[292]
0x0130 (0x000260) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0131 (0x000262) 0x2908- f:00024 d: 264 | OR[264] = A
0x0132 (0x000264) 0x2129- f:00020 d: 297 | A = OR[297]
0x0133 (0x000266) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0134 (0x000268) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0135 (0x00026A) 0x2B1E- f:00025 d: 286 | OR[286] = A + OR[286]
0x0136 (0x00026C) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x0137 (0x00026E) 0x2B1F- f:00025 d: 287 | OR[287] = A + OR[287]
0x0138 (0x000270) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x0139 (0x000272) 0x2B20- f:00025 d: 288 | OR[288] = A + OR[288]
0x013A (0x000274) 0x2120- f:00020 d: 288 | A = OR[288]
0x013B (0x000276) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x013C (0x000278) 0x8883- f:00104 d: 131 | P = P - 131 (0x00B9), C = 0
0x013D (0x00027A) 0x211A- f:00020 d: 282 | A = OR[282]
0x013E (0x00027C) 0x2922- f:00024 d: 290 | OR[290] = A
0x013F (0x00027E) 0x211B- f:00020 d: 283 | A = OR[283]
0x0140 (0x000280) 0x2923- f:00024 d: 291 | OR[291] = A
0x0141 (0x000282) 0x211B- f:00020 d: 283 | A = OR[283]
0x0142 (0x000284) 0x14C0- f:00012 d: 192 | A = A + 192 (0x00C0)
0x0143 (0x000286) 0x2908- f:00024 d: 264 | OR[264] = A
0x0144 (0x000288) 0x2123- f:00020 d: 291 | A = OR[291]
0x0145 (0x00028A) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0146 (0x00028C) 0x8410- f:00102 d: 16 | P = P + 16 (0x0156), A = 0
0x0147 (0x00028E) 0x3123- f:00030 d: 291 | A = (OR[291])
0x0148 (0x000290) 0x3922- f:00034 d: 290 | (OR[290]) = A
0x0149 (0x000292) 0x2122- f:00020 d: 290 | A = OR[290]
0x014A (0x000294) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x014B (0x000296) 0x2908- f:00024 d: 264 | OR[264] = A
0x014C (0x000298) 0x2123- f:00020 d: 291 | A = OR[291]
0x014D (0x00029A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x014E (0x00029C) 0x2909- f:00024 d: 265 | OR[265] = A
0x014F (0x00029E) 0x3109- f:00030 d: 265 | A = (OR[265])
0x0150 (0x0002A0) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0151 (0x0002A2) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0152 (0x0002A4) 0x2B22- f:00025 d: 290 | OR[290] = A + OR[290]
0x0153 (0x0002A6) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x0154 (0x0002A8) 0x2B23- f:00025 d: 291 | OR[291] = A + OR[291]
0x0155 (0x0002AA) 0x7214- f:00071 d: 20 | P = P - 20 (0x0141)
0x0156 (0x0002AC) 0x2121- f:00020 d: 289 | A = OR[289]
0x0157 (0x0002AE) 0x1420- f:00012 d: 32 | A = A + 32 (0x0020)
0x0158 (0x0002B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0159 (0x0002B2) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x015A (0x0002B4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x015B (0x0002B6) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x015C (0x0002B8) 0x292E- f:00024 d: 302 | OR[302] = A
0x015D (0x0002BA) 0x1800-0x0151 f:00014 d: 0 | A = 337 (0x0151)
0x015F (0x0002BE) 0x292F- f:00024 d: 303 | OR[303] = A
0x0160 (0x0002C0) 0x2118- f:00020 d: 280 | A = OR[280]
0x0161 (0x0002C2) 0x2930- f:00024 d: 304 | OR[304] = A
0x0162 (0x0002C4) 0x2119- f:00020 d: 281 | A = OR[281]
0x0163 (0x0002C6) 0x2931- f:00024 d: 305 | OR[305] = A
0x0164 (0x0002C8) 0x2121- f:00020 d: 289 | A = OR[289]
0x0165 (0x0002CA) 0x2932- f:00024 d: 306 | OR[306] = A
0x0166 (0x0002CC) 0x112E- f:00010 d: 302 | A = 302 (0x012E)
0x0167 (0x0002CE) 0x5800- f:00054 d: 0 | B = A
0x0168 (0x0002D0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0169 (0x0002D2) 0x7C09- f:00076 d: 9 | R = OR[9]
0x016A (0x0002D4) 0x0000- f:00000 d: 0 | PASS
0x016B (0x0002D6) 0x0000- f:00000 d: 0 | PASS
|
Library/SDK_C/MSet/AsmCalc/acLine.asm | steakknife/pcgeos | 504 | 1175 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990, 1993 -- All Rights Reserved
PROJECT: PC SDK
MODULE: Sample Library -- Mandelbrot Set Library
FILE: calcLineBasedAlg.asm
AUTHOR: <NAME>, Aug 10, 1993
ROUTINES:
Name Description
---- -----------
GLB MSSetupCalcVectors Copy in calculation vectors
GLB MSLINEBASEDDOLINE C stub for MSLineBasedDoLine
GLB MSLineBasedDoLine Assembly routine to calculate one line
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 8/20/93 Updated for SDK
Doug 5/16/90 Initial revision
DESCRIPTION:
An algorithm to generate all points in Mandelbrot space requested.
This one's simple -- just one line at a time.
$Id: acLine.asm,v 1.1 97/04/07 10:43:56 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalcThreadResource segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MSSetupCalcVectors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: MSSetupCalcVectors
C DECLARATION: extern void
_far _pascal MSSetupCalcVectors(
MSetCalcParameters _far* mscpP,
MSetPrecision precision);
SYNOPSIS: Set up the MSCP_*Vec fields based on precision
CALLED BY: GLOBAL
RETURN: void
DESTROYED: nothing
SIDE EFFECTS: Alters MSCP_*Vec
PSEUDO CODE/STRATEGY:
We assume that *mscpP is paragraph aligned, and furthermore starts at
a 0 offset. This is a safe assumption, since it should be pointing
to the beginning of a MemLocked block, which should always have the
correct alignment. This assumption is critical for the operation of
the calculation routines, which access the fields directly off a
segment register.
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 8/21/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGeosConvention ;sets the calling conventions
MSSETUPCALCVECTORS proc far mscpP:fptr,
prec:MSetPrecision
uses ax,ds,si
.enter
lds si, mscpP
EC< tst si >
EC< ERROR_NZ ERROR_PARAMS_NOT_AT_OFFSET_ZERO >
;
; Set up vectors to reflect parameters of operation
;
cmp prec, MSP_16BIT
je set16BitMath
;set48BitMath:
mov ax, offset FP48CalcPoint
mov ds:[MSCP_calcPointVec], ax
mov ax, offset FP48Copy
mov ds:[MSCP_copyVec], ax
mov ax, offset FP48Add
mov ds:[MSCP_addVec], ax
mov ax, offset FP48Sub
mov ds:[MSCP_subVec], ax
jmp afterMathSet
set16BitMath:
mov ax, offset FP16CalcPoint
mov ds:[MSCP_calcPointVec], ax
mov ax, offset FP16Copy
mov ds:[MSCP_copyVec], ax
mov ax, offset FP16Add
mov ds:[MSCP_addVec], ax
mov ax, offset FP16Sub
mov ds:[MSCP_subVec], ax
afterMathSet:
.leave
ret
MSSETUPCALCVECTORS endp
SetDefaultConvention ;restores calling conventions to defaults
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MSLINEBASEDDOLINE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: MSLineBasedDoLine
C DECLARATION: extern MSetCalcReturnFlags
_far _pascal MSLineBasedDoLine(
word lineNum,
_far MSetCalcParameters* mscpP,
_far word* dataP);
PSEUDO CODE/STRATEGY:
We assume that *mscpP is paragraph aligned, and starts at offset 0.
This is a safe assumption, since it should be pointing to the
beginning of a MemLocked block, which should always have the correct
alignment.
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 8/18/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGeosConvention ;sets the calling conventions
MSLINEBASEDDOLINE proc far lineNum:word,
mscpP:fptr,
dataP:fptr
uses dx,si,ds,es
.enter
mov dx, lineNum
lds si, mscpP
EC< tst si >
EC< ERROR_NZ ERROR_PARAMS_NOT_AT_OFFSET_ZERO >
les si, dataP
call MSLineBasedDoLine
;al is already set
.leave
ret
MSLINEBASEDDOLINE endp
SetDefaultConvention ;restores calling conventions to defaults
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MSLineBasedDoLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Performs calculations for 1 line of data
CALLED BY: GLOBAL
PASS: ds:0 = pointing to an MSetParameters block
es:si = pointing to where the calculated points should
be put
dx = y line in document to do
RETURN: al = MSetCalcReturnFlags
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
BUGS/FIXES:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 12/88 Initial version
dubois 8/20/93 Modified for SDK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MSLineBasedDoLine proc near
retval local MSetCalcReturnFlagsAsm
uses bx,cx,dx,si,di,bp
.enter
clr retval
clr cx ; X doc position of 0
;
; Set up A and B. A should be just MSCP_left, since we're starting
; at the beginning of a line. Calculate B by subtracting MSCP_vRes
; repeatedly to MSCP_top.
;
push si ; save offset
push dx
mov si, offset MSCP_left ; start A at left value
mov di, offset MSCP_vars.MN_A
call ds:[MSCP_copyVec]
mov si, offset MSCP_top ; start B at top value
mov di, offset MSCP_vars.MN_B
call ds:[MSCP_copyVec]
pop dx
mov cx, dx
tst cx
je startLine
calculateB:
push cx
mov si, offset MSCP_vars.MN_B
mov bx, offset MSCP_vRes
mov di, offset MSCP_vars.MN_B
call ds:[MSCP_subVec] ; could trash: ax
;use sub because y mset coordinate should
;decrease as y screen coordinate increases
pop cx
loop calculateB
;
; For each point on this line, if the stored value is zero (the
; point has not been calculated yet), calculate the point.
; Continue to the next point unless there are messages waiting or
; the line is finished.
;
startLine:
pop si ; get offset
mov cx, ds:[MSCP_pixelWidth] ; count for line
EC< tst cx >
EC< ERROR_Z ERROR_PIXEL_WIDTH_ZERO >
doOnePoint:
push cx ; save points-left count
mov ax, es:[si] ; get current value
tst ax ; if calculated, use
jnz pointDone ; else calculate
ornf retval, mask MSCRF_BLOCK_DIRTIED
push si
call ds:[MSCP_calcPointVec] ; call point calculation routine
;could trash: bx,cx,dx,si,di,bp
pop si
mov es:[si], ax ; store result
pointDone:
; Move (A,B) over to next point
push si
mov si, offset MSCP_vars.MN_A
mov bx, offset MSCP_hRes
mov di, offset MSCP_vars.MN_A
call ds:[MSCP_addVec]
pop si
add si, 2 ; adjust data pointer
pop cx ; restore points-left count
clr bx ; get info on current thread
call GeodeInfoQueue ; see if a message is waiting
tst ax ; ax = # events in queue
jnz gotMessage ; abort if non-zero
loop doOnePoint
done:
mov al, retval
.leave
ret
gotMessage:
ornf retval, mask MSCRF_MESSAGE_WAITING
jmp done
MSLineBasedDoLine endp
CalcThreadResource ends
|
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_audio_gstringbuffer_h.ads | persan/A-gst | 1 | 1004 | <filename>src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_audio_gstringbuffer_h.ads
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h;
-- limited -- with GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h;
with glib;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstformat_h;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_audio_gstringbuffer_h is
-- unsupported macro: GST_TYPE_RING_BUFFER (gst_ring_buffer_get_type())
-- arg-macro: function GST_RING_BUFFER (obj)
-- return G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RING_BUFFER,GstRingBuffer);
-- arg-macro: function GST_RING_BUFFER_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RING_BUFFER,GstRingBufferClass);
-- arg-macro: function GST_RING_BUFFER_GET_CLASS (obj)
-- return G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RING_BUFFER, GstRingBufferClass);
-- arg-macro: function GST_RING_BUFFER_CAST (obj)
-- return (GstRingBuffer *)obj;
-- arg-macro: function GST_IS_RING_BUFFER (obj)
-- return G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RING_BUFFER);
-- arg-macro: function GST_IS_RING_BUFFER_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RING_BUFFER);
-- arg-macro: function GST_RING_BUFFER_GET_COND (buf)
-- return ((GstRingBuffer *)buf).cond;
-- arg-macro: function GST_RING_BUFFER_WAIT (buf)
-- return g_cond_wait (GST_RING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf));
-- arg-macro: function GST_RING_BUFFER_SIGNAL (buf)
-- return g_cond_signal (GST_RING_BUFFER_GET_COND (buf));
-- arg-macro: function GST_RING_BUFFER_BROADCAST (buf)
-- return g_cond_broadcast (GST_RING_BUFFER_GET_COND (buf));
-- GStreamer
-- * Copyright (C) 1999,2000 <NAME> <<EMAIL>>
-- * 2005 <NAME> <<EMAIL>>
-- *
-- * gstringbuffer.h:
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
type GstRingBuffer;
type anon_349;
type anon_350 is record
flushing : aliased GLIB.gboolean; -- gst/audio/gstringbuffer.h:332
may_start : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:334
active : aliased GLIB.gboolean; -- gst/audio/gstringbuffer.h:335
end record;
pragma Convention (C_Pass_By_Copy, anon_350);
type u_GstRingBuffer_u_gst_reserved_array is array (0 .. 3) of System.Address;
type anon_349 (discr : unsigned := 0) is record
case discr is
when 0 =>
ABI : aliased anon_350; -- gst/audio/gstringbuffer.h:336
when others =>
u_gst_reserved : u_GstRingBuffer_u_gst_reserved_array; -- gst/audio/gstringbuffer.h:338
end case;
end record;
pragma Convention (C_Pass_By_Copy, anon_349);
pragma Unchecked_Union (anon_349);--subtype GstRingBuffer is u_GstRingBuffer; -- gst/audio/gstringbuffer.h:38
type GstRingBufferClass;
type u_GstRingBufferClass_u_gst_reserved_array is array (0 .. 0) of System.Address;
--subtype GstRingBufferClass is u_GstRingBufferClass; -- gst/audio/gstringbuffer.h:39
type GstRingBufferSpec;
type u_GstRingBufferSpec_silence_sample_array is array (0 .. 31) of aliased GLIB.guint8;
type u_GstRingBufferSpec_u_gst_reserved_array is array (0 .. 27) of aliased GLIB.guint8;
--subtype GstRingBufferSpec is u_GstRingBufferSpec; -- gst/audio/gstringbuffer.h:40
--*
-- * GstRingBufferCallback:
-- * @rbuf: a #GstRingBuffer
-- * @data: target to fill
-- * @len: amount to fill
-- * @user_data: user data
-- *
-- * This function is set with gst_ring_buffer_set_callback() and is
-- * called to fill the memory at @data with @len bytes of samples.
--
type GstRingBufferCallback is access procedure
(arg1 : access GstRingBuffer;
arg2 : access GLIB.guint8;
arg3 : GLIB.guint;
arg4 : System.Address);
pragma Convention (C, GstRingBufferCallback); -- gst/audio/gstringbuffer.h:52
--*
-- * GstRingBufferState:
-- * @GST_RING_BUFFER_STATE_STOPPED: The ringbuffer is stopped
-- * @GST_RING_BUFFER_STATE_PAUSED: The ringbuffer is paused
-- * @GST_RING_BUFFER_STATE_STARTED: The ringbuffer is started
-- *
-- * The state of the ringbuffer.
--
type GstRingBufferState is
(GST_RING_BUFFER_STATE_STOPPED,
GST_RING_BUFFER_STATE_PAUSED,
GST_RING_BUFFER_STATE_STARTED);
pragma Convention (C, GstRingBufferState); -- gst/audio/gstringbuffer.h:66
--*
-- * GstRingBufferSegState:
-- * @GST_SEGSTATE_INVALID: The content of the segment is invalid
-- * @GST_SEGSTATE_EMPTY: The segment is empty
-- * @GST_SEGSTATE_FILLED: The segment contains valid data
-- * @GST_SEGSTATE_PARTIAL: The segment partially contains valid data
-- *
-- * The state of a segment in the ringbuffer.
--
type GstRingBufferSegState is
(GST_SEGSTATE_INVALID,
GST_SEGSTATE_EMPTY,
GST_SEGSTATE_FILLED,
GST_SEGSTATE_PARTIAL);
pragma Convention (C, GstRingBufferSegState); -- gst/audio/gstringbuffer.h:82
--*
-- * GstBufferFormatType:
-- * @GST_BUFTYPE_LINEAR: samples in linear PCM
-- * @GST_BUFTYPE_FLOAT: samples in float
-- * @GST_BUFTYPE_MU_LAW: samples in mulaw
-- * @GST_BUFTYPE_A_LAW: samples in alaw
-- * @GST_BUFTYPE_IMA_ADPCM: samples in ima adpcm
-- * @GST_BUFTYPE_MPEG: samples in mpeg audio (but not AAC) format
-- * @GST_BUFTYPE_GSM: samples in gsm format
-- * @GST_BUFTYPE_IEC958: samples in IEC958 frames (e.g. AC3)
-- * @GST_BUFTYPE_AC3: samples in AC3 format
-- * @GST_BUFTYPE_EAC3: samples in EAC3 format
-- * @GST_BUFTYPE_DTS: samples in DTS format
-- * @GST_BUFTYPE_MPEG2_AAC: samples in MPEG-2 AAC format
-- * @GST_BUFTYPE_MPEG4_AAC: samples in MPEG-4 AAC format
-- *
-- * The format of the samples in the ringbuffer.
--
type GstBufferFormatType is
(GST_BUFTYPE_LINEAR,
GST_BUFTYPE_FLOAT,
GST_BUFTYPE_MU_LAW,
GST_BUFTYPE_A_LAW,
GST_BUFTYPE_IMA_ADPCM,
GST_BUFTYPE_MPEG,
GST_BUFTYPE_GSM,
GST_BUFTYPE_IEC958,
GST_BUFTYPE_AC3,
GST_BUFTYPE_EAC3,
GST_BUFTYPE_DTS,
GST_BUFTYPE_MPEG2_AAC,
GST_BUFTYPE_MPEG4_AAC);
pragma Convention (C, GstBufferFormatType); -- gst/audio/gstringbuffer.h:117
--*
-- * GstBufferFormat:
-- * @GST_UNKNOWN: unspecified
-- * @GST_S8: integer signed 8 bit
-- * @GST_U8: integer unsigned 8 bit
-- * @GST_S16_LE: integer signed 16 bit little endian
-- * @GST_S16_BE: integer signed 16 bit big endian
-- * @GST_U16_LE: integer unsigned 16 bit little endian
-- * @GST_U16_BE: integer unsigned 16 bit big endian
-- * @GST_S24_LE: integer signed 24 bit little endian
-- * @GST_S24_BE: integer signed 24 bit big endian
-- * @GST_U24_LE: integer unsigned 24 bit little endian
-- * @GST_U24_BE: integer unsigned 24 bit big endian
-- * @GST_S32_LE: integer signed 32 bit little endian
-- * @GST_S32_BE: integer signed 32 bit big endian
-- * @GST_U32_LE: integer unsigned 32 bit little endian
-- * @GST_U32_BE: integer unsigned 32 bit big endian
-- * @GST_S24_3LE: integer signed 24 bit little endian packed in 3 bytes
-- * @GST_S24_3BE: integer signed 24 bit big endian packed in 3 bytes
-- * @GST_U24_3LE: integer unsigned 24 bit little endian packed in 3 bytes
-- * @GST_U24_3BE: integer unsigned 24 bit big endian packed in 3 bytes
-- * @GST_S20_3LE: integer signed 20 bit little endian packed in 3 bytes
-- * @GST_S20_3BE: integer signed 20 bit big endian packed in 3 bytes
-- * @GST_U20_3LE: integer unsigned 20 bit little endian packed in 3 bytes
-- * @GST_U20_3BE: integer unsigned 20 bit big endian packed in 3 bytes
-- * @GST_S18_3LE: integer signed 18 bit little endian packed in 3 bytes
-- * @GST_S18_3BE: integer signed 18 bit big endian packed in 3 bytes
-- * @GST_U18_3LE: integer unsigned 18 bit little endian packed in 3 bytes
-- * @GST_U18_3BE: integer unsigned 18 bit big endian packed in 3 bytes
-- * @GST_FLOAT32_LE: floating 32 bit little endian
-- * @GST_FLOAT32_BE: floating 32 bit big endian
-- * @GST_FLOAT64_LE: floating 64 bit little endian
-- * @GST_FLOAT64_BE: floating 64 bit big endian
-- * @GST_MU_LAW: mu-law
-- * @GST_A_LAW: a-law
-- * @GST_IMA_ADPCM: ima adpcm
-- * @GST_MPEG: mpeg audio (but not aac)
-- * @GST_GSM: gsm
-- * @GST_IEC958: IEC958 frames
-- * @GST_AC3: ac3
-- * @GST_EAC3: eac3
-- * @GST_DTS: dts
-- * @GST_MPEG2_AAC: mpeg-2 aac
-- * @GST_MPEG4_AAC: mpeg-4 aac
-- *
-- * The detailed format of the samples in the ringbuffer.
--
type GstBufferFormat is
(GST_UNKNOWN,
GST_S8,
GST_U8,
GST_S16_LE,
GST_S16_BE,
GST_U16_LE,
GST_U16_BE,
GST_S24_LE,
GST_S24_BE,
GST_U24_LE,
GST_U24_BE,
GST_S32_LE,
GST_S32_BE,
GST_U32_LE,
GST_U32_BE,
GST_S24_3LE,
GST_S24_3BE,
GST_U24_3LE,
GST_U24_3BE,
GST_S20_3LE,
GST_S20_3BE,
GST_U20_3LE,
GST_U20_3BE,
GST_S18_3LE,
GST_S18_3BE,
GST_U18_3LE,
GST_U18_3BE,
GST_FLOAT32_LE,
GST_FLOAT32_BE,
GST_FLOAT64_LE,
GST_FLOAT64_BE,
GST_MU_LAW,
GST_A_LAW,
GST_IMA_ADPCM,
GST_MPEG,
GST_GSM,
GST_IEC958,
GST_AC3,
GST_EAC3,
GST_DTS,
GST_MPEG2_AAC,
GST_MPEG4_AAC);
pragma Convention (C, GstBufferFormat); -- gst/audio/gstringbuffer.h:218
--*
-- * GstRingBufferSpec:
-- * @caps: The caps that generated the Spec.
-- * @type: the sample type
-- * @format: the sample format
-- * @sign: the sample sign
-- * @bigend: the endianness of the samples
-- * @width: the width of the samples
-- * @depth: th depth of the samples
-- * @rate: the samplerate
-- * @channels: the number of channels
-- * @latency_time: the latency in microseconds
-- * @buffer_time: the total buffer size in microseconds
-- * @segsize: the size of one segment in bytes
-- * @segtotal: the total number of segments
-- * @bytes_per_sample: number of bytes in one sample
-- * @silence_sample: bytes representing one sample of silence
-- * @seglatency: number of segments queued in the lower level device,
-- * defaults to segtotal
-- *
-- * The structure containing the format specification of the ringbuffer.
--
--< public >
-- in
-- the caps of the buffer
type GstRingBufferSpec is record
caps : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps; -- gst/audio/gstringbuffer.h:246
c_type : aliased GstBufferFormatType; -- gst/audio/gstringbuffer.h:249
format : aliased GstBufferFormat; -- gst/audio/gstringbuffer.h:250
sign : aliased GLIB.gboolean; -- gst/audio/gstringbuffer.h:251
bigend : aliased GLIB.gboolean; -- gst/audio/gstringbuffer.h:252
width : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:253
depth : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:254
rate : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:255
channels : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:256
latency_time : aliased GLIB.guint64; -- gst/audio/gstringbuffer.h:258
buffer_time : aliased GLIB.guint64; -- gst/audio/gstringbuffer.h:261
segsize : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:264
segtotal : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:267
bytes_per_sample : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:272
silence_sample : aliased u_GstRingBufferSpec_silence_sample_array; -- gst/audio/gstringbuffer.h:273
seglatency : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:276
u_gst_reserved : aliased u_GstRingBufferSpec_u_gst_reserved_array; -- gst/audio/gstringbuffer.h:281
end record;
pragma Convention (C_Pass_By_Copy, GstRingBufferSpec); -- gst/audio/gstringbuffer.h:242
-- in/out
-- the required/actual latency time, this is the
-- * actual the size of one segment and the
-- * minimum possible latency we can achieve.
-- the required/actual time of the buffer, this is
-- * the total size of the buffer and maximum
-- * latency we can compensate for.
-- size of one buffer segment in bytes, this value
-- * should be chosen to match latency_time as
-- * well as possible.
-- total number of segments, this value is the
-- * number of segments of @segsize and should be
-- * chosen so that it matches buffer_time as
-- * close as possible.
-- out
-- number of bytes of one sample
-- bytes representing silence
-- ABI added 0.10.20
-- number of segments queued in the lower
-- * level device, defaults to segtotal.
--< private >
-- gpointer _gst_reserved[GST_PADDING];
--*
-- * GstRingBuffer:
-- * @cond: used to signal start/stop/pause/resume actions
-- * @open: boolean indicating that the ringbuffer is open
-- * @acquired: boolean indicating that the ringbuffer is acquired
-- * @data: data in the ringbuffer
-- * @spec: format and layout of the ringbuffer data
-- * @segstate: status of each segment in the ringbuffer (unused)
-- * @samples_per_seg: number of samples in one segment
-- * @empty_seg: pointer to memory holding one segment of silence samples
-- * @state: state of the buffer
-- * @segdone: readpointer in the ringbuffer
-- * @segbase: segment corresponding to segment 0 (unused)
-- * @waiting: is a reader or writer waiting for a free segment
-- *
-- * The ringbuffer base class structure.
--
type GstRingBuffer is record
object : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h.GstObject; -- gst/audio/gstringbuffer.h:307
cond : access GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h.GCond; -- gst/audio/gstringbuffer.h:310
open : aliased GLIB.gboolean; -- gst/audio/gstringbuffer.h:311
acquired : aliased GLIB.gboolean; -- gst/audio/gstringbuffer.h:312
data : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/audio/gstringbuffer.h:313
spec : aliased GstRingBufferSpec; -- gst/audio/gstringbuffer.h:314
segstate : access GstRingBufferSegState; -- gst/audio/gstringbuffer.h:315
samples_per_seg : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:316
empty_seg : access GLIB.guint8; -- gst/audio/gstringbuffer.h:317
state : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:320
segdone : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:321
segbase : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:322
waiting : aliased GLIB.gint; -- gst/audio/gstringbuffer.h:323
callback : GstRingBufferCallback; -- gst/audio/gstringbuffer.h:326
cb_data : System.Address; -- gst/audio/gstringbuffer.h:327
abidata : aliased anon_349; -- gst/audio/gstringbuffer.h:339
end record;
pragma Convention (C_Pass_By_Copy, GstRingBuffer); -- gst/audio/gstringbuffer.h:306
--< public >
-- with LOCK
--< public >
-- ATOMIC
--< private >
--< private >
-- ATOMIC
-- adding + 0 to mark ABI change to be undone later
--*
-- * GstRingBufferClass:
-- * @parent_class: parent class
-- * @open_device: open the device, don't set any params or allocate anything
-- * @acquire: allocate the resources for the ringbuffer using the given spec
-- * @release: free resources of the ringbuffer
-- * @close_device: close the device
-- * @start: start processing of samples
-- * @pause: pause processing of samples
-- * @resume: resume processing of samples after pause
-- * @stop: stop processing of samples
-- * @delay: get number of samples queued in device
-- * @activate: activate the thread that starts pulling and monitoring the
-- * consumed segments in the device. Since 0.10.22
-- * @commit: write samples into the ringbuffer
-- * @clear_all: clear the entire ringbuffer Since 0.10.24
-- *
-- * The vmethods that subclasses can override to implement the ringbuffer.
--
type GstRingBufferClass is record
parent_class : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h.GstObjectClass; -- gst/audio/gstringbuffer.h:362
open_device : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:365
acquire : access function (arg1 : access GstRingBuffer; arg2 : access GstRingBufferSpec) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:366
release : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:367
close_device : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:368
start : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:370
pause : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:371
resume : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:372
stop : access function (arg1 : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:373
c_delay : access function (arg1 : access GstRingBuffer) return GLIB.guint; -- gst/audio/gstringbuffer.h:375
activate : access function (arg1 : access GstRingBuffer; arg2 : GLIB.gboolean) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:378
commit : access function
(arg1 : access GstRingBuffer;
arg2 : access GLIB.guint64;
arg3 : access GLIB.guchar;
arg4 : GLIB.gint;
arg5 : GLIB.gint;
arg6 : access GLIB.gint) return GLIB.guint; -- gst/audio/gstringbuffer.h:382
clear_all : access procedure (arg1 : access GstRingBuffer); -- gst/audio/gstringbuffer.h:384
u_gst_reserved : u_GstRingBufferClass_u_gst_reserved_array; -- gst/audio/gstringbuffer.h:387
end record;
pragma Convention (C_Pass_By_Copy, GstRingBufferClass); -- gst/audio/gstringbuffer.h:361
--< public >
-- ABI added
--< private >
function gst_ring_buffer_get_type return GLIB.GType; -- gst/audio/gstringbuffer.h:390
pragma Import (C, gst_ring_buffer_get_type, "gst_ring_buffer_get_type");
-- callback stuff
procedure gst_ring_buffer_set_callback
(buf : access GstRingBuffer;
cb : GstRingBufferCallback;
user_data : System.Address); -- gst/audio/gstringbuffer.h:393
pragma Import (C, gst_ring_buffer_set_callback, "gst_ring_buffer_set_callback");
function gst_ring_buffer_parse_caps (spec : access GstRingBufferSpec; caps : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:396
pragma Import (C, gst_ring_buffer_parse_caps, "gst_ring_buffer_parse_caps");
procedure gst_ring_buffer_debug_spec_caps (spec : access GstRingBufferSpec); -- gst/audio/gstringbuffer.h:397
pragma Import (C, gst_ring_buffer_debug_spec_caps, "gst_ring_buffer_debug_spec_caps");
procedure gst_ring_buffer_debug_spec_buff (spec : access GstRingBufferSpec); -- gst/audio/gstringbuffer.h:398
pragma Import (C, gst_ring_buffer_debug_spec_buff, "gst_ring_buffer_debug_spec_buff");
function gst_ring_buffer_convert
(buf : access GstRingBuffer;
src_fmt : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstformat_h.GstFormat;
src_val : GLIB.gint64;
dest_fmt : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstformat_h.GstFormat;
dest_val : access GLIB.gint64) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:400
pragma Import (C, gst_ring_buffer_convert, "gst_ring_buffer_convert");
-- device state
function gst_ring_buffer_open_device (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:405
pragma Import (C, gst_ring_buffer_open_device, "gst_ring_buffer_open_device");
function gst_ring_buffer_close_device (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:406
pragma Import (C, gst_ring_buffer_close_device, "gst_ring_buffer_close_device");
function gst_ring_buffer_device_is_open (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:408
pragma Import (C, gst_ring_buffer_device_is_open, "gst_ring_buffer_device_is_open");
-- allocate resources
function gst_ring_buffer_acquire (buf : access GstRingBuffer; spec : access GstRingBufferSpec) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:411
pragma Import (C, gst_ring_buffer_acquire, "gst_ring_buffer_acquire");
function gst_ring_buffer_release (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:412
pragma Import (C, gst_ring_buffer_release, "gst_ring_buffer_release");
function gst_ring_buffer_is_acquired (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:414
pragma Import (C, gst_ring_buffer_is_acquired, "gst_ring_buffer_is_acquired");
-- activating
function gst_ring_buffer_activate (buf : access GstRingBuffer; active : GLIB.gboolean) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:417
pragma Import (C, gst_ring_buffer_activate, "gst_ring_buffer_activate");
function gst_ring_buffer_is_active (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:418
pragma Import (C, gst_ring_buffer_is_active, "gst_ring_buffer_is_active");
-- flushing
procedure gst_ring_buffer_set_flushing (buf : access GstRingBuffer; flushing : GLIB.gboolean); -- gst/audio/gstringbuffer.h:421
pragma Import (C, gst_ring_buffer_set_flushing, "gst_ring_buffer_set_flushing");
-- playback/pause
function gst_ring_buffer_start (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:424
pragma Import (C, gst_ring_buffer_start, "gst_ring_buffer_start");
function gst_ring_buffer_pause (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:425
pragma Import (C, gst_ring_buffer_pause, "gst_ring_buffer_pause");
function gst_ring_buffer_stop (buf : access GstRingBuffer) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:426
pragma Import (C, gst_ring_buffer_stop, "gst_ring_buffer_stop");
-- get status
function gst_ring_buffer_delay (buf : access GstRingBuffer) return GLIB.guint; -- gst/audio/gstringbuffer.h:429
pragma Import (C, gst_ring_buffer_delay, "gst_ring_buffer_delay");
function gst_ring_buffer_samples_done (buf : access GstRingBuffer) return GLIB.guint64; -- gst/audio/gstringbuffer.h:430
pragma Import (C, gst_ring_buffer_samples_done, "gst_ring_buffer_samples_done");
procedure gst_ring_buffer_set_sample (buf : access GstRingBuffer; sample : GLIB.guint64); -- gst/audio/gstringbuffer.h:432
pragma Import (C, gst_ring_buffer_set_sample, "gst_ring_buffer_set_sample");
-- clear all segments
procedure gst_ring_buffer_clear_all (buf : access GstRingBuffer); -- gst/audio/gstringbuffer.h:435
pragma Import (C, gst_ring_buffer_clear_all, "gst_ring_buffer_clear_all");
-- commit samples
function gst_ring_buffer_commit
(buf : access GstRingBuffer;
sample : GLIB.guint64;
data : access GLIB.guchar;
len : GLIB.guint) return GLIB.guint; -- gst/audio/gstringbuffer.h:438
pragma Import (C, gst_ring_buffer_commit, "gst_ring_buffer_commit");
function gst_ring_buffer_commit_full
(buf : access GstRingBuffer;
sample : access GLIB.guint64;
data : access GLIB.guchar;
in_samples : GLIB.gint;
out_samples : GLIB.gint;
accum : access GLIB.gint) return GLIB.guint; -- gst/audio/gstringbuffer.h:440
pragma Import (C, gst_ring_buffer_commit_full, "gst_ring_buffer_commit_full");
-- read samples
function gst_ring_buffer_read
(buf : access GstRingBuffer;
sample : GLIB.guint64;
data : access GLIB.guchar;
len : GLIB.guint) return GLIB.guint; -- gst/audio/gstringbuffer.h:445
pragma Import (C, gst_ring_buffer_read, "gst_ring_buffer_read");
-- mostly protected
-- GStreamer
-- * Copyright (C) 1999,2000 <NAME> <<EMAIL>>
-- * 2005 <NAME> <<EMAIL>>
-- *
-- * gstringbuffer.h:
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
-- not yet implemented
--gboolean gst_ring_buffer_prepare_write (GstRingBuffer *buf, gint *segment, guint8 **writeptr, gint *len);
--
function gst_ring_buffer_prepare_read
(buf : access GstRingBuffer;
segment : access GLIB.gint;
readptr : System.Address;
len : access GLIB.gint) return GLIB.gboolean; -- gst/audio/gstringbuffer.h:452
pragma Import (C, gst_ring_buffer_prepare_read, "gst_ring_buffer_prepare_read");
procedure gst_ring_buffer_clear (buf : access GstRingBuffer; segment : GLIB.gint); -- gst/audio/gstringbuffer.h:453
pragma Import (C, gst_ring_buffer_clear, "gst_ring_buffer_clear");
procedure gst_ring_buffer_advance (buf : access GstRingBuffer; advance : GLIB.guint); -- gst/audio/gstringbuffer.h:454
pragma Import (C, gst_ring_buffer_advance, "gst_ring_buffer_advance");
procedure gst_ring_buffer_may_start (buf : access GstRingBuffer; allowed : GLIB.gboolean); -- gst/audio/gstringbuffer.h:456
pragma Import (C, gst_ring_buffer_may_start, "gst_ring_buffer_may_start");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_audio_gstringbuffer_h;
|
wof/lcs/enemy/D6.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 244091 | copyright zengfr site:http://github.com/zengfr/romhack
001590 lea ($20,A0), A0
0122B6 move.l (A2)+, (A3)+ [enemy+D0, enemy+D2]
0122B8 move.l (A2)+, (A3)+ [enemy+D4, enemy+D6]
01A75E dbra D4, $1a75c
copyright zengfr site:http://github.com/zengfr/romhack
|
oeis/141/A141897.asm | neoneye/loda-programs | 11 | 162210 | ; A141897: Primes congruent to 19 mod 21.
; Submitted by <NAME>
; 19,61,103,229,271,313,397,439,523,607,691,733,859,1069,1153,1237,1279,1321,1447,1489,1531,1657,1699,1741,1783,1867,1951,1993,2161,2203,2287,2371,2539,2707,2749,2791,2833,2917,3001,3169,3253,3463,3547,3631,3673,3967,4051,4093,4177,4219,4261,4513,4597,4639,4723,4933,5059,5101,5227,5437,5479,5521,5563,5647,5689,5857,6067,6151,6277,6361,6529,6571,6781,6823,6907,6949,6991,7159,7243,7369,7411,7537,7621,7789,7873,8167,8209,8293,8377,8419,8461,8629,8713,8839,8923,9007,9049,9091,9133,9343
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,18
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,24
sub $2,1
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
sub $0,23
|
Ada/inc/Problem_66.ads | Tim-Tom/project-euler | 0 | 12105 | <gh_stars>0
package Problem_66 is
procedure Solve;
end Problem_66;
|
libsrc/graphics/mc1000/clg.asm | jpoikela/z88dk | 640 | 244320 | ;
; MC-1000 graphics library
;
; $Id: clg.asm $
;
;----------- GFX init -------------
SECTION code_clib
PUBLIC clg
PUBLIC _clg
PUBLIC ansi_cls
PUBLIC _ansi_cls
EXTERN generic_console_ioctl
INCLUDE "ioctl.def"
.clg
._clg
.ansi_cls
._ansi_cls
ld hl,1
push hl
ld hl,0
add hl,sp
ex de,hl
ld a,IOCTL_GENCON_SET_MODE
call generic_console_ioctl
pop hl
ret
|
ada/common/ringbuffers.ads | FrankBuss/Ada_Synth | 4 | 26000 | generic
Size : Positive;
type Item is private;
package Ringbuffers is
type Ringbuffer is tagged private;
procedure Write (Self : in out Ringbuffer; e : Item);
function Read (Self : in out Ringbuffer) return Item;
function Is_Empty (Self : Ringbuffer) return Boolean;
private
type Item_Array is array (1 .. Size) of Item;
pragma Volatile (Item_Array);
type Ringbuffer is tagged record
Read_Index : Positive := 1;
Write_Index : Positive := 1;
Items : Item_Array;
end record;
pragma Volatile (Ringbuffer);
end Ringbuffers;
|
grammars/openflowLexer.g4 | Nic30/openflow_analysis | 2 | 610 | /*
* Doc in parser grammar
*/
lexer grammar openflowLexer;
KW_in_port: 'in_port';
KW_dl_vlan: 'dl_vlan';
KW_dl_vlan_pcp: 'dl_vlan_pcp';
KW_dl_src: 'dl_src';
KW_dl_dst: 'dl_dst';
KW_dl_type: 'dl_type';
KW_nw_src: 'nw_src';
KW_nw_dst: 'nw_dst';
KW_nw_proto: 'nw_proto';
KW_ip_proto: 'ip_proto';
KW_nw_tos: 'nw_tos';
KW_ip_dscp: 'ip_dscp';
KW_nw_ecn: 'nw_ecn';
KW_ip_ecn: 'ip_ecn';
KW_nw_ttl: 'nw_ttl';
KW_nw_frag: 'nw_frag';
KW_tcp_src: 'tcp_src';
KW_tcp_dst: 'tcp_dst';
KW_udp_src: 'udp_src';
KW_udp_dst: 'udp_dst';
KW_sctp_src: 'sctp_src';
KW_sctp_dst: 'sctp_dst';
KW_tp_dst: 'tp_dst';
KW_tp_src: 'tp_src';
KW_tcp_flags: 'tcp_flags';
KW_TCP_FLAG_fin: 'fin';
KW_TCP_FLAG_syn: 'syn';
KW_TCP_FLAG_rst: 'rst';
KW_TCP_FLAG_psh: 'psh';
KW_TCP_FLAG_ack: 'ack';
KW_TCP_FLAG_urg: 'urg';
KW_TCP_FLAG_ece: 'ece';
KW_TCP_FLAG_cwr: 'cwr';
KW_TCP_FLAG_ns: 'ns';
KW_icmp_type: 'icmp_type';
KW_icmp_code: 'icmp_code';
KW_table: 'table';
// protocol shorcuts
KW_ip: 'ip';
KW_ipv6: 'ipv6';
KW_icmp: 'icmp';
KW_igmp: 'igmp';
KW_icmp6: 'icmp6';
KW_tcp: 'tcp';
KW_tcp6: 'tcp6';
KW_udp: 'udp';
KW_udp6: 'udp6';
KW_sctp: 'sctp';
KW_sctp6: 'sctp6';
KW_arp: 'arp';
KW_rarp: 'rarp';
KW_mpls: 'mpls';
KW_mplsm: 'mplsm';
KW_ip_frag: 'ip_frag';
// ip frag values
KW_no : 'no';
KW_yes : 'yes';
KW_first : 'first';
KW_later : 'later';
KW_not_later : 'not_later';
KW_eth_type: 'eth_type';
KW_arp_spa: 'arp_spa';
KW_arp_tpa: 'arp_tpa';
KW_arp_sha: 'arp_sha';
KW_arp_tha: 'arp_tha';
KW_arp_op: 'arp_op';
KW_ipv6_src: 'ipv6_src';
KW_ipv6_dst: 'ipv6_dst';
KW_ipv6_label: 'ipv6_label';
KW_nd_target: 'nd_target';
KW_nd_sll: 'nd_sll';
KW_nd_tll: 'nd_tll';
KW_mpls_bos: 'mpls_bos';
KW_mpls_label: 'mpls_label';
KW_mpls_tc: 'mpls_tc';
KW_tun_id : 'tun_id';
KW_tunnel_id: 'tunnel_id';
KW_tun_flags: 'tun_flags';
KW_oam: 'oam';
KW_tun_src: 'tun_src';
KW_tun_dst: 'tun_dst';
KW_tun_gbp_id : 'tun_gbp_id';
KW_tun_gbp_flags: 'tun_gbp_flags';
TUN_METADATA: 'tun_metadata' DEC_NUM;
REG_ID: 'reg' DEC_NUM;
XREG_ID: 'xreg' DEC_NUM;
KW_pkt_mark: 'pkt_mark';
KW_actset_output: 'actset_output';
KW_conj_id: 'conj_id';
KW_ct_state: 'ct_state';
// ct states
KW_new: 'new';
KW_est: 'est';
KW_rel: 'rel';
KW_rpl: 'rpl';
KW_inv: 'inv';
KW_trk: 'trk';
KW_ct_zone: 'ct_zone';
KW_ct_mark : 'ct_mark';
KW_ct_label: 'ct_label';
KW_actions: 'actions';
KW_clone: 'clone';
KW_ct_clear: 'ct_clear';
KW_output: 'output';
KW_flood: 'flood';
KW_all : 'all';
KW_local: 'local';
// KW_in_port
KW_controller: 'controller';
KW_pause: 'pause';
KW_id: 'id';
KW_max_len: 'max_len';
KW_reason: 'reason';
// controller reason values
KW_action: 'action';
KW_default: 'default';
KW_no_match: 'no_match';
KW_invalid_ttl: 'invalid_ttl';
KW_enqueue: 'enqueue';
KW_drop: 'drop';
KW_mod_vlan_vid: 'mod_vlan_vid';
KW_mod_vlan_pcp: 'mod_vlan_pcp';
KW_strip_vlan: 'strip_vlan';
KW_push_vlan: 'push_vlan';
KW_push_mpls: 'push_mpls';
KW_pop_mpls: 'pop_mpls';
KW_mod_dl_src: 'mod_dl_src';
KW_mod_dl_dst: 'mod_dl_dst';
KW_mod_nw_src: 'mod_nw_src';
KW_mod_nw_dst: 'mod_nw_dst';
KW_mod_tp_src: 'mod_tp_src';
KW_mod_tp_dst: 'mod_tp_dst';
KW_mod_nw_tos: 'mod_nw_tos';
KW_mod_nw_ecn: 'mod_nw_ecn';
KW_mod_nw_ttl: 'mod_nw_ttl';
KW_resubmit: 'resubmit';
KW_set_tunnel: 'set_tunnel';
KW_set_tunnel64: 'set_tunnel64';
KW_set_queue: 'set_queue';
KW_pop_queue: 'pop_queue';
KW_delete_field: 'delete_field';
KW_ct: 'ct';
// ct arguments
KW_commit: 'commit';
KW_force: 'force';
// KW_table
KW_zone: 'zone';
KW_exec: 'exec';
// exec actions
KW_set_field: 'set_field';
KW_alg: 'alg';
// alg values
KW_ftp: 'ftp';
KW_tftp: 'tftp';
KW_dec_ttl: 'dec_ttl';
KW_set_mpls_label: 'set_mpls_label';
KW_set_mpls_tc: 'set_mpls_tc';
KW_set_mpls_ttl: 'set_mpls_ttl';
KW_dec_mpls_ttl: 'dec_mpls_ttl';
KW_note: 'note';
KW_move: 'move';
// KW_set_field
KW_load: 'load';
KW_push: 'push';
KW_pop: 'pop';
KW_multipath: 'multipath';
// [todo]
KW_bundle: 'bundle';
// [todo]
KW_bundle_load: 'bundle_load';
KW_learn: 'learn';
KW_fin_idle_timeout: 'fin_idle_timeout';
KW_fin_hard_timeout: 'fin_hard_timeout';
KW_delete_learned: 'delete_learned';
KW_write_metadata: 'write_metadata';
KW_meter: 'meter';
KW_meter_id: 'meter_id';
KW_goto_table: 'goto_table';
KW_fin_timeout: 'fin_timeout';
KW_sample: 'sample';
KW_exit: 'exit';
KW_conjunction: 'conjunction';
KW_cookie: 'cookie';
KW_priority: 'priority';
KW_clear_actions: 'clear_actions';
KW_write_actions: 'write_actions';
KW_idle_timeout: 'idle_timeout';
KW_hard_timeout: 'hard_timeout';
KW_importance: 'importance';
KW_send_flow_rem: 'send_flow_rem';
KW_check_overlap: 'check_overlap';
KW_out_port: 'out_port';
KW_out_group: 'out_group';
KW_duration: 'duration';
KW_n_packets: 'n_packets';
KW_n_bytes: 'n_bytes';
KW_hard_age: 'hard_age';
KW_idle_age: 'idle_age';
// bundle fiedls
KW_eth_src: 'eth_src';
//KW_nw_src
//KW_nw_dst
KW_symmetric_l4 : 'symmetric_l4';
KW_symmetric_l3l4: 'symmetric_l3l4';
KW_symmetric_l3l4_udp: 'symmetric_l3l4+udp';
// bundle algorithm
KW_active_backup: 'active_backup';
KW_hrw: 'hrw';
KW_slaves: 'slaves';
KW_ANY: 'ANY';
// bundle slave_type
KW_ofport: 'ofport';
KW_nat: 'nat';
KW_normal: 'NORMAL';
KW_group: 'group';
KW_vlan_tci: 'vlan_tci';
KW_metadata: 'metadata';
KW_userdata: 'userdata';
NXM_ID: 'NXM_' [a-zA-Z_0-9]+;
OXM_OF_METADATA: 'OXM_OF_METADATA';
// [0] added because of rulesets from 2015
KW_CONTROLLER: 'CONTROLLER';
//STRING_LITERAL:
// DBLQUOTE ( ANY_STR_CHARACTERS )* DBLQUOTE;
fragment COLON_SEPARATED_HEX_PART:
(HEX_NUM COLON ( HEX_NUM )? ( COLON ( HEX_NUM )? )+ ( HEX_NUM )?)
| COLON COLON BYTE_STRING // ipv4
| COLON (COLON)+
;
COLON_SEPARATED_HEX_ADDR: COLON_SEPARATED_HEX_PART
('/' (DEC_NUM | COLON_SEPARATED_HEX_PART | '0' 'x' HEX_NUM) )?
;
PLUS: '+';
MINUS: '-';
DEC_NUM: [0-9]+;
HEX_NUM: [0-9a-fA-F]+;
TIME_NUM: DEC_NUM ('.' DEC_NUM)? 's';
BASED_HEX_NUM: '0' ('x' HEX_NUM)? ('/' '0' ('x' HEX_NUM) ?)?;
DEC_NUM_SLASH_DEC_NUM: DEC_NUM '/' DEC_NUM;
BYTE_STRING: HEX_NUM ('.' HEX_NUM)+ ('/' DEC_NUM )?;
LPAREN: '(';
RPAREN: ')';
LSQUARE_BR: '[';
RSQUARE_BR: ']';
COMMA: ',';
EQ: '=';
COLON: ':';
DDOT: '..';
ARROW_RIGHT: '->';
WHITE_SPACE: [ \t\r]+ -> skip;
NL: '\n';
// fallback for parser performance reasons
UNKNOWN_ID: [a-zA-Z_][a-zA-Z_0-9]*;
ERROR_CHAR: .; |
Transynther/x86/_processed/AVXALIGN/_un_/i3-7100_9_0x84_notsx.log_54_1686.asm | ljhsiun2/medusa | 9 | 83698 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r8
push %r9
push %rax
push %rbp
push %rbx
push %rsi
lea addresses_WC_ht+0x1aae, %rax
nop
nop
sub $37659, %r9
mov (%rax), %rbx
nop
nop
nop
nop
nop
dec %r10
lea addresses_normal_ht+0x4dda, %r8
nop
nop
and %rbp, %rbp
movb (%r8), %r9b
nop
nop
nop
nop
nop
cmp $62308, %r8
lea addresses_WT_ht+0x171ae, %rax
nop
nop
nop
sub %r9, %r9
and $0xffffffffffffffc0, %rax
movntdqa (%rax), %xmm6
vpextrq $0, %xmm6, %r8
nop
nop
and %r9, %r9
pop %rsi
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r9
push %rcx
push %rdx
// Faulty Load
lea addresses_A+0x9eee, %rcx
nop
nop
nop
nop
nop
sub $54391, %r15
vmovntdqa (%rcx), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %r9
lea oracles, %r15
and $0xff, %r9
shlq $12, %r9
mov (%r15,%r9,1), %r9
pop %rdx
pop %rcx
pop %r9
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': True, 'size': 16, 'congruent': 6, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'60': 20, '93': 34}
93 60 60 93 93 93 93 93 60 93 93 93 60 93 60 60 93 60 93 60 93 60 93 60 93 60 93 93 93 93 60 60 93 93 60 60 60 93 93 93 93 60 93 60 93 93 93 60 93 60 93 93 93 93
*/
|
programs/oeis/180/A180201.asm | neoneye/loda | 22 | 179504 | ; A180201: Inverse permutation to A180200.
; 0,1,2,3,5,4,6,7,11,10,8,9,13,12,14,15,23,22,20,21,17,16,18,19,27,26,24,25,29,28,30,31,47,46,44,45,41,40,42,43,35,34,32,33,37,36,38,39,55,54,52,53,49,48,50,51,59,58,56,57,61,60,62,63,95,94,92,93,89,88,90,91,83
seq $0,65621 ; Reversing binary representation of n. Converting sum of powers of 2 in binary representation of a(n) to alternating sum gives n.
div $0,2
seq $0,337909 ; Distinct terms of A080079 in the order in which they appear.
sub $0,1
|
Micro_Processor_Lab/10b-HalfRectifiedSineWaveDAC/HalfRectifiedSineWaveDAC.asm | MohithGowdaHR/PES-Engineering-Lab-Programs | 0 | 26406 | <reponame>MohithGowdaHR/PES-Engineering-Lab-Programs<filename>Micro_Processor_Lab/10b-HalfRectifiedSineWaveDAC/HalfRectifiedSineWaveDAC.asm
; Assembly Level Program 10b
; Generate a Half Rectified Sine Wave form using the DAC interface. (The output of the DAC is to be displayed on the CRO).
.model SMALL
.data
PA EQU 0E400h
PB EQU 0E401h
PC EQU 0E402h
CR EQU 0E403h
CW dB 80h
TABLE dB 127, 144, 161, 177, 191, 204, 214, 221, 225, 227, 225, 221, 214, 204, 191, 177, 161, 144, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127
.code
; Initialize Data Segment
MOV AX, @DATA
MOV DS, AX
; Set Control Word Format
MOV DX, CR
MOV AL, CW
OUT DX, AL
Looper:
; Number of Values in TABLE
MOV CX, 37d
; Point SI to the First Position of TABLE
LEA SI, TABLE
MOV DX, PA
Repeater:
; Clear Direction Flag
CLD
; Loads [SI] to AL and Auto-Advances SI
LODSB
; Send AL to DAC Interface
OUT DX, AL
LOOP Repeater
; Wait for User Keyboard Input Interrupt
MOV AH, 01h
INT 16h
JZ Looper
Exit:
; Terminate the Program
MOV AH, 4Ch
INT 16h
END |
r5asm/test/test001.asm | walter-artica/r5asm | 0 | 245411 | <filename>r5asm/test/test001.asm<gh_stars>0
.code
set R1, 0
cmp R1, 0
bz label1
set R1, 1
bt label2
label1:
set R1, 2
label2:
bt label2
nop
nop
nop
|
Traffic_Light.asm | alexowenmeehan/trafficLight | 0 | 94820 | ; WRITTEN BY <NAME> (ID: 1434732) AND <NAME> (ID: 1526813)
; DATE 25/02/2016
; FILE SAVED AS LAB3.ASM
; DEVICE PIC16F84
; OSCILLATOR XT (4MHZ)
; WATCHDOG DISABLED
; CODE PROTECT OFF
; FUNCTION MAKES A TRAFFIC LIGHT SEQUENCE, STAYS ON GREEN AND THEN GOES THROUGH RED AND AMBER SEQUENCE WITH BUTTON PRESS INTERRUPT
; ----------------------- I/O EQUATES ------------------------------------------------------------------------------------------
PORTA EQU 0x05 ;ASSIGN THE PORTA REGISTER TO THE LABEL 'PORTA'
PORTB EQU 0x06 ;ASSIGN THE PORTB REGISTER TO THE LABEL 'PORTB'
; ----------------------- REGISTER EQUATES -------------------------------------------------------------------------------------
PC EQU 0X02 ;ASSIGN THE PROGRAM COUNTER REGISTER TO THE LABEL 'PC'
STATUS EQU 0X03 ;ASSIGN THE STATUS REGISTER TO THE LABEL 'STATUS'
TRISB EQU 0X06 ;ASSIGN THE TRIS REGISTER FOR PORT B IN THE SECOND MEMORY BANK TO THE LABEL 'TRIS B'
INTCON EQU 0X0B ;ASSIGN THE INTERRUPT CONTROL REGISTER TO THE LABEL 'INTCON'
TEMP_W EQU 0X0F ;ASSIGN THE REGISTER USED TO STORE WORKING REGISTER CONTENTS DURING INTERRUPT TO THE LABEL 'TEMP_W'
; ----------------------- GENERAL EQUATES --------------------------------------------------------------------------------------
GIE EQU 7 ;ASSIGN THE GENERAL INTERRUPT ENABLE TO THE NUMBER 7
RP0 EQU 5 ;ASSIGN THE RP0 BANK SWITCHING PIN TO THE NUMBER 5
INTE EQU 4 ;ASSIGN THE RB0 INTERRUPT ENABLE TO THE NUMBER 4
INTF EQU 1 ;ASSIGN THE RBO INTERRUPT FLAG TO THE NUMBER 1
; ----------------------- MAIN PROGRAM ---------------------------------------------------------------------------------------------
ORG 0x00 ;'ORG' SPECIFIES THE MEMORY LOCATION OF THE PROGRAM
MOVLW 0x00 ;MOVE THE VALUE 00, I.E., ALL 0'S TO W
GOTO START
;
ORG 0X04 ;SPECIFIES THE LOCATION OF THE INTERRPUT SCRIPT
GOTO INT_SER ;FUNCTION FOR WHEN PEDESTRIAN PUSHES BUTTON
INT_SER MOVWF TEMP_W ;MAKES A COPY AND SAVES THE CURRENT WORKING REGISTER VALUE
BCF PORTB, 3
MOVLW 0X02
CALL LED_TABLE ;MAKE THE LIGHTS AMBER WITH A RED PEDESTRIAN LIGHT
CALL DELAY ;PAUSES FOR ANOTHER TWO SECONDS BEFORE CHANGING LIGHTS TO GREEN
BCF PORTB,4
BCF PORTB,2 ;TURNS OFF THE AMBER TRAFFIC LIGHT AND RED PEDESTRIAN LIGHT
BSF PORTB,5
MOVLW 0X00 ;VALUE TO FIND THE DEFAULT CONDITION FOR THE TRAFFIC LIGHT IN THE LOOKUP TABLE
CALL LED_TABLE ;TURNS ON THE GREEN PEDESTRIAN LIGHT AND RED TRAFFIC LIGHT
CALL DELAY_2 ;PAUSES FOR A FURTHER 10 SECONDS FOR PEDESTRIANS TO CROSS
BCF PORTB,5
BSF PORTB, 4
CALL FLASH ;FLASHES THE AMBER LIGHT FOR A SHORT TIME
BCF PORTB,1
BCF PORTB, 2
MOVLW 0X04 ;VALUE TO FIND THE DEFAULT CONDITION FOR THE TRAFFIC LIGHT IN THE LOOKUP TABLE
CALL LED_TABLE ;FIND THE APPROPRIATE VALUE ON THE LOOKUP TABLE FOR THE GREEN LIGHT WITH RED PEDESTRIAN
MOVF TEMP_W, W ;RETURN THE PREVIOUS WORKING VALUE BEFORE THE INTERRUPT TO THE WORKING REGISTER
BCF INTCON,INTF ;RE-ENABLE THE INTERRUPTS BY CLEARING THE RB0 INTERRUPT FLAG
RETFIE ;RETURN TO THE MAIN LOOP
START BSF STATUS, RP0 ;SWITCH CURRENT BANK TO BANK 1
MOVLW OXO1 ;MOVE VALUE (0000 0001) INTO THE WORKING REGISTER
MOVWF TRISB ;PUSH 0X01 TO TRIS B REGISTER MAKES ALL PORTB LINES OUTPUTS, ASIDE FROM RB0, WHICH BECOMES INPUT.
BCF STATUS, RP0 ;SWITCHES CURRENT BANK TO BANK 0
BSF INTCON,GIE ;ENABLES GENERAL INTERRUPTS
BSF INTCON,INTE ;ENABLES INTERRUPTS ON PIN RB0
;
LOOP BSF PORTB,4
MOVLW 0X04 ;VALUE TO FIND THE DEFAULT CONDITION FOR THE TRAFFIC LIGHT IN THE LOOKUP TABLE
CALL LED_TABLE ;FIND THE APPROPRIATE VALUE ON THE LOOKUP TABLE FOR THE GREEN LIGHT WITH RED PEDESTRIAN
GOTO LOOP ;RETURN TO THE BEGINNING OF THE LOOP
;
LED_TABLE ADDWF PC,F ;ADD OFFSET TO PROGRAM COUNTER
BSF PORTB,1 ;VALUE FOR RED WITH RED PEDESTRIAN LIGHT
RETURN
BSF PORTB,2 ;VALUE FOR AMBER WITH RED PEDESTRIAN LIGHT
RETURN
BSF PORTB,3 ;VALUE FOR GREEN WITH RED PEDESTRIAN LIGHT (DEFAULT CONDITION)
RETURN
;
DELAY MOVLW 0x0C ;MOVE THE VALUE '12' TO THE WORKING REGISTER
MOVWF 0x0E ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0E
GET_N2 MOVLW 0XFF ;MOVE THE VALUE '255' TO THE WORKING REGISTER
MOVWF 0X0C ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0C
GET_N MOVLW 0xFF ;MOVE THE VALUE '255' TO THE WORKING REGISTER
MOVWF 0x0D ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0C1
DEC_N DECFSZ 0x0D, F ;DECREASE VALUE IN 0X0D, SKIP NEXT INSTRUCTION IF FILE CONTENTS ARE ZERO
GOTO DEC_N ;RETURN TO DECREASE N LABEL IF 0X0D IS NOT ZERO
DECFSZ 0x0C, F ;DECREASE VALUE IN 0X0C, SKIP NEXT INSTRUCTION IF FILE CONTENTS ARE ZERO
GOTO GET_N ;RETURN TO DECREASE N LABEL IF 0X0D IS NOT ZERO
DECFSZ 0X0E
GOTO GET_N2
RETURN ;RETURN TO MAIN FUNCTION
DELAY_2 MOVLW 0x1F ;MOVE THE VALUE '12' TO THE WORKING REGISTER
MOVWF 0x0E ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0E
GET_N4 MOVLW 0XFF ;MOVE THE VALUE '255' TO THE WORKING REGISTER
MOVWF 0X0C ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0C
GET_N3 MOVLW 0xFF ;MOVE THE VALUE '255' TO THE WORKING REGISTER
MOVWF 0x0D ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0C1
DEC_N3 DECFSZ 0x0D, F ;DECREASE VALUE IN 0X0D, SKIP NEXT INSTRUCTION IF FILE CONTENTS ARE ZERO
GOTO DEC_N3 ;RETURN TO DECREASE N LABEL IF 0X0D IS NOT ZERO
DECFSZ 0x0C, F ;DECREASE VALUE IN 0X0C, SKIP NEXT INSTRUCTION IF FILE CONTENTS ARE ZERO
GOTO GET_N3 ;RETURN TO DECREASE N LABEL IF 0X0D IS NOT ZERO
DECFSZ 0X0E
GOTO GET_N4
RETURN ;RETURN TO MAIN FUNCTION
;
FLASH MOVLW 0x06 ;MOVE THE VALUE '6' TO THE WORKING REGISTER
MOVWF 0x0E ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0E
GET_NUM2 MOVLW 0XAF ;MOVE THE VALUE '175' TO THE WORKING REGISTER
MOVWF 0X0C ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0C
MOVLW 0X04
XORWF PORTB,F
GET_NUM MOVLW 0xFF ;MOVE THE VALUE '255' TO THE WORKING REGISTER
MOVWF 0x0D ;MOVE THE WORKING REGISTER CONTENTS TO FILE REGISTER 0X0C1
DEC_NUM DECFSZ 0x0D, F ;DECREASE VALUE IN 0X0D, SKIP NEXT INSTRUCTION IF FILE CONTENTS ARE ZERO
GOTO DEC_NUM ;RETURN TO DECREASE N LABEL IF 0X0D IS NOT ZERO
DECFSZ 0x0C, F ;DECREASE VALUE IN 0X0C, SKIP NEXT INSTRUCTION IF FILE CONTENTS ARE ZERO
GOTO GET_NUM ;RETURN TO DECREASE N LABEL IF 0X0D IS NOT ZERO
DECFSZ 0X0E
GOTO GET_NUM2
RETURN ;RETURN TO MAIN FUNCTION
;
END |
programs/oeis/198/A198690.asm | karttu/loda | 1 | 7202 | ; A198690: 9*7^n-1.
; 8,62,440,3086,21608,151262,1058840,7411886,51883208,363182462,2542277240,17795940686,124571584808,872001093662,6104007655640,42728053589486,299096375126408,2093674625884862,14655722381194040
mov $1,7
pow $1,$0
mul $1,2
add $1,7
mul $1,9
sub $1,81
div $1,4
mul $1,2
add $1,8
|
project 08/FunctionCalls/StaticsTest/StaticsTest.asm | jack-zheng/nand2tetris | 0 | 101502 | <reponame>jack-zheng/nand2tetris
// sys init
@256
D=A
@SP
M=D
// call Sys.init 0
@RETURN_ADDR_0
D=A
@SP
A=M
M=D
@SP
M=M+1
@LCL
D=M
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
@SP
A=M
M=D
@SP
M=M+1
@THIS
D=M
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
D=M
@0
D=D-A
@5
D=D-A
@ARG
M=D
@SP
D=M
@LCL
M=D
@Sys.init
0,JMP
(RETURN_ADDR_0)
// function Class1.set
(Class1.set)
// push argument 0
@0
D=A
@ARG
A=D+M
D=M
@SP
A=M
M=D
@SP
M=M+1
// pop static 0
@SP
AM=M-1
D=M
@Class1.0
M=D
// push argument 1
@1
D=A
@ARG
A=D+M
D=M
@SP
A=M
M=D
@SP
M=M+1
// pop static 1
@SP
AM=M-1
D=M
@Class1.1
M=D
// push constant 0
@0
D=A
@SP
A=M
M=D
@SP
M=M+1
// return
// FRAME = LCL
@LCL
D=M
@FRAME
M=D
// RET = *(FRAME - 5)
@5
A=D-A
D=M
@RET
M=D
// *ARG = pop()
@SP
A=M-1
D=M
@ARG
A=M
M=D
// SP = ARG + 1
@ARG
D=M+1
@SP
M=D
// THAT = *(FRAME - 1)
@1
D=A
@FRAME
A=M-D
D=M
@THAT
M=D
// THAT = *(FRAME - 2)
@2
D=A
@FRAME
A=M-D
D=M
@THIS
M=D
// THAT = *(FRAME - 3)
@3
D=A
@FRAME
A=M-D
D=M
@ARG
M=D
// THAT = *(FRAME - 4)
@4
D=A
@FRAME
A=M-D
D=M
@LCL
M=D
@RET
A=M
0,JMP
// function Class1.get
(Class1.get)
// push static 0
@Class1.0
D=M
@SP
A=M
M=D
@SP
M=M+1
// push static 1
@Class1.1
D=M
@SP
A=M
M=D
@SP
M=M+1
// sub
@SP
AM=M-1
D=M
A=A-1
M=M-D
// return
// FRAME = LCL
@LCL
D=M
@FRAME
M=D
// RET = *(FRAME - 5)
@5
A=D-A
D=M
@RET
M=D
// *ARG = pop()
@SP
A=M-1
D=M
@ARG
A=M
M=D
// SP = ARG + 1
@ARG
D=M+1
@SP
M=D
// THAT = *(FRAME - 1)
@1
D=A
@FRAME
A=M-D
D=M
@THAT
M=D
// THAT = *(FRAME - 2)
@2
D=A
@FRAME
A=M-D
D=M
@THIS
M=D
// THAT = *(FRAME - 3)
@3
D=A
@FRAME
A=M-D
D=M
@ARG
M=D
// THAT = *(FRAME - 4)
@4
D=A
@FRAME
A=M-D
D=M
@LCL
M=D
@RET
A=M
0,JMP
// function Sys.init
(Sys.init)
// push constant 6
@6
D=A
@SP
A=M
M=D
@SP
M=M+1
// push constant 8
@8
D=A
@SP
A=M
M=D
@SP
M=M+1
// call Class1.set 2
@RETURN_ADDR_1
D=A
@SP
A=M
M=D
@SP
M=M+1
@LCL
D=M
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
@SP
A=M
M=D
@SP
M=M+1
@THIS
D=M
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
D=M
@2
D=D-A
@5
D=D-A
@ARG
M=D
@SP
D=M
@LCL
M=D
@Class1.set
0,JMP
(RETURN_ADDR_1)
// pop temp 0
@5
D=A
@0
D=D+A
@R13
M=D
@SP
AM=M-1
D=M
@R13
A=M
M=D
// push constant 23
@23
D=A
@SP
A=M
M=D
@SP
M=M+1
// push constant 15
@15
D=A
@SP
A=M
M=D
@SP
M=M+1
// call Class2.set 2
@RETURN_ADDR_2
D=A
@SP
A=M
M=D
@SP
M=M+1
@LCL
D=M
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
@SP
A=M
M=D
@SP
M=M+1
@THIS
D=M
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
D=M
@2
D=D-A
@5
D=D-A
@ARG
M=D
@SP
D=M
@LCL
M=D
@Class2.set
0,JMP
(RETURN_ADDR_2)
// pop temp 0
@5
D=A
@0
D=D+A
@R13
M=D
@SP
AM=M-1
D=M
@R13
A=M
M=D
// call Class1.get 0
@RETURN_ADDR_3
D=A
@SP
A=M
M=D
@SP
M=M+1
@LCL
D=M
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
@SP
A=M
M=D
@SP
M=M+1
@THIS
D=M
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
D=M
@0
D=D-A
@5
D=D-A
@ARG
M=D
@SP
D=M
@LCL
M=D
@Class1.get
0,JMP
(RETURN_ADDR_3)
// call Class2.get 0
@RETURN_ADDR_4
D=A
@SP
A=M
M=D
@SP
M=M+1
@LCL
D=M
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
@SP
A=M
M=D
@SP
M=M+1
@THIS
D=M
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
D=M
@0
D=D-A
@5
D=D-A
@ARG
M=D
@SP
D=M
@LCL
M=D
@Class2.get
0,JMP
(RETURN_ADDR_4)
// label WHILE
(Sys.init$WHILE)
// goto WHILE
@Sys.init$WHILE
0,JMP
// function Class2.set
(Class2.set)
// push argument 0
@0
D=A
@ARG
A=D+M
D=M
@SP
A=M
M=D
@SP
M=M+1
// pop static 0
@SP
AM=M-1
D=M
@Class2.0
M=D
// push argument 1
@1
D=A
@ARG
A=D+M
D=M
@SP
A=M
M=D
@SP
M=M+1
// pop static 1
@SP
AM=M-1
D=M
@Class2.1
M=D
// push constant 0
@0
D=A
@SP
A=M
M=D
@SP
M=M+1
// return
// FRAME = LCL
@LCL
D=M
@FRAME
M=D
// RET = *(FRAME - 5)
@5
A=D-A
D=M
@RET
M=D
// *ARG = pop()
@SP
A=M-1
D=M
@ARG
A=M
M=D
// SP = ARG + 1
@ARG
D=M+1
@SP
M=D
// THAT = *(FRAME - 1)
@1
D=A
@FRAME
A=M-D
D=M
@THAT
M=D
// THAT = *(FRAME - 2)
@2
D=A
@FRAME
A=M-D
D=M
@THIS
M=D
// THAT = *(FRAME - 3)
@3
D=A
@FRAME
A=M-D
D=M
@ARG
M=D
// THAT = *(FRAME - 4)
@4
D=A
@FRAME
A=M-D
D=M
@LCL
M=D
@RET
A=M
0,JMP
// function Class2.get
(Class2.get)
// push static 0
@Class2.0
D=M
@SP
A=M
M=D
@SP
M=M+1
// push static 1
@Class2.1
D=M
@SP
A=M
M=D
@SP
M=M+1
// sub
@SP
AM=M-1
D=M
A=A-1
M=M-D
// return
// FRAME = LCL
@LCL
D=M
@FRAME
M=D
// RET = *(FRAME - 5)
@5
A=D-A
D=M
@RET
M=D
// *ARG = pop()
@SP
A=M-1
D=M
@ARG
A=M
M=D
// SP = ARG + 1
@ARG
D=M+1
@SP
M=D
// THAT = *(FRAME - 1)
@1
D=A
@FRAME
A=M-D
D=M
@THAT
M=D
// THAT = *(FRAME - 2)
@2
D=A
@FRAME
A=M-D
D=M
@THIS
M=D
// THAT = *(FRAME - 3)
@3
D=A
@FRAME
A=M-D
D=M
@ARG
M=D
// THAT = *(FRAME - 4)
@4
D=A
@FRAME
A=M-D
D=M
@LCL
M=D
@RET
A=M
0,JMP
|
alloy4fun_models/trashltl/models/18/YZcNgLEDt3W4QvHvA.als | Kaixi26/org.alloytools.alloy | 0 | 3460 | <gh_stars>0
open main
pred idYZcNgLEDt3W4QvHvA_prop19 {
eventually (all f : Protected | f in Trash implies historically f in Protected)
}
pred __repair { idYZcNgLEDt3W4QvHvA_prop19 }
check __repair { idYZcNgLEDt3W4QvHvA_prop19 <=> prop19o } |
oeis/053/A053220.asm | neoneye/loda-programs | 11 | 28946 | <reponame>neoneye/loda-programs
; A053220: a(n) = (3*n-1) * 2^(n-2).
; 1,5,16,44,112,272,640,1472,3328,7424,16384,35840,77824,167936,360448,770048,1638400,3473408,7340032,15466496,32505856,68157440,142606336,297795584,620756992,1291845632,2684354560,5570035712,11542724608,23890755584,49392123904,102005473280,210453397504,433791696896,893353197568,1838246002688,3779571220480,7765300871168,15942918602752,32710470926336,67070209294336,137438953472000,281474976710656,576144092954624,1178676464975872,2410129488084992,4925812092436480,10062730417405952,20547673299877888
mov $1,$0
mul $0,3
add $0,2
mov $2,2
pow $2,$1
mul $0,$2
div $0,2
|
tools-src/gnu/gcc/gcc/ada/a-strunb.ads | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 23589 | <gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . U N B O U N D E D --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-1998 Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Maps;
with Ada.Finalization;
package Ada.Strings.Unbounded is
pragma Preelaborate (Unbounded);
type Unbounded_String is private;
Null_Unbounded_String : constant Unbounded_String;
function Length (Source : Unbounded_String) return Natural;
type String_Access is access all String;
procedure Free (X : in out String_Access);
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function To_Unbounded_String (Source : String) return Unbounded_String;
function To_Unbounded_String (Length : in Natural) return Unbounded_String;
function To_String (Source : Unbounded_String) return String;
procedure Append
(Source : in out Unbounded_String;
New_Item : in Unbounded_String);
procedure Append
(Source : in out Unbounded_String;
New_Item : in String);
procedure Append
(Source : in out Unbounded_String;
New_Item : in Character);
function "&" (Left, Right : Unbounded_String) return Unbounded_String;
function "&"
(Left : in Unbounded_String;
Right : in String)
return Unbounded_String;
function "&"
(Left : in String;
Right : in Unbounded_String)
return Unbounded_String;
function "&"
(Left : in Unbounded_String;
Right : in Character)
return Unbounded_String;
function "&"
(Left : in Character;
Right : in Unbounded_String)
return Unbounded_String;
function Element
(Source : in Unbounded_String;
Index : in Positive)
return Character;
procedure Replace_Element
(Source : in out Unbounded_String;
Index : in Positive;
By : Character);
function Slice
(Source : in Unbounded_String;
Low : in Positive;
High : in Natural)
return String;
function "=" (Left, Right : in Unbounded_String) return Boolean;
function "="
(Left : in Unbounded_String;
Right : in String)
return Boolean;
function "="
(Left : in String;
Right : in Unbounded_String)
return Boolean;
function "<" (Left, Right : in Unbounded_String) return Boolean;
function "<"
(Left : in Unbounded_String;
Right : in String)
return Boolean;
function "<"
(Left : in String;
Right : in Unbounded_String)
return Boolean;
function "<=" (Left, Right : in Unbounded_String) return Boolean;
function "<="
(Left : in Unbounded_String;
Right : in String)
return Boolean;
function "<="
(Left : in String;
Right : in Unbounded_String)
return Boolean;
function ">" (Left, Right : in Unbounded_String) return Boolean;
function ">"
(Left : in Unbounded_String;
Right : in String)
return Boolean;
function ">"
(Left : in String;
Right : in Unbounded_String)
return Boolean;
function ">=" (Left, Right : in Unbounded_String) return Boolean;
function ">="
(Left : in Unbounded_String;
Right : in String)
return Boolean;
function ">="
(Left : in String;
Right : in Unbounded_String)
return Boolean;
------------------------
-- Search Subprograms --
------------------------
function Index
(Source : in Unbounded_String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping := Maps.Identity)
return Natural;
function Index
(Source : in Unbounded_String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping_Function)
return Natural;
function Index
(Source : in Unbounded_String;
Set : in Maps.Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural;
function Index_Non_Blank
(Source : in Unbounded_String;
Going : in Direction := Forward)
return Natural;
function Count
(Source : in Unbounded_String;
Pattern : in String;
Mapping : in Maps.Character_Mapping := Maps.Identity)
return Natural;
function Count
(Source : in Unbounded_String;
Pattern : in String;
Mapping : in Maps.Character_Mapping_Function)
return Natural;
function Count
(Source : in Unbounded_String;
Set : in Maps.Character_Set)
return Natural;
procedure Find_Token
(Source : in Unbounded_String;
Set : in Maps.Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural);
------------------------------------
-- String Translation Subprograms --
------------------------------------
function Translate
(Source : in Unbounded_String;
Mapping : in Maps.Character_Mapping)
return Unbounded_String;
procedure Translate
(Source : in out Unbounded_String;
Mapping : Maps.Character_Mapping);
function Translate
(Source : in Unbounded_String;
Mapping : in Maps.Character_Mapping_Function)
return Unbounded_String;
procedure Translate
(Source : in out Unbounded_String;
Mapping : in Maps.Character_Mapping_Function);
---------------------------------------
-- String Transformation Subprograms --
---------------------------------------
function Replace_Slice
(Source : in Unbounded_String;
Low : in Positive;
High : in Natural;
By : in String)
return Unbounded_String;
procedure Replace_Slice
(Source : in out Unbounded_String;
Low : in Positive;
High : in Natural;
By : in String);
function Insert
(Source : in Unbounded_String;
Before : in Positive;
New_Item : in String)
return Unbounded_String;
procedure Insert
(Source : in out Unbounded_String;
Before : in Positive;
New_Item : in String);
function Overwrite
(Source : in Unbounded_String;
Position : in Positive;
New_Item : in String)
return Unbounded_String;
procedure Overwrite
(Source : in out Unbounded_String;
Position : in Positive;
New_Item : in String);
function Delete
(Source : in Unbounded_String;
From : in Positive;
Through : in Natural)
return Unbounded_String;
procedure Delete
(Source : in out Unbounded_String;
From : in Positive;
Through : in Natural);
function Trim
(Source : in Unbounded_String;
Side : in Trim_End)
return Unbounded_String;
procedure Trim
(Source : in out Unbounded_String;
Side : in Trim_End);
function Trim
(Source : in Unbounded_String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set)
return Unbounded_String;
procedure Trim
(Source : in out Unbounded_String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set);
function Head
(Source : in Unbounded_String;
Count : in Natural;
Pad : in Character := Space)
return Unbounded_String;
procedure Head
(Source : in out Unbounded_String;
Count : in Natural;
Pad : in Character := Space);
function Tail
(Source : in Unbounded_String;
Count : in Natural;
Pad : in Character := Space)
return Unbounded_String;
procedure Tail
(Source : in out Unbounded_String;
Count : in Natural;
Pad : in Character := Space);
function "*"
(Left : in Natural;
Right : in Character)
return Unbounded_String;
function "*"
(Left : in Natural;
Right : in String)
return Unbounded_String;
function "*"
(Left : in Natural;
Right : in Unbounded_String)
return Unbounded_String;
private
pragma Inline (Length);
package AF renames Ada.Finalization;
Null_String : aliased String := "";
function To_Unbounded (S : String) return Unbounded_String
renames To_Unbounded_String;
type Unbounded_String is new AF.Controlled with record
Reference : String_Access := Null_String'Access;
end record;
pragma Stream_Convert (Unbounded_String, To_Unbounded, To_String);
pragma Finalize_Storage_Only (Unbounded_String);
procedure Initialize (Object : in out Unbounded_String);
procedure Adjust (Object : in out Unbounded_String);
procedure Finalize (Object : in out Unbounded_String);
Null_Unbounded_String : constant Unbounded_String :=
(AF.Controlled with Reference => Null_String'Access);
end Ada.Strings.Unbounded;
|
programs/oeis/140/A140659.asm | neoneye/loda | 22 | 13983 | <reponame>neoneye/loda<filename>programs/oeis/140/A140659.asm
; A140659: a(n) = floor(A140657(n+2)/10).
; 0,0,1,2,6,12,25,50,102,204,409,818,1638,3276,6553,13106,26214,52428,104857,209714,419430,838860,1677721,3355442,6710886,13421772,26843545,53687090,107374182,214748364,429496729,858993458,1717986918,3435973836,6871947673,13743895346,27487790694,54975581388,109951162777,219902325554,439804651110,879609302220,1759218604441,3518437208882,7036874417766,14073748835532,28147497671065,56294995342130,112589990684262,225179981368524,450359962737049,900719925474098,1801439850948198,3602879701896396,7205759403792793,14411518807585586,28823037615171174,57646075230342348,115292150460684697,230584300921369394,461168601842738790,922337203685477580,1844674407370955161,3689348814741910322,7378697629483820646,14757395258967641292,29514790517935282585,59029581035870565170,118059162071741130342,236118324143482260684,472236648286964521369,944473296573929042738,1888946593147858085478,3777893186295716170956,7555786372591432341913,15111572745182864683826,30223145490365729367654,60446290980731458735308,120892581961462917470617,241785163922925834941234,483570327845851669882470,967140655691703339764940,1934281311383406679529881,3868562622766813359059762,7737125245533626718119526,15474250491067253436239052,30948500982134506872478105,61897001964269013744956210,123794003928538027489912422,247588007857076054979824844,495176015714152109959649689,990352031428304219919299378,1980704062856608439838598758,3961408125713216879677197516,7922816251426433759354395033,15845632502852867518708790066,31691265005705735037417580134,63382530011411470074835160268,126765060022822940149670320537,253530120045645880299340641074
mov $1,2
pow $1,$0
add $1,4
mul $1,2
div $1,5
sub $1,2
mov $0,$1
|
wof/lcs/123p/61.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 17787 | copyright zengfr site:http://github.com/zengfr/romhack
0017DC rts [123p+ 61, enemy+61]
007E90 blt $7ec4 [123p+ 61, enemy+61]
007E9E move.b D0, ($61,A1)
007EA2 moveq #$3, D0
007F2A move.b D5, ($61,A1)
007F2E move.b D0, ($99,A1)
011C7C move.b D0, ($61,A0)
011C80 moveq #$4, D2
01AA84 tst.b ($78,A0) [123p+ 61]
copyright zengfr site:http://github.com/zengfr/romhack
|
oeis/002/A002675.asm | neoneye/loda-programs | 11 | 102010 | <filename>oeis/002/A002675.asm
; A002675: Numerators of coefficients for central differences M_{4}^(2*n).
; Submitted by <NAME>
; 1,1,1,17,31,1,5461,257,73,1271,60787,241,22369621,617093,49981,16843009,5726623061,7957,91625968981,61681,231927781,50991843607,499069107643,4043309297,1100586419201,5664905191661,1672180312771
mul $0,2
mov $1,$0
add $1,1
seq $1,2678 ; Numerators of the Taylor coefficients of (e^x-1)^2.
mov $0,$1
|
data/maps/headers/Route22.asm | opiter09/ASM-Machina | 1 | 168031 | <reponame>opiter09/ASM-Machina
map_header Route22, ROUTE_22, OVERWORLD, NORTH | EAST
connection north, Route23, ROUTE_23, 0 ; unnecessary
connection east, ViridianCity, VIRIDIAN_CITY, -4
end_map_header
|
oeis/142/A142940.asm | neoneye/loda-programs | 11 | 6736 | <filename>oeis/142/A142940.asm
; A142940: Primes congruent to 35 mod 64.
; Submitted by <NAME>
; 163,227,419,547,739,1123,1187,1571,1699,2083,2339,2467,2531,2659,2851,3299,3491,4003,4259,4451,4643,5347,5923,5987,6563,6691,6883,6947,7331,7459,7523,7907,8291,8419,8803,8867,9059,9187,10211,10531,10723,10979,11171,11299,11491,11939,12323,12451,12899,13219,13411,13859,14051,14243,14563,14627,14947,15139,15331,15907,15971,16547,16931,17123,17443,17827,17891,18211,18787,18979,19427,20323,20707,20771,20899,20963,21283,21347,21859,22051,22307,22691,23011,23203,23459,23971,24419,24547,24611,25763
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,34
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,30
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
add $0,35
|
programs/oeis/097/A097140.asm | jmorken/loda | 1 | 16805 | ; A097140: Interleave n and 1-n.
; 0,1,1,0,2,-1,3,-2,4,-3,5,-4,6,-5,7,-6,8,-7,9,-8,10,-9,11,-10,12,-11,13,-12,14,-13,15,-14,16,-15,17,-16,18,-17,19,-18,20,-19,21,-20,22,-21,23,-22,24,-23,25,-24,26,-25,27,-26,28,-27,29,-28,30,-29,31,-30,32,-31,33,-32,34,-33,35,-34,36,-35,37,-36,38,-37,39,-38,40,-39,41,-40,42,-41,43,-42,44,-43,45,-44,46,-45,47,-46,48,-47,49,-48,50,-49,51,-50,52,-51,53,-52,54,-53,55,-54,56,-55,57,-56,58,-57,59,-58,60,-59,61,-60,62,-61,63,-62,64,-63,65,-64,66,-65,67,-66,68,-67,69,-68,70,-69,71,-70,72,-71,73,-72,74,-73,75,-74,76,-75,77,-76,78,-77,79,-78,80,-79,81,-80,82,-81,83,-82,84,-83,85,-84,86,-85,87,-86,88,-87,89,-88,90,-89,91,-90,92,-91,93,-92,94,-93,95,-94,96,-95,97,-96,98,-97,99,-98,100,-99,101,-100,102,-101,103,-102,104,-103,105,-104,106,-105,107,-106,108,-107,109,-108,110,-109,111,-110,112,-111,113,-112,114,-113,115,-114,116,-115,117,-116,118,-117,119,-118,120,-119,121,-120,122,-121,123,-122,124,-123
mov $2,1
mul $2,$0
div $2,2
lpb $0
sub $0,$2
mul $2,2
lpe
mov $1,$0
|
tests/src/main_offsets.adb | skade/bbqueue-spark | 8 | 7340 | <gh_stars>1-10
with Ada.Text_IO; use Ada.Text_IO;
with System.Storage_Elements; use System.Storage_Elements;
with BBqueue;
with System; use System;
procedure Main_Offsets
with SPARK_Mode
is
use type BBqueue.Result_Kind;
Buffer : Storage_Array (0 .. 34) := (others => 0);
Q : aliased BBqueue.Offsets_Only (Buffer'Length);
procedure Fill (WG : BBqueue.Write_Grant;
Val : Storage_Element)
with Pre => BBqueue.State (WG) = BBqueue.Valid
and then BBqueue.Valid_Slice (Q, BBqueue.Slice (WG));
procedure Print (G : BBqueue.Write_Grant);
procedure Print (G : BBqueue.Read_Grant);
procedure Print_Content (RG : BBqueue.Read_Grant)
with Pre => BBqueue.State (RG) = BBqueue.Valid
and then BBqueue.Valid_Slice (Q, BBqueue.Slice (RG));
procedure Print_Buffer;
----------
-- Fill --
----------
procedure Fill (WG : BBqueue.Write_Grant;
Val : Storage_Element)
is
S : constant BBqueue.Slice_Rec := BBqueue.Slice (WG);
begin
Buffer (Buffer'First + S.From .. Buffer'First + S.To)
:= (others => Val);
end Fill;
-----------
-- Print --
-----------
procedure Print (G : BBqueue.Write_Grant) is
begin
Put ("Write Grant - " & BBqueue.State (G)'Img);
if BBqueue.State (G) = BBqueue.Valid then
Put_Line (" Size:" & BBqueue.Slice (G).Length'Img);
else
New_Line;
end if;
end Print;
-----------
-- Print --
-----------
procedure Print (G : BBqueue.Read_Grant) is
begin
Put ("Read Grant - " & BBqueue.State (G)'Img);
if BBqueue.State (G) = BBqueue.Valid then
Put_Line (" Size:" & BBqueue.Slice (G).Length'Img);
else
New_Line;
end if;
end Print;
-------------------
-- Print_Content --
-------------------
procedure Print_Content (RG : BBqueue.Read_Grant) is
S : constant BBqueue.Slice_Rec := BBqueue.Slice (RG);
begin
Put ("Print" & S.Length'Img & " bytes -> ");
for Elt of Buffer (Buffer'First + S.From .. Buffer'First + S.To) loop
Put (Elt'Img);
end loop;
New_Line;
end Print_Content;
------------------
-- Print_Buffer --
------------------
procedure Print_Buffer is
begin
Put ("Buffer => ");
for Elt of Buffer loop
Put (Elt'Img);
end loop;
New_Line;
end Print_Buffer;
WG : BBqueue.Write_Grant := BBqueue.Empty;
RG : BBqueue.Read_Grant := BBqueue.Empty;
V : Storage_Element := 1;
begin
for X in 1 .. 7 loop
Put_Line ("-- Loop" & X'Img & " --");
Print_Buffer;
BBqueue.Grant (Q, WG, 10);
if BBqueue.State (WG) /= BBqueue.Valid then
exit;
end if;
Put ("BBqueue.Grant (Q, 10) -> ");
Print (WG);
Print_Buffer;
Put_Line ("Fill (WG, " & V'Img & ")");
Fill (WG, V);
V := V + 1;
Print_Buffer;
BBqueue.Commit (Q, WG, 10);
Put ("BBqueue.Commit (WG, 10); ->");
Print (WG);
Print_Buffer;
BBqueue.Read (Q, RG);
if BBqueue.State (RG) /= BBqueue.Valid then
exit;
end if;
Put ("BBqueue.Read (Q); -> ");
Print (RG);
Print_Content (RG);
Print_Buffer;
BBqueue.Release (Q, RG);
Put ("BBqueue.Release (RG); -> ");
Print (RG);
Print_Buffer;
pragma Assert (BBqueue.State (WG) = BBqueue.Empty);
pragma Assert (BBqueue.State (RG) = BBqueue.Empty);
end loop;
end Main_Offsets;
|
test/Succeed/Issue4066.agda | cruhland/agda | 1,989 | 16562 | open import Agda.Builtin.Equality
open import Agda.Primitive
record R a : Set (lsuc a) where
field
P : {A : Set a} → A → A → Set a
r : ∀ ℓ → R ℓ
R.P (r _) = _≡_
postulate
cong : ∀ {a b} {A : Set a} {B : Set b} {x y : A}
(f : A → B) → R.P (r a) x y → R.P (r b) (f x) (f y)
magic : ∀ {a} {A : Set a} {x y : A} (z : A) → y ≡ z → x ≡ z
record Raw-monad {f : Level → Level}
(M : ∀ {ℓ} → Set ℓ → Set (f ℓ)) ℓ₁ ℓ₂ :
Set (f ℓ₁ ⊔ f ℓ₂ ⊔ lsuc (ℓ₁ ⊔ ℓ₂)) where
infixl 5 _>>=_
field
return : {A : Set ℓ₁} → A → M A
_>>=_ : {A : Set ℓ₁} {B : Set ℓ₂} → M A → (A → M B) → M B
module Raw-monad⁺
{f : Level → Level}
{M : ∀ {ℓ} → Set ℓ → Set (f ℓ)}
(m : ∀ {ℓ₁ ℓ₂} → Raw-monad M ℓ₁ ℓ₂)
where
private
module M′ {ℓ₁ ℓ₂} = Raw-monad (m {ℓ₁ = ℓ₁} {ℓ₂ = ℓ₂})
open M′ public using (_>>=_)
return : ∀ {a} {A : Set a} → A → M A
return = M′.return {ℓ₂ = lzero}
open Raw-monad⁺ ⦃ … ⦄ public
record Monad⁻ {f : Level → Level}
(M : ∀ {ℓ} → Set ℓ → Set (f ℓ))
⦃ raw-monad : ∀ {ℓ₁ ℓ₂} → Raw-monad M ℓ₁ ℓ₂ ⦄
ℓ₁ ℓ₂ ℓ₃ :
Set (f ℓ₁ ⊔ f ℓ₂ ⊔ f ℓ₃ ⊔ lsuc (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where
field
associativity :
{A : Set ℓ₁} {B : Set ℓ₂} {C : Set ℓ₃} →
(x : M A) (f : A → M B) (g : B → M C) →
x >>= (λ x → f x >>= g) ≡ x >>= f >>= g
module Monad⁻⁺
{f : Level → Level}
{M : ∀ {ℓ} → Set ℓ → Set (f ℓ)}
⦃ raw-monad : ∀ {ℓ₁ ℓ₂} → Raw-monad M ℓ₁ ℓ₂ ⦄
(m : ∀ {ℓ₁ ℓ₂ ℓ₃} → Monad⁻ M ℓ₁ ℓ₂ ℓ₃)
where
private
module M′ {ℓ₁ ℓ₂ ℓ₃} = Monad⁻ (m {ℓ₁ = ℓ₁} {ℓ₂ = ℓ₂} {ℓ₃ = ℓ₃})
open M′ public
open Monad⁻⁺ ⦃ … ⦄ public
data Maybe {a} (A : Set a) : Set a where
nothing : Maybe A
just : A → Maybe A
postulate
maybe : ∀ {a b} {A : Set a} {B : Maybe A → Set b} →
((x : A) → B (just x)) → B nothing → (x : Maybe A) → B x
record MaybeT {ℓ}
(f : Level → Level)
(M : Set ℓ → Set (f ℓ))
(A : Set ℓ) : Set (f ℓ) where
constructor wrap
field
run : M (Maybe A)
open MaybeT
instance
transformʳ :
∀ {ℓ₁ ℓ₂}
{f : Level → Level}
{M : ∀ {ℓ} → Set ℓ → Set (f ℓ)} →
⦃ raw-monad : ∀ {ℓ₁ ℓ₂} → Raw-monad M ℓ₁ ℓ₂ ⦄ →
Raw-monad (MaybeT f M) ℓ₁ ℓ₂
run (Raw-monad.return transformʳ x) = return (just x)
run (Raw-monad._>>=_ transformʳ x f) =
run x >>= maybe (λ x → run (f x)) (return nothing)
transformᵐ :
{f : Level → Level}
{M : ∀ {ℓ} → Set ℓ → Set (f ℓ)}
⦃ raw-monad : ∀ {ℓ₁ ℓ₂} → Raw-monad M ℓ₁ ℓ₂ ⦄
⦃ monad : ∀ {ℓ₁ ℓ₂ ℓ₃} → Monad⁻ M ℓ₁ ℓ₂ ℓ₃ ⦄ →
Monad⁻ (MaybeT f M) lzero lzero lzero
Monad⁻.associativity transformᵐ x f g = cong wrap (
magic ((run x >>= maybe (λ x → run (f x)) (return nothing)) >>=
maybe (λ x → run (g x)) (return nothing))
(associativity _ _ _))
-- WAS: rejected in 2.6.0 with
-- No instance of type Raw-monad _M_345 ℓ₁ ℓ₂ was found in scope.
-- Should succeed.
|
stressfs.asm | willh99/MSBOSS-proj | 0 | 94876 |
_stressfs: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "user.h"
#include "fs.h"
#include "fcntl.h"
int main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 81 ec 24 02 00 00 sub $0x224,%esp
int fd, i;
char path[] = "stressfs0";
14: c7 45 e6 73 74 72 65 movl $0x65727473,-0x1a(%ebp)
1b: c7 45 ea 73 73 66 73 movl $0x73667373,-0x16(%ebp)
22: 66 c7 45 ee 30 00 movw $0x30,-0x12(%ebp)
char data[512];
printf(1, "stressfs starting\n");
28: 83 ec 08 sub $0x8,%esp
2b: 68 1e 09 00 00 push $0x91e
30: 6a 01 push $0x1
32: e8 31 05 00 00 call 568 <printf>
37: 83 c4 10 add $0x10,%esp
memset(data, 'a', sizeof(data));
3a: 83 ec 04 sub $0x4,%esp
3d: 68 00 02 00 00 push $0x200
42: 6a 61 push $0x61
44: 8d 85 e6 fd ff ff lea -0x21a(%ebp),%eax
4a: 50 push %eax
4b: e8 be 01 00 00 call 20e <memset>
50: 83 c4 10 add $0x10,%esp
for (i = 0; i < 4; i++)
53: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
5a: eb 0d jmp 69 <main+0x69>
if (fork() > 0)
5c: e8 40 03 00 00 call 3a1 <fork>
61: 85 c0 test %eax,%eax
63: 7f 0c jg 71 <main+0x71>
char data[512];
printf(1, "stressfs starting\n");
memset(data, 'a', sizeof(data));
for (i = 0; i < 4; i++)
65: 83 45 f4 01 addl $0x1,-0xc(%ebp)
69: 83 7d f4 03 cmpl $0x3,-0xc(%ebp)
6d: 7e ed jle 5c <main+0x5c>
6f: eb 01 jmp 72 <main+0x72>
if (fork() > 0)
break;
71: 90 nop
printf(1, "write %d\n", i);
72: 83 ec 04 sub $0x4,%esp
75: ff 75 f4 pushl -0xc(%ebp)
78: 68 31 09 00 00 push $0x931
7d: 6a 01 push $0x1
7f: e8 e4 04 00 00 call 568 <printf>
84: 83 c4 10 add $0x10,%esp
path[8] += i;
87: 0f b6 45 ee movzbl -0x12(%ebp),%eax
8b: 89 c2 mov %eax,%edx
8d: 8b 45 f4 mov -0xc(%ebp),%eax
90: 01 d0 add %edx,%eax
92: 88 45 ee mov %al,-0x12(%ebp)
fd = open(path, O_CREATE | O_RDWR);
95: 83 ec 08 sub $0x8,%esp
98: 68 02 02 00 00 push $0x202
9d: 8d 45 e6 lea -0x1a(%ebp),%eax
a0: 50 push %eax
a1: e8 43 03 00 00 call 3e9 <open>
a6: 83 c4 10 add $0x10,%esp
a9: 89 45 f0 mov %eax,-0x10(%ebp)
for (i = 0; i < 20; i++)
ac: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
b3: eb 1e jmp d3 <main+0xd3>
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
b5: 83 ec 04 sub $0x4,%esp
b8: 68 00 02 00 00 push $0x200
bd: 8d 85 e6 fd ff ff lea -0x21a(%ebp),%eax
c3: 50 push %eax
c4: ff 75 f0 pushl -0x10(%ebp)
c7: e8 fd 02 00 00 call 3c9 <write>
cc: 83 c4 10 add $0x10,%esp
printf(1, "write %d\n", i);
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
for (i = 0; i < 20; i++)
cf: 83 45 f4 01 addl $0x1,-0xc(%ebp)
d3: 83 7d f4 13 cmpl $0x13,-0xc(%ebp)
d7: 7e dc jle b5 <main+0xb5>
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
close(fd);
d9: 83 ec 0c sub $0xc,%esp
dc: ff 75 f0 pushl -0x10(%ebp)
df: e8 ed 02 00 00 call 3d1 <close>
e4: 83 c4 10 add $0x10,%esp
printf(1, "read\n");
e7: 83 ec 08 sub $0x8,%esp
ea: 68 3b 09 00 00 push $0x93b
ef: 6a 01 push $0x1
f1: e8 72 04 00 00 call 568 <printf>
f6: 83 c4 10 add $0x10,%esp
fd = open(path, O_RDONLY);
f9: 83 ec 08 sub $0x8,%esp
fc: 6a 00 push $0x0
fe: 8d 45 e6 lea -0x1a(%ebp),%eax
101: 50 push %eax
102: e8 e2 02 00 00 call 3e9 <open>
107: 83 c4 10 add $0x10,%esp
10a: 89 45 f0 mov %eax,-0x10(%ebp)
for (i = 0; i < 20; i++)
10d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
114: eb 1e jmp 134 <main+0x134>
read(fd, data, sizeof(data));
116: 83 ec 04 sub $0x4,%esp
119: 68 00 02 00 00 push $0x200
11e: 8d 85 e6 fd ff ff lea -0x21a(%ebp),%eax
124: 50 push %eax
125: ff 75 f0 pushl -0x10(%ebp)
128: e8 94 02 00 00 call 3c1 <read>
12d: 83 c4 10 add $0x10,%esp
close(fd);
printf(1, "read\n");
fd = open(path, O_RDONLY);
for (i = 0; i < 20; i++)
130: 83 45 f4 01 addl $0x1,-0xc(%ebp)
134: 83 7d f4 13 cmpl $0x13,-0xc(%ebp)
138: 7e dc jle 116 <main+0x116>
read(fd, data, sizeof(data));
close(fd);
13a: 83 ec 0c sub $0xc,%esp
13d: ff 75 f0 pushl -0x10(%ebp)
140: e8 8c 02 00 00 call 3d1 <close>
145: 83 c4 10 add $0x10,%esp
wait();
148: e8 64 02 00 00 call 3b1 <wait>
exit();
14d: e8 57 02 00 00 call 3a9 <exit>
00000152 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
152: 55 push %ebp
153: 89 e5 mov %esp,%ebp
155: 57 push %edi
156: 53 push %ebx
asm volatile("cld; rep stosb" :
157: 8b 4d 08 mov 0x8(%ebp),%ecx
15a: 8b 55 10 mov 0x10(%ebp),%edx
15d: 8b 45 0c mov 0xc(%ebp),%eax
160: 89 cb mov %ecx,%ebx
162: 89 df mov %ebx,%edi
164: 89 d1 mov %edx,%ecx
166: fc cld
167: f3 aa rep stos %al,%es:(%edi)
169: 89 ca mov %ecx,%edx
16b: 89 fb mov %edi,%ebx
16d: 89 5d 08 mov %ebx,0x8(%ebp)
170: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
173: 90 nop
174: 5b pop %ebx
175: 5f pop %edi
176: 5d pop %ebp
177: c3 ret
00000178 <strcpy>:
#include "fcntl.h"
#include "user.h"
#include "x86.h"
char *strcpy(char *s, char *t)
{
178: 55 push %ebp
179: 89 e5 mov %esp,%ebp
17b: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
17e: 8b 45 08 mov 0x8(%ebp),%eax
181: 89 45 fc mov %eax,-0x4(%ebp)
while ((*s++ = *t++) != 0) ;
184: 90 nop
185: 8b 45 08 mov 0x8(%ebp),%eax
188: 8d 50 01 lea 0x1(%eax),%edx
18b: 89 55 08 mov %edx,0x8(%ebp)
18e: 8b 55 0c mov 0xc(%ebp),%edx
191: 8d 4a 01 lea 0x1(%edx),%ecx
194: 89 4d 0c mov %ecx,0xc(%ebp)
197: 0f b6 12 movzbl (%edx),%edx
19a: 88 10 mov %dl,(%eax)
19c: 0f b6 00 movzbl (%eax),%eax
19f: 84 c0 test %al,%al
1a1: 75 e2 jne 185 <strcpy+0xd>
return os;
1a3: 8b 45 fc mov -0x4(%ebp),%eax
}
1a6: c9 leave
1a7: c3 ret
000001a8 <strcmp>:
int strcmp(const char *p, const char *q)
{
1a8: 55 push %ebp
1a9: 89 e5 mov %esp,%ebp
while (*p && *p == *q)
1ab: eb 08 jmp 1b5 <strcmp+0xd>
p++, q++;
1ad: 83 45 08 01 addl $0x1,0x8(%ebp)
1b1: 83 45 0c 01 addl $0x1,0xc(%ebp)
return os;
}
int strcmp(const char *p, const char *q)
{
while (*p && *p == *q)
1b5: 8b 45 08 mov 0x8(%ebp),%eax
1b8: 0f b6 00 movzbl (%eax),%eax
1bb: 84 c0 test %al,%al
1bd: 74 10 je 1cf <strcmp+0x27>
1bf: 8b 45 08 mov 0x8(%ebp),%eax
1c2: 0f b6 10 movzbl (%eax),%edx
1c5: 8b 45 0c mov 0xc(%ebp),%eax
1c8: 0f b6 00 movzbl (%eax),%eax
1cb: 38 c2 cmp %al,%dl
1cd: 74 de je 1ad <strcmp+0x5>
p++, q++;
return (uchar) * p - (uchar) * q;
1cf: 8b 45 08 mov 0x8(%ebp),%eax
1d2: 0f b6 00 movzbl (%eax),%eax
1d5: 0f b6 d0 movzbl %al,%edx
1d8: 8b 45 0c mov 0xc(%ebp),%eax
1db: 0f b6 00 movzbl (%eax),%eax
1de: 0f b6 c0 movzbl %al,%eax
1e1: 29 c2 sub %eax,%edx
1e3: 89 d0 mov %edx,%eax
}
1e5: 5d pop %ebp
1e6: c3 ret
000001e7 <strlen>:
uint strlen(char *s)
{
1e7: 55 push %ebp
1e8: 89 e5 mov %esp,%ebp
1ea: 83 ec 10 sub $0x10,%esp
int n;
for (n = 0; s[n]; n++) ;
1ed: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
1f4: eb 04 jmp 1fa <strlen+0x13>
1f6: 83 45 fc 01 addl $0x1,-0x4(%ebp)
1fa: 8b 55 fc mov -0x4(%ebp),%edx
1fd: 8b 45 08 mov 0x8(%ebp),%eax
200: 01 d0 add %edx,%eax
202: 0f b6 00 movzbl (%eax),%eax
205: 84 c0 test %al,%al
207: 75 ed jne 1f6 <strlen+0xf>
return n;
209: 8b 45 fc mov -0x4(%ebp),%eax
}
20c: c9 leave
20d: c3 ret
0000020e <memset>:
void *memset(void *dst, int c, uint n)
{
20e: 55 push %ebp
20f: 89 e5 mov %esp,%ebp
stosb(dst, c, n);
211: 8b 45 10 mov 0x10(%ebp),%eax
214: 50 push %eax
215: ff 75 0c pushl 0xc(%ebp)
218: ff 75 08 pushl 0x8(%ebp)
21b: e8 32 ff ff ff call 152 <stosb>
220: 83 c4 0c add $0xc,%esp
return dst;
223: 8b 45 08 mov 0x8(%ebp),%eax
}
226: c9 leave
227: c3 ret
00000228 <strchr>:
char *strchr(const char *s, char c)
{
228: 55 push %ebp
229: 89 e5 mov %esp,%ebp
22b: 83 ec 04 sub $0x4,%esp
22e: 8b 45 0c mov 0xc(%ebp),%eax
231: 88 45 fc mov %al,-0x4(%ebp)
for (; *s; s++)
234: eb 14 jmp 24a <strchr+0x22>
if (*s == c)
236: 8b 45 08 mov 0x8(%ebp),%eax
239: 0f b6 00 movzbl (%eax),%eax
23c: 3a 45 fc cmp -0x4(%ebp),%al
23f: 75 05 jne 246 <strchr+0x1e>
return (char *)s;
241: 8b 45 08 mov 0x8(%ebp),%eax
244: eb 13 jmp 259 <strchr+0x31>
return dst;
}
char *strchr(const char *s, char c)
{
for (; *s; s++)
246: 83 45 08 01 addl $0x1,0x8(%ebp)
24a: 8b 45 08 mov 0x8(%ebp),%eax
24d: 0f b6 00 movzbl (%eax),%eax
250: 84 c0 test %al,%al
252: 75 e2 jne 236 <strchr+0xe>
if (*s == c)
return (char *)s;
return 0;
254: b8 00 00 00 00 mov $0x0,%eax
}
259: c9 leave
25a: c3 ret
0000025b <gets>:
char *gets(char *buf, int max)
{
25b: 55 push %ebp
25c: 89 e5 mov %esp,%ebp
25e: 83 ec 18 sub $0x18,%esp
int i, cc;
char c;
for (i = 0; i + 1 < max;) {
261: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
268: eb 42 jmp 2ac <gets+0x51>
cc = read(0, &c, 1);
26a: 83 ec 04 sub $0x4,%esp
26d: 6a 01 push $0x1
26f: 8d 45 ef lea -0x11(%ebp),%eax
272: 50 push %eax
273: 6a 00 push $0x0
275: e8 47 01 00 00 call 3c1 <read>
27a: 83 c4 10 add $0x10,%esp
27d: 89 45 f0 mov %eax,-0x10(%ebp)
if (cc < 1)
280: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
284: 7e 33 jle 2b9 <gets+0x5e>
break;
buf[i++] = c;
286: 8b 45 f4 mov -0xc(%ebp),%eax
289: 8d 50 01 lea 0x1(%eax),%edx
28c: 89 55 f4 mov %edx,-0xc(%ebp)
28f: 89 c2 mov %eax,%edx
291: 8b 45 08 mov 0x8(%ebp),%eax
294: 01 c2 add %eax,%edx
296: 0f b6 45 ef movzbl -0x11(%ebp),%eax
29a: 88 02 mov %al,(%edx)
if (c == '\n' || c == '\r')
29c: 0f b6 45 ef movzbl -0x11(%ebp),%eax
2a0: 3c 0a cmp $0xa,%al
2a2: 74 16 je 2ba <gets+0x5f>
2a4: 0f b6 45 ef movzbl -0x11(%ebp),%eax
2a8: 3c 0d cmp $0xd,%al
2aa: 74 0e je 2ba <gets+0x5f>
char *gets(char *buf, int max)
{
int i, cc;
char c;
for (i = 0; i + 1 < max;) {
2ac: 8b 45 f4 mov -0xc(%ebp),%eax
2af: 83 c0 01 add $0x1,%eax
2b2: 3b 45 0c cmp 0xc(%ebp),%eax
2b5: 7c b3 jl 26a <gets+0xf>
2b7: eb 01 jmp 2ba <gets+0x5f>
cc = read(0, &c, 1);
if (cc < 1)
break;
2b9: 90 nop
buf[i++] = c;
if (c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2ba: 8b 55 f4 mov -0xc(%ebp),%edx
2bd: 8b 45 08 mov 0x8(%ebp),%eax
2c0: 01 d0 add %edx,%eax
2c2: c6 00 00 movb $0x0,(%eax)
return buf;
2c5: 8b 45 08 mov 0x8(%ebp),%eax
}
2c8: c9 leave
2c9: c3 ret
000002ca <stat>:
int stat(char *n, struct stat *st)
{
2ca: 55 push %ebp
2cb: 89 e5 mov %esp,%ebp
2cd: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
2d0: 83 ec 08 sub $0x8,%esp
2d3: 6a 00 push $0x0
2d5: ff 75 08 pushl 0x8(%ebp)
2d8: e8 0c 01 00 00 call 3e9 <open>
2dd: 83 c4 10 add $0x10,%esp
2e0: 89 45 f4 mov %eax,-0xc(%ebp)
if (fd < 0)
2e3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2e7: 79 07 jns 2f0 <stat+0x26>
return -1;
2e9: b8 ff ff ff ff mov $0xffffffff,%eax
2ee: eb 25 jmp 315 <stat+0x4b>
r = fstat(fd, st);
2f0: 83 ec 08 sub $0x8,%esp
2f3: ff 75 0c pushl 0xc(%ebp)
2f6: ff 75 f4 pushl -0xc(%ebp)
2f9: e8 03 01 00 00 call 401 <fstat>
2fe: 83 c4 10 add $0x10,%esp
301: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
304: 83 ec 0c sub $0xc,%esp
307: ff 75 f4 pushl -0xc(%ebp)
30a: e8 c2 00 00 00 call 3d1 <close>
30f: 83 c4 10 add $0x10,%esp
return r;
312: 8b 45 f0 mov -0x10(%ebp),%eax
}
315: c9 leave
316: c3 ret
00000317 <atoi>:
int atoi(const char *s)
{
317: 55 push %ebp
318: 89 e5 mov %esp,%ebp
31a: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
31d: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while ('0' <= *s && *s <= '9')
324: eb 25 jmp 34b <atoi+0x34>
n = n * 10 + *s++ - '0';
326: 8b 55 fc mov -0x4(%ebp),%edx
329: 89 d0 mov %edx,%eax
32b: c1 e0 02 shl $0x2,%eax
32e: 01 d0 add %edx,%eax
330: 01 c0 add %eax,%eax
332: 89 c1 mov %eax,%ecx
334: 8b 45 08 mov 0x8(%ebp),%eax
337: 8d 50 01 lea 0x1(%eax),%edx
33a: 89 55 08 mov %edx,0x8(%ebp)
33d: 0f b6 00 movzbl (%eax),%eax
340: 0f be c0 movsbl %al,%eax
343: 01 c8 add %ecx,%eax
345: 83 e8 30 sub $0x30,%eax
348: 89 45 fc mov %eax,-0x4(%ebp)
int atoi(const char *s)
{
int n;
n = 0;
while ('0' <= *s && *s <= '9')
34b: 8b 45 08 mov 0x8(%ebp),%eax
34e: 0f b6 00 movzbl (%eax),%eax
351: 3c 2f cmp $0x2f,%al
353: 7e 0a jle 35f <atoi+0x48>
355: 8b 45 08 mov 0x8(%ebp),%eax
358: 0f b6 00 movzbl (%eax),%eax
35b: 3c 39 cmp $0x39,%al
35d: 7e c7 jle 326 <atoi+0xf>
n = n * 10 + *s++ - '0';
return n;
35f: 8b 45 fc mov -0x4(%ebp),%eax
}
362: c9 leave
363: c3 ret
00000364 <memmove>:
void *memmove(void *vdst, void *vsrc, int n)
{
364: 55 push %ebp
365: 89 e5 mov %esp,%ebp
367: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
36a: 8b 45 08 mov 0x8(%ebp),%eax
36d: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
370: 8b 45 0c mov 0xc(%ebp),%eax
373: 89 45 f8 mov %eax,-0x8(%ebp)
while (n-- > 0)
376: eb 17 jmp 38f <memmove+0x2b>
*dst++ = *src++;
378: 8b 45 fc mov -0x4(%ebp),%eax
37b: 8d 50 01 lea 0x1(%eax),%edx
37e: 89 55 fc mov %edx,-0x4(%ebp)
381: 8b 55 f8 mov -0x8(%ebp),%edx
384: 8d 4a 01 lea 0x1(%edx),%ecx
387: 89 4d f8 mov %ecx,-0x8(%ebp)
38a: 0f b6 12 movzbl (%edx),%edx
38d: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while (n-- > 0)
38f: 8b 45 10 mov 0x10(%ebp),%eax
392: 8d 50 ff lea -0x1(%eax),%edx
395: 89 55 10 mov %edx,0x10(%ebp)
398: 85 c0 test %eax,%eax
39a: 7f dc jg 378 <memmove+0x14>
*dst++ = *src++;
return vdst;
39c: 8b 45 08 mov 0x8(%ebp),%eax
}
39f: c9 leave
3a0: c3 ret
000003a1 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
3a1: b8 01 00 00 00 mov $0x1,%eax
3a6: cd 40 int $0x40
3a8: c3 ret
000003a9 <exit>:
SYSCALL(exit)
3a9: b8 02 00 00 00 mov $0x2,%eax
3ae: cd 40 int $0x40
3b0: c3 ret
000003b1 <wait>:
SYSCALL(wait)
3b1: b8 03 00 00 00 mov $0x3,%eax
3b6: cd 40 int $0x40
3b8: c3 ret
000003b9 <pipe>:
SYSCALL(pipe)
3b9: b8 04 00 00 00 mov $0x4,%eax
3be: cd 40 int $0x40
3c0: c3 ret
000003c1 <read>:
SYSCALL(read)
3c1: b8 05 00 00 00 mov $0x5,%eax
3c6: cd 40 int $0x40
3c8: c3 ret
000003c9 <write>:
SYSCALL(write)
3c9: b8 10 00 00 00 mov $0x10,%eax
3ce: cd 40 int $0x40
3d0: c3 ret
000003d1 <close>:
SYSCALL(close)
3d1: b8 15 00 00 00 mov $0x15,%eax
3d6: cd 40 int $0x40
3d8: c3 ret
000003d9 <kill>:
SYSCALL(kill)
3d9: b8 06 00 00 00 mov $0x6,%eax
3de: cd 40 int $0x40
3e0: c3 ret
000003e1 <exec>:
SYSCALL(exec)
3e1: b8 07 00 00 00 mov $0x7,%eax
3e6: cd 40 int $0x40
3e8: c3 ret
000003e9 <open>:
SYSCALL(open)
3e9: b8 0f 00 00 00 mov $0xf,%eax
3ee: cd 40 int $0x40
3f0: c3 ret
000003f1 <mknod>:
SYSCALL(mknod)
3f1: b8 11 00 00 00 mov $0x11,%eax
3f6: cd 40 int $0x40
3f8: c3 ret
000003f9 <unlink>:
SYSCALL(unlink)
3f9: b8 12 00 00 00 mov $0x12,%eax
3fe: cd 40 int $0x40
400: c3 ret
00000401 <fstat>:
SYSCALL(fstat)
401: b8 08 00 00 00 mov $0x8,%eax
406: cd 40 int $0x40
408: c3 ret
00000409 <link>:
SYSCALL(link)
409: b8 13 00 00 00 mov $0x13,%eax
40e: cd 40 int $0x40
410: c3 ret
00000411 <mkdir>:
SYSCALL(mkdir)
411: b8 14 00 00 00 mov $0x14,%eax
416: cd 40 int $0x40
418: c3 ret
00000419 <chdir>:
SYSCALL(chdir)
419: b8 09 00 00 00 mov $0x9,%eax
41e: cd 40 int $0x40
420: c3 ret
00000421 <dup>:
SYSCALL(dup)
421: b8 0a 00 00 00 mov $0xa,%eax
426: cd 40 int $0x40
428: c3 ret
00000429 <getpid>:
SYSCALL(getpid)
429: b8 0b 00 00 00 mov $0xb,%eax
42e: cd 40 int $0x40
430: c3 ret
00000431 <sbrk>:
SYSCALL(sbrk)
431: b8 0c 00 00 00 mov $0xc,%eax
436: cd 40 int $0x40
438: c3 ret
00000439 <sleep>:
SYSCALL(sleep)
439: b8 0d 00 00 00 mov $0xd,%eax
43e: cd 40 int $0x40
440: c3 ret
00000441 <uptime>:
SYSCALL(uptime)
441: b8 0e 00 00 00 mov $0xe,%eax
446: cd 40 int $0x40
448: c3 ret
00000449 <shm_get>:
SYSCALL(shm_get) //mod2
449: b8 1c 00 00 00 mov $0x1c,%eax
44e: cd 40 int $0x40
450: c3 ret
00000451 <shm_rem>:
SYSCALL(shm_rem) //mod2
451: b8 1d 00 00 00 mov $0x1d,%eax
456: cd 40 int $0x40
458: c3 ret
00000459 <setHighPrio>:
SYSCALL(setHighPrio) //scheduler
459: b8 1e 00 00 00 mov $0x1e,%eax
45e: cd 40 int $0x40
460: c3 ret
00000461 <mutex_create>:
SYSCALL(mutex_create)//mod3
461: b8 16 00 00 00 mov $0x16,%eax
466: cd 40 int $0x40
468: c3 ret
00000469 <mutex_delete>:
SYSCALL(mutex_delete)
469: b8 17 00 00 00 mov $0x17,%eax
46e: cd 40 int $0x40
470: c3 ret
00000471 <mutex_lock>:
SYSCALL(mutex_lock)
471: b8 18 00 00 00 mov $0x18,%eax
476: cd 40 int $0x40
478: c3 ret
00000479 <mutex_unlock>:
SYSCALL(mutex_unlock)
479: b8 19 00 00 00 mov $0x19,%eax
47e: cd 40 int $0x40
480: c3 ret
00000481 <cv_wait>:
SYSCALL(cv_wait)
481: b8 1a 00 00 00 mov $0x1a,%eax
486: cd 40 int $0x40
488: c3 ret
00000489 <cv_signal>:
SYSCALL(cv_signal)
489: b8 1b 00 00 00 mov $0x1b,%eax
48e: cd 40 int $0x40
490: c3 ret
00000491 <putc>:
#include "types.h"
#include "stat.h"
#include "user.h"
static void putc(int fd, char c)
{
491: 55 push %ebp
492: 89 e5 mov %esp,%ebp
494: 83 ec 18 sub $0x18,%esp
497: 8b 45 0c mov 0xc(%ebp),%eax
49a: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
49d: 83 ec 04 sub $0x4,%esp
4a0: 6a 01 push $0x1
4a2: 8d 45 f4 lea -0xc(%ebp),%eax
4a5: 50 push %eax
4a6: ff 75 08 pushl 0x8(%ebp)
4a9: e8 1b ff ff ff call 3c9 <write>
4ae: 83 c4 10 add $0x10,%esp
}
4b1: 90 nop
4b2: c9 leave
4b3: c3 ret
000004b4 <printint>:
static void printint(int fd, int xx, int base, int sgn)
{
4b4: 55 push %ebp
4b5: 89 e5 mov %esp,%ebp
4b7: 53 push %ebx
4b8: 83 ec 24 sub $0x24,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
4bb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if (sgn && xx < 0) {
4c2: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
4c6: 74 17 je 4df <printint+0x2b>
4c8: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
4cc: 79 11 jns 4df <printint+0x2b>
neg = 1;
4ce: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
4d5: 8b 45 0c mov 0xc(%ebp),%eax
4d8: f7 d8 neg %eax
4da: 89 45 ec mov %eax,-0x14(%ebp)
4dd: eb 06 jmp 4e5 <printint+0x31>
} else {
x = xx;
4df: 8b 45 0c mov 0xc(%ebp),%eax
4e2: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
4e5: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do {
buf[i++] = digits[x % base];
4ec: 8b 4d f4 mov -0xc(%ebp),%ecx
4ef: 8d 41 01 lea 0x1(%ecx),%eax
4f2: 89 45 f4 mov %eax,-0xc(%ebp)
4f5: 8b 5d 10 mov 0x10(%ebp),%ebx
4f8: 8b 45 ec mov -0x14(%ebp),%eax
4fb: ba 00 00 00 00 mov $0x0,%edx
500: f7 f3 div %ebx
502: 89 d0 mov %edx,%eax
504: 0f b6 80 90 0b 00 00 movzbl 0xb90(%eax),%eax
50b: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
} while ((x /= base) != 0);
50f: 8b 5d 10 mov 0x10(%ebp),%ebx
512: 8b 45 ec mov -0x14(%ebp),%eax
515: ba 00 00 00 00 mov $0x0,%edx
51a: f7 f3 div %ebx
51c: 89 45 ec mov %eax,-0x14(%ebp)
51f: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
523: 75 c7 jne 4ec <printint+0x38>
if (neg)
525: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
529: 74 2d je 558 <printint+0xa4>
buf[i++] = '-';
52b: 8b 45 f4 mov -0xc(%ebp),%eax
52e: 8d 50 01 lea 0x1(%eax),%edx
531: 89 55 f4 mov %edx,-0xc(%ebp)
534: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while (--i >= 0)
539: eb 1d jmp 558 <printint+0xa4>
putc(fd, buf[i]);
53b: 8d 55 dc lea -0x24(%ebp),%edx
53e: 8b 45 f4 mov -0xc(%ebp),%eax
541: 01 d0 add %edx,%eax
543: 0f b6 00 movzbl (%eax),%eax
546: 0f be c0 movsbl %al,%eax
549: 83 ec 08 sub $0x8,%esp
54c: 50 push %eax
54d: ff 75 08 pushl 0x8(%ebp)
550: e8 3c ff ff ff call 491 <putc>
555: 83 c4 10 add $0x10,%esp
buf[i++] = digits[x % base];
} while ((x /= base) != 0);
if (neg)
buf[i++] = '-';
while (--i >= 0)
558: 83 6d f4 01 subl $0x1,-0xc(%ebp)
55c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
560: 79 d9 jns 53b <printint+0x87>
putc(fd, buf[i]);
}
562: 90 nop
563: 8b 5d fc mov -0x4(%ebp),%ebx
566: c9 leave
567: c3 ret
00000568 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void printf(int fd, char *fmt, ...)
{
568: 55 push %ebp
569: 89 e5 mov %esp,%ebp
56b: 83 ec 28 sub $0x28,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
56e: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint *) (void *)&fmt + 1;
575: 8d 45 0c lea 0xc(%ebp),%eax
578: 83 c0 04 add $0x4,%eax
57b: 89 45 e8 mov %eax,-0x18(%ebp)
for (i = 0; fmt[i]; i++) {
57e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
585: e9 59 01 00 00 jmp 6e3 <printf+0x17b>
c = fmt[i] & 0xff;
58a: 8b 55 0c mov 0xc(%ebp),%edx
58d: 8b 45 f0 mov -0x10(%ebp),%eax
590: 01 d0 add %edx,%eax
592: 0f b6 00 movzbl (%eax),%eax
595: 0f be c0 movsbl %al,%eax
598: 25 ff 00 00 00 and $0xff,%eax
59d: 89 45 e4 mov %eax,-0x1c(%ebp)
if (state == 0) {
5a0: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
5a4: 75 2c jne 5d2 <printf+0x6a>
if (c == '%') {
5a6: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
5aa: 75 0c jne 5b8 <printf+0x50>
state = '%';
5ac: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
5b3: e9 27 01 00 00 jmp 6df <printf+0x177>
} else {
putc(fd, c);
5b8: 8b 45 e4 mov -0x1c(%ebp),%eax
5bb: 0f be c0 movsbl %al,%eax
5be: 83 ec 08 sub $0x8,%esp
5c1: 50 push %eax
5c2: ff 75 08 pushl 0x8(%ebp)
5c5: e8 c7 fe ff ff call 491 <putc>
5ca: 83 c4 10 add $0x10,%esp
5cd: e9 0d 01 00 00 jmp 6df <printf+0x177>
}
} else if (state == '%') {
5d2: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
5d6: 0f 85 03 01 00 00 jne 6df <printf+0x177>
if (c == 'd') {
5dc: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
5e0: 75 1e jne 600 <printf+0x98>
printint(fd, *ap, 10, 1);
5e2: 8b 45 e8 mov -0x18(%ebp),%eax
5e5: 8b 00 mov (%eax),%eax
5e7: 6a 01 push $0x1
5e9: 6a 0a push $0xa
5eb: 50 push %eax
5ec: ff 75 08 pushl 0x8(%ebp)
5ef: e8 c0 fe ff ff call 4b4 <printint>
5f4: 83 c4 10 add $0x10,%esp
ap++;
5f7: 83 45 e8 04 addl $0x4,-0x18(%ebp)
5fb: e9 d8 00 00 00 jmp 6d8 <printf+0x170>
} else if (c == 'x' || c == 'p') {
600: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
604: 74 06 je 60c <printf+0xa4>
606: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
60a: 75 1e jne 62a <printf+0xc2>
printint(fd, *ap, 16, 0);
60c: 8b 45 e8 mov -0x18(%ebp),%eax
60f: 8b 00 mov (%eax),%eax
611: 6a 00 push $0x0
613: 6a 10 push $0x10
615: 50 push %eax
616: ff 75 08 pushl 0x8(%ebp)
619: e8 96 fe ff ff call 4b4 <printint>
61e: 83 c4 10 add $0x10,%esp
ap++;
621: 83 45 e8 04 addl $0x4,-0x18(%ebp)
625: e9 ae 00 00 00 jmp 6d8 <printf+0x170>
} else if (c == 's') {
62a: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
62e: 75 43 jne 673 <printf+0x10b>
s = (char *)*ap;
630: 8b 45 e8 mov -0x18(%ebp),%eax
633: 8b 00 mov (%eax),%eax
635: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
638: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if (s == 0)
63c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
640: 75 25 jne 667 <printf+0xff>
s = "(null)";
642: c7 45 f4 41 09 00 00 movl $0x941,-0xc(%ebp)
while (*s != 0) {
649: eb 1c jmp 667 <printf+0xff>
putc(fd, *s);
64b: 8b 45 f4 mov -0xc(%ebp),%eax
64e: 0f b6 00 movzbl (%eax),%eax
651: 0f be c0 movsbl %al,%eax
654: 83 ec 08 sub $0x8,%esp
657: 50 push %eax
658: ff 75 08 pushl 0x8(%ebp)
65b: e8 31 fe ff ff call 491 <putc>
660: 83 c4 10 add $0x10,%esp
s++;
663: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if (c == 's') {
s = (char *)*ap;
ap++;
if (s == 0)
s = "(null)";
while (*s != 0) {
667: 8b 45 f4 mov -0xc(%ebp),%eax
66a: 0f b6 00 movzbl (%eax),%eax
66d: 84 c0 test %al,%al
66f: 75 da jne 64b <printf+0xe3>
671: eb 65 jmp 6d8 <printf+0x170>
putc(fd, *s);
s++;
}
} else if (c == 'c') {
673: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
677: 75 1d jne 696 <printf+0x12e>
putc(fd, *ap);
679: 8b 45 e8 mov -0x18(%ebp),%eax
67c: 8b 00 mov (%eax),%eax
67e: 0f be c0 movsbl %al,%eax
681: 83 ec 08 sub $0x8,%esp
684: 50 push %eax
685: ff 75 08 pushl 0x8(%ebp)
688: e8 04 fe ff ff call 491 <putc>
68d: 83 c4 10 add $0x10,%esp
ap++;
690: 83 45 e8 04 addl $0x4,-0x18(%ebp)
694: eb 42 jmp 6d8 <printf+0x170>
} else if (c == '%') {
696: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
69a: 75 17 jne 6b3 <printf+0x14b>
putc(fd, c);
69c: 8b 45 e4 mov -0x1c(%ebp),%eax
69f: 0f be c0 movsbl %al,%eax
6a2: 83 ec 08 sub $0x8,%esp
6a5: 50 push %eax
6a6: ff 75 08 pushl 0x8(%ebp)
6a9: e8 e3 fd ff ff call 491 <putc>
6ae: 83 c4 10 add $0x10,%esp
6b1: eb 25 jmp 6d8 <printf+0x170>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
6b3: 83 ec 08 sub $0x8,%esp
6b6: 6a 25 push $0x25
6b8: ff 75 08 pushl 0x8(%ebp)
6bb: e8 d1 fd ff ff call 491 <putc>
6c0: 83 c4 10 add $0x10,%esp
putc(fd, c);
6c3: 8b 45 e4 mov -0x1c(%ebp),%eax
6c6: 0f be c0 movsbl %al,%eax
6c9: 83 ec 08 sub $0x8,%esp
6cc: 50 push %eax
6cd: ff 75 08 pushl 0x8(%ebp)
6d0: e8 bc fd ff ff call 491 <putc>
6d5: 83 c4 10 add $0x10,%esp
}
state = 0;
6d8: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint *) (void *)&fmt + 1;
for (i = 0; fmt[i]; i++) {
6df: 83 45 f0 01 addl $0x1,-0x10(%ebp)
6e3: 8b 55 0c mov 0xc(%ebp),%edx
6e6: 8b 45 f0 mov -0x10(%ebp),%eax
6e9: 01 d0 add %edx,%eax
6eb: 0f b6 00 movzbl (%eax),%eax
6ee: 84 c0 test %al,%al
6f0: 0f 85 94 fe ff ff jne 58a <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
6f6: 90 nop
6f7: c9 leave
6f8: c3 ret
000006f9 <free>:
static Header base;
static Header *freep;
void free(void *ap)
{
6f9: 55 push %ebp
6fa: 89 e5 mov %esp,%ebp
6fc: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header *) ap - 1; //take address of memory -> subtract one size of p to get to header to memeory
6ff: 8b 45 08 mov 0x8(%ebp),%eax
702: 83 e8 08 sub $0x8,%eax
705: 89 45 f8 mov %eax,-0x8(%ebp)
for (p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) //comparing pointers to headers...maybe ordering spatially...
708: a1 ac 0b 00 00 mov 0xbac,%eax
70d: 89 45 fc mov %eax,-0x4(%ebp)
710: eb 24 jmp 736 <free+0x3d>
if (p >= p->s.ptr && (bp > p || bp < p->s.ptr))
712: 8b 45 fc mov -0x4(%ebp),%eax
715: 8b 00 mov (%eax),%eax
717: 3b 45 fc cmp -0x4(%ebp),%eax
71a: 77 12 ja 72e <free+0x35>
71c: 8b 45 f8 mov -0x8(%ebp),%eax
71f: 3b 45 fc cmp -0x4(%ebp),%eax
722: 77 24 ja 748 <free+0x4f>
724: 8b 45 fc mov -0x4(%ebp),%eax
727: 8b 00 mov (%eax),%eax
729: 3b 45 f8 cmp -0x8(%ebp),%eax
72c: 77 1a ja 748 <free+0x4f>
void free(void *ap)
{
Header *bp, *p;
bp = (Header *) ap - 1; //take address of memory -> subtract one size of p to get to header to memeory
for (p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) //comparing pointers to headers...maybe ordering spatially...
72e: 8b 45 fc mov -0x4(%ebp),%eax
731: 8b 00 mov (%eax),%eax
733: 89 45 fc mov %eax,-0x4(%ebp)
736: 8b 45 f8 mov -0x8(%ebp),%eax
739: 3b 45 fc cmp -0x4(%ebp),%eax
73c: 76 d4 jbe 712 <free+0x19>
73e: 8b 45 fc mov -0x4(%ebp),%eax
741: 8b 00 mov (%eax),%eax
743: 3b 45 f8 cmp -0x8(%ebp),%eax
746: 76 ca jbe 712 <free+0x19>
if (p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if (bp + bp->s.size == p->s.ptr) { //checks sizes to merge contiguous freed regions
748: 8b 45 f8 mov -0x8(%ebp),%eax
74b: 8b 40 04 mov 0x4(%eax),%eax
74e: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
755: 8b 45 f8 mov -0x8(%ebp),%eax
758: 01 c2 add %eax,%edx
75a: 8b 45 fc mov -0x4(%ebp),%eax
75d: 8b 00 mov (%eax),%eax
75f: 39 c2 cmp %eax,%edx
761: 75 24 jne 787 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
763: 8b 45 f8 mov -0x8(%ebp),%eax
766: 8b 50 04 mov 0x4(%eax),%edx
769: 8b 45 fc mov -0x4(%ebp),%eax
76c: 8b 00 mov (%eax),%eax
76e: 8b 40 04 mov 0x4(%eax),%eax
771: 01 c2 add %eax,%edx
773: 8b 45 f8 mov -0x8(%ebp),%eax
776: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
779: 8b 45 fc mov -0x4(%ebp),%eax
77c: 8b 00 mov (%eax),%eax
77e: 8b 10 mov (%eax),%edx
780: 8b 45 f8 mov -0x8(%ebp),%eax
783: 89 10 mov %edx,(%eax)
785: eb 0a jmp 791 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
787: 8b 45 fc mov -0x4(%ebp),%eax
78a: 8b 10 mov (%eax),%edx
78c: 8b 45 f8 mov -0x8(%ebp),%eax
78f: 89 10 mov %edx,(%eax)
if (p + p->s.size == bp) {
791: 8b 45 fc mov -0x4(%ebp),%eax
794: 8b 40 04 mov 0x4(%eax),%eax
797: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
79e: 8b 45 fc mov -0x4(%ebp),%eax
7a1: 01 d0 add %edx,%eax
7a3: 3b 45 f8 cmp -0x8(%ebp),%eax
7a6: 75 20 jne 7c8 <free+0xcf>
p->s.size += bp->s.size;
7a8: 8b 45 fc mov -0x4(%ebp),%eax
7ab: 8b 50 04 mov 0x4(%eax),%edx
7ae: 8b 45 f8 mov -0x8(%ebp),%eax
7b1: 8b 40 04 mov 0x4(%eax),%eax
7b4: 01 c2 add %eax,%edx
7b6: 8b 45 fc mov -0x4(%ebp),%eax
7b9: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
7bc: 8b 45 f8 mov -0x8(%ebp),%eax
7bf: 8b 10 mov (%eax),%edx
7c1: 8b 45 fc mov -0x4(%ebp),%eax
7c4: 89 10 mov %edx,(%eax)
7c6: eb 08 jmp 7d0 <free+0xd7>
} else
p->s.ptr = bp;
7c8: 8b 45 fc mov -0x4(%ebp),%eax
7cb: 8b 55 f8 mov -0x8(%ebp),%edx
7ce: 89 10 mov %edx,(%eax)
freep = p;
7d0: 8b 45 fc mov -0x4(%ebp),%eax
7d3: a3 ac 0b 00 00 mov %eax,0xbac
}
7d8: 90 nop
7d9: c9 leave
7da: c3 ret
000007db <morecore>:
static Header *morecore(uint nu)
{
7db: 55 push %ebp
7dc: 89 e5 mov %esp,%ebp
7de: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
if (nu < 4096)
7e1: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
7e8: 77 07 ja 7f1 <morecore+0x16>
nu = 4096;
7ea: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
7f1: 8b 45 08 mov 0x8(%ebp),%eax
7f4: c1 e0 03 shl $0x3,%eax
7f7: 83 ec 0c sub $0xc,%esp
7fa: 50 push %eax
7fb: e8 31 fc ff ff call 431 <sbrk>
800: 83 c4 10 add $0x10,%esp
803: 89 45 f4 mov %eax,-0xc(%ebp)
if (p == (char *)-1)
806: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
80a: 75 07 jne 813 <morecore+0x38>
return 0;
80c: b8 00 00 00 00 mov $0x0,%eax
811: eb 26 jmp 839 <morecore+0x5e>
hp = (Header *) p;
813: 8b 45 f4 mov -0xc(%ebp),%eax
816: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
819: 8b 45 f0 mov -0x10(%ebp),%eax
81c: 8b 55 08 mov 0x8(%ebp),%edx
81f: 89 50 04 mov %edx,0x4(%eax)
free((void *)(hp + 1));
822: 8b 45 f0 mov -0x10(%ebp),%eax
825: 83 c0 08 add $0x8,%eax
828: 83 ec 0c sub $0xc,%esp
82b: 50 push %eax
82c: e8 c8 fe ff ff call 6f9 <free>
831: 83 c4 10 add $0x10,%esp
return freep;
834: a1 ac 0b 00 00 mov 0xbac,%eax
}
839: c9 leave
83a: c3 ret
0000083b <malloc>:
void *malloc(uint nbytes)
{
83b: 55 push %ebp
83c: 89 e5 mov %esp,%ebp
83e: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1) / sizeof(Header) + 1;
841: 8b 45 08 mov 0x8(%ebp),%eax
844: 83 c0 07 add $0x7,%eax
847: c1 e8 03 shr $0x3,%eax
84a: 83 c0 01 add $0x1,%eax
84d: 89 45 ec mov %eax,-0x14(%ebp)
if ((prevp = freep) == 0) {
850: a1 ac 0b 00 00 mov 0xbac,%eax
855: 89 45 f0 mov %eax,-0x10(%ebp)
858: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
85c: 75 23 jne 881 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
85e: c7 45 f0 a4 0b 00 00 movl $0xba4,-0x10(%ebp)
865: 8b 45 f0 mov -0x10(%ebp),%eax
868: a3 ac 0b 00 00 mov %eax,0xbac
86d: a1 ac 0b 00 00 mov 0xbac,%eax
872: a3 a4 0b 00 00 mov %eax,0xba4
base.s.size = 0;
877: c7 05 a8 0b 00 00 00 movl $0x0,0xba8
87e: 00 00 00
}
for (p = prevp->s.ptr;; prevp = p, p = p->s.ptr) {
881: 8b 45 f0 mov -0x10(%ebp),%eax
884: 8b 00 mov (%eax),%eax
886: 89 45 f4 mov %eax,-0xc(%ebp)
if (p->s.size >= nunits) {
889: 8b 45 f4 mov -0xc(%ebp),%eax
88c: 8b 40 04 mov 0x4(%eax),%eax
88f: 3b 45 ec cmp -0x14(%ebp),%eax
892: 72 4d jb 8e1 <malloc+0xa6>
if (p->s.size == nunits)
894: 8b 45 f4 mov -0xc(%ebp),%eax
897: 8b 40 04 mov 0x4(%eax),%eax
89a: 3b 45 ec cmp -0x14(%ebp),%eax
89d: 75 0c jne 8ab <malloc+0x70>
prevp->s.ptr = p->s.ptr;
89f: 8b 45 f4 mov -0xc(%ebp),%eax
8a2: 8b 10 mov (%eax),%edx
8a4: 8b 45 f0 mov -0x10(%ebp),%eax
8a7: 89 10 mov %edx,(%eax)
8a9: eb 26 jmp 8d1 <malloc+0x96>
else {
p->s.size -= nunits;
8ab: 8b 45 f4 mov -0xc(%ebp),%eax
8ae: 8b 40 04 mov 0x4(%eax),%eax
8b1: 2b 45 ec sub -0x14(%ebp),%eax
8b4: 89 c2 mov %eax,%edx
8b6: 8b 45 f4 mov -0xc(%ebp),%eax
8b9: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
8bc: 8b 45 f4 mov -0xc(%ebp),%eax
8bf: 8b 40 04 mov 0x4(%eax),%eax
8c2: c1 e0 03 shl $0x3,%eax
8c5: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
8c8: 8b 45 f4 mov -0xc(%ebp),%eax
8cb: 8b 55 ec mov -0x14(%ebp),%edx
8ce: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
8d1: 8b 45 f0 mov -0x10(%ebp),%eax
8d4: a3 ac 0b 00 00 mov %eax,0xbac
//printf(0, "\nMalloc Pointer Value = %p\n", p+1);
return (void *)(p + 1);
8d9: 8b 45 f4 mov -0xc(%ebp),%eax
8dc: 83 c0 08 add $0x8,%eax
8df: eb 3b jmp 91c <malloc+0xe1>
}
if (p == freep)
8e1: a1 ac 0b 00 00 mov 0xbac,%eax
8e6: 39 45 f4 cmp %eax,-0xc(%ebp)
8e9: 75 1e jne 909 <malloc+0xce>
if ((p = morecore(nunits)) == 0)
8eb: 83 ec 0c sub $0xc,%esp
8ee: ff 75 ec pushl -0x14(%ebp)
8f1: e8 e5 fe ff ff call 7db <morecore>
8f6: 83 c4 10 add $0x10,%esp
8f9: 89 45 f4 mov %eax,-0xc(%ebp)
8fc: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
900: 75 07 jne 909 <malloc+0xce>
return 0;
902: b8 00 00 00 00 mov $0x0,%eax
907: eb 13 jmp 91c <malloc+0xe1>
nunits = (nbytes + sizeof(Header) - 1) / sizeof(Header) + 1;
if ((prevp = freep) == 0) {
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for (p = prevp->s.ptr;; prevp = p, p = p->s.ptr) {
909: 8b 45 f4 mov -0xc(%ebp),%eax
90c: 89 45 f0 mov %eax,-0x10(%ebp)
90f: 8b 45 f4 mov -0xc(%ebp),%eax
912: 8b 00 mov (%eax),%eax
914: 89 45 f4 mov %eax,-0xc(%ebp)
return (void *)(p + 1);
}
if (p == freep)
if ((p = morecore(nunits)) == 0)
return 0;
}
917: e9 6d ff ff ff jmp 889 <malloc+0x4e>
}
91c: c9 leave
91d: c3 ret
|
awa/src/awa-components-inputs.ads | fuzzysloth/ada-awa | 81 | 24740 | <filename>awa/src/awa-components-inputs.ads<gh_stars>10-100
-----------------------------------------------------------------------
-- awa-components-inputs -- AWA input field component
-- Copyright (C) 2011 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with ASF.Components.Html.Forms;
with ASF.Contexts.Faces;
with ASF.Contexts.Writer;
package AWA.Components.Inputs is
use ASF.Contexts.Faces;
use ASF.Contexts.Writer;
-- ------------------------------
-- Input component
-- ------------------------------
-- The AWA input component overrides the ASF input component to build a compact component
-- that displays a label, the input field and the associated error message if necessary.
--
-- The generated HTML looks like:
--
-- <dl class='... awa-error'>
-- <dt>title <i>required</i></dt>
-- <dd><input type='text' ...> <em/>
-- <span class='...'>message</span>
-- </dd>
-- </dl>
type UIInput is new ASF.Components.Html.Forms.UIInput with null record;
type UIInput_Access is access all UIInput'Class;
-- Render the input field title.
procedure Render_Title (UI : in UIInput;
Writer : in Response_Writer_Access;
Context : in out Faces_Context'Class);
-- Render the input component. Starts the DL/DD list and write the input
-- component with the possible associated error message.
overriding
procedure Encode_Begin (UI : in UIInput;
Context : in out Faces_Context'Class);
-- Render the end of the input component. Closes the DL/DD list.
overriding
procedure Encode_End (UI : in UIInput;
Context : in out Faces_Context'Class);
end AWA.Components.Inputs;
|
oeis/141/A141892.asm | neoneye/loda-programs | 11 | 172480 | <gh_stars>10-100
; A141892: Primes congruent to 10 mod 21.
; Submitted by <NAME>
; 31,73,157,199,241,283,367,409,577,619,661,787,829,997,1039,1123,1249,1291,1459,1543,1627,1669,1753,1879,2089,2131,2341,2383,2467,2551,2593,2677,2719,2803,2887,2971,3181,3307,3391,3433,3517,3559,3643,3727,3769,3853,4021,4231,4273,4357,4441,4483,4567,4651,4861,4903,4987,5113,5197,5281,5323,5407,5449,5659,5701,5743,5827,5869,5953,6037,6079,6121,6163,6247,6373,6709,6793,6961,7129,7213,7297,7507,7549,7591,7717,7759,7927,8011,8053,8179,8221,8263,8389,8431,8599,8641,8893,9103,9187,9397
mov $2,$0
pow $2,2
lpb $2
add $1,30
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,12
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
add $0,31
|
gyak/gyak8/sor/Linked_List_Pkg.ads | balintsoos/LearnAda | 0 | 4800 | generic
type Elem is (<>);
package Linked_List_Pkg is
type Linked_List is limited private;
type Vertex is private;
Empty_Linked_List : exception;
procedure Push( L : in out Linked_List; E : in Elem );
procedure Pop( L : in out Linked_List; E : out Elem );
-- can raise Empty_Linked_List exception;
function Is_Empty( L : Linked_List ) return Boolean;
function Size( L : Linked_List ) return Natural;
private
type Pointer is access Vertex;
type Vertex is record
data: Elem;
next: Pointer := null;
end record;
type Linked_List is record
size: Natural := 0;
front: Pointer := null;
back: Pointer := null;
end record;
end Linked_List_Pkg;
|
test/Succeed/Issue707-Vec.agda | cruhland/agda | 1,989 | 13968 | -- Andreas, 2016-07-29 issue #707, comment of 2012-10-31
open import Common.Nat
data Vec (A : Set) : Nat → Set where
[] : Vec A zero
_∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n)
v0 v1 v2 : Vec Nat _
v0 = []
v1 = 0 ∷ v0
v2 = 1 ∷ v1
-- Works, but maybe questionable.
-- The _ is triplicated into three different internal metas.
|
testcode/mp3-final.asm | tanishq-dubey/lc3processor | 2 | 101375 | <filename>testcode/mp3-final.asm
ORIGIN 0
SEGMENT CodeSegment1:
START:
LEA R0, DataSegment
ADD R1, R1, 12
NOP
NOP
NOP
ADD R1, R1, -5
NOP
NOP
NOP
ADD R1, R1, 0
NOP
NOP
NOP
STR R1, R0, aacus
AND R2, R0, 4x0F
NOP
NOP
NOP
STR R2, R0, joiner
NOP
NOP
NOP
LDR R3, R0, DEEB
NOP
NOP
NOP
LDR R4, R0, LEAF
NOP
NOP
NOP
LDR R5, R0, D22D
NOP
NOP
NOP
LDR R6, R0, LIFE
NOP
NOP
NOP
ADD R3, R3, R4
NOP
NOP
NOP
ADD R3, R3, R3
NOP
NOP
NOP
STR R3, R0, calcx
AND R4, R5, R3
NOP
NOP
NOP
STR R4, R0, joiner
NOT R5, R5
NOP
NOP
NOP
STR R5, R0, duh
LDR R6, R0, FOED
NOP
NOP
NOP
LDR R7, R0, FOED
NOP
NOP
NOP
LSHF R6, R6, 8
NOP
NOP
NOP
RSHFL R7, R7, 3
NOP
NOP
NOP
RSHFA R6, R6, 6
NOP
NOP
NOP
STR R6, R0, fivespd
NOP
NOP
NOP
STR R7, R0, fivespd
NOP
NOP
NOP
LDR R1, R0, ZERO
LDR R2, R0, ZERO
LDR R3, R0, D22D
LDR R4, R0, LIFE
LDR R5, R0, FOED
LDR R6, R0, DEEB
LDR R7, R0, LEAF
SEGMENT CodeSegment2:
LDR R1, R0, BOMB
NOP
NOP
NOP
LEA R2, HOWHIGH
NOP
NOP
NOP
JMP R2
NOP
NOP
NOP
LDR R1, R0, GOOF
NOP
NOP
NOP
HOWHIGH:
STR R1, R0, dunk
NOP
NOP
NOP
LDR R2, R0, DEEB
NOP
NOP
NOP
STR R2, R0, SPOT1
LDR R3, R0, FOED
LDR R4, R0, LEAF
NOP
NOP
NOP
STR R3, R0, SPOT2
STR R4, R0, SPOT3
LDR R5, R0, GOOD
NOP
NOP
NOP
STR R5, R0, SPOT4
NOP
NOP
NOP
LDR R5, R0, SPOT1
LDR R4, R0, SPOT2
LDR R3, R0, SPOT3
LDR R2, R0, SPOT4
STR R5, R0, SPOT4
STR R4, R0, SPOT4
STR R3, R0, SPOT4
STR R2, R0, SPOT4
NOP
NOP
NOP
ADD R2, R2, R3
NOP
NOP
NOP
ADD R3, R4, R5
NOP
NOP
NOP
ADD R2, R2, R3
NOP
NOP
NOP
ADD R3, R0,1
NOP
NOP
NOP
STB R6, R3, ZOOP
LDR R4, R0, ZOOP
STB R7, R0, BEAD
LDR R3, R0, BEAD
NOP
NOP
NOP
STR R3, R0, chew
STR R4, R0, chew
ADD R3, R3, R4
LDR R4, R0, ZERO
JSR MUDDLE
STR R4, R0, MUDPIE
LEA R5, MUDDLER
NOP
NOP
NOP
JSRR R5
STR R5, R0, MUDPIE
ADD R6, R0, 1
NOP
NOP
NOP
LDB R6, R6, COOKIE
NOP
LDB R7, R0, COOKIE
NOP
STR R6, R0, crumb
NOP
STR R7, R0, crumb
NOP
NOP
NOP
ADD R6, R6, R7
TRAP FUN
STR R6, R0, FUN
LDR R1,R0, ZERO
LDR R2,R0, ZERO
LDR R3,R0, ZERO
LDR R4,R0, GOOD
LDR R5,R0, GOOD
LDR R6,R0, GOOD
LDI R1, R0, TEST
NOP
NOP
NOP
STI R4, R0, DONE
NOP
NOP
NOP
LDR R2, R0, RESULT
STR R1, R0, GOOF
STR R2, R0, GOOF
NOP
AND R3, R3, 0
BRp DOH
BRn DOH
BRnp DOH
BRz WOOHOO
BRnz DOH
BRnzp DOH
DOH:
ADD R3, R3, 4
WOOHOO:
ADD R3, R3, 6
AND R4,R4,0
BRz SOFAR
ADD R3, R3, 1
SOFAR:
ADD R3, R3, 6
AND R4,R4,0
BRnp DOH2
NOP
NOP
NOP
ADD R4, R4, 10
NOP
BRp SOGOOD
DOH2:
ADD R3, R3, 6
BRnzp GetOverHere
SOGOOD:
ADD R3, R3, 3
NOP
NOP
NOP
GetOverHere:
ADD R3, R3, R4
NOP
NOP
NOP
STR R3, R0, GOOF
STR R1, R0, SPOT1
STR R2, R0, SPOT2
STR R3, R0, SPOT3
LEA R1, bouncer
END_m:
JMP R1
SEGMENT DataSegment:
ZERO: DATA2 4x0000
ZOOP : DATA2 4x700F
BEAD : DATA2 4xBEAD
FUN : DATA2 HOPE
DEEB: DATA2 4xDEEB
LEAF: DATA2 4x1EAF
D22D: DATA2 4xD22D
LIFE: DATA2 4x0042
FOED: DATA2 4xF0ED
BOMB: DATA2 4xB006
GOOF: DATA2 4x600F
dunk: DATA2 4xdddd
RESULT: DATA2 4x0000
GOOD: DATA2 4x600D
COOKIE: DATA2 4xD0CA
FOOB: DATA2 4xF00B
aacus: DATA2 4xFFFF
joiner: DATA2 4x1010
calcx: DATA2 4x1234
fivespd:DATA2 4x8921
duh: DATA2 4x9999
chew: DATA2 4xcccc
crumb: DATA2 4x6969
GAME: DATA2 4xba11
SPOT1: DATA2 4x8888
SPOT2: DATA2 4xABCD
SPOT3: DATA2 4x0110
SPOT4: DATA2 4xABBA
TEST: DATA2 GAME
DONE: DATA2 RESULT
MUDPIE: DATA2 4x0000
BLUNDER: DATA2 bouncer
MUDDLE:
NOP
NOP
NOP
ADD R4, R4,14
RET
MUDDLER:
LDR R5, R0, LIFE
RET
HOPE:
LDR R1,R0, GOOD
LDR R2,R0, GOOD
LDR R3,R0, GOOD
LDR R4,R0, GOOD
LDR R5,R0, GOOD
LDR R6,R0, GOOD
RET
SEGMENT bouncer:
Beg1:
LEA R0, ThisDataSeg
AND R1, R1, 0
AND R2, R2, 0
AND R3, R3, 0
ADD R3, R3, 13
ADD R2, R2, 4xB
ADD R1, R2, R3
ADD R4, R1, 3
LSHF R2, R2, 3
NOT R5, R3
AND R3, R2, 15
NOP
NOP
ADD R5, R3, R3
ADD R1, R4, 5
ADD R1, R4, 10
ADD R1, R4, 14
AND R2, R1, -1
STR R2, R0, BlackHole
STR R5, R0, BlackHole
ADD R0, R0, 2
STR R2, R0, BlackHole
ADD R0, R0, -2
LDR R3, R0, Photostat
LDR R3, R0, LdThis
STR R3, R0, Photostat
LDR R3, R0, nosedive
ADD R4, R3, 11
LDR R3, R0, tailspin
rshfl R4, R4, 1
ADD R5, R3, 7
LDI R1, R0, compass
ADD R5, R5, 12
ADD R1, R4, 12
ADD R2, R3, 12
STR R1, R0, beancounter
STR R2, R0, beancounter
STR R3, R0, beancounter
STR R4, R0, beancounter
STR R5, R0, beancounter
ADD R5, R1, 0
ADD R6, R3, 0
ADD R7, R4, 0
AND R1, R1, 0
AND R3, R3, 0
AND R4, R4, 0
ADD R1, R1, 8
ADD R3, R3, 2
ADD R4, R4, 2
BRp T1
ADD R3, R3, 1
T1:
ADD R1, R1, 9
BRn T2
ADD R4, R4, 1
LDR R0, R0, beancounter
LEA R0, DataSegment
LDR R2, R0, SPOT1
LDR R6, R0, SPOT2
LDR R7, R0, SPOT3
LEA R0, ThisDataSeg
AND R3, R3, 0
AND R4, R4, 0
NOP
ADD R3, R3, 2
ADD R4, R4, 3
T2:
LDR R1, R0, pessimist
BRn T3
ADD R3, R3, 1
T3:
LDR R1, R0, optimist
BRz T4
ADD R4, R4, 1
T4:
LDI R1, R0, gloomy
BRnz T5
ADD R3, R3, 1
T5:
LDI R1, R0, compass
BRnz T6
ADD R4, R4, 1
T6:
AND R1, R0, 0
LEA R1, ThisDataSeg
BRp T7
ADD R3, R3, 1
T7:
STR R3, R0, cc1
STR R4, R0, cc2
AND R1, R1, 0
AND R5, R5, 0
ADD R1, R1, -1
BRn T10
ADD R5, R5, 1
ADD R1, R1, -7
T10:
ADD R5, R1, R5
NOP
NOP
NOP
STR R5, R0, acorn
ADD R0, R5, 0
SEGMENT GoofyCode:
AND R5, R5, 0
LEA R1, GetHere
JMP R1
ADD R5, R5, 1
GetHere:
ADD R5, R0, R5
LEA R0, DataSegment
nop
nop
nop
LDR R1, R0, FUN
LEA R0, ThisDataSeg
STR R5, R0, BlackHole
brnzp MoneyMoney
SEGMENT ThisDataSeg:
BlackHole: DATA2 0
WormHole: DATA2 0
LdThis: DATA2 4xabda
Photostat: DATA2 0
nosedive: DATA2 4x9A4D
tailspin: DATA2 4x3DAC
compass: DATA2 quark
beancounter: DATA2 4xfadd
pessimist: DATA2 4xFB03
optimist: DATA2 4x0111
gloomy: DATA2 pessimist
cc1: DATA2 4xf00f
cc2: DATA2 4xf00f
acorn: DATA2 4x0FEE
quark: DATA2 4x276C
payout: DATA2 MoneyMoney
SEGMENT MoneyMoney:
AND R7, R7, 0
AND R6, R6, 0
AND R5, R5, 0
AND R4, R4, 0
AND R3, R3, 0
AND R2, R2, 0
AND R1, R1, 0
AND R0, R0, 0
LEA R0, DataSegmentMtest
LEA R1, Matrix1
LDR R2, R0, Counter2
LDR R3, R0, TWOFIVESIX
FillM1:
STR R2, R1, 0
ADD R2, R2, -7
ADD R1, R1, 2
ADD R3, R3, -1
BRp FillM1
LEA R4, Matrix1
LDR R2, R0, TWOFIVESIX
ADD R4, R2, R4
LDR R3, R0, Counter2
AND R1, R1, 0
AND R2, R2, 0
FILLM2:
JSR CalAddress
ADD R6, R5, R4
STR R3, R6, 0
ADD R3, R3, -2
JSR CalNext2
ADD R5, R1, 0
BRzp FillM2
LEA R4, Matrix1
LDR R2, R0, TWOFIVESIX
ADD R4, R2, R4
ADD R4, R2, R4
LDR R3, R0, Counter2
AND R1, R1, 0
AND R2, R2, 0
FILLM3:
JSR CalAddress
ADD R6, R5, R4
STR R3, R6, 0
ADD R3, R3, -5
JSR CalNext3
ADD R5, R1, 0
BRzp FillM3
LEA R3, Matrix1
LDR R4, R0, TWOFIVESIX
ADD R4, R3, R4
AND R6, R6, 0
Continue1_2:
LDR R1, R0, X2
LDR R2, R0, Y2
JSR CalAddress
ADD R7, R5, R4
LDR R6, R7, 0
JSR CALNEXT3
STR R1, R0, X2
STR R2, R0, Y2
LDR R1, R0, X1
LDR R2, R0, Y1
JSR CalAddress
ADD R5, R5, R3
LDR R7, R5, 0
ADD R6, R6, R7
STR R6, R5, 0
JSR CALNEXT2
ADD R7, R1, 0
BRn Done3
STR R1, R0, X1
STR R2, R0, Y1
BRnzp COntinue1_2
Done3:
AND R1, R1, 0
STR R1, R0, X1
STR R1, R0, X2
STR R1, R0, Y1
STR R1, R0, Y2
LEA R3, Matrix1
LDR R4, R0, TWOFIVESIX
ADD R4, R4, R4
ADD R4, R3, R4
AND R6, R6, 0
Continue1_3:
LDR R1, R0, X2
LDR R2, R0, Y2
JSR CalAddress
ADD R7, R5, R3
LDR R6, R7, 0
JSR CALNEXT1
STR R1, R0, X2
STR R2, R0, Y2
LDR R1, R0, X1
LDR R2, R0, Y1
JSR CalAddress
ADD R5, R5, R4
LDR R7, R5, 0
ADD R6, R6, R7
STR R6, R5, 0
JSR CALNEXT3
ADD R7, R1, 0
BRn Done4
STR R1, R0, X1
STR R2, R0, Y1
BRnzp COntinue1_3
Done4:
BRnzp CheckSUM
CalNEXT1:
ADD R5, R1, -15
BRz Ytest
ADD R1, R1, 1
BRnzp SKIP
YTEST:
ADD R5, R2, -15
BRz DoneFor
ADD R2, R2, 1
AND R1, R1, 0
BRnzp SKIP
DoneFor:
AND R1, R1, 0
ADD R1, R1, -1
SKip:
RET
CalNEXT2:
ADD R5, R2, -15
BRz Xtest
ADD R2, R2, 1
BRnzp SKIP1
XTEST:
ADD R5, R1, -15
BRz Done1
ADD R1, R1, 1
AND R2, R2, 0
BRnzp SKIP1
Done1:
AND R1, R1, 0
ADD R1, R1, -1
SKip1:
RET
CalNEXT3:
STR R3, R0, TEMP3
ADD R3, R1, -15
BRz DRow
ADD R3, R2, 0
BRz DRow1
LDR R3, R0, NEGONEFIVE
ADD R3, R1, -15
BRz DRow
ADD R1, R1, 1
ADD R2, R2, -1
BRnzp SKIP2
DRow1:
ADD R2, R1, 1
AND R1, R1, 0
BRnzp SKIP2
DRow:
ADD R3, R2, -15
BRz Done2
ADD R1, R2, 1
AND R2, R2, 0
ADD R2, R2, 15
BRnzp SKIP2
Done2:
AND R1, R1, 0
ADD R1, R1, -1
SKIP2:
LDR R3, R0, TEMP3
RET
CalAddress:
LSHF R5, R2, 4
ADD R5, R1, R5
LSHF R5, R5, 1
RET
CHECKSUM:
LEA R1, Matrix1
LDR R4, R0, TWOFIVESIX
ADD R4, R4, R4
ADD R1, R4, R1
AND R7, R7, 0
AND R6, R6, 0
AND R5, R5, 0
AND R4, R4, 0
LDR R2, R0, ONEFOURTHREE
LoopRowsA:
LDR R3, R1, 0
ADD R4, R3, R4
ADD R1, R1, 2
ADD R2, R2, -1
BRzp LoopRowsA
LSHF R4,R4,2
LDR R2, R0, ONEFOURTHREE
LoopRowsB:
LDR R3, R1, 0
ADD R5, R3, R5
ADD R1, R1, 2
ADD R2, R2, -1
BRzp LoopRowsB
LSHF R5,R5,2
LDR R2, R0, ONEFOURTHREE
LoopRowsC:
LDR R3, R1, 0
ADD R6, R3, R6
ADD R1, R1, 2
ADD R2, R2, -1
BRzp LoopRowsC
LSHF R6,R6,2
LDR R2, R0, ONEFOURTHREE
LoopRowsD:
LDR R3, R1, 0
ADD R7, R3, R7
ADD R1, R1, 2
ADD R2, R2, -1
BRzp LoopRowsD
AND R3, R3,R7
NOT R7,R7
HALT:
BRnzp HALT
SEGMENT DataSegmentMtest:
X1: DATA2 4x0000
Y1: DATA2 4x0000
X2: DATA2 4x0000
Y2: DATA2 4x0000
TEMP1: DATA2 4x0000
TEMP2: DATA2 4x0000
TEMP3: DATA2 4x0000
TEMP4: DATA2 4x0000
TWOFIVESIX: DATA2 256
UpperMemStart: DATA2 4xF000
Counter1: DATA2 4x0FFF
Counter2: DATA2 4x4A3F
ONEFOURTHREE: DATA2 63
NEGONEFIVE: DATA2 -15
Mask: Data2 4x00FF
SEGMENT Matrix1:
M00: DATA2 4x0000
M01: DATA2 4x0000
M02: DATA2 4x0000
M03: DATA2 4x0000
M04: DATA2 4x0000
M05: DATA2 4x0000
M06: DATA2 4x0000
M07: DATA2 4x0000
M08: DATA2 4x0000
M09: DATA2 4x0000
M0A: DATA2 4x0000
M0B: DATA2 4x0000
M0C: DATA2 4x0000
M0D: DATA2 4x0000
M0E: DATA2 4x0000
M0F: DATA2 4x0000
M10: DATA2 4x0000
M11: DATA2 4x0000
M12: DATA2 4x0000
M13: DATA2 4x0000
M14: DATA2 4x0000
M15: DATA2 4x0000
M16: DATA2 4x0000
M17: DATA2 4x0000
M18: DATA2 4x0000
M19: DATA2 4x0000
M1A: DATA2 4x0000
M1B: DATA2 4x0000
M1C: DATA2 4x0000
M1D: DATA2 4x0000
M1E: DATA2 4x0000
M1F: DATA2 4x0000
M20: DATA2 4x0000
M21: DATA2 4x0000
M22: DATA2 4x0000
M23: DATA2 4x0000
M24: DATA2 4x0000
M25: DATA2 4x0000
M26: DATA2 4x0000
M27: DATA2 4x0000
M28: DATA2 4x0000
M29: DATA2 4x0000
M2A: DATA2 4x0000
M2B: DATA2 4x0000
M2C: DATA2 4x0000
M2D: DATA2 4x0000
M2E: DATA2 4x0000
M2F: DATA2 4x0000
M30: DATA2 4x0000
M31: DATA2 4x0000
M32: DATA2 4x0000
M33: DATA2 4x0000
M34: DATA2 4x0000
M35: DATA2 4x0000
M36: DATA2 4x0000
M37: DATA2 4x0000
M38: DATA2 4x0000
M39: DATA2 4x0000
M3A: DATA2 4x0000
M3B: DATA2 4x0000
M3C: DATA2 4x0000
M3D: DATA2 4x0000
M3E: DATA2 4x0000
M3F: DATA2 4x0000
M40: DATA2 4x0000
M41: DATA2 4x0000
M42: DATA2 4x0000
M43: DATA2 4x0000
M44: DATA2 4x0000
M45: DATA2 4x0000
M46: DATA2 4x0000
M47: DATA2 4x0000
M48: DATA2 4x0000
M49: DATA2 4x0000
M4A: DATA2 4x0000
M4B: DATA2 4x0000
M4C: DATA2 4x0000
M4D: DATA2 4x0000
M4E: DATA2 4x0000
M4F: DATA2 4x0000
M50: DATA2 4x0000
M51: DATA2 4x0000
M52: DATA2 4x0000
M53: DATA2 4x0000
M54: DATA2 4x0000
M55: DATA2 4x0000
M56: DATA2 4x0000
M57: DATA2 4x0000
M58: DATA2 4x0000
M59: DATA2 4x0000
M5A: DATA2 4x0000
M5B: DATA2 4x0000
M5C: DATA2 4x0000
M5D: DATA2 4x0000
M5E: DATA2 4x0000
M5F: DATA2 4x0000
M60: DATA2 4x0000
M61: DATA2 4x0000
M62: DATA2 4x0000
M63: DATA2 4x0000
M64: DATA2 4x0000
M65: DATA2 4x0000
M66: DATA2 4x0000
M67: DATA2 4x0000
M68: DATA2 4x0000
M69: DATA2 4x0000
M6A: DATA2 4x0000
M6B: DATA2 4x0000
M6C: DATA2 4x0000
M6D: DATA2 4x0000
M6E: DATA2 4x0000
M6F: DATA2 4x0000
M70: DATA2 4x0000
M71: DATA2 4x0000
M72: DATA2 4x0000
M73: DATA2 4x0000
M74: DATA2 4x0000
M75: DATA2 4x0000
M76: DATA2 4x0000
M77: DATA2 4x0000
M78: DATA2 4x0000
M79: DATA2 4x0000
M7A: DATA2 4x0000
M7B: DATA2 4x0000
M7C: DATA2 4x0000
M7D: DATA2 4x0000
M7E: DATA2 4x0000
M7F: DATA2 4x0000
M80: DATA2 4x0000
M81: DATA2 4x0000
M82: DATA2 4x0000
M83: DATA2 4x0000
M84: DATA2 4x0000
M85: DATA2 4x0000
M86: DATA2 4x0000
M87: DATA2 4x0000
M88: DATA2 4x0000
M89: DATA2 4x0000
M8A: DATA2 4x0000
M8B: DATA2 4x0000
M8C: DATA2 4x0000
M8D: DATA2 4x0000
M8E: DATA2 4x0000
M8F: DATA2 4x0000
M90: DATA2 4x0000
M91: DATA2 4x0000
M92: DATA2 4x0000
M93: DATA2 4x0000
M94: DATA2 4x0000
M95: DATA2 4x0000
M96: DATA2 4x0000
M97: DATA2 4x0000
M98: DATA2 4x0000
M99: DATA2 4x0000
M9A: DATA2 4x0000
M9B: DATA2 4x0000
M9C: DATA2 4x0000
M9D: DATA2 4x0000
M9E: DATA2 4x0000
M9F: DATA2 4x0000
MA0: DATA2 4x0000
MA1: DATA2 4x0000
MA2: DATA2 4x0000
MA3: DATA2 4x0000
MA4: DATA2 4x0000
MA5: DATA2 4x0000
MA6: DATA2 4x0000
MA7: DATA2 4x0000
MA8: DATA2 4x0000
MA9: DATA2 4x0000
MAA: DATA2 4x0000
MAB: DATA2 4x0000
MAC: DATA2 4x0000
MAD: DATA2 4x0000
MAE: DATA2 4x0000
MAF: DATA2 4x0000
MB0: DATA2 4x0000
MB1: DATA2 4x0000
MB2: DATA2 4x0000
MB3: DATA2 4x0000
MB4: DATA2 4x0000
MB5: DATA2 4x0000
MB6: DATA2 4x0000
MB7: DATA2 4x0000
MB8: DATA2 4x0000
MB9: DATA2 4x0000
MBA: DATA2 4x0000
MBB: DATA2 4x0000
MBC: DATA2 4x0000
MBD: DATA2 4x0000
MBE: DATA2 4x0000
MBF: DATA2 4x0000
MC0: DATA2 4x0000
MC1: DATA2 4x0000
MC2: DATA2 4x0000
MC3: DATA2 4x0000
MC4: DATA2 4x0000
MC5: DATA2 4x0000
MC6: DATA2 4x0000
MC7: DATA2 4x0000
MC8: DATA2 4x0000
MC9: DATA2 4x0000
MCA: DATA2 4x0000
MCB: DATA2 4x0000
MCC: DATA2 4x0000
MCD: DATA2 4x0000
MCE: DATA2 4x0000
MCF: DATA2 4x0000
MD0: DATA2 4x0000
MD1: DATA2 4x0000
MD2: DATA2 4x0000
MD3: DATA2 4x0000
MD4: DATA2 4x0000
MD5: DATA2 4x0000
MD6: DATA2 4x0000
MD7: DATA2 4x0000
MD8: DATA2 4x0000
MD9: DATA2 4x0000
MDA: DATA2 4x0000
MDB: DATA2 4x0000
MDC: DATA2 4x0000
MDD: DATA2 4x0000
MDE: DATA2 4x0000
MDF: DATA2 4x0000
ME0: DATA2 4x0000
ME1: DATA2 4x0000
ME2: DATA2 4x0000
ME3: DATA2 4x0000
ME4: DATA2 4x0000
ME5: DATA2 4x0000
ME6: DATA2 4x0000
ME7: DATA2 4x0000
ME8: DATA2 4x0000
ME9: DATA2 4x0000
MEA: DATA2 4x0000
MEB: DATA2 4x0000
MEC: DATA2 4x0000
MED: DATA2 4x0000
MEE: DATA2 4x0000
MEF: DATA2 4x0000
MF0: DATA2 4x0000
MF1: DATA2 4x0000
MF2: DATA2 4x0000
MF3: DATA2 4x0000
MF4: DATA2 4x0000
MF5: DATA2 4x0000
MF6: DATA2 4x0000
MF7: DATA2 4x0000
MF8: DATA2 4x0000
MF9: DATA2 4x0000
MFA: DATA2 4x0000
MFB: DATA2 4x0000
MFC: DATA2 4x0000
MFD: DATA2 4x0000
MFE: DATA2 4x0000
MFF: DATA2 4x0000
SEGMENT Matrix2:
N00: DATA2 4x0000
N01: DATA2 4x0000
N02: DATA2 4x0000
N03: DATA2 4x0000
N04: DATA2 4x0000
N05: DATA2 4x0000
N06: DATA2 4x0000
N07: DATA2 4x0000
N08: DATA2 4x0000
N09: DATA2 4x0000
N0A: DATA2 4x0000
N0B: DATA2 4x0000
N0C: DATA2 4x0000
N0D: DATA2 4x0000
N0E: DATA2 4x0000
N0F: DATA2 4x0000
N10: DATA2 4x0000
N11: DATA2 4x0000
N12: DATA2 4x0000
N13: DATA2 4x0000
N14: DATA2 4x0000
N15: DATA2 4x0000
N16: DATA2 4x0000
N17: DATA2 4x0000
N18: DATA2 4x0000
N19: DATA2 4x0000
N1A: DATA2 4x0000
N1B: DATA2 4x0000
N1C: DATA2 4x0000
N1D: DATA2 4x0000
N1E: DATA2 4x0000
N1F: DATA2 4x0000
N20: DATA2 4x0000
N21: DATA2 4x0000
N22: DATA2 4x0000
N23: DATA2 4x0000
N24: DATA2 4x0000
N25: DATA2 4x0000
N26: DATA2 4x0000
N27: DATA2 4x0000
N28: DATA2 4x0000
N29: DATA2 4x0000
N2A: DATA2 4x0000
N2B: DATA2 4x0000
N2C: DATA2 4x0000
N2D: DATA2 4x0000
N2E: DATA2 4x0000
N2F: DATA2 4x0000
N30: DATA2 4x0000
N31: DATA2 4x0000
N32: DATA2 4x0000
N33: DATA2 4x0000
N34: DATA2 4x0000
N35: DATA2 4x0000
N36: DATA2 4x0000
N37: DATA2 4x0000
N38: DATA2 4x0000
N39: DATA2 4x0000
N3A: DATA2 4x0000
N3B: DATA2 4x0000
N3C: DATA2 4x0000
N3D: DATA2 4x0000
N3E: DATA2 4x0000
N3F: DATA2 4x0000
N40: DATA2 4x0000
N41: DATA2 4x0000
N42: DATA2 4x0000
N43: DATA2 4x0000
N44: DATA2 4x0000
N45: DATA2 4x0000
N46: DATA2 4x0000
N47: DATA2 4x0000
N48: DATA2 4x0000
N49: DATA2 4x0000
N4A: DATA2 4x0000
N4B: DATA2 4x0000
N4C: DATA2 4x0000
N4D: DATA2 4x0000
N4E: DATA2 4x0000
N4F: DATA2 4x0000
N50: DATA2 4x0000
N51: DATA2 4x0000
N52: DATA2 4x0000
N53: DATA2 4x0000
N54: DATA2 4x0000
N55: DATA2 4x0000
N56: DATA2 4x0000
N57: DATA2 4x0000
N58: DATA2 4x0000
N59: DATA2 4x0000
N5A: DATA2 4x0000
N5B: DATA2 4x0000
N5C: DATA2 4x0000
N5D: DATA2 4x0000
N5E: DATA2 4x0000
N5F: DATA2 4x0000
N60: DATA2 4x0000
N61: DATA2 4x0000
N62: DATA2 4x0000
N63: DATA2 4x0000
N64: DATA2 4x0000
N65: DATA2 4x0000
N66: DATA2 4x0000
N67: DATA2 4x0000
N68: DATA2 4x0000
N69: DATA2 4x0000
N6A: DATA2 4x0000
N6B: DATA2 4x0000
N6C: DATA2 4x0000
N6D: DATA2 4x0000
N6E: DATA2 4x0000
N6F: DATA2 4x0000
N70: DATA2 4x0000
N71: DATA2 4x0000
N72: DATA2 4x0000
N73: DATA2 4x0000
N74: DATA2 4x0000
N75: DATA2 4x0000
N76: DATA2 4x0000
N77: DATA2 4x0000
N78: DATA2 4x0000
N79: DATA2 4x0000
N7A: DATA2 4x0000
N7B: DATA2 4x0000
N7C: DATA2 4x0000
N7D: DATA2 4x0000
N7E: DATA2 4x0000
N7F: DATA2 4x0000
N80: DATA2 4x0000
N81: DATA2 4x0000
N82: DATA2 4x0000
N83: DATA2 4x0000
N84: DATA2 4x0000
N85: DATA2 4x0000
N86: DATA2 4x0000
N87: DATA2 4x0000
N88: DATA2 4x0000
N89: DATA2 4x0000
N8A: DATA2 4x0000
N8B: DATA2 4x0000
N8C: DATA2 4x0000
N8D: DATA2 4x0000
N8E: DATA2 4x0000
N8F: DATA2 4x0000
N90: DATA2 4x0000
N91: DATA2 4x0000
N92: DATA2 4x0000
N93: DATA2 4x0000
N94: DATA2 4x0000
N95: DATA2 4x0000
N96: DATA2 4x0000
N97: DATA2 4x0000
N98: DATA2 4x0000
N99: DATA2 4x0000
N9A: DATA2 4x0000
N9B: DATA2 4x0000
N9C: DATA2 4x0000
N9D: DATA2 4x0000
N9E: DATA2 4x0000
N9F: DATA2 4x0000
NA0: DATA2 4x0000
NA1: DATA2 4x0000
NA2: DATA2 4x0000
NA3: DATA2 4x0000
NA4: DATA2 4x0000
NA5: DATA2 4x0000
NA6: DATA2 4x0000
NA7: DATA2 4x0000
NA8: DATA2 4x0000
NA9: DATA2 4x0000
NAA: DATA2 4x0000
NAB: DATA2 4x0000
NAC: DATA2 4x0000
NAD: DATA2 4x0000
NAE: DATA2 4x0000
NAF: DATA2 4x0000
NB0: DATA2 4x0000
NB1: DATA2 4x0000
NB2: DATA2 4x0000
NB3: DATA2 4x0000
NB4: DATA2 4x0000
NB5: DATA2 4x0000
NB6: DATA2 4x0000
NB7: DATA2 4x0000
NB8: DATA2 4x0000
NB9: DATA2 4x0000
NBA: DATA2 4x0000
NBB: DATA2 4x0000
NBC: DATA2 4x0000
NBD: DATA2 4x0000
NBE: DATA2 4x0000
NBF: DATA2 4x0000
NC0: DATA2 4x0000
NC1: DATA2 4x0000
NC2: DATA2 4x0000
NC3: DATA2 4x0000
NC4: DATA2 4x0000
NC5: DATA2 4x0000
NC6: DATA2 4x0000
NC7: DATA2 4x0000
NC8: DATA2 4x0000
NC9: DATA2 4x0000
NCA: DATA2 4x0000
NCB: DATA2 4x0000
NCC: DATA2 4x0000
NCD: DATA2 4x0000
NCE: DATA2 4x0000
NCF: DATA2 4x0000
ND0: DATA2 4x0000
ND1: DATA2 4x0000
ND2: DATA2 4x0000
ND3: DATA2 4x0000
ND4: DATA2 4x0000
ND5: DATA2 4x0000
ND6: DATA2 4x0000
ND7: DATA2 4x0000
ND8: DATA2 4x0000
ND9: DATA2 4x0000
NDA: DATA2 4x0000
NDB: DATA2 4x0000
NDC: DATA2 4x0000
NDD: DATA2 4x0000
NDE: DATA2 4x0000
NDF: DATA2 4x0000
NE0: DATA2 4x0000
NE1: DATA2 4x0000
NE2: DATA2 4x0000
NE3: DATA2 4x0000
NE4: DATA2 4x0000
NE5: DATA2 4x0000
NE6: DATA2 4x0000
NE7: DATA2 4x0000
NE8: DATA2 4x0000
NE9: DATA2 4x0000
NEA: DATA2 4x0000
NEB: DATA2 4x0000
NEC: DATA2 4x0000
NED: DATA2 4x0000
NEE: DATA2 4x0000
NEF: DATA2 4x0000
NF0: DATA2 4x0000
NF1: DATA2 4x0000
NF2: DATA2 4x0000
NF3: DATA2 4x0000
NF4: DATA2 4x0000
NF5: DATA2 4x0000
NF6: DATA2 4x0000
NF7: DATA2 4x0000
NF8: DATA2 4x0000
NF9: DATA2 4x0000
NFA: DATA2 4x0000
NFB: DATA2 4x0000
NFC: DATA2 4x0000
NFD: DATA2 4x0000
NFE: DATA2 4x0000
NFF: DATA2 4x0000
SEGMENT Matrix3:
O00: DATA2 4x0000
O01: DATA2 4x0000
O02: DATA2 4x0000
O03: DATA2 4x0000
O04: DATA2 4x0000
O05: DATA2 4x0000
O06: DATA2 4x0000
O07: DATA2 4x0000
O08: DATA2 4x0000
O09: DATA2 4x0000
O0A: DATA2 4x0000
O0B: DATA2 4x0000
O0C: DATA2 4x0000
O0D: DATA2 4x0000
O0E: DATA2 4x0000
O0F: DATA2 4x0000
O10: DATA2 4x0000
O11: DATA2 4x0000
O12: DATA2 4x0000
O13: DATA2 4x0000
O14: DATA2 4x0000
O15: DATA2 4x0000
O16: DATA2 4x0000
O17: DATA2 4x0000
O18: DATA2 4x0000
O19: DATA2 4x0000
O1A: DATA2 4x0000
O1B: DATA2 4x0000
O1C: DATA2 4x0000
O1D: DATA2 4x0000
O1E: DATA2 4x0000
O1F: DATA2 4x0000
O20: DATA2 4x0000
O21: DATA2 4x0000
O22: DATA2 4x0000
O23: DATA2 4x0000
O24: DATA2 4x0000
O25: DATA2 4x0000
O26: DATA2 4x0000
O27: DATA2 4x0000
O28: DATA2 4x0000
O29: DATA2 4x0000
O2A: DATA2 4x0000
O2B: DATA2 4x0000
O2C: DATA2 4x0000
O2D: DATA2 4x0000
O2E: DATA2 4x0000
O2F: DATA2 4x0000
O30: DATA2 4x0000
O31: DATA2 4x0000
O32: DATA2 4x0000
O33: DATA2 4x0000
O34: DATA2 4x0000
O35: DATA2 4x0000
O36: DATA2 4x0000
O37: DATA2 4x0000
O38: DATA2 4x0000
O39: DATA2 4x0000
O3A: DATA2 4x0000
O3B: DATA2 4x0000
O3C: DATA2 4x0000
O3D: DATA2 4x0000
O3E: DATA2 4x0000
O3F: DATA2 4x0000
O40: DATA2 4x0000
O41: DATA2 4x0000
O42: DATA2 4x0000
O43: DATA2 4x0000
O44: DATA2 4x0000
O45: DATA2 4x0000
O46: DATA2 4x0000
O47: DATA2 4x0000
O48: DATA2 4x0000
O49: DATA2 4x0000
O4A: DATA2 4x0000
O4B: DATA2 4x0000
O4C: DATA2 4x0000
O4D: DATA2 4x0000
O4E: DATA2 4x0000
O4F: DATA2 4x0000
O50: DATA2 4x0000
O51: DATA2 4x0000
O52: DATA2 4x0000
O53: DATA2 4x0000
O54: DATA2 4x0000
O55: DATA2 4x0000
O56: DATA2 4x0000
O57: DATA2 4x0000
O58: DATA2 4x0000
O59: DATA2 4x0000
O5A: DATA2 4x0000
O5B: DATA2 4x0000
O5C: DATA2 4x0000
O5D: DATA2 4x0000
O5E: DATA2 4x0000
O5F: DATA2 4x0000
O60: DATA2 4x0000
O61: DATA2 4x0000
O62: DATA2 4x0000
O63: DATA2 4x0000
O64: DATA2 4x0000
O65: DATA2 4x0000
O66: DATA2 4x0000
O67: DATA2 4x0000
O68: DATA2 4x0000
O69: DATA2 4x0000
O6A: DATA2 4x0000
O6B: DATA2 4x0000
O6C: DATA2 4x0000
O6D: DATA2 4x0000
O6E: DATA2 4x0000
O6F: DATA2 4x0000
O70: DATA2 4x0000
O71: DATA2 4x0000
O72: DATA2 4x0000
O73: DATA2 4x0000
O74: DATA2 4x0000
O75: DATA2 4x0000
O76: DATA2 4x0000
O77: DATA2 4x0000
O78: DATA2 4x0000
O79: DATA2 4x0000
O7A: DATA2 4x0000
O7B: DATA2 4x0000
O7C: DATA2 4x0000
O7D: DATA2 4x0000
O7E: DATA2 4x0000
O7F: DATA2 4x0000
O80: DATA2 4x0000
O81: DATA2 4x0000
O82: DATA2 4x0000
O83: DATA2 4x0000
O84: DATA2 4x0000
O85: DATA2 4x0000
O86: DATA2 4x0000
O87: DATA2 4x0000
O88: DATA2 4x0000
O89: DATA2 4x0000
O8A: DATA2 4x0000
O8B: DATA2 4x0000
O8C: DATA2 4x0000
O8D: DATA2 4x0000
O8E: DATA2 4x0000
O8F: DATA2 4x0000
O90: DATA2 4x0000
O91: DATA2 4x0000
O92: DATA2 4x0000
O93: DATA2 4x0000
O94: DATA2 4x0000
O95: DATA2 4x0000
O96: DATA2 4x0000
O97: DATA2 4x0000
O98: DATA2 4x0000
O99: DATA2 4x0000
O9A: DATA2 4x0000
O9B: DATA2 4x0000
O9C: DATA2 4x0000
O9D: DATA2 4x0000
O9E: DATA2 4x0000
O9F: DATA2 4x0000
OA0: DATA2 4x0000
OA1: DATA2 4x0000
OA2: DATA2 4x0000
OA3: DATA2 4x0000
OA4: DATA2 4x0000
OA5: DATA2 4x0000
OA6: DATA2 4x0000
OA7: DATA2 4x0000
OA8: DATA2 4x0000
OA9: DATA2 4x0000
OAA: DATA2 4x0000
OAB: DATA2 4x0000
OAC: DATA2 4x0000
OAD: DATA2 4x0000
OAE: DATA2 4x0000
OAF: DATA2 4x0000
OB0: DATA2 4x0000
OB1: DATA2 4x0000
OB2: DATA2 4x0000
OB3: DATA2 4x0000
OB4: DATA2 4x0000
OB5: DATA2 4x0000
OB6: DATA2 4x0000
OB7: DATA2 4x0000
OB8: DATA2 4x0000
OB9: DATA2 4x0000
OBA: DATA2 4x0000
OBB: DATA2 4x0000
OBC: DATA2 4x0000
OBD: DATA2 4x0000
OBE: DATA2 4x0000
OBF: DATA2 4x0000
OC0: DATA2 4x0000
OC1: DATA2 4x0000
OC2: DATA2 4x0000
OC3: DATA2 4x0000
OC4: DATA2 4x0000
OC5: DATA2 4x0000
OC6: DATA2 4x0000
OC7: DATA2 4x0000
OC8: DATA2 4x0000
OC9: DATA2 4x0000
OCA: DATA2 4x0000
OCB: DATA2 4x0000
OCC: DATA2 4x0000
OCD: DATA2 4x0000
OCE: DATA2 4x0000
OCF: DATA2 4x0000
OD0: DATA2 4x0000
OD1: DATA2 4x0000
OD2: DATA2 4x0000
OD3: DATA2 4x0000
OD4: DATA2 4x0000
OD5: DATA2 4x0000
OD6: DATA2 4x0000
OD7: DATA2 4x0000
OD8: DATA2 4x0000
OD9: DATA2 4x0000
ODA: DATA2 4x0000
ODB: DATA2 4x0000
ODC: DATA2 4x0000
ODD: DATA2 4x0000
ODE: DATA2 4x0000
ODF: DATA2 4x0000
OE0: DATA2 4x0000
OE1: DATA2 4x0000
OE2: DATA2 4x0000
OE3: DATA2 4x0000
OE4: DATA2 4x0000
OE5: DATA2 4x0000
OE6: DATA2 4x0000
OE7: DATA2 4x0000
OE8: DATA2 4x0000
OE9: DATA2 4x0000
OEA: DATA2 4x0000
OEB: DATA2 4x0000
OEC: DATA2 4x0000
OED: DATA2 4x0000
OEE: DATA2 4x0000
OEF: DATA2 4x0000
OF0: DATA2 4x0000
OF1: DATA2 4x0000
OF2: DATA2 4x0000
OF3: DATA2 4x0000
OF4: DATA2 4x0000
OF5: DATA2 4x0000
OF6: DATA2 4x0000
OF7: DATA2 4x0000
OF8: DATA2 4x0000
OF9: DATA2 4x0000
OFA: DATA2 4x0000
OFB: DATA2 4x0000
OFC: DATA2 4x0000
OFD: DATA2 4x0000
OFE: DATA2 4x0000
OFF: DATA2 4x0000
|
Task/Ethiopian-multiplication/Ada/ethiopian-multiplication-3.ada | djgoku/RosettaCodeData | 0 | 28285 | <filename>Task/Ethiopian-multiplication/Ada/ethiopian-multiplication-3.ada<gh_stars>0
with Ethiopian; use Ethiopian;
with Ada.Text_Io; use Ada.Text_Io;
procedure Ethiopian_Test is
First : Integer := 17;
Second : Integer := 34;
begin
Put_Line(Integer'Image(First) & " times " &
Integer'Image(Second) & " = " &
Integer'Image(Multiply(First, Second)));
end Ethiopian_Test;
|
src/shaders/h264/ildb/AVC_ILDB_LumaThrdLimit.asm | me176c-dev/android_hardware_intel-vaapi-driver | 192 | 95400 | <reponame>me176c-dev/android_hardware_intel-vaapi-driver<filename>src/shaders/h264/ildb/AVC_ILDB_LumaThrdLimit.asm<gh_stars>100-1000
/*
* Copyright © <2010>, Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* This file was originally licensed under the following license
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
//========== Forward message to root thread through gateway ==========
// Chroma root kenrel updates luma thread limit.
#if defined(_DEBUG)
mov (1) EntrySignatureC:w 0x7788:w
#endif
// Init payload to r0
mov (8) GatewayPayload<1>:ud 0:w { NoDDClr }
// Forward a message:
// Offset = x relative to r50 (defiend in open gataway), x = ORIX >> 4 [bit 28:16]
// Need to shift left 16
mov (1) Offset_Length:ud THREAD_LIMIT_OFFSET:ud { NoDDClr, NoDDChk }
// Length = 1 byte, [bit 10:8 = 000]
//000 xxxxxxxxxxxxx 00000 000 00000000 ==> 000x xxxx xxxx xxxx 0000 0000 0000 0000
//mov (1) DispatchID:ub r0.20:ub // Dispatch ID
// Copy EUid and Thread ID that we received from the PARENT thread
mov (1) EUID_TID:uw r0.6:uw { NoDDClr, NoDDChk }
mov (1) GatewayPayloadKey:uw 0x1212:uw { NoDDChk } // Key
//mov (4) GatewayPayload<1>:ud 0:ud { NoDDClr, NoDDChk } // Init payload low 4 dword
// Write back one byte (value = 0xFF) to root thread GRF to indicate this child thread is finished
// All lower 4 bytes must be assigned to the same byte value.
add (1) Temp1_W:w MaxThreads:uw -OutstandingThreads:uw
mov (4) GatewayPayload<1>:ub Temp1_B<0;1,0>:ub
send (8) GatewayResponse:ud m0 GatewayPayload<8;8,1>:ud MSG_GW FWDMSGDSC
//========== Forward Msg Done ========================================
|
src/Categories/NaturalTransformation/Extranatural.agda | Trebor-Huang/agda-categories | 279 | 17185 | {-# OPTIONS --without-K --safe #-}
module Categories.NaturalTransformation.Extranatural where
-- Although there is a notion of Extranatural in Categories.NaturalTransformation.Dinatural,
-- it isn't the most general form, thus the need for this as well.
open import Level
open import Data.Product
open import Relation.Binary using (Rel; IsEquivalence; Setoid)
open import Categories.Category
open import Categories.NaturalTransformation as NT hiding (_∘ʳ_)
open import Categories.Functor
open import Categories.Functor.Construction.Constant
open import Categories.Category.Product
import Categories.Morphism.Reasoning as MR
private
variable
o₁ o₂ o₃ o₄ ℓ₁ ℓ₂ ℓ₃ ℓ₄ e₁ e₂ e₃ e₄ : Level
record ExtranaturalTransformation
{A : Category o₁ ℓ₁ e₁}
{B : Category o₂ ℓ₂ e₂}
{C : Category o₃ ℓ₃ e₃}
{D : Category o₄ ℓ₄ e₄}
(P : Functor (Product A (Product (Category.op B) B)) D)
(Q : Functor (Product A (Product (Category.op C) C)) D) : Set (o₁ ⊔ o₂ ⊔ o₃ ⊔ ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ e₄) where
private
module A = Category A
module B = Category B
module C = Category C
module D = Category D
module P = Functor P
module Q = Functor Q
open D hiding (op)
open Commutation D
field
α : ∀ a b c → D [ P.₀ (a , (b , b)) , Q.₀ (a , (c , c)) ]
commute : ∀ {a a′ b b′ c c′} (f : A [ a , a′ ]) (g : B [ b , b′ ])
(h : C [ c , c′ ]) →
[ P.₀ (a , (b′ , b) ) ⇒ Q.₀ (a′ , (c , c′)) ]⟨
P.₁ (f , B.id , g) ⇒⟨ P.₀ (a′ , (b′ , b′)) ⟩
α a′ b′ c ⇒⟨ Q.₀ (a′ , (c , c)) ⟩
Q.₁ (A.id , C.id , h)
≈ P.₁ (A.id , g , B.id) ⇒⟨ P.₀ (a , (b , b)) ⟩
α a b c′ ⇒⟨ Q.₀ (a , (c′ , c′)) ⟩
Q.₁ (f , h , C.id)
⟩
|
programs/oeis/256/A256966.asm | neoneye/loda | 22 | 24787 | ; A256966: Partial sums of A072649.
; 1,3,6,9,13,17,21,26,31,36,41,46,52,58,64,70,76,82,88,94,101,108,115,122,129,136,143,150,157,164,171,178,185,193,201,209,217,225,233,241,249,257,265,273,281,289,297,305,313,321,329,337
add $0,1
mov $1,$0
seq $1,130235 ; Partial sums of the 'lower' Fibonacci Inverse A130233.
sub $1,$0
mov $0,$1
|
bb-runtimes/src/a-intnam__zynqmp.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 29966 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . I N T E R R U P T S . N A M E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2012-2017, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is the Xilinx Ultrascale+ MPSoC version of this package
pragma Restrictions (No_Elaboration_Code);
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
-- Software Generated Interrupts (SGI)
SGI_0 : constant Interrupt_ID := 0; -- Reserved by the runtime
SGI_1 : constant Interrupt_ID := 1;
SGI_2 : constant Interrupt_ID := 2;
SGI_3 : constant Interrupt_ID := 3;
SGI_4 : constant Interrupt_ID := 4;
SGI_5 : constant Interrupt_ID := 5;
SGI_6 : constant Interrupt_ID := 6;
SGI_7 : constant Interrupt_ID := 7;
SGI_8 : constant Interrupt_ID := 8;
SGI_9 : constant Interrupt_ID := 9;
SGI_10 : constant Interrupt_ID := 10;
SGI_11 : constant Interrupt_ID := 11;
SGI_12 : constant Interrupt_ID := 12;
SGI_13 : constant Interrupt_ID := 13;
SGI_14 : constant Interrupt_ID := 14;
SGI_15 : constant Interrupt_ID := 15;
-- Private Peripheral Interrupts (PPI)
Virtual_Maintenance_Interrupt : constant Interrupt_ID := 25;
Hypervisor_Timer_Interrupt : constant Interrupt_ID := 26;
Virtual_Timer_Interrupt : constant Interrupt_ID := 27;
Legacy_FIQ_Interrupt : constant Interrupt_ID := 28;
Secure_Physical_Timer_Interrupt : constant Interrupt_ID := 29;
Non_Secure_Physical_Time_Interrupt : constant Interrupt_ID := 30;
Legacy_IRQ_Interrupt : constant Interrupt_ID := 31;
-- System Interrupts
RPU0_AMP_Interrupt : constant Interrupt_ID := 40;
RPU1_AMP_Interrupt : constant Interrupt_ID := 41;
OCM_Interrupt : constant Interrupt_ID := 42;
LPD_APB_Interrupt : constant Interrupt_ID := 43;
RPU0_ECC_Interrupt : constant Interrupt_ID := 44;
RPU1_ECC_Interrupt : constant Interrupt_ID := 45;
NAND_Interrupt : constant Interrupt_ID := 46;
QSPI_Interrupt : constant Interrupt_ID := 47;
GPIO_Interrupt : constant Interrupt_ID := 48;
I2C0_Interrupt : constant Interrupt_ID := 49;
I2C1_Interrupt : constant Interrupt_ID := 50;
SPI0_Interrupt : constant Interrupt_ID := 51;
SPI1_Interrupt : constant Interrupt_ID := 52;
UART0_Interrupt : constant Interrupt_ID := 53;
UART1_Interrupt : constant Interrupt_ID := 54;
CAN0_Interrupt : constant Interrupt_ID := 55;
CAN1_Interrupt : constant Interrupt_ID := 56;
LPD_APM_Interrupt : constant Interrupt_ID := 57;
RTC_Alarm_Interrupt : constant Interrupt_ID := 58;
RTC_Seconds_Interrupt : constant Interrupt_ID := 59;
ClkMon_Interrupt : constant Interrupt_ID := 60;
IPI_Ch7_Interrupt : constant Interrupt_ID := 61;
IPI_Ch8_Interrupt : constant Interrupt_ID := 62;
IPI_Ch9_Interrupt : constant Interrupt_ID := 63;
IPI_Ch10_Interrupt : constant Interrupt_ID := 64;
IPI_Ch2_Interrupt : constant Interrupt_ID := 65;
IPI_Ch1_Interrupt : constant Interrupt_ID := 66;
IPI_Ch0_Interrupt : constant Interrupt_ID := 67;
TTC0_0_Interrupt : constant Interrupt_ID := 68;
TTC0_1_Interrupt : constant Interrupt_ID := 69;
TTC0_2_Interrupt : constant Interrupt_ID := 70;
TTC1_0_Interrupt : constant Interrupt_ID := 71;
TTC1_1_Interrupt : constant Interrupt_ID := 72;
TTC1_2_Interrupt : constant Interrupt_ID := 73;
TTC2_0_Interrupt : constant Interrupt_ID := 74;
TTC2_1_Interrupt : constant Interrupt_ID := 75;
TTC2_2_Interrupt : constant Interrupt_ID := 76;
TTC3_0_Interrupt : constant Interrupt_ID := 77;
TTC3_1_Interrupt : constant Interrupt_ID := 78;
TTC3_2_Interrupt : constant Interrupt_ID := 79;
SDIO0_Interrupt : constant Interrupt_ID := 80;
SDIO1_Interrupt : constant Interrupt_ID := 81;
SDIO0_Wakeup_Interrupt : constant Interrupt_ID := 82;
SDIO1_Wakeup_Interrupt : constant Interrupt_ID := 83;
LPD_SWDT_Interrupt : constant Interrupt_ID := 84;
CSU_SWDT_Interrupt : constant Interrupt_ID := 85;
LPD_ATB_Interrupt : constant Interrupt_ID := 86;
AIB_Interrupt : constant Interrupt_ID := 87;
SysMon_Interrupt : constant Interrupt_ID := 88;
GEM0_Interrupt : constant Interrupt_ID := 89;
GEM0_Wakeup_Interrupt : constant Interrupt_ID := 90;
GEM1_Interrupt : constant Interrupt_ID := 91;
GEM1_Wakeup_Interrupt : constant Interrupt_ID := 92;
GEM2_Interrupt : constant Interrupt_ID := 93;
GEM2_Wakeup_Interrupt : constant Interrupt_ID := 94;
GEM3_Interrupt : constant Interrupt_ID := 95;
GEM3_Wakeup_Interrupt : constant Interrupt_ID := 96;
USB0_Endpoint0_Interrupt : constant Interrupt_ID := 97;
USB0_Endpoint1_Interrupt : constant Interrupt_ID := 98;
USB0_Endpoint2_Interrupt : constant Interrupt_ID := 99;
USB0_Endpoint3_Interrupt : constant Interrupt_ID := 100;
USB0_OTG_Interrupt : constant Interrupt_ID := 101;
USB1_Endpoint0_Interrupt : constant Interrupt_ID := 102;
USB1_Endpoint1_Interrupt : constant Interrupt_ID := 103;
USB1_Endpoint2_Interrupt : constant Interrupt_ID := 104;
USB1_Endpoint3_Interrupt : constant Interrupt_ID := 105;
USB1_OTG_Interrupt : constant Interrupt_ID := 106;
USB0_Wakeup_Interrupt : constant Interrupt_ID := 107;
USB1_Wakeup_Interrupt : constant Interrupt_ID := 108;
LPD_DMA_Ch0_Interrupt : constant Interrupt_ID := 109;
LPD_DMA_Ch1_Interrupt : constant Interrupt_ID := 110;
LPD_DMA_Ch2_Interrupt : constant Interrupt_ID := 111;
LPD_DMA_Ch3_Interrupt : constant Interrupt_ID := 112;
LPD_DMA_Ch4_Interrupt : constant Interrupt_ID := 113;
LPD_DMA_Ch5_Interrupt : constant Interrupt_ID := 114;
LPD_DMA_Ch6_Interrupt : constant Interrupt_ID := 115;
LPD_DMA_Ch7_Interrupt : constant Interrupt_ID := 116;
CSU_Interrupt : constant Interrupt_ID := 117;
CSU_DMA_Interrupt : constant Interrupt_ID := 118;
eFuse_Interrupt : constant Interrupt_ID := 119;
XPPU_Interrupt : constant Interrupt_ID := 120;
PL_PS_0_Interrupt : constant Interrupt_ID := 121;
PL_PS_1_Interrupt : constant Interrupt_ID := 122;
PL_PS_2_Interrupt : constant Interrupt_ID := 123;
PL_PS_3_Interrupt : constant Interrupt_ID := 124;
PL_PS_4_Interrupt : constant Interrupt_ID := 125;
PL_PS_5_Interrupt : constant Interrupt_ID := 126;
PL_PS_6_Interrupt : constant Interrupt_ID := 127;
PL_PS_7_Interrupt : constant Interrupt_ID := 128;
-- 7 reserved interrupts from 129 to 135
PL_PS_8_Interrupt : constant Interrupt_ID := 136;
PL_PS_9_Interrupt : constant Interrupt_ID := 137;
PL_PS_10_Interrupt : constant Interrupt_ID := 138;
PL_PS_11_Interrupt : constant Interrupt_ID := 139;
PL_PS_12_Interrupt : constant Interrupt_ID := 140;
PL_PS_13_Interrupt : constant Interrupt_ID := 141;
PL_PS_14_Interrupt : constant Interrupt_ID := 142;
PL_PS_15_Interrupt : constant Interrupt_ID := 143;
DDR_Interrupt : constant Interrupt_ID := 144;
FPD_SWDT_Interrupt : constant Interrupt_ID := 145;
PCIe_MSI0_Interrupt : constant Interrupt_ID := 146;
PCIe_MSI1_Interrupt : constant Interrupt_ID := 147;
PCIe_INTx_Interrupt : constant Interrupt_ID := 148;
PCIe_DMA_Interrupt : constant Interrupt_ID := 149;
PCIe_MSC_Interrupt : constant Interrupt_ID := 150;
DisplayPort_Interrupt : constant Interrupt_ID := 151;
FPD_APB_Interrupt : constant Interrupt_ID := 152;
FPD_DTB_Interrupt : constant Interrupt_ID := 153;
DPDMA_Interrupt : constant Interrupt_ID := 154;
FPD_ATM_Interrupt : constant Interrupt_ID := 155;
FPD_DMA_Ch0_Interrupt : constant Interrupt_ID := 156;
FPD_DMA_Ch1_Interrupt : constant Interrupt_ID := 157;
FPD_DMA_Ch2_Interrupt : constant Interrupt_ID := 158;
FPD_DMA_Ch3_Interrupt : constant Interrupt_ID := 159;
FPD_DMA_Ch4_Interrupt : constant Interrupt_ID := 160;
FPD_DMA_Ch5_Interrupt : constant Interrupt_ID := 161;
FPD_DMA_Ch6_Interrupt : constant Interrupt_ID := 162;
FPD_DMA_Ch7_Interrupt : constant Interrupt_ID := 163;
GPU_Interrupt : constant Interrupt_ID := 164;
SATA_Interrupt : constant Interrupt_ID := 165;
FPD_XMPU_Interrupt : constant Interrupt_ID := 166;
APU_VCPUMNT_0_Interrupt : constant Interrupt_ID := 167;
APU_VCPUMNT_1_Interrupt : constant Interrupt_ID := 168;
APU_VCPUMNT_2_Interrupt : constant Interrupt_ID := 169;
APU_VCPUMNT_3_Interrupt : constant Interrupt_ID := 170;
CPU_CTI_0_Interrupt : constant Interrupt_ID := 171;
CPU_CTI_1_Interrupt : constant Interrupt_ID := 172;
CPU_CTI_2_Interrupt : constant Interrupt_ID := 173;
CPU_CTI_3_Interrupt : constant Interrupt_ID := 174;
PMU_Comm_0_Interrupt : constant Interrupt_ID := 175;
PMU_Comm_1_Interrupt : constant Interrupt_ID := 176;
PMU_Comm_2_Interrupt : constant Interrupt_ID := 177;
PMU_Comm_3_Interrupt : constant Interrupt_ID := 178;
APU_Comm_0_Interrupt : constant Interrupt_ID := 179;
APU_Comm_1_Interrupt : constant Interrupt_ID := 180;
APU_Comm_2_Interrupt : constant Interrupt_ID := 181;
APU_Comm_3_Interrupt : constant Interrupt_ID := 182;
L2_Cache_Interrupt : constant Interrupt_ID := 183;
APU_ExtError_Interrupt : constant Interrupt_ID := 184;
APU_RegError_Interrupt : constant Interrupt_ID := 185;
CCI_Interrupt : constant Interrupt_ID := 186;
SMMU_Interrupt : constant Interrupt_ID := 187;
end Ada.Interrupts.Names;
|
programs/oeis/010/A010990.asm | neoneye/loda | 22 | 168058 | <reponame>neoneye/loda
; A010990: Binomial coefficient C(n,37).
; 1,38,741,9880,101270,850668,6096454,38320568,215553195,1101716330,5178066751,22595200368,92263734836,354860518600,1292706174900,4481381406320,14844575908435,47153358767970,144079707346575,424655979547800,1210269541711230,3342649210440540,8964377427999630,23385332420868600,59437719903041025,147405545359541742,357174975294274221,846636978475316672,1965407271460556560,4472995859186094240,9989690752182277136,21912870037044995008,47249626017378270486,100226479430802391940,209296471752557936110,430552741890976325712,873065282167813104916,1746130564335626209832,3446310324346630677300,6715886785906254653200,12928082062869540207410,24594887826922539906780,46261812817306682205610,86068488962431036661600,158444263771748044763400,288720658428518659346640,520952492381892363603720,931064028937850181759840,1648759217910776363533050,2893740668169934025792700,5035108762615685204879298,8688030806081966628027024,14869898879640289036430868,25250771682408037986392040,42552226353687619569660660,71178269537077472734705104,118206769052646517220135262,194937478788574958222679204,319294146291631397088871110,519529458372823968144603840,839905957702732081833776208,1349357112374881049503443744,2154618614921181030658724688,3420029547493938143902737600,5397234129638871133346507775,8469505864971767009251442970,13217562183213515181104524635,20516812941107545952759262120,31680372923769004779995919450,48668398984340789951877789300,74393124161778064640727477930,113161371964394802552092501640,171313743668319909419140037205,258143997308427260768567179350,387215995962640891152850769025,578242553970877064121590481744,859755376298804055864996374172,1272884583091735874917007618904,1876688808404482379685331745820,2755644326264809570170866867280,4030129827162283996374892793397,5871053328458635945336263575566,8520187147397288749939211774297,12318342863706923493888017023080,17744279601292115985243453092770,25468260133619272355290603262564,36425534842269424415124932573202,51916854257947225603166570564104,73745531616402309095407060460375,104403786333333606135070669865250,147325342937037421990599723032075,207226855999349340821942467561600,290568091564305053978593242559200,406170450573759752873302382072000,566046053459175825812793745228000,786506095332749568497776572316800,1089638652908913464689627959563900,1505274015358705198643403573005800,2073591755851277569559790636283500,2848570492886603529900318449844000
add $0,37
bin $0,37
|
oeis/133/A133486.asm | neoneye/loda-programs | 11 | 1941 | ; A133486: a(n) = Sum_{ k = 0 to n-1} ( subtract k modulo 9 from 9, multiply this by k-th power of 10 ).
; Submitted by <NAME>(s4)
; 9,89,789,6789,56789,456789,3456789,23456789,123456789,9123456789,89123456789,789123456789,6789123456789,56789123456789,456789123456789,3456789123456789,23456789123456789,123456789123456789,9123456789123456789,89123456789123456789
lpb $0
mov $2,$0
sub $0,1
mul $1,10
seq $2,180598 ; Digital root of 8n.
add $1,$2
lpe
mov $0,$1
mul $0,10
add $0,9
|
unittests/ASM/TwoByte/0F_31.asm | cobalt2727/FEX | 628 | 86213 | <reponame>cobalt2727/FEX
%ifdef CONFIG
{
"RegData": {
"RAX": "0x1"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov r15, 0xe0000000
mov rax, 0x0
mov [r15 + 8 * 0], rax
rdtsc
shl rdx, 32
or rax, rdx
cmp rax, 0
setne [r15 + 8 * 0]
mov rax, [r15 + 8 * 0]
hlt
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/limited_with3_pkg1.ads | best08618/asylo | 7 | 1243 | with Ada.Containers.Hashed_Maps;
generic
type Object_Type is tagged private;
package Limited_With3_Pkg1 is
type Key_Type is access all String;
type Element_Type is new Object_Type with null record;
type Element_Access is access all Element_Type;
function Equal (Left, Right : Element_Access) return Boolean;
function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
function Hash (Key : Key_Type) return Ada.Containers.Hash_Type;
package Table_Package is new Ada.Containers.Hashed_Maps (
Key_Type => Key_Type,
Element_Type => Element_Access,
Hash => Hash,
Equivalent_Keys => Equivalent_Keys,
"=" => Equal);
end Limited_With3_Pkg1;
|
programs/oeis/071/A071618.asm | neoneye/loda | 22 | 170712 | ; A071618: a(n+1) - 3*a(n) + a(n-1) = (2/3)(1+w^(n+1)+w^(2n+2)), where w = exp(2 Pi I / 3).
; 0,1,3,8,23,61,160,421,1103,2888,7563,19801,51840,135721,355323,930248,2435423,6376021,16692640,43701901,114413063,299537288,784198803,2053059121,5374978560,14071876561,36840651123,96450076808,252509579303,661078661101,1730726404000,4531100550901,11862575248703,31056625195208,81307300336923,212865275815561,557288527109760,1459000305513721,3819712389431403,10000136862780488,26180698198910063,68541957733949701,179445175002939040,469793567274867421,1229935526821663223,3220013013190122248,8430103512748703523,22070297525055988321,57780789062419261440,151272069662201796001,396035419924186126563,1036834190110356583688,2714467150406883624503,7106567261110294289821,18605234632923999244960,48709136637661703445061,127522175280061111090223,333857389202521629825608,874049992327503778386603,2288292587779989705334201,5990827771012465337616000,15684190725257406307513801,41061744404759753584925403,107501042489021854447262408,281441383062305809756861823,736823106697895574823323061,1929027937031380914713107360,5050260704396247169315999021,13221754176157360593234889703,34615001824075834610388670088,90623251296070143237931120563,237254752064134595103404691601,621141004896333642072282954240,1626168262624866331113444171121,4257363782978265351268049559123,11145923086309929722690704506248,29180405475951523816804063959623,76395293341544641727721487372621,200005474548682401366360398158240,523621130304502562371359707102101,1370857916364825285747718723148063,3588952618789973294871796462342088,9395999940005094598867670663878203,24599047201225310501731215529292521,64401141663670836906325975923999360,168604377789787200217246712242705561,441411991705690763745414160804117323
mov $1,4
mov $2,2
lpb $0
sub $0,1
add $1,$2
add $2,$1
lpe
add $1,6
div $1,4
sub $1,2
mov $0,$1
|
programs/oeis/132/A132765.asm | karttu/loda | 1 | 103107 | <filename>programs/oeis/132/A132765.asm
; A132765: a(n) = n*(n + 23).
; 0,24,50,78,108,140,174,210,248,288,330,374,420,468,518,570,624,680,738,798,860,924,990,1058,1128,1200,1274,1350,1428,1508,1590,1674,1760,1848,1938,2030,2124,2220,2318,2418,2520,2624,2730,2838,2948,3060,3174,3290,3408
mov $1,$0
add $0,23
mul $1,$0
|
boot/boot.asm | Groszekk/OperatingSystem | 1 | 100863 | <filename>boot/boot.asm
section .boot
[bits 16]
global boot
boot:
mov ax, 0x2401
int 0x15 ; enable A20 line
mov ax, 0x3
int 0x10
mov [disk], dl
mov ah, 0x2 ; read sectors
mov al, 31 ; sectors to read
mov ch, 0 ; cylinder idx
mov cl, 2 ; sector idx
mov dl, [disk] ; idx
mov bx, boot2 ; target pointer
int 0x13
; cli
lgdt [GDT_DESCRIPTOR]
mov eax, cr0
or eax, 0x1
mov cr0, eax
mov ax, DATA_SEGMENT
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
jmp CODE_SEGMENT:boot2 ; jump far to new (32bit protected mode) code segment
GDT:
dq 0x0
GDT_CODE:
dw 0xffff
dw 0x0
db 0x0
db 10011010b
db 11001111b
db 0x0
GDT_DATA:
dw 0xffff
dw 0x0
db 0x0
db 10010010b
db 11001111b
db 0x0
GDT_END:
GDT_DESCRIPTOR:
dw GDT_END - GDT - 1
dd GDT
disk: db 0x0
CODE_SEGMENT equ GDT_CODE - GDT
DATA_SEGMENT equ GDT_DATA - GDT
times 510 - ($ - $$) db 0
db 0x55
db 0xaa
boot2:
[bits 32]
mov esp, kernel_stack_top
extern kmain
call kmain
jmp $
; init stack
section .bss
align 4
kernel_stack_bottom: equ $
resb 16384 ; 16KB
kernel_stack_top: |
test/Succeed/Issue1660.agda | alhassy/agda | 3 | 14589 | {-# OPTIONS --rewriting #-}
postulate
_↦_ : {A : Set} → A → A → Set
idr : {A : Set} {a : A} → a ↦ a
{-# BUILTIN REWRITE _↦_ #-}
record _×_ (A B : Set) : Set where
constructor _,_
field
fst : A
snd : B
postulate
A B C : Set
g : A → B → C
f : A × B → C
f (x , y) = g x y
postulate
D : Set
P : (A → B → C) → D
res : D
rew : P (λ x y → g x y) ↦ res
{-# REWRITE rew #-}
test : P (λ x y → f (x , y)) ↦ res
test = idr
|
agda-stdlib-0.9/src/Data/Container/Any.agda | qwe2/try-agda | 1 | 8494 | <filename>agda-stdlib-0.9/src/Data/Container/Any.agda<gh_stars>1-10
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to ◇
------------------------------------------------------------------------
module Data.Container.Any where
open import Algebra
open import Data.Container as C
open import Data.Container.Combinator
using (module Composition) renaming (_∘_ to _⟨∘⟩_)
open import Data.Product as Prod hiding (swap)
open import Data.Sum
open import Function
open import Function.Equality using (_⟨$⟩_)
open import Function.Inverse as Inv using (_↔_; module Inverse)
open import Function.Related as Related using (Related)
open import Function.Related.TypeIsomorphisms
import Relation.Binary.HeterogeneousEquality as H
open import Relation.Binary.Product.Pointwise
open import Relation.Binary.PropositionalEquality as P
using (_≡_; _≗_; refl)
import Relation.Binary.Sigma.Pointwise as Σ
open Related.EquationalReasoning
private
module ×⊎ {k ℓ} = CommutativeSemiring (×⊎-CommutativeSemiring k ℓ)
-- ◇ can be expressed using _∈_.
↔∈ : ∀ {c} (C : Container c) {X : Set c}
{P : X → Set c} {xs : ⟦ C ⟧ X} →
◇ P xs ↔ (∃ λ x → x ∈ xs × P x)
↔∈ _ {P = P} {xs} = record
{ to = P.→-to-⟶ to
; from = P.→-to-⟶ from
; inverse-of = record
{ left-inverse-of = λ _ → refl
; right-inverse-of = to∘from
}
}
where
to : ◇ P xs → ∃ λ x → x ∈ xs × P x
to (p , Px) = (proj₂ xs p , (p , refl) , Px)
from : (∃ λ x → x ∈ xs × P x) → ◇ P xs
from (.(proj₂ xs p) , (p , refl) , Px) = (p , Px)
to∘from : to ∘ from ≗ id
to∘from (.(proj₂ xs p) , (p , refl) , Px) = refl
-- ◇ is a congruence for bag and set equality and related preorders.
cong : ∀ {k c} {C : Container c}
{X : Set c} {P₁ P₂ : X → Set c} {xs₁ xs₂ : ⟦ C ⟧ X} →
(∀ x → Related k (P₁ x) (P₂ x)) → xs₁ ∼[ k ] xs₂ →
Related k (◇ P₁ xs₁) (◇ P₂ xs₂)
cong {C = C} {P₁ = P₁} {P₂} {xs₁} {xs₂} P₁↔P₂ xs₁≈xs₂ =
◇ P₁ xs₁ ↔⟨ ↔∈ C ⟩
(∃ λ x → x ∈ xs₁ × P₁ x) ∼⟨ Σ.cong Inv.id (xs₁≈xs₂ ×-cong P₁↔P₂ _) ⟩
(∃ λ x → x ∈ xs₂ × P₂ x) ↔⟨ sym (↔∈ C) ⟩
◇ P₂ xs₂ ∎
-- Nested occurrences of ◇ can sometimes be swapped.
swap : ∀ {c} {C₁ C₂ : Container c} {X Y : Set c} {P : X → Y → Set c}
{xs : ⟦ C₁ ⟧ X} {ys : ⟦ C₂ ⟧ Y} →
let ◈ : ∀ {C : Container c} {X} → ⟦ C ⟧ X → (X → Set c) → Set c
◈ = λ {_} {_} → flip ◇ in
◈ xs (◈ ys ∘ P) ↔ ◈ ys (◈ xs ∘ flip P)
swap {c} {C₁} {C₂} {P = P} {xs} {ys} =
◇ (λ x → ◇ (P x) ys) xs ↔⟨ ↔∈ C₁ ⟩
(∃ λ x → x ∈ xs × ◇ (P x) ys) ↔⟨ Σ.cong Inv.id (λ {x} → Inv.id ⟨ ×⊎.*-cong {ℓ = c} ⟩ ↔∈ C₂ {P = P x}) ⟩
(∃ λ x → x ∈ xs × ∃ λ y → y ∈ ys × P x y) ↔⟨ Σ.cong Inv.id (λ {x} → ∃∃↔∃∃ {A = x ∈ xs} (λ _ y → y ∈ ys × P x y)) ⟩
(∃₂ λ x y → x ∈ xs × y ∈ ys × P x y) ↔⟨ ∃∃↔∃∃ (λ x y → x ∈ xs × y ∈ ys × P x y) ⟩
(∃₂ λ y x → x ∈ xs × y ∈ ys × P x y) ↔⟨ Σ.cong Inv.id (λ {y} → Σ.cong Inv.id (λ {x} →
(x ∈ xs × y ∈ ys × P x y) ↔⟨ sym $ ×⊎.*-assoc _ _ _ ⟩
((x ∈ xs × y ∈ ys) × P x y) ↔⟨ ×⊎.*-comm _ _ ⟨ ×⊎.*-cong {ℓ = c} ⟩ Inv.id ⟩
((y ∈ ys × x ∈ xs) × P x y) ↔⟨ ×⊎.*-assoc _ _ _ ⟩
(y ∈ ys × x ∈ xs × P x y) ∎)) ⟩
(∃₂ λ y x → y ∈ ys × x ∈ xs × P x y) ↔⟨ Σ.cong Inv.id (λ {y} → ∃∃↔∃∃ {B = y ∈ ys} (λ x _ → x ∈ xs × P x y)) ⟩
(∃ λ y → y ∈ ys × ∃ λ x → x ∈ xs × P x y) ↔⟨ Σ.cong Inv.id (λ {y} → Inv.id ⟨ ×⊎.*-cong {ℓ = c} ⟩ sym (↔∈ C₁ {P = flip P y})) ⟩
(∃ λ y → y ∈ ys × ◇ (flip P y) xs) ↔⟨ sym (↔∈ C₂) ⟩
◇ (λ y → ◇ (flip P y) xs) ys ∎
-- Nested occurrences of ◇ can sometimes be flattened.
flatten : ∀ {c} {C₁ C₂ : Container c} {X}
P (xss : ⟦ C₁ ⟧ (⟦ C₂ ⟧ X)) →
◇ (◇ P) xss ↔
◇ P (Inverse.from (Composition.correct C₁ C₂) ⟨$⟩ xss)
flatten {C₁ = C₁} {C₂} {X} P xss = record
{ to = P.→-to-⟶ t
; from = P.→-to-⟶ f
; inverse-of = record
{ left-inverse-of = λ _ → refl
; right-inverse-of = λ _ → refl
}
}
where
open Inverse
t : ◇ (◇ P) xss → ◇ P (from (Composition.correct C₁ C₂) ⟨$⟩ xss)
t (p₁ , p₂ , p) = ((p₁ , p₂) , p)
f : ◇ P (from (Composition.correct C₁ C₂) ⟨$⟩ xss) → ◇ (◇ P) xss
f ((p₁ , p₂) , p) = (p₁ , p₂ , p)
-- Sums commute with ◇ (for a fixed instance of a given container).
◇⊎↔⊎◇ : ∀ {c} {C : Container c} {X : Set c} {xs : ⟦ C ⟧ X}
{P Q : X → Set c} →
◇ (λ x → P x ⊎ Q x) xs ↔ (◇ P xs ⊎ ◇ Q xs)
◇⊎↔⊎◇ {xs = xs} {P} {Q} = record
{ to = P.→-to-⟶ to
; from = P.→-to-⟶ from
; inverse-of = record
{ left-inverse-of = from∘to
; right-inverse-of = [ (λ _ → refl) , (λ _ → refl) ]
}
}
where
to : ◇ (λ x → P x ⊎ Q x) xs → ◇ P xs ⊎ ◇ Q xs
to (pos , inj₁ p) = inj₁ (pos , p)
to (pos , inj₂ q) = inj₂ (pos , q)
from : ◇ P xs ⊎ ◇ Q xs → ◇ (λ x → P x ⊎ Q x) xs
from = [ Prod.map id inj₁ , Prod.map id inj₂ ]
from∘to : from ∘ to ≗ id
from∘to (pos , inj₁ p) = refl
from∘to (pos , inj₂ q) = refl
-- Products "commute" with ◇.
×◇↔◇◇× : ∀ {c} {C₁ C₂ : Container c}
{X Y} {P : X → Set c} {Q : Y → Set c}
{xs : ⟦ C₁ ⟧ X} {ys : ⟦ C₂ ⟧ Y} →
◇ (λ x → ◇ (λ y → P x × Q y) ys) xs ↔ (◇ P xs × ◇ Q ys)
×◇↔◇◇× {C₁ = C₁} {C₂} {P = P} {Q} {xs} {ys} = record
{ to = P.→-to-⟶ to
; from = P.→-to-⟶ from
; inverse-of = record
{ left-inverse-of = λ _ → refl
; right-inverse-of = λ _ → refl
}
}
where
to : ◇ (λ x → ◇ (λ y → P x × Q y) ys) xs → ◇ P xs × ◇ Q ys
to (p₁ , p₂ , p , q) = ((p₁ , p) , (p₂ , q))
from : ◇ P xs × ◇ Q ys → ◇ (λ x → ◇ (λ y → P x × Q y) ys) xs
from ((p₁ , p) , (p₂ , q)) = (p₁ , p₂ , p , q)
-- map can be absorbed by the predicate.
map↔∘ : ∀ {c} (C : Container c) {X Y : Set c}
(P : Y → Set c) {xs : ⟦ C ⟧ X} (f : X → Y) →
◇ P (C.map f xs) ↔ ◇ (P ∘ f) xs
map↔∘ _ _ _ = Inv.id
-- Membership in a mapped container can be expressed without reference
-- to map.
∈map↔∈×≡ : ∀ {c} (C : Container c) {X Y : Set c} {f : X → Y}
{xs : ⟦ C ⟧ X} {y} →
y ∈ C.map f xs ↔ (∃ λ x → x ∈ xs × y ≡ f x)
∈map↔∈×≡ {c} C {f = f} {xs} {y} =
y ∈ C.map f xs ↔⟨ map↔∘ C (_≡_ y) f ⟩
◇ (λ x → y ≡ f x) xs ↔⟨ ↔∈ C ⟩
(∃ λ x → x ∈ xs × y ≡ f x) ∎
-- map is a congruence for bag and set equality and related preorders.
map-cong : ∀ {k c} {C : Container c} {X Y : Set c}
{f₁ f₂ : X → Y} {xs₁ xs₂ : ⟦ C ⟧ X} →
f₁ ≗ f₂ → xs₁ ∼[ k ] xs₂ →
C.map f₁ xs₁ ∼[ k ] C.map f₂ xs₂
map-cong {c = c} {C} {f₁ = f₁} {f₂} {xs₁} {xs₂} f₁≗f₂ xs₁≈xs₂ {x} =
x ∈ C.map f₁ xs₁ ↔⟨ map↔∘ C (_≡_ x) f₁ ⟩
◇ (λ y → x ≡ f₁ y) xs₁ ∼⟨ cong {xs₁ = xs₁} {xs₂ = xs₂} (Related.↔⇒ ∘ helper) xs₁≈xs₂ ⟩
◇ (λ y → x ≡ f₂ y) xs₂ ↔⟨ sym (map↔∘ C (_≡_ x) f₂) ⟩
x ∈ C.map f₂ xs₂ ∎
where
helper : ∀ y → (x ≡ f₁ y) ↔ (x ≡ f₂ y)
helper y = record
{ to = P.→-to-⟶ (λ x≡f₁y → P.trans x≡f₁y ( f₁≗f₂ y))
; from = P.→-to-⟶ (λ x≡f₂y → P.trans x≡f₂y (P.sym $ f₁≗f₂ y))
; inverse-of = record
{ left-inverse-of = λ _ → P.proof-irrelevance _ _
; right-inverse-of = λ _ → P.proof-irrelevance _ _
}
}
-- Uses of linear morphisms can be removed.
remove-linear :
∀ {c} {C₁ C₂ : Container c} {X} {xs : ⟦ C₁ ⟧ X}
(P : X → Set c) (m : C₁ ⊸ C₂) →
◇ P (⟪ m ⟫⊸ xs) ↔ ◇ P xs
remove-linear {xs = xs} P m = record
{ to = P.→-to-⟶ t
; from = P.→-to-⟶ f
; inverse-of = record
{ left-inverse-of = f∘t
; right-inverse-of = t∘f
}
}
where
open Inverse
t : ◇ P (⟪ m ⟫⊸ xs) → ◇ P xs
t = Prod.map (_⟨$⟩_ (to (position⊸ m))) id
f : ◇ P xs → ◇ P (⟪ m ⟫⊸ xs)
f = Prod.map (_⟨$⟩_ (from (position⊸ m)))
(P.subst (P ∘ proj₂ xs)
(P.sym $ right-inverse-of (position⊸ m) _))
f∘t : f ∘ t ≗ id
f∘t (p₂ , p) = H.≅-to-≡ $
H.cong₂ _,_ (H.≡-to-≅ $ left-inverse-of (position⊸ m) p₂)
(H.≡-subst-removable
(P ∘ proj₂ xs)
(P.sym (right-inverse-of (position⊸ m)
(to (position⊸ m) ⟨$⟩ p₂)))
p)
t∘f : t ∘ f ≗ id
t∘f (p₁ , p) = H.≅-to-≡ $
H.cong₂ _,_ (H.≡-to-≅ $ right-inverse-of (position⊸ m) p₁)
(H.≡-subst-removable
(P ∘ proj₂ xs)
(P.sym (right-inverse-of (position⊸ m) p₁))
p)
-- Linear endomorphisms are identity functions if bag equality is
-- used.
linear-identity :
∀ {c} {C : Container c} {X} {xs : ⟦ C ⟧ X} (m : C ⊸ C) →
⟪ m ⟫⊸ xs ∼[ bag ] xs
linear-identity {xs = xs} m {x} =
x ∈ ⟪ m ⟫⊸ xs ↔⟨ remove-linear (_≡_ x) m ⟩
x ∈ xs ∎
-- If join can be expressed using a linear morphism (in a certain
-- way), then it can be absorbed by the predicate.
join↔◇ : ∀ {c} {C₁ C₂ C₃ : Container c} {X}
P (join′ : (C₁ ⟨∘⟩ C₂) ⊸ C₃) (xss : ⟦ C₁ ⟧ (⟦ C₂ ⟧ X)) →
let join : ∀ {X} → ⟦ C₁ ⟧ (⟦ C₂ ⟧ X) → ⟦ C₃ ⟧ X
join = λ {_} → ⟪ join′ ⟫⊸ ∘
_⟨$⟩_ (Inverse.from (Composition.correct C₁ C₂)) in
◇ P (join xss) ↔ ◇ (◇ P) xss
join↔◇ {C₁ = C₁} {C₂} P join xss =
◇ P (⟪ join ⟫⊸ xss′) ↔⟨ remove-linear P join ⟩
◇ P xss′ ↔⟨ sym $ flatten P xss ⟩
◇ (◇ P) xss ∎
where xss′ = Inverse.from (Composition.correct C₁ C₂) ⟨$⟩ xss
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_1453.asm | ljhsiun2/medusa | 9 | 27159 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x80a, %rsi
lea addresses_A_ht+0x1120a, %rdi
sub %rbp, %rbp
mov $92, %rcx
rep movsq
nop
add %rax, %rax
lea addresses_A_ht+0x160a, %r14
nop
nop
nop
nop
and %rax, %rax
mov $0x6162636465666768, %rbp
movq %rbp, (%r14)
cmp %r14, %r14
lea addresses_normal_ht+0x1420a, %rdi
nop
nop
nop
nop
nop
inc %r14
movb (%rdi), %cl
xor $50445, %rsi
lea addresses_normal_ht+0xe908, %rdi
nop
add %r15, %r15
movb $0x61, (%rdi)
nop
and $65176, %rsi
lea addresses_A_ht+0x1900a, %rsi
lea addresses_WC_ht+0x1dce4, %rdi
nop
dec %rbx
mov $67, %rcx
rep movsl
nop
nop
nop
sub $61039, %r14
lea addresses_UC_ht+0x1550a, %r14
clflush (%r14)
nop
and %rdi, %rdi
movb $0x61, (%r14)
xor %rcx, %rcx
lea addresses_normal_ht+0x720a, %rbp
nop
nop
nop
add %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm5
movups %xmm5, (%rbp)
nop
nop
nop
nop
cmp $22108, %rsi
lea addresses_UC_ht+0x14e0a, %rbx
nop
xor $19207, %rbp
mov (%rbx), %r14d
sub %r15, %r15
lea addresses_WC_ht+0xa36a, %r15
nop
nop
nop
sub %rbx, %rbx
mov $0x6162636465666768, %r14
movq %r14, %xmm6
vmovups %ymm6, (%r15)
nop
nop
nop
nop
and %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rdi
// Load
lea addresses_PSE+0x860a, %r14
nop
add $45737, %r12
mov (%r14), %edi
nop
nop
nop
nop
sub %r12, %r12
// Store
lea addresses_WC+0x1760a, %r8
nop
nop
cmp $47440, %rbp
movl $0x51525354, (%r8)
inc %r12
// Load
mov $0x38a, %r12
nop
nop
nop
nop
and %r13, %r13
movups (%r12), %xmm5
vpextrq $0, %xmm5, %rdi
nop
nop
nop
and $33992, %rdi
// Store
lea addresses_A+0x575a, %r11
nop
nop
nop
nop
add %r12, %r12
mov $0x5152535455565758, %rbp
movq %rbp, %xmm4
movups %xmm4, (%r11)
nop
nop
nop
xor %r13, %r13
// Faulty Load
lea addresses_WC+0x1c60a, %rbp
nop
nop
nop
nop
nop
cmp $45965, %r12
movb (%rbp), %r13b
lea oracles, %rbp
and $0xff, %r13
shlq $12, %r13
mov (%rbp,%r13,1), %r13
pop %rdi
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': True, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
{'54': 21829}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
|
oeis/350/A350143.asm | neoneye/loda-programs | 11 | 95182 | ; A350143: a(n) = Sum_{k=1..n} floor(n/(2*k-1))^2.
; Submitted by <NAME>
; 1,4,10,17,27,41,55,70,93,115,137,167,193,223,267,298,332,381,419,465,525,571,617,679,738,792,868,930,988,1080,1142,1205,1297,1367,1459,1560,1634,1712,1820,1914,1996,2120,2206,2300,2450,2544,2638,2764,2875,2996,3136,3246
add $0,1
mov $2,$0
lpb $0
mov $4,$0
max $0,1
mov $3,$2
div $3,$0
sub $0,1
pow $3,2
mod $4,2
mul $3,$4
add $1,$3
lpe
mov $0,$1
|
source/nodes/program-nodes-entry_index_specifications.ads | reznikmm/gela | 0 | 24061 | -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Defining_Identifiers;
with Program.Elements.Discrete_Ranges;
with Program.Elements.Entry_Index_Specifications;
with Program.Element_Visitors;
package Program.Nodes.Entry_Index_Specifications is
pragma Preelaborate;
type Entry_Index_Specification is
new Program.Nodes.Node
and Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification
and Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification_Text
with private;
function Create
(For_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
In_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Entry_Index_Subtype : not null Program.Elements.Discrete_Ranges
.Discrete_Range_Access)
return Entry_Index_Specification;
type Implicit_Entry_Index_Specification is
new Program.Nodes.Node
and Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification
with private;
function Create
(Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Entry_Index_Subtype : not null Program.Elements.Discrete_Ranges
.Discrete_Range_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Entry_Index_Specification
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Entry_Index_Specification is
abstract new Program.Nodes.Node
and Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification
with record
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Entry_Index_Subtype : not null Program.Elements.Discrete_Ranges
.Discrete_Range_Access;
end record;
procedure Initialize (Self : in out Base_Entry_Index_Specification'Class);
overriding procedure Visit
(Self : not null access Base_Entry_Index_Specification;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Name
(Self : Base_Entry_Index_Specification)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
overriding function Entry_Index_Subtype
(Self : Base_Entry_Index_Specification)
return not null Program.Elements.Discrete_Ranges.Discrete_Range_Access;
overriding function Is_Entry_Index_Specification
(Self : Base_Entry_Index_Specification)
return Boolean;
overriding function Is_Declaration
(Self : Base_Entry_Index_Specification)
return Boolean;
type Entry_Index_Specification is
new Base_Entry_Index_Specification
and Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification_Text
with record
For_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
In_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Entry_Index_Specification_Text
(Self : in out Entry_Index_Specification)
return Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification_Text_Access;
overriding function For_Token
(Self : Entry_Index_Specification)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function In_Token
(Self : Entry_Index_Specification)
return not null Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Entry_Index_Specification is
new Base_Entry_Index_Specification
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Entry_Index_Specification_Text
(Self : in out Implicit_Entry_Index_Specification)
return Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Entry_Index_Specification)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Entry_Index_Specification)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Entry_Index_Specification)
return Boolean;
end Program.Nodes.Entry_Index_Specifications;
|
kernel/Arch/x86/x86.asm | AymenSekhri/CyanOS | 63 | 95990 | section .text
global load_segments
load_segments:
mov eax, [esp+16];
mov fs, ax;
mov eax, [esp+12];
mov gs, ax;
mov eax, [esp+8];
mov ds, ax;
mov es, ax;
mov ss, ax;
push dword [esp+4];
push far_jmp;
retf;
far_jmp: nop;
ret; |
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2078.asm | ljhsiun2/medusa | 9 | 244384 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r14
push %rax
push %rbx
push %rdx
lea addresses_WC_ht+0x1a85e, %r13
nop
xor $45889, %rdx
mov $0x6162636465666768, %r14
movq %r14, (%r13)
nop
nop
nop
nop
nop
inc %r13
lea addresses_UC_ht+0xbec2, %rdx
nop
nop
nop
nop
nop
sub %rax, %rax
movw $0x6162, (%rdx)
nop
nop
nop
nop
nop
xor %r11, %r11
lea addresses_normal_ht+0x136ba, %r12
nop
nop
and %r14, %r14
movl $0x61626364, (%r12)
nop
nop
nop
and %rdx, %rdx
lea addresses_A_ht+0xd0f1, %rdx
nop
nop
nop
nop
xor $4435, %rbx
mov $0x6162636465666768, %r12
movq %r12, %xmm6
movups %xmm6, (%rdx)
nop
nop
nop
nop
xor %rbx, %rbx
lea addresses_WT_ht+0x1dc9a, %rax
sub $15569, %rbx
movups (%rax), %xmm0
vpextrq $0, %xmm0, %r14
nop
nop
nop
xor %r14, %r14
lea addresses_normal_ht+0x13b1a, %r11
sub %r14, %r14
mov (%r11), %rax
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WT_ht+0x1e042, %r11
nop
cmp %r13, %r13
mov (%r11), %r12w
nop
cmp $27407, %r12
lea addresses_D_ht+0xfc9a, %r11
nop
cmp %rbx, %rbx
mov (%r11), %r14
nop
nop
nop
nop
nop
cmp %r14, %r14
pop %rdx
pop %rbx
pop %rax
pop %r14
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %rbp
push %rbx
push %rcx
push %rdx
// Store
mov $0x89a, %rcx
nop
nop
nop
dec %r11
movw $0x5152, (%rcx)
nop
nop
add $11768, %r13
// Faulty Load
lea addresses_D+0x1b09a, %rcx
nop
cmp %rbp, %rbp
mov (%rcx), %r10
lea oracles, %r11
and $0xff, %r10
shlq $12, %r10
mov (%r11,%r10,1), %r10
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
sbsext/ext/pars.asm | olifink/smsqe | 0 | 16286 | <filename>sbsext/ext/pars.asm
* Type of parameters V1.0 1985 <NAME> QJUMP
* 2003-09-28 1.01 parnam$ checks for correct version (wl)
* PARTYP (name) return the type of the variable
* PARUSE (name) and its usage
* PARNAM$ (number) returns the name of the actual parameter
* PARSTR$ (parm,number) returns the string value or the name
*
section exten
*
xdef partyp
xdef paruse
xdef parnam$
xdef parstr$
*
xref ut_par1 check for just one parameter
xref ut_par2 check for two parameters
xref ut_gxin1 get exactly one integer
xref ut_gtst1 get string
xref ut_gnmpt get name from nt onto RI stack
xref ut_rtint return integer d1
xref ut_rtstr return string (a4)
xref ut_retst return string on RI stack
xref zero_w zero word
*
include dev8_sbsext_ext_keys
*
partyp
moveq #1,d7 type is one byte on from a3
bra.s par_common
paruse
moveq #0,d7 usage is at a3
par_common
bsr.l ut_par1 just one parameter
*
add.l d7,a3 get appropriate byte
moveq #$f,d1 (only the 4 lsbits)
and.b (a6,a3.l),d1 on arithmetic stack
bra.l ut_rtint and return (no error)
*
* parameter name / value
*
parstr$
bsr.l ut_par2 check for two parameters
moveq #$f,d0
and.b 1(a6,a3.l),d0 get first parameter type
subq.b #1,d0 is it string?
bne.s pars_nm8 ... no
*
move.w (a6,a3.l),d7 save type
bsr.l ut_gtst1 and get a string
move.w d7,(a6,a3.l) restore type
tst.l d0 OK?
bra.s pars_str return string or null
*
pars_nm8
addq.l #8,a3 skip first parameter
parnam$
bsr.l ut_gxin1 get exactly one integer
bne.s pars_rts ... oops
addq.l #2,bv_rip(a6) reset RI stack
move.w (a6,a1.l),d3 set parameter pointer
ble.s pars_bp ... 0 or negative!!!
subq.w #1,d3 starting from one
lsl.w #3,d3 indexing the name table
*
move.l bv_rtp(a6),a2 get return table pointer
cmp.l bv_rtbas(a6),a2 any entries?
ble.s pars_bp ... no
tst.b rt_type(a6,a2.l) is top entry a proc or fun?
beq.s pars_bp ... no
move.l rt_parm(a6,a2.l),a3 get pointer to parameters
add.w d3,a3 and pointer to the parameter we need
cmp.l rt_local(a6,a2.l),a3 within range?
bge.s pars_null
moveq #mt.inf,d0 check version
trap #1
sub.l #'1.04',d2 1.04? *** v. 1.01
blt.s pars_gnam ... no, early version, pointer rel a6
add.l bv_ntbas(a6),a3 set pointer to table
pars_gnam
bsr.l ut_gnmpt get name from name table
pars_str
beq.l ut_retst ... good, return a string
pars_null
lea zero_w(pc),a4 ... bad, return null
bra.l ut_rtstr
*
pars_bp
moveq #err.bp,d0
pars_rts
rts
end
|
asm/donghyeok/5/asm_gio/source/user_gio.asm | daeroro/IntegrationProject | 0 | 96796 | ;-------------------------------------------------------------------------------
; user gio by kimdonghyeok
; 2019-05-03
;-------------------------------------------------------------------------------
.text
.arm
gio_a .word 0xFFF7BC34
gio_reg .word 0xFFF7BC00
gio_b .word 0xFFF7BC54
;------------------------------------------------------------------------------
; user gio init
.global _gio_init_
.asmfunc
_gio_init_
ldr r4, gio_reg
mov r0, #0x1
str r0, [r4] ;gioREG->GCR0 = 1
mov r0, #0xFF
str r0, [r4,#0x14] ;gioREG->ENACLR = 0xFF
str r0, [r4,#0x8] ;gioREG->LVLCLR = 0xFF
ldr r4, gio_b
mov r0, #0x0040
str r0, [r4] ;gioPORTB->DIR = 0x0040
str r0, [r4, #0x1c] ;gioPORTB->PSL = 0x0040
mov r0, #0
bx lr
.endasmfunc
;-------------------------------------------------------------------------------
; user gio on
.global _gio_A5_on_
.asmfunc
_gio_A5_on_
ldr r4, gio_b
mov r0, #0x0040
str r0, [r4,#0x000C]
mov r0, #0
bx lr
.endasmfunc
;-------------------------------------------------------------------------------
; user gio off
.global _gio_A5_off_
.asmfunc
_gio_A5_off_
ldr r4, gio_b
mov r0, #0x0040
str r0, [r4,#0x0010]
mov r0, #0
bx lr
.endasmfunc
;-------------------------------------------------------------------------------
|
src/domains/variables/grammar/Variables.g4 | grzesiek110/teststory | 10 | 2386 | <filename>src/domains/variables/grammar/Variables.g4
grammar Variables;
// Parser rules
model:
line*;
line:
(emptyLine | variableDefinition | commentLine | emptyLine );
emptyLine:
WS? EOL;
variableDefinition:
commentLine*
variableLine;
commentLine:
WS? commentText endOfLine;
commentText:
~(VARIABLE | WS | EOL)+ ~EOL*;
variableLine:
WS? VARIABLE WS variableName variableTypeRef? variableWrongData? endOfLine;
variableName:
validVariableName | wrongVariableName;
validVariableName:
WORD;
wrongVariableName:
~(WS | EOF)*;
variableTypeRef:
WS? COLON WS? variableType;
variableType:
WORD
;
variableWrongData:
WS? ~COLON (EOL)*;
endOfLine:
EOL | EOF;
// Lexer rules
VARIABLE: 'Var:' | 'var:';
COLON: ':';
fragment POLISH_LETTER:
[\u0104\u0105\u0106\u0107\u0118\u0119\u0141\u0142\u0143\u0144\u00D3\u00F3\u015A\u015B\u0179\u017A\u017B\u017C];
fragment ENG_LETTER:
[a-zA-Z];
fragment SPECIAL_CHARACTER:
[!?;:,._];
fragment NUMBER:
[0-9]+;
WORD: ( ENG_LETTER | POLISH_LETTER | NUMBER )+;
WS: [ \t]+;
EOL: [\r\n]+;
UNKNOWN: .; |
libsrc/_DEVELOPMENT/target/yaz180/device/am9511a/am9511a_command.asm | jpoikela/z88dk | 640 | 161235 | <filename>libsrc/_DEVELOPMENT/target/yaz180/device/am9511a/am9511a_command.asm<gh_stars>100-1000
;------------------------------------------------------------------------------
; APU_CMD
;
; C = APU COMMAND
INCLUDE "config_private.inc"
SECTION code_driver
PUBLIC asm_am9511a_cmd
EXTERN APUCMDInPtr, APUPTRInPtr
EXTERN APUCMDBufUsed, APUPTRBufUsed
asm_am9511a_cmd:
ld a,(APUCMDBufUsed) ; Get the number of bytes in the COMMAND buffer
cp __APU_CMD_SIZE-1 ; check whether there is space in the buffer
ret NC ; COMMAND buffer full, so exit
ld hl,APUCMDBufUsed
di
inc (hl) ; atomic increment of COMMAND count
ld hl,(APUCMDInPtr) ; get the pointer to where we poke
ei
ld (hl),c ; write the COMMAND byte to the APUCMDInPtr
inc l ; move the COMMAND pointer low byte along, 0xFF rollover
ld (APUCMDInPtr),hl ; write where the next byte should be poked
ret
|
oeis/128/A128422.asm | neoneye/loda-programs | 11 | 12114 | ; A128422: Projective plane crossing number of K_{4,n}.
; Submitted by <NAME>
; 0,0,0,2,4,6,10,14,18,24,30,36,44,52,60,70,80,90,102,114,126,140,154,168,184,200,216,234,252,270,290,310,330,352,374,396,420,444,468,494,520,546,574,602,630,660,690,720,752,784,816,850,884,918,954,990,1026
bin $0,2
div $0,3
mul $0,2
|
day04/src/day.adb | jwarwick/aoc_2020 | 3 | 11883 | -- AoC 2020, Day 4
with Ada.Text_IO;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Characters.Handling; use Ada.Characters.Handling;
package body Day is
package TIO renames Ada.Text_IO;
type Key_Array is array(1..7) of String(1..3);
required_keys : constant Key_Array := Key_Array'("byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid");
type Eye_Color_Array is array(1..7) of String(1..3);
eye_colors : constant Eye_Color_Array := Eye_Color_Array'("amb", "blu", "brn", "gry", "grn", "hzl", "oth");
function valid_byr(s : in String) return Boolean is
value : constant Natural := Natural'Value(s);
begin
return value >= 1920 and value <= 2002;
end valid_byr;
function valid_iyr(s : in String) return Boolean is
value : constant Natural := Natural'Value(s);
begin
return value >= 2010 and value <= 2020;
end valid_iyr;
function valid_eyr(s : in String) return Boolean is
value : constant Natural := Natural'Value(s);
begin
return value >= 2020 and value <= 2030;
end valid_eyr;
function valid_hgt(s : in String) return Boolean is
suffix : constant String := s(s'last-1..s'last);
begin
if suffix = "in" then
declare
num : constant String := s(s'first..s'last-2);
value : constant Natural := Natural'Value(num);
begin
return value >= 59 and value <= 76;
end;
elsif suffix = "cm" then
declare
num : constant String := s(s'first..s'last-2);
value : constant Natural := Natural'Value(num);
begin
return value >= 150 and value <= 193;
end;
else
return false;
end if;
end valid_hgt;
function valid_hcl(s : in String) return Boolean is
prefix : constant Character := s(s'first);
begin
if prefix /= '#' then
return false;
end if;
if s'length /= 7 then
return false;
end if;
for c of s(s'first+1..s'last) loop
if not is_hexadecimal_digit(c) then
return false;
end if;
end loop;
return true;
end valid_hcl;
function valid_ecl(s : in String) return Boolean is
begin
for ec of eye_colors loop
if s = ec then
return true;
end if;
end loop;
return false;
end valid_ecl;
function valid_pid(s : in String) return Boolean is
begin
if s'length /= 9 then
return false;
end if;
for c of s loop
if not is_digit(c) then
return false;
end if;
end loop;
return true;
end valid_pid;
function valid(map : in Passport_Maps.Map) return Boolean is
use Passport_Maps;
begin
for elt in map.Iterate loop
declare
k : constant String := Key(elt);
v : constant String := map(k);
begin
if k = "byr" then
if not valid_byr(v) then
return false;
end if;
elsif k = "iyr" then
if not valid_iyr(v) then
return false;
end if;
elsif k = "eyr" then
if not valid_eyr(v) then
return false;
end if;
elsif k = "hgt" then
if not valid_hgt(v) then
return false;
end if;
elsif k = "hcl" then
if not valid_hcl(v) then
return false;
end if;
elsif k = "ecl" then
if not valid_ecl(v) then
return false;
end if;
elsif k = "pid" then
if not valid_pid(v) then
return false;
end if;
end if;
end;
end loop;
return true;
end valid;
function present(map : in Passport_Maps.Map) return Boolean is
begin
for k of required_keys loop
if not map.contains(k) then
return false;
end if;
end loop;
return true;
end present;
function present_count(batch : in Passport_Vectors.Vector) return Count_Type is
cnt : Natural := 0;
begin
for m of batch loop
if present(m) then
cnt := cnt + 1;
end if;
end loop;
return Count_Type(cnt);
end present_count;
function valid_count(batch : in Passport_Vectors.Vector) return Count_Type is
cnt : Natural := 0;
begin
for m of batch loop
if present(m) and valid(m) then
cnt := cnt + 1;
end if;
end loop;
return Count_Type(cnt);
end valid_count;
procedure parse_entry(line : in String; map : in out Passport_Maps.Map) is
idx : constant Natural := index(line, ":");
left : constant String := line(line'first .. idx-1);
right : constant String := line(idx+1 .. line'last);
begin
map.include(left, right);
end parse_entry;
procedure parse_line(line : in String; map : in out Passport_Maps.Map) is
idx : constant Natural := index(line, " ");
begin
if idx > 0 then
declare
left : constant String := line(line'first .. idx-1);
right : constant String := line(idx+1 .. line'last);
begin
parse_entry(left, map);
parse_line(right, map);
end;
else
parse_entry(line, map);
end if;
end parse_line;
function "="(Left, Right:Passport_Maps.Map) return Boolean
renames Passport_Maps."=";
function load_batch(filename : in String) return Passport_Vectors.Vector is
file : TIO.File_Type;
output : Passport_Vectors.Vector;
begin
TIO.open(File => file, Mode => TIO.In_File, Name => filename);
while not TIO.end_of_file(file) loop
declare
map : Passport_Maps.Map;
begin
loop
declare
line : constant String := TIO.get_line(file);
begin
if index_non_blank(line) = 0 then
exit;
else
parse_line(line, map);
if TIO.end_of_file(file) then
exit;
end if;
end if;
end;
end loop;
output.append(map);
end;
end loop;
TIO.close(file);
return output;
end load_batch;
end Day;
|
src/Categories/Category/RigCategory.agda | MirceaS/agda-categories | 0 | 3085 | {-# OPTIONS --without-K --safe #-}
-- Actually, we're cheating (for expediency); this is
-- Symmetric Rig, not just Rig.
open import Categories.Category
module Categories.Category.RigCategory {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Data.Fin renaming (zero to 0F; suc to sucF)
open import Data.Product using (_,_)
open import Categories.Functor renaming (id to idF)
open import Categories.Category.Monoidal
open import Categories.Category.Monoidal.Braided
open import Categories.Category.Monoidal.Symmetric
open import Categories.NaturalTransformation.NaturalIsomorphism
open import Categories.NaturalTransformation using (_∘ᵥ_; _∘ₕ_; _∘ˡ_; _∘ʳ_; NaturalTransformation)
open import Categories.Morphism C
-- Should probably split out Distributive Category out and make this be 'over' that.
record RigCategory {M⊎ M× : Monoidal C} (S⊎ : Symmetric M⊎)
(S× : Symmetric M×) : Set (o ⊔ ℓ ⊔ e) where
private
module C = Category C
open C hiding (_≈_)
open Commutation
module M⊎ = Monoidal M⊎
module M× = Monoidal M×
module S⊎ = Symmetric S⊎
module S× = Symmetric S×
open M⊎ renaming (_⊗₀_ to _⊕₀_; _⊗₁_ to _⊕₁_)
open M×
private
0C : C.Obj
0C = M⊎.unit
1C : C.Obj
1C = M×.unit
private
B⊗ : ∀ {X Y} → X ⊗₀ Y ⇒ Y ⊗₀ X
B⊗ {X} {Y} = S×.braiding.⇒.η (X , Y)
B⊕ : ∀ {X Y} → X ⊕₀ Y ⇒ Y ⊕₀ X
B⊕ {X} {Y} = S⊎.braiding.⇒.η (X , Y)
field
annₗ : ∀ {X} → 0C ⊗₀ X ≅ 0C
annᵣ : ∀ {X} → X ⊗₀ 0C ≅ 0C
distribₗ : ∀ {X Y Z} → X ⊗₀ (Y ⊕₀ Z) ≅ (X ⊗₀ Y) ⊕₀ (X ⊗₀ Z)
distribᵣ : ∀ {X Y Z} → (X ⊕₀ Y) ⊗₀ Z ≅ (X ⊗₀ Z) ⊕₀ (Y ⊗₀ Z)
private
λ* : ∀ {X} → 0C ⊗₀ X ⇒ 0C
λ* {X} = _≅_.from (annₗ {X})
ρ* : ∀ {X} → X ⊗₀ 0C ⇒ 0C
ρ* {X} = _≅_.from (annᵣ {X})
module dl {X} {Y} {Z} = _≅_ (distribₗ {X} {Y} {Z})
module dr {X} {Y} {Z} = _≅_ (distribᵣ {X} {Y} {Z})
⊗λ⇒ = M×.unitorˡ.from
⊗λ⇐ = M×.unitorˡ.to
⊗ρ⇒ = M×.unitorʳ.from
⊗ρ⇐ = M×.unitorʳ.to
⊗α⇒ = M×.associator.from
⊗α⇐ = M×.associator.to
⊕λ⇒ = M⊎.unitorˡ.from
⊕λ⇐ = M⊎.unitorˡ.to
⊕ρ⇒ = M⊎.unitorʳ.from
⊕ρ⇐ = M⊎.unitorʳ.to
⊕α⇒ = M⊎.associator.from
⊕α⇐ = M⊎.associator.to
-- need II, IX, X, XV
-- choose I, IV, VI, XI, XIII, XIX, XXIII and (XVI, XVII)
field
laplazaI : ∀ {A B C} →
[ A ⊗₀ (B ⊕₀ C) ⇒ (A ⊗₀ C) ⊕₀ (A ⊗₀ B) ]⟨
dl.from ⇒⟨ (A ⊗₀ B) ⊕₀ (A ⊗₀ C) ⟩
B⊕
≈
C.id ⊗₁ B⊕ ⇒⟨ A ⊗₀ (C ⊕₀ B) ⟩
dl.from
⟩
laplazaII : ∀ {A B C} →
[ (A ⊕₀ B) ⊗₀ C ⇒ (C ⊗₀ A) ⊕₀ (C ⊗₀ B) ]⟨
B⊗ ⇒⟨ C ⊗₀ (A ⊕₀ B) ⟩
dl.from
≈
dr.from ⇒⟨ (A ⊗₀ C) ⊕₀ (B ⊗₀ C) ⟩
B⊗ ⊕₁ B⊗
⟩
laplazaIV : {A B C D : Obj} →
[ (A ⊕₀ B ⊕₀ C) ⊗₀ D ⇒ ((A ⊗₀ D) ⊕₀ (B ⊗₀ D)) ⊕₀ (C ⊗₀ D) ]⟨
dr.from ⇒⟨ (A ⊗₀ D) ⊕₀ ((B ⊕₀ C) ⊗₀ D) ⟩
C.id ⊕₁ dr.from ⇒⟨ (A ⊗₀ D) ⊕₀ ((B ⊗₀ D) ⊕₀ (C ⊗₀ D)) ⟩
⊕α⇐
≈
⊕α⇐ ⊗₁ C.id ⇒⟨ ((A ⊕₀ B) ⊕₀ C) ⊗₀ D ⟩
dr.from ⇒⟨ ((A ⊕₀ B) ⊗₀ D) ⊕₀ (C ⊗₀ D) ⟩
dr.from ⊕₁ C.id
⟩
laplazaVI : {A B C D : Obj} →
[ A ⊗₀ B ⊗₀ (C ⊕₀ D) ⇒ ((A ⊗₀ B) ⊗₀ C) ⊕₀ ((A ⊗₀ B) ⊗₀ D) ]⟨
C.id ⊗₁ dl.from ⇒⟨ A ⊗₀ ((B ⊗₀ C) ⊕₀ (B ⊗₀ D)) ⟩
dl.from ⇒⟨ (A ⊗₀ B ⊗₀ C) ⊕₀ (A ⊗₀ B ⊗₀ D) ⟩
⊗α⇐ ⊕₁ ⊗α⇐
≈
⊗α⇐ ⇒⟨ (A ⊗₀ B) ⊗₀ (C ⊕₀ D) ⟩
dl.from
⟩
laplazaIX : ∀ {A B C D} → [ (A ⊕₀ B) ⊗₀ (C ⊕₀ D) ⇒ (((A ⊗₀ C) ⊕₀ (B ⊗₀ C)) ⊕₀ (A ⊗₀ D)) ⊕₀ (B ⊗₀ D) ]⟨
dr.from ⇒⟨ (A ⊗₀ (C ⊕₀ D)) ⊕₀ (B ⊗₀ (C ⊕₀ D)) ⟩
dl.from ⊕₁ dl.from ⇒⟨ ((A ⊗₀ C) ⊕₀ (A ⊗₀ D)) ⊕₀ ((B ⊗₀ C) ⊕₀ (B ⊗₀ D)) ⟩
⊕α⇐ ⇒⟨ (((A ⊗₀ C) ⊕₀ (A ⊗₀ D)) ⊕₀ (B ⊗₀ C)) ⊕₀ (B ⊗₀ D) ⟩
⊕α⇒ ⊕₁ C.id ⇒⟨ ((A ⊗₀ C) ⊕₀ ((A ⊗₀ D) ⊕₀ (B ⊗₀ C))) ⊕₀ (B ⊗₀ D) ⟩
(C.id ⊕₁ B⊕) ⊕₁ C.id ⇒⟨ ((A ⊗₀ C) ⊕₀ ((B ⊗₀ C) ⊕₀ (A ⊗₀ D))) ⊕₀ (B ⊗₀ D) ⟩
⊕α⇐ ⊕₁ C.id
≈
dl.from ⇒⟨ ((A ⊕₀ B) ⊗₀ C) ⊕₀ ((A ⊕₀ B) ⊗₀ D) ⟩
dr.from ⊕₁ dr.from ⇒⟨ ((A ⊗₀ C) ⊕₀ (B ⊗₀ C)) ⊕₀ ((A ⊗₀ D) ⊕₀ (B ⊗₀ D)) ⟩
⊕α⇐
⟩
laplazaX : [ 0C ⊗₀ 0C ⇒ 0C ]⟨ λ* ≈ ρ* ⟩
laplazaXI : ∀ {A B} →
[ 0C ⊗₀ (A ⊕₀ B) ⇒ 0C ]⟨
dl.from ⇒⟨ (0C ⊗₀ A) ⊕₀ (0C ⊗₀ B) ⟩
λ* ⊕₁ λ* ⇒⟨ 0C ⊕₀ 0C ⟩
⊕λ⇒
≈
λ*
⟩
laplazaXIII : [ 0C ⊗₀ 1C ⇒ 0C ]⟨ ⊗ρ⇒ ≈ λ* ⟩
laplazaXV : ∀ {A : Obj} →
[ A ⊗₀ 0C ⇒ 0C ]⟨
ρ*
≈
B⊗ ⇒⟨ 0C ⊗₀ A ⟩
λ*
⟩
laplazaXVI : ∀ {A B} → [ 0C ⊗₀ (A ⊗₀ B) ⇒ 0C ]⟨
⊗α⇐ ⇒⟨ (0C ⊗₀ A) ⊗₀ B ⟩
λ* ⊗₁ C.id ⇒⟨ 0C ⊗₀ B ⟩
λ*
≈
λ*
⟩
laplazaXVII : ∀ {A B} → [ A ⊗₀ (0C ⊗₀ B) ⇒ 0C ]⟨
⊗α⇐ ⇒⟨ (A ⊗₀ 0C) ⊗₀ B ⟩
ρ* ⊗₁ C.id ⇒⟨ 0C ⊗₀ B ⟩
λ*
≈
C.id ⊗₁ λ* ⇒⟨ A ⊗₀ 0C ⟩
ρ*
⟩
laplazaXIX : ∀ {A B} → [ A ⊗₀ (0C ⊕₀ B) ⇒ A ⊗₀ B ]⟨
dl.from ⇒⟨ (A ⊗₀ 0C) ⊕₀ (A ⊗₀ B) ⟩
ρ* ⊕₁ C.id ⇒⟨ 0C ⊕₀ (A ⊗₀ B) ⟩
⊕λ⇒
≈
C.id ⊗₁ ⊕λ⇒
⟩
laplazaXXIII : ∀ {A B} → [ 1C ⊗₀ (A ⊕₀ B) ⇒ (A ⊕₀ B) ]⟨
⊗λ⇒
≈
dl.from ⇒⟨ (1C ⊗₀ A) ⊕₀ (1C ⊗₀ B) ⟩
⊗λ⇒ ⊕₁ ⊗λ⇒
⟩
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.